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
868a2876b8e613474368e0a47b02e942892813b8
Wordpress Stackexchange Q: Where should my plugin POST to? I'm creating a simple plugin to set a page as a homepage from the list pages (to appear next to edit, preview, trash actions etc), I was just wondering what that the most appropriate/secure place to submit this information to? By far the easiest way would be to just post back to the plugin file itself with a $_GET param, but that seems rather hacky and doesn't use a nonce or anything (my plugin does have current_user_can() in it. Code is as simple as this: function add_post_actions($actions, $post) { if($post->ID == get_option('page_on_front')) { $actions['homepage'] = '<span style="color: #999;">Your Homepage</span>'; } else { $actions['homepage'] = '<a href="blah.php?post='.$post->ID.'">Set As Homepage</a>'; } return $actions; } function change_to_homepage($postId) { if ( ! current_user_can( 'manage_options' ) ) wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); update_option('show_on_front', 'page'); update_option('page_on_front', $postId); } A: To me it makes sense to send via GET to the page you are currently on. That way you just hook into admin_init and check for your GET variables. As for security you can pass nonces via URLS: http://codex.wordpress.org/Function_Reference/wp_nonce_url
Q: Where should my plugin POST to? I'm creating a simple plugin to set a page as a homepage from the list pages (to appear next to edit, preview, trash actions etc), I was just wondering what that the most appropriate/secure place to submit this information to? By far the easiest way would be to just post back to the plugin file itself with a $_GET param, but that seems rather hacky and doesn't use a nonce or anything (my plugin does have current_user_can() in it. Code is as simple as this: function add_post_actions($actions, $post) { if($post->ID == get_option('page_on_front')) { $actions['homepage'] = '<span style="color: #999;">Your Homepage</span>'; } else { $actions['homepage'] = '<a href="blah.php?post='.$post->ID.'">Set As Homepage</a>'; } return $actions; } function change_to_homepage($postId) { if ( ! current_user_can( 'manage_options' ) ) wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); update_option('show_on_front', 'page'); update_option('page_on_front', $postId); } A: To me it makes sense to send via GET to the page you are currently on. That way you just hook into admin_init and check for your GET variables. As for security you can pass nonces via URLS: http://codex.wordpress.org/Function_Reference/wp_nonce_url
wordpress
{ "language": "en", "length": 190, "provenance": "stackexchange_00019.jsonl.gz:412893", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/27989" }
[ 0.06439208984375, 0.0094451904296875, 0.002056121826171875, -0.0008249282836914062, 0.021881103515625, -0.038482666015625, 0.06915283203125, -0.03466796875, 0.0053863525390625, -0.0299835205078125, 0.00658416748046875, -0.0163726806640625, -0.060882568359375, -0.049652099609375, 0.01531219482421875, -0.040283203125, 0.03997802734375, -0.030487060546875, 0.029815673828125, 0.0038356781005859375, 0.0133514404296875, 0.01531219482421875, 0.0263671875, 0.0079345703125, 0.041778564453125, -0.06158447265625, 0.03759765625, -0.013519287109375, 0.03240966796875, -0.0038623809814453125, 0.025970458984375, -0.007564544677734375, 0.0218353271484375, -0.01421356201171875, 0.00765228271484375, -0.0198211669921875, 0.027923583984375, -0.00836944580078125, -0.01062774658203125, 0.0396728515625, 0.034393310546875, 0.004734039306640625, -0.005290985107421875, 0.060028076171875, -0.0360107421875, -0.06549072265625, 0.0570068359375, 0.005733489990234375, -0.01367950439453125, -0.00757598876953125, 0.003551483154296875, -0.0123748779296875, 0.0003905296325683594, 0.006378173828125, -0.007320404052734375, -0.003131866455078125, -0.0261993408203125, -0.00164794921875, 0.0185546875, 0.038970947265625, -0.0151214599609375, -0.013336181640625, 0.006420135498046875, -0.03631591796875, 0.024749755859375, -0.0299072265625, -0.0016908645629882812, 0.0196533203125, -0.074951171875, 0.027923583984375, 0.07574462890625, -0.037994384765625, 0.0019474029541015625, -0.04248046875, -0.0230712890625, 0.030548095703125, 0.0008454322814941406, 0.002231597900390625, 0.007755279541015625, -0.01873779296875, -0.05389404296875, 0.016693115234375, -0.044647216796875, -0.035491943359375, -0.01178741455078125, -0.001972198486328125, -0.02520751953125, -0.0058441162109375, -0.024505615234375, 0.0015974044799804688, -0.022705078125, -0.00685882568359375, 0.0399169921875, -0.0276641845703125, -0.04107666015625, -0.003345489501953125, 0.0127105712890625, 0.01483154296875, 0.00019490718841552734, 0.0158538818359375, 0.0017223358154296875, -0.04547119140625, 0.043792724609375, -0.0261383056640625, 0.007236480712890625, 0.047760009765625, 0.0538330078125, 0.040191650390625, 0.0024814605712890625, -0.022064208984375, -0.01275634765625, 0.033477783203125, -0.013885498046875, -0.004276275634765625, -0.0004146099090576172, -0.025238037109375, -0.057098388671875, -0.00005632638931274414, -0.00783538818359375, -0.01202392578125, -0.0113983154296875, 0.0005564689636230469, -0.0035552978515625, -0.03131103515625, -0.020172119140625, -0.0360107421875, -0.032806396484375, 0.0044097900390625, 0.005130767822265625, 0.01218414306640625, -0.039398193359375, 0.0256805419921875, 0.11260986328125, -0.01103973388671875, -0.00836181640625, -0.027374267578125, -0.0028667449951171875, 0.0200042724609375, -0.004901885986328125, -0.0078277587890625, 0.009124755859375, -0.020538330078125, 0.00627899169921875, -0.0092010498046875, 0.02740478515625, -0.00141143798828125, 0.021087646484375, 0.02618408203125, -0.00807952880859375, -0.0011920928955078125, 0.03912353515625, -0.0189056396484375, 0.016326904296875, -0.01094818115234375, 0.02813720703125, 0.004291534423828125, 0.0250701904296875, -0.0061798095703125, 0.0013885498046875, -0.003345489501953125, 0.0205535888671875, 0.0042572021484375, 0.03302001953125, -0.054595947265625, -0.0268096923828125, -0.0384521484375, -0.0570068359375, 0.00722503662109375, 0.004711151123046875, 0.033599853515625, 0.0253143310546875, -0.040374755859375, -0.031402587890625, -0.0012187957763671875, -0.0074462890625, 0.00710296630859375, -0.0164947509765625, 0.02734375, 0.04107666015625, 0.0150909423828125, -0.0030612945556640625, -0.022369384765625, 0.0640869140625, -0.006908416748046875, -0.052459716796875, 0.022186279296875, 0.005336761474609375, 0.039337158203125, 0.00012230873107910156, 0.00560760498046875, 0.0361328125, 0.0167083740234375, -0.0290985107421875, 0.0221099853515625, -0.0247955322265625, -0.0185699462890625, -0.01227569580078125, 0.007137298583984375, -0.0305328369140625, 0.00909423828125, -0.0236663818359375, 0.0050201416015625, -0.004543304443359375, 0.00844573974609375, -0.0018682479858398438, -0.016326904296875, -0.005115509033203125, 0.024658203125, 0.0166778564453125, 0.0279083251953125, 0.0134735107421875, 0.0218658447265625, -0.0195770263671875, -0.028228759765625, -0.054656982421875, 0.0093231201171875, -0.030303955078125, 0.0283660888671875, 0.00202178955078125, 0.04071044921875, 0.013397216796875, -0.0316162109375, 0.0072174072265625, 0.00937652587890625, 0.0462646484375, -0.02490234375, -0.002445220947265625, -0.033050537109375, -0.003017425537109375, -0.00017833709716796875, -0.0626220703125, 0.049407958984375, 0.036956787109375, -0.007312774658203125, -0.047332763671875, -0.0163421630859375, -0.0268096923828125, -0.09466552734375, 0.01276397705078125, 0.0780029296875, 0.0161285400390625, -0.01508331298828125, -0.015045166015625, 0.0218353271484375, 0.0185394287109375, -0.040435791015625, -0.01186370849609375, 0.02801513671875, 0.01209259033203125, 0.03350830078125, -0.0097198486328125, 0.005237579345703125, 0.0157623291015625, -0.06475830078125, 0.00255584716796875, 0.036346435546875, -0.0267181396484375, 0.011962890625, 0.007152557373046875, -0.0467529296875, 0.0009813308715820312, -0.058624267578125, -0.0136871337890625, -0.0139617919921875, 0.042266845703125, -0.0278472900390625, 0.00777435302734375, 0.0015888214111328125, -0.015716552734375, -0.0017728805541992188, 0.0203094482421875, -0.0143280029296875, -0.007770538330078125, 0.023529052734375, 0.03729248046875, -0.08685302734375, -0.01050567626953125, -0.0033626556396484375, -0.0248260498046875, -0.0241851806640625, -0.01303863525390625, 0.0111083984375, 0.0005350112915039062, -0.00846099853515625, -0.018218994140625, -0.033721923828125, 0.0196075439453125, 0.0055084228515625, 0.061798095703125, 0.0175933837890625, 0.030487060546875, -0.011077880859375, -0.0728759765625, 0.0966796875, -0.0003161430358886719, -0.05963134765625, 0.0341796875, -0.032012939453125, 0.0207977294921875, -0.00698089599609375, 0.06683349609375, 0.06671142578125, 0.0247039794921875, -0.00975799560546875, 0.01155853271484375, 0.023345947265625, -0.005413055419921875, 0.031280517578125, -0.003391265869140625, -0.0059051513671875, -0.04180908203125, -0.01959228515625, 0.0038547515869140625, 0.0082855224609375, -0.027557373046875, -0.058563232421875, -0.042388916015625, 0.017333984375, -0.1005859375, -0.033721923828125, 0.01372528076171875, -0.07794189453125, 0.0253448486328125, -0.014892578125, -0.023834228515625, -0.0164337158203125, 0.027740478515625, 0.01381683349609375, -0.038055419921875, 0.007358551025390625, -0.032501220703125, -0.0523681640625, -0.04400634765625, 0.004848480224609375, -0.0024433135986328125, 0.0236663818359375, -0.0178375244140625, 0.07568359375, -0.00360107421875, -0.07275390625, -0.0218505859375, 0.037445068359375, -0.01372528076171875, -0.0034351348876953125, 0.0085906982421875, -0.0249481201171875, 0.000016927719116210938, -0.00045418739318847656, 0.0176544189453125, 0.0372314453125, -0.0175628662109375, 0.006870269775390625, -0.033294677734375, -0.033843994140625, -0.0276336669921875, 0.0013532638549804688, 0.04351806640625, 0.0074462890625, -0.0107421875, -0.04052734375, 0.0188140869140625, 0.0005445480346679688, -0.017333984375, -0.0174102783203125, -0.01349639892578125, -0.00832366943359375, 0.023773193359375, -0.005222320556640625, 0.001613616943359375, 0.025299072265625, 0.06341552734375, -0.003711700439453125, -0.049072265625, -0.036163330078125, -0.044189453125, -0.033203125, -0.00795745849609375, -0.0080718994140625, 0.01546478271484375, -0.002391815185546875, 0.01506805419921875, -0.009674072265625, 0.0264129638671875, -0.045318603515625, -0.0723876953125, 0.037811279296875, -0.017822265625, -0.01495361328125, -0.02099609375, -0.01424407958984375, -0.00409698486328125, 0.07623291015625, -0.050323486328125, -0.017059326171875, 0.01447296142578125, 0.027435302734375, -0.0120391845703125, -0.05072021484375, -0.0187530517578125, -0.0216064453125, -0.0924072265625, 0.00421905517578125, -0.0220794677734375, -0.0202484130859375, -0.0005125999450683594, 0.02288818359375, -0.03143310546875, -0.0472412109375, 0.04052734375, 0.01300048828125, -0.0169219970703125, 0.014007568359375, -0.026519775390625, -0.0158233642578125, -0.0304107666015625, 0.01549530029296875, -0.0872802734375, -0.015899658203125, 0.04498291015625, 0.03216552734375, -0.006282806396484375, -0.0379638671875, -0.0309295654296875, 0.043731689453125, -0.0322265625, 0.00463104248046875, 0.0248870849609375, 0.040130615234375, -0.0005793571472167969, -0.0408935546875, -0.00806427001953125, -0.045806884765625, 0.00646209716796875, 0.0218658447265625, -0.04852294921875, -0.040802001953125, -0.030303955078125, -0.044464111328125, 0.03997802734375, -0.052734375, -0.08837890625, -0.034759521484375, -0.0015802383422851562, -0.0125579833984375, -0.0309906005859375, 0.017059326171875, -0.0166778564453125, -0.07012939453125, 0.01482391357421875, -0.04290771484375, 0.0010528564453125, 0.0185546875, 0.078369140625, 0.0225677490234375, 0.01262664794921875, -0.007801055908203125, -0.012481689453125, 0.0212860107421875, 0.0209197998046875, 0.039947509765625, 0.046539306640625, -0.001697540283203125, 0.033203125, 0.00981903076171875, -0.002750396728515625, -0.002445220947265625, 0.040802001953125, 0.018707275390625, -0.011993408203125, 0.01641845703125, 0.0224609375, 0.006633758544921875, 0.025787353515625, -0.044158935546875, 0.0204925537109375, -0.049224853515625, -0.0250244140625, -0.028228759765625, 0.06060791015625, 0.01593017578125, -0.0215606689453125, 0.0052947998046875, 0.0220794677734375, -0.01555633544921875, 0.0233001708984375, -0.01367950439453125, -0.014617919921875, -0.0234832763671875, 0.0145416259765625, 0.0192718505859375, 0.0200347900390625, 0.001129150390625, 0.041351318359375, 0.0008792877197265625, 0.0015134811401367188, -0.004852294921875, 0.0067291259765625, 0.050445556640625, -0.081298828125, -0.07476806640625, -0.068115234375, -0.0226898193359375, 0.01593017578125, 0.06988525390625, 0.0235748291015625, 0.045501708984375, -0.022308349609375, -0.01519012451171875, -0.01641845703125, -0.0233917236328125, -0.032257080078125, -0.05242919921875, 0.0020751953125, -0.004863739013671875, 0.010345458984375, -0.00753021240234375, 0.06793212890625, 0.0128021240234375, 0.034576416015625, -0.040069580078125, 0.025390625, 0.041595458984375, -0.023834228515625, 0.017242431640625, 0.02813720703125, 0.01331329345703125, -0.04888916015625, 0.0158538818359375, -0.016876220703125, -0.01534271240234375, 0.0245361328125, 0.0335693359375, -0.0217437744140625, 0.00006258487701416016, 0.00750732421875, -0.00322723388671875, -0.022857666015625, 0.058868408203125, 0.028717041015625, -0.04803466796875, -0.01474761962890625, 0.043426513671875, 0.047271728515625, -0.004955291748046875, 0.006328582763671875, -0.00823974609375, -0.0015230178833007812, 0.022979736328125, -0.0271453857421875, -0.0171356201171875, 0.0199127197265625, 0.0160369873046875, 0.00218963623046875, -0.0107269287109375, -0.00543975830078125, -0.004062652587890625, -0.007297515869140625, -0.037628173828125, -0.019866943359375, 0.05548095703125, -0.01422119140625, 0.047088623046875, -0.006816864013671875, -0.03338623046875, 0.016326904296875, 0.007740020751953125, 0.042999267578125, 0.022216796875, -0.05322265625, -0.01497650146484375, -0.0179901123046875, -0.007495880126953125, 0.0178985595703125, -0.008056640625, -0.0288543701171875, -0.01003265380859375, 0.0092620849609375, 0.03271484375, -0.036102294921875, -0.052886962890625, -0.0191497802734375, -0.00600433349609375, 0.01019287109375, 0.048797607421875, -0.02215576171875, 0.060089111328125, -0.023590087890625, 0.0311279296875, -0.0096893310546875, 0.0017881393432617188, -0.0170440673828125, 0.0105133056640625, -0.01061248779296875, -0.01486968994140625, 0.024993896484375, -0.0194549560546875, 0.05487060546875, 0.0192718505859375, 0.0572509765625, 0.01149749755859375, -0.0048370361328125, 0.01514434814453125, 0.004604339599609375, -0.01538848876953125, 0.0023632049560546875, 0.001720428466796875, -0.048553466796875, 0.067138671875, -0.02874755859375, -0.03173828125, -0.006114959716796875, 0.0296173095703125, -0.00348663330078125, -0.0231475830078125, -0.0191650390625, 0.0176544189453125, -0.030731201171875, 0.0723876953125, 0.1214599609375, 0.01152801513671875, 0.055450439453125, 0.033782958984375, 0.00548553466796875, 0.017059326171875, 0.025665283203125, -0.033050537109375, -0.0259246826171875, 0.048492431640625, 0.01019287109375, -0.0273590087890625, 0.045196533203125, -0.01531219482421875, 0.054779052734375, 0.02130126953125, 0.06976318359375, -0.061370849609375, 0.04522705078125, 0.0186920166015625, -0.01812744140625, 0.046661376953125, 0.00768280029296875, 0.0024356842041015625, 0.00576019287109375, 0.0499267578125, -0.0374755859375, -0.0053863525390625, 0.038909912109375, -0.007724761962890625, -0.0200042724609375, -0.02593994140625, 0.01555633544921875, 0.0106658935546875, -0.007770538330078125, 0.00943756103515625, -0.005657196044921875, -0.01190185546875, -0.016845703125, 0.0025348663330078125, 0.0070343017578125, -0.05096435546875, -0.0560302734375, 0.01312255859375, 0.0006589889526367188, -0.0180511474609375, 0.0277862548828125, -0.0162811279296875, 0.0301971435546875, 0.0352783203125, -0.0086669921875, -0.0016584396362304688, 0.005008697509765625, -0.007480621337890625, -0.0033473968505859375, -0.01485443115234375, 0.0139923095703125, 0.001979827880859375, -0.0301971435546875, 0.01020050048828125, -0.030792236328125, -0.01515960693359375, -0.034698486328125, -0.0673828125, 0.09259033203125, -0.022491455078125, -0.0264739990234375, -0.0205078125, 0.005832672119140625, 0.0004372596740722656, -0.0004563331604003906, 0.00960540771484375, -0.059661865234375, 0.0013513565063476562, -0.004901885986328125, -0.020538330078125, -0.015380859375, -0.007205963134765625, -0.07122802734375, 0.1429443359375, -0.03369140625, 0.0088043212890625, -0.005809783935546875, 0.06634521484375, -0.04925537109375, 0.023468017578125, -0.0297393798828125, 0.0487060546875, -0.0218505859375, 0.0296173095703125, -0.03167724609375, 0.006622314453125, 0.00441741943359375, 0.00356292724609375, 0.042999267578125, 0.02862548828125, -0.0494384765625, -0.00766754150390625, -0.0225372314453125, -0.0219573974609375, -0.041046142578125, 0.073974609375, 0.00734710693359375, 0.02886962890625, 0.036834716796875, -0.055755615234375, 0.0212249755859375, -0.0217742919921875, 0.01513671875, 0.0235748291015625, 0.006626129150390625, -0.007781982421875, -0.043731689453125, 0.0137176513671875, -0.061614990234375, -0.0181732177734375, 0.029693603515625, 0.0224151611328125, -0.008270263671875, 0.032562255859375, 0.00959014892578125, 0.018890380859375, 0.03753662109375, -0.0224151611328125, 0.03399658203125, -0.009674072265625, 0.0018110275268554688, 0.031524658203125, 0.0110626220703125, 0.044708251953125, 0.0107879638671875, -0.0028667449951171875, 0.0191802978515625, 0.013580322265625, 0.09136962890625, 0.05621337890625, 0.030517578125, -0.006237030029296875, 0.021942138671875, 0.016387939453125, 0.086669921875, -0.06207275390625, -0.01352691650390625, 0.00021469593048095703, 0.01532745361328125, 0.01279449462890625, -0.035919189453125, 0.013214111328125, -0.01837158203125, 0.00849151611328125, -0.015838623046875, 0.0078887939453125, 0.032012939453125, 0.006160736083984375, 0.0015468597412109375, -0.008087158203125, -0.0269317626953125, 0.0008063316345214844, -0.0238189697265625, -0.004917144775390625, -0.016754150390625, 0.00875091552734375, 0.025390625, 0.011383056640625, 0.018798828125, 0.01519012451171875, -0.0306549072265625, 0.0216217041015625, -0.01103973388671875, 0.032562255859375, -0.038055419921875, -0.0266571044921875, -0.007587432861328125, 0.051605224609375, 0.00685882568359375, 0.07232666015625, 0.0236968994140625, 0.0197906494140625, 0.0269622802734375, 0.00809478759765625, 0.0115966796875, -0.02886962890625, 0.036468505859375, -0.029388427734375, 0.014892578125, -0.0253143310546875, -0.0216217041015625, -0.00331878662109375, 0.032470703125, -0.01224517822265625, -0.0131072998046875, 0.048828125, -0.006103515625, 0.00028061866760253906, 0.026214599609375, -0.002899169921875, 0.045623779296875, 0.00021922588348388672, -0.014495849609375, -0.01468658447265625, -0.0142669677734375, -0.0252838134765625, -0.0021266937255859375, 0.0310516357421875, 0.002216339111328125, 0.0072479248046875, -0.00308990478515625, 0.00699615478515625, 0.030487060546875, -0.0308990478515625, 0.006595611572265625, 0.0655517578125, 0.029937744140625, 0.0203704833984375, -0.01251220703125, -0.008453369140625, -0.0223541259765625, 0.03759765625, 0.0181427001953125, 0.08172607421875, -0.042449951171875, 0.0199737548828125, -0.0171966552734375, 0.0245819091796875, -0.04034423828125, -0.0208587646484375, 0.028472900390625, -0.005084991455078125, -0.006694793701171875, -0.0023288726806640625, 0.003673553466796875, 0.01496124267578125, 0.0134735107421875, -0.03717041015625, -0.0087432861328125, -0.01309967041015625, 0.0190277099609375, -0.0092315673828125, 0.0301055908203125, -0.0010786056518554688, -0.0138092041015625, -0.032745361328125, -0.006256103515625, 0.0531005859375, 0.0452880859375, -0.0287322998046875, 0.078857421875, 0.01244354248046875, 0.04766845703125, 0.0113677978515625, -0.026123046875, 0.00844573974609375, 0.02056884765625, -0.028228759765625, 0.001316070556640625, 0.0232391357421875, -0.0158233642578125, 0.03662109375, 0.009674072265625, 0.038299560546875, 0.0204925537109375, 0.00608062744140625, -0.01094818115234375, -0.025299072265625, 0.0080413818359375, 0.00023686885833740234, -0.01308441162109375, -0.007568359375, 0.0063018798828125, -0.05645751953125, -0.039581298828125, -0.008819580078125, -0.07904052734375, -0.0091094970703125, 0.005458831787109375, -0.050140380859375, -0.029205322265625, -0.0168609619140625, 0.01178741455078125, 0.0000028014183044433594, -0.0179595947265625, -0.0556640625, 0.0065765380859375, -0.0206298828125, 0.08074951171875, -0.05364990234375, 0.050537109375, -0.0296630859375, 0.01299285888671875, -0.0494384765625, 0.020050048828125, -0.042877197265625, -0.0084991455078125, -0.001888275146484375, 0.0218048095703125, 0.05963134765625, -0.005748748779296875, -0.04150390625, -0.01171112060546875, -0.024139404296875, 0.030914306640625, -0.04229736328125, -0.038543701171875, 0.0052490234375, -0.022552490234375, 0.0030841827392578125, -0.0124664306640625, 0.00994110107421875, -0.056488037109375, -0.034698486328125, 0.00008577108383178711, -0.01087188720703125, -0.00751495361328125, -0.041015625, -0.0292205810546875, 0.07855224609375, -0.0056915283203125, -0.0207977294921875, -0.00016021728515625, -0.007534027099609375, 0.00542449951171875, 0.00942230224609375, 0.00531005859375, -0.056884765625, -0.05047607421875, -0.0036678314208984375, 0.01294708251953125, 0.04229736328125, 0.008148193359375, 0.03472900390625, -0.0288543701171875, 0.021575927734375, -0.0021190643310546875, -0.006290435791015625, 0.007244110107421875, -0.01458740234375, 0.03387451171875, 0.017120361328125, -0.025177001953125, 0.03265380859375, 0.0103912353515625, -0.0173492431640625, -0.0038299560546875, -0.005634307861328125, -0.0173797607421875, 0.0166015625, 0.042877197265625, 0.040283203125, 0.003387451171875, -0.0347900390625, -0.00943756103515625, -0.0528564453125, -0.01178741455078125, 0.0076904296875, 0.0181732177734375, -0.040985107421875, 0.030242919921875, 0.019744873046875, -0.0155792236328125, -0.0443115234375, 0.03973388671875, -0.03204345703125, -0.0037517547607421875, 0.050628662109375, -0.015838623046875, -0.023284912109375, -0.032073974609375, 0.069580078125, -0.033355712890625, -0.003589630126953125, 0.02447509765625, 0.00679779052734375, 0.04315185546875, 0.04412841796875, 0.000013470649719238281, 0.0214385986328125, -0.0256500244140625, 0.01220703125, 0.00916290283203125, 0.0416259765625, -0.0255889892578125, -0.009979248046875, -0.0129241943359375, 0.0252227783203125, -0.013763427734375, 0.0272674560546875, -0.013275146484375, 0.019866943359375, -0.01483154296875, 0.047210693359375, -0.0227508544921875, -0.0172271728515625, -0.0157623291015625, 0.00682830810546875, 0.033721923828125, 0.0014896392822265625, 0.08831787109375, -0.052154541015625, 0.005939483642578125, 0.0038909912109375, 0.00794219970703125, -0.0208282470703125, -0.002666473388671875, -0.029052734375, -0.01018524169921875, -0.0009140968322753906 ]
b9af1838b0cd27617e8a8c9eb558ef1a09504755
Wordpress Stackexchange Q: Create and edit posts from front end I've created a very nice custom post type using the fantastic ACF plugin, but now I need a way for users to submit posts from the front end. Plugins like Gravity forms and Front-end Editor are nice, but don't work very well for this. Is there a way that I can make the same Back-end edit form show up on a front end page? or alternatively Disguise part of the back-end site to look like the front-end? Any help would be much apreciated A: Not sure if it would work but have you checked out Scribu's front-end editor? http://scribu.net/wordpress/front-end-editor or check this thread http://wordpress.org/support/topic/front-end-custom-form-to-post?replies=5#post-1584286
Q: Create and edit posts from front end I've created a very nice custom post type using the fantastic ACF plugin, but now I need a way for users to submit posts from the front end. Plugins like Gravity forms and Front-end Editor are nice, but don't work very well for this. Is there a way that I can make the same Back-end edit form show up on a front end page? or alternatively Disguise part of the back-end site to look like the front-end? Any help would be much apreciated A: Not sure if it would work but have you checked out Scribu's front-end editor? http://scribu.net/wordpress/front-end-editor or check this thread http://wordpress.org/support/topic/front-end-custom-form-to-post?replies=5#post-1584286 A: What you're asking for is not possible because of the security checks for user capabilities and admin referrer checks. It would be best for you to create a form on the front-end and use the wp_insert_post() if(isset($_POST['foo_bar'])): //Verify nonce and referrer //Validate data $args = array( 'post_status' => 'draft', 'post_content' => esc_html($content), 'post_title' => esc_attr($title) ); $foo = wp_insert_post($args); //If the post was inserted, wp_insert_post() will return the post ID of the new post if($foo) echo "bar"; endif; //Create your form with a hidden nonce field here. * *You absolutely need to use nonces anytime you accept input.\ *Use the built in Wordpress escaping functions to secure input data after you validate it. http://markjaquith.wordpress.com/2009/06/12/escaping-api-updates-for-wordpress-2-8/ I've built several forms like this using a static template as well as an AJAX version. It isn't that hard to do. Just make sure you take every precaution to verify the integrity of the data and hide the input form from evil doers. A: This is now possible with ACF. Just take a look at the documentation to see how to create a front-end form for both creating a new post and editing an existing one. http://www.advancedcustomfields.com/resources/tutorials/creating-a-front-end-form/
wordpress
{ "language": "en", "length": 305, "provenance": "stackexchange_00019.jsonl.gz:412906", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28026" }
[ 0.032196044921875, 0.00333404541015625, -0.0069580078125, 0.003002166748046875, 0.0095062255859375, -0.03265380859375, 0.034454345703125, -0.034271240234375, -0.005077362060546875, 0.01052093505859375, 0.0111083984375, -0.0287628173828125, 0.00033855438232421875, -0.0467529296875, -0.019195556640625, -0.040313720703125, 0.0200958251953125, 0.00141143798828125, 0.031890869140625, -0.0268402099609375, 0.03240966796875, -0.02191162109375, 0.0310516357421875, 0.048583984375, 0.006511688232421875, 0.033355712890625, 0.044525146484375, 0.0038127899169921875, 0.01543426513671875, 0.0081329345703125, 0.019805908203125, -0.048919677734375, 0.0263519287109375, -0.004428863525390625, 0.00970458984375, 0.026458740234375, 0.0506591796875, -0.0276336669921875, 0.005893707275390625, 0.0217437744140625, 0.04803466796875, -0.01995849609375, -0.003559112548828125, 0.06878662109375, -0.0079498291015625, -0.0772705078125, 0.0802001953125, -0.0384521484375, 0.040252685546875, 0.0005960464477539062, -0.024383544921875, 0.0249176025390625, -0.0037822723388671875, -0.0278167724609375, -0.009063720703125, -0.0183563232421875, -0.0230560302734375, 0.04522705078125, 0.05560302734375, -0.0038280487060546875, -0.044830322265625, -0.031280517578125, 0.025970458984375, -0.0164337158203125, 0.0133209228515625, 0.007717132568359375, -0.0147552490234375, 0.0096893310546875, -0.017608642578125, 0.005626678466796875, 0.01172637939453125, -0.045013427734375, 0.0203704833984375, -0.019439697265625, -0.0024318695068359375, -0.01702880859375, 0.01155853271484375, 0.0183563232421875, 0.0117034912109375, -0.00115203857421875, -0.05670166015625, 0.0144805908203125, -0.07427978515625, -0.042388916015625, -0.035888671875, -0.037506103515625, -0.036590576171875, 0.0199432373046875, -0.034698486328125, -0.0318603515625, -0.007213592529296875, -0.0821533203125, -0.08251953125, 0.07470703125, 0.02392578125, -0.00943756103515625, 0.0199737548828125, -0.0199737548828125, 0.0306549072265625, 0.013885498046875, 0.0557861328125, -0.08355712890625, 0.09747314453125, -0.0401611328125, 0.00591278076171875, 0.0261993408203125, -0.0030117034912109375, -0.005191802978515625, 0.03070068359375, 0.01084136962890625, -0.00821685791015625, 0.0362548828125, -0.005519866943359375, -0.0188751220703125, 0.0192718505859375, 0.02386474609375, -0.012786865234375, 0.028900146484375, 0.00337982177734375, 0.0278778076171875, -0.026641845703125, 0.0094757080078125, 0.025482177734375, -0.04766845703125, 0.01081085205078125, -0.00876617431640625, -0.0219879150390625, -0.0201568603515625, 0.04107666015625, 0.00991058349609375, -0.06494140625, 0.0245361328125, 0.10736083984375, 0.0166473388671875, 0.0177154541015625, -0.0262298583984375, -0.036712646484375, -0.0313720703125, -0.0183258056640625, 0.0064239501953125, 0.0141143798828125, -0.0305023193359375, 0.0084075927734375, 0.004974365234375, -0.01483154296875, 0.03631591796875, 0.01076507568359375, -0.0023975372314453125, -0.0184326171875, -0.07635498046875, -0.003223419189453125, -0.0296630859375, 0.0197601318359375, 0.0048828125, 0.034454345703125, -0.0321044921875, 0.05084228515625, -0.022674560546875, 0.009490966796875, -0.0211334228515625, 0.004604339599609375, 0.0175018310546875, 0.046051025390625, -0.0401611328125, -0.0330810546875, -0.02203369140625, -0.062469482421875, -0.01441192626953125, 0.0203857421875, -0.02947998046875, -0.001201629638671875, -0.002086639404296875, 0.0298614501953125, 0.0187530517578125, 0.0087127685546875, 0.036041259765625, -0.0198822021484375, 0.01776123046875, 0.0196685791015625, 0.0440673828125, 0.0286712646484375, -0.0215301513671875, 0.053466796875, 0.0188751220703125, -0.0238189697265625, -0.0239715576171875, 0.03558349609375, 0.0207061767578125, -0.01197052001953125, 0.022308349609375, 0.044586181640625, 0.029754638671875, 0.0006771087646484375, 0.0186614990234375, -0.0241241455078125, -0.03985595703125, -0.0164337158203125, 0.004390716552734375, -0.036651611328125, 0.020233154296875, -0.023956298828125, 0.0015020370483398438, 0.003292083740234375, 0.01035308837890625, -0.0222320556640625, -0.0193939208984375, -0.01605224609375, 0.0267791748046875, 0.00780487060546875, 0.0042724609375, 0.010406494140625, 0.006023406982421875, -0.0169219970703125, -0.035186767578125, -0.0418701171875, 0.0231781005859375, -0.007747650146484375, 0.0231781005859375, 0.0047149658203125, 0.0251617431640625, 0.0006465911865234375, -0.0208740234375, -0.01198577880859375, 0.00501251220703125, 0.0249786376953125, -0.00945281982421875, -0.0009360313415527344, -0.0091552734375, 0.004669189453125, 0.0221099853515625, -0.031768798828125, 0.004627227783203125, 0.023040771484375, 0.0216522216796875, -0.029632568359375, -0.01097869873046875, -0.043609619140625, -0.051025390625, -0.00725555419921875, 0.064697265625, 0.01413726806640625, -0.0157623291015625, 0.00122833251953125, 0.04669189453125, 0.0191192626953125, 0.01355743408203125, 0.0233306884765625, 0.006496429443359375, 0.03411865234375, 0.029296875, -0.0638427734375, -0.0267791748046875, 0.04644775390625, -0.0733642578125, 0.024017333984375, 0.041961669921875, 0.0029296875, 0.00518798828125, 0.022247314453125, -0.033294677734375, 0.002857208251953125, -0.053192138671875, -0.043487548828125, -0.0172119140625, 0.06475830078125, -0.01123809814453125, 0.05364990234375, 0.033203125, -0.03607177734375, 0.00823974609375, 0.01202392578125, 0.0233306884765625, 0.01232147216796875, 0.016876220703125, 0.0306549072265625, 0.01641845703125, -0.041015625, -0.01120758056640625, 0.044921875, 0.00518798828125, -0.024322509765625, -0.003475189208984375, 0.0031299591064453125, -0.005611419677734375, 0.0111236572265625, -0.08154296875, 0.0241851806640625, -0.005405426025390625, 0.031036376953125, 0.001712799072265625, 0.021392822265625, -0.02490234375, -0.049530029296875, 0.04791259765625, 0.0166473388671875, -0.046234130859375, -0.006771087646484375, -0.03985595703125, 0.035614013671875, -0.01117706298828125, 0.03753662109375, 0.07977294921875, 0.0148162841796875, 0.01285552978515625, 0.0028476715087890625, -0.0002803802490234375, -0.0226898193359375, 0.058349609375, 0.020965576171875, -0.03857421875, -0.0311737060546875, -0.0231475830078125, 0.0191650390625, 0.054290771484375, -0.00881195068359375, -0.04833984375, -0.0037517547607421875, 0.036712646484375, -0.03375244140625, 0.00653839111328125, -0.01459503173828125, -0.06182861328125, 0.006397247314453125, -0.0272064208984375, -0.020599365234375, 0.0083770751953125, -0.003040313720703125, 0.01114654541015625, -0.00304412841796875, -0.002353668212890625, -0.01003265380859375, -0.01904296875, -0.057464599609375, -0.0848388671875, 0.0009059906005859375, -0.0002944469451904297, -0.01045989990234375, 0.042999267578125, -0.00672149658203125, -0.04754638671875, -0.00371551513671875, -0.00946807861328125, 0.0074310302734375, -0.0025310516357421875, 0.0274810791015625, -0.040191650390625, 0.00577545166015625, 0.01493072509765625, -0.0038661956787109375, 0.020538330078125, -0.0167083740234375, -0.0235595703125, -0.038421630859375, -0.05279541015625, -0.0545654296875, 0.0249786376953125, 0.055206298828125, -0.0178070068359375, 0.0016965866088867188, -0.046539306640625, 0.01348876953125, 0.0193328857421875, -0.002567291259765625, -0.033599853515625, -0.037109375, -0.016082763671875, 0.000965118408203125, 0.0181121826171875, 0.033111572265625, 0.01323699951171875, 0.0294036865234375, 0.01617431640625, -0.04864501953125, -0.011627197265625, 0.0014619827270507812, -0.017333984375, -0.0175018310546875, -0.0272216796875, 0.06646728515625, 0.0020847320556640625, 0.0122222900390625, 0.004032135009765625, 0.03778076171875, -0.00827789306640625, -0.08282470703125, 0.039031982421875, -0.07940673828125, -0.021484375, -0.052490234375, -0.0004544258117675781, 0.012420654296875, 0.10284423828125, -0.019256591796875, -0.000621795654296875, 0.00888824462890625, -0.0010328292846679688, -0.02490234375, -0.003444671630859375, -0.055511474609375, 0.0003337860107421875, -0.0750732421875, -0.0055084228515625, 0.005344390869140625, -0.041412353515625, -0.0013227462768554688, 0.0166473388671875, -0.05059814453125, -0.0233154296875, 0.035308837890625, -0.06805419921875, 0.0479736328125, 0.01000213623046875, 0.007724761962890625, -0.027374267578125, -0.0123443603515625, -0.045562744140625, -0.052642822265625, -0.01178741455078125, 0.00518798828125, 0.03167724609375, 0.0023174285888671875, -0.0121612548828125, 0.01047515869140625, 0.048675537109375, 0.0258331298828125, 0.01641845703125, -0.00923919677734375, -0.0010843276977539062, -0.0205078125, -0.07159423828125, -0.01222991943359375, -0.05963134765625, -0.0157470703125, -0.0281219482421875, -0.0170745849609375, 0.00959014892578125, -0.03302001953125, -0.0181121826171875, -0.0172882080078125, -0.0085906982421875, -0.024810791015625, -0.049468994140625, -0.07562255859375, -0.007526397705078125, -0.0297698974609375, -0.033355712890625, -0.035919189453125, -0.057952880859375, 0.00859832763671875, -0.0305633544921875, -0.017486572265625, 0.034210205078125, 0.060760498046875, 0.0182647705078125, 0.015411376953125, -0.0787353515625, -0.0195770263671875, 0.05584716796875, 0.0167694091796875, 0.00742340087890625, 0.02593994140625, -0.03955078125, 0.049224853515625, 0.03326416015625, 0.0164947509765625, -0.059600830078125, 0.0155029296875, 0.00798797607421875, -0.005962371826171875, 0.006072998046875, 0.0193939208984375, 0.05255126953125, -0.0330810546875, -0.056365966796875, 0.057220458984375, -0.0066986083984375, -0.0041351318359375, -0.0286102294921875, 0.031646728515625, -0.00091552734375, -0.01043701171875, 0.0115814208984375, -0.019073486328125, 0.024261474609375, 0.023895263671875, 0.00420379638671875, 0.0025310516357421875, -0.0015592575073242188, -0.00531768798828125, -0.00754547119140625, -0.027587890625, -0.0158538818359375, 0.019805908203125, -0.0179595947265625, -0.0040283203125, 0.00946044921875, -0.010345458984375, 0.09844970703125, -0.00382232666015625, -0.047515869140625, -0.0284271240234375, -0.0291290283203125, -0.018310546875, 0.008880615234375, 0.00917816162109375, 0.00601959228515625, 0.006847381591796875, 0.01360321044921875, 0.004024505615234375, 0.036529541015625, -0.01528167724609375, -0.01580810546875, -0.0128631591796875, 0.0216827392578125, -0.0274810791015625, 0.007022857666015625, 0.03350830078125, 0.0127716064453125, 0.001983642578125, -0.024505615234375, 0.043487548828125, 0.00641632080078125, 0.0016422271728515625, 0.0016164779663085938, 0.050628662109375, 0.0168304443359375, -0.0390625, -0.01023101806640625, -0.016815185546875, -0.03472900390625, -0.0008702278137207031, 0.0108642578125, 0.0175323486328125, 0.0248565673828125, 0.0242156982421875, 0.0149688720703125, -0.0257568359375, 0.003650665283203125, 0.00493621826171875, -0.031951904296875, 0.008026123046875, 0.04290771484375, -0.0058135986328125, 0.00455474853515625, -0.00836944580078125, 0.00537109375, -0.007686614990234375, 0.020843505859375, 0.0029621124267578125, -0.018463134765625, 0.0224609375, 0.0159454345703125, -0.00954437255859375, -0.006465911865234375, 0.0120849609375, -0.0416259765625, -0.0136260986328125, -0.023406982421875, -0.01062774658203125, 0.03314208984375, -0.00274658203125, -0.0269927978515625, -0.0176849365234375, 0.03106689453125, -0.0273284912109375, -0.00792694091796875, 0.05413818359375, 0.01047515869140625, -0.005092620849609375, -0.0139617919921875, -0.061126708984375, -0.03436279296875, -0.0238189697265625, -0.019500732421875, -0.02825927734375, -0.007495880126953125, 0.0003757476806640625, 0.03472900390625, -0.034088134765625, -0.052276611328125, 0.01340484619140625, 0.0023956298828125, -0.0007839202880859375, 0.0440673828125, 0.01078033447265625, 0.0465087890625, -0.0180816650390625, 0.046875, 0.00018537044525146484, -0.01910400390625, -0.040557861328125, -0.009429931640625, -0.009857177734375, -0.04522705078125, -0.00665283203125, 0.01314544677734375, 0.0012836456298828125, 0.052215576171875, 0.037109375, 0.0175628662109375, 0.0015239715576171875, -0.0153961181640625, 0.011962890625, -0.0270538330078125, 0.040496826171875, -0.0237579345703125, -0.0145721435546875, -0.00433349609375, -0.0143280029296875, -0.0007748603820800781, 0.0018749237060546875, -0.026641845703125, 0.014251708984375, 0.00775146484375, 0.007732391357421875, -0.0289459228515625, -0.011566162109375, 0.03814697265625, 0.07891845703125, 0.0061798095703125, 0.02783203125, 0.03204345703125, 0.00804901123046875, 0.0034465789794921875, 0.002471923828125, -0.0679931640625, 0.0034275054931640625, 0.0146484375, -0.0026721954345703125, -0.02081298828125, 0.006137847900390625, -0.0029659271240234375, 0.0258941650390625, 0.062042236328125, 0.0582275390625, -0.09832763671875, 0.028106689453125, 0.0144805908203125, -0.01117706298828125, 0.021453857421875, -0.01210784912109375, 0.0088653564453125, -0.016143798828125, 0.018585205078125, 0.0006604194641113281, -0.00894927978515625, 0.0112457275390625, -0.01232147216796875, 0.00946807861328125, -0.022369384765625, 0.09234619140625, 0.0042877197265625, -0.016876220703125, -0.015533447265625, -0.0031528472900390625, -0.0093536376953125, -0.0296630859375, 0.004062652587890625, -0.00592803955078125, -0.0305633544921875, -0.057647705078125, 0.0073699951171875, -0.0007700920104980469, 0.00731658935546875, 0.051422119140625, 0.007770538330078125, 0.05450439453125, 0.0418701171875, -0.003368377685546875, 0.01129913330078125, 0.0029201507568359375, 0.07012939453125, -0.00504302978515625, -0.0189666748046875, 0.005222320556640625, 0.01332855224609375, -0.0684814453125, 0.0216217041015625, -0.0275421142578125, -0.006641387939453125, -0.02508544921875, 0.005687713623046875, 0.11859130859375, 0.03277587890625, -0.06402587890625, 0.0274658203125, -0.0181732177734375, -0.028900146484375, -0.038604736328125, -0.04296875, -0.0711669921875, -0.00392913818359375, -0.0399169921875, -0.024078369140625, 0.041015625, -0.019134521484375, -0.07452392578125, 0.08111572265625, 0.01168060302734375, 0.0307769775390625, -0.0029144287109375, 0.021209716796875, -0.035430908203125, -0.0192718505859375, -0.040924072265625, 0.0196685791015625, -0.005970001220703125, 0.036468505859375, -0.050384521484375, -0.004604339599609375, -0.00527191162109375, 0.0240478515625, 0.049072265625, 0.0172882080078125, -0.025726318359375, 0.00568389892578125, 0.056427001953125, 0.042938232421875, 0.0033206939697265625, 0.04180908203125, 0.0288238525390625, 0.0111236572265625, 0.03656005859375, 0.000732421875, 0.039031982421875, -0.006763458251953125, 0.01953125, 0.053619384765625, 0.0006632804870605469, -0.0050048828125, 0.01983642578125, 0.006805419921875, -0.007350921630859375, 0.0005145072937011719, 0.0027980804443359375, -0.00823211669921875, -0.047454833984375, 0.0333251953125, 0.0303802490234375, -0.0699462890625, -0.00989532470703125, -0.04931640625, 0.04388427734375, 0.034942626953125, 0.0104827880859375, 0.0253143310546875, 0.03289794921875, -0.0107269287109375, -0.0168914794921875, 0.0194244384765625, 0.0203094482421875, -0.034271240234375, 0.03765869140625, -0.00611114501953125, 0.0184326171875, -0.071533203125, -0.043121337890625, 0.06201171875, 0.068603515625, -0.0282135009765625, -0.014556884765625, -0.0009541511535644531, 0.013671875, 0.032440185546875, -0.005329132080078125, 0.05096435546875, -0.0291748046875, -0.0051116943359375, -0.037567138671875, 0.00021219253540039062, -0.005306243896484375, 0.01544952392578125, -0.0238800048828125, -0.02862548828125, 0.00937652587890625, -0.005901336669921875, -0.0308380126953125, -0.018646240234375, 0.0024261474609375, 0.038116455078125, 0.04315185546875, 0.03350830078125, -0.0035991668701171875, -0.014129638671875, -0.025787353515625, 0.02130126953125, 0.027130126953125, 0.01418304443359375, 0.0016736984252929688, 0.027130126953125, -0.00780487060546875, -0.0035266876220703125, 0.00911712646484375, 0.08782958984375, 0.06390380859375, 0.01303863525390625, 0.0112762451171875, -0.0014247894287109375, -0.00882720947265625, -0.03338623046875, -0.051727294921875, -0.0228118896484375, -0.0235137939453125, 0.00373077392578125, 0.00971221923828125, -0.00209808349609375, 0.040557861328125, -0.01546478271484375, -0.021331787109375, 0.031951904296875, 0.0096588134765625, -0.03814697265625, 0.034210205078125, -0.0014486312866210938, 0.050323486328125, 0.006595611572265625, -0.06561279296875, -0.004840850830078125, -0.01410675048828125, -0.04315185546875, -0.004016876220703125, 0.0262603759765625, -0.045654296875, 0.049530029296875, 0.025146484375, -0.035980224609375, 0.03497314453125, 0.0011644363403320312, 0.0259246826171875, 0.0053253173828125, -0.003353118896484375, -0.01678466796875, -0.0750732421875, -0.03704833984375, -0.032623291015625, 0.0467529296875, 0.0006971359252929688, 0.061004638671875, -0.00640106201171875, 0.012115478515625, -0.00714111328125, 0.038238525390625, -0.040557861328125, -0.0117950439453125, 0.01334381103515625, 0.00386810302734375, 0.01751708984375, 0.00231170654296875, -0.006603240966796875, 0.0258026123046875, 0.03753662109375, -0.0478515625, -0.01332855224609375, 0.028594970703125, 0.0054473876953125, -0.018310546875, -0.00928497314453125, -0.01404571533203125, -0.00240325927734375, 0.0025424957275390625, -0.0139617919921875, 0.0186920166015625, 0.01959228515625, 0.01201629638671875, 0.045562744140625, -0.030853271484375, -0.0304412841796875, 0.0120849609375, -0.0748291015625, 0.0297698974609375, 0.0307159423828125, -0.02471923828125, 0.0155181884765625, 0.006473541259765625, -0.0017614364624023438, 0.0289306640625, 0.0177154541015625, -0.00815582275390625, 0.04473876953125, 0.0004949569702148438, 0.0190582275390625, 0.006866455078125, 0.046966552734375, -0.0157012939453125, 0.0184478759765625, -0.003353118896484375, 0.00789642333984375, 0.0161895751953125, -0.0235748291015625, -0.01038360595703125, -0.0309906005859375, -0.01117706298828125, 0.0261383056640625, -0.0034465789794921875, -0.0295867919921875, -0.041900634765625, 0.00527191162109375, 0.021148681640625, -0.025634765625, -0.0230712890625, -0.0037841796875, -0.03887939453125, 0.0552978515625, -0.023468017578125, 0.0028896331787109375, 0.007572174072265625, 0.0163116455078125, -0.01001739501953125, 0.0259857177734375, 0.006305694580078125, -0.0009326934814453125, 0.0257568359375, 0.0244140625, 0.061981201171875, -0.0232086181640625, -0.0364990234375, -0.008209228515625, 0.006900787353515625, 0.041717529296875, -0.0009908676147460938, -0.01126861572265625, -0.02215576171875, 0.0131988525390625, 0.02117919921875, -0.0215606689453125, -0.00812530517578125, -0.0015764236450195312, -0.0201416015625, -0.047210693359375, 0.0175628662109375, 0.0187530517578125, -0.04693603515625, -0.10040283203125, -0.00940704345703125, -0.0215301513671875, -0.044342041015625, -0.0014667510986328125, -0.015838623046875, -0.0116119384765625, 0.030975341796875, 0.0015716552734375, -0.0144805908203125, -0.028839111328125, 0.00716400146484375, -0.0021076202392578125, 0.054534912109375, 0.0033588409423828125, -0.0180816650390625, -0.046966552734375, -0.01044464111328125, -0.01678466796875, 0.024383544921875, 0.0240936279296875, 0.0020465850830078125, -0.00582122802734375, 0.036651611328125, -0.047454833984375, -0.0264434814453125, -0.03515625, -0.031585693359375, -0.002384185791015625, -0.0003991127014160156, -0.03070068359375, -0.0221099853515625, 0.06671142578125, 0.0341796875, 0.0219268798828125, -0.00446319580078125, -0.004482269287109375, -0.0138397216796875, -0.0635986328125, 0.018951416015625, 0.02593994140625, -0.040252685546875, 0.038421630859375, 0.0023479461669921875, -0.0184326171875, -0.0236968994140625, 0.03326416015625, -0.04150390625, -0.005046844482421875, 0.0214691162109375, -0.02880859375, -0.032470703125, -0.03912353515625, 0.08880615234375, -0.055450439453125, -0.0166015625, 0.01084136962890625, 0.022064208984375, 0.0374755859375, 0.00817108154296875, 0.01233673095703125, -0.0018901824951171875, -0.036865234375, 0.0237884521484375, -0.0045623779296875, 0.035614013671875, -0.038330078125, -0.0254974365234375, -0.00984954833984375, 0.0233154296875, -0.0228424072265625, 0.0097808837890625, 0.01285552978515625, 0.05828857421875, -0.004924774169921875, 0.1226806640625, -0.0160675048828125, -0.0631103515625, -0.038665771484375, 0.022552490234375, -0.0124053955078125, 0.01148223876953125, 0.0140228271484375, -0.0208282470703125, 0.01177978515625, 0.003932952880859375, -0.028289794921875, 0.0203399658203125, -0.048187255859375, 0.00757598876953125, -0.021820068359375, -0.01236724853515625 ]
bab83b1b2086ea88f18c69400f27713986fc5a0b
Wordpress Stackexchange Q: Stop Wordpress from "guessing" redirects for nonexistent URLs Wordpress sometimes "guesses" a redirection for a nonexistent page slug if the slug is at the beginning of another URL. After some searching, my hypothesis is that this part of the canonical redirection functionality, which can be disabled using this code: remove_filter('template_redirect', 'redirect_canonical'); However, I like the idea of canonical redirection, and would prefer not to turn it off entirely. Is there a way to only disable the slug "guessing"? I would prefer a 404 over an incorrect 301. A: It's a bit hacky, but this should work: function no_redirect_guess_404_permalink( $header ){ global $wp_query; if( is_404() ) unset( $wp_query->query_vars['name'] ); return $header; } add_filter( 'status_header', 'no_redirect_guess_404_permalink' );
Q: Stop Wordpress from "guessing" redirects for nonexistent URLs Wordpress sometimes "guesses" a redirection for a nonexistent page slug if the slug is at the beginning of another URL. After some searching, my hypothesis is that this part of the canonical redirection functionality, which can be disabled using this code: remove_filter('template_redirect', 'redirect_canonical'); However, I like the idea of canonical redirection, and would prefer not to turn it off entirely. Is there a way to only disable the slug "guessing"? I would prefer a 404 over an incorrect 301. A: It's a bit hacky, but this should work: function no_redirect_guess_404_permalink( $header ){ global $wp_query; if( is_404() ) unset( $wp_query->query_vars['name'] ); return $header; } add_filter( 'status_header', 'no_redirect_guess_404_permalink' );
wordpress
{ "language": "en", "length": 116, "provenance": "stackexchange_00019.jsonl.gz:412912", "question_score": "6", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28045" }
[ 0.059539794921875, 0.01629638671875, 0.0215911865234375, 0.002475738525390625, 0.007686614990234375, -0.0216064453125, 0.0419921875, -0.068115234375, 0.004772186279296875, -0.0027675628662109375, 0.010467529296875, -0.01568603515625, -0.00591278076171875, -0.05462646484375, 0.0267333984375, -0.016357421875, 0.035430908203125, -0.038726806640625, 0.005352020263671875, -0.002437591552734375, -0.01313018798828125, 0.030792236328125, 0.00707244873046875, 0.0259552001953125, 0.0219573974609375, -0.047698974609375, 0.08209228515625, -0.011688232421875, 0.01222991943359375, -0.031768798828125, 0.019378662109375, 0.01197052001953125, -0.000087738037109375, 0.040618896484375, -0.028594970703125, -0.0138092041015625, 0.020263671875, 0.0164031982421875, 0.018463134765625, 0.0006861686706542969, -0.01157379150390625, 0.004299163818359375, -0.000583648681640625, -0.00667572021484375, -0.0233154296875, -0.025054931640625, -0.020904541015625, -0.03961181640625, 0.037261962890625, 0.0433349609375, -0.01123046875, 0.001735687255859375, -0.0170440673828125, 0.007904052734375, -0.0238494873046875, -0.0277099609375, 0.0032558441162109375, 0.02008056640625, 0.01427459716796875, -0.00580596923828125, -0.01493072509765625, 0.0228271484375, 0.0016984939575195312, -0.01499176025390625, -0.00406646728515625, -0.0274810791015625, -0.05218505859375, 0.03375244140625, -0.0309600830078125, -0.0023345947265625, 0.0281982421875, -0.025177001953125, 0.005802154541015625, -0.033843994140625, -0.03155517578125, -0.0139617919921875, 0.0312042236328125, -0.027618408203125, -0.003803253173828125, 0.002864837646484375, 0.037109375, -0.05859375, -0.005039215087890625, 0.004886627197265625, 0.0265350341796875, 0.034912109375, 0.007061004638671875, -0.022369384765625, -0.03448486328125, -0.00988006591796875, -0.0263214111328125, -0.01129150390625, -0.03692626953125, 0.0156097412109375, -0.00206756591796875, -0.01265716552734375, 0.0655517578125, 0.06103515625, -0.00527191162109375, -0.037445068359375, 0.021148681640625, -0.0411376953125, -0.03411865234375, -0.0204315185546875, 0.0157623291015625, 0.06683349609375, 0.02569580078125, 0.0075836181640625, 0.02862548828125, -0.007480621337890625, 0.0251312255859375, 0.0269927978515625, -0.040374755859375, -0.049530029296875, -0.0246429443359375, 0.05859375, -0.0287322998046875, -0.00717926025390625, 0.002292633056640625, 0.0175018310546875, -0.005825042724609375, -0.0041046142578125, 0.042572021484375, -0.017242431640625, 0.01183319091796875, -0.007167816162109375, -0.031646728515625, -0.0204620361328125, 0.027099609375, 0.036956787109375, -0.05224609375, 0.006336212158203125, 0.054931640625, -0.00124359130859375, -0.010650634765625, -0.0263214111328125, 0.05181884765625, 0.018768310546875, -0.0191497802734375, 0.002330780029296875, 0.0175628662109375, -0.0090789794921875, -0.0226898193359375, -0.0157623291015625, 0.049224853515625, 0.04217529296875, 0.017181396484375, 0.00872802734375, 0.01241302490234375, -0.0294036865234375, 0.0006937980651855469, -0.0062255859375, 0.0484619140625, -0.0164947509765625, -0.018890380859375, -0.052825927734375, -0.0245361328125, -0.00887298583984375, -0.008544921875, -0.013702392578125, -0.0111083984375, -0.032501220703125, -0.01258087158203125, -0.0374755859375, -0.09942626953125, 0.053253173828125, -0.007175445556640625, -0.0235748291015625, 0.0168609619140625, 0.036468505859375, -0.01242828369140625, 0.007457733154296875, -0.017242431640625, -0.007114410400390625, -0.004222869873046875, -0.0119171142578125, 0.0406494140625, 0.040557861328125, -0.0221710205078125, 0.07806396484375, 0.0240020751953125, -0.05535888671875, 0.04083251953125, -0.0350341796875, -0.0809326171875, 0.0994873046875, 0.0099639892578125, 0.07098388671875, -0.0210418701171875, -0.02703857421875, 0.0845947265625, 0.055511474609375, -0.06719970703125, 0.05010986328125, 0.004734039306640625, -0.03509521484375, 0.01503753662109375, -0.0016565322875976562, 0.00872039794921875, -0.019683837890625, 0.0034008026123046875, 0.048065185546875, -0.055694580078125, 0.008941650390625, -0.0787353515625, 0.019317626953125, -0.0250701904296875, 0.03680419921875, -0.00226593017578125, 0.0428466796875, 0.0177154541015625, -0.007656097412109375, -0.04345703125, 0.05908203125, 0.007274627685546875, -0.004207611083984375, -0.011749267578125, 0.007114410400390625, -0.00815582275390625, 0.00470733642578125, -0.0222320556640625, -0.0203094482421875, -0.031585693359375, -0.020904541015625, 0.03955078125, -0.038909912109375, -0.0010957717895507812, -0.0203704833984375, 0.0140380859375, -0.00595855712890625, -0.03753662109375, 0.053375244140625, 0.012664794921875, 0.0257415771484375, -0.03094482421875, 0.00908660888671875, -0.011474609375, -0.00853729248046875, -0.0024662017822265625, 0.028076171875, 0.03759765625, -0.0126953125, -0.028350830078125, -0.045135498046875, -0.0007076263427734375, -0.0787353515625, -0.0031833648681640625, -0.014312744140625, 0.038604736328125, 0.04052734375, 0.039642333984375, -0.005733489990234375, 0.0120086669921875, 0.037017822265625, 0.01061248779296875, 0.01092529296875, -0.0259246826171875, -0.0216064453125, 0.034912109375, -0.01035308837890625, 0.01071929931640625, -0.002410888671875, -0.0138397216796875, 0.0009264945983886719, -0.00852203369140625, -0.031829833984375, 0.0023097991943359375, -0.0027408599853515625, 0.01280975341796875, -0.040771484375, 0.01436614990234375, -0.025604248046875, -0.0193328857421875, -0.01357269287109375, 0.08294677734375, -0.0482177734375, -0.051116943359375, 0.005901336669921875, 0.009735107421875, -0.014129638671875, -0.0298309326171875, 0.016357421875, -0.013031005859375, -0.0173797607421875, -0.016510009765625, -0.0511474609375, 0.013427734375, -0.02386474609375, 0.02313232421875, 0.01071929931640625, 0.03424072265625, 0.01129913330078125, -0.0193939208984375, 0.036651611328125, -0.00885772705078125, -0.038787841796875, -0.06707763671875, -0.0604248046875, 0.036529541015625, -0.04644775390625, 0.045166015625, 0.08404541015625, 0.0051116943359375, 0.0194549560546875, 0.01024627685546875, -0.0020847320556640625, -0.0045166015625, 0.00926971435546875, -0.00693511962890625, 0.0279083251953125, -0.08538818359375, -0.004512786865234375, 0.027374267578125, -0.0109100341796875, 0.052154541015625, -0.01041412353515625, 0.01517486572265625, 0.01409912109375, -0.0460205078125, -0.030029296875, 0.01062774658203125, 0.0013933181762695312, -0.00850677490234375, 0.0430908203125, 0.0126800537109375, -0.016937255859375, 0.045562744140625, 0.0006060600280761719, 0.001834869384765625, -0.0298919677734375, -0.07855224609375, -0.057098388671875, -0.06805419921875, -0.0168304443359375, -0.00017440319061279297, 0.00470733642578125, 0.0106048583984375, -0.0157012939453125, 0.0084686279296875, -0.0034008026123046875, 0.0455322265625, 0.0304412841796875, 0.0013256072998046875, -0.012420654296875, -0.025238037109375, -0.01226043701171875, 0.0178375244140625, 0.0006151199340820312, 0.0224761962890625, 0.011871337890625, 0.0143890380859375, -0.00826263427734375, -0.040252685546875, -0.0024662017822265625, -0.003391265869140625, 0.0242462158203125, 0.042633056640625, 0.017852783203125, 0.0270233154296875, -0.0014009475708007812, -0.022979736328125, -0.020721435546875, -0.04522705078125, 0.06671142578125, 0.0299224853515625, -0.007808685302734375, 0.0200653076171875, -0.00841522216796875, 0.036041259765625, 0.0029430389404296875, -0.022308349609375, -0.0073394775390625, 0.04913330078125, 0.01110076904296875, 0.05035400390625, -0.0240936279296875, 0.03631591796875, -0.01528167724609375, 0.0164947509765625, 0.01190948486328125, 0.022857666015625, 0.033233642578125, -0.023681640625, -0.0293731689453125, -0.00833892822265625, 0.02667236328125, -0.03179931640625, 0.0206756591796875, -0.0245361328125, -0.006900787353515625, -0.005275726318359375, 0.0594482421875, -0.0202789306640625, -0.0199127197265625, -0.0260772705078125, 0.006214141845703125, -0.003696441650390625, -0.04046630859375, 0.00521087646484375, -0.013916015625, -0.1104736328125, -0.00435638427734375, 0.004642486572265625, -0.053863525390625, -0.014190673828125, -0.00936126708984375, -0.057464599609375, -0.05145263671875, 0.01334381103515625, -0.0011968612670898438, 0.0034809112548828125, -0.0129241943359375, -0.00467681884765625, -0.045684814453125, 0.01287841796875, -0.03387451171875, -0.052276611328125, -0.024444580078125, 0.035369873046875, 0.0312042236328125, -0.01081085205078125, -0.028839111328125, 0.001251220703125, 0.049163818359375, 0.0080718994140625, 0.023712158203125, 0.005382537841796875, -0.011383056640625, 0.03216552734375, 0.032470703125, 0.0196533203125, -0.0020923614501953125, 0.00909423828125, 0.022857666015625, -0.023529052734375, 0.0183258056640625, -0.04022216796875, -0.036956787109375, 0.03265380859375, -0.055755615234375, -0.046478271484375, -0.039398193359375, -0.010894775390625, 0.046661376953125, -0.003948211669921875, 0.00804901123046875, -0.0582275390625, -0.06982421875, 0.034454345703125, -0.0210418701171875, -0.00909423828125, -0.0173492431640625, 0.0513916015625, 0.0213470458984375, -0.0115509033203125, 0.0797119140625, 0.01031494140625, 0.01352691650390625, 0.01099395751953125, 0.0165863037109375, -0.044097900390625, -0.006870269775390625, 0.045166015625, -0.036834716796875, -0.015350341796875, -0.00312042236328125, 0.019378662109375, -0.006488800048828125, -0.01538848876953125, -0.0024051666259765625, -0.04534912109375, 0.03900146484375, 0.06573486328125, 0.019134521484375, -0.007434844970703125, -0.02569580078125, 0.01248931884765625, 0.0312347412109375, -0.052978515625, -0.0338134765625, -0.03900146484375, 0.01934814453125, 0.0240020751953125, 0.04144287109375, 0.0190277099609375, -0.0041656494140625, 0.043426513671875, -0.006092071533203125, -0.006103515625, 0.0066986083984375, -0.002323150634765625, -0.048583984375, 0.0299072265625, -0.021026611328125, -0.0452880859375, 0.02313232421875, -0.0059967041015625, 0.05731201171875, -0.00786590576171875, -0.041900634765625, 0.007579803466796875, -0.0251312255859375, -0.0307464599609375, 0.0282135009765625, -0.0107269287109375, 0.0186614990234375, 0.008636474609375, -0.00672149658203125, 0.007350921630859375, -0.0323486328125, -0.0001239776611328125, -0.03741455078125, 0.0221405029296875, 0.01462554931640625, 0.0049896240234375, 0.011505126953125, 0.07177734375, 0.0386962890625, 0.0311431884765625, -0.030303955078125, -0.0271759033203125, -0.0155792236328125, 0.0276641845703125, 0.0154266357421875, 0.00701904296875, -0.00937652587890625, 0.01666259765625, 0.0556640625, -0.044464111328125, -0.0215911865234375, 0.029052734375, 0.03582763671875, -0.0312042236328125, -0.022125244140625, 0.0242919921875, -0.01551055908203125, -0.0191192626953125, 0.036529541015625, -0.007625579833984375, -0.01396942138671875, -0.043365478515625, -0.023162841796875, 0.032196044921875, 0.00962066650390625, -0.0294952392578125, 0.0207672119140625, -0.0277862548828125, -0.006931304931640625, 0.0498046875, -0.06915283203125, 0.017608642578125, 0.036346435546875, -0.0294647216796875, -0.044952392578125, -0.006458282470703125, 0.0162811279296875, 0.034637451171875, -0.0355224609375, -0.031494140625, 0.031982421875, -0.036376953125, 0.0084686279296875, -0.0086517333984375, 0.0165557861328125, 0.01081085205078125, 0.017364501953125, 0.050018310546875, 0.028533935546875, -0.06451416015625, -0.00984954833984375, -0.04705810546875, -0.00855255126953125, -0.00923919677734375, -0.00962066650390625, -0.017578125, 0.005218505859375, 0.0240020751953125, 0.0284271240234375, -0.0012483596801757812, -0.0325927734375, -0.01348114013671875, 0.00200653076171875, 0.0191802978515625, 0.042236328125, -0.02294921875, -0.019195556640625, 0.0195159912109375, -0.02105712890625, -0.011322021484375, 0.00873565673828125, 0.053436279296875, -0.03765869140625, 0.0168609619140625, -0.0223846435546875, -0.0240020751953125, -0.0128173828125, -0.0183563232421875, 0.0250244140625, 0.0638427734375, -0.006732940673828125, -0.0181884765625, 0.0194091796875, 0.032379150390625, -0.0318603515625, -0.0233154296875, -0.00942230224609375, -0.0377197265625, -0.005863189697265625, -0.0021610260009765625, 0.005023956298828125, -0.0099334716796875, -0.044769287109375, 0.025115966796875, 0.005405426025390625, 0.004322052001953125, -0.00012934207916259766, -0.07745361328125, 0.06915283203125, 0.07757568359375, 0.038360595703125, 0.07403564453125, 0.00991058349609375, 0.0361328125, 0.032989501953125, 0.0012025833129882812, -0.002628326416015625, -0.0136871337890625, 0.050933837890625, -0.0017185211181640625, 0.00099945068359375, 0.04168701171875, -0.015960693359375, -0.0083770751953125, 0.0723876953125, 0.047027587890625, -0.08001708984375, -0.0254058837890625, -0.0004000663757324219, -0.0117645263671875, 0.0013265609741210938, -0.0032138824462890625, 0.01045989990234375, 0.01258087158203125, -0.0116729736328125, -0.050384521484375, -0.053863525390625, -0.0194091796875, -0.0058135986328125, -0.030517578125, -0.005611419677734375, 0.019317626953125, 0.005367279052734375, -0.046417236328125, 0.00553131103515625, 0.007701873779296875, -0.0228424072265625, -0.02081298828125, -0.003925323486328125, 0.0142822265625, -0.0302276611328125, -0.03271484375, 0.034576416015625, -0.0188446044921875, 0.01824951171875, 0.08148193359375, 0.0044708251953125, -0.0014352798461914062, 0.04168701171875, -0.01468658447265625, 0.035064697265625, 0.01470184326171875, -0.08538818359375, 0.032257080078125, -0.0250396728515625, -0.018035888671875, -0.0244293212890625, -0.0034847259521484375, 0.01094818115234375, -0.00726318359375, -0.034210205078125, -0.003986358642578125, 0.036529541015625, 0.050018310546875, -0.031036376953125, -0.016845703125, 0.049224853515625, 0.024505615234375, -0.0240478515625, -0.001071929931640625, 0.0304107666015625, -0.024749755859375, 0.0065155029296875, 0.00853729248046875, -0.0090179443359375, -0.018218994140625, -0.009429931640625, -0.049072265625, 0.05712890625, 0.020599365234375, 0.01401519775390625, 0.0225677490234375, 0.016632080078125, -0.025665283203125, 0.00846099853515625, -0.044525146484375, 0.06903076171875, -0.008026123046875, 0.0755615234375, -0.0213623046875, 0.01067352294921875, 0.036346435546875, -0.0240020751953125, 0.05059814453125, 0.01259613037109375, -0.007701873779296875, 0.0406494140625, 0.061431884765625, 0.011749267578125, -0.03558349609375, 0.03485107421875, -0.00027370452880859375, -0.0024013519287109375, 0.026031494140625, -0.030731201171875, 0.024658203125, -0.043487548828125, 0.004535675048828125, -0.001461029052734375, 0.0300140380859375, 0.043212890625, -0.0007004737854003906, 0.00722503662109375, -0.08294677734375, 0.01107025146484375, 0.0728759765625, 0.00318145751953125, 0.023895263671875, 0.01506805419921875, 0.039154052734375, -0.1129150390625, 0.0241851806640625, -0.0577392578125, 0.070068359375, -0.005794525146484375, -0.01190185546875, 0.0308837890625, 0.01357269287109375, 0.051849365234375, -0.0307464599609375, -0.01044464111328125, 0.01503753662109375, -0.012725830078125, 0.060150146484375, 0.055450439453125, 0.0309600830078125, -0.003948211669921875, 0.01515960693359375, 0.034027099609375, 0.08013916015625, -0.048919677734375, 0.019378662109375, 0.00251007080078125, 0.007015228271484375, 0.0003998279571533203, -0.043487548828125, 0.0159149169921875, -0.0055999755859375, -0.0023784637451171875, 0.004154205322265625, -0.01290130615234375, 0.01727294921875, 0.0110931396484375, -0.0089569091796875, -0.008514404296875, 0.0027904510498046875, 0.0120849609375, -0.0234375, -0.01849365234375, 0.003978729248046875, 0.082763671875, 0.0271148681640625, 0.055450439453125, -0.0202789306640625, -0.0274505615234375, -0.0253143310546875, 0.017425537109375, -0.0297088623046875, 0.0338134765625, -0.06475830078125, -0.0256195068359375, 0.01537322998046875, 0.059356689453125, 0.0408935546875, 0.0008034706115722656, 0.00153350830078125, -0.006862640380859375, 0.01342010498046875, 0.02020263671875, 0.039306640625, -0.025726318359375, 0.0419921875, -0.0263824462890625, 0.01088714599609375, -0.007465362548828125, -0.0164642333984375, -0.03106689453125, 0.0013666152954101562, 0.029296875, 0.005207061767578125, 0.01513671875, 0.004253387451171875, -0.0247802734375, 0.03448486328125, 0.013336181640625, 0.040496826171875, 0.03765869140625, -0.037200927734375, -0.026702880859375, -0.0171661376953125, -0.0214385986328125, 0.044830322265625, 0.051361083984375, -0.003223419189453125, 0.006450653076171875, 0.004627227783203125, 0.0004456043243408203, 0.0026950836181640625, -0.01812744140625, 0.0012254714965820312, -0.0007429122924804688, 0.02294921875, 0.0023593902587890625, -0.00791168212890625, -0.003932952880859375, 0.0141143798828125, 0.024169921875, -0.0164031982421875, 0.0843505859375, -0.03582763671875, -0.007625579833984375, 0.00489044189453125, 0.0098419189453125, -0.0213775634765625, -0.01389312744140625, 0.02459716796875, -0.02398681640625, -0.01117706298828125, 0.00008362531661987305, -0.038330078125, 0.02978515625, 0.01436614990234375, -0.022491455078125, 0.057830810546875, -0.03912353515625, -0.012237548828125, -0.0292816162109375, 0.0286712646484375, -0.03570556640625, -0.0709228515625, -0.051910400390625, 0.005687713623046875, 0.01003265380859375, -0.011688232421875, -0.047698974609375, 0.055328369140625, -0.0484619140625, -0.042510986328125, 0.0290985107421875, -0.077392578125, 0.0193939208984375, 0.0305328369140625, 0.0031299591064453125, 0.0234375, 0.0124053955078125, -0.01038360595703125, -0.01479339599609375, 0.03704833984375, -0.0576171875, 0.00463104248046875, -0.0063018798828125, -0.045867919921875, -0.059783935546875, -0.0200958251953125, -0.026336669921875, -0.017486572265625, -0.04632568359375, -0.0012807846069335938, 0.0051422119140625, -0.02288818359375, -0.012298583984375, -0.0362548828125, -0.0203094482421875, 0.0011472702026367188, -0.0085601806640625, -0.027618408203125, 0.056121826171875, -0.00630950927734375, 0.0157012939453125, -0.0128021240234375, -0.025909423828125, 0.0091094970703125, -0.043975830078125, 0.045745849609375, -0.046783447265625, 0.022613525390625, -0.01103973388671875, -0.0248565673828125, -0.0633544921875, 0.01055908203125, -0.03692626953125, 0.0164794921875, -0.00933074951171875, -0.01073455810546875, 0.0443115234375, -0.006916046142578125, -0.01361846923828125, -0.041290283203125, -0.01447296142578125, 0.015289306640625, -0.06256103515625, -0.03851318359375, 0.01531219482421875, -0.01068878173828125, 0.014892578125, -0.00653839111328125, -0.0201873779296875, 0.0032939910888671875, 0.0031375885009765625, 0.01288604736328125, -0.0227813720703125, 0.00371551513671875, -0.04205322265625, -0.06640625, 0.05755615234375, 0.00020074844360351562, -0.024627685546875, 0.001708984375, 0.0037746429443359375, 0.000055849552154541016, 0.0023651123046875, 0.0196990966796875, -0.0162353515625, -0.0072174072265625, -0.0040740966796875, -0.0020046234130859375, 0.0139617919921875, 0.0174102783203125, -0.00402069091796875, 0.042510986328125, 0.04876708984375, 0.0616455078125, -0.0178070068359375, 0.0124664306640625, -0.011932373046875, 0.0185699462890625, 0.04119873046875, -0.033172607421875, -0.004390716552734375, -0.017120361328125, -0.01513671875, -0.01229095458984375, 0.0032634735107421875, -0.05218505859375, -0.037750244140625, 0.050537109375, 0.06744384765625, 0.0156402587890625, -0.0016632080078125, -0.049163818359375, -0.0184783935546875, -0.0118865966796875, -0.019317626953125, 0.0335693359375, -0.09442138671875, -0.0163726806640625, 0.0203704833984375, -0.00963592529296875, 0.0193023681640625, -0.0229644775390625, -0.02337646484375, 0.0143585205078125, 0.005527496337890625, -0.005260467529296875, -0.0294036865234375, 0.0146636962890625, 0.0211181640625, -0.0252227783203125, -0.002567291259765625, -0.042266845703125, 0.02947998046875, -0.006011962890625, -0.077392578125, 0.018096923828125, 0.0350341796875, -0.0256195068359375, -0.001556396484375, 0.0151519775390625, 0.006275177001953125, -0.0216522216796875, -0.01422119140625, -0.02728271484375, 0.0228729248046875, 0.014434814453125, 0.029144287109375, -0.006366729736328125, 0.01396942138671875, 0.023773193359375, -0.01479339599609375, -0.0168914794921875, 0.0086822509765625, -0.0023365020751953125, 0.0355224609375, -0.01447296142578125, 0.0093841552734375, 0.01445770263671875, 0.0014562606811523438, 0.012176513671875, 0.0138702392578125, 0.0513916015625, -0.01385498046875, 0.01203155517578125, -0.0286407470703125, 0.0233306884765625, 0.00800323486328125 ]
4ac20e1f1a11a4b4ca9f802a4ef6316b94db7fc0
Wordpress Stackexchange Q: How do I query all posts of one type across my multisite installation? I have a multisite wordpress installation with 5 sites, and within each site there are the same 4 custom post type, I want to query the latest 5 posts across all sites where the post_type is gallery is it possible to get wp_query() to pull across all blogs within the site instead of just the current blog? A: Yes but not in a single query, e.g.: if(is_multisite()){ global $wpdb; $blogs = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0' and public='1'")); if(!empty($blogs)){ ?><?php foreach($blogs as $blog){ switch_to_blog($blog->blog_id); $details = get_blog_details($blog->blog_id); $q = new WP_query(); if($q->have_posts()){ while($q->have_posts()){ $q->the_post(); // do things break; } } wp_reset_query(); restore_current_blog(); } } } If you want to show the latest post in each individual blog that should be easy. If you want to show the individual newest post across the entire network, you'll need to find the newest of each blog, you will need to store the newest post found, replacing ti when a newer post is found, then outputting after the loop.
Q: How do I query all posts of one type across my multisite installation? I have a multisite wordpress installation with 5 sites, and within each site there are the same 4 custom post type, I want to query the latest 5 posts across all sites where the post_type is gallery is it possible to get wp_query() to pull across all blogs within the site instead of just the current blog? A: Yes but not in a single query, e.g.: if(is_multisite()){ global $wpdb; $blogs = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0' and public='1'")); if(!empty($blogs)){ ?><?php foreach($blogs as $blog){ switch_to_blog($blog->blog_id); $details = get_blog_details($blog->blog_id); $q = new WP_query(); if($q->have_posts()){ while($q->have_posts()){ $q->the_post(); // do things break; } } wp_reset_query(); restore_current_blog(); } } } If you want to show the latest post in each individual blog that should be easy. If you want to show the individual newest post across the entire network, you'll need to find the newest of each blog, you will need to store the newest post found, replacing ti when a newer post is found, then outputting after the loop. A: switch_to_blog is VERY expensive... here is some code I use (I use my own pager and query vars) function recent_mu_posts($howmany, $paged, $when, $until, $search) { /* returns array of posts from all blogs in $blogs, newer than $when * older than $until, containing $search */ global $options; global $wp_query; global $blogs; global $wpdb; global $table_prefix; $blogPostTableNames = get_mu_tables(); if ( count( $blogPostTableNames ) > 0 ) : $query = ''; $i = 0; foreach ( $blogPostTableNames as $blogId => $tableName ) : if ( $i > 0 ) : $query.= ' UNION '; endif; $query.= " (SELECT ID, post_date, $blogId as `blog_id` FROM $tableName WHERE post_status = 'publish' AND post_type = 'post' AND post_date >= '$when' AND post_date <= '$until'"; if (isset($search)) $query.= " AND ( post_content COLLATE UTF8_GENERAL_CI LIKE '%{$search}%' OR post_title COLLATE UTF8_GENERAL_CI LIKE '%{$search}% ')"; $query.=")"; $i++; endforeach; $query.= " ORDER BY post_date DESC "; /* pagination */ $totalposts = $wpdb->get_results($query, OBJECT); $ppp = intval( get_query_var( 'posts_per_page' ) ); $on_page = $paged; #intval( get_query_var( 'paged' ) ); if( $on_page == 0 ) $on_page = 1; $offset = ( $on_page - 1 ) * $ppp; //set global $wp_query object for pagination $wp_query->found_posts = count($totalposts); $wp_query->max_num_pages = ceil($wp_query->found_posts / $ppp); $wp_query->request = $query . " LIMIT $ppp OFFSET $offset"; //= " LIMIT $ppp OFFSET $offset"; $rows = $wpdb->get_results( $wp_query->request, OBJECT); if ( $rows ) : $posts = array(); $i=0; global $post; foreach ( $rows as $post ) : $posts[$i] = get_blog_post( $post->blog_id, $post->ID ); $posts[$i]->blog_id = $post->blog_id; $i++; endforeach; $wp_query->posts = $posts; return $posts; endif; endif; }
wordpress
{ "language": "en", "length": 449, "provenance": "stackexchange_00019.jsonl.gz:412923", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28081" }
[ 0.056610107421875, -0.010009765625, 0.00244140625, -0.00991058349609375, 0.0173187255859375, -0.028839111328125, 0.03240966796875, -0.0305633544921875, 0.0252838134765625, 0.0194091796875, -0.036346435546875, -0.01044464111328125, -0.03289794921875, -0.017333984375, -0.01502227783203125, -0.035247802734375, 0.062225341796875, -0.042327880859375, 0.03533935546875, 0.01525115966796875, -0.0309600830078125, 0.0478515625, 0.052825927734375, 0.055633544921875, -0.0222320556640625, 0.00901031494140625, 0.08447265625, -0.012451171875, -0.0092620849609375, -0.0197906494140625, 0.00710296630859375, 0.01357269287109375, 0.0261993408203125, 0.00916290283203125, -0.0227508544921875, -0.050994873046875, 0.0154571533203125, -0.01287078857421875, -0.01145172119140625, 0.03143310546875, -0.01544952392578125, 0.0106048583984375, 0.0084228515625, -0.005046844482421875, -0.019287109375, -0.047760009765625, 0.006664276123046875, -0.020172119140625, 0.01509857177734375, -0.0259857177734375, 0.0205841064453125, -0.031494140625, 0.03582763671875, -0.0223236083984375, -0.04315185546875, -0.01531982421875, 0.03533935546875, -0.0247955322265625, 0.039947509765625, -0.05621337890625, -0.050384521484375, -0.0108184814453125, 0.043914794921875, -0.0015516281127929688, -0.0180816650390625, 0.01332855224609375, 0.09417724609375, 0.0205078125, -0.052947998046875, -0.055145263671875, 0.017578125, -0.006298065185546875, 0.00783538818359375, -0.0178680419921875, -0.01363372802734375, -0.027618408203125, -0.0208740234375, -0.05242919921875, 0.02886962890625, -0.007335662841796875, -0.02276611328125, -0.01241302490234375, -0.06146240234375, -0.028594970703125, -0.0016231536865234375, -0.0037136077880859375, -0.0039043426513671875, 0.01030731201171875, -0.04901123046875, -0.0269622802734375, -0.0261383056640625, -0.03167724609375, -0.0810546875, 0.0165252685546875, 0.01134490966796875, -0.0254058837890625, 0.0195465087890625, 0.054046630859375, -0.0250396728515625, -0.020721435546875, -0.0160980224609375, -0.0178985595703125, -0.049713134765625, -0.0160369873046875, 0.03289794921875, 0.01422119140625, -0.0146636962890625, -0.03912353515625, 0.06353759765625, 0.041473388671875, 0.01739501953125, 0.06866455078125, -0.022125244140625, -0.020599365234375, -0.04010009765625, 0.00792694091796875, -0.039886474609375, 0.010101318359375, -0.003490447998046875, -0.016571044921875, 0.00044274330139160156, 0.034881591796875, -0.047271728515625, -0.0112457275390625, -0.0165557861328125, -0.0228271484375, 0.006336212158203125, -0.006374359130859375, -0.011016845703125, 0.0300750732421875, -0.040374755859375, 0.0035266876220703125, 0.044342041015625, 0.00691986083984375, -0.0005326271057128906, -0.0269927978515625, 0.0208587646484375, 0.0182037353515625, 0.0019207000732421875, 0.008636474609375, 0.019866943359375, -0.0400390625, -0.02740478515625, 0.018402099609375, 0.040069580078125, 0.00018513202667236328, 0.0264892578125, 0.018768310546875, 0.0096588134765625, 0.0301513671875, -0.004062652587890625, 0.034210205078125, 0.052032470703125, -0.02459716796875, -0.0009226799011230469, -0.054901123046875, 0.0560302734375, -0.055084228515625, -0.015655517578125, -0.0655517578125, 0.061187744140625, 0.006771087646484375, 0.02801513671875, 0.00013458728790283203, -0.03106689453125, -0.0079498291015625, -0.08856201171875, -0.028656005859375, 0.032684326171875, 0.0090789794921875, -0.0218505859375, -0.050872802734375, 0.08575439453125, 0.0301361083984375, -0.028289794921875, 0.055389404296875, -0.00849151611328125, -0.0180206298828125, 0.033721923828125, -0.00928497314453125, -0.04071044921875, -0.031890869140625, 0.0159454345703125, -0.0037288665771484375, -0.054443359375, 0.0216217041015625, 0.016326904296875, 0.058685302734375, 0.01300811767578125, 0.036529541015625, 0.045928955078125, -0.0014181137084960938, -0.0246734619140625, 0.028961181640625, 0.00115966796875, 0.0289764404296875, -0.071044921875, 0.0252532958984375, -0.03387451171875, -0.044708251953125, -0.019012451171875, 0.031341552734375, -0.019561767578125, 0.0030193328857421875, -0.042938232421875, 0.01143646240234375, -0.0134429931640625, 0.0457763671875, -0.002460479736328125, -0.003879547119140625, 0.0251922607421875, 0.017730712890625, -0.03460693359375, 0.0008821487426757812, -0.01189422607421875, 0.0228118896484375, -0.0199432373046875, 0.03564453125, -0.01068878173828125, 0.0279388427734375, -0.051788330078125, -0.0321044921875, -0.046661376953125, -0.0156402587890625, 0.06719970703125, -0.05023193359375, 0.009063720703125, -0.061553955078125, 0.033660888671875, 0.007244110107421875, -0.07763671875, 0.01470947265625, -0.01207733154296875, -0.011077880859375, -0.02783203125, 0.0031681060791015625, 0.026824951171875, -0.00908660888671875, 0.01275634765625, 0.0296173095703125, 0.03668212890625, 0.0198822021484375, -0.0005736351013183594, -0.00937652587890625, -0.0104217529296875, -0.047882080078125, 0.037994384765625, -0.033660888671875, 0.0018510818481445312, 0.060821533203125, -0.01142120361328125, 0.01139068603515625, 0.0007529258728027344, 0.00714874267578125, 0.0030651092529296875, 0.0199432373046875, 0.04522705078125, 0.046295166015625, -0.028472900390625, 0.024932861328125, -0.01136016845703125, -0.0033740997314453125, -0.0224456787109375, 0.01544189453125, 0.04815673828125, 0.044097900390625, 0.049957275390625, 0.025970458984375, -0.034332275390625, 0.0298614501953125, -0.006977081298828125, -0.02752685546875, 0.01611328125, 0.04327392578125, -0.035003662109375, 0.01058197021484375, -0.0261688232421875, -0.01230621337890625, 0.00550079345703125, 0.0030498504638671875, -0.013427734375, 0.041168212890625, -0.0186614990234375, -0.023162841796875, -0.0113525390625, -0.0294952392578125, -0.0160980224609375, -0.019378662109375, -0.01470947265625, -0.004016876220703125, 0.03955078125, 0.0017175674438476562, -0.04986572265625, 0.03411865234375, -0.03753662109375, -0.0197601318359375, 0.01519775390625, -0.0870361328125, 0.061309814453125, -0.0548095703125, 0.064208984375, 0.08013916015625, -0.00860595703125, 0.0221710205078125, -0.01479339599609375, -0.00592041015625, -0.0035114288330078125, -0.0113677978515625, -0.0262298583984375, -0.0284881591796875, -0.0447998046875, 0.01593017578125, 0.0279541015625, 0.0484619140625, -0.007801055908203125, -0.0220947265625, 0.00820159912109375, 0.025115966796875, -0.05474853515625, -0.0816650390625, 0.01316070556640625, -0.04498291015625, -0.0239105224609375, -0.021942138671875, -0.0264434814453125, -0.00411224365234375, -0.01433563232421875, 0.0008459091186523438, 0.019805908203125, -0.0043487548828125, -0.07647705078125, -0.0275726318359375, -0.064697265625, 0.002338409423828125, -0.01291656494140625, -0.0064544677734375, 0.0021514892578125, 0.07733154296875, 0.00733184814453125, -0.055572509765625, -0.0153961181640625, 0.0306854248046875, -0.03656005859375, -0.016387939453125, 0.017242431640625, -0.01141357421875, -0.00027871131896972656, 0.00875091552734375, -0.0178070068359375, 0.023529052734375, -0.01195526123046875, -0.01806640625, -0.01197052001953125, -0.01140594482421875, 0.03131103515625, -0.024169921875, -0.01479339599609375, 0.031219482421875, 0.0294189453125, -0.01947021484375, -0.01459503173828125, -0.039703369140625, -0.03314208984375, 0.019073486328125, 0.01371002197265625, -0.004261016845703125, -0.02178955078125, 0.021942138671875, -0.01163482666015625, -0.025970458984375, 0.034332275390625, -0.06976318359375, 0.06341552734375, 0.01558685302734375, 0.00815582275390625, -0.031524658203125, 0.031097412109375, -0.00424957275390625, 0.0060577392578125, 0.0107421875, 0.006404876708984375, -0.009979248046875, -0.0008478164672851562, -0.023956298828125, 0.007266998291015625, 0.0166778564453125, -0.02734375, 0.03759765625, -0.0280303955078125, -0.0126953125, -0.039520263671875, 0.06512451171875, -0.07421875, -0.0167083740234375, -0.01470947265625, 0.00565338134765625, -0.0022258758544921875, -0.035308837890625, -0.0555419921875, -0.01531982421875, -0.07647705078125, 0.002750396728515625, -0.017913818359375, -0.0214385986328125, -0.0019350051879882812, 0.008575439453125, -0.04150390625, -0.04071044921875, 0.0482177734375, -0.002246856689453125, -0.00913238525390625, 0.0166015625, 0.0005421638488769531, -0.0142974853515625, -0.03106689453125, -0.0064544677734375, -0.03717041015625, -0.022491455078125, 0.00704193115234375, 0.048980712890625, 0.017852783203125, -0.046112060546875, -0.01088714599609375, 0.04766845703125, -0.0063323974609375, 0.03045654296875, -0.0198516845703125, 0.01348876953125, -0.0232391357421875, -0.01409912109375, -0.0225830078125, -0.01904296875, -0.003208160400390625, -0.0243988037109375, -0.0072021484375, -0.0028820037841796875, -0.052154541015625, -0.040374755859375, -0.0230255126953125, -0.01316070556640625, -0.03839111328125, -0.00890350341796875, 0.0138092041015625, 0.0242462158203125, -0.028350830078125, 0.01232147216796875, 0.00514984130859375, -0.0129547119140625, 0.026092529296875, 0.0321044921875, -0.04345703125, -0.0005984306335449219, 0.0509033203125, 0.02215576171875, -0.0294036865234375, -0.0469970703125, 0.0119171142578125, 0.00862884521484375, 0.004947662353515625, 0.04132080078125, 0.01110076904296875, 0.004039764404296875, -0.0019931793212890625, -0.01020050048828125, -0.01413726806640625, 0.0196380615234375, 0.01146697998046875, 0.0236053466796875, -0.024658203125, 0.02239990234375, 0.0125885009765625, -0.00499725341796875, 0.024627685546875, -0.0115814208984375, -0.042694091796875, -0.0272064208984375, 0.0699462890625, -0.000946044921875, 0.011322021484375, -0.055572509765625, -0.0260772705078125, 0.004486083984375, 0.004364013671875, 0.01131439208984375, 0.030731201171875, -0.0056304931640625, 0.003021240234375, 0.00690460205078125, -0.009033203125, 0.0269317626953125, 0.0343017578125, 0.01406097412109375, 0.023193359375, 0.034393310546875, -0.02459716796875, -0.0004222393035888672, -0.004032135009765625, 0.02587890625, -0.01520538330078125, -0.06201171875, 0.03790283203125, -0.007274627685546875, 0.04791259765625, 0.0307769775390625, -0.01114654541015625, 0.060394287109375, 0.00334930419921875, -0.03802490234375, -0.03277587890625, -0.07080078125, -0.0107879638671875, -0.0833740234375, -0.01264190673828125, -0.022674560546875, 0.006847381591796875, 0.02227783203125, 0.053802490234375, -0.06011962890625, 0.07562255859375, -0.0076904296875, 0.0247344970703125, 0.016845703125, 0.002262115478515625, 0.01953125, 0.02386474609375, -0.0007195472717285156, -0.0060272216796875, 0.01690673828125, -0.0040130615234375, -0.003620147705078125, 0.019134521484375, 0.0098419189453125, 0.047027587890625, 0.0175018310546875, -0.01438140869140625, 0.00218963623046875, -0.01407623291015625, 0.049224853515625, 0.045684814453125, -0.0243682861328125, -0.0186614990234375, 0.0113067626953125, 0.040863037109375, 0.0010061264038085938, -0.0122528076171875, -0.00537109375, -0.018951416015625, 0.01280975341796875, -0.0592041015625, -0.0081787109375, 0.001529693603515625, 0.0007357597351074219, -0.01153564453125, -0.0389404296875, -0.0108642578125, -0.0015783309936523438, 0.004940032958984375, -0.018707275390625, -0.02337646484375, 0.0287322998046875, -0.0224609375, 0.032135009765625, -0.0540771484375, 0.00616455078125, -0.018951416015625, 0.01313018798828125, 0.0147857666015625, 0.0029621124267578125, -0.0106048583984375, 0.0159912109375, -0.036865234375, -0.0238800048828125, 0.031982421875, -0.022613525390625, -0.0216827392578125, -0.04315185546875, 0.032623291015625, 0.0369873046875, 0.0024890899658203125, -0.051910400390625, -0.009735107421875, -0.052520751953125, 0.006153106689453125, 0.0104217529296875, -0.0081024169921875, 0.050994873046875, 0.01171875, 0.06268310546875, 0.039459228515625, 0.035552978515625, -0.045257568359375, -0.02789306640625, 0.019683837890625, -0.0582275390625, -0.0190887451171875, -0.0037059783935546875, -0.045562744140625, -0.0137939453125, 0.0023555755615234375, -0.00542449951171875, 0.0224456787109375, -0.01367950439453125, 0.019012451171875, -0.0127410888671875, -0.0312347412109375, -0.0176849365234375, -0.01146697998046875, 0.038421630859375, -0.0164642333984375, -0.0010995864868164062, 0.001190185546875, -0.0258941650390625, -0.0111846923828125, 0.01580810546875, -0.028961181640625, 0.006317138671875, -0.01690673828125, 0.0330810546875, 0.060028076171875, -0.00408172607421875, 0.041534423828125, 0.005001068115234375, 0.00424957275390625, 0.022613525390625, -0.0280609130859375, 0.021759033203125, -0.007350921630859375, 0.0182647705078125, -0.0285186767578125, 0.0127716064453125, 0.0019464492797851562, -0.0117340087890625, -0.01195526123046875, -0.0174560546875, 0.0066680908203125, -0.01049041748046875, 0.0106658935546875, -0.0237884521484375, -0.0028018951416015625, 0.045623779296875, 0.0032253265380859375, -0.00289154052734375, -0.04034423828125, 0.02081298828125, 0.0008234977722167969, -0.035125732421875, -0.024810791015625, -0.0067596435546875, -0.004833221435546875, 0.01244354248046875, 0.027862548828125, 0.01605224609375, -0.044525146484375, 0.005218505859375, 0.01302337646484375, -0.00040435791015625, 0.01016998291015625, 0.011260986328125, -0.01038360595703125, -0.01297760009765625, -0.04022216796875, -0.011962890625, -0.0261383056640625, -0.0207366943359375, -0.02117919921875, 0.0100860595703125, -0.0168304443359375, 0.07275390625, -0.03662109375, 0.0221405029296875, 0.06317138671875, -0.067626953125, -0.08209228515625, -0.01148223876953125, -0.01053619384765625, 0.04779052734375, -0.0029811859130859375, 0.048248291015625, -0.0330810546875, -0.0025844573974609375, -0.008148193359375, -0.01812744140625, 0.04803466796875, -0.04913330078125, 0.0147705078125, 0.056060791015625, 0.023468017578125, -0.0288238525390625, 0.019287109375, -0.01534271240234375, -0.05889892578125, -0.04608154296875, 0.006221771240234375, -0.04840087890625, -0.0012083053588867188, 0.0115203857421875, -0.056121826171875, 0.081787109375, -0.022918701171875, 0.04107666015625, 0.06817626953125, 0.01151275634765625, -0.054443359375, -0.02044677734375, -0.005130767822265625, 0.045166015625, -0.031005859375, 0.033538818359375, -0.044647216796875, -0.005001068115234375, 0.0190887451171875, 0.0531005859375, 0.044830322265625, 0.00988006591796875, -0.0684814453125, -0.0140533447265625, 0.046051025390625, 0.049102783203125, 0.018707275390625, 0.052581787109375, 0.0028362274169921875, 0.03411865234375, 0.058807373046875, -0.040313720703125, 0.036529541015625, 0.01556396484375, -0.00997161865234375, 0.034637451171875, 0.0015001296997070312, 0.00537872314453125, 0.00949859619140625, 0.0057220458984375, -0.040313720703125, 0.00572967529296875, 0.037811279296875, -0.01947021484375, 0.0200958251953125, 0.037200927734375, 0.072509765625, -0.0654296875, 0.0340576171875, -0.031280517578125, 0.055267333984375, 0.0170440673828125, 0.0011348724365234375, 0.047943115234375, 0.019012451171875, 0.06610107421875, -0.020538330078125, 0.00582122802734375, -0.0132293701171875, 0.0094146728515625, 0.056488037109375, 0.036285400390625, 0.051025390625, -0.01959228515625, -0.00814056396484375, 0.048065185546875, 0.0784912109375, -0.03900146484375, -0.03240966796875, 0.0216827392578125, 0.0171051025390625, -0.0018091201782226562, 0.00830841064453125, 0.003997802734375, 0.005207061767578125, 0.026214599609375, -0.040802001953125, -0.01203155517578125, -0.005390167236328125, 0.01708984375, -0.0145263671875, -0.00778961181640625, 0.0074310302734375, -0.033966064453125, -0.0213775634765625, 0.012054443359375, 0.0220184326171875, 0.056884765625, -0.0147247314453125, 0.0693359375, -0.0450439453125, -0.020294189453125, -0.01052093505859375, 0.042144775390625, -0.042510986328125, 0.0246124267578125, -0.05322265625, -0.061309814453125, -0.01039886474609375, 0.05157470703125, 0.059967041015625, -0.006664276123046875, 0.037994384765625, 0.01479339599609375, -0.004856109619140625, 0.005626678466796875, 0.034149169921875, 0.005863189697265625, 0.031341552734375, -0.0287322998046875, -0.019805908203125, -0.01654052734375, -0.034210205078125, -0.00656890869140625, -0.009674072265625, 0.017059326171875, -0.0209808349609375, 0.037109375, -0.01151275634765625, 0.0205230712890625, 0.0276641845703125, 0.0019702911376953125, -0.0011262893676757812, -0.005069732666015625, -0.06231689453125, -0.023345947265625, -0.057464599609375, 0.005397796630859375, 0.0445556640625, 0.04278564453125, 0.01447296142578125, 0.00027060508728027344, 0.008270263671875, -0.0220947265625, 0.032470703125, 0.0027618408203125, -0.005130767822265625, 0.0176239013671875, 0.020294189453125, -0.004978179931640625, -0.07708740234375, -0.040771484375, 0.0012540817260742188, 0.0037136077880859375, -0.017364501953125, 0.04058837890625, 0.03497314453125, 0.007354736328125, 0.03240966796875, 0.030059814453125, -0.013763427734375, 0.017852783203125, 0.02215576171875, -0.0262298583984375, 0.003520965576171875, -0.006313323974609375, -0.0220947265625, -0.00255584716796875, 0.0460205078125, -0.033111572265625, 0.010345458984375, -0.01525115966796875, 0.0090789794921875, -0.043060302734375, 0.0009236335754394531, -0.031890869140625, 0.0200042724609375, -0.020660400390625, -0.04669189453125, 0.060150146484375, -0.031494140625, -0.036468505859375, 0.0248260498046875, 0.0479736328125, -0.04949951171875, 0.020721435546875, -0.0242919921875, 0.044677734375, 0.04949951171875, 0.055572509765625, 0.003780364990234375, -0.008392333984375, -0.02276611328125, -0.033843994140625, 0.01812744140625, -0.0158843994140625, -0.00937652587890625, -0.0192108154296875, 0.02716064453125, 0.013458251953125, 0.037322998046875, -0.004421234130859375, 0.01523590087890625, 0.0170135498046875, -0.004665374755859375, -0.0194549560546875, -0.00890350341796875, -0.0277099609375, -0.04534912109375, -0.0033054351806640625, 0.0039005279541015625, -0.026336669921875, -0.01509857177734375, -0.003265380859375, -0.0053558349609375, 0.032501220703125, 0.0045166015625, -0.03173828125, 0.027374267578125, -0.0426025390625, 0.0105743408203125, 0.0064239501953125, -0.0931396484375, 0.0211334228515625, 0.041595458984375, 0.033843994140625, -0.005046844482421875, -0.05291748046875, -0.020751953125, -0.01959228515625, -0.0134429931640625, -0.0021266937255859375, -0.01502227783203125, 0.019622802734375, -0.0372314453125, -0.004642486572265625, 0.01010894775390625, 0.026611328125, -0.014251708984375, 0.044342041015625, -0.0118255615234375, -0.045074462890625, -0.0333251953125, 0.024505615234375, -0.0567626953125, -0.0007147789001464844, 0.017669677734375, -0.003955841064453125, 0.0207977294921875, -0.0174713134765625, -0.048004150390625, 0.07989501953125, -0.01326751708984375, -0.0203704833984375, -0.0499267578125, 0.019744873046875, 0.0159759521484375, 0.0085296630859375, -0.0086822509765625, 0.006053924560546875, -0.032562255859375, -0.0023326873779296875, 0.0033664703369140625, 0.04296875, -0.00263214111328125, -0.0083465576171875, -0.017791748046875, 0.019989013671875, 0.015350341796875, 0.0119476318359375, 0.0238800048828125, -0.0340576171875, 0.0426025390625, 0.03399658203125, -0.042633056640625, -0.00676727294921875, 0.016387939453125, 0.00980377197265625, 0.0009555816650390625, -0.01251220703125, -0.07501220703125, -0.03607177734375, 0.06732177734375, 0.0810546875, 0.03338623046875, -0.031280517578125, 0.0208282470703125, 0.015655517578125, -0.0426025390625, -0.01331329345703125, 0.0212249755859375, -0.036407470703125, -0.0174560546875, -0.0152587890625, -0.00604248046875, -0.0247955322265625, -0.025299072265625, -0.033599853515625, -0.01261138916015625, -0.0029430389404296875, 0.009429931640625, 0.001140594482421875, 0.0537109375, 0.0286407470703125, -0.0218658447265625, -0.020599365234375, -0.004695892333984375, -0.026885986328125, -0.004840850830078125, -0.007595062255859375, -0.002506256103515625, 0.016021728515625, -0.0012521743774414062, 0.01739501953125, 0.0204315185546875, -0.0254974365234375, 0.010040283203125, 0.01009368896484375, -0.019439697265625, 0.0076141357421875, 0.01549530029296875, -0.01041412353515625, 0.0137786865234375, 0.0352783203125, 0.024566650390625, 0.028778076171875, 0.006603240966796875, 0.07220458984375, -0.009002685546875, 0.0552978515625, 0.01355743408203125, -0.03143310546875, 0.051116943359375, -0.025665283203125, -0.0152435302734375, -0.0019102096557617188, -0.035919189453125, -0.07598876953125, 0.04620361328125, 0.03826904296875, 0.0075836181640625, 0.0261993408203125 ]
01e35d45e9e6d99153a10acc447bc163066eb362
Wordpress Stackexchange Q: exclude category from get_posts? getting posts by cat with get_posts but need to exclude another cat called london or id 10. is this possible? best, Dc. // array(7,-10) $laargsM = array('category' => 7, 'posts_per_page'=>300, 'orderby'=>'title', 'order'=>'asc' ); $la_shapes = get_posts( $laargsM ); A: as 'get_posts()' uses the 'WP_Query()' parameters, i would assume that this should work: $laargsM = array( 'cat' => 7, 'posts_per_page' => 300, 'orderby' => 'title', 'order' => 'asc', 'category__not_in' => array(10) );
Q: exclude category from get_posts? getting posts by cat with get_posts but need to exclude another cat called london or id 10. is this possible? best, Dc. // array(7,-10) $laargsM = array('category' => 7, 'posts_per_page'=>300, 'orderby'=>'title', 'order'=>'asc' ); $la_shapes = get_posts( $laargsM ); A: as 'get_posts()' uses the 'WP_Query()' parameters, i would assume that this should work: $laargsM = array( 'cat' => 7, 'posts_per_page' => 300, 'orderby' => 'title', 'order' => 'asc', 'category__not_in' => array(10) );
wordpress
{ "language": "en", "length": 76, "provenance": "stackexchange_00019.jsonl.gz:412924", "question_score": "6", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28084" }
[ 0.050140380859375, 0.024322509765625, 0.002376556396484375, -0.000362396240234375, 0.0297088623046875, -0.03472900390625, 0.07110595703125, -0.0263824462890625, -0.013397216796875, -0.00568389892578125, -0.0684814453125, 0.00007259845733642578, -0.04559326171875, -0.00922393798828125, 0.007663726806640625, -0.075439453125, 0.0281829833984375, -0.00975799560546875, 0.0116424560546875, -0.0191650390625, 0.0186767578125, -0.0014019012451171875, 0.007404327392578125, 0.06768798828125, 0.00977325439453125, -0.0222930908203125, 0.05419921875, -0.02484130859375, 0.0038280487060546875, -0.0284271240234375, 0.0131072998046875, 0.0120849609375, 0.02386474609375, 0.00823974609375, -0.01506805419921875, 0.005084991455078125, -0.003032684326171875, 0.0017213821411132812, 0.004543304443359375, 0.0224609375, 0.004451751708984375, 0.0115814208984375, 0.0118408203125, 0.0123443603515625, -0.0277557373046875, -0.021942138671875, -0.005390167236328125, -0.02081298828125, 0.019317626953125, -0.04364013671875, 0.026885986328125, -0.012969970703125, 0.057952880859375, -0.0309295654296875, -0.032470703125, 0.00922393798828125, 0.01422119140625, 0.02740478515625, 0.07269287109375, -0.02825927734375, -0.068115234375, -0.033721923828125, 0.0279998779296875, -0.048828125, -0.0211181640625, 0.00434112548828125, 0.06298828125, 0.00873565673828125, -0.061187744140625, -0.032806396484375, 0.04522705078125, -0.01436614990234375, -0.0164031982421875, -0.0164031982421875, -0.016937255859375, -0.00605010986328125, 0.0012359619140625, -0.05181884765625, -0.004520416259765625, 0.01554107666015625, -0.013275146484375, -0.01364898681640625, -0.0310516357421875, -0.002971649169921875, 0.00463104248046875, 0.02960205078125, -0.0269622802734375, -0.0335693359375, -0.046630859375, -0.04156494140625, -0.0256195068359375, -0.04833984375, -0.08544921875, 0.01806640625, 0.0079498291015625, -0.0175018310546875, 0.0217742919921875, 0.028717041015625, -0.00872039794921875, -0.0256195068359375, -0.0167999267578125, -0.032958984375, -0.02947998046875, -0.007244110107421875, 0.015960693359375, 0.0207061767578125, -0.02587890625, 0.021881103515625, 0.0555419921875, 0.045745849609375, 0.014984130859375, 0.0213470458984375, 0.033660888671875, 0.01025390625, -0.035369873046875, 0.00007128715515136719, 0.01165771484375, -0.01035308837890625, -0.0098724365234375, -0.0174713134765625, 0.0010995864868164062, 0.036529541015625, -0.004146575927734375, -0.015350341796875, 0.032012939453125, 0.0290069580078125, -0.0290679931640625, -0.00792694091796875, 0.0051727294921875, 0.024993896484375, -0.049774169921875, 0.01088714599609375, 0.0814208984375, 0.0014972686767578125, 0.0034332275390625, -0.0294952392578125, 0.0172271728515625, -0.01513671875, 0.003765106201171875, 0.009765625, -0.0164642333984375, -0.0179901123046875, 0.031890869140625, -0.0105743408203125, -0.02557373046875, 0.010955810546875, -0.01277923583984375, 0.0180206298828125, 0.024658203125, -0.05584716796875, 0.0233154296875, -0.05828857421875, 0.0287933349609375, 0.0018186569213867188, -0.02264404296875, -0.0043182373046875, 0.007965087890625, -0.0222320556640625, -0.025238037109375, -0.0278167724609375, 0.06268310546875, 0.0223236083984375, 0.0012025833129882812, -0.016510009765625, -0.057098388671875, -0.029388427734375, -0.0445556640625, -0.0267791748046875, 0.0168914794921875, 0.041961669921875, 0.00463104248046875, -0.005153656005859375, -0.0132293701171875, 0.0369873046875, 0.0231170654296875, 0.025054931640625, -0.0350341796875, -0.042999267578125, 0.062744140625, 0.003475189208984375, -0.0290374755859375, -0.018463134765625, -0.0013647079467773438, 0.022674560546875, -0.060272216796875, 0.0556640625, 0.0313720703125, 0.057830810546875, -0.043792724609375, 0.0206298828125, 0.07879638671875, 0.069091796875, -0.034454345703125, -0.0030841827392578125, -0.016326904296875, -0.0258331298828125, 0.01377105712890625, 0.0045318603515625, 0.0028934478759765625, 0.022796630859375, 0.0390625, -0.0197296142578125, 0.002197265625, 0.0003979206085205078, -0.0182952880859375, -0.03515625, 0.005859375, 0.002079010009765625, -0.07177734375, 0.033843994140625, 0.03204345703125, -0.01300048828125, -0.035736083984375, 0.002086639404296875, 0.01861572265625, -0.0297393798828125, 0.0006794929504394531, 0.025543212890625, -0.0184783935546875, 0.0019855499267578125, -0.019378662109375, -0.016265869140625, -0.0165863037109375, 0.0288543701171875, 0.051971435546875, -0.0333251953125, -0.004940032958984375, -0.034454345703125, -0.0022907257080078125, 0.0276947021484375, -0.09783935546875, 0.021881103515625, 0.0204620361328125, 0.07305908203125, -0.0131378173828125, 0.00937652587890625, 0.040985107421875, 0.02178955078125, 0.013824462890625, 0.00254058837890625, 0.036529541015625, -0.01157379150390625, -0.037200927734375, -0.040557861328125, 0.01561737060546875, -0.0701904296875, -0.01715087890625, -0.0205230712890625, 0.005886077880859375, 0.055206298828125, 0.03326416015625, 0.00989532470703125, -0.0025463104248046875, 0.0068817138671875, 0.01428985595703125, 0.0189056396484375, 0.0111846923828125, -0.0001341104507446289, -0.0213775634765625, -0.01129913330078125, 0.0284881591796875, -0.0149688720703125, -0.047943115234375, 0.0098876953125, 0.0259246826171875, -0.037384033203125, -0.0035495758056640625, -0.005237579345703125, -0.018035888671875, -0.02032470703125, 0.029266357421875, 0.0021305084228515625, 0.01168060302734375, -0.006954193115234375, -0.0244140625, 0.062103271484375, -0.0243988037109375, 0.006011962890625, 0.0268707275390625, 0.0025959014892578125, -0.0136871337890625, 0.034881591796875, 0.043243408203125, -0.011322021484375, -0.0149078369140625, -0.07025146484375, 0.02606201171875, -0.027923583984375, -0.0292816162109375, -0.0158538818359375, -0.0031871795654296875, 0.046966552734375, -0.002796173095703125, 0.0096435546875, 0.0223236083984375, 0.01071929931640625, 0.03887939453125, -0.0259246826171875, 0.0116729736328125, 0.0029163360595703125, 0.026641845703125, 0.052337646484375, 0.0306854248046875, -0.0237884521484375, 0.00255584716796875, 0.0247802734375, 0.023345947265625, -0.01039886474609375, -0.0029239654541015625, 0.0198822021484375, -0.0230560302734375, 0.033935546875, 0.0183563232421875, 0.001209259033203125, 0.0263519287109375, -0.010406494140625, 0.00997161865234375, 0.0233306884765625, -0.05023193359375, -0.041229248046875, 0.028533935546875, 0.01399993896484375, 0.006671905517578125, -0.00835418701171875, 0.01035308837890625, -0.0280303955078125, -0.0203704833984375, -0.01270294189453125, 0.024871826171875, 0.0001577138900756836, -0.07781982421875, -0.039093017578125, -0.07244873046875, -0.0201873779296875, -0.00890350341796875, 0.0154571533203125, 0.01100921630859375, 0.0999755859375, 0.0097808837890625, -0.072265625, 0.01168060302734375, 0.016998291015625, -0.00994110107421875, 0.049163818359375, -0.03533935546875, 0.0187530517578125, 0.001514434814453125, 0.001926422119140625, 0.043670654296875, 0.0006875991821289062, -0.01357269287109375, -0.000038623809814453125, -0.01904296875, 0.003307342529296875, 0.0294647216796875, -0.0546875, 0.0029296875, 0.0543212890625, 0.0240936279296875, 0.0005807876586914062, -0.0154571533203125, -0.024749755859375, -0.0275115966796875, 0.0213775634765625, 0.0034999847412109375, 0.00621795654296875, -0.01593017578125, 0.032806396484375, 0.01052093505859375, -0.001941680908203125, 0.00865936279296875, -0.019195556640625, 0.040130615234375, 0.01605224609375, 0.0272064208984375, -0.01525115966796875, -0.0211029052734375, -0.052581787109375, 0.00848388671875, -0.0269622802734375, -0.008941650390625, -0.00838470458984375, -0.0039005279541015625, -0.0024700164794921875, -0.028076171875, 0.020538330078125, -0.0193023681640625, -0.0132904052734375, 0.00357818603515625, -0.00699615478515625, 0.0196075439453125, 0.057891845703125, -0.038482666015625, -0.03582763671875, -0.032135009765625, 0.01467132568359375, -0.00553131103515625, -0.04742431640625, 0.0211029052734375, -0.0195770263671875, -0.04998779296875, -0.0277862548828125, -0.01324462890625, -0.037109375, -0.0206146240234375, -0.003932952880859375, -0.051544189453125, -0.01256561279296875, 0.040374755859375, -0.03875732421875, -0.0034351348876953125, -0.0302734375, 0.040069580078125, -0.089599609375, -0.01114654541015625, 0.014801025390625, -0.0380859375, 0.012481689453125, -0.0377197265625, -0.0037059783935546875, -0.005908966064453125, 0.052398681640625, -0.019805908203125, 0.0234527587890625, 0.00940704345703125, -0.006748199462890625, 0.01299285888671875, 0.0193023681640625, -0.003734588623046875, 0.033538818359375, 0.01091766357421875, -0.014739990234375, -0.0034503936767578125, 0.00377655029296875, -0.0100555419921875, 0.0236968994140625, -0.0282440185546875, -0.014984130859375, -0.018310546875, -0.0313720703125, -0.08172607421875, -0.051025390625, -0.014434814453125, -0.0304412841796875, -0.033966064453125, 0.00991058349609375, -0.0299224853515625, -0.05743408203125, 0.049774169921875, 0.05584716796875, -0.035491943359375, -0.0029773712158203125, 0.042877197265625, 0.01078033447265625, -0.047119140625, -0.0657958984375, -0.0015344619750976562, 0.016754150390625, -0.0082855224609375, 0.05267333984375, 0.0161590576171875, -0.020599365234375, 0.0711669921875, 0.004474639892578125, 0.0167694091796875, -0.0255279541015625, 0.003963470458984375, 0.001857757568359375, 0.00025725364685058594, -0.01378631591796875, 0.00313568115234375, 0.03375244140625, 0.032958984375, -0.0121002197265625, -0.018310546875, 0.0015811920166015625, 0.0271759033203125, 0.0011539459228515625, -0.010498046875, -0.029510498046875, 0.0217437744140625, -0.0007944107055664062, 0.0282135009765625, 0.034271240234375, 0.044586181640625, -0.00336456298828125, -0.024658203125, -0.01116943359375, 0.00439453125, 0.0093994140625, 0.035430908203125, -0.040435791015625, 0.01418304443359375, 0.0248565673828125, -0.030242919921875, -0.0010900497436523438, 0.00484466552734375, -0.052703857421875, -0.00714874267578125, -0.05712890625, 0.023529052734375, 0.0166778564453125, 0.019989013671875, 0.0150909423828125, -0.02001953125, 0.012542724609375, 0.0220489501953125, 0.01904296875, 0.024688720703125, 0.007541656494140625, -0.017364501953125, -0.00998687744140625, -0.01441192626953125, 0.01556396484375, -0.0325927734375, 0.0028858184814453125, 0.031890869140625, 0.0005960464477539062, 0.0269775390625, -0.0142364501953125, 0.0213623046875, -0.01184844970703125, 0.0416259765625, -0.01038360595703125, -0.01221466064453125, 0.00789642333984375, 0.0309295654296875, 0.0164947509765625, -0.041015625, -0.00305938720703125, -0.0194854736328125, 0.0172882080078125, 0.00896453857421875, -0.01166534423828125, 0.041534423828125, 0.00501251220703125, -0.0189056396484375, 0.06292724609375, 0.0426025390625, -0.0306396484375, -0.0252227783203125, 0.00212860107421875, 0.01514434814453125, -0.0035305023193359375, -0.01224517822265625, 0.0194854736328125, -0.034515380859375, 0.00698089599609375, 0.03753662109375, -0.04638671875, 0.0055694580078125, 0.01445770263671875, -0.0296173095703125, -0.03741455078125, -0.0033550262451171875, 0.0176544189453125, -0.006107330322265625, 0.0032138824462890625, -0.0190582275390625, -0.0229949951171875, 0.00605010986328125, 0.03277587890625, -0.03253173828125, -0.0167694091796875, 0.0036468505859375, 0.00394439697265625, 0.0367431640625, 0.0120849609375, 0.03240966796875, 0.0163726806640625, -0.07916259765625, -0.032257080078125, -0.00472259521484375, -0.02655029296875, -0.0272674560546875, -0.02606201171875, 0.0130615234375, 0.02130126953125, -0.004634857177734375, -0.047088623046875, -0.030853271484375, 0.00016379356384277344, 0.0292816162109375, 0.0200347900390625, -0.0181884765625, 0.01523590087890625, 0.0204315185546875, -0.0244140625, 0.0006880760192871094, 0.004848480224609375, 0.00510406494140625, -0.015228271484375, -0.0063934326171875, -0.08367919921875, -0.0418701171875, 0.037933349609375, -0.07830810546875, 0.0435791015625, 0.032379150390625, 0.004985809326171875, -0.0187225341796875, 0.0016183853149414062, 0.0133056640625, -0.0269622802734375, -0.0217132568359375, -0.00577545166015625, -0.028839111328125, -0.0072479248046875, -0.02294921875, 0.005245208740234375, -0.0135650634765625, -0.0251007080078125, 0.05194091796875, -0.023956298828125, 0.049102783203125, 0.0065460205078125, 0.0140380859375, 0.00693511962890625, 0.051788330078125, 0.0302734375, 0.0631103515625, 0.038787841796875, 0.047454833984375, 0.023345947265625, -0.0220794677734375, 0.046112060546875, -0.0162353515625, 0.033355712890625, -0.0048675537109375, 0.027099609375, 0.03948974609375, -0.0182647705078125, -0.01419830322265625, -0.01442718505859375, 0.00444793701171875, -0.0179901123046875, 0.0185394287109375, 0.00012612342834472656, -0.006916046142578125, -0.007030487060546875, 0.017303466796875, -0.01568603515625, 0.0022220611572265625, 0.0099639892578125, -0.053070068359375, -0.02197265625, -0.0050811767578125, -0.0175323486328125, -0.0010166168212890625, -0.01280975341796875, 0.01178741455078125, 0.0024318695068359375, -0.0489501953125, 0.0106658935546875, 0.03326416015625, -0.01395416259765625, -0.053863525390625, -0.024078369140625, 0.048980712890625, -0.0292205810546875, -0.11517333984375, 0.026763916015625, 0.011566162109375, -0.0036716461181640625, 0.045318603515625, -0.014556884765625, 0.0443115234375, 0.0223388671875, 0.0133209228515625, -0.0281219482421875, -0.006450653076171875, -0.0521240234375, 0.03802490234375, -0.006160736083984375, 0.00836944580078125, 0.01861572265625, -0.05572509765625, 0.004154205322265625, -0.006500244140625, 0.01165771484375, -0.01401519775390625, -0.0309295654296875, 0.03729248046875, -0.007381439208984375, -0.022003173828125, 0.01387786865234375, 0.0191650390625, 0.00424957275390625, 0.0095367431640625, 0.03662109375, -0.01548004150390625, -0.019317626953125, 0.02874755859375, -0.01125335693359375, -0.0242462158203125, 0.018157958984375, -0.06671142578125, 0.03570556640625, -0.03375244140625, 0.068359375, 0.0228424072265625, -0.007183074951171875, 0.0004992485046386719, -0.0174560546875, -0.0643310546875, 0.07696533203125, 0.04290771484375, 0.0565185546875, -0.079833984375, -0.032470703125, 0.009521484375, 0.03155517578125, 0.0279998779296875, -0.0111846923828125, -0.0274505615234375, -0.023681640625, 0.031829833984375, 0.07427978515625, 0.03436279296875, 0.00534820556640625, -0.0050811767578125, 0.0173492431640625, 0.06903076171875, -0.0194244384765625, 0.0455322265625, 0.0010976791381835938, -0.00415802001953125, 0.01132965087890625, -0.0021877288818359375, 0.0087432861328125, 0.0190887451171875, 0.0022373199462890625, 0.01357269287109375, -0.00836181640625, -0.006816864013671875, -0.05816650390625, 0.01329803466796875, 0.0386962890625, 0.040435791015625, -0.038421630859375, -0.0333251953125, -0.026519775390625, 0.04498291015625, 0.01885986328125, 0.0219879150390625, 0.060791015625, 0.030914306640625, 0.067626953125, 0.003047943115234375, 0.0291900634765625, -0.00501251220703125, 0.006011962890625, 0.046356201171875, 0.023284912109375, 0.0159149169921875, -0.032623291015625, 0.034637451171875, 0.06573486328125, 0.05859375, -0.060516357421875, -0.00841522216796875, 0.019073486328125, 0.0091705322265625, 0.0020542144775390625, -0.0175018310546875, 0.022735595703125, 0.005496978759765625, 0.024444580078125, -0.0831298828125, 0.006866455078125, 0.061492919921875, 0.0196380615234375, -0.00909423828125, -0.031951904296875, -0.02679443359375, -0.0038852691650390625, -0.0443115234375, 0.00978851318359375, 0.0259552001953125, 0.04266357421875, 0.0223236083984375, 0.061431884765625, -0.01016998291015625, -0.020660400390625, 0.0188751220703125, -0.0168304443359375, 0.006511688232421875, -0.0172271728515625, 0.006206512451171875, -0.00931549072265625, -0.005374908447265625, 0.01035308837890625, 0.00830078125, -0.01129150390625, 0.050537109375, 0.08966064453125, -0.00948333740234375, -0.0215301513671875, 0.0689697265625, 0.01506805419921875, -0.0274200439453125, -0.041168212890625, -0.019622802734375, 0.0211639404296875, -0.006771087646484375, -0.00028133392333984375, -0.029144287109375, 0.055877685546875, -0.0155029296875, -0.01348114013671875, -0.0012941360473632812, -0.032623291015625, 0.04718017578125, 0.003093719482421875, 0.01038360595703125, -0.004558563232421875, -0.08721923828125, -0.0236053466796875, -0.0401611328125, 0.01885986328125, -0.002716064453125, 0.01065826416015625, -0.0094146728515625, 0.048370361328125, 0.0167236328125, -0.005146026611328125, 0.005680084228515625, -0.006404876708984375, 0.02154541015625, 0.0248565673828125, 0.016326904296875, 0.0210723876953125, -0.0200042724609375, -0.01030731201171875, 0.0032749176025390625, 0.033233642578125, 0.031280517578125, -0.006359100341796875, 0.026580810546875, 0.022064208984375, -0.0281524658203125, 0.08367919921875, -0.08856201171875, -0.033447265625, 0.0552978515625, -0.0034618377685546875, 0.01531219482421875, -0.00984954833984375, 0.055755615234375, -0.036895751953125, 0.08306884765625, -0.06451416015625, -0.03778076171875, -0.025634765625, 0.0295867919921875, -0.038726806640625, 0.022857666015625, -0.0090179443359375, 0.00131988525390625, -0.055633544921875, -0.04638671875, 0.049652099609375, 0.05963134765625, 0.00981903076171875, 0.0269775390625, 0.0300140380859375, 0.0155487060546875, 0.029998779296875, 0.00848388671875, 0.055267333984375, 0.032318115234375, -0.055206298828125, 0.05389404296875, -0.0005168914794921875, -0.0144195556640625, 0.055084228515625, 0.02142333984375, -0.0160675048828125, 0.016326904296875, 0.0267486572265625, -0.050048828125, 0.018157958984375, 0.0196380615234375, -0.0259552001953125, 0.0184173583984375, 0.00921630859375, -0.0229644775390625, -0.01071929931640625, -0.030914306640625, -0.0223236083984375, -0.0180816650390625, -0.026641845703125, -0.003963470458984375, -0.0225982666015625, -0.07452392578125, -0.00632476806640625, -0.012664794921875, 0.00482177734375, -0.01544189453125, -0.0258331298828125, 0.019622802734375, -0.021270751953125, 0.03424072265625, -0.052001953125, 0.015289306640625, -0.011505126953125, 0.00859832763671875, -0.04071044921875, 0.005764007568359375, -0.0177001953125, 0.0114288330078125, 0.00519561767578125, 0.004302978515625, 0.0186614990234375, -0.018463134765625, -0.051605224609375, 0.030029296875, -0.00673675537109375, 0.050628662109375, -0.00791168212890625, -0.00437164306640625, 0.008087158203125, 0.021484375, -0.0467529296875, -0.033538818359375, 0.0311737060546875, -0.018890380859375, -0.01403045654296875, 0.044219970703125, -0.036895751953125, 0.0045013427734375, -0.01439666748046875, -0.0301361083984375, 0.03607177734375, 0.022369384765625, -0.036590576171875, -0.01154327392578125, 0.021942138671875, 0.00885009765625, -0.032562255859375, 0.00559234619140625, -0.0194244384765625, -0.017578125, -0.0081024169921875, 0.01103973388671875, 0.0382080078125, -0.00597381591796875, 0.0038166046142578125, -0.032745361328125, 0.032135009765625, 0.01297760009765625, 0.0215911865234375, -0.03741455078125, 0.0275115966796875, 0.00514984130859375, 0.01873779296875, -0.023345947265625, 0.0458984375, 0.0152435302734375, 0.03192138671875, 0.016998291015625, -0.052215576171875, -0.119384765625, -0.06097412109375, 0.0972900390625, 0.0826416015625, 0.050811767578125, -0.0249176025390625, -0.02581787109375, -0.044281005859375, 0.006534576416015625, 0.00659942626953125, 0.039886474609375, -0.08673095703125, -0.0031890869140625, 0.05291748046875, 0.01268768310546875, 0.022491455078125, -0.021270751953125, -0.017852783203125, -0.022918701171875, -0.0226593017578125, 0.0034885406494140625, -0.046051025390625, 0.06646728515625, -0.04144287109375, -0.0017232894897460938, -0.0199432373046875, -0.047149658203125, -0.016754150390625, -0.0293426513671875, -0.0285797119140625, -0.027496337890625, -0.00809478759765625, -0.0079193115234375, 0.01947021484375, 0.004154205322265625, 0.0023975372314453125, 0.0020427703857421875, 0.0312042236328125, -0.016143798828125, 0.00713348388671875, 0.02734375, 0.00534820556640625, -0.0270843505859375, 0.00881195068359375, 0.037567138671875, -0.0167999267578125, 0.051422119140625, 0.05059814453125, 0.004150390625, 0.055084228515625, 0.0010919570922851562, -0.05279541015625, 0.00533294677734375, -0.058746337890625, -0.007480621337890625, 0.00978851318359375, -0.031951904296875, -0.017608642578125, 0.023468017578125, -0.022735595703125, -0.007251739501953125, 0.00839996337890625 ]
706d8afbda479cab01e9c958ef1da9a3c27290d0
Wordpress Stackexchange Q: How can I tell if I'm on a login page? There are functions for is_home(), is_blog() is_single() etc... What's the best way to tell if I'm on a page that is requesting that I login? I guess that would just be the wp-login.php page. A: Paste this function in your functions.php or a plugin file: function is_login_page() { return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); } and then you can use it like this: if(is_login_page()){ //this is a login page }else{ //not the page you are looking for }
Q: How can I tell if I'm on a login page? There are functions for is_home(), is_blog() is_single() etc... What's the best way to tell if I'm on a page that is requesting that I login? I guess that would just be the wp-login.php page. A: Paste this function in your functions.php or a plugin file: function is_login_page() { return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); } and then you can use it like this: if(is_login_page()){ //this is a login page }else{ //not the page you are looking for }
wordpress
{ "language": "en", "length": 87, "provenance": "stackexchange_00019.jsonl.gz:412927", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28095" }
[ 0.029754638671875, 0.0257110595703125, -0.00806427001953125, 0.018951416015625, 0.027008056640625, -0.050201416015625, 0.051177978515625, -0.044647216796875, -0.0252227783203125, -0.015655517578125, -0.020538330078125, 0.043060302734375, -0.07598876953125, -0.0264739990234375, 0.047332763671875, -0.04742431640625, 0.0110626220703125, 0.01219940185546875, 0.0426025390625, -0.02081298828125, 0.038177490234375, -0.0196380615234375, 0.0271148681640625, 0.016876220703125, 0.004482269287109375, -0.02191162109375, 0.1170654296875, -0.0174713134765625, 0.050384521484375, 0.00827789306640625, 0.030487060546875, -0.0701904296875, 0.00637054443359375, 0.02862548828125, -0.0132598876953125, -0.034576416015625, -0.037017822265625, 0.030975341796875, 0.0251922607421875, -0.0067291259765625, 0.048919677734375, -0.0260009765625, -0.015167236328125, -0.0166168212890625, 0.0002598762512207031, -0.007297515869140625, 0.0246429443359375, -0.034149169921875, -0.005950927734375, -0.024078369140625, 0.009307861328125, -0.0142974853515625, 0.0285491943359375, 0.01678466796875, -0.0291290283203125, -0.007137298583984375, -0.0163726806640625, 0.0258941650390625, 0.03582763671875, -0.0216522216796875, -0.04443359375, -0.016937255859375, 0.025787353515625, -0.021759033203125, -0.030731201171875, -0.0056304931640625, -0.03363037109375, 0.0159912109375, 0.005199432373046875, -0.0650634765625, -0.0284271240234375, 0.002445220947265625, 0.0155792236328125, -0.00710296630859375, -0.028594970703125, -0.0279388427734375, 0.0021953582763671875, -0.0168609619140625, 0.021240234375, -0.0015573501586914062, -0.05242919921875, -0.001255035400390625, -0.0762939453125, 0.0023937225341796875, 0.0025005340576171875, 0.043365478515625, -0.0266571044921875, -0.01172637939453125, -0.0167083740234375, -0.00997161865234375, -0.021728515625, 0.0191192626953125, 0.008453369140625, -0.01483154296875, -0.0439453125, -0.01065826416015625, 0.0129547119140625, 0.03863525390625, -0.01220703125, -0.01329803466796875, -0.0203857421875, -0.025482177734375, -0.0171356201171875, -0.0192413330078125, 0.017578125, 0.0908203125, 0.0094451904296875, -0.0098114013671875, 0.01357269287109375, -0.01201629638671875, 0.04437255859375, -0.005641937255859375, -0.05230712890625, -0.037506103515625, -0.0211181640625, 0.043304443359375, -0.0321044921875, -0.036468505859375, -0.0128173828125, -0.00275421142578125, -0.0279541015625, -0.014068603515625, 0.051605224609375, -0.0120697021484375, 0.0220947265625, 0.00836944580078125, -0.01885986328125, -0.034515380859375, -0.0155181884765625, 0.040863037109375, -0.020599365234375, 0.00984954833984375, 0.01430511474609375, -0.030517578125, -0.0360107421875, -0.032318115234375, 0.03314208984375, 0.0303955078125, 0.018157958984375, 0.022796630859375, 0.0072784423828125, -0.059356689453125, -0.0151214599609375, 0.01861572265625, -0.00838470458984375, 0.00994873046875, 0.0167694091796875, 0.0250701904296875, -0.0302581787109375, -0.04608154296875, 0.0457763671875, -0.0261383056640625, -0.031494140625, 0.02655029296875, 0.052459716796875, 0.0196075439453125, 0.0193328857421875, 0.006290435791015625, 0.0128173828125, 0.0286102294921875, 0.043548583984375, 0.0026721954345703125, 0.005504608154296875, 0.00933837890625, -0.00823211669921875, -0.0166015625, -0.07305908203125, -0.0074462890625, 0.025360107421875, -0.01168060302734375, 0.0239715576171875, -0.0097808837890625, 0.037506103515625, 0.02301025390625, 0.00994110107421875, 0.014068603515625, -0.003192901611328125, 0.058868408203125, 0.0178680419921875, 0.0386962890625, 0.018157958984375, -0.02508544921875, 0.060882568359375, -0.0176849365234375, -0.046173095703125, 0.037567138671875, 0.02655029296875, 0.052825927734375, -0.0166778564453125, 0.019866943359375, 0.043487548828125, 0.029083251953125, -0.024078369140625, 0.02081298828125, -0.0062713623046875, -0.0193634033203125, 0.004123687744140625, 0.00750732421875, -0.0070037841796875, -0.001617431640625, 0.04541015625, -0.00901031494140625, 0.00160980224609375, -0.0163116455078125, -0.0400390625, -0.015777587890625, -0.005985260009765625, 0.016937255859375, 0.0338134765625, 0.01424407958984375, -0.003993988037109375, 0.022064208984375, 0.00159454345703125, -0.0670166015625, -0.055572509765625, 0.0267791748046875, -0.01427459716796875, 0.01312255859375, -0.0210418701171875, 0.00812530517578125, -0.05126953125, -0.0021533966064453125, -0.060516357421875, -0.0209503173828125, 0.03912353515625, -0.0023021697998046875, -0.0265350341796875, -0.0213165283203125, 0.03509521484375, 0.008209228515625, -0.0166473388671875, 0.032745361328125, 0.0143280029296875, 0.0252532958984375, -0.027496337890625, -0.01190185546875, -0.00339508056640625, -0.02764892578125, 0.0122833251953125, 0.03179931640625, 0.05377197265625, 0.01910400390625, 0.0127716064453125, 0.01059722900390625, 0.037200927734375, -0.09405517578125, -0.0141754150390625, 0.007556915283203125, 0.020660400390625, 0.046722412109375, -0.01519775390625, 0.007167816162109375, 0.023193359375, 0.006031036376953125, -0.016937255859375, 0.041778564453125, -0.004840850830078125, 0.0099945068359375, 0.002254486083984375, 0.009063720703125, -0.0208892822265625, 0.0016422271728515625, 0.010589599609375, -0.017059326171875, -0.0038394927978515625, -0.03887939453125, 0.0005650520324707031, -0.01371002197265625, 0.02423095703125, -0.03802490234375, 0.005672454833984375, -0.052215576171875, 0.0003027915954589844, 0.01024627685546875, 0.056304931640625, -0.01314544677734375, -0.039581298828125, -0.014007568359375, 0.0118865966796875, 0.00428009033203125, -0.049407958984375, -0.0136260986328125, -0.0259246826171875, -0.01898193359375, -0.009552001953125, -0.0244598388671875, 0.02764892578125, -0.026702880859375, 0.0374755859375, -0.001377105712890625, 0.038543701171875, -0.01446533203125, -0.03900146484375, 0.062347412109375, -0.00839996337890625, -0.06219482421875, 0.0229644775390625, -0.039215087890625, 0.055908203125, -0.0253448486328125, 0.01995849609375, 0.06463623046875, 0.004467010498046875, 0.00250244140625, -0.0037097930908203125, -0.039276123046875, -0.00417327880859375, 0.0014743804931640625, -0.0125274658203125, -0.005367279052734375, -0.036529541015625, 0.048370361328125, 0.01136016845703125, 0.0067291259765625, -0.0029144287109375, -0.04150390625, -0.01224517822265625, -0.01342010498046875, -0.08819580078125, -0.0677490234375, -0.05718994140625, -0.07769775390625, 0.002925872802734375, -0.0255279541015625, -0.0176849365234375, 0.02862548828125, -0.01152801513671875, 0.0156402587890625, -0.01181793212890625, -0.01641845703125, -0.05059814453125, -0.054840087890625, -0.0518798828125, 0.027801513671875, -0.01038360595703125, 0.0229949951171875, -0.001987457275390625, 0.058624267578125, 0.0018787384033203125, -0.03387451171875, -0.01473236083984375, 0.041595458984375, 0.0008454322814941406, -0.023956298828125, -0.039031982421875, -0.004177093505859375, 0.0038318634033203125, 0.006591796875, -0.022247314453125, -0.039886474609375, 0.05035400390625, -0.0174102783203125, -0.00783538818359375, -0.01873779296875, 0.014495849609375, 0.0025634765625, -0.0031833648681640625, -0.04144287109375, -0.0102996826171875, -0.06170654296875, -0.011016845703125, 0.0057830810546875, -0.050994873046875, 0.02374267578125, 0.03662109375, -0.039520263671875, 0.053955078125, -0.05859375, -0.00894927978515625, -0.0013647079467773438, -0.01314544677734375, -0.01331329345703125, 0.027557373046875, 0.0017108917236328125, -0.00616455078125, 0.0079498291015625, -0.0021114349365234375, -0.042755126953125, 0.008697509765625, -0.0132293701171875, -0.0017690658569335938, 0.00063323974609375, -0.0139617919921875, -0.0037078857421875, -0.0364990234375, 0.041107177734375, 0.0006885528564453125, 0.019866943359375, -0.0246734619140625, -0.0285186767578125, 0.003864288330078125, 0.0968017578125, 0.0014619827270507812, -0.005626678466796875, 0.0112457275390625, 0.0004088878631591797, -0.03521728515625, -0.0095062255859375, -0.067138671875, 0.00484466552734375, -0.05010986328125, 0.00832366943359375, -0.01035308837890625, -0.010162353515625, -0.01221466064453125, -0.016204833984375, -0.017425537109375, -0.036376953125, 0.019683837890625, 0.01297760009765625, 0.01560211181640625, 0.0038051605224609375, -0.005809783935546875, 0.01322174072265625, 0.0085296630859375, -0.01715087890625, -0.077880859375, 0.002605438232421875, -0.049957275390625, 0.029937744140625, 0.040130615234375, -0.0491943359375, 0.001491546630859375, 0.01084136962890625, 0.028350830078125, 0.013519287109375, 0.038970947265625, -0.01140594482421875, 0.04046630859375, 0.01514434814453125, 0.0274505615234375, -0.00811004638671875, 0.021484375, -0.0006136894226074219, -0.0362548828125, -0.019256591796875, -0.0474853515625, -0.03173828125, 0.0141143798828125, -0.037994384765625, -0.015716552734375, -0.01739501953125, 0.006427764892578125, 0.0201873779296875, -0.0179443359375, 0.016998291015625, -0.00493621826171875, -0.0273895263671875, 0.051788330078125, 0.016632080078125, -0.04437255859375, 0.01323699951171875, 0.052490234375, 0.0156707763671875, -0.03497314453125, -0.05462646484375, 0.021392822265625, 0.021087646484375, -0.01983642578125, 0.07305908203125, 0.0220489501953125, -0.01403045654296875, 0.061767578125, -0.00014412403106689453, -0.032928466796875, 0.004001617431640625, 0.036651611328125, 0.00685882568359375, -0.03826904296875, 0.0036182403564453125, -0.03515625, 0.0246734619140625, 0.01385498046875, 0.0023441314697265625, -0.029296875, 0.02789306640625, 0.0212554931640625, -0.040924072265625, 0.0272064208984375, 0.005924224853515625, -0.04840087890625, 0.0101470947265625, 0.00978851318359375, 0.0092620849609375, 0.03607177734375, -0.0177459716796875, 0.0251922607421875, 0.009735107421875, -0.0202789306640625, 0.00847625732421875, 0.0287017822265625, -0.00984954833984375, 0.01666259765625, 0.005016326904296875, -0.0223236083984375, -0.01641845703125, -0.0164794921875, 0.08074951171875, -0.028076171875, -0.0877685546875, 0.0265960693359375, -0.0540771484375, 0.017852783203125, 0.06475830078125, 0.01226806640625, 0.042266845703125, -0.042755126953125, -0.04876708984375, -0.0231170654296875, -0.0203857421875, -0.0643310546875, -0.06640625, -0.04681396484375, -0.046295166015625, -0.00897216796875, 0.0160675048828125, 0.02288818359375, -0.06463623046875, 0.038665771484375, -0.002063751220703125, -0.00911712646484375, 0.02862548828125, 0.0292816162109375, 0.03564453125, -0.0226287841796875, -0.00864410400390625, 0.0000794529914855957, 0.03753662109375, -0.031341552734375, -0.038970947265625, 0.01245880126953125, 0.0244293212890625, -0.00931549072265625, 0.0146942138671875, 0.007434844970703125, 0.0279388427734375, -0.0202789306640625, 0.058135986328125, 0.01114654541015625, -0.09521484375, -0.038177490234375, 0.013824462890625, 0.024627685546875, -0.0309600830078125, -0.0149383544921875, 0.006011962890625, -0.031890869140625, 0.00963592529296875, 0.018707275390625, -0.049896240234375, 0.01702880859375, 0.017852783203125, -0.060699462890625, -0.06939697265625, -0.01259613037109375, -0.0401611328125, 0.0291290283203125, -0.01511383056640625, -0.0201263427734375, -0.04351806640625, -0.01261138916015625, 0.0221099853515625, -0.0113372802734375, -0.021270751953125, 0.01458740234375, 0.004360198974609375, 0.04095458984375, -0.0122222900390625, -0.05328369140625, -0.01409149169921875, -0.039520263671875, -0.009613037109375, -0.037384033203125, -0.03448486328125, -0.04119873046875, 0.0027751922607421875, 0.00963592529296875, 0.02093505859375, -0.0146636962890625, -0.00884246826171875, -0.00681304931640625, 0.01180267333984375, 0.001140594482421875, 0.00884246826171875, -0.008575439453125, 0.08734130859375, 0.0019235610961914062, 0.01092529296875, 0.01739501953125, 0.058258056640625, -0.0008606910705566406, -0.014129638671875, 0.023040771484375, -0.006984710693359375, -0.007686614990234375, -0.055694580078125, 0.0211334228515625, -0.0217742919921875, 0.035797119140625, -0.00492095947265625, -0.033111572265625, -0.004558563232421875, 0.0041656494140625, -0.022125244140625, 0.05548095703125, 0.0226593017578125, -0.038909912109375, 0.020660400390625, 0.0079498291015625, 0.0032825469970703125, -0.012908935546875, -0.01033782958984375, -0.0033359527587890625, 0.0277862548828125, 0.01145172119140625, -0.0113677978515625, -0.0626220703125, 0.0625, 0.056304931640625, 0.0160064697265625, 0.065185546875, -0.0103759765625, 0.0350341796875, 0.047119140625, 0.0074310302734375, -0.00171661376953125, -0.000331878662109375, 0.07232666015625, 0.007633209228515625, -0.0263214111328125, 0.037506103515625, -0.037841796875, 0.0165557861328125, 0.0770263671875, 0.0633544921875, -0.1201171875, 0.02984619140625, 0.0146484375, 0.0191650390625, 0.055023193359375, -0.02093505859375, 0.0103607177734375, -0.0012035369873046875, 0.09124755859375, -0.021728515625, -0.002559661865234375, 0.0386962890625, -0.03570556640625, -0.0043487548828125, -0.038360595703125, 0.048309326171875, 0.0284423828125, -0.02410888671875, 0.0004296302795410156, 0.037017822265625, -0.00428009033203125, -0.029449462890625, 0.00211334228515625, 0.0094146728515625, 0.00014901161193847656, -0.016693115234375, 0.04150390625, -0.032012939453125, 0.01025390625, 0.025115966796875, 0.0167083740234375, 0.0201568603515625, 0.03271484375, -0.006320953369140625, -0.00453948974609375, -0.003551483154296875, -0.00958251953125, 0.0194091796875, 0.00010228157043457031, -0.0033168792724609375, 0.0102996826171875, -0.060211181640625, 0.0009036064147949219, -0.048583984375, 0.0273590087890625, -0.01259613037109375, -0.07733154296875, 0.080322265625, -0.0219879150390625, -0.0113525390625, 0.007678985595703125, -0.01001739501953125, -0.0019502639770507812, -0.02166748046875, 0.047943115234375, -0.028961181640625, -0.01505279541015625, 0.0056915283203125, -0.0284881591796875, -0.0286102294921875, -0.03668212890625, -0.041717529296875, 0.051666259765625, -0.01025390625, 0.018798828125, -0.00586700439453125, 0.018951416015625, 0.0025081634521484375, 0.0159454345703125, -0.03875732421875, 0.061126708984375, 0.055267333984375, 0.06396484375, 0.017547607421875, 0.007526397705078125, 0.049591064453125, -0.00809478759765625, 0.024932861328125, 0.006195068359375, 0.0023097991943359375, -0.0171966552734375, 0.006946563720703125, 0.042327880859375, 0.005588531494140625, 0.018646240234375, -0.004070281982421875, 0.020294189453125, 0.05206298828125, -0.036376953125, 0.03631591796875, 0.00991058349609375, -0.010009765625, 0.0198822021484375, -0.0023822784423828125, -0.044342041015625, -0.0258026123046875, 0.0184326171875, -0.0933837890625, 0.018768310546875, 0.0438232421875, 0.03668212890625, 0.03045654296875, 0.0181427001953125, 0.0135650634765625, -0.00557708740234375, 0.0098419189453125, -0.017669677734375, 0.031402587890625, -0.035247802734375, 0.037384033203125, 0.05084228515625, 0.032928466796875, 0.026519775390625, 0.002529144287109375, 0.030975341796875, 0.02178955078125, -0.0269622802734375, 0.0672607421875, 0.038970947265625, 0.020050048828125, -0.03680419921875, 0.00982666015625, 0.0140533447265625, 0.07708740234375, -0.0555419921875, -0.045074462890625, 0.003017425537109375, 0.00010228157043457031, 0.02276611328125, 0.007511138916015625, 0.0523681640625, -0.03167724609375, 0.000980377197265625, 0.0173492431640625, -0.02191162109375, 0.00348663330078125, 0.0018930435180664062, 0.0167694091796875, 0.0178070068359375, -0.01006317138671875, -0.0010738372802734375, -0.0028934478759765625, 0.0028514862060546875, 0.0027599334716796875, 0.005565643310546875, -0.0079345703125, 0.0207366943359375, 0.00506591796875, 0.021331787109375, -0.0225830078125, 0.0209197998046875, -0.028167724609375, 0.0286865234375, -0.045318603515625, -0.0247039794921875, -0.011566162109375, 0.046905517578125, 0.0207977294921875, -0.00991058349609375, -0.005435943603515625, 0.00942230224609375, 0.005283355712890625, -0.0038433074951171875, 0.03460693359375, -0.0087890625, 0.006900787353515625, -0.03948974609375, -0.01229095458984375, 0.007579803466796875, -0.0247344970703125, -0.0191497802734375, -0.0134124755859375, 0.0467529296875, -0.0141754150390625, 0.0177001953125, 0.0136871337890625, -0.019256591796875, 0.01373291015625, -0.0024318695068359375, 0.045989990234375, 0.01506805419921875, -0.07440185546875, -0.01513671875, -0.01172637939453125, -0.0251312255859375, 0.00798797607421875, 0.0307769775390625, -0.0035495758056640625, 0.00501251220703125, 0.0396728515625, 0.01183319091796875, 0.0097198486328125, -0.0210723876953125, -0.01285552978515625, -0.0237884521484375, 0.0478515625, 0.00504302978515625, -0.046112060546875, -0.0159149169921875, -0.0223541259765625, 0.01056671142578125, 0.0221710205078125, 0.02606201171875, 0.021026611328125, 0.0276031494140625, -0.0015926361083984375, 0.01172637939453125, -0.034149169921875, -0.021209716796875, 0.035736083984375, -0.033905029296875, -0.0255584716796875, 0.00907135009765625, -0.06842041015625, 0.08489990234375, -0.0192413330078125, 0.053009033203125, 0.07635498046875, -0.0379638671875, -0.0108184814453125, 0.0165557861328125, -0.0100860595703125, -0.0265960693359375, -0.043609619140625, 0.0277099609375, 0.0343017578125, -0.0164642333984375, -0.005947113037109375, -0.01496124267578125, 0.054931640625, -0.049652099609375, -0.044219970703125, -0.00685882568359375, -0.06512451171875, -0.052154541015625, 0.01450347900390625, 0.02606201171875, -0.017242431640625, -0.0132598876953125, -0.012237548828125, 0.013397216796875, 0.0109405517578125, 0.0008716583251953125, 0.005565643310546875, 0.019256591796875, 0.04083251953125, 0.05426025390625, 0.0352783203125, -0.0110931396484375, -0.000164031982421875, 0.0506591796875, -0.0205841064453125, 0.020294189453125, -0.048919677734375, -0.036956787109375, -0.048919677734375, 0.006443023681640625, 0.00659942626953125, 0.0026378631591796875, -0.044403076171875, 0.003936767578125, 0.00244140625, 0.0246429443359375, -0.03302001953125, -0.00013554096221923828, -0.01160430908203125, -0.0631103515625, 0.04388427734375, -0.02069091796875, 0.0167388916015625, 0.0056304931640625, 0.02862548828125, -0.03839111328125, 0.059478759765625, -0.00885772705078125, -0.051666259765625, 0.044921875, 0.005435943603515625, 0.057159423828125, -0.030426025390625, -0.0171051025390625, -0.04052734375, 0.0022678375244140625, -0.0026798248291015625, -0.026092529296875, -0.0323486328125, 0.0269775390625, -0.00763702392578125, 0.01226806640625, 0.0042266845703125, -0.0161285400390625, 0.0084991455078125, 0.0160064697265625, 0.0003910064697265625, 0.0014276504516601562, 0.016510009765625, -0.0361328125, -0.10089111328125, 0.07135009765625, -0.0210723876953125, -0.035003662109375, -0.039764404296875, 0.02838134765625, 0.0068817138671875, -0.039581298828125, -0.036590576171875, 0.01432037353515625, -0.005992889404296875, 0.03515625, 0.0281219482421875, -0.0260467529296875, 0.0340576171875, 0.046051025390625, -0.0628662109375, 0.027191162109375, -0.005985260009765625, 0.00217437744140625, 0.0030269622802734375, 0.0195465087890625, 0.007556915283203125, 0.03375244140625, -0.03900146484375, 0.0253448486328125, -0.0184326171875, 0.03082275390625, 0.032135009765625, -0.0236663818359375, 0.036712646484375, 0.01149749755859375, -0.017913818359375, -0.0234832763671875, -0.01247406005859375, -0.01047515869140625, -0.037078857421875, -0.060638427734375, -0.016876220703125, -0.00696563720703125, 0.01293182373046875, -0.061279296875, 0.0096435546875, 0.0242462158203125, -0.0086517333984375, -0.042938232421875, 0.02032470703125, -0.039581298828125, -0.014068603515625, 0.00299072265625, 0.0041351318359375, -0.0077362060546875, -0.00627899169921875, 0.055206298828125, -0.04345703125, -0.006229400634765625, 0.00817108154296875, 0.0169677734375, 0.0201263427734375, 0.01389312744140625, 0.0433349609375, 0.03167724609375, -0.046966552734375, -0.0268707275390625, 0.0254058837890625, 0.00638580322265625, -0.00018286705017089844, -0.054931640625, 0.0078582763671875, 0.01165771484375, -0.0036106109619140625, 0.01096343994140625, -0.00433349609375, 0.0016841888427734375, -0.006427764892578125, 0.002864837646484375, 0.0253753662109375, 0.032440185546875, 0.0126953125, 0.0235595703125, 0.0143890380859375, -0.04815673828125, 0.026397705078125, -0.04461669921875, 0.00033164024353027344, -0.014129638671875, 0.0232391357421875, -0.042022705078125, 0.032073974609375, -0.04315185546875, 0.01055908203125, 0.0221405029296875 ]
6c29a6a69c786d3e5275b0fceae039a1b7bb8f85
Wordpress Stackexchange Q: Taxonomy: Why 'with_front' => false DOES NOT WORK? Seriously, why 'with_front' => false does not work as it should be? It is supposed to remove TAXONOMY BASE NAME and my question is why it does not work? I just dont want the taxonamy base slug appear in my URL and codex says 'with_front' => false should help but it does not. Leaving the slug empty like 'slug'=> '' generates 404 error. register_taxonomy("tax_categories", array("products"), array( "hierarchical" => true, "label" => "Categories", "singular_label" => "Category", "show_ui" => true, 'update_count_callback' => '_update_post_term_count', "rewrite" => array( 'with_front' => false, 'hierarchical' => true ) )); This issue supposed to be fixed http://core.trac.wordpress.org/ticket/16807 Please help to understand that. Thank you. A: Use the code below: 'rewrite' => array( 'slug' => '.', 'with_front' => false ), Notice that when you rewrite the slug that the default page template is opened, when you go to the taxonomy page.
Q: Taxonomy: Why 'with_front' => false DOES NOT WORK? Seriously, why 'with_front' => false does not work as it should be? It is supposed to remove TAXONOMY BASE NAME and my question is why it does not work? I just dont want the taxonamy base slug appear in my URL and codex says 'with_front' => false should help but it does not. Leaving the slug empty like 'slug'=> '' generates 404 error. register_taxonomy("tax_categories", array("products"), array( "hierarchical" => true, "label" => "Categories", "singular_label" => "Category", "show_ui" => true, 'update_count_callback' => '_update_post_term_count', "rewrite" => array( 'with_front' => false, 'hierarchical' => true ) )); This issue supposed to be fixed http://core.trac.wordpress.org/ticket/16807 Please help to understand that. Thank you. A: Use the code below: 'rewrite' => array( 'slug' => '.', 'with_front' => false ), Notice that when you rewrite the slug that the default page template is opened, when you go to the taxonomy page. A: All with_front does is toggle whether or not a taxonomy link can have something else in front of it ie extra permalink stuff from the permalinks options page. For example with_front set to true makes this possible: blah.com/2011/09/tax/term with it set to false, all you can do is: blah.com/tax/term A: To remove the taxonomy base name, you can use: 'rewrite' => ['slug' => '/', 'with_front' => false] However, this will make your (basic post type) posts go 404, if you have permalinks set to http://example.com/sample-post/. It seems you cannot have both custom taxonomy and posts reside in the root. Therefore you would go to Permalinks settings and set Custom structure , e.g. /blog/%postname%/. One more note A side effect is that your CPTs would have this "front", too, e.g. blog/products. This is where 'with_front' => false comes to play. It's designed to get you rid of the custom structure start. So in your product type registration, you would have: register_post_type( 'products', array( 'rewrite' => array( 'slug' => 'products', 'with_front' => false ), /* ... */ ));
wordpress
{ "language": "en", "length": 328, "provenance": "stackexchange_00019.jsonl.gz:412950", "question_score": "12", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28168" }
[ 0.01554107666015625, 0.0166015625, -0.0288543701171875, -0.0648193359375, 0.03179931640625, -0.004055023193359375, -0.01140594482421875, 0.0028896331787109375, 0.03179931640625, 0.003925323486328125, -0.00435638427734375, -0.0276336669921875, 0.0029315948486328125, -0.043853759765625, -0.0166015625, -0.018035888671875, -0.00920867919921875, -0.0209197998046875, -0.0145721435546875, -0.027587890625, 0.01190948486328125, -0.027984619140625, 0.0027980804443359375, -0.0213165283203125, 0.04364013671875, -0.07049560546875, 0.03466796875, -0.041961669921875, 0.018951416015625, -0.060516357421875, 0.017608642578125, 0.051025390625, 0.011016845703125, 0.033843994140625, -0.02423095703125, 0.000942230224609375, -0.007312774658203125, 0.0218353271484375, -0.0020580291748046875, 0.0308837890625, 0.0137786865234375, -0.006076812744140625, -0.0100555419921875, 0.026885986328125, -0.00516510009765625, -0.06610107421875, 0.029449462890625, -0.033233642578125, -0.0149383544921875, 0.01335906982421875, 0.00290679931640625, 0.028045654296875, 0.018707275390625, 0.001163482666015625, 0.0122222900390625, 0.0008096694946289062, -0.0278778076171875, -0.0229644775390625, -0.007778167724609375, 0.0338134765625, 0.0267333984375, 0.0196380615234375, 0.00021564960479736328, -0.017181396484375, 0.0108795166015625, 0.00731658935546875, -0.02984619140625, 0.0218505859375, -0.04351806640625, 0.0210418701171875, 0.02447509765625, -0.07379150390625, -0.001667022705078125, 0.0280609130859375, -0.056915283203125, -0.0648193359375, 0.036224365234375, -0.02447509765625, 0.01274871826171875, 0.021087646484375, 0.007068634033203125, -0.00133514404296875, -0.04730224609375, 0.0189056396484375, 0.00390625, 0.052215576171875, -0.01050567626953125, -0.0225372314453125, -0.0247650146484375, -0.03076171875, -0.0079345703125, -0.0380859375, -0.049468994140625, 0.0177154541015625, 0.0050201416015625, -0.02862548828125, 0.052947998046875, 0.078857421875, -0.01071929931640625, -0.01543426513671875, -0.00511932373046875, -0.04443359375, -0.0325927734375, -0.033966064453125, 0.0199737548828125, 0.04132080078125, 0.0002372264862060547, 0.006927490234375, 0.046600341796875, -0.001422882080078125, -0.00628662109375, 0.047882080078125, -0.025543212890625, -0.024749755859375, -0.00032210350036621094, 0.028106689453125, -0.03802490234375, 0.018157958984375, -0.002048492431640625, 0.02899169921875, -0.0007166862487792969, 0.03466796875, 0.017822265625, -0.0024242401123046875, 0.0020542144775390625, 0.03326416015625, 0.005523681640625, -0.0733642578125, 0.0618896484375, 0.038665771484375, -0.042236328125, -0.0119171142578125, 0.0533447265625, -0.010101318359375, 0.00518035888671875, -0.02911376953125, -0.0252838134765625, -0.013885498046875, -0.0231781005859375, 0.00588226318359375, -0.0015001296997070312, -0.031890869140625, 0.01493072509765625, -0.0068206787109375, -0.0028934478759765625, -0.0201873779296875, 0.01221466064453125, 0.037200927734375, -0.01261138916015625, 0.0019397735595703125, 0.0186767578125, -0.0253143310546875, 0.0758056640625, -0.00530242919921875, -0.07135009765625, -0.018096923828125, 0.00914764404296875, -0.0180206298828125, -0.055816650390625, -0.0751953125, -0.00007784366607666016, -0.0276947021484375, 0.0007467269897460938, -0.058074951171875, -0.06866455078125, 0.048095703125, -0.067138671875, -0.01971435546875, 0.018157958984375, -0.00879669189453125, 0.06597900390625, 0.01311492919921875, -0.038787841796875, 0.0007796287536621094, 0.013641357421875, -0.02044677734375, 0.0213775634765625, 0.02984619140625, 0.0158538818359375, 0.042144775390625, -0.005496978759765625, -0.047607421875, 0.024993896484375, -0.033905029296875, -0.06927490234375, 0.0109710693359375, 0.0147552490234375, 0.0550537109375, 0.00458526611328125, 0.0191650390625, 0.060882568359375, 0.0117645263671875, -0.037506103515625, -0.0022296905517578125, 0.0128936767578125, -0.00037026405334472656, -0.0259246826171875, 0.0013685226440429688, -0.01029205322265625, -0.009857177734375, 0.004268646240234375, 0.03564453125, -0.02618408203125, -0.01552581787109375, -0.04266357421875, -0.0055389404296875, -0.0154571533203125, 0.045806884765625, -0.04150390625, 0.03826904296875, 0.047393798828125, 0.03961181640625, -0.06939697265625, 0.02532958984375, -0.01105499267578125, -0.0254669189453125, 0.0199737548828125, -0.0032501220703125, -0.0020503997802734375, 0.0246429443359375, -0.00047087669372558594, -0.00030303001403808594, -0.005870819091796875, 0.01114654541015625, 0.020721435546875, -0.0027027130126953125, -0.008331298828125, -0.017730712890625, -0.0213623046875, 0.0084991455078125, -0.05120849609375, 0.026763916015625, 0.0491943359375, -0.01268768310546875, -0.0458984375, 0.03265380859375, 0.007381439208984375, -0.05291748046875, -0.033660888671875, 0.054107666015625, 0.0157318115234375, 0.033477783203125, -0.053497314453125, -0.0266571044921875, 0.036529541015625, -0.049652099609375, -0.038330078125, 0.0160980224609375, -0.013092041015625, -0.01178741455078125, 0.0154876708984375, 0.0086669921875, 0.030487060546875, -0.034088134765625, 0.001834869384765625, 0.029510498046875, -0.00589752197265625, -0.0170745849609375, 0.02069091796875, -0.0024242401123046875, 0.0166168212890625, -0.0305938720703125, -0.03363037109375, 0.0018777847290039062, -0.025634765625, 0.00457000732421875, -0.011993408203125, -0.00865936279296875, -0.0106048583984375, 0.0027370452880859375, 0.039764404296875, -0.005046844482421875, -0.0099029541015625, 0.059417724609375, 0.04425048828125, -0.039825439453125, -0.0321044921875, 0.0033416748046875, -0.0186614990234375, 0.01474761962890625, -0.01428985595703125, 0.004169464111328125, 0.0140838623046875, -0.00047969818115234375, -0.01078033447265625, -0.053985595703125, 0.0249176025390625, 0.0197296142578125, -0.007472991943359375, -0.031585693359375, -0.01490020751953125, 0.07098388671875, -0.017578125, 0.04486083984375, 0.004337310791015625, -0.001178741455078125, -0.0196685791015625, 0.00632476806640625, 0.00901031494140625, -0.00848388671875, 0.0205841064453125, 0.037506103515625, 0.019989013671875, -0.013702392578125, 0.024139404296875, -0.0194854736328125, 0.01256561279296875, 0.01486968994140625, -0.0077056884765625, -0.004360198974609375, -0.048095703125, 0.0162200927734375, 0.027862548828125, 0.052734375, -0.00940704345703125, -0.0452880859375, 0.007568359375, 0.031280517578125, -0.0309295654296875, -0.024169921875, -0.0018405914306640625, 0.005802154541015625, -0.01352691650390625, 0.0206756591796875, 0.0068359375, -0.0107421875, 0.033843994140625, -0.0048980712890625, 0.06103515625, -0.04241943359375, -0.05908203125, -0.050384521484375, -0.08807373046875, -0.046905517578125, 0.0149078369140625, 0.002040863037109375, 0.0031490325927734375, 0.0648193359375, 0.0197906494140625, -0.0195159912109375, 0.04168701171875, 0.03204345703125, -0.010284423828125, 0.0204620361328125, 0.0121002197265625, -0.0061798095703125, 0.01152801513671875, 0.00445556640625, -0.0112762451171875, 0.0304718017578125, -0.0198822021484375, -0.022064208984375, -0.01137542724609375, -0.035919189453125, -0.006458282470703125, 0.04339599609375, 0.0156402587890625, -0.025543212890625, 0.0196533203125, -0.04718017578125, -0.044158935546875, 0.018707275390625, -0.03997802734375, 0.01061248779296875, 0.0144500732421875, -0.00885009765625, -0.0011949539184570312, 0.0177154541015625, 0.017547607421875, 0.0321044921875, 0.02581787109375, -0.01837158203125, 0.0266571044921875, -0.00885009765625, -0.0152587890625, -0.045501708984375, 0.040496826171875, 0.0013532638549804688, -0.02001953125, 0.00839996337890625, 0.0174560546875, -0.013153076171875, 0.0255279541015625, -0.038665771484375, -0.04864501953125, 0.0203399658203125, -0.060455322265625, -0.0207061767578125, -0.027679443359375, 0.01219940185546875, -0.005702972412109375, 0.03271484375, -0.01568603515625, -0.00820159912109375, -0.0195159912109375, -0.00792694091796875, 0.02838134765625, -0.02850341796875, -0.01824951171875, -0.017852783203125, -0.03759765625, 0.0011129379272460938, -0.002033233642578125, -0.0282135009765625, -0.0075225830078125, -0.033905029296875, -0.0164947509765625, -0.0246734619140625, 0.04376220703125, -0.03173828125, -0.010009765625, 0.018890380859375, -0.0087432861328125, -0.013519287109375, -0.02947998046875, -0.01216888427734375, -0.0706787109375, -0.01081085205078125, 0.02740478515625, 0.032928466796875, -0.038818359375, 0.048004150390625, -0.027069091796875, 0.059051513671875, 0.0258636474609375, 0.0026607513427734375, 0.0126190185546875, -0.0172271728515625, 0.006195068359375, 0.004932403564453125, -0.01456451416015625, -0.00217437744140625, 0.007556915283203125, 0.0189208984375, -0.022369384765625, 0.02923583984375, -0.015380859375, 0.0007085800170898438, 0.04144287109375, -0.04388427734375, -0.031402587890625, -0.0284423828125, -0.017181396484375, -0.0205230712890625, 0.01416015625, -0.0249176025390625, -0.030487060546875, -0.01122283935546875, 0.005344390869140625, -0.0069122314453125, -0.0268096923828125, 0.0308685302734375, 0.049713134765625, 0.019866943359375, -0.0150604248046875, -0.0364990234375, -0.0152740478515625, 0.0278167724609375, -0.0049896240234375, 0.014251708984375, 0.0002040863037109375, -0.0214080810546875, 0.04376220703125, -0.00982666015625, -0.0005984306335449219, -0.0310821533203125, 0.046630859375, 0.002899169921875, -0.0289154052734375, 0.033843994140625, -0.020233154296875, 0.04815673828125, 0.033782958984375, -0.006145477294921875, 0.003345489501953125, -0.0253143310546875, 0.0187225341796875, 0.0277557373046875, -0.0191802978515625, -0.04888916015625, -0.038299560546875, 0.027069091796875, -0.013641357421875, 0.0123291015625, -0.0020999908447265625, 0.004474639892578125, -0.020660400390625, -0.0260162353515625, 0.018218994140625, -0.034912109375, -0.003810882568359375, -0.049407958984375, 0.0181732177734375, 0.0013179779052734375, -0.005828857421875, -0.01117706298828125, 0.007694244384765625, 0.0181121826171875, -0.0241851806640625, -0.04205322265625, -0.0556640625, 0.0085601806640625, 0.0007348060607910156, 0.03448486328125, 0.0065765380859375, 0.05377197265625, 0.001239776611328125, -0.00817108154296875, -0.01169586181640625, -0.03826904296875, -0.005584716796875, -0.042938232421875, 0.0273590087890625, 0.0218048095703125, -0.022674560546875, -0.00875091552734375, 0.0129241943359375, 0.033355712890625, -0.0199127197265625, -0.01486968994140625, -0.005466461181640625, -0.01483154296875, 0.03424072265625, 0.01506805419921875, -0.034210205078125, 0.0377197265625, 0.00502777099609375, 0.036895751953125, -0.047088623046875, -0.0128936767578125, 0.057281494140625, 0.026580810546875, -0.046539306640625, -0.039276123046875, 0.0108184814453125, 0.00891876220703125, -0.00885009765625, 0.020599365234375, -0.0357666015625, -0.0401611328125, -0.029754638671875, 0.004749298095703125, 0.05084228515625, -0.035400390625, 0.0138092041015625, 0.013763427734375, 0.00628662109375, 0.0199432373046875, 0.00782012939453125, -0.0015802383422851562, -0.0128936767578125, -0.002025604248046875, 0.0278167724609375, 0.0037689208984375, 0.008392333984375, -0.004116058349609375, -0.0104217529296875, -0.0244598388671875, -0.0166473388671875, 0.05108642578125, 0.01157379150390625, 0.06732177734375, -0.0166778564453125, -0.0545654296875, 0.0418701171875, -0.01219940185546875, 0.073486328125, 0.0291900634765625, -0.060699462890625, 0.045257568359375, -0.05511474609375, 0.0173492431640625, -0.01401519775390625, -0.056121826171875, -0.025390625, -0.035552978515625, -0.0006055831909179688, 0.017791748046875, 0.0031871795654296875, -0.013092041015625, -0.0251922607421875, 0.0010433197021484375, 0.0152587890625, 0.04156494140625, -0.01129150390625, 0.0131683349609375, -0.01418304443359375, 0.0033893585205078125, -0.016937255859375, -0.0309906005859375, -0.037261962890625, 0.01464080810546875, -0.0201873779296875, -0.10028076171875, -0.005458831787109375, 0.0305328369140625, -0.05322265625, 0.060394287109375, 0.04931640625, 0.0221099853515625, 0.01812744140625, 0.007049560546875, -0.003223419189453125, -0.005390167236328125, 0.0190277099609375, 0.0042877197265625, 0.0283203125, 0.029296875, 0.00720977783203125, 0.0281982421875, -0.0172119140625, -0.015380859375, -0.004688262939453125, -0.0099945068359375, 0.0188446044921875, 0.0020008087158203125, -0.04052734375, 0.0163726806640625, 0.032257080078125, 0.038055419921875, 0.05145263671875, 0.0131988525390625, 0.03948974609375, -0.0012979507446289062, 0.0188140869140625, -0.04364013671875, 0.0025634765625, 0.03155517578125, 0.01177978515625, 0.01465606689453125, 0.03155517578125, -0.0028438568115234375, 0.00611114501953125, 0.05657958984375, 0.0478515625, -0.06488037109375, -0.00365447998046875, 0.02227783203125, -0.00910186767578125, 0.00054931640625, 0.0283050537109375, 0.00018918514251708984, 0.020477294921875, -0.01617431640625, 0.0001380443572998047, 0.004062652587890625, 0.030120849609375, 0.03533935546875, -0.016693115234375, 0.015228271484375, 0.034423828125, 0.0214385986328125, -0.004360198974609375, -0.0012750625610351562, 0.00266265869140625, 0.035308837890625, -0.01494598388671875, 0.0089111328125, -0.01123046875, -0.044189453125, -0.048583984375, 0.000995635986328125, -0.0141448974609375, 0.01023101806640625, 0.07110595703125, -0.01320648193359375, -0.02679443359375, 0.0026531219482421875, -0.034149169921875, 0.048675537109375, -0.053558349609375, -0.026702880859375, 0.0015115737915039062, 0.00862884521484375, 0.03131103515625, -0.01399993896484375, -0.01922607421875, 0.004314422607421875, -0.04010009765625, -0.0231475830078125, -0.037872314453125, -0.09564208984375, 0.07952880859375, -0.036956787109375, -0.005767822265625, -0.004802703857421875, 0.04595947265625, 0.00910186767578125, 0.01384735107421875, 0.03662109375, -0.031341552734375, -0.0152130126953125, 0.0172119140625, -0.0343017578125, -0.0259857177734375, -0.0200347900390625, -0.09796142578125, 0.13427734375, -0.030670166015625, 0.052001953125, -0.0391845703125, 0.05523681640625, 0.0175323486328125, 0.045074462890625, -0.016448974609375, 0.04010009765625, -0.00521087646484375, 0.018402099609375, -0.0129241943359375, 0.01165008544921875, -0.003997802734375, 0.004573822021484375, 0.064697265625, 0.009246826171875, -0.0219573974609375, 0.007404327392578125, 0.0733642578125, 0.0196990966796875, -0.01763916015625, 0.031494140625, -0.011810302734375, -0.00774383544921875, -0.011627197265625, -0.0269775390625, 0.013916015625, -0.0219573974609375, -0.03656005859375, 0.0186614990234375, 0.0185546875, 0.041595458984375, 0.02960205078125, 0.0157470703125, -0.021392822265625, 0.007045745849609375, 0.04046630859375, -0.05047607421875, -0.00653076171875, 0.01290130615234375, 0.0107421875, -0.0244598388671875, 0.0267181396484375, -0.02874755859375, 0.053466796875, -0.0089569091796875, 0.0009570121765136719, 0.005672454833984375, -0.004093170166015625, 0.08349609375, -0.0511474609375, -0.026214599609375, 0.00673675537109375, 0.00215911865234375, 0.010345458984375, 0.0172271728515625, 0.0263214111328125, -0.0234832763671875, 0.0032501220703125, 0.046783447265625, 0.0423583984375, -0.03497314453125, -0.034637451171875, 0.0010747909545898438, 0.0017595291137695312, -0.001953125, 0.01520538330078125, 0.0035915374755859375, 0.03680419921875, 0.05999755859375, -0.05572509765625, 0.01702880859375, 0.0284271240234375, 0.041473388671875, -0.028961181640625, -0.037139892578125, -0.04327392578125, -0.006610870361328125, -0.08551025390625, 0.024322509765625, 0.0194244384765625, 0.10986328125, 0.02545166015625, 0.051513671875, -0.056243896484375, -0.05792236328125, -0.0184326171875, 0.02679443359375, -0.0084228515625, 0.00983428955078125, -0.0122222900390625, -0.0204620361328125, -0.005123138427734375, 0.0173492431640625, 0.0249786376953125, 0.0379638671875, 0.0262298583984375, 0.0277252197265625, 0.045166015625, 0.01296234130859375, 0.05169677734375, -0.00518798828125, 0.00981903076171875, -0.02874755859375, 0.005207061767578125, 0.029205322265625, -0.0007772445678710938, -0.01312255859375, -0.00505828857421875, 0.0621337890625, -0.0267791748046875, 0.03668212890625, -0.008209228515625, -0.00345611572265625, 0.0416259765625, 0.005420684814453125, 0.054290771484375, 0.01384735107421875, -0.036529541015625, 0.0091094970703125, -0.046783447265625, -0.0718994140625, 0.0213165283203125, 0.03912353515625, -0.0247650146484375, 0.0185546875, -0.0229034423828125, -0.004062652587890625, 0.0034503936767578125, -0.0272064208984375, 0.034759521484375, 0.01416015625, -0.034210205078125, 0.01168060302734375, 0.0281982421875, 0.030670166015625, 0.044158935546875, -0.0038433074951171875, -0.03448486328125, 0.1524658203125, -0.053497314453125, -0.032623291015625, -0.003265380859375, 0.0057525634765625, -0.0056610107421875, -0.0247650146484375, 0.0036487579345703125, 0.0102386474609375, 0.0109100341796875, 0.0032253265380859375, -0.07012939453125, -0.0083160400390625, 0.056640625, -0.03826904296875, 0.0187225341796875, -0.0168609619140625, 0.015960693359375, -0.040008544921875, -0.01143646240234375, -0.0184173583984375, -0.060760498046875, -0.051483154296875, 0.0308837890625, 0.005573272705078125, 0.0261993408203125, -0.052825927734375, 0.0148773193359375, 0.01116943359375, -0.05224609375, 0.0282440185546875, -0.058746337890625, 0.035400390625, 0.0277557373046875, 0.028045654296875, 0.012451171875, 0.0152130126953125, -0.0206451416015625, 0.0234527587890625, 0.00189208984375, 0.013671875, 0.0170440673828125, -0.024444580078125, 0.01113128662109375, 0.0081939697265625, 0.0063018798828125, -0.03997802734375, -0.006137847900390625, 0.0309600830078125, -0.0091400146484375, 0.0037555694580078125, -0.0157928466796875, -0.0042877197265625, -0.036346435546875, -0.031646728515625, 0.0072784423828125, -0.0445556640625, -0.022735595703125, -0.01558685302734375, 0.0272979736328125, 0.041259765625, 0.003284454345703125, -0.054656982421875, 0.00466156005859375, -0.0306396484375, 0.07086181640625, -0.013092041015625, 0.01503753662109375, 0.0025920867919921875, -0.00865936279296875, -0.033111572265625, 0.05487060546875, -0.036468505859375, -0.0360107421875, 0.0300140380859375, -0.00026345252990722656, 0.0013856887817382812, -0.0105438232421875, 0.0268707275390625, -0.04901123046875, -0.0016813278198242188, -0.0048675537109375, 0.01934814453125, -0.01540374755859375, 0.0162506103515625, -0.00005632638931274414, -0.0272674560546875, -0.03997802734375, 0.004795074462890625, -0.043670654296875, -0.0285797119140625, -0.036163330078125, -0.03131103515625, -0.0504150390625, -0.0634765625, -0.048736572265625, 0.03875732421875, -0.00395965576171875, -0.0184783935546875, -0.03857421875, -0.037384033203125, -0.0079803466796875, 0.04583740234375, -0.00984954833984375, -0.0113525390625, -0.055572509765625, 0.0240936279296875, 0.004669189453125, 0.06964111328125, -0.000293731689453125, -0.00580596923828125, 0.003971099853515625, 0.027099609375, 0.003910064697265625, 0.02801513671875, -0.0228118896484375, 0.02215576171875, -0.00679779052734375, 0.019195556640625, -0.0189208984375, 0.045806884765625, 0.0130767822265625, 0.013031005859375, -0.01407623291015625, -0.03350830078125, 0.01029205322265625, -0.0231170654296875, 0.060546875, -0.030670166015625, 0.003681182861328125, -0.00368499755859375, -0.10113525390625, -0.06640625, 0.0033416748046875, 0.0211639404296875, 0.039215087890625, -0.09710693359375, 0.04827880859375, 0.036651611328125, -0.0211334228515625, -0.0173797607421875, -0.0300140380859375, -0.04058837890625, -0.00009757280349731445, -0.0142822265625, 0.031158447265625, -0.00946807861328125, 0.031494140625, -0.00975799560546875, -0.01922607421875, -0.053436279296875, -0.01580810546875, 0.0066986083984375, -0.052093505859375, -0.03753662109375, -0.038604736328125, 0.00714111328125, 0.0302886962890625, 0.0098419189453125, 0.019866943359375, 0.01192474365234375, 0.029632568359375, 0.0249786376953125, 0.00771331787109375, 0.0231781005859375, -0.0226593017578125, 0.01412200927734375, 0.01290130615234375, 0.06402587890625, -0.004955291748046875, 0.077880859375, -0.004573822021484375, 0.001415252685546875, -0.0076751708984375, 0.037261962890625, -0.0179901123046875, -0.00017464160919189453, 0.0306243896484375, -0.03717041015625, 0.0088958740234375, 0.0037841796875, 0.0189056396484375, -0.037841796875, 0.025787353515625, -0.04449462890625, 0.01488494873046875, 0.0244903564453125 ]
b05b720997052aa0204921cec72d92503f69cf4a
Wordpress Stackexchange Q: .htaccess and 500 error, extra character added I am having a weird problem. Every few days I go to my website and get an "Internal Server Error" - Or 500 error. I go into the .htaccess file of the site and notice it's been altered. One character is added at the end of the file. It's easy to fix and continue on, but it keeps happening. htaccess permissions are 644 and the error logs don't say anything about this so I don't know where to start. Anybody have an idea as to what's going on or point me to some information on this issue? here is the "altered" htaccess code: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index-php [L] </IfModule> # END WordPress s <---See This?! A: Assuming you're on Linux, if you go to your wp-content/plugins folder and run grep -R 'htaccess' * it should let you know if any plugins are addressing that file by name
Q: .htaccess and 500 error, extra character added I am having a weird problem. Every few days I go to my website and get an "Internal Server Error" - Or 500 error. I go into the .htaccess file of the site and notice it's been altered. One character is added at the end of the file. It's easy to fix and continue on, but it keeps happening. htaccess permissions are 644 and the error logs don't say anything about this so I don't know where to start. Anybody have an idea as to what's going on or point me to some information on this issue? here is the "altered" htaccess code: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index-php [L] </IfModule> # END WordPress s <---See This?! A: Assuming you're on Linux, if you go to your wp-content/plugins folder and run grep -R 'htaccess' * it should let you know if any plugins are addressing that file by name A: weird ... * *is the site auto updated somehow, via FTP, SVN, RSYNC, etc.? *even though the permissions are 644, it might still be writable by the php user, can you change to a different user? *perhaps its a plugin that is inadvertently adding the stray character. A: I have seen this before, and it turned out to be a theme that was adding to the .htaccess file. Did you recently update WordPress, a theme, or a plugin? Try changing your theme to the default Twenty Eleven theme, fix the .htaccess file, reload your site a couple of times, then check your .htaccess file again.
wordpress
{ "language": "en", "length": 275, "provenance": "stackexchange_00019.jsonl.gz:412960", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28202" }
[ 0.05767822265625, -0.013885498046875, -0.0188140869140625, -0.042388916015625, 0.00318145751953125, -0.0274658203125, 0.035369873046875, 0.0032806396484375, -0.00989532470703125, 0.03814697265625, -0.0295562744140625, 0.03948974609375, 0.044525146484375, -0.005115509033203125, 0.04669189453125, 0.01727294921875, -0.004047393798828125, 0.01445770263671875, 0.0308380126953125, -0.0164642333984375, 0.01561737060546875, -0.01050567626953125, -0.01342010498046875, 0.0059814453125, -0.0275421142578125, 0.014373779296875, 0.12066650390625, -0.044219970703125, -0.0015058517456054688, -0.042877197265625, 0.01042938232421875, 0.0379638671875, 0.0340576171875, 0.0297698974609375, -0.060699462890625, -0.0050811767578125, 0.004638671875, 0.0010766983032226562, -0.0119476318359375, 0.03826904296875, -0.004077911376953125, 0.00012230873107910156, 0.093505859375, -0.018035888671875, 0.02752685546875, -0.019561767578125, 0.00897216796875, -0.05633544921875, 0.0161590576171875, -0.01519775390625, 0.0016765594482421875, -0.0113372802734375, 0.032470703125, -0.027587890625, -0.041961669921875, -0.038543701171875, 0.0140533447265625, 0.040008544921875, 0.0096588134765625, 0.00004017353057861328, -0.0225982666015625, 0.033203125, 0.004825592041015625, 0.0049591064453125, -0.018035888671875, -0.01166534423828125, 0.0419921875, 0.0082855224609375, -0.0003638267517089844, -0.0204315185546875, 0.032440185546875, 0.01849365234375, 0.0081939697265625, -0.027099609375, -0.010406494140625, -0.0023937225341796875, 0.02447509765625, -0.00530242919921875, -0.0038852691650390625, 0.00200653076171875, 0.01953125, 0.0162200927734375, 0.002410888671875, -0.005741119384765625, -0.0198822021484375, -0.0033550262451171875, -0.016998291015625, -0.0205078125, -0.024261474609375, -0.003940582275390625, -0.038604736328125, -0.044097900390625, 0.0026416778564453125, 0.0265350341796875, -0.01824951171875, 0.025909423828125, 0.02716064453125, 0.015625, -0.011993408203125, -0.0016937255859375, 0.02032470703125, -0.056488037109375, 0.0701904296875, -0.0309906005859375, 0.0009737014770507812, -0.007778167724609375, 0.0194244384765625, 0.026031494140625, 0.03729248046875, 0.0271759033203125, -0.011138916015625, 0.0540771484375, -0.018463134765625, -0.0248870849609375, -0.01491546630859375, 0.0672607421875, -0.004291534423828125, -0.00591278076171875, -0.004268646240234375, 0.0294952392578125, -0.0232086181640625, 0.01568603515625, -0.035308837890625, -0.0169525146484375, -0.0200653076171875, -0.03460693359375, 0.01032257080078125, 0.01413726806640625, 0.01806640625, -0.0012121200561523438, -0.043487548828125, 0.0270233154296875, 0.034088134765625, 0.00004404783248901367, -0.0180816650390625, -0.01549530029296875, 0.06781005859375, -0.004550933837890625, -0.008148193359375, 0.024932861328125, -0.0260772705078125, -0.009429931640625, 0.0225677490234375, -0.03558349609375, -0.0099639892578125, 0.019073486328125, 0.0275421142578125, 0.0306396484375, -0.01708984375, -0.063720703125, 0.01702880859375, -0.01282501220703125, 0.06964111328125, 0.0022029876708984375, -0.05084228515625, -0.053314208984375, 0.0276947021484375, -0.045562744140625, -0.021575927734375, -0.05560302734375, -0.00762176513671875, -0.0196380615234375, 0.028900146484375, -0.02301025390625, -0.0207061767578125, 0.023193359375, -0.053680419921875, -0.005321502685546875, 0.0272369384765625, 0.01248931884765625, -0.0202789306640625, -0.036590576171875, -0.00791168212890625, -0.004833221435546875, -0.020751953125, 0.040618896484375, -0.007045745849609375, 0.0377197265625, -0.01398468017578125, 0.0855712890625, 0.055511474609375, -0.0263519287109375, 0.012115478515625, 0.030517578125, -0.054962158203125, 0.039215087890625, 0.003936767578125, 0.04669189453125, -0.00276947021484375, -0.00533294677734375, 0.048004150390625, 0.01293182373046875, -0.0172882080078125, -0.0034770965576171875, -0.017364501953125, -0.01090240478515625, -0.003936767578125, 0.0024471282958984375, -0.011138916015625, 0.01953125, -0.005344390869140625, 0.056365966796875, -0.055145263671875, -0.02935791015625, -0.05810546875, -0.00799560546875, -0.01641845703125, 0.043365478515625, 0.0086517333984375, 0.0203704833984375, 0.00807952880859375, 0.005458831787109375, -0.031890869140625, 0.00429534912109375, -0.00919342041015625, 0.034912109375, -0.02972412109375, 0.06414794921875, 0.02459716796875, 0.058502197265625, 0.00914764404296875, -0.009552001953125, 0.0183258056640625, -0.050140380859375, 0.01145172119140625, -0.0229949951171875, -0.026702880859375, -0.01279449462890625, -0.026031494140625, 0.00506591796875, -0.05340576171875, 0.0269775390625, 0.0260467529296875, 0.0200347900390625, -0.037109375, -0.0186004638671875, -0.045166015625, -0.060211181640625, -0.0022487640380859375, 0.053680419921875, 0.04974365234375, 0.0157623291015625, 0.004390716552734375, 0.00984954833984375, -0.01358795166015625, -0.03515625, 0.0360107421875, -0.0189971923828125, 0.032318115234375, 0.01331329345703125, 0.017120361328125, -0.038970947265625, 0.037841796875, -0.00507354736328125, 0.0203399658203125, 0.03228759765625, -0.0390625, -0.026580810546875, -0.0347900390625, 0.00719451904296875, 0.03118896484375, -0.03936767578125, -0.032073974609375, -0.004878997802734375, 0.01385498046875, 0.0177154541015625, 0.02044677734375, 0.0204315185546875, -0.005832672119140625, 0.0085601806640625, 0.0031452178955078125, -0.034698486328125, 0.008453369140625, 0.027923583984375, 0.013031005859375, 0.003833770751953125, -0.0193023681640625, 0.0093994140625, -0.0034275054931640625, 0.00850677490234375, -0.03857421875, -0.00650787353515625, -0.045196533203125, -0.0166778564453125, 0.0157470703125, -0.03131103515625, -0.0186309814453125, -0.040374755859375, -0.019927978515625, -0.0238189697265625, 0.0210113525390625, -0.003383636474609375, -0.01531219482421875, -0.02581787109375, 0.00494384765625, -0.0283966064453125, 0.0689697265625, -0.043914794921875, 0.039703369140625, -0.00970458984375, 0.06414794921875, 0.06396484375, -0.0236053466796875, 0.0074462890625, 0.01209259033203125, -0.046905517578125, -0.005466461181640625, 0.004596710205078125, -0.0078582763671875, -0.004581451416015625, -0.0672607421875, 0.0127716064453125, 0.0382080078125, 0.031768798828125, 0.01502227783203125, -0.02557373046875, -0.02545166015625, 0.0421142578125, -0.0845947265625, -0.06842041015625, -0.039398193359375, 0.006580352783203125, 0.0115509033203125, 0.037445068359375, 0.0106353759765625, -0.01332855224609375, 0.042724609375, 0.0157928466796875, 0.0210113525390625, -0.056182861328125, -0.0439453125, -0.082763671875, -0.06494140625, -0.0518798828125, 0.0009708404541015625, -0.01464080810546875, -0.0183563232421875, 0.047698974609375, -0.00884246826171875, -0.017303466796875, -0.032684326171875, -0.0266571044921875, -0.006557464599609375, -0.04302978515625, -0.04937744140625, 0.01678466796875, -0.005786895751953125, -0.003582000732421875, 0.033172607421875, 0.0034332275390625, 0.0019025802612304688, -0.000576019287109375, -0.0259552001953125, -0.0030345916748046875, 0.0031528472900390625, 0.0034503936767578125, 0.028839111328125, -0.04107666015625, 0.01197052001953125, -0.06097412109375, -0.0275115966796875, 0.0189971923828125, -0.0408935546875, 0.03411865234375, 0.031829833984375, -0.036712646484375, 0.0208892822265625, -0.023773193359375, -0.0038280487060546875, 0.0127716064453125, 0.016265869140625, -0.03570556640625, 0.0653076171875, -0.01226806640625, -0.00849151611328125, -0.04248046875, 0.0439453125, 0.011505126953125, 0.014739990234375, 0.022216796875, 0.018829345703125, -0.007732391357421875, 0.0021915435791015625, -0.06524658203125, -0.0322265625, 0.0247802734375, -0.08203125, 0.050140380859375, -0.0697021484375, -0.0096282958984375, -0.0538330078125, 0.07977294921875, -0.0021209716796875, -0.036224365234375, -0.0284423828125, 0.024505615234375, -0.0318603515625, -0.04522705078125, 0.01001739501953125, -0.00414276123046875, -0.04278564453125, -0.0034046173095703125, -0.018707275390625, -0.007354736328125, -0.0156097412109375, -0.0247802734375, -0.00849151611328125, -0.040313720703125, 0.0230560302734375, -0.053863525390625, 0.0186614990234375, 0.0159454345703125, -0.00023126602172851562, -0.01800537109375, -0.02606201171875, -0.03955078125, -0.080322265625, -0.0255584716796875, -0.0255279541015625, 0.0928955078125, 0.001728057861328125, -0.006801605224609375, -0.039337158203125, 0.049713134765625, 0.007251739501953125, 0.0040130615234375, 0.0228271484375, -0.0094451904296875, 0.0227813720703125, 0.048126220703125, 0.032867431640625, -0.000980377197265625, 0.0350341796875, -0.0079345703125, -0.038360595703125, -0.0308990478515625, -0.054046630859375, 0.00359344482421875, 0.01105499267578125, -0.042694091796875, -0.029144287109375, -0.029327392578125, -0.0283966064453125, 0.007678985595703125, -0.00909423828125, -0.0196533203125, -0.01531219482421875, -0.03271484375, 0.02813720703125, -0.0038623809814453125, 0.003326416015625, -0.0014514923095703125, 0.06011962890625, 0.0143585205078125, -0.0289306640625, 0.0253143310546875, -0.00007331371307373047, 0.006359100341796875, -0.0015459060668945312, 0.06707763671875, 0.02471923828125, 0.0170135498046875, 0.0240325927734375, -0.03045654296875, -0.0301361083984375, 0.0038547515869140625, 0.0122833251953125, 0.022857666015625, -0.03271484375, -0.002899169921875, 0.0007147789001464844, 0.01074981689453125, 0.0004119873046875, -0.0284881591796875, 0.0275726318359375, -0.006755828857421875, 0.0003044605255126953, -0.020111083984375, 0.046295166015625, 0.01323699951171875, -0.056793212890625, 0.0289459228515625, 0.005321502685546875, -0.0017375946044921875, -0.01035308837890625, 0.0158233642578125, -0.005340576171875, -0.0168914794921875, -0.0199737548828125, -0.0273590087890625, 0.045257568359375, -0.0105133056640625, 0.035797119140625, -0.0161590576171875, -0.0157623291015625, -0.06793212890625, -0.01134490966796875, 0.0347900390625, 0.0090179443359375, -0.01885986328125, 0.0007424354553222656, -0.0008525848388671875, -0.07342529296875, 0.0066680908203125, 0.0318603515625, -0.004344940185546875, -0.043853759765625, -0.0085906982421875, 0.01422119140625, 0.01331329345703125, -0.031646728515625, -0.012939453125, 0.03717041015625, -0.0006136894226074219, -0.01549530029296875, 0.0013513565063476562, 0.01541900634765625, 0.02496337890625, -0.0241851806640625, 0.016998291015625, -0.0279083251953125, -0.00345611572265625, 0.056976318359375, 0.0198516845703125, -0.0770263671875, 0.0186767578125, 0.039642333984375, 0.039031982421875, -0.058685302734375, -0.0095672607421875, 0.0146636962890625, 0.062103271484375, 0.004245758056640625, -0.0279693603515625, 0.00537872314453125, -0.0439453125, -0.017120361328125, 0.037994384765625, 0.0071563720703125, -0.04278564453125, -0.0258331298828125, -0.0290985107421875, 0.0335693359375, -0.0295257568359375, 0.0025691986083984375, 0.045013427734375, 0.027008056640625, 0.031768798828125, 0.0469970703125, -0.01861572265625, -0.0034618377685546875, 0.0048370361328125, 0.033447265625, -0.003009796142578125, -0.00952911376953125, -0.039642333984375, -0.01065826416015625, -0.030914306640625, -0.0120086669921875, 0.0599365234375, -0.0038604736328125, 0.038482666015625, -0.00580596923828125, -0.022552490234375, 0.0372314453125, 0.026092529296875, 0.005481719970703125, -0.01210784912109375, -0.0139617919921875, 0.0220794677734375, -0.0447998046875, -0.0225067138671875, -0.00186920166015625, -0.005725860595703125, -0.0305328369140625, -0.031707763671875, 0.007297515869140625, -0.0004944801330566406, 0.0133209228515625, 0.0065765380859375, -0.022735595703125, 0.0286865234375, 0.01467132568359375, -0.01505279541015625, -0.06536865234375, -0.0008268356323242188, 0.07659912109375, -0.00774383544921875, -0.01447296142578125, 0.0246429443359375, 0.08050537109375, -0.04302978515625, 0.0219879150390625, -0.013427734375, 0.0011463165283203125, -0.0478515625, 0.032562255859375, -0.0223388671875, 0.0404052734375, -0.01102447509765625, 0.02197265625, -0.0126190185546875, 0.0024204254150390625, 0.002620697021484375, 0.04205322265625, 0.00583648681640625, 0.0286712646484375, 0.06341552734375, -0.0011920928955078125, 0.06915283203125, -0.003963470458984375, -0.0076141357421875, 0.0023212432861328125, -0.01268768310546875, 0.0232696533203125, -0.0038013458251953125, -0.0293731689453125, 0.029022216796875, 0.052764892578125, 0.005344390869140625, 0.0450439453125, 0.023284912109375, 0.0211639404296875, 0.0309906005859375, -0.0182952880859375, -0.004199981689453125, 0.005218505859375, 0.00302886962890625, -0.0074462890625, 0.0233001708984375, 0.007167816162109375, 0.004619598388671875, 0.049560546875, 0.05474853515625, 0.06317138671875, -0.08807373046875, 0.01299285888671875, -0.0093536376953125, -0.04754638671875, 0.041290283203125, 0.009613037109375, 0.0062408447265625, 0.0264129638671875, 0.0301513671875, -0.0058441162109375, -0.0031566619873046875, 0.04290771484375, 0.0294189453125, -0.005828857421875, 0.006683349609375, 0.0723876953125, 0.0257110595703125, 0.034271240234375, -0.013336181640625, -0.035064697265625, 0.06597900390625, 0.0254364013671875, 0.00714111328125, -0.011871337890625, -0.03448486328125, -0.00860595703125, -0.0082855224609375, -0.024688720703125, -0.0296630859375, 0.0256805419921875, 0.018218994140625, 0.0019855499267578125, 0.039154052734375, -0.009918212890625, -0.0043487548828125, 0.0265960693359375, -0.03326416015625, 0.10687255859375, -0.014617919921875, -0.0201416015625, 0.0146331787109375, -0.039581298828125, -0.03057861328125, 0.0011119842529296875, 0.0225677490234375, 0.0225372314453125, 0.003936767578125, 0.0180511474609375, -0.023345947265625, -0.0212554931640625, 0.032806396484375, -0.07232666015625, -0.00817108154296875, -0.004375457763671875, 0.0245819091796875, -0.0291595458984375, -0.02362060546875, 0.0161590576171875, -0.037567138671875, -0.032379150390625, -0.0226593017578125, -0.030242919921875, 0.04229736328125, -0.021331787109375, 0.01416778564453125, 0.0443115234375, 0.0169677734375, -0.032379150390625, -0.01149749755859375, -0.025726318359375, 0.0616455078125, 0.00791168212890625, 0.035797119140625, -0.07763671875, -0.02288818359375, -0.0017375946044921875, 0.06304931640625, 0.057647705078125, 0.018463134765625, -0.061065673828125, 0.0005197525024414062, 0.0340576171875, 0.02764892578125, 0.0018892288208007812, 0.055999755859375, 0.011077880859375, -0.0295867919921875, 0.0151519775390625, 0.003582000732421875, 0.021026611328125, -0.0262298583984375, -0.002422332763671875, 0.0292510986328125, -0.00921630859375, -0.037200927734375, 0.0328369140625, -0.03643798828125, -0.01467132568359375, 0.015411376953125, 0.0008993148803710938, -0.0172882080078125, 0.01288604736328125, 0.0728759765625, 0.04022216796875, 0.0033931732177734375, -0.04119873046875, -0.0256500244140625, 0.05828857421875, -0.007129669189453125, 0.0302276611328125, 0.023101806640625, 0.031494140625, 0.048736572265625, -0.0134429931640625, 0.0218963623046875, 0.040130615234375, -0.052032470703125, 0.0379638671875, 0.0290679931640625, 0.0273284912109375, 0.00766754150390625, 0.033111572265625, 0.002803802490234375, 0.0360107421875, -0.046051025390625, -0.0124053955078125, 0.0016040802001953125, 0.00484466552734375, 0.004940032958984375, -0.003997802734375, 0.01100921630859375, 0.003406524658203125, 0.0040435791015625, -0.014404296875, -0.016632080078125, 0.01507568359375, 0.02239990234375, -0.0041961669921875, -0.015411376953125, 0.00128173828125, -0.01146697998046875, -0.0333251953125, -0.0012531280517578125, 0.015594482421875, 0.049163818359375, 0.01229095458984375, 0.04156494140625, 0.00115203857421875, -0.023101806640625, 0.032440185546875, 0.00397491455078125, -0.03192138671875, -0.021484375, -0.021453857421875, -0.048980712890625, 0.0166168212890625, 0.031707763671875, -0.01363372802734375, 0.026519775390625, 0.0234222412109375, 0.0196533203125, -0.0301513671875, -0.01055145263671875, -0.007091522216796875, -0.036285400390625, -0.0063629150390625, -0.04046630859375, 0.0576171875, 0.0209197998046875, 0.0238189697265625, -0.032135009765625, 0.040985107421875, 0.0241546630859375, 0.0100860595703125, -0.0000021457672119140625, 0.0190277099609375, -0.0290069580078125, 0.01372528076171875, -0.0013685226440429688, 0.0156402587890625, 0.037078857421875, -0.038818359375, 0.00873565673828125, 0.0053253173828125, -0.01464080810546875, -0.0027370452880859375, 0.0247802734375, 0.0012407302856445312, 0.01081085205078125, -0.0126800537109375, -0.01076507568359375, 0.023284912109375, -0.0180511474609375, 0.01157379150390625, -0.00737762451171875, 0.008575439453125, -0.0160369873046875, -0.04840087890625, -0.0262451171875, -0.01837158203125, 0.0261077880859375, 0.02923583984375, 0.0753173828125, -0.0162811279296875, 0.0206146240234375, 0.001983642578125, -0.0499267578125, 0.03778076171875, 0.0065460205078125, -0.0246734619140625, 0.0185394287109375, -0.0073394775390625, -0.0190582275390625, -0.0675048828125, 0.01325225830078125, 0.01139068603515625, -0.01287078857421875, 0.03790283203125, -0.0261688232421875, 0.00693511962890625, -0.016265869140625, 0.0262451171875, -0.0220184326171875, -0.09197998046875, -0.05487060546875, 0.043548583984375, -0.002166748046875, 0.06182861328125, -0.01406097412109375, 0.0290985107421875, -0.004528045654296875, -0.0310211181640625, 0.01247406005859375, -0.053497314453125, 0.015899658203125, 0.036346435546875, -0.03240966796875, -0.037139892578125, 0.01023101806640625, -0.0179595947265625, 0.007663726806640625, -0.001178741455078125, 0.0716552734375, -0.032928466796875, 0.0157928466796875, -0.0187835693359375, 0.0004756450653076172, -0.0004429817199707031, -0.0151214599609375, 0.00449371337890625, -0.01849365234375, -0.01279449462890625, 0.0254364013671875, 0.0001760721206665039, -0.004451751708984375, -0.0014028549194335938, -0.0115509033203125, 0.01084136962890625, 0.01212310791015625, -0.0015821456909179688, 0.034759521484375, -0.0137786865234375, 0.01229095458984375, -0.0013456344604492188, -0.075439453125, 0.003559112548828125, 0.0031642913818359375, 0.080078125, -0.052734375, -0.04656982421875, 0.006061553955078125, 0.00945281982421875, -0.0330810546875, -0.0227508544921875, -0.043365478515625, 0.00991058349609375, -0.033660888671875, 0.00579071044921875, 0.036773681640625, -0.0237579345703125, 0.0263519287109375, -0.028472900390625, 0.00655364990234375, 0.0215911865234375, -0.0280609130859375, 0.0024318695068359375, 0.033660888671875, 0.01194000244140625, -0.047119140625, -0.06292724609375, -0.0013713836669921875, -0.00971221923828125, -0.009552001953125, 0.01641845703125, -0.006511688232421875, -0.0102996826171875, -0.041015625, -0.04156494140625, 0.006587982177734375, 0.02978515625, -0.033843994140625, -0.0217742919921875, -0.048553466796875, -0.033660888671875, 0.036590576171875, 0.004730224609375, -0.01222991943359375, -0.0254364013671875, 0.05169677734375, 0.0465087890625, 0.0101318359375, 0.01003265380859375, 0.050018310546875, -0.02374267578125, 0.061187744140625, 0.0322265625, 0.04180908203125, 0.032562255859375, -0.01551055908203125, 0.04876708984375, 0.07275390625, 0.008087158203125, 0.006381988525390625, -0.0010128021240234375, -0.11285400390625, 0.00910186767578125, -0.022796630859375, -0.034027099609375, -0.04119873046875, 0.04071044921875, -0.0099945068359375, 0.01031494140625, 0.00826263427734375, -0.0263214111328125, -0.021881103515625, 0.01163482666015625, -0.0005526542663574219, 0.00701904296875, -0.05108642578125, 0.0005164146423339844, 0.0152740478515625, -0.0295867919921875, 0.006206512451171875, 0.04046630859375, -0.045501708984375, 0.028106689453125, 0.022491455078125, -0.02630615234375, -0.05230712890625, 0.0010576248168945312, 0.0672607421875, -0.052001953125, -0.02593994140625, 0.012298583984375, 0.01000213623046875, 0.0179443359375, -0.0186614990234375, 0.0268707275390625, 0.00453948974609375, -0.01837158203125, 0.048370361328125, 0.00923919677734375, 0.07550048828125, -0.051910400390625, -0.043609619140625, 0.03662109375, 0.0242767333984375, -0.03753662109375, 0.01776123046875, 0.041534423828125, 0.057708740234375, -0.04833984375, 0.08697509765625, -0.0120697021484375, -0.01641845703125, -0.01021575927734375, 0.01378631591796875, -0.0047149658203125, 0.020904541015625, 0.0248260498046875, -0.023406982421875, -0.0006189346313476562, 0.043853759765625, -0.0279998779296875, -0.042327880859375, 0.0070037841796875, -0.0164031982421875, 0.0229339599609375, 0.01137542724609375 ]
7023eb41379877c75be3b115b26ffdc41141a325
Wordpress Stackexchange Q: modify all posts of a category to "no comments allowed" I'm looking for a way to modify all posts of a certain category to be "no comments allowed" without going into each post settings, one by one, and modifying manually. Perhaps a MySQL statement? Thanks A: On your posts screen, you should be able to filter by category and then select all and bulk edit to turn off comments. Edit: Bulk actions only apply per page (e.g. 20 posts or however many you have showing), so you'll either have to do it for each page of results or go up to screen options and increase the number of items that are showing on screen.
Q: modify all posts of a category to "no comments allowed" I'm looking for a way to modify all posts of a certain category to be "no comments allowed" without going into each post settings, one by one, and modifying manually. Perhaps a MySQL statement? Thanks A: On your posts screen, you should be able to filter by category and then select all and bulk edit to turn off comments. Edit: Bulk actions only apply per page (e.g. 20 posts or however many you have showing), so you'll either have to do it for each page of results or go up to screen options and increase the number of items that are showing on screen. A: To do it in WordPress directly you could use the following: <?php $args = array('category' => *term_id of category to disable comments for*); $myposts = get_posts($args); foreach($myposts as $post) { $my_post = array( 'ID' => $post->ID, 'comment_status' => 'closed' ); wp_insert_post($my_post); } ?> get_posts() will retrieve all of the posts with the category specified in $args by: 'category' => $term_id wp_insert_post() will allow you to modify said posts to disable comments with the following setting: 'comment_status' => 'closed' You may wish to view the documentation pages for get_posts() and wp_insert_post() for more information. To ensure that no future posts under this category allow comments you could also use the save_post hook: save_post Runs whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email. Action function arguments: post ID. <?php add_action('save_posts', 'disable_comments'); function disable_comments($post_id) { $disabled_category = /* term_id of the category to disable comments for */ $category = get_the_category($post_id); if($category->cat_ID == $disabled_category) { $my_post = array( 'ID' => $post_id, 'comment_status' => 'closed' ); wp_insert_post($my_post); } } ?> get_the_category() will retrieve the category object for the selected post. Visiting the documentation is a good idea for more information on get_the_category(). If you don't know what an action hook is, you should visit this page.
wordpress
{ "language": "en", "length": 332, "provenance": "stackexchange_00019.jsonl.gz:412967", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28228" }
[ 0.0712890625, -0.0143890380859375, -0.0085296630859375, -0.039703369140625, 0.0224151611328125, -0.045440673828125, 0.05194091796875, -0.000995635986328125, -0.01953125, 0.006740570068359375, -0.0164642333984375, -0.0221405029296875, 0.006168365478515625, -0.033843994140625, 0.0172271728515625, -0.036376953125, 0.0214996337890625, 0.0207977294921875, 0.0282440185546875, -0.034210205078125, 0.006587982177734375, -0.023681640625, 0.04327392578125, 0.06439208984375, 0.0224609375, -0.0221405029296875, 0.0615234375, -0.032257080078125, 0.0229339599609375, -0.007656097412109375, 0.030517578125, -0.021728515625, 0.00042319297790527344, 0.04815673828125, -0.01861572265625, 0.0082550048828125, -0.0122528076171875, 0.0164947509765625, 0.0181427001953125, 0.01297760009765625, 0.05242919921875, -0.038909912109375, 0.00035881996154785156, 0.050506591796875, -0.00646209716796875, -0.00396728515625, 0.0301361083984375, -0.0487060546875, 0.06591796875, -0.051300048828125, -0.013702392578125, 0.09234619140625, 0.007572174072265625, -0.06903076171875, -0.022857666015625, -0.0037593841552734375, -0.050628662109375, 0.03521728515625, 0.029144287109375, -0.01058197021484375, -0.01052093505859375, -0.0124664306640625, 0.016571044921875, 0.006011962890625, 0.0032215118408203125, -0.0218963623046875, -0.004302978515625, 0.01751708984375, -0.02813720703125, 0.0184783935546875, 0.048736572265625, -0.0226593017578125, 0.032196044921875, -0.018310546875, 0.031280517578125, -0.025604248046875, -0.00450897216796875, -0.0001659393310546875, 0.025482177734375, 0.01140594482421875, 0.0301971435546875, 0.00983428955078125, 0.03216552734375, -0.028564453125, -0.00820159912109375, -0.046600341796875, -0.0030460357666015625, -0.01174163818359375, -0.0416259765625, -0.00823211669921875, -0.02789306640625, -0.03826904296875, -0.047760009765625, 0.0546875, 0.0024318695068359375, 0.0023555755615234375, 0.0229644775390625, 0.0262451171875, -0.0099639892578125, 0.01125335693359375, -0.01363372802734375, -0.020660400390625, 0.004116058349609375, -0.0116119384765625, 0.02508544921875, 0.0012273788452148438, -0.03326416015625, -0.0291290283203125, 0.05145263671875, 0.03857421875, -0.005649566650390625, 0.053985595703125, -0.00408172607421875, 0.035919189453125, -0.030426025390625, 0.0009250640869140625, -0.041839599609375, 0.01300811767578125, -0.041046142578125, 0.03326416015625, 0.006500244140625, 0.024627685546875, -0.002655029296875, 0.004978179931640625, -0.012359619140625, -0.01378631591796875, -0.0236663818359375, -0.014068603515625, 0.034271240234375, -0.0183868408203125, -0.0526123046875, 0.04754638671875, 0.07318115234375, 0.0100555419921875, -0.002254486083984375, -0.0039825439453125, 0.0191650390625, -0.0027904510498046875, -0.01132965087890625, 0.0278167724609375, -0.01605224609375, -0.0250091552734375, 0.0160369873046875, -0.0101165771484375, 0.01110076904296875, 0.0185546875, 0.02642822265625, 0.01090240478515625, 0.0007686614990234375, -0.032257080078125, -0.009246826171875, 0.0202178955078125, 0.060821533203125, -0.001628875732421875, -0.01474761962890625, -0.021392822265625, 0.041534423828125, -0.0355224609375, -0.037017822265625, -0.0550537109375, 0.0185394287109375, 0.03375244140625, 0.07025146484375, 0.022979736328125, 0.0114898681640625, -0.0219879150390625, -0.030120849609375, -0.00818634033203125, 0.0214996337890625, -0.005153656005859375, -0.00984954833984375, 0.007244110107421875, 0.048126220703125, -0.00037288665771484375, -0.0003559589385986328, 0.018707275390625, -0.026214599609375, -0.021759033203125, 0.005748748779296875, 0.0261077880859375, -0.0010023117065429688, -0.036834716796875, -0.044891357421875, 0.035614013671875, -0.012786865234375, 0.0272369384765625, 0.02764892578125, 0.0499267578125, -0.020782470703125, 0.03472900390625, 0.0101165771484375, 0.024383544921875, -0.001674652099609375, -0.01763916015625, 0.0277557373046875, -0.04583740234375, 0.000377655029296875, -0.0275421142578125, 0.01959228515625, 0.0168609619140625, 0.0236053466796875, -0.0007839202880859375, -0.032257080078125, 0.0129241943359375, -0.04144287109375, -0.0188140869140625, -0.0094757080078125, 0.013702392578125, -0.0208892822265625, 0.01580810546875, 0.017181396484375, -0.01242828369140625, -0.0192413330078125, -0.0122833251953125, -0.01218414306640625, -0.00945281982421875, -0.0126953125, -0.0035037994384765625, -0.005771636962890625, 0.0020885467529296875, 0.006694793701171875, -0.0243988037109375, -0.0050048828125, 0.035858154296875, 0.0394287109375, -0.01029205322265625, -0.0041351318359375, -0.0276641845703125, 0.0273895263671875, 0.0009565353393554688, -0.041015625, 0.0264434814453125, 0.0399169921875, 0.035675048828125, -0.01100921630859375, -0.0011301040649414062, 0.0092926025390625, -0.03802490234375, -0.002902984619140625, 0.0460205078125, 0.0230865478515625, -0.0243072509765625, -0.00799560546875, 0.023101806640625, 0.041107177734375, -0.0216522216796875, -0.005107879638671875, 0.0232696533203125, 0.0260009765625, 0.03240966796875, 0.010650634765625, -0.00994873046875, 0.0303497314453125, -0.01143646240234375, 0.049560546875, 0.01934814453125, 0.00431060791015625, -0.0101318359375, 0.03192138671875, -0.0171966552734375, 0.01387786865234375, 0.0165863037109375, -0.0360107421875, 0.0248260498046875, 0.037139892578125, -0.019744873046875, -0.0026645660400390625, -0.00754547119140625, -0.05145263671875, 0.0256195068359375, 0.034912109375, -0.0287628173828125, 0.0050048828125, 0.0296478271484375, -0.01021575927734375, 0.03460693359375, -0.017791748046875, -0.0029392242431640625, 0.01611328125, 0.016876220703125, -0.0169219970703125, 0.031768798828125, 0.0232696533203125, -0.01479339599609375, -0.0144500732421875, -0.0670166015625, 0.0081024169921875, -0.0287933349609375, -0.09295654296875, -0.05194091796875, -0.019134521484375, 0.040557861328125, -0.0087890625, -0.0166168212890625, 0.03143310546875, 0.007335662841796875, 0.00597381591796875, -0.07086181640625, 0.054718017578125, -0.0275421142578125, 0.049713134765625, 0.08270263671875, 0.01471710205078125, 0.01129150390625, 0.0167388916015625, 0.014892578125, 0.0343017578125, 0.011932373046875, -0.0007119178771972656, 0.0165252685546875, -0.0526123046875, 0.01195526123046875, 0.0123291015625, 0.002658843994140625, 0.01727294921875, -0.01349639892578125, 0.0006031990051269531, 0.03131103515625, 0.0106201171875, 0.0341796875, 0.00530242919921875, 0.004306793212890625, -0.000019848346710205078, -0.00225830078125, 0.012054443359375, -0.01100921630859375, -0.017120361328125, 0.0037555694580078125, 0.0254669189453125, -0.021697998046875, -0.028350830078125, 0.01432037353515625, -0.033111572265625, 0.0077972412109375, 0.00559234619140625, -0.0045928955078125, -0.00019681453704833984, 0.11993408203125, 0.013641357421875, -0.050628662109375, -0.00960540771484375, -0.0219879150390625, -0.02496337890625, 0.02947998046875, 0.019622802734375, -0.04229736328125, 0.006839752197265625, 0.0013456344604492188, -0.0024242401123046875, 0.0174407958984375, -0.0088958740234375, -0.0256805419921875, -0.018157958984375, 0.0223236083984375, 0.0083770751953125, 0.01197052001953125, 0.01220703125, 0.034454345703125, 0.0076141357421875, -0.02520751953125, -0.04608154296875, -0.0124359130859375, -0.064208984375, -0.00263214111328125, 0.032135009765625, 0.00766754150390625, -0.026763916015625, 0.02960205078125, 0.053955078125, 0.033355712890625, 0.0367431640625, 0.008514404296875, 0.0052947998046875, -0.00795745849609375, 0.007198333740234375, -0.0535888671875, -0.004238128662109375, -0.030487060546875, 0.02850341796875, -0.015960693359375, -0.00986480712890625, -0.03436279296875, 0.042694091796875, -0.055389404296875, -0.029388427734375, 0.004627227783203125, -0.0665283203125, -0.0006279945373535156, -0.006931304931640625, 0.01422882080078125, -0.00484466552734375, 0.053741455078125, -0.02947998046875, -0.024505615234375, -0.00719451904296875, 0.00887298583984375, 0.00823974609375, -0.0267486572265625, -0.0032939910888671875, -0.034393310546875, -0.06964111328125, 0.0472412109375, 0.0128021240234375, -0.0181884765625, -0.0379638671875, 0.007442474365234375, -0.041717529296875, -0.0252227783203125, 0.00490570068359375, -0.004337310791015625, -0.0155181884765625, -0.0264739990234375, -0.0221405029296875, -0.0169525146484375, 0.0017499923706054688, -0.0225982666015625, -0.05865478515625, 0.007289886474609375, -0.0215606689453125, 0.01043701171875, 0.0173797607421875, 0.0008211135864257812, -0.00411224365234375, 0.04022216796875, -0.00986480712890625, -0.0231475830078125, 0.01470184326171875, 0.030517578125, -0.0245208740234375, -0.01995849609375, -0.0015964508056640625, -0.040802001953125, -0.01806640625, -0.00365447998046875, 0.03424072265625, 0.07623291015625, -0.036834716796875, -0.00917816162109375, -0.04449462890625, 0.001628875732421875, -0.046417236328125, -0.072265625, -0.03533935546875, 0.0278472900390625, -0.0312347412109375, 0.0267791748046875, -0.0875244140625, -0.053558349609375, 0.039398193359375, -0.028228759765625, -0.00716400146484375, 0.0097808837890625, 0.05535888671875, -0.0016393661499023438, -0.0163726806640625, -0.03851318359375, 0.007598876953125, 0.0175628662109375, -0.0084228515625, 0.0267791748046875, 0.007053375244140625, -0.02117919921875, 0.037109375, -0.0177001953125, -0.0088958740234375, -0.02935791015625, 0.061279296875, -0.022369384765625, -0.0072174072265625, 0.0062713623046875, -0.04559326171875, 0.05645751953125, 0.0010118484497070312, -0.00110626220703125, -0.0018205642700195312, -0.042327880859375, 0.035797119140625, 0.040191650390625, -0.029510498046875, -0.05609130859375, -0.020172119140625, 0.008697509765625, 0.01093292236328125, 0.016448974609375, 0.028778076171875, -0.006191253662109375, 0.00788116455078125, -0.0196685791015625, 0.006824493408203125, -0.0306243896484375, -0.0137786865234375, -0.0528564453125, 0.0214385986328125, -0.021453857421875, -0.012725830078125, -0.005184173583984375, -0.004817962646484375, -0.006771087646484375, -0.0161895751953125, -0.06158447265625, -0.0017490386962890625, 0.0200347900390625, 0.04852294921875, 0.029388427734375, 0.0226593017578125, 0.0271759033203125, -0.03619384765625, 0.0114288330078125, 0.004856109619140625, -0.035430908203125, -0.0228271484375, -0.024658203125, 0.034454345703125, 0.04180908203125, -0.02667236328125, 0.044921875, -0.016265869140625, 0.0260162353515625, -0.006641387939453125, -0.01424407958984375, 0.057708740234375, 0.0313720703125, -0.01209259033203125, -0.00569915771484375, 0.06134033203125, -0.0191650390625, -0.03546142578125, -0.0110931396484375, -0.0240020751953125, -0.031646728515625, 0.04388427734375, 0.0184173583984375, 0.025238037109375, 0.017303466796875, -0.0240936279296875, 0.005825042724609375, -0.0216064453125, 0.004467010498046875, 0.040374755859375, -0.01373291015625, -0.0141448974609375, -0.0220947265625, -0.01076507568359375, 0.011199951171875, -0.00467681884765625, -0.032806396484375, -0.043182373046875, 0.004878997802734375, 0.0191802978515625, -0.00864410400390625, -0.0141448974609375, -0.022064208984375, -0.07391357421875, -0.0322265625, 0.0035305023193359375, 0.0005750656127929688, -0.0109100341796875, -0.0009064674377441406, -0.032806396484375, 0.00402069091796875, 0.0218353271484375, 0.024200439453125, 0.0124359130859375, -0.058013916015625, 0.05487060546875, -0.004856109619140625, 0.05963134765625, 0.007808685302734375, -0.01480865478515625, -0.0347900390625, -0.062103271484375, -0.031494140625, -0.05706787109375, -0.044097900390625, -0.03314208984375, 0.01039886474609375, 0.02935791015625, 0.022003173828125, -0.01184844970703125, -0.062164306640625, -0.0222625732421875, 0.002399444580078125, 0.044097900390625, 0.027740478515625, -0.048797607421875, 0.046478271484375, 0.0148162841796875, 0.01540374755859375, -0.0147705078125, 0.03778076171875, 0.036376953125, -0.0125579833984375, -0.0026035308837890625, -0.054229736328125, -0.0235595703125, 0.037994384765625, -0.0780029296875, 0.0031032562255859375, 0.038299560546875, -0.0005536079406738281, 0.0268707275390625, -0.03131103515625, 0.00437164306640625, -0.03900146484375, 0.0298919677734375, -0.0662841796875, 0.056488037109375, -0.0309906005859375, 0.021759033203125, 0.05615234375, -0.044097900390625, -0.0143280029296875, 0.003665924072265625, -0.00946044921875, 0.0196685791015625, 0.004642486572265625, -0.0303192138671875, 0.040985107421875, 0.047149658203125, 0.0012416839599609375, 0.021759033203125, 0.0017290115356445312, 0.023834228515625, 0.0189666748046875, 0.0017852783203125, 0.0218505859375, -0.0101318359375, 0.04766845703125, 0.003566741943359375, -0.03173828125, 0.0270233154296875, -0.038330078125, 0.0236358642578125, 0.04986572265625, 0.06494140625, -0.104248046875, 0.0419921875, 0.03369140625, 0.021392822265625, 0.0419921875, 0.0013437271118164062, 0.01085662841796875, -0.002727508544921875, -0.008453369140625, -0.0130462646484375, -0.0311279296875, -0.0164337158203125, -0.0134124755859375, -0.020660400390625, 0.005084991455078125, 0.034027099609375, 0.0088348388671875, -0.046142578125, 0.00998687744140625, 0.037811279296875, -0.005435943603515625, -0.057037353515625, -0.04400634765625, 0.04656982421875, -0.056915283203125, -0.10498046875, 0.032928466796875, 0.0000851750373840332, 0.0057830810546875, 0.0241851806640625, -0.0118255615234375, -0.01313018798828125, 0.02740478515625, -0.040130615234375, 0.04132080078125, -0.0067596435546875, -0.05047607421875, -0.061279296875, -0.0232696533203125, -0.0130462646484375, 0.022918701171875, 0.027984619140625, 0.0215606689453125, -0.0030689239501953125, -0.035369873046875, 0.004848480224609375, -0.0241851806640625, 0.036163330078125, -0.06378173828125, 0.0018472671508789062, 0.02728271484375, -0.0162506103515625, -0.00830078125, 0.01221466064453125, -0.010009765625, 0.01390838623046875, 0.05572509765625, -0.00897216796875, 0.01084136962890625, -0.0200042724609375, -0.00543975830078125, -0.05743408203125, 0.08074951171875, 0.003757476806640625, 0.033111572265625, 0.0082855224609375, 0.030426025390625, -0.0268402099609375, 0.0206146240234375, -0.037445068359375, 0.04803466796875, -0.00994873046875, 0.058197021484375, -0.0625, -0.01155853271484375, 0.016204833984375, 0.049713134765625, 0.0256500244140625, 0.003330230712890625, 0.01000213623046875, -0.00183868408203125, 0.043701171875, 0.041839599609375, 0.0007958412170410156, 0.0028743743896484375, -0.018402099609375, 0.01629638671875, 0.038726806640625, -0.0257110595703125, 0.02825927734375, -0.007511138916015625, -0.032684326171875, -0.0153961181640625, 0.01247406005859375, 0.0185546875, -0.02130126953125, 0.05816650390625, -0.0077667236328125, -0.014923095703125, 0.0020008087158203125, -0.015350341796875, -0.0281982421875, 0.048980712890625, 0.034332275390625, -0.08209228515625, -0.016082763671875, -0.04974365234375, 0.052398681640625, 0.0034122467041015625, 0.02679443359375, 0.03619384765625, 0.0121307373046875, 0.045867919921875, 0.009613037109375, 0.023223876953125, 0.00988006591796875, 0.0004935264587402344, 0.0129547119140625, 0.050933837890625, 0.0345458984375, -0.004344940185546875, -0.0195159912109375, 0.053741455078125, 0.034393310546875, -0.01526641845703125, -0.00901031494140625, 0.01183319091796875, 0.006816864013671875, 0.01535797119140625, -0.01181793212890625, 0.02459716796875, 0.01520538330078125, 0.030975341796875, -0.026397705078125, 0.00014007091522216797, -0.0012159347534179688, 0.04437255859375, 0.0036640167236328125, 0.005161285400390625, -0.043426513671875, -0.0265655517578125, -0.007511138916015625, -0.035400390625, 0.006237030029296875, 0.026458740234375, 0.03173828125, 0.0031108856201171875, 0.0097808837890625, 0.0031223297119140625, -0.00458526611328125, 0.0063323974609375, -0.0135955810546875, 0.00591278076171875, -0.01486968994140625, -0.0308685302734375, 0.005184173583984375, 0.039581298828125, -0.0013399124145507812, 0.014495849609375, 0.0300140380859375, 0.0185089111328125, -0.0258026123046875, -0.0155029296875, 0.0230255126953125, -0.033050537109375, -0.017303466796875, -0.024932861328125, 0.031707763671875, 0.04541015625, 0.005126953125, 0.01434326171875, 0.04931640625, 0.044708251953125, 0.00640869140625, -0.0250091552734375, 0.015655517578125, -0.02423095703125, 0.057342529296875, 0.042755126953125, 0.0157470703125, 0.036468505859375, -0.03814697265625, -0.0066986083984375, -0.0136260986328125, -0.06854248046875, 0.0115814208984375, 0.0241241455078125, -0.045196533203125, 0.0292205810546875, -0.035919189453125, 0.014251708984375, -0.0035953521728515625, -0.0184783935546875, 0.00533294677734375, 0.0115203857421875, 0.014404296875, 0.00595855712890625, -0.025543212890625, -0.0294342041015625, -0.0310211181640625, 0.04754638671875, 0.040985107421875, 0.061676025390625, -0.0185699462890625, 0.0423583984375, -0.06915283203125, 0.05377197265625, -0.06634521484375, -0.035186767578125, 0.040252685546875, 0.0406494140625, -0.007572174072265625, -0.009002685546875, 0.0195770263671875, 0.044097900390625, 0.0288543701171875, -0.0313720703125, 0.04754638671875, -0.04132080078125, -0.010406494140625, -0.057037353515625, 0.0033779144287109375, -0.03912353515625, -0.00153350830078125, -0.007251739501953125, -0.0163726806640625, 0.0098114013671875, -0.022796630859375, 0.002590179443359375, 0.044403076171875, -0.039825439453125, 0.06414794921875, -0.01763916015625, 0.032989501953125, -0.0372314453125, 0.0247344970703125, -0.10748291015625, 0.031494140625, 0.02032470703125, -0.0007658004760742188, 0.0011444091796875, 0.031524658203125, -0.050445556640625, 0.032867431640625, -0.0345458984375, -0.041168212890625, 0.035125732421875, 0.046234130859375, 0.015838623046875, 0.0343017578125, -0.04559326171875, -0.0208282470703125, 0.0107574462890625, 0.0278167724609375, -0.0233154296875, -0.0306243896484375, -0.0184783935546875, 0.007415771484375, -0.044342041015625, -0.046875, -0.0775146484375, -0.0022640228271484375, -0.01442718505859375, -0.00862884521484375, -0.060150146484375, 0.0249786376953125, 0.01064300537109375, 0.051971435546875, -0.06866455078125, -0.010101318359375, -0.0009918212890625, -0.01275634765625, -0.079833984375, -0.0116729736328125, -0.047760009765625, -0.0163116455078125, -0.045501708984375, 0.047576904296875, 0.05126953125, -0.038604736328125, -0.00971221923828125, 0.0518798828125, 0.0543212890625, 0.095947265625, 0.01456451416015625, -0.01314544677734375, 0.0220489501953125, -0.003170013427734375, -0.0285186767578125, -0.0643310546875, 0.0049896240234375, -0.0333251953125, -0.0166015625, 0.01953125, -0.007480621337890625, 0.025787353515625, -0.033111572265625, -0.0821533203125, 0.040374755859375, -0.00768280029296875, -0.0419921875, -0.034759521484375, -0.0211639404296875, -0.006145477294921875, -0.0061187744140625, -0.01148223876953125, -0.0242767333984375, -0.0408935546875, 0.04486083984375, 0.03558349609375, 0.0307159423828125, 0.0168914794921875, 0.018798828125, -0.021453857421875, 0.048248291015625, 0.034271240234375, 0.032989501953125, -0.016265869140625, 0.012054443359375, 0.01120758056640625, 0.042755126953125, -0.0272674560546875, 0.013519287109375, -0.006465911865234375, 0.007183074951171875, 0.020111083984375, -0.0093536376953125, -0.0706787109375, -0.034820556640625, 0.03875732421875, 0.06256103515625, 0.025787353515625, -0.01256561279296875, 0.005157470703125, -0.03643798828125, -0.0203399658203125, -0.0009098052978515625, 0.00775909423828125, -0.035919189453125, 0.0156402587890625, 0.0191497802734375, -0.00975799560546875, -0.00704193115234375, -0.03997802734375, -0.0304107666015625, -0.0052032470703125, -0.0135498046875, -0.0115509033203125, 0.036468505859375, 0.054412841796875, -0.00740814208984375, -0.0193634033203125, -0.0075225830078125, -0.021636962890625, -0.0159454345703125, -0.0244140625, -0.0137481689453125, -0.054046630859375, -0.053741455078125, 0.0215301513671875, 0.037750244140625, -0.02056884765625, 0.03619384765625, -0.01226806640625, 0.00733184814453125, -0.00960540771484375, 0.03448486328125, 0.018951416015625, 0.044403076171875, -0.044891357421875, 0.0252532958984375, 0.013641357421875, 0.0306396484375, -0.0304412841796875, -0.056304931640625, -0.0253448486328125, 0.0235443115234375, 0.00942230224609375, -0.0091400146484375, 0.06805419921875, -0.0513916015625, -0.0035266876220703125, 0.0184173583984375, -0.01483154296875, -0.04010009765625, 0.040008544921875, -0.002628326416015625, -0.0014963150024414062, 0.0247344970703125 ]
3028e08205f342a305589d248615413e5b4d2271
Wordpress Stackexchange Q: Rewrite custom post type rss feed links I am looking for a way to rewrite my custom post type feed located at http://localhost:8888/feed/?post_type=post to http://localhost:8888/feed/portfolio this post suggests using http://localhost:8888/portfolio/feed/ which is not the main feed but the comments feed, any ideas? http://localhost:8888/portfolio/feed currently the above goes to comments as well. A: Put this in a plugin or functions.php: function feed_rewrite( $wp_rewrite ) { $feed_rules = array( 'feed/portfolio' => 'index.php?post_type=post&feed=rss2' ); $wp_rewrite->rules = $feed_rules + $wp_rewrite->rules; } // refresh/flush permalinks in the dashboard if this is changed in any way add_filter( 'generate_rewrite_rules', 'feed_rewrite' ); When you've done that, go to the permalinks page and resave to flush your old rules and regenerate them Remember, when changing rewrite rules to use the monkeyman rewrite analyser tool plugin to check what rules are used for which URLs
Q: Rewrite custom post type rss feed links I am looking for a way to rewrite my custom post type feed located at http://localhost:8888/feed/?post_type=post to http://localhost:8888/feed/portfolio this post suggests using http://localhost:8888/portfolio/feed/ which is not the main feed but the comments feed, any ideas? http://localhost:8888/portfolio/feed currently the above goes to comments as well. A: Put this in a plugin or functions.php: function feed_rewrite( $wp_rewrite ) { $feed_rules = array( 'feed/portfolio' => 'index.php?post_type=post&feed=rss2' ); $wp_rewrite->rules = $feed_rules + $wp_rewrite->rules; } // refresh/flush permalinks in the dashboard if this is changed in any way add_filter( 'generate_rewrite_rules', 'feed_rewrite' ); When you've done that, go to the permalinks page and resave to flush your old rules and regenerate them Remember, when changing rewrite rules to use the monkeyman rewrite analyser tool plugin to check what rules are used for which URLs A: If you have the archive on CPT to true, that creat WP always a feed, the nice URL is only usable, after you refresh the permalinks via Settings in Backend or via a function in your code. Important is the name of your CPT, should the name is "portfolio". If you have another name, then you must create a rewrite, maybe with wp_rewrite() or via rules inside the .htaccess File, if it is a a Apache server.
wordpress
{ "language": "en", "length": 214, "provenance": "stackexchange_00019.jsonl.gz:412969", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28242" }
[ 0.05535888671875, 0.00762939453125, -0.004852294921875, -0.01189422607421875, 0.004558563232421875, -0.0322265625, 0.05096435546875, -0.0355224609375, -0.03839111328125, -0.00511932373046875, 0.0182952880859375, -0.0016984939575195312, -0.03436279296875, -0.04974365234375, 0.030853271484375, -0.0487060546875, 0.02777099609375, 0.002838134765625, 0.058258056640625, -0.01117706298828125, 0.046783447265625, -0.00360870361328125, 0.0316162109375, -0.005107879638671875, 0.019683837890625, -0.005977630615234375, 0.0748291015625, -0.00946044921875, 0.01507568359375, -0.0234527587890625, 0.021484375, -0.0196990966796875, 0.016937255859375, 0.0308837890625, -0.02215576171875, 0.02203369140625, -0.003505706787109375, 0.01050567626953125, -0.005374908447265625, 0.03277587890625, 0.04632568359375, -0.04669189453125, 0.045867919921875, -0.00641632080078125, 0.022552490234375, 0.007354736328125, 0.025634765625, -0.0665283203125, 0.0160675048828125, 0.0013294219970703125, -0.006504058837890625, 0.0170745849609375, 0.002597808837890625, 0.00872039794921875, -0.0223846435546875, -0.008758544921875, -0.00754547119140625, -0.01230621337890625, 0.0250244140625, 0.0017595291137695312, 0.00339508056640625, -0.00433349609375, 0.01849365234375, 0.0167694091796875, -0.031707763671875, 0.00800323486328125, 0.049072265625, -0.004413604736328125, -0.0168609619140625, -0.0301055908203125, 0.019622802734375, 0.01197052001953125, 0.0242462158203125, -0.018585205078125, -0.00830841064453125, -0.037841796875, 0.01471710205078125, -0.0292816162109375, -0.007904052734375, 0.0050506591796875, -0.00658416748046875, -0.020751953125, -0.033355712890625, -0.02191162109375, 0.0159759521484375, 0.0038089752197265625, -0.0174407958984375, -0.0022335052490234375, -0.0228424072265625, -0.015899658203125, -0.0305023193359375, -0.0217132568359375, -0.04473876953125, 0.00847625732421875, 0.0010242462158203125, -0.0089569091796875, 0.0244598388671875, -0.002597808837890625, 0.01495361328125, 0.002140045166015625, 0.0245513916015625, -0.059814453125, 0.036773681640625, -0.0267791748046875, 0.0215911865234375, 0.036102294921875, 0.00800323486328125, 0.035980224609375, 0.07550048828125, 0.0132904052734375, 0.01004791259765625, 0.08953857421875, -0.033172607421875, 0.0131988525390625, -0.036163330078125, -0.00627899169921875, -0.07830810546875, -0.0128021240234375, -0.03424072265625, -0.0012044906616210938, 0.00539398193359375, 0.03582763671875, -0.0255584716796875, 0.0001437664031982422, -0.012908935546875, -0.01471710205078125, -0.00244903564453125, -0.01428985595703125, -0.0237884521484375, 0.043426513671875, -0.0269622802734375, 0.0184173583984375, 0.038543701171875, 0.01513671875, -0.0164947509765625, -0.0301361083984375, 0.06011962890625, -0.025054931640625, -0.0301971435546875, 0.056884765625, -0.0283660888671875, -0.04827880859375, -0.003246307373046875, -0.0251007080078125, 0.04150390625, 0.0596923828125, 0.0306854248046875, -0.008453369140625, -0.016937255859375, -0.0310211181640625, -0.006011962890625, -0.007503509521484375, 0.042083740234375, 0.0240325927734375, 0.0016260147094726562, -0.03338623046875, 0.10247802734375, -0.05743408203125, -0.01318359375, -0.0833740234375, 0.0178070068359375, 0.0018310546875, 0.00672149658203125, -0.046051025390625, -0.041412353515625, -0.00550079345703125, -0.058135986328125, 0.000027120113372802734, 0.027862548828125, -0.0246124267578125, 0.0290069580078125, -0.01198577880859375, -0.00838470458984375, 0.0028209686279296875, 0.0209197998046875, 0.0047760009765625, 0.018035888671875, -0.0276641845703125, 0.014373779296875, 0.05657958984375, 0.005069732666015625, -0.0228424072265625, 0.020843505859375, -0.00487518310546875, -0.04620361328125, 0.05364990234375, 0.022369384765625, 0.06817626953125, -0.01348876953125, 0.007442474365234375, 0.058380126953125, 0.019744873046875, 0.01364898681640625, 0.00438690185546875, -0.028533935546875, -0.034271240234375, 0.024139404296875, -0.00006788969039916992, -0.0198822021484375, 0.0196075439453125, -0.031585693359375, 0.0322265625, -0.05047607421875, 0.03289794921875, -0.06597900390625, 0.020843505859375, -0.0316162109375, 0.040283203125, -0.009735107421875, 0.01300811767578125, 0.026123046875, 0.01131439208984375, -0.018951416015625, -0.059234619140625, -0.0126190185546875, 0.032562255859375, -0.0021686553955078125, -0.0205230712890625, -0.01136016845703125, 0.0019321441650390625, 0.0061187744140625, -0.00687408447265625, -0.01983642578125, 0.017242431640625, 0.058135986328125, 0.002864837646484375, -0.018890380859375, -0.01090240478515625, 0.01212310791015625, 0.035797119140625, -0.0894775390625, 0.0124664306640625, -0.029205322265625, -0.01195526123046875, -0.025299072265625, 0.00667572021484375, 0.034820556640625, -0.0095367431640625, 0.025787353515625, 0.027862548828125, 0.0181427001953125, 0.021209716796875, 0.0092926025390625, 0.0177764892578125, 0.035430908203125, -0.02740478515625, 0.024749755859375, -0.0120391845703125, 0.020660400390625, 0.08270263671875, -0.0020656585693359375, 0.01337432861328125, 0.0116424560546875, -0.031524658203125, -0.016448974609375, 0.062225341796875, 0.00518798828125, 0.019073486328125, -0.0111083984375, 0.003025054931640625, -0.01013946533203125, 0.032196044921875, -0.0028972625732421875, 0.0016431808471679688, 0.0848388671875, -0.002979278564453125, 0.06890869140625, 0.0487060546875, -0.03411865234375, -0.005992889404296875, 0.0038776397705078125, 0.0190277099609375, -0.0026111602783203125, 0.0394287109375, 0.040008544921875, -0.03546142578125, -0.0048675537109375, -0.01436614990234375, 0.00193023681640625, 0.00804901123046875, -0.002483367919921875, 0.062469482421875, -0.041656494140625, -0.013824462890625, -0.034698486328125, -0.057830810546875, -0.0267181396484375, 0.006816864013671875, 0.0450439453125, 0.050811767578125, 0.0643310546875, -0.01983642578125, -0.00008815526962280273, -0.00022292137145996094, 0.00423431396484375, -0.03131103515625, 0.02423095703125, -0.0673828125, 0.060150146484375, -0.041107177734375, 0.0258026123046875, 0.059967041015625, 0.0050506591796875, -0.0162811279296875, 0.013702392578125, 0.00106048583984375, -0.007404327392578125, 0.03289794921875, -0.0001456737518310547, -0.00870513916015625, -0.051513671875, -0.00891876220703125, 0.0131683349609375, -0.0103607177734375, 0.019378662109375, -0.0117034912109375, -0.0121612548828125, 0.0221405029296875, -0.0293731689453125, -0.007045745849609375, 0.0173187255859375, -0.02191162109375, -0.01806640625, 0.0098419189453125, -0.010833740234375, -0.0128173828125, 0.01216888427734375, -0.01305389404296875, -0.00959014892578125, 0.005771636962890625, -0.09625244140625, -0.0478515625, -0.09393310546875, 0.008880615234375, -0.0236663818359375, 0.0335693359375, 0.0306243896484375, -0.01560211181640625, 0.0251007080078125, -0.0069580078125, 0.06683349609375, 0.03631591796875, -0.02545166015625, -0.007755279541015625, -0.0037021636962890625, -0.0143585205078125, 0.022857666015625, -0.01416778564453125, 0.10052490234375, 0.044403076171875, -0.0546875, 0.0169219970703125, -0.018280029296875, 0.0002655982971191406, -0.00728607177734375, 0.0202789306640625, 0.0276031494140625, -0.0033435821533203125, 0.006237030029296875, -0.048065185546875, -0.041015625, -0.035858154296875, -0.05548095703125, -0.00588226318359375, 0.051910400390625, 0.0188140869140625, -0.04412841796875, 0.0223388671875, -0.02227783203125, -0.016326904296875, 0.0751953125, -0.06658935546875, 0.0310211181640625, -0.01381683349609375, -0.0139617919921875, -0.0399169921875, 0.032257080078125, -0.01541900634765625, 0.0205230712890625, 0.00978851318359375, -0.01204681396484375, -0.032318115234375, 0.00984954833984375, -0.08721923828125, -0.061614990234375, 0.006572723388671875, -0.0916748046875, -0.030792236328125, -0.035247802734375, 0.03326416015625, -0.01117706298828125, 0.02886962890625, 0.0023555755615234375, -0.0200653076171875, -0.034210205078125, 0.0106048583984375, -0.0137481689453125, -0.07928466796875, 0.01995849609375, -0.0103759765625, -0.075439453125, -0.004497528076171875, -0.01120758056640625, -0.046356201171875, 0.014312744140625, -0.0654296875, -0.0206146240234375, -0.042236328125, 0.03857421875, -0.035552978515625, -0.00702667236328125, 0.0117950439453125, 0.0019550323486328125, -0.0243377685546875, -0.032623291015625, -0.01507568359375, -0.07977294921875, -0.0102081298828125, -0.023406982421875, 0.03765869140625, 0.040863037109375, -0.050323486328125, 0.018463134765625, 0.0631103515625, 0.00849151611328125, 0.003448486328125, -0.0011053085327148438, -0.015838623046875, -0.01776123046875, 0.032867431640625, 0.004322052001953125, 0.002105712890625, -0.0027675628662109375, 0.032257080078125, -0.038330078125, 0.049957275390625, 0.002593994140625, -0.0012454986572265625, 0.0292205810546875, -0.04705810546875, -0.0670166015625, -0.039306640625, -0.051300048828125, 0.021575927734375, -0.0009784698486328125, -0.03753662109375, -0.0517578125, -0.0828857421875, 0.01514434814453125, -0.04241943359375, -0.01438140869140625, 0.0162811279296875, 0.08319091796875, 0.01287078857421875, 0.009002685546875, -0.007770538330078125, -0.0179901123046875, 0.02862548828125, 0.006641387939453125, 0.0321044921875, 0.004550933837890625, -0.008392333984375, 0.035003662109375, -0.012481689453125, -0.00424957275390625, -0.0213165283203125, 0.057098388671875, -0.005779266357421875, -0.004119873046875, 0.0226593017578125, -0.0177154541015625, 0.0278778076171875, 0.05352783203125, -0.01739501953125, -0.0185546875, -0.0112457275390625, 0.050323486328125, -0.0215911865234375, -0.0043487548828125, -0.046539306640625, 0.00039577484130859375, 0.01375579833984375, 0.02569580078125, 0.052398681640625, 0.01044464111328125, -0.0068206787109375, -0.001651763916015625, -0.030303955078125, 0.0174713134765625, 0.0040435791015625, 0.022857666015625, 0.0027923583984375, 0.033935546875, 0.00556182861328125, 0.0020580291748046875, -0.03240966796875, 0.0183563232421875, -0.016845703125, 0.0026721954345703125, -0.014984130859375, -0.035919189453125, 0.00528717041015625, -0.03558349609375, 0.0003809928894042969, 0.01537322998046875, 0.040008544921875, 0.0154876708984375, 0.00476837158203125, 0.01117706298828125, -0.0283355712890625, 0.01003265380859375, -0.039703369140625, 0.01108551025390625, 0.0027103424072265625, -0.01424407958984375, -0.0257415771484375, 0.07830810546875, 0.01482391357421875, 0.019561767578125, -0.0035991668701171875, 0.04840087890625, 0.04302978515625, 0.00843048095703125, -0.006622314453125, 0.05328369140625, -0.01242828369140625, -0.01261138916015625, -0.016143798828125, -0.040191650390625, -0.01000213623046875, 0.03985595703125, 0.036346435546875, 0.0023212432861328125, -0.0295562744140625, 0.01245880126953125, -0.00807952880859375, -0.0207061767578125, 0.015289306640625, 0.0309600830078125, -0.01059722900390625, -0.01788330078125, -0.0197601318359375, -0.001483917236328125, 0.01110076904296875, -0.005008697509765625, -0.0027751922607421875, -0.01806640625, 0.0012903213500976562, 0.031890869140625, -0.033966064453125, 0.01181793212890625, 0.0136871337890625, -0.035308837890625, -0.017547607421875, 0.046356201171875, -0.0222625732421875, -0.00405120849609375, -0.02886962890625, -0.043792724609375, 0.060150146484375, 0.017364501953125, 0.021636962890625, -0.005718231201171875, -0.03399658203125, 0.0295257568359375, -0.010345458984375, 0.05206298828125, -0.0010538101196289062, -0.0243682861328125, -0.0260162353515625, -0.01189422607421875, -0.00701141357421875, 0.01534271240234375, -0.0018243789672851562, -0.02178955078125, 0.0147552490234375, -0.001995086669921875, 0.035675048828125, -0.0213775634765625, 0.01486968994140625, 0.0281219482421875, 0.0263519287109375, -0.01343536376953125, 0.063720703125, -0.035125732421875, 0.05841064453125, -0.0102996826171875, 0.048126220703125, -0.004169464111328125, 0.010650634765625, -0.01160430908203125, -0.0182952880859375, -0.0125732421875, -0.04443359375, -0.0279541015625, 0.0253753662109375, -0.0267486572265625, 0.033935546875, 0.052978515625, -0.0018100738525390625, 0.024871826171875, -0.033721923828125, -0.0018463134765625, -0.034332275390625, 0.01325225830078125, -0.057769775390625, 0.0430908203125, -0.024505615234375, 0.0249786376953125, 0.025543212890625, 0.0167083740234375, 0.0025272369384765625, -0.032806396484375, 0.0240020751953125, -0.00341796875, -0.037445068359375, -0.05047607421875, 0.035186767578125, 0.060455322265625, 0.00499725341796875, 0.042633056640625, 0.0024471282958984375, 0.0050506591796875, 0.040435791015625, -0.001983642578125, 0.0261077880859375, 0.030303955078125, 0.05169677734375, -0.00506591796875, 0.01074981689453125, 0.021759033203125, -0.00785064697265625, 0.00511932373046875, 0.0145263671875, 0.0295562744140625, -0.054168701171875, -0.004940032958984375, -0.0147247314453125, -0.010833740234375, 0.05047607421875, 0.01047515869140625, 0.01214599609375, 0.0443115234375, 0.0072174072265625, 0.002834320068359375, -0.01454925537109375, 0.019195556640625, 0.018157958984375, 0.00848388671875, 0.0125885009765625, 0.0286712646484375, -0.0282440185546875, -0.010650634765625, -0.0904541015625, -0.01180267333984375, -0.052886962890625, -0.0157012939453125, -0.01238250732421875, -0.01302337646484375, -0.0261077880859375, -0.026214599609375, 0.0173492431640625, -0.046661376953125, 0.022186279296875, 0.0210418701171875, -0.01436614990234375, 0.0413818359375, 0.01065826416015625, 0.007373809814453125, -0.0281982421875, -0.0231170654296875, -0.0258636474609375, -0.0310516357421875, -0.0457763671875, 0.01029205322265625, -0.01849365234375, -0.0145111083984375, 0.021697998046875, -0.0231781005859375, -0.05682373046875, -0.0033054351806640625, -0.045745849609375, 0.057861328125, -0.0494384765625, 0.005092620849609375, -0.016754150390625, 0.0274505615234375, 0.04107666015625, -0.001453399658203125, 0.0045318603515625, -0.08563232421875, -0.0657958984375, -0.01025390625, -0.06787109375, 0.00962066650390625, -0.00997161865234375, -0.07427978515625, 0.10455322265625, -0.02105712890625, 0.061676025390625, 0.03668212890625, 0.0275726318359375, -0.0218353271484375, 0.0086669921875, -0.00720977783203125, 0.0232391357421875, -0.0246734619140625, 0.0286102294921875, -0.03558349609375, -0.009185791015625, 0.0128173828125, 0.057525634765625, 0.0452880859375, 0.0220184326171875, -0.060791015625, -0.019561767578125, 0.030853271484375, 0.04620361328125, 0.00992584228515625, 0.0298919677734375, -0.0357666015625, 0.047332763671875, -0.00630950927734375, -0.0794677734375, 0.0017843246459960938, 0.007396697998046875, -0.047607421875, 0.00600433349609375, 0.0155792236328125, 0.0006432533264160156, -0.00949859619140625, -0.00740814208984375, -0.02947998046875, 0.0023040771484375, 0.01198577880859375, 0.0277099609375, 0.0172271728515625, -0.01861572265625, 0.020050048828125, -0.07293701171875, -0.04302978515625, -0.0003972053527832031, 0.033843994140625, 0.006191253662109375, 0.044769287109375, 0.025665283203125, 0.01279449462890625, 0.0660400390625, 0.000736236572265625, 0.01837158203125, 0.0133056640625, -0.0119171142578125, 0.0191650390625, 0.03619384765625, 0.0245361328125, -0.005901336669921875, -0.0130615234375, 0.0165863037109375, 0.0357666015625, -0.0288543701171875, -0.06365966796875, -0.0005736351013183594, -0.00893402099609375, 0.027435302734375, 0.013824462890625, 0.04547119140625, -0.023712158203125, -0.0121307373046875, -0.042572021484375, -0.0172119140625, 0.00841522216796875, 0.01029205322265625, -0.01482391357421875, -0.017852783203125, 0.0089874267578125, -0.006862640380859375, -0.036285400390625, 0.00815582275390625, -0.00086212158203125, 0.039093017578125, 0.02691650390625, 0.0238800048828125, 0.00234222412109375, -0.01186370849609375, 0.023223876953125, -0.002796173095703125, -0.021697998046875, -0.0224761962890625, -0.0462646484375, -0.0723876953125, 0.044952392578125, 0.0670166015625, 0.0208282470703125, -0.018096923828125, 0.00027108192443847656, -0.00899505615234375, -0.004993438720703125, -0.0052947998046875, -0.004940032958984375, -0.0202789306640625, -0.006038665771484375, -0.025146484375, -0.01453399658203125, -0.012298583984375, -0.0175323486328125, 0.00577545166015625, 0.006473541259765625, -0.017425537109375, 0.0108642578125, 0.04449462890625, 0.0137481689453125, 0.0040130615234375, 0.002685546875, 0.00036787986755371094, 0.0204010009765625, 0.04180908203125, -0.01531982421875, -0.006046295166015625, 0.00743865966796875, -0.07275390625, 0.01114654541015625, 0.055694580078125, 0.000873565673828125, -0.01535797119140625, -0.028778076171875, 0.0258026123046875, -0.005825042724609375, -0.0216217041015625, -0.01500701904296875, 0.0236968994140625, 0.0145263671875, 0.01438140869140625, -0.0250244140625, -0.02349853515625, -0.0157623291015625, 0.043853759765625, 0.0049591064453125, 0.09869384765625, -0.049346923828125, 0.0226593017578125, -0.0190887451171875, 0.006404876708984375, -0.006641387939453125, -0.0025234222412109375, -0.0252685546875, 0.0141143798828125, 0.020233154296875, 0.00908660888671875, -0.01430511474609375, -0.0001596212387084961, 0.040496826171875, -0.0635986328125, 0.0253448486328125, -0.037445068359375, 0.015350341796875, -0.05072021484375, -0.019805908203125, -0.058441162109375, -0.06243896484375, -0.037750244140625, -0.003692626953125, -0.01532745361328125, -0.02130126953125, -0.01251983642578125, 0.08740234375, 0.015533447265625, 0.030364990234375, -0.0005655288696289062, -0.053070068359375, 0.0153961181640625, 0.043701171875, -0.028228759765625, -0.01523590087890625, 0.040740966796875, -0.00737762451171875, 0.01177215576171875, 0.016265869140625, 0.037445068359375, 0.00437164306640625, 0.006977081298828125, 0.00270843505859375, -0.004550933837890625, 0.0176239013671875, 0.0081634521484375, 0.0002574920654296875, -0.0106964111328125, -0.00466156005859375, -0.014617919921875, -0.0160369873046875, -0.01512908935546875, -0.0233917236328125, -0.00675201416015625, 0.015045166015625, -0.00405120849609375, -0.00952911376953125, -0.0178375244140625, 0.0033702850341796875, 0.0411376953125, -0.01447296142578125, -0.0518798828125, 0.035491943359375, -0.03985595703125, 0.0445556640625, -0.017364501953125, -0.07366943359375, 0.0194854736328125, 0.062744140625, -0.01158905029296875, -0.0091552734375, -0.035247802734375, -0.045196533203125, -0.058837890625, 0.0197296142578125, 0.038299560546875, -0.016265869140625, -0.0059814453125, -0.007610321044921875, -0.00775146484375, 0.057281494140625, -0.0127716064453125, -0.01406097412109375, 0.03411865234375, -0.01349639892578125, -0.0251922607421875, -0.051513671875, 0.00991058349609375, -0.0814208984375, -0.0139312744140625, 0.027984619140625, -0.019927978515625, 0.00914764404296875, -0.01934814453125, -0.023468017578125, 0.02764892578125, 0.022491455078125, -0.0160064697265625, -0.068359375, 0.0303192138671875, 0.0222320556640625, -0.03192138671875, -0.0261688232421875, 0.0007901191711425781, -0.0390625, 0.01226806640625, 0.01172637939453125, 0.034332275390625, 0.01397705078125, 0.031646728515625, 0.034088134765625, 0.032379150390625, 0.01715087890625, -0.0240631103515625, -0.037353515625, 0.003482818603515625, 0.028106689453125, 0.028228759765625, -0.0013065338134765625, 0.0167388916015625, 0.041168212890625, -0.0126800537109375, 0.0145721435546875, -0.030426025390625, -0.054840087890625, -0.040771484375, 0.049530029296875, 0.038330078125, 0.0207977294921875, -0.024993896484375, 0.02337646484375, -0.0197906494140625, -0.05303955078125, -0.0095367431640625, 0.041473388671875, -0.06085205078125, -0.020965576171875, 0.0238037109375, 0.01190948486328125, -0.005329132080078125, -0.0298614501953125, -0.0210418701171875, -0.005397796630859375, -0.01395416259765625, -0.01287841796875, -0.00308990478515625, 0.0280914306640625, 0.03472900390625, -0.0107421875, 0.029876708984375, -0.040008544921875, 0.0090789794921875, 0.0406494140625, -0.037261962890625, -0.0022296905517578125, -0.0033130645751953125, -0.0110931396484375, 0.0072174072265625, 0.01329803466796875, 0.054595947265625, -0.021575927734375, -0.0208892822265625, -0.00586700439453125, -0.0028171539306640625, -0.004238128662109375, -0.0181121826171875, -0.01462554931640625, 0.0113677978515625, -0.00579833984375, 0.038726806640625, -0.0125579833984375, -0.0328369140625, -0.018280029296875, 0.0335693359375, -0.032867431640625, 0.01189422607421875, -0.0102691650390625, -0.008270263671875, -0.00026869773864746094, 0.0191650390625, -0.030364990234375, -0.0382080078125, 0.010772705078125, -0.0550537109375, 0.0050811767578125, 0.006256103515625 ]
36cc8b97503ac810327d53599ded89e8ae871fcd
Wordpress Stackexchange Q: How to appending to the_content using add_filter with custom post type? I have a custom post type running fine, but some of the text in the page is the same for every post, so I want to add it in using a function. I have this set up: function new_default_content($content) { global $post; if ($post->post_type == 'custom-post-type') { $content = 'Test text here'; } return $content; } add_filter('the_content', 'new_default_content'); However when I refresh the page, I only see "Text test here" and not the the post's content (from the_content). If I comment out this function, the post content reappears. What am I doing wrong? A: You're completely overwriting the content instead of appending it. You need to do something like $content .= 'Test text here'; instead.
Q: How to appending to the_content using add_filter with custom post type? I have a custom post type running fine, but some of the text in the page is the same for every post, so I want to add it in using a function. I have this set up: function new_default_content($content) { global $post; if ($post->post_type == 'custom-post-type') { $content = 'Test text here'; } return $content; } add_filter('the_content', 'new_default_content'); However when I refresh the page, I only see "Text test here" and not the the post's content (from the_content). If I comment out this function, the post content reappears. What am I doing wrong? A: You're completely overwriting the content instead of appending it. You need to do something like $content .= 'Test text here'; instead. A: In Simple way ` if ($post->post_type == 'custom-post-type') { $new_content= 'Test text here'; } return $content.$new_content;
wordpress
{ "language": "en", "length": 144, "provenance": "stackexchange_00019.jsonl.gz:412974", "question_score": "10", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28267" }
[ 0.0355224609375, -0.0192718505859375, 0.0134429931640625, -0.04669189453125, 0.0124664306640625, -0.00937652587890625, 0.03509521484375, -0.01021575927734375, -0.015472412109375, -0.00458526611328125, -0.0255584716796875, -0.025787353515625, -0.04302978515625, -0.030975341796875, -0.0052490234375, -0.06494140625, 0.0369873046875, -0.02056884765625, 0.0295257568359375, -0.031463623046875, -0.0020923614501953125, -0.0087890625, 0.038848876953125, 0.04351806640625, -0.0078582763671875, 0.027191162109375, 0.08349609375, -0.0162200927734375, 0.0128021240234375, -0.0010461807250976562, 0.0214691162109375, -0.04595947265625, 0.022308349609375, 0.033782958984375, -0.06671142578125, 0.021453857421875, -0.0136260986328125, 0.01030731201171875, -0.00643157958984375, 0.037506103515625, 0.00977325439453125, 0.007740020751953125, 0.0141143798828125, 0.0250396728515625, -0.003932952880859375, -0.052825927734375, 0.03076171875, -0.04010009765625, -0.005382537841796875, -0.0095977783203125, 0.01174163818359375, -0.0019588470458984375, 0.03839111328125, -0.06805419921875, 0.006938934326171875, 0.00019299983978271484, -0.0311126708984375, 0.02728271484375, 0.048614501953125, -0.0060577392578125, -0.04107666015625, -0.034515380859375, 0.0205535888671875, -0.023223876953125, 0.0140838623046875, 0.0097808837890625, 0.045806884765625, 0.018890380859375, -0.0823974609375, 0.00511932373046875, 0.049713134765625, -0.05718994140625, 0.028778076171875, -0.031341552734375, 0.007083892822265625, -0.0214691162109375, -0.00473785400390625, -0.02264404296875, 0.018402099609375, -0.00798797607421875, 0.0059967041015625, 0.0131683349609375, -0.0081939697265625, -0.04931640625, 0.0015411376953125, -0.03753662109375, -0.029571533203125, 0.0108489990234375, 0.006824493408203125, -0.0018720626831054688, 0.0048675537109375, -0.00841522216796875, 0.01511383056640625, 0.005767822265625, -0.007526397705078125, -0.0379638671875, -0.0013446807861328125, 0.044097900390625, -0.00960540771484375, 0.0584716796875, 0.016937255859375, -0.06414794921875, 0.125244140625, -0.0872802734375, 0.025726318359375, 0.027069091796875, -0.038299560546875, -0.05712890625, 0.04193115234375, 0.03704833984375, 0.00042247772216796875, 0.0192108154296875, -0.007843017578125, -0.0118560791015625, -0.0265350341796875, 0.0189361572265625, -0.026275634765625, -0.01209259033203125, -0.00897979736328125, 0.0089569091796875, -0.001346588134765625, 0.00539398193359375, -0.0169830322265625, -0.039886474609375, 0.034881591796875, -0.01690673828125, -0.0411376953125, 0.02423095703125, 0.0157318115234375, 0.01154327392578125, -0.036163330078125, 0.00896453857421875, 0.07830810546875, 0.03582763671875, 0.017730712890625, -0.016204833984375, -0.00804901123046875, -0.037994384765625, -0.00872039794921875, 0.03369140625, -0.005535125732421875, -0.0465087890625, -0.004848480224609375, -0.006114959716796875, 0.026336669921875, 0.051177978515625, 0.0108184814453125, -0.006435394287109375, -0.0187835693359375, -0.05389404296875, 0.0160675048828125, -0.04156494140625, 0.047393798828125, -0.011810302734375, -0.026214599609375, -0.04656982421875, -0.01202392578125, -0.026947021484375, -0.0170440673828125, -0.034637451171875, 0.048309326171875, -0.00478363037109375, -0.06787109375, -0.0174560546875, -0.05517578125, 0.0010633468627929688, -0.00737762451171875, -0.0020503997802734375, 0.005519866943359375, -0.00873565673828125, -0.00827789306640625, 0.0215301513671875, -0.03680419921875, -0.028656005859375, -0.0106048583984375, -0.0261077880859375, 0.0224609375, 0.028472900390625, -0.003387451171875, 0.041595458984375, 0.00885009765625, -0.028564453125, 0.05572509765625, -0.0117950439453125, -0.06878662109375, 0.005786895751953125, 0.0203857421875, 0.06268310546875, 0.033660888671875, 0.0167236328125, 0.042999267578125, -0.026214599609375, -0.043304443359375, -0.029052734375, 0.0267791748046875, 0.00997161865234375, -0.049163818359375, -0.034088134765625, -0.0009889602661132812, 0.0347900390625, 0.039306640625, -0.01276397705078125, 0.02899169921875, 0.001033782958984375, -0.0172119140625, -0.00798797607421875, -0.006656646728515625, 0.0142669677734375, -0.01329803466796875, -0.03424072265625, 0.0181121826171875, -0.0225372314453125, 0.0055389404296875, -0.053619384765625, -0.03436279296875, 0.03753662109375, -0.006000518798828125, 0.012786865234375, -0.002773284912109375, 0.0433349609375, -0.021087646484375, 0.006473541259765625, -0.0303192138671875, -0.0140228271484375, 0.058349609375, -0.0164794921875, -0.009674072265625, -0.024566650390625, 0.0352783203125, -0.0019779205322265625, -0.03765869140625, 0.0386962890625, 0.03948974609375, 0.0118560791015625, -0.03778076171875, -0.00701904296875, -0.02435302734375, -0.062164306640625, -0.01335906982421875, 0.07269287109375, 0.0145263671875, 0.08209228515625, 0.0071258544921875, 0.045074462890625, 0.1114501953125, 0.0390625, 0.03271484375, 0.0016269683837890625, 0.05718994140625, 0.08282470703125, -0.00786590576171875, -0.023468017578125, 0.01332855224609375, -0.070068359375, 0.0310516357421875, 0.0102691650390625, 0.01108551025390625, 0.01528167724609375, -0.019073486328125, -0.0102996826171875, 0.0033969879150390625, -0.0013093948364257812, -0.0200958251953125, 0.003650665283203125, 0.04400634765625, 0.021392822265625, 0.0338134765625, 0.028900146484375, -0.03289794921875, 0.01715087890625, 0.0230560302734375, 0.0028743743896484375, -0.00811004638671875, 0.0032939910888671875, 0.024505615234375, -0.016937255859375, -0.0261993408203125, 0.006771087646484375, 0.0303192138671875, -0.0081634521484375, -0.0007872581481933594, 0.0394287109375, -0.031036376953125, -0.018341064453125, 0.017547607421875, -0.01177215576171875, -0.0274505615234375, -0.026763916015625, 0.025054931640625, -0.034515380859375, -0.01192474365234375, 0.039154052734375, -0.01251220703125, 0.04559326171875, 0.02557373046875, -0.027435302734375, 0.028076171875, -0.044036865234375, 0.0491943359375, -0.0545654296875, 0.0167999267578125, 0.04754638671875, -0.042938232421875, 0.0234527587890625, -0.0016374588012695312, 0.069580078125, 0.006237030029296875, 0.00249481201171875, -0.0238037109375, 0.0078582763671875, -0.053436279296875, -0.0305328369140625, 0.0272216796875, 0.03973388671875, 0.00609588623046875, -0.027099609375, 0.0080108642578125, 0.02191162109375, -0.036712646484375, -0.040283203125, 0.0099334716796875, -0.043212890625, -0.035980224609375, -0.016876220703125, -0.0301971435546875, 0.0126800537109375, -0.01123809814453125, -0.013671875, 0.0092620849609375, -0.029388427734375, -0.05517578125, -0.0372314453125, -0.043304443359375, 0.0064849853515625, -0.01285552978515625, 0.006282806396484375, 0.0112457275390625, 0.0814208984375, 0.0316162109375, -0.0196685791015625, 0.045318603515625, 0.0175323486328125, -0.03302001953125, 0.0207061767578125, 0.0098114013671875, -0.0193328857421875, 0.017578125, -0.0063323974609375, 0.0099334716796875, 0.037384033203125, -0.028228759765625, -0.005931854248046875, -0.039947509765625, 0.0042572021484375, -0.01030731201171875, 0.030242919921875, 0.052398681640625, -0.0038700103759765625, 0.01445770263671875, -0.035491943359375, 0.00963592529296875, 0.003482818603515625, -0.01157379150390625, 0.01123809814453125, -0.0017032623291015625, -0.01331329345703125, -0.017669677734375, 0.05267333984375, -0.046417236328125, 0.003284454345703125, 0.08685302734375, -0.0408935546875, 0.00013375282287597656, -0.0313720703125, -0.07073974609375, -0.035003662109375, 0.0167388916015625, -0.0233917236328125, 0.0239410400390625, 0.0192413330078125, 0.02215576171875, 0.027191162109375, -0.0189208984375, 0.0027713775634765625, -0.083740234375, 0.042694091796875, -0.0282135009765625, 0.029571533203125, -0.05120849609375, -0.031341552734375, -0.007717132568359375, 0.103271484375, -0.08197021484375, -0.004558563232421875, 0.00531005859375, 0.015869140625, -0.004791259765625, -0.061187744140625, -0.04083251953125, -0.037384033203125, -0.0164794921875, 0.01467132568359375, -0.005878448486328125, -0.00032830238342285156, -0.019439697265625, 0.0333251953125, -0.013397216796875, -0.0155181884765625, 0.05743408203125, -0.06805419921875, 0.037322998046875, 0.030609130859375, 0.01316070556640625, -0.0191192626953125, -0.05389404296875, -0.0208740234375, -0.071044921875, -0.003971099853515625, -0.0223541259765625, 0.034637451171875, 0.0095672607421875, -0.009918212890625, -0.037933349609375, 0.0088958740234375, 0.048736572265625, 0.03863525390625, -0.01023101806640625, -0.035919189453125, 0.037353515625, -0.042694091796875, 0.00035953521728515625, -0.02996826171875, -0.007244110107421875, -0.00533294677734375, -0.01136016845703125, 0.0458984375, -0.0232086181640625, 0.0017061233520507812, -0.006137847900390625, -0.0291290283203125, -0.0280609130859375, -0.026947021484375, -0.0303955078125, 0.0181884765625, -0.00786590576171875, -0.00789642333984375, -0.030059814453125, -0.05322265625, 0.03192138671875, 0.0007166862487792969, -0.01288604736328125, 0.006618499755859375, 0.05718994140625, 0.0237274169921875, -0.01128387451171875, -0.0294647216796875, 0.02508544921875, 0.0333251953125, -0.02435302734375, 0.0192108154296875, -0.00168609619140625, -0.01166534423828125, 0.0408935546875, -0.0172271728515625, 0.033843994140625, -0.035003662109375, 0.08734130859375, 0.000499725341796875, 0.0030384063720703125, 0.029083251953125, -0.0109100341796875, -0.019073486328125, 0.00518035888671875, -0.0233612060546875, 0.006778717041015625, 0.01548004150390625, 0.01910400390625, -0.030426025390625, 0.026641845703125, -0.021209716796875, 0.0038509368896484375, 0.012176513671875, 0.004573822021484375, 0.01210784912109375, -0.0067138671875, 0.0211944580078125, -0.032958984375, -0.02789306640625, 0.0318603515625, 0.0085906982421875, 0.02166748046875, 0.0002180337905883789, 0.033172607421875, 0.052154541015625, 0.03338623046875, -0.018341064453125, -0.00933837890625, -0.008544921875, 0.005207061767578125, -0.049835205078125, 0.041259765625, -0.002880096435546875, 0.0087127685546875, 0.01483154296875, 0.04083251953125, -0.003704071044921875, 0.01180267333984375, 0.0184783935546875, 0.005558013916015625, 0.053466796875, 0.03900146484375, 0.00439453125, -0.0035858154296875, -0.004451751708984375, -0.0194244384765625, 0.038787841796875, -0.00939178466796875, -0.04425048828125, 0.0311279296875, -0.005184173583984375, 0.020538330078125, 0.01531982421875, 0.03289794921875, 0.0264434814453125, -0.005039215087890625, -0.0174102783203125, 0.03887939453125, -0.006900787353515625, -0.03753662109375, -0.03857421875, 0.03271484375, 0.041473388671875, -0.04071044921875, 0.0009160041809082031, 0.0222015380859375, 0.0050811767578125, 0.0032825469970703125, -0.0166778564453125, -0.0215606689453125, -0.0222015380859375, -0.0150146484375, 0.0019464492797851562, 0.033905029296875, -0.0106353759765625, -0.01043701171875, 0.0019311904907226562, -0.03106689453125, 0.019561767578125, -0.0265350341796875, 0.005840301513671875, -0.00841522216796875, -0.0201873779296875, -0.028533935546875, -0.032196044921875, -0.0113525390625, -0.026885986328125, -0.004192352294921875, -0.0184326171875, -0.012725830078125, 0.040863037109375, -0.03173828125, 0.04364013671875, -0.01233673095703125, -0.018798828125, -0.0245361328125, 0.0225982666015625, 0.0098724365234375, 0.006130218505859375, 0.007106781005859375, 0.0093231201171875, -0.04058837890625, -0.01255035400390625, -0.054351806640625, -0.0770263671875, -0.01323699951171875, -0.01552581787109375, 0.029937744140625, 0.015625, -0.02099609375, -0.06854248046875, -0.024688720703125, 0.011688232421875, 0.04742431640625, 0.04412841796875, -0.0034160614013671875, 0.0673828125, 0.0018262863159179688, 0.06890869140625, 0.01036834716796875, 0.032135009765625, -0.0166168212890625, -0.0400390625, -0.01629638671875, -0.045684814453125, 0.00815582275390625, 0.00531005859375, -0.004241943359375, 0.028350830078125, 0.0419921875, 0.0100860595703125, 0.03948974609375, -0.0206298828125, -0.009063720703125, -0.0060272216796875, 0.0115509033203125, -0.018707275390625, 0.02825927734375, 0.0273590087890625, 0.003971099853515625, 0.0284271240234375, -0.009490966796875, 0.01263427734375, -0.0166473388671875, -0.01036834716796875, -0.00179290771484375, 0.004062652587890625, -0.053070068359375, 0.050201416015625, 0.059173583984375, -0.00618743896484375, 0.047515869140625, 0.004241943359375, -0.002971649169921875, 0.0460205078125, -0.0018796920776367188, -0.00786590576171875, -0.006931304931640625, 0.0198974609375, 0.0027523040771484375, -0.0130157470703125, -0.0004551410675048828, -0.01995849609375, -0.0032978057861328125, 0.0357666015625, 0.0301971435546875, -0.08331298828125, 0.003940582275390625, -0.004520416259765625, 0.0191192626953125, 0.0162506103515625, 0.021148681640625, -0.01317596435546875, -0.01461029052734375, 0.0257415771484375, -0.0256500244140625, 0.00946044921875, 0.031280517578125, 0.008148193359375, -0.0085296630859375, -0.020294189453125, -0.01192474365234375, 0.0036334991455078125, 0.0204925537109375, 0.015533447265625, -0.0169219970703125, 0.01297760009765625, 0.0029392242431640625, 0.0247650146484375, -0.037994384765625, 0.0005965232849121094, -0.035064697265625, -0.00078582763671875, -0.0218048095703125, -0.0193634033203125, 0.01280975341796875, -0.03564453125, 0.0037708282470703125, 0.0487060546875, -0.04998779296875, 0.055084228515625, 0.021820068359375, -0.0153961181640625, -0.04217529296875, -0.0194244384765625, 0.011810302734375, 0.033782958984375, -0.042572021484375, 0.0303497314453125, -0.01396942138671875, -0.019073486328125, -0.0040435791015625, -0.06365966796875, 0.049530029296875, -0.0418701171875, -0.0030078887939453125, -0.004108428955078125, -0.0254364013671875, 0.018798828125, -0.01092529296875, 0.0270233154296875, -0.017822265625, 0.005847930908203125, -0.014617919921875, -0.01544189453125, -0.0135345458984375, -0.024139404296875, -0.09100341796875, 0.1229248046875, 0.0435791015625, 0.034942626953125, -0.0222930908203125, 0.046630859375, -0.035858154296875, 0.01300811767578125, -0.03558349609375, 0.04443359375, 0.0188446044921875, 0.06219482421875, -0.0699462890625, -0.03778076171875, 0.01500701904296875, 0.06085205078125, 0.0494384765625, 0.0107421875, -0.033416748046875, -0.01021575927734375, 0.0458984375, 0.013275146484375, -0.0167083740234375, 0.0399169921875, -0.00927734375, 0.01488494873046875, 0.044036865234375, -0.01255035400390625, 0.0208587646484375, 0.0169677734375, -0.0281982421875, 0.0278472900390625, 0.01116943359375, 0.0024814605712890625, 0.03277587890625, -0.00445556640625, -0.0273590087890625, 0.003787994384765625, 0.00983428955078125, 0.0013189315795898438, -0.00994110107421875, 0.046722412109375, 0.04827880859375, -0.036895751953125, -0.024566650390625, -0.0260162353515625, 0.050445556640625, 0.021392822265625, 0.04779052734375, 0.032989501953125, 0.01641845703125, 0.031890869140625, -0.04083251953125, 0.0091552734375, -0.0099334716796875, -0.0149078369140625, 0.035614013671875, 0.025848388671875, 0.01383209228515625, -0.032135009765625, -0.00891876220703125, 0.046844482421875, 0.05224609375, -0.0290985107421875, -0.04254150390625, 0.0216064453125, 0.012847900390625, -0.0045166015625, -0.00806427001953125, 0.01207733154296875, -0.036895751953125, -0.005710601806640625, -0.0711669921875, 0.0036373138427734375, 0.0321044921875, 0.01094818115234375, -0.0157928466796875, -0.0235137939453125, -0.00881195068359375, -0.006378173828125, -0.062164306640625, 0.023651123046875, 0.0311279296875, 0.048126220703125, 0.0179443359375, 0.07135009765625, 0.0290069580078125, -0.022552490234375, -0.0027313232421875, -0.009674072265625, -0.0212860107421875, 0.0178375244140625, -0.01105499267578125, -0.0112457275390625, -0.01403045654296875, 0.0220489501953125, 0.011688232421875, 0.022857666015625, 0.063720703125, 0.023895263671875, -0.031982421875, -0.0025920867919921875, -0.0010929107666015625, -0.03460693359375, -0.00015556812286376953, -0.041839599609375, -0.007564544677734375, 0.0104522705078125, -0.0142822265625, 0.007701873779296875, -0.0198211669921875, 0.0367431640625, 0.016876220703125, 0.012847900390625, 0.005916595458984375, -0.045501708984375, 0.0274200439453125, 0.0198211669921875, 0.08380126953125, 0.0323486328125, -0.079833984375, 0.0160369873046875, -0.046600341796875, -0.10833740234375, 0.044464111328125, 0.060943603515625, -0.0117340087890625, -0.022491455078125, 0.0264739990234375, -0.008270263671875, 0.00357818603515625, 0.000194549560546875, 0.0004680156707763672, -0.00600433349609375, 0.01885986328125, 0.00431060791015625, -0.004703521728515625, -0.00444793701171875, 0.0232086181640625, 0.0159149169921875, -0.002376556396484375, 0.028717041015625, 0.006504058837890625, 0.0180816650390625, 0.001667022705078125, 0.0300750732421875, -0.0157928466796875, 0.0017566680908203125, 0.025543212890625, 0.0292510986328125, 0.028564453125, -0.0313720703125, -0.00922393798828125, -0.0123291015625, 0.059906005859375, -0.0372314453125, -0.016143798828125, 0.00536346435546875, 0.03192138671875, -0.0396728515625, 0.0282135009765625, -0.02972412109375, 0.01122283935546875, -0.0391845703125, -0.0411376953125, 0.0458984375, -0.01012420654296875, 0.018951416015625, 0.03851318359375, 0.0295562744140625, 0.00502777099609375, 0.00896453857421875, -0.0127716064453125, 0.0177459716796875, 0.0225830078125, -0.006999969482421875, -0.038055419921875, 0.0119476318359375, -0.00955963134765625, 0.0009946823120117188, 0.0160064697265625, 0.033660888671875, 0.025177001953125, -0.0609130859375, -0.034271240234375, -0.0119171142578125, 0.034454345703125, -0.028839111328125, 0.0171966552734375, -0.0278778076171875, 0.01470947265625, 0.004974365234375, 0.041748046875, -0.01300811767578125, -0.033355712890625, 0.004909515380859375, -0.01493072509765625, -0.01074981689453125, -0.042327880859375, -0.032318115234375, 0.0238800048828125, 0.05950927734375, 0.00856781005859375, -0.071044921875, 0.029571533203125, -0.0321044921875, 0.0689697265625, 0.01885986328125, -0.04345703125, 0.0155487060546875, 0.014129638671875, -0.0144500732421875, -0.0026760101318359375, -0.03314208984375, -0.015838623046875, -0.010162353515625, 0.010009765625, 0.04180908203125, -0.020721435546875, -0.005046844482421875, -0.0105743408203125, -0.011932373046875, 0.053070068359375, -0.03948974609375, -0.00868988037109375, 0.03741455078125, -0.0117645263671875, -0.0263824462890625, -0.033477783203125, 0.0276641845703125, -0.052398681640625, -0.018218994140625, 0.00881195068359375, 0.00002294778823852539, 0.0272369384765625, -0.0229644775390625, -0.052947998046875, 0.007038116455078125, 0.0088958740234375, -0.03912353515625, -0.05828857421875, -0.0035953521728515625, -0.004528045654296875, 0.01442718505859375, -0.01302337646484375, -0.0372314453125, -0.0261077880859375, 0.048614501953125, -0.016998291015625, 0.039154052734375, 0.043548583984375, -0.04083251953125, -0.0248260498046875, -0.07037353515625, -0.043060302734375, -0.01143646240234375, 0.042724609375, -0.06524658203125, 0.05877685546875, 0.02813720703125, -0.022125244140625, -0.043060302734375, 0.00775146484375, -0.04656982421875, -0.005161285400390625, -0.059051513671875, -0.03509521484375, -0.023834228515625, 0.0770263671875, 0.03302001953125, 0.0242462158203125, -0.0335693359375, 0.0033111572265625, 0.018096923828125, -0.037017822265625, -0.00434112548828125, 0.0213470458984375, -0.0380859375, -0.01296234130859375, -0.03277587890625, -0.01479339599609375, -0.0216522216796875, -0.00608062744140625, -0.0494384765625, 0.0029773712158203125, 0.018096923828125, 0.0304718017578125, -0.04736328125, -0.04217529296875, 0.027008056640625, -0.0081939697265625, 0.0214080810546875, -0.00208282470703125, 0.02667236328125, 0.0160980224609375, 0.0291595458984375, -0.00641632080078125, 0.00482177734375, -0.0288848876953125, -0.003017425537109375, 0.0013914108276367188, 0.01258087158203125, 0.00618743896484375, -0.00917816162109375, -0.001995086669921875, 0.00136566162109375, -0.0191192626953125, 0.0011053085327148438, 0.0159759521484375, 0.04473876953125, -0.01282501220703125, 0.0386962890625, -0.032073974609375, 0.007232666015625, -0.0191802978515625, 0.006595611572265625, -0.02838134765625, 0.0290679931640625, 0.00457000732421875, -0.0008416175842285156, 0.007526397705078125, -0.033599853515625, -0.005222320556640625, -0.0270233154296875, 0.000614166259765625, -0.03826904296875, -0.0242767333984375, 0.0110626220703125 ]
79d8c02a1172b158c05cd6e65c6841ae1667b4b1
Wordpress Stackexchange Q: Order by & include array by specific post ids I have the following: <?php $num_cols = 2; // set the number of columns here $args = array( 'post_type' => 'testimonials', 'posts_per_page' => 4, 'orderby' => 'ID', 'include' => '883, 563, 568, 106', 'order' => '' ); query_posts($args); if (have_posts()) : for ( $i=1 ; $i <= $num_cols; $i++ ) : echo '<div id="col-'.$i.'" class="col">'; $counter = $num_cols + 1 - $i; while (have_posts()) : the_post(); if( $counter%$num_cols == 0 ) : ?> <div id="box"> <?php the_post_thumbnail('post-thumbnail', array('title' => '', 'alt' => '')); ?> <?php the_excerpt();?> </div> <?php endif; $counter++; endwhile; echo '</div>'; endfor; endif; wp_reset_query(); ?> I thought that simply putting the post Ids, I could have the specific posts appear, and only those posts. Unfortunately, that doesn't seem to be the case. So I was wondering if anyone knew how I can accomplish this. Thanks in advance! A: $args = array( 'post_type' => 'testimonials', 'posts_per_page' => 4, 'orderby' => 'post__in', 'post__in' => array(883, 563, 568, 106) ); Using post__in within the orderby value it will honour the order of the array of IDs passed in post__in
Q: Order by & include array by specific post ids I have the following: <?php $num_cols = 2; // set the number of columns here $args = array( 'post_type' => 'testimonials', 'posts_per_page' => 4, 'orderby' => 'ID', 'include' => '883, 563, 568, 106', 'order' => '' ); query_posts($args); if (have_posts()) : for ( $i=1 ; $i <= $num_cols; $i++ ) : echo '<div id="col-'.$i.'" class="col">'; $counter = $num_cols + 1 - $i; while (have_posts()) : the_post(); if( $counter%$num_cols == 0 ) : ?> <div id="box"> <?php the_post_thumbnail('post-thumbnail', array('title' => '', 'alt' => '')); ?> <?php the_excerpt();?> </div> <?php endif; $counter++; endwhile; echo '</div>'; endfor; endif; wp_reset_query(); ?> I thought that simply putting the post Ids, I could have the specific posts appear, and only those posts. Unfortunately, that doesn't seem to be the case. So I was wondering if anyone knew how I can accomplish this. Thanks in advance! A: $args = array( 'post_type' => 'testimonials', 'posts_per_page' => 4, 'orderby' => 'post__in', 'post__in' => array(883, 563, 568, 106) ); Using post__in within the orderby value it will honour the order of the array of IDs passed in post__in A: use post__in key instead of include to get posts from the specific post ids. $args = array( 'post_type' => 'testimonials', 'posts_per_page' => 4, 'orderby' => 'ID', 'post__in' => array(883, 563, 568, 106), ); And to order posts by the given posts ids, you can use the following array. $args = array( 'post_type' => 'testimonials', 'posts_per_page' => 4, 'orderby' => 'post__in', 'post__in' => array(883, 563, 568, 106), ); A: for me it works removing the colon "; " and replacing for a coma "," like this: 'orderby' => 'post__in', 'post__in' => array(185, 157, 163),
wordpress
{ "language": "en", "length": 282, "provenance": "stackexchange_00019.jsonl.gz:412990", "question_score": "7", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28306" }
[ 0.0576171875, 0.0033702850341796875, -0.004878997802734375, -0.0232391357421875, 0.022247314453125, -0.03350830078125, 0.043060302734375, -0.0245208740234375, -0.026519775390625, 0.0256500244140625, -0.04681396484375, -0.009033203125, -0.033966064453125, -0.014801025390625, -0.011688232421875, -0.061279296875, 0.0341796875, -0.016265869140625, 0.0292510986328125, -0.00792694091796875, 0.0244903564453125, 0.01151275634765625, 0.0229034423828125, 0.054351806640625, 0.0164947509765625, -0.022796630859375, 0.041839599609375, -0.0333251953125, 0.01690673828125, -0.0033359527587890625, 0.016326904296875, -0.004985809326171875, 0.035675048828125, -0.0258331298828125, 0.0214996337890625, 0.01399993896484375, 0.046142578125, -0.03466796875, 0.0171661376953125, 0.01548004150390625, 0.006389617919921875, -0.0079498291015625, 0.04571533203125, -0.00864410400390625, -0.00394439697265625, -0.00412750244140625, 0.0151214599609375, -0.0156707763671875, 0.042449951171875, -0.036468505859375, -0.0185394287109375, 0.0304107666015625, 0.003173828125, -0.0477294921875, -0.013641357421875, 0.0091705322265625, 0.0147857666015625, -0.0278472900390625, 0.0281829833984375, -0.0200347900390625, -0.030242919921875, -0.0015192031860351562, 0.0274810791015625, -0.0081329345703125, -0.008941650390625, 0.0019369125366210938, 0.035400390625, 0.0088348388671875, -0.048004150390625, -0.0199432373046875, 0.04046630859375, -0.0196380615234375, -0.00708770751953125, -0.05462646484375, -0.01081085205078125, 0.058624267578125, -0.0230865478515625, -0.0219573974609375, 0.0015954971313476562, -0.0086212158203125, -0.0225372314453125, 0.0086517333984375, -0.0221099853515625, -0.03350830078125, 0.0018568038940429688, -0.0184478759765625, -0.0162506103515625, 0.003292083740234375, -0.0233306884765625, -0.0287933349609375, -0.0193634033203125, -0.0257720947265625, -0.030029296875, 0.03411865234375, 0.005039215087890625, -0.01486968994140625, 0.042022705078125, 0.08392333984375, -0.01250457763671875, 0.0032825469970703125, -0.0108184814453125, -0.026153564453125, -0.01123809814453125, -0.041839599609375, 0.0213165283203125, 0.0164794921875, -0.01131439208984375, 0.0164337158203125, 0.057586669921875, 0.046783447265625, 0.01343536376953125, 0.031768798828125, 0.00818634033203125, -0.0269622802734375, -0.03533935546875, 0.0017385482788085938, -0.0267333984375, 0.00408172607421875, 0.0211181640625, -0.0211029052734375, -0.0127716064453125, 0.01319122314453125, -0.003452301025390625, -0.02978515625, 0.01715087890625, -0.0020198822021484375, 0.0002410411834716797, -0.016845703125, 0.00893402099609375, 0.047637939453125, -0.042694091796875, -0.0147857666015625, 0.071044921875, 0.047027587890625, 0.0239715576171875, -0.041656494140625, 0.023834228515625, -0.008819580078125, 0.00421142578125, -0.02032470703125, 0.0057525634765625, 0.0019779205322265625, 0.0291900634765625, -0.0164947509765625, 0.00487518310546875, 0.00725555419921875, 0.0118560791015625, 0.004291534423828125, 0.004405975341796875, -0.031646728515625, -0.0084991455078125, -0.007389068603515625, 0.03558349609375, 0.0057525634765625, -0.03704833984375, 0.0098724365234375, 0.006305694580078125, -0.00016939640045166016, -0.046478271484375, -0.0164337158203125, 0.023651123046875, 0.01947021484375, -0.003997802734375, -0.05706787109375, -0.066650390625, -0.0199432373046875, -0.019622802734375, -0.0171966552734375, 0.0251922607421875, 0.042083740234375, -0.00958251953125, -0.022552490234375, 0.047393798828125, 0.048614501953125, -0.006954193115234375, 0.03399658203125, -0.0081024169921875, -0.01556396484375, 0.021392822265625, 0.01197052001953125, -0.0171356201171875, -0.034942626953125, -0.0090484619140625, 0.0010776519775390625, -0.053741455078125, 0.05108642578125, 0.01389312744140625, 0.062347412109375, 0.006511688232421875, 0.006366729736328125, 0.04156494140625, 0.01222991943359375, -0.051544189453125, 0.038818359375, 0.0140838623046875, -0.048126220703125, -0.00841522216796875, -0.0261077880859375, 0.00586700439453125, -0.006191253662109375, 0.01021575927734375, 0.0128936767578125, -0.01515960693359375, -0.0098724365234375, -0.05548095703125, -0.0156402587890625, -0.00479888916015625, 0.041595458984375, -0.019683837890625, -0.00028967857360839844, 0.0289306640625, 0.01898193359375, -0.04437255859375, -0.0019121170043945312, -0.0306549072265625, 0.004268646240234375, 0.006771087646484375, 0.043182373046875, -0.01041412353515625, 0.036376953125, -0.05731201171875, -0.0210113525390625, -0.032440185546875, 0.0231781005859375, 0.0867919921875, -0.038604736328125, -0.0018672943115234375, -0.05767822265625, 0.044158935546875, -0.00882720947265625, -0.05633544921875, 0.050933837890625, 0.00794219970703125, 0.038116455078125, -0.052703857421875, -0.0287933349609375, -0.0029773712158203125, -0.00814056396484375, 0.035980224609375, 0.04034423828125, 0.0170745849609375, -0.0015745162963867188, 0.0014247894287109375, 0.049957275390625, 0.01141357421875, 0.01171875, 0.032073974609375, -0.00374603271484375, -0.026885986328125, 0.0217437744140625, 0.016357421875, 0.038055419921875, 0.015869140625, 0.0024929046630859375, 0.0181732177734375, 0.0258941650390625, -0.01380157470703125, 0.038543701171875, -0.042816162109375, 0.01123809814453125, -0.0197906494140625, -0.0302581787109375, 0.01157379150390625, -0.029571533203125, 0.01197052001953125, 0.00839996337890625, 0.01111602783203125, 0.00711822509765625, -0.037567138671875, 0.0215301513671875, 0.014129638671875, -0.0008397102355957031, -0.0022106170654296875, -0.0411376953125, -0.047576904296875, 0.0229034423828125, -0.0396728515625, 0.04510498046875, 0.01229095458984375, -0.03741455078125, -0.00823211669921875, 0.0269317626953125, -0.028106689453125, 0.006778717041015625, -0.04986572265625, -0.07696533203125, 0.0279998779296875, 0.07244873046875, -0.0244903564453125, 0.0004165172576904297, 0.0274810791015625, 0.0202484130859375, -0.024566650390625, 0.02117919921875, 0.0115203857421875, 0.0029449462890625, -0.01021575927734375, -0.077880859375, 0.045440673828125, -0.07196044921875, 0.040130615234375, 0.07659912109375, -0.02362060546875, 0.019683837890625, -0.00494384765625, 0.0154266357421875, -0.00897979736328125, 0.04150390625, 0.000644683837890625, -0.05548095703125, 0.0034542083740234375, 0.0130767822265625, 0.03680419921875, 0.10101318359375, -0.00861358642578125, -0.022735595703125, 0.0135955810546875, 0.04583740234375, -0.06365966796875, -0.1407470703125, 0.0748291015625, -0.036285400390625, -0.0162353515625, -0.0044097900390625, -0.031890869140625, -0.0243377685546875, 0.007801055908203125, -0.0256805419921875, -0.0288543701171875, 0.0131378173828125, -0.03973388671875, -0.0305938720703125, -0.056854248046875, 0.0226287841796875, -0.0022487640380859375, 0.04461669921875, 0.015411376953125, 0.052764892578125, 0.023406982421875, -0.038055419921875, 0.036285400390625, 0.0535888671875, -0.036865234375, 0.010223388671875, -0.00458526611328125, -0.0135498046875, -0.045318603515625, 0.00266265869140625, 0.06219482421875, -0.00823211669921875, -0.01355743408203125, 0.0176239013671875, -0.017852783203125, 0.036712646484375, 0.0021457672119140625, 0.0655517578125, 0.01678466796875, 0.027984619140625, 0.037261962890625, -0.007080078125, -0.032196044921875, -0.0026721954345703125, -0.056915283203125, -0.0306243896484375, 0.023529052734375, 0.0173492431640625, -0.023681640625, -0.007354736328125, 0.0166168212890625, 0.015350341796875, -0.00653076171875, -0.0081939697265625, 0.036346435546875, 0.0029144287109375, 0.0054168701171875, -0.044647216796875, 0.0242767333984375, 0.0048980712890625, -0.037567138671875, -0.0146636962890625, 0.02874755859375, -0.0035266876220703125, -0.00542449951171875, -0.056427001953125, -0.036376953125, 0.035064697265625, 0.00283050537109375, 0.00275421142578125, -0.0165252685546875, -0.035736083984375, -0.007266998291015625, 0.052947998046875, -0.06414794921875, -0.0260467529296875, -0.041778564453125, 0.00494384765625, -0.0025043487548828125, -0.04742431640625, 0.01195526123046875, -0.007747650146484375, -0.030853271484375, -0.01617431640625, -0.0357666015625, -0.0260009765625, -0.0066070556640625, -0.004390716552734375, -0.00847625732421875, -0.0309906005859375, 0.051116943359375, 0.0228424072265625, 0.00353240966796875, 0.0203399658203125, -0.012420654296875, 0.019622802734375, -0.05023193359375, 0.004802703857421875, -0.1072998046875, -0.032135009765625, 0.035064697265625, 0.0777587890625, -0.039306640625, 0.01215362548828125, -0.06805419921875, 0.049560546875, -0.0294036865234375, -0.00785064697265625, 0.018402099609375, 0.053497314453125, -0.0634765625, -0.00016570091247558594, 0.010528564453125, -0.040557861328125, -0.0166473388671875, -0.03302001953125, 0.0218353271484375, 0.035675048828125, -0.032379150390625, 0.0158843994140625, -0.03033447265625, 0.005588531494140625, -0.060150146484375, -0.03485107421875, 0.00775146484375, 0.0181427001953125, -0.0157470703125, 0.024322509765625, -0.048126220703125, -0.05340576171875, -0.004787445068359375, 0.0316162109375, -0.03778076171875, 0.00685882568359375, 0.031951904296875, 0.0230255126953125, -0.0295562744140625, -0.03314208984375, 0.03363037109375, 0.03607177734375, 0.0023593902587890625, 0.03662109375, 0.006481170654296875, -0.01555633544921875, 0.041656494140625, 0.003192901611328125, -0.0052337646484375, -0.0068359375, -0.0083770751953125, 0.006103515625, -0.0361328125, 0.02508544921875, -0.000018537044525146484, 0.057891845703125, 0.0477294921875, 0.007106781005859375, -0.025634765625, -0.00241851806640625, 0.04296875, 0.0073089599609375, -0.008331298828125, -0.0191497802734375, -0.01396942138671875, 0.0010938644409179688, -0.00970458984375, 0.0130462646484375, 0.0195159912109375, -0.0030727386474609375, 0.010040283203125, 0.0146636962890625, 0.012298583984375, 0.0728759765625, 0.04608154296875, 0.031982421875, 0.034423828125, 0.0797119140625, 0.0157928466796875, 0.004863739013671875, -0.01953125, 0.05694580078125, 0.014862060546875, -0.0479736328125, 0.0177764892578125, 0.006259918212890625, 0.0285186767578125, -0.01177978515625, -0.034393310546875, 0.015899658203125, 0.0484619140625, 0.00849151611328125, 0.0180816650390625, -0.0408935546875, 0.0244140625, -0.018218994140625, 0.0257415771484375, 0.0210113525390625, -0.004047393798828125, -0.00716400146484375, 0.07611083984375, 0.03814697265625, 0.0213775634765625, -0.03887939453125, 0.049591064453125, 0.04833984375, 0.0176544189453125, 0.0105133056640625, -0.01456451416015625, -0.029144287109375, 0.0242919921875, -0.0079345703125, -0.0297393798828125, 0.00536346435546875, 0.0103759765625, 0.0245513916015625, -0.0052642822265625, -0.00678253173828125, 0.0272064208984375, 0.01230621337890625, -0.01104736328125, 0.03216552734375, 0.01291656494140625, -0.0347900390625, -0.016357421875, -0.0037784576416015625, 0.0124664306640625, -0.005809783935546875, 0.0026416778564453125, -0.00780487060546875, -0.0308380126953125, -0.033447265625, 0.0099334716796875, -0.0298919677734375, -0.039154052734375, -0.0286102294921875, -0.0012216567993164062, -0.0225067138671875, -0.036346435546875, 0.006317138671875, -0.031494140625, 0.0299224853515625, 0.00615692138671875, -0.0002925395965576172, -0.0273284912109375, 0.055511474609375, -0.036773681640625, -0.0153350830078125, -0.026611328125, 0.01446533203125, 0.0245361328125, 0.022491455078125, -0.0240325927734375, -0.01100921630859375, -0.051727294921875, -0.018157958984375, 0.044281005859375, -0.005435943603515625, -0.003002166748046875, -0.02581787109375, 0.004535675048828125, 0.033203125, -0.0194091796875, -0.0484619140625, -0.02032470703125, -0.036346435546875, 0.0002884864807128906, -0.00281524658203125, -0.0170745849609375, 0.044097900390625, 0.005725860595703125, 0.0159454345703125, 0.0127105712890625, 0.018463134765625, -0.0116424560546875, -0.0068511962890625, -0.00499725341796875, -0.053314208984375, -0.00970458984375, 0.03521728515625, -0.041046142578125, -0.007720947265625, 0.005397796630859375, -0.0032444000244140625, 0.016845703125, -0.0292816162109375, 0.0023956298828125, -0.01428985595703125, -0.0008072853088378906, -0.048370361328125, -0.036651611328125, 0.031463623046875, -0.0242767333984375, 0.00017344951629638672, 0.0199737548828125, 0.0034084320068359375, 0.0081329345703125, -0.0199737548828125, 0.020050048828125, -0.0011539459228515625, -0.0206146240234375, 0.031982421875, 0.06854248046875, 0.044525146484375, 0.053192138671875, 0.02410888671875, 0.0282440185546875, 0.0018014907836914062, -0.005523681640625, 0.03326416015625, 0.0005512237548828125, 0.0885009765625, -0.00699615478515625, -0.0184173583984375, 0.050323486328125, -0.053466796875, 0.004489898681640625, -0.004665374755859375, 0.01091766357421875, 0.00039196014404296875, 0.00522613525390625, -0.03125, -0.02618408203125, 0.055419921875, -0.0159454345703125, -0.002655029296875, -0.0006313323974609375, 0.0662841796875, -0.0054931640625, -0.0394287109375, 0.0258941650390625, 0.006504058837890625, -0.016510009765625, -0.00919342041015625, -0.024383544921875, -0.005077362060546875, -0.04852294921875, -0.00032067298889160156, 0.023529052734375, -0.0288238525390625, 0.007778167724609375, 0.0006551742553710938, 0.0028781890869140625, -0.01386260986328125, -0.03582763671875, 0.00782012939453125, -0.044219970703125, -0.016204833984375, 0.04693603515625, -0.002048492431640625, -0.013092041015625, 0.0282135009765625, 0.001903533935546875, -0.00669097900390625, 0.007297515869140625, -0.073486328125, -0.052764892578125, -0.003299713134765625, 0.00299835205078125, 0.0288543701171875, -0.0018634796142578125, 0.0312347412109375, -0.008270263671875, -0.0205078125, -0.0038890838623046875, 0.036651611328125, 0.0882568359375, -0.060699462890625, -0.01476287841796875, 0.048492431640625, 0.0241241455078125, -0.0291900634765625, -0.0036411285400390625, 0.036041259765625, -0.0736083984375, -0.0294952392578125, 0.023834228515625, 0.008880615234375, -0.0270233154296875, 0.004009246826171875, -0.0523681640625, 0.0872802734375, -0.03570556640625, 0.00016224384307861328, 0.004398345947265625, 0.047882080078125, -0.0286102294921875, 0.019775390625, -0.018218994140625, 0.004180908203125, -0.046600341796875, 0.0531005859375, -0.072998046875, -0.02557373046875, -0.002590179443359375, 0.07452392578125, 0.050018310546875, 0.00942230224609375, -0.02783203125, -0.0170745849609375, 0.0595703125, 0.06591796875, 0.0078887939453125, 0.005672454833984375, 0.00751495361328125, 0.07000732421875, 0.044158935546875, -0.037139892578125, 0.03997802734375, -0.0277099609375, -0.0292510986328125, 0.030181884765625, 0.0247650146484375, 0.035369873046875, -0.01041412353515625, 0.02618408203125, -0.0596923828125, -0.005916595458984375, 0.0714111328125, -0.0546875, 0.01666259765625, 0.0091705322265625, 0.045684814453125, -0.050811767578125, -0.04705810546875, -0.0014619827270507812, 0.039215087890625, 0.0280609130859375, 0.0628662109375, 0.0394287109375, 0.032928466796875, 0.09954833984375, 0.004138946533203125, 0.048492431640625, 0.0256805419921875, -0.039703369140625, 0.0245361328125, 0.0260009765625, 0.0161285400390625, -0.048309326171875, -0.007904052734375, 0.0711669921875, 0.032867431640625, -0.04443359375, 0.0036640167236328125, 0.006664276123046875, -0.0011644363403320312, 0.013458251953125, -0.037811279296875, 0.0188140869140625, -0.020538330078125, -0.0213775634765625, -0.01219940185546875, -0.03741455078125, 0.018646240234375, -0.01959228515625, -0.0004520416259765625, -0.0294647216796875, 0.045440673828125, -0.003139495849609375, -0.04736328125, 0.0521240234375, 0.01404571533203125, 0.03564453125, -0.01520538330078125, 0.07281494140625, 0.002544403076171875, 0.0008158683776855469, -0.0245361328125, 0.0172882080078125, 0.039276123046875, 0.0134429931640625, -0.0384521484375, 0.0001735687255859375, -0.006381988525390625, 0.029632568359375, -0.00907135009765625, -0.009765625, 0.0183258056640625, 0.030731201171875, -0.032135009765625, -0.0205841064453125, 0.037353515625, -0.0187225341796875, -0.0224609375, -0.03033447265625, 0.003864288330078125, 0.0298309326171875, -0.0014905929565429688, 0.04180908203125, 0.0210418701171875, 0.0264739990234375, -0.0009851455688476562, 0.0146942138671875, 0.00567626953125, 0.001514434814453125, 0.00982666015625, 0.0284423828125, -0.006496429443359375, 0.027679443359375, -0.053131103515625, -0.0096893310546875, -0.0215301513671875, -0.049652099609375, 0.048431396484375, 0.0472412109375, -0.0189971923828125, 0.02337646484375, 0.0233306884765625, -0.037811279296875, -0.018157958984375, 0.0228271484375, 0.027862548828125, 0.0304718017578125, 0.0019893646240234375, 0.0154571533203125, -0.048065185546875, -0.04571533203125, 0.01263427734375, 0.042877197265625, -0.0020751953125, 0.0280609130859375, 0.005367279052734375, 0.01343536376953125, 0.008270263671875, -0.002185821533203125, 0.01544952392578125, -0.0121307373046875, 0.0943603515625, 0.005767822265625, -0.0099029541015625, -0.0240936279296875, 0.0278167724609375, 0.0185699462890625, 0.033172607421875, -0.0256805419921875, 0.00641632080078125, -0.0279388427734375, 0.0157012939453125, -0.034454345703125, 0.0068817138671875, -0.0231475830078125, -0.0287628173828125, -0.0374755859375, -0.01540374755859375, 0.0295562744140625, 0.01241302490234375, -0.016326904296875, 0.03656005859375, 0.021697998046875, -0.026397705078125, 0.030548095703125, -0.031982421875, 0.051513671875, 0.03369140625, 0.031280517578125, -0.004192352294921875, 0.014129638671875, -0.010162353515625, 0.0012969970703125, 0.0278167724609375, 0.0256805419921875, 0.0046844482421875, -0.0271759033203125, 0.01068878173828125, 0.04449462890625, 0.0484619140625, -0.0279998779296875, 0.0172576904296875, 0.035308837890625, -0.0201263427734375, -0.0034923553466796875, 0.0169830322265625, -0.0251922607421875, -0.0237884521484375, 0.029327392578125, 0.016815185546875, 0.026611328125, 0.0203704833984375, -0.0391845703125, -0.01617431640625, -2.980232238769531e-7, 0.010101318359375, -0.0215911865234375, 0.0312347412109375, 0.0124664306640625, -0.02740478515625, -0.0303955078125, -0.0142669677734375, 0.0033054351806640625, 0.008575439453125, -0.02947998046875, 0.0187835693359375, -0.03253173828125, -0.022003173828125, -0.00605010986328125, 0.0107574462890625, 0.03955078125, -0.03448486328125, -0.034759521484375, 0.00725555419921875, 0.0177764892578125, 0.033966064453125, 0.01287078857421875, -0.00789642333984375, 0.032318115234375, 0.0203857421875, -0.040435791015625, -0.07684326171875, 0.0030689239501953125, -0.041778564453125, 0.0264129638671875, 0.045013427734375, -0.011932373046875, 0.03533935546875, -0.00970458984375, -0.03570556640625, 0.09954833984375, -0.00982666015625, -0.0241851806640625, -0.05804443359375, -0.021636962890625, 0.00530242919921875, 0.0139312744140625, -0.0217742919921875, -0.01433563232421875, -0.053802490234375, 0.044830322265625, 0.011505126953125, -0.0033588409423828125, 0.0242156982421875, 0.017974853515625, -0.068115234375, 0.027496337890625, -0.0023403167724609375, 0.0027179718017578125, 0.0129547119140625, 0.0006566047668457031, 0.046661376953125, 0.0305633544921875, -0.029205322265625, 0.0045166015625, 0.006649017333984375, -0.00586700439453125, -0.0010080337524414062, -0.0227813720703125, -0.026763916015625, -0.0009627342224121094, 0.005939483642578125, 0.05157470703125, -0.0021762847900390625, -0.025360107421875, 0.0177764892578125, 0.0018663406372070312, -0.0208740234375, -0.02685546875, 0.019622802734375, -0.05804443359375, -0.047149658203125, -0.00048041343688964844, 0.0004887580871582031, -0.0188751220703125, 0.0089569091796875, -0.0186920166015625, -0.0274505615234375, 0.01215362548828125, 0.0024318695068359375, -0.011016845703125, 0.03533935546875, 0.01149749755859375, -0.023712158203125, -0.01513671875, -0.0292205810546875, 0.0031185150146484375, -0.01421356201171875, -0.045623779296875, -0.02484130859375, -0.035797119140625, 0.01861572265625, 0.025848388671875, -0.0007271766662597656, 0.04937744140625, -0.01360321044921875, -0.004573822021484375, -0.0213165283203125, 0.0004317760467529297, 0.0240020751953125, -0.03076171875, -0.0254364013671875, 0.00836181640625, 0.01178741455078125, 0.03436279296875, -0.000012516975402832031, 0.095458984375, 0.03350830078125, 0.02386474609375, 0.01297760009765625, -0.0261993408203125, 0.059112548828125, -0.06048583984375, -0.0022068023681640625, 0.008941650390625, -0.0201873779296875, -0.0158843994140625, 0.0027866363525390625, 0.07012939453125, -0.02685546875, 0.0030307769775390625 ]
814f1500183926c62002d3cd22dc27d92bf3f775
Wordpress Stackexchange Q: How to Require a Minimum Image Dimension for Uploading? I need a way to restrict authors from uploading images bellow specific dimensions. Say I only want to allow uploading images that are at least 400px x 400px. If the image size is smaller, the author should get an error notice that the image is too small. Is there a plugin or code that can accomplish this? A: Add this code to your theme's functions.php file, and it will limit minimum image dimentions add_filter('wp_handle_upload_prefilter','tc_handle_upload_prefilter'); function tc_handle_upload_prefilter($file) { $img=getimagesize($file['tmp_name']); $minimum = array('width' => '640', 'height' => '480'); $width= $img[0]; $height =$img[1]; if ($width < $minimum['width'] ) return array("error"=>"Image dimensions are too small. Minimum width is {$minimum['width']}px. Uploaded image width is $width px"); elseif ($height < $minimum['height']) return array("error"=>"Image dimensions are too small. Minimum height is {$minimum['height']}px. Uploaded image height is $height px"); else return $file; } Then just change the numbers of the minimum dimensions you want (in my example is 640 and 480)
Q: How to Require a Minimum Image Dimension for Uploading? I need a way to restrict authors from uploading images bellow specific dimensions. Say I only want to allow uploading images that are at least 400px x 400px. If the image size is smaller, the author should get an error notice that the image is too small. Is there a plugin or code that can accomplish this? A: Add this code to your theme's functions.php file, and it will limit minimum image dimentions add_filter('wp_handle_upload_prefilter','tc_handle_upload_prefilter'); function tc_handle_upload_prefilter($file) { $img=getimagesize($file['tmp_name']); $minimum = array('width' => '640', 'height' => '480'); $width= $img[0]; $height =$img[1]; if ($width < $minimum['width'] ) return array("error"=>"Image dimensions are too small. Minimum width is {$minimum['width']}px. Uploaded image width is $width px"); elseif ($height < $minimum['height']) return array("error"=>"Image dimensions are too small. Minimum height is {$minimum['height']}px. Uploaded image height is $height px"); else return $file; } Then just change the numbers of the minimum dimensions you want (in my example is 640 and 480) A: I prefer not to reformat a colleague's code. So, this is almost the same answer as @MaorBarazany's, but checking the mime type, changing the file['error'] declaration and changing the function namespace to this wpse Question ID. Also, the check only occurs for users that are not administrators. add_action( 'admin_init', 'wpse_28359_block_authors_from_uploading_small_images' ); function wpse_28359_block_authors_from_uploading_small_images() { if( !current_user_can( 'administrator') ) add_filter( 'wp_handle_upload_prefilter', 'wpse_28359_block_small_images_upload' ); } function wpse_28359_block_small_images_upload( $file ) { // Mime type with dimensions, check to exit earlier $mimes = array( 'image/jpeg', 'image/png', 'image/gif' ); if( !in_array( $file['type'], $mimes ) ) return $file; $img = getimagesize( $file['tmp_name'] ); $minimum = array( 'width' => 640, 'height' => 480 ); if ( $img[0] < $minimum['width'] ) $file['error'] = 'Image too small. Minimum width is ' . $minimum['width'] . 'px. Uploaded image width is ' . $img[0] . 'px'; elseif ( $img[1] < $minimum['height'] ) $file['error'] = 'Image too small. Minimum height is ' . $minimum['height'] . 'px. Uploaded image height is ' . $img[1] . 'px'; return $file; } Result of the hook:
wordpress
{ "language": "en", "length": 334, "provenance": "stackexchange_00019.jsonl.gz:413006", "question_score": "18", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28359" }
[ 0.01242828369140625, -0.0093231201171875, -0.01134490966796875, -0.002109527587890625, -0.0122528076171875, -0.0194244384765625, 0.02459716796875, -0.0156402587890625, 0.02593994140625, 0.0154571533203125, -0.05206298828125, 0.0108184814453125, -0.0204620361328125, -0.01366424560546875, -0.01702880859375, -0.0165252685546875, 0.0408935546875, -0.017913818359375, 0.03106689453125, -0.007598876953125, 0.0159149169921875, 0.0260467529296875, 0.0250244140625, 0.06268310546875, -0.0164642333984375, 0.038726806640625, 0.07110595703125, -0.0242462158203125, -0.032684326171875, -0.059600830078125, 0.0036373138427734375, 0.03662109375, -0.00017774105072021484, 0.040130615234375, -0.0050811767578125, 0.02996826171875, -0.013885498046875, 0.038726806640625, 0.033782958984375, 0.006114959716796875, 0.031768798828125, -0.0196685791015625, 0.0177001953125, -0.00821685791015625, -0.01519775390625, -0.016693115234375, 0.0440673828125, -0.00612640380859375, 0.027313232421875, 0.0016355514526367188, 0.0106353759765625, 0.044281005859375, 0.034423828125, -0.01061248779296875, -0.022308349609375, 0.020111083984375, 0.0107269287109375, 0.034088134765625, 0.050567626953125, 0.0017347335815429688, -0.059112548828125, -0.0167083740234375, 0.0183258056640625, -0.06024169921875, 0.00783538818359375, -0.03521728515625, -0.047454833984375, 0.031463623046875, -0.0259857177734375, 0.00914764404296875, 0.04022216796875, -0.03173828125, 0.0074462890625, -0.0111846923828125, -0.022735595703125, 0.013427734375, 0.00901031494140625, -0.008453369140625, 0.02886962890625, -0.0210723876953125, -0.014129638671875, -0.037567138671875, 0.0037670135498046875, -0.000010848045349121094, 0.0306396484375, 0.044403076171875, -0.0177154541015625, -0.0095062255859375, -0.0013828277587890625, 0.0017194747924804688, -0.0210113525390625, -0.0146484375, 0.017547607421875, 0.0182952880859375, -0.032257080078125, -0.01435089111328125, -0.0096282958984375, -0.0184326171875, -0.0281219482421875, -0.0026607513427734375, 0.0300140380859375, -0.04815673828125, 0.0794677734375, -0.042938232421875, 0.023895263671875, 0.039215087890625, -0.036285400390625, -0.05096435546875, 0.033935546875, 0.0374755859375, 0.0280914306640625, 0.0107879638671875, -0.040496826171875, 0.0126953125, -0.0277862548828125, 0.038238525390625, -0.049163818359375, 0.0015411376953125, -0.030609130859375, 0.04010009765625, -0.0164031982421875, -0.0036334991455078125, 0.0377197265625, -0.01708984375, 0.0233001708984375, 0.006740570068359375, -0.036468505859375, -0.01666259765625, 0.01261138916015625, 0.073486328125, -0.03192138671875, 0.01216888427734375, 0.034271240234375, -0.04437255859375, -0.035614013671875, -0.0269317626953125, 0.0154876708984375, -0.03424072265625, -0.0248565673828125, 0.0194549560546875, -0.059051513671875, 0.00421142578125, 0.066162109375, -0.0572509765625, -0.033721923828125, 0.039306640625, 0.009552001953125, 0.00531768798828125, -0.0380859375, -0.110107421875, 0.0390625, -0.066162109375, 0.046417236328125, 0.00439453125, -0.029022216796875, -0.023345947265625, 0.060302734375, -0.0298919677734375, -0.052825927734375, -0.07281494140625, 0.0109710693359375, 0.006870269775390625, 0.053314208984375, -0.026458740234375, -0.035675048828125, -0.01258087158203125, -0.08184814453125, -0.01094818115234375, 0.020843505859375, 0.058319091796875, 0.0211944580078125, -0.012481689453125, -0.050018310546875, 0.0242919921875, -0.002361297607421875, -0.0005965232849121094, 0.026763916015625, 0.0176239013671875, 0.00289154052734375, 0.0360107421875, -0.0018854141235351562, -0.029876708984375, 0.0271148681640625, -0.01165008544921875, -0.0172119140625, -0.010894775390625, 0.0008697509765625, 0.0018224716186523438, 0.00518798828125, 0.0128021240234375, 0.0185394287109375, 0.02392578125, -0.040924072265625, -0.005260467529296875, -0.0341796875, -0.0029296875, 0.006622314453125, 0.0212860107421875, -0.01044464111328125, 0.016204833984375, 0.043975830078125, 0.01346588134765625, -0.0157012939453125, -0.014739990234375, -0.023468017578125, -0.0217132568359375, -0.004726409912109375, 0.006587982177734375, -0.056060791015625, -0.00933074951171875, 0.0382080078125, -0.01334381103515625, -0.0195465087890625, -0.021087646484375, 0.01425933837890625, 0.0203094482421875, 0.0004940032958984375, 0.0222015380859375, -0.0110321044921875, 0.0440673828125, -0.0179595947265625, -0.030670166015625, -0.0248565673828125, 0.00933837890625, 0.00914764404296875, 0.02740478515625, -0.0236663818359375, 0.01161956787109375, 0.0310211181640625, 0.0164642333984375, 0.0177154541015625, 0.0031299591064453125, -0.0003769397735595703, 0.0158843994140625, -0.0111236572265625, -0.0120391845703125, -0.0257568359375, -0.0875244140625, 0.0091705322265625, 0.05450439453125, 0.0111846923828125, 0.00742340087890625, -0.0121612548828125, 0.06866455078125, 0.0364990234375, 0.01319122314453125, 0.00447845458984375, 0.0259246826171875, -0.007030487060546875, 0.012115478515625, 0.0011653900146484375, 0.00279998779296875, 0.0194244384765625, -0.03680419921875, 0.0244903564453125, 0.025238037109375, -0.02825927734375, -0.0021610260009765625, -0.0256805419921875, 0.0284881591796875, -0.01258087158203125, 0.05645751953125, 0.033660888671875, 0.005680084228515625, -0.0002987384796142578, 0.00704193115234375, 0.00659942626953125, 0.004756927490234375, -0.02130126953125, 0.035308837890625, 0.01409912109375, -0.0701904296875, 0.010406494140625, -0.0270843505859375, -0.02587890625, 0.02911376953125, -0.0122222900390625, 0.031280517578125, 0.016510009765625, -0.0167694091796875, -0.02960205078125, 0.00799560546875, 0.0008783340454101562, -0.0096282958984375, -0.019744873046875, -0.01922607421875, 0.038543701171875, -0.0133514404296875, 0.037078857421875, -0.01302337646484375, 0.0230560302734375, 0.0294189453125, 0.006687164306640625, 0.030029296875, 0.0216522216796875, -0.0280609130859375, 0.0027923583984375, -0.06768798828125, 0.05859375, -0.0372314453125, 0.037689208984375, 0.07177734375, -0.00566864013671875, 0.023406982421875, -0.0193939208984375, 0.011627197265625, -0.03656005859375, 0.00908660888671875, -0.026702880859375, -0.0020618438720703125, -0.036712646484375, 0.0140228271484375, -0.00498199462890625, -0.05560302734375, 0.0246734619140625, 0.00435638427734375, -0.0260467529296875, -0.0116729736328125, -0.0115509033203125, 0.02325439453125, 0.00211334228515625, -0.07769775390625, -0.0494384765625, -0.0014133453369140625, -0.058135986328125, 0.013916015625, 0.0196990966796875, -0.0189208984375, -0.040069580078125, -0.009429931640625, -0.0081787109375, -0.04193115234375, -0.0222320556640625, -0.005451202392578125, 0.0031566619873046875, 0.0125579833984375, 0.00032019615173339844, 0.0726318359375, 0.0071563720703125, -0.068115234375, -0.0128326416015625, 0.0286102294921875, -0.0099334716796875, 0.016693115234375, 0.0199737548828125, -0.004764556884765625, -0.0282135009765625, 0.008026123046875, -0.02642822265625, 0.031890869140625, -0.033172607421875, -0.0068359375, -0.04388427734375, -0.060699462890625, -0.041748046875, 0.10040283203125, 0.04681396484375, -0.0838623046875, 0.02471923828125, -0.0699462890625, -0.0268402099609375, -0.040802001953125, -0.060882568359375, 0.05108642578125, 0.03448486328125, 0.0007171630859375, -0.01169586181640625, 0.030670166015625, 0.01363372802734375, 0.015960693359375, 0.00008511543273925781, -0.0197906494140625, 0.0144805908203125, -0.0006780624389648438, -0.00240325927734375, -0.026885986328125, -0.00391387939453125, -0.04119873046875, 0.0255889892578125, -0.008148193359375, -0.030364990234375, -0.033233642578125, 0.00330352783203125, -0.0179595947265625, -0.02362060546875, 0.03338623046875, 0.0046844482421875, 0.057464599609375, -0.05914306640625, -0.033477783203125, -0.05181884765625, 0.06451416015625, -0.02630615234375, -0.0355224609375, -0.0089569091796875, 0.0235748291015625, -0.006500244140625, -0.03228759765625, 0.0173187255859375, -0.0029449462890625, -0.0181884765625, 0.0030956268310546875, -0.0104522705078125, -0.02679443359375, 0.0011043548583984375, -0.037200927734375, -0.00283050537109375, -0.0308685302734375, 0.0168914794921875, 0.0516357421875, -0.0146942138671875, 0.01727294921875, 0.007282257080078125, 0.02117919921875, 0.010467529296875, -0.0084686279296875, -0.11181640625, -0.0240020751953125, 0.0143585205078125, 0.058258056640625, -0.060089111328125, 0.07965087890625, -0.06024169921875, 0.05902099609375, -0.040802001953125, -0.006488800048828125, -0.018951416015625, 0.027252197265625, -0.028350830078125, 0.001399993896484375, -0.031829833984375, -0.024169921875, -0.00186920166015625, -0.045074462890625, -0.0212860107421875, -0.041778564453125, -0.053558349609375, -0.029296875, -0.0472412109375, -0.01068878173828125, -0.060882568359375, -0.0288848876953125, 0.01251983642578125, 0.027984619140625, 0.019683837890625, -0.0096435546875, -0.05047607421875, -0.072265625, 0.00102996826171875, 0.049224853515625, 0.0017223358154296875, 0.01995849609375, 0.045684814453125, 0.004924774169921875, -0.0243682861328125, -0.10797119140625, -0.01386260986328125, 0.0276641845703125, 0.007244110107421875, 0.0279693603515625, 0.0252685546875, -0.01468658447265625, 0.0183868408203125, 0.0193328857421875, 0.01245880126953125, -0.046478271484375, 0.05560302734375, -0.004436492919921875, -0.014678955078125, 0.0205230712890625, -0.017333984375, 0.019012451171875, -0.013336181640625, -0.0109100341796875, 0.01424407958984375, 0.006439208984375, -0.0045166015625, -0.0080108642578125, 0.021484375, 0.01195526123046875, -0.0304412841796875, 0.00894927978515625, 0.01041412353515625, -0.022369384765625, -0.00799560546875, 0.00812530517578125, -0.02301025390625, -0.005161285400390625, 0.002780914306640625, -0.01387786865234375, -0.02386474609375, -0.007793426513671875, 0.0233612060546875, 0.0247039794921875, 0.0121002197265625, -0.0096588134765625, 0.006237030029296875, -0.042144775390625, 0.01522064208984375, -0.00931549072265625, -0.0384521484375, 0.0110321044921875, 0.00775909423828125, -0.035736083984375, 0.01355743408203125, 0.0294952392578125, -0.00872802734375, -0.00003594160079956055, -0.005275726318359375, -0.00714111328125, -0.00112152099609375, -0.0330810546875, 0.0521240234375, -0.00942230224609375, -0.002109527587890625, 0.0267791748046875, -0.023040771484375, 0.038482666015625, -0.02484130859375, -0.0066986083984375, 0.057464599609375, 0.07672119140625, 0.0135955810546875, 0.00958251953125, 0.0250701904296875, -0.0186614990234375, 0.0192108154296875, 0.0043487548828125, -0.040557861328125, -0.0251922607421875, 0.005840301513671875, 0.03570556640625, -0.049713134765625, -0.018707275390625, 0.0426025390625, -0.0085296630859375, 0.0034694671630859375, -0.0068359375, -0.029754638671875, -0.045654296875, 0.0007081031799316406, 0.03814697265625, 0.01407623291015625, -0.02301025390625, -0.0211639404296875, -0.01523590087890625, -0.01531219482421875, -0.00038170814514160156, 0.045196533203125, -0.034576416015625, 0.0102081298828125, 0.01096343994140625, -0.019287109375, -0.0136260986328125, -0.0300445556640625, -0.00885772705078125, -0.01837158203125, -0.0070343017578125, -0.01245880126953125, 0.006931304931640625, -0.0257110595703125, 0.006984710693359375, -0.01885986328125, -0.001369476318359375, -0.0107421875, 0.030242919921875, -0.000507354736328125, -0.02239990234375, -0.0216064453125, -0.05078125, -0.034088134765625, -0.01316070556640625, 0.031646728515625, 0.02203369140625, 0.0246429443359375, -0.0007905960083007812, -0.033782958984375, 0.01483154296875, -0.0061492919921875, 0.046142578125, -0.01134490966796875, 0.029083251953125, -0.0256500244140625, -0.00371551513671875, -0.049346923828125, 0.01548004150390625, 0.07598876953125, 0.0013761520385742188, 0.004459381103515625, 0.002902984619140625, 0.011016845703125, -0.0237274169921875, -0.014312744140625, 0.0006241798400878906, 0.004566192626953125, 0.02020263671875, -0.0134735107421875, -0.034881591796875, 0.0240325927734375, 0.0137176513671875, -0.022064208984375, -0.01934814453125, -0.004436492919921875, -0.035369873046875, 0.07171630859375, -0.0092926025390625, -0.005016326904296875, -0.01143646240234375, -0.0298004150390625, 0.043060302734375, 0.005435943603515625, -0.0011472702026367188, 0.04559326171875, -0.039215087890625, 0.042755126953125, 0.04541015625, 0.036102294921875, -0.0239410400390625, 0.04571533203125, -0.0032558441162109375, 0.050201416015625, 0.04888916015625, 0.041168212890625, 0.03167724609375, 0.006183624267578125, -0.0276336669921875, -0.048004150390625, 0.021453857421875, 0.01074981689453125, 0.02313232421875, 0.0557861328125, 0.01209259033203125, -0.010406494140625, 0.044891357421875, 0.044952392578125, -0.0758056640625, 0.002971649169921875, 0.017852783203125, 0.0037746429443359375, -0.007190704345703125, -0.0165863037109375, 0.0288848876953125, -0.0208740234375, 0.038055419921875, 0.0288848876953125, -0.01058197021484375, -0.0033855438232421875, -0.01236724853515625, -0.00672149658203125, 0.01039886474609375, 0.042236328125, 0.01166534423828125, -0.03729248046875, -0.027557373046875, 0.0294342041015625, -0.0226593017578125, 0.009735107421875, 0.043182373046875, -0.0491943359375, -0.021209716796875, -0.0367431640625, -0.03863525390625, 0.00689697265625, -0.04547119140625, 0.00287628173828125, 0.01318359375, 0.039581298828125, 0.0467529296875, 0.003025054931640625, -0.0021533966064453125, 0.022735595703125, -0.02703857421875, 0.05279541015625, -0.022796630859375, 0.006313323974609375, -0.023895263671875, -0.060516357421875, -0.008026123046875, -0.034515380859375, 0.01081085205078125, 0.00475311279296875, -0.005825042724609375, 0.02972412109375, 0.005573272705078125, -0.045562744140625, 0.03070068359375, -0.036651611328125, -0.0124359130859375, 0.00753021240234375, 0.018951416015625, -0.058135986328125, -0.047515869140625, 0.00659942626953125, -0.081787109375, -0.006378173828125, -0.0211944580078125, -0.03314208984375, 0.034912109375, -0.00510406494140625, -0.00386810302734375, 0.0016651153564453125, 0.026641845703125, 0.0204010009765625, 0.0179290771484375, -0.0027008056640625, -0.0112762451171875, 0.0005459785461425781, -0.035675048828125, -0.00072479248046875, 0.012054443359375, -0.0270843505859375, 0.024169921875, 0.04248046875, -0.001739501953125, -0.028961181640625, -0.01371002197265625, 0.047332763671875, 0.08319091796875, 0.03546142578125, -0.002155303955078125, -0.00754547119140625, -0.038818359375, 0.0244598388671875, 0.0050811767578125, 0.0284576416015625, 0.00775909423828125, -0.020599365234375, 0.0125274658203125, 0.0188446044921875, 0.0164337158203125, -0.0042877197265625, -0.02374267578125, -0.0360107421875, 0.0019397735595703125, 0.040496826171875, -0.01165008544921875, 0.0164794921875, 0.032318115234375, 0.048492431640625, -0.02294921875, 0.005558013916015625, -0.0186614990234375, 0.061676025390625, 0.0150146484375, 0.03668212890625, 0.02459716796875, 0.0121002197265625, 0.07403564453125, 0.0143890380859375, 0.0189666748046875, 0.04022216796875, -0.0220947265625, -0.03173828125, 0.0050506591796875, 0.00628662109375, -0.0269927978515625, 0.0120391845703125, 0.03955078125, -0.0021953582763671875, -0.00878143310546875, 0.002864837646484375, 0.02557373046875, 0.0177001953125, -0.0234375, -0.0117950439453125, 0.0005068778991699219, -0.0148468017578125, 0.0201416015625, -0.025726318359375, -0.0036373138427734375, 0.04229736328125, 0.034759521484375, 0.0028705596923828125, -0.00682830810546875, -0.0379638671875, -0.0103302001953125, -0.006298065185546875, -0.035888671875, -0.0172119140625, 0.0404052734375, 0.02435302734375, 0.0158538818359375, -0.021026611328125, 0.001644134521484375, -0.018585205078125, 0.055328369140625, 0.004291534423828125, 0.01357269287109375, -0.0025386810302734375, -0.025482177734375, -0.004413604736328125, 0.0167388916015625, 0.006916046142578125, 0.0036163330078125, 0.050537109375, -0.0015926361083984375, -0.083740234375, 0.0002989768981933594, 0.0287933349609375, -0.043670654296875, -0.0211944580078125, -0.039031982421875, -0.0276947021484375, 0.01126861572265625, -0.03411865234375, 0.03692626953125, -0.0372314453125, 0.0487060546875, -0.0357666015625, -0.008148193359375, 0.00046753883361816406, -0.046356201171875, -0.007770538330078125, -0.0277099609375, 0.02001953125, -0.035888671875, -0.01442718505859375, 0.0294647216796875, -0.037567138671875, -0.0312042236328125, 0.00786590576171875, 0.0183563232421875, -0.0263671875, 0.0321044921875, 0.0364990234375, -0.0174407958984375, -0.00028514862060546875, 0.013916015625, 0.01422119140625, 0.0107421875, 0.0201416015625, 0.013671875, -0.035888671875, -0.020355224609375, -0.042510986328125, 0.03558349609375, 0.0260162353515625, 0.05316162109375, -0.02197265625, 0.037200927734375, 0.016998291015625, -0.0245208740234375, 0.0089263916015625, -0.0208892822265625, 0.087646484375, -0.031036376953125, -0.0482177734375, -0.0214691162109375, 0.0111541748046875, 0.0267486572265625, 0.0237884521484375, -0.0231475830078125, -0.017303466796875, -0.00128936767578125, 0.0249786376953125, 0.036041259765625, 0.006916046142578125, -0.04095458984375, -0.0557861328125, -0.08209228515625, -0.00305938720703125, 0.0190887451171875, 0.0006794929504394531, -0.03680419921875, 0.043182373046875, -0.024322509765625, -0.03240966796875, 0.042724609375, -0.06451416015625, 0.03619384765625, 0.026153564453125, 0.00974273681640625, -0.041259765625, 0.0100860595703125, -0.009246826171875, -0.01885986328125, 0.0205230712890625, 0.0297393798828125, 0.005035400390625, -0.019439697265625, 0.05731201171875, 0.0163116455078125, 0.0236663818359375, -0.06024169921875, -0.021209716796875, 0.06793212890625, 0.00475311279296875, -0.005542755126953125, 0.03485107421875, -0.004642486572265625, 0.002094268798828125, -0.0204010009765625, -0.0126800537109375, 0.02301025390625, -0.0276947021484375, 0.03204345703125, 0.02276611328125, 0.03558349609375, 0.01690673828125, -0.051361083984375, 0.037109375, -0.03216552734375, 0.021820068359375, 0.01580810546875, 0.01220703125, -0.006134033203125, 0.0093841552734375, -0.07330322265625, -0.0396728515625, -0.0303192138671875, 0.0178070068359375, -0.03363037109375, 0.02874755859375, 0.03729248046875, -0.023681640625, -0.0065765380859375, 0.032318115234375, 0.0293731689453125, 0.08343505859375, -0.034393310546875, -0.048797607421875, 0.0200958251953125, -0.005374908447265625, 0.00618743896484375, -0.031707763671875, -0.01009368896484375, -0.035400390625, 0.010284423828125, -0.036895751953125, 0.024932861328125, 0.0192718505859375, -0.03497314453125, -0.061676025390625, 0.0462646484375, -0.0276641845703125, -0.033416748046875, 0.019622802734375, 0.0252532958984375, -0.028594970703125, 0.03424072265625, 0.041351318359375, -0.02423095703125, 0.043914794921875, -0.012725830078125, 0.018463134765625, -0.0638427734375, 0.06317138671875, -0.024139404296875, -0.055877685546875, 0.00562286376953125, 0.038055419921875, -0.007411956787109375, 0.0307769775390625, -0.043914794921875, 0.08746337890625, 0.06024169921875, -0.0084381103515625, 0.07977294921875, 0.019989013671875, -0.062103271484375, -0.0225067138671875, -0.0247802734375, -0.0072021484375, -0.01499176025390625, 0.048431396484375, 0.0506591796875, 0.01105499267578125, -0.0191497802734375, 0.0144500732421875, 0.0099639892578125, 0.033233642578125, 0.010986328125, -0.0263671875, -0.01007843017578125, -0.0212249755859375, -0.00946044921875, -0.023101806640625, 0.017242431640625, -0.0002868175506591797, -0.042816162109375, -0.00884246826171875, -0.0298004150390625, -0.0169219970703125, -0.07916259765625, 0.0792236328125, 0.021636962890625, -0.03472900390625, 0.00778961181640625, -0.026763916015625, -0.0301055908203125, 0.005275726318359375, -0.04742431640625, -0.056549072265625, 0.053985595703125, -0.040069580078125, -0.005565643310546875, -0.006626129150390625, 0.0221099853515625, -0.01178741455078125, 0.0633544921875, -0.01007080078125, -0.0197296142578125, 0.00661468505859375, 0.006214141845703125, 0.00713348388671875, -0.052154541015625, -0.0264892578125, -0.023406982421875, -0.0269317626953125, 0.007415771484375, -0.03094482421875, 0.034149169921875, 0.02093505859375, -0.00690460205078125, 0.06781005859375, -0.0306854248046875, 0.035400390625, 0.006397247314453125, -0.025848388671875, 0.0219268798828125, -0.00220489501953125, 0.03216552734375, -0.0271148681640625, 0.0007271766662597656 ]
07e809fd8fd0ca91bdfdbaec4626c370915dd9d3
Wordpress Stackexchange Q: Give Editor Access To Sidebar I want to give the Editor Role access to editing the sidebar and it's contents. I have a text widget in there and in order to edit this text widget the user needs to be an admin - this sucks. How do I grant permission to the Editor Role that will give him access to edit the sidebar? A: The edit_theme_options capability should allow the user to edit the sidebar as described on this page : http://codex.wordpress.org/Appearance_Widgets_SubPanel Code to add to functions.php $role = get_role('editor'); $role->add_cap('edit_theme_options'); Edit: This should work to prevent editor accessing themes or menus function custom_admin_menu() { $user = new WP_User(get_current_user_id()); if (!empty( $user->roles) && is_array($user->roles)) { foreach ($user->roles as $role) $role = $role; } if($role == "editor") { remove_submenu_page( 'themes.php', 'themes.php' ); remove_submenu_page( 'themes.php', 'nav-menus.php' ); } } add_action('admin_menu', 'custom_admin_menu'); I haven't had chance to test this, but it only removes them from the menu they may still be able to access them by typing in the URL directly.
Q: Give Editor Access To Sidebar I want to give the Editor Role access to editing the sidebar and it's contents. I have a text widget in there and in order to edit this text widget the user needs to be an admin - this sucks. How do I grant permission to the Editor Role that will give him access to edit the sidebar? A: The edit_theme_options capability should allow the user to edit the sidebar as described on this page : http://codex.wordpress.org/Appearance_Widgets_SubPanel Code to add to functions.php $role = get_role('editor'); $role->add_cap('edit_theme_options'); Edit: This should work to prevent editor accessing themes or menus function custom_admin_menu() { $user = new WP_User(get_current_user_id()); if (!empty( $user->roles) && is_array($user->roles)) { foreach ($user->roles as $role) $role = $role; } if($role == "editor") { remove_submenu_page( 'themes.php', 'themes.php' ); remove_submenu_page( 'themes.php', 'nav-menus.php' ); } } add_action('admin_menu', 'custom_admin_menu'); I haven't had chance to test this, but it only removes them from the menu they may still be able to access them by typing in the URL directly. A: If you just want to configure this easy as possible, use the Members plugin. The capability you'll need to add is 'edit_theme_options'. Be aware that this will grant more than just the widgets area, this also grants the editor access to the entire Appearance menu. See here http://wordpress.org/extend/plugins/members/ If you want to do this programmatically, you'll need to use add_cap(). $editor = get_role('editor'); $editor->add_cap('edit_theme_options'); You can throw that code into its own plugin, and your done. Or put it into functions.php.
wordpress
{ "language": "en", "length": 251, "provenance": "stackexchange_00019.jsonl.gz:413026", "question_score": "16", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28416" }
[ 0.064208984375, -0.03155517578125, 0.03814697265625, 0.0036563873291015625, 0.0013608932495117188, -0.0362548828125, 0.06866455078125, -0.031158447265625, -0.016876220703125, 0.033294677734375, 0.0009198188781738281, -0.0396728515625, -0.002803802490234375, -0.029541015625, -0.01184844970703125, -0.036041259765625, 0.0047454833984375, 0.007610321044921875, 0.015777587890625, -0.0291290283203125, 0.005558013916015625, -0.0109405517578125, -0.00036072731018066406, -0.0016994476318359375, 0.026397705078125, 0.0284271240234375, 0.002899169921875, -0.018280029296875, 0.004932403564453125, 0.0018177032470703125, 0.0252838134765625, -0.026580810546875, 0.00856781005859375, 0.0028171539306640625, 0.01541900634765625, 0.0245208740234375, -0.0187530517578125, 0.0085906982421875, 0.023773193359375, -0.0196990966796875, 0.0306854248046875, -0.016571044921875, -0.0252227783203125, 0.036468505859375, -0.0281524658203125, -0.06317138671875, 0.03814697265625, -0.0206756591796875, 0.01212310791015625, -0.0166778564453125, 0.01345062255859375, -0.003917694091796875, 0.029296875, -0.016082763671875, -0.0201263427734375, -0.01439666748046875, 0.0190582275390625, -0.027496337890625, 0.037078857421875, 0.0253753662109375, -0.035552978515625, -0.026947021484375, 0.0191497802734375, -0.050384521484375, -0.00664520263671875, -0.01114654541015625, 0.03369140625, 0.01490020751953125, -0.05548095703125, -0.00743865966796875, 0.024566650390625, -0.0237884521484375, -0.0007672309875488281, -0.00786590576171875, -0.0039215087890625, -0.01349639892578125, 0.00191497802734375, -0.0029430389404296875, 0.01300811767578125, 0.0015201568603515625, -0.004039764404296875, 0.03070068359375, -0.04998779296875, 0.007656097412109375, 0.00135040283203125, 0.0275726318359375, -0.0262908935546875, -0.0261688232421875, 0.0031795501708984375, 0.01947021484375, 0.0018548965454101562, -0.0191497802734375, 0.0286865234375, 0.0158538818359375, -0.00469970703125, -0.0268707275390625, 0.033477783203125, 0.061370849609375, 0.0128021240234375, 0.0302581787109375, 0.01074981689453125, -0.06219482421875, 0.05877685546875, -0.07403564453125, 0.0032787322998046875, 0.0276641845703125, -0.0071258544921875, -0.0144500732421875, 0.0163116455078125, 0.026519775390625, 0.0015201568603515625, -0.029998779296875, -0.005367279052734375, -0.032440185546875, -0.0023345947265625, 0.0193634033203125, -0.01459503173828125, 0.0172576904296875, 0.0074005126953125, 0.026092529296875, -0.0198974609375, 0.00762176513671875, -0.0017719268798828125, -0.03350830078125, 0.01180267333984375, -0.0146636962890625, -0.04119873046875, 0.01328277587890625, 0.002880096435546875, 0.0256500244140625, -0.05633544921875, -0.00366973876953125, 0.0714111328125, 0.0516357421875, 0.035614013671875, -0.029998779296875, 0.018798828125, -0.0012559890747070312, -0.011199951171875, -0.0041656494140625, 0.01242828369140625, 0.02545166015625, 0.0213775634765625, -0.0306549072265625, -0.0151214599609375, 0.0136871337890625, 0.0007610321044921875, 0.0157623291015625, 0.0213470458984375, -0.026123046875, -0.0316162109375, -0.0265960693359375, 0.0190582275390625, 0.00605010986328125, 0.0254058837890625, -0.01611328125, 0.057037353515625, -0.0263214111328125, -0.016448974609375, -0.030364990234375, -0.016143798828125, -0.003696441650390625, 0.02783203125, -0.0452880859375, -0.058135986328125, 0.00682830810546875, -0.01422882080078125, -0.01239013671875, 0.01971435546875, -0.01959228515625, 0.040496826171875, -0.05316162109375, -0.00909423828125, 0.03033447265625, 0.0180206298828125, 0.05712890625, -0.0035686492919921875, 0.032928466796875, 0.007289886474609375, 0.015533447265625, -0.0033397674560546875, -0.043792724609375, 0.0221099853515625, -0.00403594970703125, -0.04022216796875, -0.017303466796875, -0.0085906982421875, 0.023162841796875, 0.043975830078125, 0.02972412109375, -0.01776123046875, -0.012451171875, -0.005001068115234375, -0.01082611083984375, -0.01129150390625, -0.0191192626953125, 0.0016689300537109375, -0.0053253173828125, -0.0228729248046875, 0.0176239013671875, 0.04364013671875, -0.0259857177734375, 0.0267791748046875, -0.0380859375, -0.06610107421875, 0.0019159317016601562, -0.025634765625, 0.030487060546875, 0.04913330078125, 0.016815185546875, -0.0238494873046875, 0.000038623809814453125, -0.00424957275390625, -0.035308837890625, -0.03424072265625, 0.01560211181640625, 0.00333404541015625, 0.07867431640625, -0.0032558441162109375, 0.03240966796875, 0.0093841552734375, -0.07513427734375, 0.032623291015625, 0.03363037109375, 0.02435302734375, -0.030059814453125, 0.008056640625, -0.006683349609375, 0.030364990234375, 0.01036834716796875, -0.0012693405151367188, -0.0028209686279296875, 0.06927490234375, 0.006137847900390625, -0.029754638671875, -0.011383056640625, -0.0009908676147460938, -0.08758544921875, -0.007717132568359375, 0.06500244140625, 0.045135498046875, 0.019622802734375, -0.0228729248046875, -0.0396728515625, 0.0418701171875, -0.05487060546875, 0.016082763671875, -0.04119873046875, -0.0097198486328125, 0.0312347412109375, -0.0085601806640625, 0.0159149169921875, 0.01580810546875, 0.027252197265625, -0.00852203369140625, 0.0287933349609375, -0.00751495361328125, -0.00722503662109375, 0.00691986083984375, -0.01067352294921875, 0.020660400390625, -0.039337158203125, -0.03240966796875, -0.0128631591796875, 0.030303955078125, 0.0157928466796875, 0.033599853515625, 0.0299835205078125, -0.0380859375, -0.007205963134765625, 0.0115814208984375, 0.036895751953125, -0.0093994140625, 0.00792694091796875, 0.03570556640625, -0.041473388671875, -0.0281524658203125, -0.0043792724609375, 0.017974853515625, -0.007205963134765625, -0.03302001953125, 0.017730712890625, 0.00762939453125, -0.0034427642822265625, -0.01045989990234375, -0.05108642578125, 0.02496337890625, -0.0178985595703125, 0.0258636474609375, 0.00689697265625, 0.0240936279296875, -0.0169677734375, -0.0224456787109375, 0.0283355712890625, 0.0166168212890625, -0.0235595703125, 0.061676025390625, -0.01166534423828125, 0.00640869140625, -0.0024776458740234375, 0.048248291015625, 0.043975830078125, -0.004795074462890625, -0.01488494873046875, 0.0233306884765625, -0.013336181640625, -0.0007572174072265625, 0.055267333984375, 0.046173095703125, 0.01200103759765625, -0.03515625, 0.044219970703125, 0.00008291006088256836, -0.0283355712890625, 0.019287109375, -0.0196075439453125, -0.005146026611328125, -0.0038242340087890625, -0.0095672607421875, 0.00753021240234375, 0.053131103515625, -0.07080078125, -0.0013284683227539062, 0.00399017333984375, -0.0545654296875, -0.0162811279296875, 0.046051025390625, -0.01288604736328125, -0.01000213623046875, 0.0024929046630859375, 0.00733184814453125, 0.00982666015625, -0.0250396728515625, -0.016876220703125, -0.0005850791931152344, 0.00429534912109375, -0.0028820037841796875, 0.06646728515625, -0.0085906982421875, -0.057373046875, -0.00380706787109375, -0.036468505859375, -0.0176239013671875, 0.005664825439453125, 0.01250457763671875, -0.00868988037109375, 0.0188751220703125, 0.0013399124145507812, 0.020904541015625, 0.0099945068359375, -0.0224761962890625, -0.028228759765625, -0.0184173583984375, -0.00472259521484375, 0.03485107421875, 0.01412200927734375, -0.00033164024353027344, 0.03948974609375, 0.07086181640625, 0.0007991790771484375, 0.01038360595703125, -0.010589599609375, -0.03179931640625, 0.019439697265625, -0.0064239501953125, -0.005157470703125, 0.01009368896484375, 0.02008056640625, 0.0263214111328125, 0.02374267578125, -0.0095062255859375, -0.0000807046890258789, 0.0012950897216796875, 0.0128631591796875, 0.0330810546875, 0.007293701171875, -0.002979278564453125, -0.038543701171875, 0.034759521484375, -0.008575439453125, -0.0075836181640625, -0.00737762451171875, 0.009063720703125, -0.01470184326171875, -0.043853759765625, 0.0489501953125, -0.0231781005859375, 0.03955078125, -0.0361328125, -0.0264434814453125, -0.004367828369140625, 0.105712890625, -0.01995849609375, -0.006587982177734375, 0.00809478759765625, 0.00861358642578125, -0.040985107421875, -0.005405426025390625, -0.050506591796875, 0.001949310302734375, -0.096435546875, 0.0220184326171875, -0.001705169677734375, -0.01364898681640625, -0.032806396484375, 0.02301025390625, -0.06488037109375, -0.0335693359375, 0.06353759765625, -0.0687255859375, 0.02813720703125, 0.033233642578125, -0.004970550537109375, -0.03057861328125, -0.06072998046875, -0.0235748291015625, -0.11376953125, -0.01690673828125, -0.0282135009765625, 0.07794189453125, 0.02471923828125, -0.00751495361328125, -0.0254669189453125, 0.052276611328125, 0.043853759765625, -0.030059814453125, 0.0201263427734375, -0.0168914794921875, 0.002056121826171875, -0.01080322265625, -0.0017194747924804688, -0.0293731689453125, 0.0195159912109375, 0.0261077880859375, -0.0215301513671875, -0.0032329559326171875, -0.0577392578125, -0.053741455078125, 0.008636474609375, -0.06097412109375, -0.07794189453125, -0.04052734375, -0.0166168212890625, 0.01082611083984375, -0.030029296875, 0.023345947265625, -0.028656005859375, -0.072998046875, 0.040618896484375, -0.053436279296875, 0.0013113021850585938, 0.0104827880859375, 0.07391357421875, 0.007358551025390625, -0.0101470947265625, 0.037322998046875, -0.00643157958984375, 0.03924560546875, -0.01123809814453125, 0.04473876953125, 0.0565185546875, -0.0215606689453125, 0.01291656494140625, 0.0231781005859375, -0.01268768310546875, -0.00994110107421875, 0.04681396484375, 0.017303466796875, 0.008026123046875, -0.0099945068359375, -0.006076812744140625, 0.01078033447265625, -0.026824951171875, -0.01666259765625, 0.0052947998046875, -0.0034961700439453125, 0.0224456787109375, -0.006900787353515625, 0.026947021484375, -0.0208740234375, 0.00482177734375, -0.00812530517578125, -0.0183258056640625, 0.035614013671875, 0.016693115234375, 0.0020999908447265625, -0.032073974609375, 0.0182952880859375, -0.0155792236328125, -0.0173797607421875, -0.0178375244140625, -0.00785064697265625, 0.04351806640625, -0.05010986328125, 0.00012189149856567383, 0.009674072265625, -0.002445220947265625, 0.051605224609375, 0.0155487060546875, -0.0200958251953125, -0.03729248046875, 0.006740570068359375, 0.054229736328125, -0.00951385498046875, -0.0033855438232421875, 0.016571044921875, 0.01287078857421875, -0.0029354095458984375, 0.003719329833984375, 0.00043487548828125, -0.0140533447265625, -0.011138916015625, -0.0226287841796875, 0.0180511474609375, -0.0265655517578125, 0.013824462890625, 0.0274200439453125, -0.0059967041015625, 0.0246124267578125, -0.0156707763671875, 0.0298919677734375, 0.05413818359375, 0.007415771484375, 0.0056304931640625, 0.0330810546875, -0.00293731689453125, -0.0288543701171875, 0.0279083251953125, -0.0318603515625, -0.01479339599609375, 0.033721923828125, 0.02886962890625, 0.0146484375, -0.004840850830078125, -0.00971221923828125, -0.0143890380859375, -0.01690673828125, 0.06329345703125, 0.0018301010131835938, -0.06683349609375, -0.0216217041015625, 0.0206298828125, 0.034881591796875, -0.048004150390625, -0.0004551410675048828, 0.0426025390625, -0.005970001220703125, 0.01171112060546875, -0.0067901611328125, -0.03076171875, -0.00555419921875, 0.009979248046875, -0.0277099609375, 0.014129638671875, 0.0276031494140625, -0.09173583984375, -0.0565185546875, -0.004116058349609375, -0.006549835205078125, 0.042388916015625, -0.01490020751953125, -0.0017871856689453125, -0.03204345703125, 0.01427459716796875, -0.063720703125, -0.0143585205078125, 0.072998046875, 0.034149169921875, -0.05865478515625, 0.00887298583984375, -0.0233001708984375, 0.009735107421875, -0.041778564453125, -0.05572509765625, -0.03271484375, -0.0109405517578125, -0.0111083984375, 0.01517486572265625, -0.0019330978393554688, 0.01025390625, -0.033477783203125, 0.033660888671875, 0.0199127197265625, 0.0679931640625, -0.031768798828125, 0.06268310546875, 0.00435638427734375, 0.0298004150390625, 0.004703521728515625, 0.0296478271484375, -0.0060577392578125, -0.014404296875, -0.0023193359375, -0.02001953125, 0.002696990966796875, -0.03662109375, 0.00856781005859375, -0.00191497802734375, 0.04058837890625, -0.00396728515625, 0.035125732421875, -0.033203125, -0.00743865966796875, -0.017913818359375, 0.01523590087890625, -0.051025390625, 0.01277923583984375, -0.003406524658203125, -0.05548095703125, 0.023681640625, 0.0106658935546875, -0.0142059326171875, 0.05560302734375, -0.04693603515625, 0.046875, 0.052947998046875, -0.04815673828125, 0.060577392578125, 0.1165771484375, 0.0036468505859375, 0.06927490234375, 0.031402587890625, 0.00997161865234375, 0.037353515625, -0.01849365234375, 0.004726409912109375, 0.03375244140625, 0.0267486572265625, -0.016845703125, 0.01468658447265625, 0.00836181640625, -0.012420654296875, 0.03857421875, 0.0908203125, 0.10333251953125, -0.10406494140625, 0.0084075927734375, 0.02557373046875, -0.0104522705078125, 0.062042236328125, -0.0233612060546875, -0.004669189453125, -0.04339599609375, 0.07781982421875, -0.045684814453125, -0.018585205078125, 0.0030841827392578125, -0.046478271484375, -0.00972747802734375, -0.01018524169921875, 0.0174407958984375, 0.0040740966796875, 0.054901123046875, -0.0134124755859375, -0.0281219482421875, 0.0277862548828125, -0.002429962158203125, -0.006496429443359375, -0.0025196075439453125, -0.017120361328125, -0.0533447265625, -0.020782470703125, -0.029052734375, -0.004154205322265625, 0.0289764404296875, -0.0179901123046875, 0.00849151611328125, 0.032806396484375, -0.0394287109375, 0.060150146484375, -0.00911712646484375, -0.004901885986328125, 0.0005354881286621094, -0.040069580078125, -0.0128631591796875, -0.006744384765625, -0.0016155242919921875, 0.0206451416015625, 0.007198333740234375, -0.0616455078125, -0.01849365234375, 0.0030345916748046875, 0.107666015625, -0.037200927734375, -0.035247802734375, 0.013946533203125, 0.00727081298828125, -0.01436614990234375, -0.01446533203125, -0.0023651123046875, -0.06756591796875, -0.01338958740234375, -0.01441192626953125, -0.017578125, 0.01290130615234375, -0.00337982177734375, -0.03277587890625, 0.10009765625, -0.0158843994140625, 0.00653076171875, 0.0465087890625, 0.040496826171875, -0.05889892578125, -0.003765106201171875, -0.01140594482421875, 0.0307464599609375, 0.032257080078125, 0.0026092529296875, -0.012451171875, 0.002044677734375, -0.007305145263671875, 0.0220489501953125, 0.04931640625, 0.033050537109375, -0.035675048828125, -0.035369873046875, 0.0001430511474609375, 0.023284912109375, -0.01031494140625, 0.043243408203125, 0.0022563934326171875, 0.0024204254150390625, 0.0084991455078125, -0.02081298828125, 0.046173095703125, -0.0548095703125, -0.00749969482421875, 0.022003173828125, 0.00933074951171875, 0.00511932373046875, -0.0249786376953125, 0.02557373046875, -0.0275115966796875, -0.01885986328125, 0.0287017822265625, -0.04046630859375, -0.0433349609375, 0.0275726318359375, 0.0056610107421875, -0.0321044921875, 0.005107879638671875, -0.04119873046875, 0.045135498046875, 0.0206146240234375, -0.005199432373046875, -0.045257568359375, 0.016510009765625, -0.044403076171875, -0.018768310546875, -0.0088043212890625, 0.0692138671875, -0.0673828125, 0.03216552734375, 0.014984130859375, 0.026031494140625, -0.025543212890625, 0.0265655517578125, 0.016815185546875, 0.0377197265625, -0.025360107421875, -0.029541015625, 0.002044677734375, 0.016845703125, 0.0174407958984375, 0.028564453125, 0.0262908935546875, 0.037384033203125, 0.065185546875, -0.050811767578125, 0.019683837890625, 0.034271240234375, 0.017547607421875, -0.0184478759765625, -0.0250396728515625, -0.0126190185546875, 0.024658203125, -0.04315185546875, -0.00749969482421875, -0.00199127197265625, 0.0176544189453125, 0.035003662109375, -0.005748748779296875, 0.04791259765625, 0.0002491474151611328, 0.00013303756713867188, 0.0250701904296875, -0.034759521484375, 0.0010309219360351562, -0.050689697265625, -0.08367919921875, -0.00890350341796875, 0.044036865234375, -0.01354217529296875, 0.01232147216796875, 0.00060272216796875, 0.005512237548828125, 0.01200103759765625, -0.01154327392578125, 0.0021343231201171875, -0.0192108154296875, -0.0211334228515625, -0.025177001953125, -0.00728607177734375, 0.012176513671875, -0.0009794235229492188, 0.0019445419311523438, 0.02410888671875, 0.0190277099609375, 0.00046563148498535156, 0.01131439208984375, -0.0024662017822265625, 0.005443572998046875, 0.01983642578125, -0.0301055908203125, -0.017425537109375, 0.00493621826171875, -0.08343505859375, -0.007617950439453125, -0.032867431640625, -0.038726806640625, 0.0116729736328125, 0.0301055908203125, -0.036224365234375, 0.0390625, -0.01318359375, -0.01348876953125, 0.01126861572265625, -0.0021266937255859375, 0.006275177001953125, 0.0265045166015625, 0.01464080810546875, 0.0105438232421875, -0.02374267578125, -0.0138397216796875, -0.000942230224609375, 0.033935546875, 0.04705810546875, 0.0074920654296875, 0.00936126708984375, 0.04168701171875, -0.040496826171875, 0.048614501953125, -0.0693359375, -0.050750732421875, 0.0207977294921875, 0.014068603515625, 0.02001953125, 0.0014886856079101562, -0.047882080078125, 0.048126220703125, 0.033721923828125, -0.0171661376953125, 0.0171661376953125, 0.01403045654296875, 0.003192901611328125, -0.0222015380859375, 0.003406524658203125, -0.0225677490234375, -0.01284027099609375, -0.01605224609375, -0.00922393798828125, 0.019012451171875, 0.007770538330078125, 0.002056121826171875, 0.006580352783203125, -0.0438232421875, -0.0231475830078125, 0.00228118896484375, 0.005336761474609375, -0.0350341796875, 0.00804901123046875, -0.0284271240234375, -0.006824493408203125, 0.044464111328125, -0.003551483154296875, 0.00908660888671875, 0.03656005859375, -0.0018768310546875, 0.03936767578125, -0.0237274169921875, 0.0548095703125, -0.0007719993591308594, 0.062469482421875, -0.002796173095703125, -0.00063323974609375, -0.00687408447265625, 0.0254364013671875, -0.0322265625, 0.0147552490234375, -0.035980224609375, -0.04833984375, -0.0030498504638671875, 0.0234832763671875, -0.0287322998046875, -0.03167724609375, -0.10125732421875, 0.03955078125, 0.0241851806640625, 0.01282501220703125, -0.096923828125, 0.07073974609375, -0.0181884765625, 0.0780029296875, -0.016876220703125, 0.00131988525390625, 0.01032257080078125, 0.007648468017578125, -0.04034423828125, 0.01016998291015625, -0.03179931640625, -0.012847900390625, -0.014312744140625, 0.009796142578125, 0.0225372314453125, -0.01568603515625, -0.0171051025390625, 0.045623779296875, -0.0079193115234375, 0.0782470703125, -0.01410675048828125, 0.00374603271484375, -0.00554656982421875, 0.027069091796875, -0.0185394287109375, -0.0384521484375, 0.0012874603271484375, -0.00555419921875, -0.0055694580078125, -0.017547607421875, 0.0102386474609375, 0.017730712890625, -0.03155517578125, -0.0545654296875, -0.0084991455078125, 0.0005841255187988281, -0.043182373046875, 0.0179290771484375, -0.00582122802734375, -0.031036376953125, 0.0223388671875, 0.0140380859375, -0.028076171875, 0.0130767822265625, 0.01026153564453125, 0.0203704833984375, 0.021728515625, -0.00586700439453125, 0.04168701171875, -0.06591796875, 0.021942138671875, -0.0026950836181640625, 0.014190673828125, 0.003894805908203125, -0.0209503173828125, 0.01708984375, 0.035858154296875, -0.0238037109375, -0.07147216796875, -0.00860595703125, -0.0085296630859375, -0.0214691162109375, -0.0290069580078125, -0.0158233642578125, -0.0223388671875, 0.0576171875, 0.07171630859375, 0.01239776611328125, -0.0212249755859375, -0.01216888427734375, -0.0222015380859375, -0.063232421875, -0.00838470458984375, 0.0301055908203125, -0.04864501953125, 0.012664794921875, 0.001194000244140625, -0.031585693359375, 0.016082763671875, 0.016143798828125, -0.043853759765625, 0.02447509765625, 0.00908660888671875, -0.011474609375, -0.071044921875, 0.002811431884765625, 0.053009033203125, -0.04913330078125, 0.00028395652770996094, -0.0158233642578125, 0.01483154296875, 0.007778167724609375, -0.030517578125, -0.0261077880859375, -0.0023937225341796875, -0.07135009765625, 0.034271240234375, -0.0462646484375, 0.05377197265625, -0.06787109375, -0.002124786376953125, 0.009857177734375, 0.012451171875, -0.0193023681640625, 0.015045166015625, 0.013336181640625, 0.0300140380859375, -0.017242431640625, 0.057769775390625, -0.034942626953125, 0.036376953125, -0.0026397705078125, 0.015777587890625, 0.0141143798828125, -0.0010738372802734375, 0.0718994140625, -0.04840087890625, 0.00652313232421875, -0.0032100677490234375, 0.005062103271484375, -0.04364013671875, 0.005641937255859375, 0.005084991455078125, 0.0167083740234375, 0.018768310546875 ]
f628cc5743d8c7ef75e2bc09162e9f00f995da72
Wordpress Stackexchange Q: How to force Media manager to overwrite files of same name? I have a widget that works with my theme that expects images named in a certain way, slide1.png, slide2.png, etc... However, when the user uploads their own images, named slide1.png, slide2.png, etc to the media library, rather than updating the images with the new ones, WordPress changes the names of the replacement images to slide11.png, slide22.png, etc Can I set a filter in theme options that tells WP to overwrite existing images without changing the filenames? A: Here is something i cooked up which was taken mainly from the plugin Overwrite Uploads but without the extra stuff add_filter('wp_handle_upload_overrides','noneUniqueFilename'); function noneUniqueFilename($overrides){ $overrides['test_form'] = false; $overrides['unique_filename_callback'] = 'nonUniqueFilenameCallback'; return $overrides; } function nonUniqueFilenameCallback($directory, $name, $extension){ $filename = $name . strtolower($extension); //remove old attachment removeOldAttach($filename); return $filename; } function removeOldAttach($filename){ $arguments = array( 'numberposts' => -1, 'meta_key' => '_wp_attached_file', 'meta_value' => $filename, 'post_type' => 'attachment' ); $Attachments_to_remove = get_posts($arguments); foreach($Attachments_to_remove as $a) wp_delete_attachment($a->ID, true); }
Q: How to force Media manager to overwrite files of same name? I have a widget that works with my theme that expects images named in a certain way, slide1.png, slide2.png, etc... However, when the user uploads their own images, named slide1.png, slide2.png, etc to the media library, rather than updating the images with the new ones, WordPress changes the names of the replacement images to slide11.png, slide22.png, etc Can I set a filter in theme options that tells WP to overwrite existing images without changing the filenames? A: Here is something i cooked up which was taken mainly from the plugin Overwrite Uploads but without the extra stuff add_filter('wp_handle_upload_overrides','noneUniqueFilename'); function noneUniqueFilename($overrides){ $overrides['test_form'] = false; $overrides['unique_filename_callback'] = 'nonUniqueFilenameCallback'; return $overrides; } function nonUniqueFilenameCallback($directory, $name, $extension){ $filename = $name . strtolower($extension); //remove old attachment removeOldAttach($filename); return $filename; } function removeOldAttach($filename){ $arguments = array( 'numberposts' => -1, 'meta_key' => '_wp_attached_file', 'meta_value' => $filename, 'post_type' => 'attachment' ); $Attachments_to_remove = get_posts($arguments); foreach($Attachments_to_remove as $a) wp_delete_attachment($a->ID, true); } A: I managed to make this work using a bit of @Bainternet's Answer without hacking the core. This other Q&A was helpful as well: query_posts: how to show all 'meta_value' containing a specific word? The function wp_unique_filename has the filter sanitize_file_name just at the beginning, so we can hook there and do the checking and removal of the duplicate attachment. I did basic localhost testings, please test it thoroughly before applying to a live site. add_filter( 'sanitize_file_name', 'filename_filter_wpse_28439', 10, 1 ); function filename_filter_wpse_28439( $name ) { $args = array( 'numberposts' => -1, 'post_type' => 'attachment', 'meta_query' => array( array( 'key' => '_wp_attached_file', 'value' => $name, 'compare' => 'LIKE' ) ) ); $attachments_to_remove = get_posts( $args ); foreach( $attachments_to_remove as $attach ) wp_delete_attachment( $attach->ID, true ); return $name; }
wordpress
{ "language": "en", "length": 292, "provenance": "stackexchange_00019.jsonl.gz:413033", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28439" }
[ 0.06878662109375, 0.0024967193603515625, -0.0059814453125, -0.0067901611328125, 0.00917816162109375, -0.0328369140625, 0.05743408203125, -0.0311431884765625, -0.01401519775390625, 0.0202178955078125, 0.015472412109375, 0.0106353759765625, 0.00557708740234375, -0.0364990234375, 0.01384735107421875, -0.005764007568359375, 0.0185394287109375, 0.0007824897766113281, 0.038055419921875, -0.0030574798583984375, 0.01081085205078125, 0.0232391357421875, 0.0070343017578125, 0.012359619140625, -0.00775909423828125, 0.00556182861328125, 0.04766845703125, -0.031402587890625, -0.0165252685546875, -0.031646728515625, 0.000056624412536621094, 0.039459228515625, -0.00266265869140625, 0.04168701171875, -0.03302001953125, 0.022064208984375, -0.0219268798828125, 0.03582763671875, 0.005710601806640625, 0.01067352294921875, 0.0247039794921875, 0.0023555755615234375, 0.0150146484375, -0.016693115234375, -0.004238128662109375, -0.03509521484375, 0.0209503173828125, -0.04296875, 0.037109375, 0.032989501953125, 0.025726318359375, 0.0169830322265625, 0.02117919921875, 0.0447998046875, -0.03192138671875, -0.027099609375, -0.03131103515625, 0.04779052734375, 0.0272369384765625, -0.01016998291015625, -0.0269927978515625, 0.0019855499267578125, 0.016265869140625, -0.006725311279296875, -0.018646240234375, -0.036590576171875, 0.0009832382202148438, 0.0017366409301757812, -0.08856201171875, -0.020538330078125, 0.08355712890625, -0.0269012451171875, -0.00589752197265625, -0.00870513916015625, -0.01406097412109375, 0.016265869140625, -0.0037288665771484375, 0.00421142578125, 0.0140838623046875, -0.01983642578125, 0.05218505859375, -0.01540374755859375, -0.03887939453125, 0.0304107666015625, 0.0205841064453125, 0.08306884765625, 0.01378631591796875, -0.05126953125, -0.0177764892578125, 0.02008056640625, -0.019927978515625, -0.02838134765625, 0.029937744140625, -0.006610870361328125, -0.0200653076171875, -0.01953125, 0.03125, 0.02398681640625, 0.00019788742065429688, -0.0026760101318359375, 0.002223968505859375, -0.0285491943359375, -0.00981903076171875, -0.01522064208984375, 0.0016183853149414062, 0.0281219482421875, -0.0186614990234375, -0.029022216796875, 0.0196075439453125, 0.0204620361328125, -0.01267242431640625, -0.01593017578125, -0.003047943115234375, -0.01201629638671875, 0.0159759521484375, 0.0236358642578125, -0.04083251953125, 0.043731689453125, -0.005214691162109375, 0.02801513671875, -0.00835418701171875, -0.005645751953125, -0.0201568603515625, 0.00548553466796875, 0.033355712890625, 0.007114410400390625, -0.0211029052734375, 0.017913818359375, 0.04248046875, 0.01517486572265625, -0.032440185546875, 0.00421905517578125, 0.023040771484375, -0.0112762451171875, 0.00890350341796875, -0.0139312744140625, 0.02197265625, -0.023773193359375, -0.00318145751953125, 0.01739501953125, 0.0039215087890625, -0.0267181396484375, -0.0206756591796875, 0.0013408660888671875, 0.032073974609375, 0.012939453125, 0.01113128662109375, 0.027008056640625, 0.0218048095703125, -0.04693603515625, 0.0665283203125, -0.05560302734375, 0.03668212890625, 0.0345458984375, -0.03509521484375, -0.013763427734375, 0.039398193359375, -0.04315185546875, -0.00762176513671875, -0.0771484375, 0.0176849365234375, -0.0264434814453125, -0.0309295654296875, -0.0247039794921875, -0.04705810546875, 0.0299530029296875, -0.021392822265625, 0.0018548965454101562, 0.0137481689453125, 0.05462646484375, -0.022857666015625, -0.0255584716796875, 0.0005311965942382812, 0.0133056640625, -0.01055145263671875, 0.02117919921875, -0.001544952392578125, 0.038421630859375, 0.001407623291015625, 0.0545654296875, 0.01812744140625, -0.023895263671875, 0.05841064453125, -0.0052947998046875, -0.08599853515625, -0.005062103271484375, 0.0080413818359375, 0.044097900390625, 0.042816162109375, 0.005863189697265625, 0.0849609375, -0.019927978515625, -0.019012451171875, -0.0119171142578125, -0.020355224609375, -0.001804351806640625, 0.01873779296875, 0.0180511474609375, -0.00801849365234375, 0.0105743408203125, 0.06036376953125, 0.00785064697265625, 0.0257568359375, -0.01354217529296875, -0.07135009765625, 0.0450439453125, -0.049102783203125, 0.035369873046875, -0.0714111328125, 0.0411376953125, 0.049835205078125, 0.00933074951171875, -0.058837890625, 0.05657958984375, 0.04931640625, -0.0306396484375, -0.005733489990234375, -0.0026531219482421875, -0.0038890838623046875, 0.028839111328125, -0.0157623291015625, -0.01114654541015625, -0.037384033203125, -0.0089111328125, 0.038116455078125, 0.0124664306640625, -0.034698486328125, -0.0126495361328125, 0.00563812255859375, -0.00200653076171875, -0.0291748046875, 0.06719970703125, -0.0200042724609375, 0.0185394287109375, -0.00322723388671875, -0.026763916015625, -0.0226287841796875, -0.11480712890625, 0.02667236328125, 0.0606689453125, 0.0238037109375, 0.03155517578125, -0.01340484619140625, 0.0213623046875, 0.06964111328125, 0.044158935546875, 0.0243377685546875, 0.007904052734375, 0.038116455078125, 0.01024627685546875, -0.012237548828125, -0.0170135498046875, 0.042572021484375, -0.0650634765625, 0.06402587890625, 0.0294036865234375, -0.0304718017578125, -0.0546875, 0.01285552978515625, 0.007083892822265625, 0.01187896728515625, 0.0171356201171875, -0.0025959014892578125, 0.0159454345703125, 0.0195159912109375, 0.004009246826171875, 0.004306793212890625, 0.001956939697265625, -0.021484375, 0.0193634033203125, 0.0203094482421875, -0.0655517578125, -0.00588226318359375, 0.033203125, 0.032745361328125, -0.0024394989013671875, -0.0186767578125, -0.003559112548828125, -0.00836944580078125, -0.008392333984375, -0.02484130859375, 0.0220794677734375, 0.00676727294921875, -0.01009368896484375, -0.005435943603515625, -0.060516357421875, 0.01419830322265625, -0.019256591796875, -0.04827880859375, -0.019927978515625, -0.00592041015625, 0.043853759765625, -0.0038661956787109375, 0.002796173095703125, 0.0017566680908203125, 0.0008411407470703125, -0.023162841796875, -0.006237030029296875, 0.017730712890625, -0.017120361328125, 0.018096923828125, 0.061614990234375, -0.011810302734375, 0.0340576171875, 0.002552032470703125, -0.0134429931640625, 0.0022411346435546875, 0.01346588134765625, -0.01016998291015625, -0.032501220703125, -0.0299224853515625, 0.00553131103515625, 0.00817108154296875, 0.01361846923828125, -0.0200347900390625, -0.049102783203125, -0.0165557861328125, -0.01194000244140625, -0.08740234375, -0.053985595703125, 0.01934814453125, -0.0243377685546875, 0.03167724609375, 0.036712646484375, -0.00848388671875, -0.049072265625, 0.0689697265625, 0.0005297660827636719, -0.020111083984375, -0.0004820823669433594, -0.01270294189453125, -0.0031414031982421875, -0.021392822265625, -0.0145416259765625, 0.00612640380859375, 0.00408935546875, -0.0119476318359375, 0.0625, -0.0027103424072265625, -0.0169525146484375, 0.04754638671875, 0.0014495849609375, 0.03668212890625, 0.04058837890625, 0.04583740234375, -0.016876220703125, -0.024932861328125, 0.00954437255859375, 0.033721923828125, 0.0274200439453125, -0.05010986328125, -0.0066986083984375, -0.00966644287109375, 0.002685546875, 0.0026454925537109375, 0.038665771484375, 0.003337860107421875, -0.008270263671875, 0.0229644775390625, -0.04266357421875, -0.00362396240234375, -0.020599365234375, -0.0179443359375, 0.0271453857421875, 0.01264190673828125, -0.0168304443359375, 0.0163116455078125, 0.0216217041015625, -0.004993438720703125, -0.00438690185546875, -0.002887725830078125, -0.02435302734375, 0.0133819580078125, 0.005580902099609375, 0.0182037353515625, 0.002147674560546875, 0.03802490234375, -0.017547607421875, -0.01294708251953125, 0.0016422271728515625, 0.0002827644348144531, 0.0018548965454101562, -0.0078125, -0.0011663436889648438, -0.031158447265625, 0.0260162353515625, -0.0816650390625, -0.00934600830078125, -0.04205322265625, 0.002197265625, -0.0208740234375, 0.051483154296875, -0.044891357421875, -0.032073974609375, -0.010162353515625, 0.016998291015625, -0.033111572265625, -0.011505126953125, 0.0014581680297851562, 0.0021457672119140625, -0.07769775390625, 0.01136016845703125, 0.0279388427734375, -0.04400634765625, -0.01499176025390625, 0.0037212371826171875, -0.06500244140625, -0.01421356201171875, 0.025421142578125, -0.02825927734375, 0.025634765625, -0.00017893314361572266, 0.019683837890625, -0.019317626953125, 0.0028438568115234375, -0.045562744140625, -0.1083984375, -0.0201416015625, -0.0298309326171875, 0.09307861328125, -0.024932861328125, 0.054473876953125, -0.054107666015625, 0.0501708984375, 0.0216522216796875, 0.007534027099609375, -0.005527496337890625, -0.0198211669921875, -0.0038166046142578125, -0.00728607177734375, -0.0019178390502929688, -0.0220947265625, 0.0182952880859375, -0.0281829833984375, -0.054901123046875, -0.0210113525390625, -0.0293121337890625, 0.032928466796875, 0.0116119384765625, -0.0360107421875, -0.074462890625, -0.0186920166015625, -0.0160369873046875, 0.0056304931640625, -0.021240234375, -0.01456451416015625, -0.0229034423828125, -0.060333251953125, 0.01491546630859375, -0.01346588134765625, -0.01364898681640625, 0.0187835693359375, 0.041290283203125, 0.00893402099609375, -0.00762939453125, -0.0699462890625, 0.015289306640625, 0.0180816650390625, -0.00409698486328125, 0.009185791015625, -0.0166168212890625, -0.017181396484375, 0.025390625, -0.01300811767578125, 0.0254364013671875, -0.033294677734375, 0.04150390625, -0.0206298828125, -0.01617431640625, 0.037506103515625, -0.0205230712890625, 0.01276397705078125, -0.00713348388671875, -0.0013599395751953125, 0.0095062255859375, -0.0196533203125, 0.003673553466796875, 0.0323486328125, -0.0211181640625, -0.0228118896484375, -0.048370361328125, 0.0220947265625, -0.046142578125, 0.023162841796875, -0.010162353515625, -0.00649261474609375, 0.00646209716796875, 0.0157012939453125, 0.0223541259765625, 0.00909423828125, 0.03924560546875, -0.03509521484375, 0.037078857421875, 0.0321044921875, -0.002765655517578125, -0.016357421875, -0.0012502670288085938, -0.00307464599609375, 0.0120391845703125, -0.00734710693359375, -0.019561767578125, 0.01641845703125, 0.022735595703125, 0.01090240478515625, -0.0101776123046875, 0.013336181640625, 0.0086822509765625, -0.031341552734375, -0.0155792236328125, -0.03045654296875, 0.00543212890625, -0.056427001953125, 0.0123443603515625, 0.032745361328125, -0.025390625, 0.032318115234375, -0.00727081298828125, 0.00330352783203125, -0.002246856689453125, 0.00025844573974609375, 0.0241546630859375, 0.025482177734375, 0.017822265625, 0.0113677978515625, 0.006771087646484375, 0.0006670951843261719, 0.0023365020751953125, 0.0065460205078125, -0.07000732421875, -0.01531219482421875, 0.0296173095703125, 0.087890625, 0.0038127899169921875, -0.0227203369140625, -0.01210784912109375, -0.055694580078125, -0.004581451416015625, 0.037384033203125, -0.006618499755859375, -0.042144775390625, -0.0131988525390625, -0.01198577880859375, 0.01947021484375, -0.047027587890625, -0.00988006591796875, -0.017578125, -0.0310211181640625, -0.016204833984375, 0.004871368408203125, -0.0574951171875, 0.00176239013671875, 0.020233154296875, 0.00555419921875, -0.00275421142578125, -0.01739501953125, -0.034271240234375, -0.050567626953125, -0.00865936279296875, 0.00328826904296875, 0.05908203125, -0.01220703125, 0.05572509765625, -0.02215576171875, -0.02154541015625, -0.02545166015625, 0.01078033447265625, 0.034332275390625, 0.01082611083984375, -0.007450103759765625, -0.009033203125, -0.0256195068359375, -0.0156707763671875, 0.0028972625732421875, -0.0250091552734375, -0.019622802734375, -0.0207672119140625, -0.004611968994140625, 0.0198516845703125, -0.005710601806640625, 0.0176544189453125, 0.0170135498046875, 0.013458251953125, -0.0196685791015625, 0.035400390625, -0.0168304443359375, 0.005252838134765625, 0.013763427734375, 0.0079803466796875, -0.0079345703125, -0.038482666015625, -0.03692626953125, 0.01113128662109375, -0.0234222412109375, -0.044464111328125, 0.030120849609375, 0.0538330078125, -0.038116455078125, -0.0266876220703125, 0.0081329345703125, 0.0154266357421875, 0.014862060546875, -0.0206756591796875, -0.0015001296997070312, -0.022369384765625, 0.0509033203125, -0.051239013671875, 0.0019216537475585938, -0.0110321044921875, -0.034576416015625, 0.034576416015625, -0.01418304443359375, 0.003597259521484375, 0.033660888671875, -0.049407958984375, 0.0151214599609375, 0.0606689453125, -0.030792236328125, 0.01171112060546875, 0.0455322265625, 0.00406646728515625, 0.044189453125, 0.00031566619873046875, 0.01275634765625, 0.057525634765625, 0.002086639404296875, 0.0360107421875, 0.007717132568359375, 0.0738525390625, 0.0047149658203125, 0.01763916015625, 0.0604248046875, -0.0240631103515625, 0.022125244140625, -0.0222625732421875, 0.02825927734375, -0.006427764892578125, 0.025634765625, 0.009002685546875, -0.0010776519775390625, 0.040863037109375, -0.0128326416015625, -0.0004596710205078125, 0.01090240478515625, 0.01125335693359375, -0.01517486572265625, -0.047027587890625, -0.0206451416015625, 0.0097808837890625, -0.0003502368927001953, 0.003787994384765625, 0.019561767578125, 0.01239013671875, -0.017852783203125, -0.04345703125, 0.04437255859375, -0.0157928466796875, 0.004375457763671875, 0.0160369873046875, -0.00998687744140625, -0.0225982666015625, -0.049896240234375, -0.0277099609375, -0.03167724609375, -0.0101776123046875, 0.017974853515625, -0.0131378173828125, 0.0421142578125, 0.0275726318359375, -0.0033397674560546875, -0.0017423629760742188, -0.009307861328125, -0.0070037841796875, -0.0226898193359375, -0.0178070068359375, 0.009857177734375, 0.01435089111328125, -0.037078857421875, 0.02276611328125, -0.041412353515625, -0.003940582275390625, -0.0205841064453125, -0.01556396484375, 0.0731201171875, -0.0684814453125, 0.0003807544708251953, 0.0125732421875, 0.037445068359375, 0.0091400146484375, 0.036041259765625, 0.0214996337890625, -0.0670166015625, -0.078369140625, 0.0229034423828125, -0.1036376953125, -0.01171112060546875, 0.034881591796875, -0.0877685546875, 0.1114501953125, 0.0211334228515625, 0.08575439453125, 0.0225372314453125, 0.0203704833984375, -0.035003662109375, -0.00955963134765625, -0.049407958984375, 0.00984954833984375, -0.0026874542236328125, 0.012969970703125, -0.046295166015625, 0.02301025390625, -0.0384521484375, 0.01120758056640625, 0.059783935546875, 0.0175323486328125, -0.01485443115234375, -0.019744873046875, 0.04827880859375, 0.0421142578125, -0.0007319450378417969, 0.0261993408203125, -0.0131072998046875, -0.018646240234375, -0.006664276123046875, -0.005191802978515625, 0.0233917236328125, -0.050323486328125, -0.0275421142578125, 0.01312255859375, 0.0150909423828125, 0.0251617431640625, -0.051116943359375, 0.037200927734375, -0.03118896484375, -0.028411865234375, 0.05645751953125, -0.02764892578125, 0.0163726806640625, 0.00823974609375, 0.0172882080078125, -0.00875091552734375, -0.013214111328125, 0.0005750656127929688, 0.03497314453125, -0.0029888153076171875, 0.004573822021484375, 0.051666259765625, 0.01885986328125, 0.0238037109375, -0.0012426376342773438, -0.0001747608184814453, 0.0012712478637695312, 0.0283966064453125, 0.003971099853515625, 0.012481689453125, 0.0163116455078125, -0.0014400482177734375, 0.019195556640625, 0.051727294921875, 0.01221466064453125, -0.023101806640625, -0.01541900634765625, 0.01544952392578125, -0.01499176025390625, -0.0238037109375, -0.01261138916015625, -0.0093536376953125, -0.0828857421875, -0.0628662109375, -0.04486083984375, 0.0258331298828125, 0.03564453125, 0.01488494873046875, -0.01337432861328125, 0.006221771240234375, -0.03125, 0.01137542724609375, -0.035919189453125, 0.00756072998046875, 0.0240936279296875, 0.0164337158203125, -0.0222015380859375, 0.040313720703125, 0.007312774658203125, 0.00798797607421875, -0.034393310546875, 0.042236328125, -0.01934814453125, 0.0482177734375, -0.0556640625, -0.0589599609375, 0.030792236328125, 0.0438232421875, 0.035400390625, 0.0278167724609375, 0.06317138671875, 0.033203125, -0.00960540771484375, 0.016387939453125, 0.015777587890625, -0.0166168212890625, 0.039306640625, -0.020294189453125, 0.00203704833984375, -0.0206146240234375, -0.01885986328125, -0.0172271728515625, 0.025146484375, 0.0090789794921875, -0.0247955322265625, 0.03082275390625, -0.007572174072265625, -0.01235198974609375, 0.05157470703125, 0.0018215179443359375, 0.052520751953125, 0.01702880859375, -0.101806640625, -0.02728271484375, -0.028411865234375, -0.01442718505859375, 0.0189666748046875, 0.022735595703125, -0.03515625, 0.048248291015625, -0.006439208984375, -0.05078125, 0.0242767333984375, 0.0086822509765625, 0.01171112060546875, 0.0098724365234375, -0.005771636962890625, -0.01322174072265625, 0.01198577880859375, 0.014923095703125, 0.025360107421875, 0.034454345703125, 0.010101318359375, 0.04888916015625, -0.033294677734375, 0.0103302001953125, 0.010009765625, 0.0306549072265625, -0.02252197265625, 0.009521484375, 0.0129852294921875, 0.00980377197265625, 0.0029659271240234375, -0.0205078125, 0.0010690689086914062, -0.0035400390625, 0.0216522216796875, -0.031341552734375, -0.037841796875, -0.0012254714965820312, 0.029388427734375, 0.025543212890625, -0.007083892822265625, -0.016204833984375, -0.0091400146484375, 0.01374053955078125, -0.00948333740234375, 0.0384521484375, 0.03668212890625, 0.0102081298828125, -0.02069091796875, 0.0254669189453125, -0.024658203125, 0.0400390625, 0.03173828125, 0.06878662109375, 0.03985595703125, -0.034637451171875, -0.05792236328125, -0.0290985107421875, -0.02606201171875, -0.034881591796875, 0.0099334716796875, 0.036956787109375, -0.0174102783203125, -0.017364501953125, -0.02020263671875, -0.0064239501953125, -0.00992584228515625, -0.033355712890625, -0.00714874267578125, 0.0022678375244140625, -0.0221405029296875, -0.01209259033203125, -0.046417236328125, -0.0175018310546875, -0.04974365234375, -0.01416015625, 0.042938232421875, -0.031890869140625, 0.0180816650390625, -0.0260772705078125, 0.004703521728515625, 0.0204010009765625, 0.035797119140625, -0.09429931640625, 0.0687255859375, 0.00640106201171875, -0.00414276123046875, 0.00971221923828125, -0.012542724609375, -0.0234375, 0.01824951171875, -0.0294189453125, -0.094970703125, -0.0548095703125, 0.09039306640625, -0.07373046875, -0.007007598876953125, 0.0094451904296875, -0.01091766357421875, 0.0297698974609375, -0.008087158203125, 0.00835418701171875, 0.0249786376953125, -0.030242919921875, -0.021514892578125, -0.00504302978515625, 0.01178741455078125, 0.0009775161743164062, -0.049407958984375, -0.01146697998046875, -0.039215087890625, 0.00537109375, 0.03424072265625, -0.007904052734375, 0.018218994140625, -0.018218994140625, -0.052001953125, -0.0169677734375, 0.021514892578125, -0.05230712890625, 0.0008959770202636719, 0.0008149147033691406, -0.0272979736328125, 0.047119140625, 0.0160675048828125, -0.0212860107421875, 0.02008056640625, 0.009368896484375, 0.00772857666015625, 0.01082611083984375, 0.0264129638671875, 0.00827789306640625, -0.00531005859375, 0.0263671875, 0.012451171875, -0.00708770751953125, 0.017608642578125, -0.0218048095703125, 0.07012939453125, 0.04827880859375, 0.0035533905029296875, 0.03790283203125, 0.0231475830078125, -0.06610107421875, -0.032135009765625, -0.01396942138671875, -0.057037353515625, 0.0054931640625, 0.104248046875, 0.1429443359375, 0.036346435546875, -0.05157470703125, -0.0200958251953125, 0.00731658935546875, -0.01158905029296875, -0.01012420654296875, 0.0228729248046875, -0.0718994140625, -0.0190277099609375, 0.0146331787109375, -0.0206756591796875, -0.01317596435546875, -0.01177978515625, -0.031402587890625, 0.0098876953125, 0.0265350341796875, -0.0117645263671875, 0.009490966796875, -0.0229949951171875, 0.08331298828125, -0.043304443359375, 0.0208587646484375, -0.0104827880859375, 0.030181884765625, 0.045745849609375, -0.0239410400390625, -0.004730224609375, 0.02362060546875, -0.02166748046875, -0.0016956329345703125, 0.033843994140625, -0.0172882080078125, 0.014556884765625, -0.0013561248779296875, -0.0014333724975585938, 0.0021076202392578125, 0.002696990966796875, -0.00879669189453125, -0.00787353515625, 0.055633544921875, -0.00791168212890625, 0.0638427734375, -0.01021575927734375, -0.01934814453125, 0.0032806396484375, -0.0027561187744140625, 0.0102996826171875, -0.005992889404296875, 0.068359375, -0.04644775390625, -0.00460052490234375, -0.04730224609375, -0.047821044921875, -0.05902099609375, 0.0185699462890625, 0.0007529258728027344, -0.016876220703125, 0.0401611328125 ]
8f24c932fb3c68560c6ab6a038d7c83a4633b4c3
Wordpress Stackexchange Q: SQL query to extract only the "current" wp_posts? The wp_posts table seems to retain all revisions of the same, ok very similar but presumably different, posts/pages/whatever. I'm somewhat conversant with SQL but not WordPress. I need to extract just those records which would appear on the public facing site; so just the most recent revision, and not all the superceded rows. Not sure how to filter the fields. Obviously something more complicated than: select * from wp_posts where post_status in ('publish','revision') order by post_modified desc which has 'duplicates' and seems to miss some stuff. A: Rather than constructing query from scratch, it is easier to see what exactly is WordPress querying when API function is used: get_posts(array( 'numberposts' => -1, )); var_dump( $wpdb->last_query ); Gives following SQL: SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC
Q: SQL query to extract only the "current" wp_posts? The wp_posts table seems to retain all revisions of the same, ok very similar but presumably different, posts/pages/whatever. I'm somewhat conversant with SQL but not WordPress. I need to extract just those records which would appear on the public facing site; so just the most recent revision, and not all the superceded rows. Not sure how to filter the fields. Obviously something more complicated than: select * from wp_posts where post_status in ('publish','revision') order by post_modified desc which has 'duplicates' and seems to miss some stuff. A: Rather than constructing query from scratch, it is easier to see what exactly is WordPress querying when API function is used: get_posts(array( 'numberposts' => -1, )); var_dump( $wpdb->last_query ); Gives following SQL: SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC A: You should use this as Wordpress does heavy lifting here: $args = array( 'showposts' => 10, ); $posts = query_posts(); var_dump($posts); You learn more about adding arguments to query_posts http://codex.wordpress.org/Class_Reference/WP_Query You should also use the Wordpress database class when creating manual MYSQL queries. You can learn more here: http://codex.wordpress.org/Class_Reference/wpdb Wordpress also includes a great function for escaping data in queries to keep your operation safe: esc_sql($string); You can use the Wordpress db class like this: global $wpdb; $results = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish'"); Using $wpdb->before your the table name prepends the assigned database prefix. This is important because you can have multiple Wordpress installations in one database using table prefixes. $wpdb-> will grab the correct prefix context.
wordpress
{ "language": "en", "length": 268, "provenance": "stackexchange_00019.jsonl.gz:413053", "question_score": "7", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28491" }
[ 0.04974365234375, -0.00240325927734375, -0.0311279296875, -0.0112762451171875, 0.0248565673828125, -0.054107666015625, 0.0673828125, -0.004421234130859375, 0.036834716796875, 0.0247344970703125, -0.03173828125, -0.00975799560546875, -0.0175323486328125, -0.013031005859375, -0.039398193359375, -0.025543212890625, 0.06500244140625, -0.06475830078125, 0.024139404296875, 0.01381683349609375, -0.0208587646484375, 0.050994873046875, 0.05450439453125, 0.03619384765625, -0.0037403106689453125, -0.01407623291015625, 0.07147216796875, -0.0278472900390625, 0.038360595703125, -0.00786590576171875, 0.0125274658203125, -0.0174560546875, 0.01277923583984375, -0.01515960693359375, 0.035400390625, -0.00982666015625, 0.0189208984375, -0.0186920166015625, 0.01300048828125, 0.0018320083618164062, 0.01139068603515625, -0.003604888916015625, -0.042572021484375, -0.015472412109375, -0.048065185546875, -0.01519775390625, 0.005359649658203125, 0.0149383544921875, 0.00616455078125, 0.013427734375, 0.00399017333984375, 0.0148162841796875, 0.01303863525390625, -0.0134124755859375, -0.0201568603515625, -0.0293731689453125, -0.0135345458984375, 0.01244354248046875, 0.041290283203125, -0.0338134765625, -0.033782958984375, -0.03558349609375, 0.03350830078125, -0.00624847412109375, -0.024444580078125, 0.00034427642822265625, 0.08135986328125, 0.01410675048828125, -0.06756591796875, -0.05548095703125, 0.040618896484375, -0.004917144775390625, -0.00815582275390625, -0.00545501708984375, -0.03607177734375, -0.01413726806640625, 0.0241851806640625, -0.0377197265625, 0.00002485513687133789, 0.01317596435546875, 0.006744384765625, -0.0207977294921875, -0.06610107421875, 0.01177215576171875, -0.0079193115234375, 0.0160980224609375, -0.0028743743896484375, -0.01263427734375, -0.0235443115234375, -0.007129669189453125, -0.0214691162109375, -0.043853759765625, -0.0576171875, 0.01476287841796875, 0.0114593505859375, -0.042205810546875, 0.041900634765625, 0.05914306640625, -0.0341796875, -0.0146484375, -0.0149688720703125, -0.0261383056640625, -0.02337646484375, -0.0198211669921875, 0.031402587890625, 0.00708770751953125, -0.0233612060546875, -0.0171661376953125, 0.0615234375, 0.045318603515625, 0.00843048095703125, 0.0282745361328125, -0.0159454345703125, -0.0264129638671875, -0.027557373046875, 0.036376953125, -0.00524139404296875, -0.0299835205078125, 0.001644134521484375, -0.035980224609375, 0.0007309913635253906, 0.0246734619140625, -0.0232391357421875, -0.03924560546875, 0.00047469139099121094, -0.0225982666015625, -0.03704833984375, 0.0262298583984375, -0.003665924072265625, 0.04168701171875, -0.0215301513671875, -0.006259918212890625, 0.04083251953125, 0.0142059326171875, -0.0165557861328125, -0.0306549072265625, -0.01177215576171875, -0.00524139404296875, 0.01036834716796875, -0.016326904296875, -0.01087188720703125, -0.01515960693359375, 0.01885986328125, -0.0294189453125, 0.01189422607421875, 0.0153350830078125, 0.0122833251953125, 0.00473785400390625, 0.00469207763671875, 0.008148193359375, -0.0297088623046875, 0.0195159912109375, 0.0099639892578125, 0.007709503173828125, 0.0042724609375, -0.0413818359375, 0.0239715576171875, -0.046234130859375, 0.047576904296875, -0.04901123046875, 0.08062744140625, -0.01357269287109375, -0.0258026123046875, 0.025390625, -0.05169677734375, 0.035675048828125, -0.056488037109375, -0.029327392578125, 0.02294921875, 0.0218963623046875, -0.01206207275390625, -0.0303497314453125, 0.07305908203125, 0.01995849609375, -0.0294036865234375, 0.0124969482421875, -0.01424407958984375, -0.05059814453125, 0.02587890625, 0.039306640625, -0.020538330078125, -0.0206756591796875, -0.040008544921875, 0.0196380615234375, -0.0269622802734375, 0.026947021484375, 0.0133514404296875, 0.031524658203125, -0.01194000244140625, 0.02435302734375, 0.04229736328125, 0.0156707763671875, -0.0494384765625, 0.0248565673828125, -0.0191497802734375, -0.018768310546875, 0.01235198974609375, 0.006359100341796875, -0.018829345703125, 0.0024242401123046875, -0.003475189208984375, 0.04302978515625, -0.028411865234375, 0.01105499267578125, -0.07720947265625, 0.02313232421875, -0.020660400390625, 0.049652099609375, -0.0266876220703125, -0.00951385498046875, 0.037994384765625, -0.007312774658203125, -0.048736572265625, 0.034027099609375, -0.039215087890625, -0.0304412841796875, -0.038604736328125, 0.006229400634765625, -0.01953125, 0.048431396484375, -0.02008056640625, -0.0251922607421875, -0.0269775390625, 0.014556884765625, 0.05023193359375, -0.040740966796875, 0.017333984375, -0.042266845703125, 0.0792236328125, -0.0064239501953125, 0.01522064208984375, -0.0060272216796875, 0.00203704833984375, 0.047698974609375, -0.0038738250732421875, 0.0009245872497558594, 0.0035114288330078125, -0.01290130615234375, 0.0107879638671875, 0.0180511474609375, 0.03875732421875, 0.037017822265625, 0.01401519775390625, 0.00464630126953125, 0.0186920166015625, -0.061370849609375, 0.0173492431640625, -0.019073486328125, 0.020416259765625, 0.0438232421875, 0.00748443603515625, -0.005908966064453125, 0.014251708984375, 0.0037288665771484375, 0.027008056640625, 0.028961181640625, 0.006137847900390625, 0.0596923828125, -0.04595947265625, 0.026214599609375, -0.0292510986328125, -0.06378173828125, -0.01107025146484375, -0.038482666015625, 0.006622314453125, 0.01885986328125, 0.036895751953125, 0.0428466796875, -0.00495147705078125, -0.00887298583984375, 0.006526947021484375, 0.0038013458251953125, 0.018585205078125, 0.0208587646484375, -0.057281494140625, 0.03564453125, -0.01074981689453125, -0.0061492919921875, 0.030914306640625, 0.0033168792724609375, -0.0078277587890625, 0.00017380714416503906, 0.02825927734375, -0.0054168701171875, 0.00948333740234375, -0.051239013671875, 0.03948974609375, 0.0206298828125, 0.022552490234375, 0.01250457763671875, 0.0230865478515625, 0.043792724609375, -0.022918701171875, 0.054168701171875, -0.0035648345947265625, 0.005535125732421875, 0.0156097412109375, -0.05841064453125, 0.052154541015625, -0.04046630859375, 0.037994384765625, 0.06500244140625, -0.0101165771484375, 0.0258026123046875, -0.0172271728515625, -0.0012969970703125, -0.0015001296997070312, -0.023040771484375, -0.0350341796875, 0.0079345703125, -0.0799560546875, 0.02130126953125, 0.028839111328125, 0.08123779296875, -0.01491546630859375, -0.0345458984375, 0.0028476715087890625, 0.0272369384765625, -0.05780029296875, -0.08917236328125, -0.01080322265625, -0.02978515625, -0.025177001953125, -0.029144287109375, -0.004486083984375, 0.0252685546875, -0.0362548828125, -0.00007283687591552734, 0.023529052734375, 0.00199127197265625, -0.079345703125, -0.00826263427734375, -0.0999755859375, 0.03662109375, -0.006549835205078125, 0.05645751953125, -0.0006432533264160156, 0.07476806640625, 0.007236480712890625, -0.063232421875, -0.025177001953125, 0.0287322998046875, -0.0281524658203125, -0.0051422119140625, -0.00875091552734375, 0.0260772705078125, -0.01251220703125, 0.022216796875, -0.00951385498046875, 0.0137176513671875, -0.01273345947265625, -0.0261993408203125, 0.0008006095886230469, 0.0022830963134765625, 0.027252197265625, 0.00739288330078125, -0.02471923828125, 0.045166015625, 0.05450439453125, -0.00971221923828125, -0.03900146484375, -0.0207061767578125, -0.032501220703125, 0.0589599609375, -0.025909423828125, 0.01029205322265625, 0.0019445419311523438, 0.06329345703125, 0.0421142578125, 0.01702880859375, 0.033050537109375, -0.01056671142578125, 0.033355712890625, 0.0229034423828125, 0.03497314453125, -0.04486083984375, 0.01316070556640625, -0.0213470458984375, 0.058380126953125, 0.01971435546875, 0.0094146728515625, -0.0037326812744140625, -0.005374908447265625, -0.035125732421875, -0.0193328857421875, 0.033050537109375, -0.0088348388671875, 0.0369873046875, -0.0193939208984375, -0.019989013671875, -0.01258087158203125, 0.0850830078125, -0.039337158203125, -0.0215606689453125, -0.00756072998046875, 0.02105712890625, -0.020538330078125, -0.062103271484375, -0.029571533203125, -0.006587982177734375, -0.043701171875, -0.005123138427734375, -0.02349853515625, -0.0131988525390625, -0.0027484893798828125, -0.0252838134765625, -0.0191192626953125, -0.04241943359375, 0.0303802490234375, -0.0260162353515625, -0.0200347900390625, 0.03887939453125, -0.0270538330078125, 0.00696563720703125, -0.015777587890625, -0.03167724609375, -0.05682373046875, -0.007015228271484375, 0.00414276123046875, 0.007503509521484375, -0.014862060546875, -0.002742767333984375, -0.021209716796875, 0.0158538818359375, -0.02093505859375, 0.00826263427734375, 0.005138397216796875, 0.03082275390625, -0.0230865478515625, 0.03155517578125, 0.01123809814453125, -0.0219879150390625, -0.03753662109375, -0.07232666015625, 0.01111602783203125, -0.04541015625, -0.05816650390625, -0.0193328857421875, -0.0782470703125, 0.029205322265625, -0.0240325927734375, -0.009246826171875, 0.019256591796875, 0.04217529296875, -0.025390625, 0.0357666015625, 0.0019550323486328125, -0.02642822265625, 0.058746337890625, 0.044921875, -0.0184173583984375, 0.00446319580078125, 0.057952880859375, -0.0007481575012207031, -0.04547119140625, -0.095458984375, -0.033660888671875, 0.030029296875, -0.023223876953125, 0.04547119140625, 0.0171356201171875, -0.0257415771484375, 0.0777587890625, 0.0104827880859375, -0.044891357421875, 0.0185089111328125, 0.0065155029296875, 0.024322509765625, -0.004375457763671875, -0.034210205078125, -0.01123046875, 0.051055908203125, 0.018096923828125, -0.0115203857421875, -0.0443115234375, 0.01415252685546875, 0.0738525390625, -0.022735595703125, 0.0361328125, -0.04425048828125, -0.042877197265625, 0.0022678375244140625, 0.0050811767578125, 0.0279083251953125, 0.03387451171875, -0.0010232925415039062, 0.0445556640625, 0.038543701171875, -0.0013513565063476562, -0.0170745849609375, 0.02838134765625, -0.0293121337890625, 0.030609130859375, -0.0134124755859375, -0.00604248046875, -0.0187530517578125, -0.002094268798828125, 0.039825439453125, -0.0171661376953125, -0.0823974609375, 0.01285552978515625, -0.0063018798828125, 0.0301361083984375, 0.044403076171875, -0.007030487060546875, 0.05029296875, 0.02301025390625, -0.0160369873046875, -0.0147247314453125, -0.034759521484375, -0.019683837890625, -0.05218505859375, 0.002307891845703125, 0.0163726806640625, -0.01128387451171875, 0.04278564453125, 0.048095703125, 0.02569580078125, 0.056732177734375, -0.033905029296875, 0.0361328125, -0.022216796875, 0.02410888671875, 0.004840850830078125, 0.0027332305908203125, 0.042266845703125, -0.0125732421875, 0.005870819091796875, -0.0087432861328125, -0.014678955078125, 0.001972198486328125, -0.0023097991943359375, 0.00606536865234375, 0.0085296630859375, 0.03369140625, 0.0151519775390625, -0.035308837890625, 0.03741455078125, 0.045684814453125, -0.0084075927734375, -0.0256195068359375, -0.00962066650390625, 0.028656005859375, 0.04229736328125, -0.01509857177734375, 0.053863525390625, -0.032562255859375, 0.0216064453125, 0.01200103759765625, -0.01268768310546875, -0.0271148681640625, -0.0172576904296875, -0.019317626953125, -0.0633544921875, -0.0203094482421875, 0.0301971435546875, 0.037628173828125, -0.01477813720703125, -0.024383544921875, 0.0226898193359375, 0.018218994140625, 0.01538848876953125, -0.038421630859375, -0.025787353515625, 0.000027894973754882812, -0.013641357421875, 0.04638671875, 0.0164947509765625, 0.021209716796875, -0.01702880859375, -0.0242156982421875, -0.0211944580078125, 0.06591796875, -0.0200347900390625, -0.0028820037841796875, -0.041595458984375, 0.0230712890625, 0.0220489501953125, 0.0111236572265625, -0.035919189453125, -0.04461669921875, -0.01276397705078125, 0.0284576416015625, 0.00348663330078125, -0.027374267578125, 0.10748291015625, -0.0027561187744140625, 0.08514404296875, -0.01152801513671875, 0.042205810546875, -0.031463623046875, -0.0081787109375, 0.016937255859375, -0.066162109375, -0.03594970703125, 0.003314971923828125, -0.0311279296875, -0.01568603515625, -0.0299224853515625, -0.00852203369140625, 0.02252197265625, -0.02227783203125, 0.009857177734375, -0.015655517578125, -0.008514404296875, -0.039703369140625, -0.0102386474609375, 0.030975341796875, -0.006084442138671875, -0.004123687744140625, -0.0163116455078125, 0.0184173583984375, -0.033111572265625, -0.0022640228271484375, -0.03717041015625, 0.01027679443359375, 0.017486572265625, 0.0010614395141601562, 0.0655517578125, 0.00696563720703125, 0.0457763671875, 0.044097900390625, 0.030914306640625, 0.03387451171875, 0.003082275390625, -0.0238494873046875, 0.0015687942504882812, 0.04534912109375, 0.0034008026123046875, -0.0005450248718261719, 0.03997802734375, -0.01519012451171875, 0.0294189453125, 0.020751953125, 0.050506591796875, -0.050689697265625, 0.0251922607421875, 0.036468505859375, -0.0361328125, -0.017913818359375, 0.0186920166015625, -0.01690673828125, -0.055908203125, 0.0010862350463867188, -0.0201263427734375, -0.02178955078125, -0.011199951171875, 0.00044465065002441406, -0.010589599609375, -0.0291900634765625, 0.0075225830078125, 0.0018901824951171875, -0.01654052734375, 0.009124755859375, 0.00817108154296875, -0.016571044921875, -0.01690673828125, 0.012176513671875, -0.0091705322265625, -0.0149383544921875, -0.07708740234375, 0.00984954833984375, -0.0015325546264648438, -0.0159149169921875, -0.0183258056640625, 0.01267242431640625, 0.01377105712890625, 0.07745361328125, -0.035797119140625, 0.0254669189453125, 0.0640869140625, -0.017852783203125, -0.0732421875, -0.052215576171875, 0.0023212432861328125, 0.04864501953125, -0.0124664306640625, 0.038787841796875, 0.00716400146484375, -0.038909912109375, -0.00464630126953125, -0.0330810546875, 0.07733154296875, -0.061676025390625, -0.0150909423828125, 0.001476287841796875, -0.0146331787109375, 0.01141357421875, -0.0037975311279296875, -0.0015592575073242188, -0.044464111328125, -0.01285552978515625, -0.0135040283203125, -0.02117919921875, -0.0012140274047851562, -0.0098724365234375, -0.060760498046875, 0.080322265625, -0.0274505615234375, 0.040252685546875, 0.0394287109375, 0.016204833984375, -0.040771484375, -0.0198822021484375, -0.04510498046875, 0.07330322265625, -0.00252532958984375, 0.052947998046875, -0.07061767578125, -0.003993988037109375, 0.005321502685546875, 0.015777587890625, 0.05743408203125, 0.01024627685546875, -0.0177154541015625, -0.0208892822265625, 0.0196685791015625, 0.04779052734375, -0.004039764404296875, 0.033203125, 0.006877899169921875, 0.058441162109375, 0.0648193359375, -0.053009033203125, 0.0236968994140625, 0.01503753662109375, -0.009307861328125, 0.03643798828125, 0.0304718017578125, 0.04931640625, -0.002124786376953125, 0.0295867919921875, -0.01097869873046875, -0.01303863525390625, 0.027313232421875, -0.036834716796875, 0.01468658447265625, 0.032135009765625, 0.05206298828125, -0.0732421875, -0.043060302734375, -0.023468017578125, 0.03936767578125, 0.020050048828125, 0.0276031494140625, 0.04925537109375, 0.00975799560546875, 0.06396484375, 0.0166015625, 0.03643798828125, 0.0069122314453125, 0.0005502700805664062, 0.06402587890625, 0.03778076171875, 0.0247955322265625, -0.018341064453125, 0.0225067138671875, 0.04095458984375, 0.063720703125, -0.05328369140625, -0.01617431640625, 0.02581787109375, -0.0007357597351074219, -0.0167236328125, 0.00621795654296875, 0.012847900390625, 0.0242156982421875, 0.02001953125, 0.0241241455078125, -0.01428985595703125, -0.00318145751953125, -0.0008578300476074219, 0.01239013671875, 0.0009303092956542969, 0.017059326171875, -0.00695037841796875, -0.014068603515625, -0.034881591796875, 0.024566650390625, 0.024169921875, 0.035980224609375, -0.01322174072265625, 0.008087158203125, -0.0068511962890625, -0.004398345947265625, 0.0079345703125, -0.033416748046875, 0.002410888671875, -0.01332855224609375, -0.040557861328125, -0.00670623779296875, 0.03741455078125, 0.045501708984375, -0.024261474609375, 0.038360595703125, 0.0078277587890625, -0.053985595703125, -0.0045318603515625, -0.005710601806640625, -0.015777587890625, -0.048980712890625, -0.016143798828125, -0.029510498046875, 0.0072479248046875, 0.0011348724365234375, 0.01026153564453125, 0.056121826171875, -0.0250396728515625, -0.025543212890625, 0.04705810546875, 0.000576019287109375, 0.0241546630859375, 0.0269317626953125, 0.007022857666015625, -0.0246734619140625, 0.000911712646484375, -0.048095703125, 0.0023326873779296875, -0.07525634765625, 0.0280609130859375, -0.005573272705078125, 0.0014448165893554688, 0.007320404052734375, 0.041046142578125, 0.01140594482421875, -0.00745391845703125, -0.00472259521484375, -0.00247955322265625, 0.0165252685546875, 0.0103302001953125, 0.011016845703125, 0.025238037109375, -0.0171356201171875, -0.0129852294921875, -0.006649017333984375, 0.0193634033203125, 0.0268707275390625, 0.01837158203125, 0.0006241798400878906, 0.033782958984375, 0.01495361328125, 0.0300140380859375, -0.05426025390625, 0.00836181640625, 0.01465606689453125, -0.04150390625, -0.00272369384765625, 0.00907135009765625, -0.0174560546875, -0.00765228271484375, 0.059478759765625, -0.0038585662841796875, 0.00873565673828125, -0.03125, 0.032318115234375, -0.02899169921875, -0.033477783203125, -0.029388427734375, 0.0097198486328125, 0.03985595703125, -0.0062713623046875, 0.003475189208984375, -0.0196380615234375, 0.0264892578125, -0.00246429443359375, 0.017791748046875, -0.06640625, 0.0283203125, -0.00957489013671875, 0.03802490234375, 0.037689208984375, 0.01800537109375, 0.068359375, 0.0173797607421875, -0.0151824951171875, 0.02032470703125, 0.02203369140625, -0.0396728515625, 0.01788330078125, 0.0015840530395507812, -0.032562255859375, -0.0032329559326171875, 0.037811279296875, 0.0153656005859375, 0.0219573974609375, -0.037811279296875, -0.00418853759765625, -0.01013946533203125, -0.01259613037109375, 0.0004839897155761719, 0.020263671875, -0.0567626953125, -0.0068206787109375, -0.0236358642578125, -0.081787109375, -0.023284912109375, -0.02825927734375, -0.01580810546875, 0.00913238525390625, -0.05328369140625, 0.0577392578125, 0.004848480224609375, -0.017822265625, -0.029815673828125, -0.0277862548828125, 0.00893402099609375, 0.0298614501953125, -0.004032135009765625, -0.0240020751953125, -0.0197601318359375, 0.01175689697265625, -0.007965087890625, 0.004787445068359375, 0.0158843994140625, -0.005786895751953125, -0.0273895263671875, -0.00246429443359375, -0.0098724365234375, 0.031646728515625, 0.0046539306640625, -0.005603790283203125, -0.006763458251953125, 0.0247955322265625, -0.033172607421875, -0.053436279296875, 0.036468505859375, -0.0458984375, -0.00615692138671875, -0.021392822265625, -0.0048065185546875, -0.0091400146484375, -0.03509521484375, -0.05938720703125, 0.052886962890625, -0.0129241943359375, -0.031494140625, -0.01406097412109375, 0.023956298828125, 0.0172271728515625, -0.00970458984375, 0.0016326904296875, -0.037109375, -0.041748046875, -0.01108551025390625, 0.00615692138671875, 0.0677490234375, -0.0060882568359375, -0.00232696533203125, -0.03485107421875, -0.007282257080078125, -0.02752685546875, 0.042938232421875, -0.015960693359375, 0.03192138671875, -0.0113677978515625, 0.0285186767578125, -0.01934814453125, 0.0287933349609375, -0.021820068359375, -0.00800323486328125, -0.0039520263671875, 0.0133056640625, -0.052703857421875, -0.0248565673828125, 0.058013916015625, 0.08587646484375, 0.016357421875, -0.0164947509765625, -0.01544189453125, -0.002529144287109375, -0.01486968994140625, -0.003429412841796875, 0.0236968994140625, -0.05389404296875, 0.0026035308837890625, 0.01424407958984375, 0.0023250579833984375, -0.03631591796875, -0.0152587890625, -0.032806396484375, -0.01837158203125, -0.040557861328125, 0.007144927978515625, -0.022552490234375, 0.0301361083984375, 0.0159759521484375, -0.036956787109375, -0.034637451171875, 0.0246124267578125, -0.0154876708984375, -0.00579071044921875, 0.0419921875, 0.01067352294921875, 0.0022430419921875, 0.001953125, 0.005496978759765625, 0.0276031494140625, -0.0295562744140625, 0.0159912109375, -0.01523590087890625, -0.01146697998046875, 0.0159759521484375, 0.00960540771484375, 0.002811431884765625, -0.0218048095703125, 0.00624847412109375, -0.011749267578125, 0.06695556640625, 0.00629425048828125, 0.021728515625, -0.0207977294921875, 0.052398681640625, -0.01006317138671875, -0.038726806640625, 0.0206298828125, -0.021209716796875, -0.019256591796875, 0.0276336669921875, -0.0194854736328125, -0.04315185546875, 0.01045989990234375, 0.030548095703125, 0.02093505859375, 0.0048980712890625 ]
9febe04f34115d7ff56e2c280b286db1f0035772
Wordpress Stackexchange Q: Is there a hook that runs after a user logs in? I am writing a plugin that fetches some extended user info from a remote service and I need it to execute its function each time a user logs in. Is there a hook that gets fired after login that I can add an action to? A: The action hook wp_login runs when the user logs in - it can run a simple function. function do_anything() { //do stuff } add_action('wp_login', 'do_anything'); documentation : https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login The real breadwinner here is wp_authenticate which has a bit of documentation. It passes an array with the given username and password, which gives you the opportunity to pass info to the remote service, if necessary. https://codex.wordpress.org/Plugin_API/Action_Reference/wp_authenticate and to change the redirect URL after login, there is the filter login_redirect: https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect
Q: Is there a hook that runs after a user logs in? I am writing a plugin that fetches some extended user info from a remote service and I need it to execute its function each time a user logs in. Is there a hook that gets fired after login that I can add an action to? A: The action hook wp_login runs when the user logs in - it can run a simple function. function do_anything() { //do stuff } add_action('wp_login', 'do_anything'); documentation : https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login The real breadwinner here is wp_authenticate which has a bit of documentation. It passes an array with the given username and password, which gives you the opportunity to pass info to the remote service, if necessary. https://codex.wordpress.org/Plugin_API/Action_Reference/wp_authenticate and to change the redirect URL after login, there is the filter login_redirect: https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect A: I would caution against using wp_login. It is deprecated and in later versions of WordPress it may not work at all. Instead try the wp_signon function. Edit: The wp_login function is deprecated but the wp_login action is still fine to use.
wordpress
{ "language": "en", "length": 179, "provenance": "stackexchange_00019.jsonl.gz:413063", "question_score": "33", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28522" }
[ 0.048980712890625, 0.00926971435546875, -0.01079559326171875, -0.0281829833984375, 0.0185394287109375, -0.03753662109375, 0.040496826171875, -0.01128387451171875, -0.050048828125, 0.032684326171875, 0.025177001953125, 0.04217529296875, -0.01067352294921875, -0.0275115966796875, 0.0293731689453125, -0.01476287841796875, 0.0254669189453125, -0.01617431640625, 0.0217437744140625, -0.015838623046875, -0.0013580322265625, 0.0026302337646484375, 0.038818359375, 0.053070068359375, 0.01004791259765625, -0.036529541015625, 0.10760498046875, -0.0255584716796875, 0.03173828125, 0.007503509521484375, 0.020111083984375, -0.056060791015625, -0.000675201416015625, 0.06170654296875, -0.04510498046875, 0.00799560546875, -0.005405426025390625, 0.040008544921875, 0.0168609619140625, 0.02301025390625, 0.06146240234375, -0.03179931640625, -0.0252685546875, 0.0216522216796875, -0.010345458984375, -0.04193115234375, 0.07037353515625, -0.0142669677734375, 0.03265380859375, 0.033935546875, 0.017181396484375, 0.036956787109375, 0.018218994140625, 0.025665283203125, 0.0016546249389648438, 0.0238189697265625, -0.056976318359375, 0.025360107421875, 0.0264892578125, 0.0278778076171875, 0.007663726806640625, -0.03424072265625, 0.00823974609375, -0.02423095703125, -0.0006494522094726562, 0.011199951171875, -0.02508544921875, 0.016448974609375, -0.00351715087890625, -0.0032958984375, -0.01378631591796875, -0.023956298828125, -0.041961669921875, 0.03656005859375, -0.017974853515625, -0.0206756591796875, 0.0279693603515625, -0.0013704299926757812, 0.004734039306640625, 0.049896240234375, -0.006526947021484375, -0.025238037109375, 0.0237884521484375, -0.014434814453125, -0.006801605224609375, 0.0078887939453125, -0.027618408203125, -0.0031452178955078125, -0.01235198974609375, -0.00960540771484375, -0.0181732177734375, 0.0341796875, 0.00658416748046875, -0.0129547119140625, -0.052093505859375, -0.021331787109375, -0.00323486328125, 0.0190887451171875, 0.006561279296875, -0.007904052734375, -0.00691986083984375, -0.0302581787109375, -0.026153564453125, -0.0182952880859375, -0.0159454345703125, 0.044281005859375, 0.04437255859375, 0.01218414306640625, -0.042083740234375, -0.006114959716796875, -0.00868988037109375, -0.045166015625, -0.03277587890625, -0.0230560302734375, -0.005977630615234375, 0.0198822021484375, -0.049468994140625, 0.00787353515625, -0.00872802734375, 0.0175628662109375, -0.036895751953125, -0.0338134765625, 0.03369140625, 0.00463104248046875, 0.0007033348083496094, -0.02349853515625, -0.0176239013671875, -0.01788330078125, 0.013824462890625, 0.01393890380859375, -0.00644683837890625, 0.0138397216796875, 0.01849365234375, 0.00444793701171875, -0.01090240478515625, -0.01416778564453125, 0.0677490234375, -0.00750732421875, -0.007183074951171875, 0.00836944580078125, 0.007495880126953125, -0.047149658203125, -0.06695556640625, 0.002227783203125, 0.06683349609375, 0.00562286376953125, 0.027069091796875, 0.0203704833984375, -0.0008807182312011719, -0.00997161865234375, 0.0261688232421875, 0.0196990966796875, -0.013397216796875, 0.0161590576171875, 0.05908203125, 0.021026611328125, 0.034576416015625, -0.0035953521728515625, 0.01263427734375, 0.030487060546875, 0.02618408203125, -0.005084991455078125, -0.028717041015625, -0.015838623046875, -0.046600341796875, 0.0100555419921875, -0.0221405029296875, 0.002780914306640625, 0.0305938720703125, 0.0305328369140625, 0.029815673828125, 0.0114898681640625, 0.018798828125, 0.024261474609375, -0.0016660690307617188, -0.009246826171875, -0.030303955078125, 0.046905517578125, 0.045562744140625, -0.028472900390625, -0.0189666748046875, -0.02545166015625, 0.0823974609375, -0.0118255615234375, -0.03021240234375, 0.062469482421875, 0.020294189453125, 0.07122802734375, -0.0167083740234375, 0.02227783203125, -0.01403045654296875, 0.058074951171875, -0.061676025390625, 0.03448486328125, -0.01580810546875, -0.0146331787109375, 0.0279541015625, 0.00855255126953125, -0.0146942138671875, -0.0014629364013671875, 0.049652099609375, 0.00727081298828125, -0.01259613037109375, -0.0285186767578125, -0.0899658203125, 0.00331878662109375, -0.0220489501953125, 0.035247802734375, 0.0257110595703125, 0.0224456787109375, -0.0231170654296875, -0.00250244140625, 0.018951416015625, -0.035186767578125, -0.01343536376953125, 0.026824951171875, -0.045074462890625, 0.047698974609375, 0.0031299591064453125, 0.07183837890625, 0.005435943603515625, -0.041290283203125, 0.00856781005859375, -0.0609130859375, 0.036773681640625, -0.02734375, -0.00759124755859375, -0.037689208984375, 0.0017261505126953125, -0.004364013671875, -0.029998779296875, 0.045928955078125, 0.0169677734375, 0.039276123046875, -0.04229736328125, -0.004856109619140625, -0.03387451171875, -0.01511383056640625, 0.00919342041015625, 0.03857421875, 0.034820556640625, 0.04742431640625, 0.005382537841796875, 0.00911712646484375, -0.015869140625, -0.04205322265625, 0.03741455078125, -0.02685546875, 0.0181884765625, 0.0694580078125, -0.0390625, 0.0106658935546875, 0.008453369140625, -0.021575927734375, 0.00009512901306152344, 0.034210205078125, -0.0015878677368164062, -0.04547119140625, -0.023895263671875, 0.003330230712890625, 0.0286712646484375, -0.058685302734375, -0.0660400390625, -0.004100799560546875, -0.03338623046875, -0.04052734375, -0.046173095703125, -0.0516357421875, -0.027679443359375, -0.0276947021484375, 0.05706787109375, -0.0030956268310546875, -0.0180511474609375, 0.0164794921875, 0.0304718017578125, -0.031402587890625, -0.025726318359375, 0.0032558441162109375, -0.021942138671875, -0.01146697998046875, -0.0255279541015625, -0.01473236083984375, -0.03607177734375, -0.02252197265625, 0.00234222412109375, -0.0131378173828125, 0.01654052734375, -0.00437164306640625, 0.040802001953125, -0.0224761962890625, 0.0291748046875, -0.01235198974609375, -0.046234130859375, 0.06219482421875, -0.0189971923828125, -0.07025146484375, -0.032073974609375, -0.0151824951171875, 0.03900146484375, -0.04425048828125, 0.0228424072265625, 0.058624267578125, -0.0352783203125, 0.023712158203125, 0.0035839080810546875, -0.0391845703125, 0.002811431884765625, 0.01486968994140625, 0.00861358642578125, -0.038787841796875, -0.00774383544921875, 0.042327880859375, 0.0308685302734375, 0.08489990234375, -0.0161285400390625, -0.047882080078125, -0.01605224609375, 0.0175933837890625, -0.05841064453125, -0.08587646484375, -0.0604248046875, -0.09710693359375, 0.038116455078125, -0.0226898193359375, -0.0170440673828125, 0.01018524169921875, 0.00757598876953125, 0.0297698974609375, -0.0396728515625, -0.0084686279296875, -0.007537841796875, -0.050628662109375, -0.0265655517578125, 0.024993896484375, 0.0025787353515625, 0.0109100341796875, 0.00403594970703125, 0.0535888671875, -0.0024261474609375, -0.04998779296875, -0.00533294677734375, -0.00260162353515625, -0.021820068359375, -0.0016002655029296875, -0.049407958984375, -0.00720977783203125, 0.042816162109375, -0.01629638671875, 0.028228759765625, 0.013824462890625, 0.0194091796875, -0.007335662841796875, 0.006580352783203125, -0.043304443359375, -0.00022614002227783203, 0.0187835693359375, -0.01068878173828125, -0.04608154296875, 0.0130157470703125, -0.07135009765625, 0.03887939453125, -0.03497314453125, -0.03955078125, 0.0028057098388671875, 0.03692626953125, -0.00927734375, -0.01218414306640625, -0.041015625, -0.010498046875, 0.0009722709655761719, 0.00360107421875, 0.0150909423828125, -0.0019855499267578125, -0.04052734375, -0.048370361328125, -0.009521484375, 0.02752685546875, -0.0006952285766601562, -0.055389404296875, -0.02484130859375, 0.0245208740234375, -0.032196044921875, 0.018035888671875, -0.0838623046875, -0.0187225341796875, 0.048797607421875, 0.0286407470703125, 0.0235443115234375, -0.0094757080078125, -0.0364990234375, -0.003139495849609375, 0.076416015625, -0.00994110107421875, 0.004451751708984375, 0.0163116455078125, 0.0081329345703125, -0.042572021484375, 0.000732421875, -0.09246826171875, 0.01294708251953125, -0.1002197265625, 0.0032196044921875, -0.01007080078125, -0.0357666015625, -0.00710296630859375, 0.006763458251953125, -0.0556640625, -0.052703857421875, 0.004871368408203125, 0.0198822021484375, -0.0028629302978515625, -0.0190277099609375, -0.0186767578125, -0.0133056640625, 0.04168701171875, -0.0281219482421875, -0.0270233154296875, 0.002269744873046875, -0.05340576171875, 0.053131103515625, 0.076171875, -0.07049560546875, 0.00555419921875, 0.00908660888671875, 0.01113128662109375, 0.01512908935546875, 0.0157470703125, 0.0044403076171875, 0.041839599609375, -0.00603485107421875, -0.004062652587890625, -0.00791168212890625, -0.003795623779296875, 0.0008897781372070312, -0.0071258544921875, 0.0099945068359375, -0.045623779296875, -0.0284576416015625, -0.0148773193359375, -0.0228729248046875, -0.008148193359375, -0.0230560302734375, 0.0024318695068359375, 0.01328277587890625, -0.0015048980712890625, 0.00664520263671875, -0.0302886962890625, -0.0224609375, 0.0016374588012695312, -0.0146636962890625, -0.00826263427734375, 0.0065765380859375, 0.055938720703125, 0.0208587646484375, 0.0013217926025390625, 0.01320648193359375, 0.01212310791015625, 0.0182952880859375, -0.00533294677734375, 0.0289306640625, -0.01953125, -0.0219573974609375, 0.0648193359375, -0.0013332366943359375, 0.00791168212890625, -0.0130767822265625, 0.049285888671875, 0.01093292236328125, -0.0154571533203125, 0.017578125, 0.002925872802734375, -0.019744873046875, 0.0087432861328125, -0.0003819465637207031, 0.0001634359359741211, 0.043914794921875, -0.0029582977294921875, -0.0401611328125, 0.0244598388671875, 0.0196075439453125, -0.007503509521484375, -0.0116424560546875, 0.0005121231079101562, 0.0105438232421875, 0.034423828125, -0.00539398193359375, -0.015045166015625, 0.004871368408203125, -0.023193359375, 0.0010328292846679688, -0.06396484375, 0.01537322998046875, 0.009857177734375, -0.0238800048828125, -0.0159759521484375, 0.0164337158203125, -0.01641845703125, 0.0692138671875, -0.005962371826171875, -0.043212890625, -0.0008244514465332031, -0.038726806640625, 0.00743865966796875, 0.0235443115234375, -0.05157470703125, 0.036834716796875, 0.0291290283203125, -0.031158447265625, -0.01380157470703125, -0.0170440673828125, -0.036712646484375, -0.045684814453125, -0.018218994140625, -0.0282745361328125, -0.004058837890625, 0.0303955078125, 0.04229736328125, -0.0061492919921875, 0.0423583984375, -0.021728515625, 0.036407470703125, 0.0148468017578125, 0.021453857421875, 0.019744873046875, 0.00441741943359375, -0.011627197265625, 0.0015239715576171875, -0.01230621337890625, -0.041473388671875, 0.0009174346923828125, 0.0258331298828125, 0.028045654296875, 0.0105743408203125, -0.01348876953125, 0.0192718505859375, 0.0096435546875, -0.0201416015625, 0.073486328125, 0.02978515625, -0.049163818359375, -0.046112060546875, -0.006595611572265625, 0.03533935546875, -0.00879669189453125, -0.00814056396484375, 0.006389617919921875, -0.025482177734375, 0.009033203125, -0.0072479248046875, -0.01910400390625, 0.0029621124267578125, -0.01122283935546875, -0.052520751953125, -0.0242156982421875, 0.01049041748046875, 0.007965087890625, -0.00010019540786743164, -0.0113983154296875, -0.027923583984375, 0.0201263427734375, -0.017425537109375, 0.019683837890625, -0.0306854248046875, -0.0004954338073730469, -0.0276031494140625, -0.007781982421875, 0.0609130859375, 0.0277557373046875, -0.0894775390625, 0.02923583984375, -0.00600433349609375, 0.0117340087890625, 0.002429962158203125, -0.0188751220703125, -0.041259765625, -0.0256195068359375, 0.0188751220703125, 0.0166168212890625, 0.0130462646484375, 0.00339508056640625, -0.023406982421875, 0.02191162109375, 0.0280609130859375, 0.0177001953125, -0.003971099853515625, 0.065673828125, -0.01335906982421875, 0.006641387939453125, 0.002979278564453125, 0.03570556640625, -0.0167083740234375, 0.006298065185546875, 0.0001342296600341797, 0.01104736328125, -0.008270263671875, -0.0146331787109375, 0.0117340087890625, 0.0015659332275390625, 0.0692138671875, -0.00301361083984375, -0.005283355712890625, 0.005741119384765625, -0.0093994140625, -0.00571441650390625, 0.05499267578125, 0.0687255859375, 0.018096923828125, 0.047332763671875, -0.0283203125, -0.006610870361328125, 0.0031948089599609375, -0.00032782554626464844, 0.043731689453125, -0.01007080078125, 0.0263824462890625, 0.00034356117248535156, -0.05291748046875, 0.048126220703125, 0.052520751953125, -0.0128631591796875, 0.0257110595703125, 0.01812744140625, 0.01079559326171875, 0.00710296630859375, -0.01641845703125, 0.0200958251953125, 0.006084442138671875, 0.04180908203125, -0.0194244384765625, -0.034393310546875, 0.0239105224609375, -0.0374755859375, 0.0002644062042236328, 0.032623291015625, 0.02252197265625, -0.08209228515625, 0.0209197998046875, -0.01000213623046875, 0.00986480712890625, 0.032012939453125, -0.00684356689453125, -0.00531005859375, -0.0037555694580078125, 0.03619384765625, 0.010833740234375, -0.007354736328125, 0.032745361328125, 0.013519287109375, -0.01080322265625, -0.004413604736328125, 0.031158447265625, 0.0272674560546875, -0.0302734375, 0.0244293212890625, 0.0224761962890625, 0.01277923583984375, -0.041107177734375, -0.0113372802734375, 0.042938232421875, -0.019744873046875, -0.0638427734375, 0.030059814453125, -0.01519012451171875, 0.01444244384765625, 0.0034046173095703125, 0.001155853271484375, 0.0197601318359375, 0.0250701904296875, -0.0018815994262695312, -0.0230865478515625, 0.0099334716796875, -0.0255889892578125, -0.0200042724609375, -0.03582763671875, -0.0174713134765625, 0.0494384765625, -0.0287628173828125, 0.03326416015625, 0.017120361328125, -0.0169677734375, -0.01885986328125, -0.057281494140625, 0.061767578125, -0.00870513916015625, -0.0111541748046875, 0.0189056396484375, 0.00594329833984375, -0.017730712890625, -0.00670623779296875, 0.047698974609375, -0.055084228515625, -0.040924072265625, 0.01045989990234375, -0.046844482421875, -0.0157318115234375, -0.0170745849609375, -0.055267333984375, 0.090576171875, -0.0068817138671875, 0.00717926025390625, -0.00852203369140625, 0.033477783203125, -0.0166473388671875, 0.020172119140625, -0.027496337890625, 0.08343505859375, 0.0204315185546875, 0.03289794921875, -0.0146942138671875, 0.01248931884765625, 0.027984619140625, -0.0041656494140625, 0.0286102294921875, 0.01517486572265625, -0.0360107421875, -0.0301055908203125, -0.0159759521484375, 0.007534027099609375, -0.01416778564453125, 0.051300048828125, -0.0014925003051757812, 0.031280517578125, 0.0218353271484375, -0.0244598388671875, 0.0367431640625, -0.042816162109375, -0.0333251953125, 0.0089111328125, 0.002872467041015625, -0.00609588623046875, -0.0172882080078125, 0.08984375, -0.061065673828125, -0.00394439697265625, 0.0289306640625, 0.0276336669921875, -0.0014362335205078125, 0.03460693359375, 0.00847625732421875, 0.00989532470703125, 0.019683837890625, -0.0369873046875, 0.0340576171875, -0.0120391845703125, 0.01322174072265625, 0.004558563232421875, 0.0170745849609375, -0.00974273681640625, -0.0048065185546875, -0.0012845993041992188, 0.043975830078125, -0.02081298828125, 0.07989501953125, 0.0171356201171875, 0.0244140625, -0.04425048828125, -0.016510009765625, 0.03289794921875, 0.0794677734375, -0.04193115234375, -0.032806396484375, 0.00345611572265625, 0.02618408203125, 0.03509521484375, 0.023406982421875, 0.067138671875, -0.028717041015625, 0.01910400390625, 0.0147247314453125, -0.0115814208984375, -0.003452301025390625, 0.02166748046875, 0.0179595947265625, 0.04144287109375, -0.0379638671875, -0.01153564453125, 0.000499725341796875, 0.005802154541015625, -0.004730224609375, -0.0010766983032226562, -0.0256195068359375, 0.032440185546875, -0.0011043548583984375, 0.02264404296875, 0.01291656494140625, 0.0184478759765625, -0.04083251953125, -0.005828857421875, -0.0190277099609375, -0.060943603515625, -0.0257720947265625, 0.04107666015625, 0.03851318359375, 0.02105712890625, 0.0294647216796875, 0.0167694091796875, 0.002773284912109375, 0.0087127685546875, 0.0283203125, -0.01419830322265625, 0.0038661956787109375, 0.003692626953125, 0.01219940185546875, 0.014923095703125, -0.01343536376953125, -0.0230712890625, 0.051483154296875, 0.013031005859375, -0.035003662109375, 0.039031982421875, -0.01403045654296875, -0.036041259765625, 0.0233306884765625, -0.0159759521484375, 0.1026611328125, -0.001445770263671875, -0.05511474609375, -0.0021419525146484375, -0.02899169921875, -0.06890869140625, 0.0269927978515625, 0.055511474609375, -0.02032470703125, 0.008331298828125, 0.021575927734375, 0.003787994384765625, 0.02252197265625, -0.0305938720703125, 0.01053619384765625, -0.0546875, 0.01568603515625, -0.01480865478515625, -0.049163818359375, -0.01512908935546875, -0.04156494140625, 0.01727294921875, 0.0218505859375, 0.0460205078125, -0.001415252685546875, 0.036102294921875, 0.0020294189453125, -0.004547119140625, 0.00913238525390625, -0.00012218952178955078, 0.021270751953125, 0.00665283203125, -0.0201873779296875, -0.0193939208984375, -0.06494140625, 0.055694580078125, -0.003803253173828125, 0.045196533203125, 0.046722412109375, -0.037445068359375, 0.01422119140625, 0.0269012451171875, 0.027740478515625, -0.021636962890625, -0.0606689453125, -0.0151214599609375, 0.034423828125, -0.0037841796875, 0.0340576171875, -0.0138702392578125, 0.0287322998046875, -0.06878662109375, -0.012451171875, -0.0241241455078125, -0.0174102783203125, -0.080078125, 0.00649261474609375, -0.031951904296875, 0.03948974609375, -0.01450347900390625, -0.01493072509765625, 0.0227508544921875, 0.006229400634765625, -0.0185394287109375, -0.007129669189453125, 0.0321044921875, -0.0086517333984375, 0.00226593017578125, 0.040863037109375, 0.00464630126953125, 0.0169219970703125, -0.01090240478515625, -0.000023543834686279297, 0.0010318756103515625, -0.054595947265625, -0.049285888671875, -0.0543212890625, -0.0027217864990234375, 0.0085906982421875, -0.02105712890625, -0.08404541015625, -0.048828125, 0.019561767578125, 0.0253143310546875, -0.0060577392578125, -0.0665283203125, 0.027587890625, -0.022552490234375, 0.053466796875, -0.035491943359375, -0.0225372314453125, 0.0109405517578125, 0.0120849609375, -0.036102294921875, -0.00156402587890625, -0.0296173095703125, -0.007747650146484375, -0.0201416015625, -0.022857666015625, 0.029144287109375, -0.004322052001953125, -0.06390380859375, -0.044097900390625, -0.042938232421875, 0.01318359375, -0.0166778564453125, -0.0115509033203125, 0.010223388671875, 0.0134429931640625, 0.003452301025390625, -0.043212890625, -0.02008056640625, 0.03076171875, 0.0089263916015625, -0.00080108642578125, -0.0299224853515625, -0.0207366943359375, -0.053680419921875, -0.061859130859375, 0.056549072265625, 0.0049285888671875, -0.0260772705078125, -0.05908203125, 0.04205322265625, 0.020904541015625, -0.032440185546875, -0.03778076171875, 0.029754638671875, -0.0261688232421875, 0.006595611572265625, 0.002796173095703125, -0.034210205078125, 0.02679443359375, -0.009552001953125, -0.035125732421875, 0.02056884765625, 0.03485107421875, -0.005565643310546875, -0.010345458984375, -0.007488250732421875, 0.048858642578125, 0.044769287109375, 0.001087188720703125, 0.0762939453125, 0.037811279296875, -0.01338958740234375, -0.025787353515625, -0.053070068359375, 0.034149169921875, 0.01511383056640625, 0.04290771484375, 0.0153350830078125, -0.00925445556640625, -0.03533935546875, -0.0631103515625, -0.04962158203125, -0.00647735595703125, -0.015869140625, 0.0267333984375, -0.0819091796875, 0.0081634521484375, -0.0032329559326171875, -0.0204620361328125, -0.03912353515625, -0.007904052734375, -0.03607177734375, -0.0053558349609375, 0.027618408203125, 0.0238800048828125, 0.0045166015625, -0.007411956787109375, 0.080810546875, -0.0400390625, 0.0142059326171875, 0.033905029296875, 0.00684356689453125, 0.04608154296875, 0.0457763671875, 0.03375244140625, 0.031280517578125, -0.0308685302734375, -0.0018186569213867188, 0.026397705078125, 0.0103607177734375, -0.01461029052734375, -0.0274505615234375, -0.024444580078125, 0.01715087890625, -0.0091400146484375, 0.01390838623046875, 0.02093505859375, 0.004817962646484375, 0.0194854736328125, 0.031463623046875, -0.032135009765625, 0.00557708740234375, -0.020965576171875, 0.0042877197265625, -0.0118865966796875, 0.00959014892578125, 0.02520751953125, -0.0103607177734375, 0.0122528076171875, 0.030029296875, 0.07257080078125, -0.03094482421875, 0.044952392578125, 0.036529541015625, 0.0367431640625, 0.0233154296875 ]
83db6cd03ebe4850c806601fb2d6298a1755910c
Wordpress Stackexchange Q: Add option to disable comments on a per posts basis? IN the past I thought there was a chackbox to enable/disable comments when making a new posts? I do not have that option when I make new post's, please help A: Look in the top right corner of the screen for view options. Click the link to reveal a drop-down. That has check-box options. One of them will say discussions. Click it and you should see the allow/disallow comments check-boxes.
Q: Add option to disable comments on a per posts basis? IN the past I thought there was a chackbox to enable/disable comments when making a new posts? I do not have that option when I make new post's, please help A: Look in the top right corner of the screen for view options. Click the link to reveal a drop-down. That has check-box options. One of them will say discussions. Click it and you should see the allow/disallow comments check-boxes. A: Click on Screen options in the top right corner of the screen. And select Discussion. Than you'll see that checkbox to enable/disable comments.
wordpress
{ "language": "en", "length": 105, "provenance": "stackexchange_00019.jsonl.gz:413080", "question_score": "6", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28575" }
[ 0.09478759765625, -0.0173187255859375, 0.00313568115234375, -0.03509521484375, 0.0133056640625, -0.057952880859375, 0.05181884765625, -0.01357269287109375, 0.02105712890625, 0.021514892578125, -0.06304931640625, 0.0012798309326171875, 0.0010929107666015625, 0.0024852752685546875, -0.012908935546875, -0.039764404296875, 0.034393310546875, 0.01016998291015625, 0.053466796875, -0.010589599609375, 0.00785064697265625, -0.0090789794921875, 0.03387451171875, 0.0791015625, 0.013702392578125, -0.0123748779296875, 0.056884765625, -0.008880615234375, 0.02850341796875, 0.00621795654296875, 0.0158843994140625, -0.036376953125, 0.0113983154296875, 0.04376220703125, -0.027496337890625, 0.037872314453125, 0.0126800537109375, 0.0172271728515625, 0.0194244384765625, 0.0218048095703125, 0.0225067138671875, -0.0177459716796875, 0.00643157958984375, 0.003215789794921875, -0.0126800537109375, -0.0202789306640625, 0.03643798828125, -0.0185394287109375, 0.043853759765625, -0.0175628662109375, 0.0023593902587890625, 0.043914794921875, 0.0180206298828125, -0.04595947265625, -0.0272216796875, -0.0133056640625, -0.0203094482421875, -0.00853729248046875, 0.0301666259765625, -0.0146026611328125, -0.001338958740234375, -0.0278167724609375, 0.020782470703125, 0.01201629638671875, 0.01134490966796875, -0.0206298828125, 0.02642822265625, 0.030670166015625, -0.049072265625, 0.0200042724609375, 0.056304931640625, -0.0234222412109375, 0.034149169921875, -0.0419921875, 0.0316162109375, -0.020355224609375, -0.00322723388671875, -0.003574371337890625, 0.020751953125, -0.00885772705078125, 0.003574371337890625, 0.03021240234375, -0.0270233154296875, -0.02557373046875, -0.01094818115234375, -0.036468505859375, -0.007724761962890625, -0.002887725830078125, -0.04022216796875, 0.0119171142578125, -0.021392822265625, -0.0271453857421875, -0.0164794921875, -0.0029048919677734375, -0.001110076904296875, -0.02490234375, 0.0034847259521484375, 0.02197265625, -0.022796630859375, 0.01236724853515625, -0.05523681640625, 0.021148681640625, -0.02288818359375, -0.00791168212890625, 0.0183563232421875, -0.01256561279296875, -0.02880859375, -0.0248565673828125, 0.05517578125, 0.045196533203125, -0.0135040283203125, 0.034576416015625, -0.0166168212890625, -0.019134521484375, -0.01505279541015625, 0.01190948486328125, -0.042266845703125, 0.03265380859375, 0.015533447265625, 0.030975341796875, 0.00902557373046875, 0.031951904296875, -0.031494140625, 0.0177001953125, 0.00490570068359375, -0.004596710205078125, -0.0010251998901367188, -0.010284423828125, 0.00473785400390625, -0.0010204315185546875, -0.022247314453125, 0.0007185935974121094, 0.051971435546875, 0.052459716796875, 0.0201263427734375, -0.00823974609375, 0.01861572265625, -0.0154571533203125, -0.0023212432861328125, 0.019500732421875, 0.00620269775390625, -0.049102783203125, -0.016448974609375, 0.010528564453125, -0.007129669189453125, 0.0306243896484375, 0.027740478515625, 0.017364501953125, -0.0202484130859375, -0.0584716796875, -0.024566650390625, 0.000007927417755126953, 0.0162200927734375, -0.003093719482421875, -0.00922393798828125, -0.0254364013671875, -0.01325225830078125, -0.0219573974609375, 0.0164947509765625, -0.0172576904296875, 0.053955078125, 0.03704833984375, -0.0020771026611328125, -0.0194854736328125, -0.01555633544921875, -0.0748291015625, -0.02484130859375, -0.0007739067077636719, 0.0162506103515625, 0.04644775390625, -0.0285797119140625, -0.047637939453125, -0.0333251953125, -0.0238189697265625, -0.0256500244140625, 0.0279083251953125, -0.0164642333984375, -0.0007753372192382812, -0.007717132568359375, 0.0273590087890625, 0.015411376953125, -0.041412353515625, -0.038543701171875, 0.03375244140625, -0.03240966796875, 0.039398193359375, 0.02752685546875, 0.05816650390625, -0.039306640625, 0.02587890625, 0.033721923828125, 0.046783447265625, 0.005901336669921875, -0.0155487060546875, 0.0019588470458984375, -0.0265960693359375, -0.0261383056640625, -0.0172882080078125, -0.0104827880859375, 0.014404296875, 0.00443267822265625, -0.027618408203125, -0.00788116455078125, -0.025299072265625, -0.05755615234375, -0.022705078125, -0.0256500244140625, 0.0234832763671875, 0.010345458984375, 0.0157928466796875, 0.005779266357421875, -0.00656890869140625, -0.01367950439453125, 0.002338409423828125, -0.0177764892578125, 0.0009598731994628906, -0.0235595703125, 0.02801513671875, 0.00893402099609375, 0.0266265869140625, 0.00580596923828125, 0.006465911865234375, -0.00159454345703125, -0.00478363037109375, 0.037811279296875, -0.04412841796875, 0.007129669189453125, -0.03399658203125, 0.01557159423828125, -0.00385284423828125, -0.0206451416015625, 0.039154052734375, 0.00518798828125, 0.02581787109375, 0.009124755859375, 0.01239776611328125, 0.052886962890625, -0.0285186767578125, -0.003330230712890625, 0.020904541015625, 0.02532958984375, 0.01529693603515625, 0.029876708984375, 0.0491943359375, 0.0285491943359375, -0.01611328125, 0.024139404296875, 0.0018434524536132812, 0.0101165771484375, 0.0115966796875, 0.00991058349609375, -0.013763427734375, 0.04339599609375, 0.034637451171875, 0.0038089752197265625, 0.023345947265625, -0.0426025390625, -0.0162200927734375, 0.02935791015625, -0.00890350341796875, 0.01181793212890625, -0.007633209228515625, 0.0006008148193359375, -0.004840850830078125, 0.031829833984375, -0.035400390625, 0.0021610260009765625, -0.01496124267578125, 0.0030422210693359375, -0.007228851318359375, 0.01346588134765625, -0.06671142578125, -0.001659393310546875, 0.03387451171875, 0.0199432373046875, 0.0518798828125, -0.0211944580078125, -0.016448974609375, 0.004642486572265625, 0.0384521484375, -0.0310211181640625, -0.012725830078125, -0.034820556640625, -0.01158905029296875, -0.00251007080078125, -0.075927734375, 0.01157379150390625, -0.011260986328125, -0.056610107421875, -0.043914794921875, -0.0075225830078125, 0.0244293212890625, -0.01038360595703125, -0.00496673583984375, 0.02459716796875, -0.0206756591796875, 0.0211944580078125, -0.055328369140625, 0.0421142578125, -0.03546142578125, 0.025848388671875, 0.06854248046875, -0.00753021240234375, 0.0187530517578125, 0.0219268798828125, 0.01107025146484375, 0.046630859375, 0.0178985595703125, 0.01262664794921875, 0.0287322998046875, -0.050048828125, -0.01204681396484375, 0.0034122467041015625, -0.0050811767578125, -0.0153350830078125, -0.0191802978515625, -0.0239410400390625, 0.01433563232421875, 0.0015974044799804688, 0.05108642578125, -0.0141754150390625, -0.06451416015625, -0.00046515464782714844, -0.0028839111328125, -0.0189361572265625, -0.0125274658203125, 0.0126800537109375, 0.00620269775390625, -0.0517578125, -0.01401519775390625, -0.0170135498046875, -0.037872314453125, -0.039459228515625, 0.0318603515625, 0.0018100738525390625, 0.0235595703125, 0.00628662109375, 0.08990478515625, 0.001445770263671875, -0.04107666015625, -0.00402069091796875, -0.11029052734375, -0.0198211669921875, 0.0201416015625, 0.01094818115234375, 0.0133209228515625, 0.019927978515625, 0.012908935546875, -0.0269317626953125, 0.034515380859375, -0.033843994140625, -0.00897216796875, -0.01189422607421875, 0.0255279541015625, -0.024932861328125, 0.034271240234375, 0.03472900390625, 0.0236053466796875, -0.00460052490234375, -0.03179931640625, 0.0236358642578125, -0.01103973388671875, -0.020050048828125, -0.084228515625, -0.02288818359375, 0.01226043701171875, -0.040496826171875, 0.00830078125, 0.0266571044921875, 0.0166473388671875, 0.06640625, -0.0256195068359375, -0.0121917724609375, 0.00106048583984375, 0.0107421875, -0.05865478515625, -0.0220489501953125, -0.0372314453125, 0.0604248046875, -0.007053375244140625, -0.00460052490234375, -0.052032470703125, 0.057891845703125, -0.07208251953125, -0.023895263671875, 0.02703857421875, -0.033203125, 0.009429931640625, -0.008941650390625, -0.009857177734375, -0.0038604736328125, 0.05145263671875, -0.04949951171875, 0.0120697021484375, -0.01123809814453125, -0.0027980804443359375, 0.0116119384765625, -0.044403076171875, -0.05340576171875, -0.0164642333984375, -0.04010009765625, 0.0275726318359375, 0.00042557716369628906, -0.01312255859375, -0.0226898193359375, -0.0182647705078125, -0.020477294921875, -0.0148773193359375, 0.0224609375, -0.048126220703125, -0.03436279296875, 0.03076171875, -0.057952880859375, 0.004848480224609375, -0.027130126953125, -0.0377197265625, -0.0655517578125, -0.0029659271240234375, -0.0249481201171875, 0.033905029296875, -0.0016880035400390625, -0.004047393798828125, -0.026641845703125, 0.026519775390625, -0.0020046234130859375, -0.03021240234375, 0.0096588134765625, 0.034210205078125, -0.0152587890625, -0.0155181884765625, -0.00959014892578125, -0.031219482421875, -0.002323150634765625, 0.00637054443359375, 0.018951416015625, 0.08209228515625, -0.02215576171875, 0.02105712890625, -0.031829833984375, -0.004512786865234375, -0.01934814453125, -0.055572509765625, -0.0236663818359375, 0.040313720703125, -0.03985595703125, 0.0256500244140625, -0.062164306640625, -0.05340576171875, 0.00765228271484375, -0.03338623046875, -0.006168365478515625, 0.0188446044921875, 0.0572509765625, 0.01535797119140625, 0.01023101806640625, -0.017486572265625, 0.004688262939453125, 0.03802490234375, -0.01708984375, 0.00984954833984375, 0.01149749755859375, -0.0246734619140625, 0.0401611328125, -0.0040740966796875, -0.00916290283203125, -0.04498291015625, 0.064697265625, -0.00705718994140625, 0.00377655029296875, 0.016754150390625, -0.023406982421875, 0.04718017578125, 0.0128021240234375, -0.0016841888427734375, 0.003910064697265625, -0.01094818115234375, 0.03338623046875, -0.0013751983642578125, -0.01192474365234375, -0.029327392578125, -0.03790283203125, 0.0048980712890625, -0.035064697265625, 0.04083251953125, 0.049407958984375, 0.0007677078247070312, 0.052642822265625, 0.0193328857421875, -0.0274200439453125, -0.004802703857421875, 0.01001739501953125, -0.002902984619140625, 0.0288848876953125, -0.01153564453125, -0.03094482421875, -0.0157470703125, -0.0162811279296875, 0.07354736328125, 0.022369384765625, -0.0304718017578125, 0.022857666015625, 0.00047016143798828125, 0.03436279296875, 0.02508544921875, 0.03204345703125, 0.007205963134765625, -0.0305938720703125, -0.003757476806640625, -0.002384185791015625, -0.010345458984375, -0.015380859375, -0.024261474609375, 0.0079193115234375, 0.03271484375, -0.01152801513671875, 0.055084228515625, 0.0069580078125, -0.0193939208984375, 0.033355712890625, -0.0232391357421875, 0.035308837890625, 0.0312347412109375, -0.013427734375, 0.0026397705078125, 0.032012939453125, -0.01386260986328125, -0.02398681640625, -0.007659912109375, -0.025115966796875, -0.050079345703125, 0.018768310546875, 0.0203704833984375, 0.0313720703125, 0.057037353515625, -0.022003173828125, 0.01812744140625, -0.039276123046875, 0.01464080810546875, 0.0736083984375, -0.0352783203125, 0.020965576171875, 0.01454925537109375, -0.036346435546875, 0.021881103515625, -0.004016876220703125, -0.0219879150390625, -0.0212249755859375, 0.010040283203125, 0.063232421875, -0.0198211669921875, -0.004886627197265625, -0.01399993896484375, -0.031341552734375, -0.032501220703125, -0.035400390625, -0.032928466796875, -0.0287628173828125, 0.02642822265625, 0.008514404296875, -0.04107666015625, 0.0034885406494140625, -0.00595855712890625, -0.0057525634765625, -0.010955810546875, 0.027130126953125, 0.0069732666015625, 0.042633056640625, -0.0178680419921875, -0.00494384765625, -0.019927978515625, -0.049591064453125, -0.046234130859375, -0.08380126953125, -0.0452880859375, -0.058990478515625, 0.02099609375, 0.028106689453125, 0.0285797119140625, -0.020263671875, -0.051788330078125, -0.0229949951171875, -0.0016412734985351562, 0.03497314453125, 0.0282440185546875, -0.01824951171875, 0.0433349609375, 0.005062103271484375, 0.05377197265625, 0.0205841064453125, 0.037445068359375, 0.011444091796875, -0.040985107421875, 0.015411376953125, -0.0234222412109375, -0.04998779296875, -0.00951385498046875, -0.034210205078125, 0.031219482421875, 0.057037353515625, -0.015838623046875, 0.0224609375, -0.01776123046875, -0.0018253326416015625, -0.0253753662109375, 0.01033782958984375, -0.037353515625, 0.055633544921875, -0.04229736328125, 0.0033168792724609375, 0.02154541015625, -0.0198974609375, -0.047943115234375, 0.027496337890625, 0.00681304931640625, 0.0246429443359375, -0.0009241104125976562, -0.0596923828125, 0.042999267578125, 0.03106689453125, 0.01232147216796875, 0.03399658203125, -0.01381683349609375, 0.0244293212890625, -0.00421905517578125, 0.01001739501953125, -0.036956787109375, -0.02923583984375, 0.048065185546875, 0.025604248046875, -0.0193634033203125, 0.05181884765625, -0.0189056396484375, 0.034637451171875, 0.050811767578125, 0.047149658203125, -0.09686279296875, 0.02520751953125, -0.0245361328125, -0.0158538818359375, 0.07720947265625, -0.0282745361328125, 0.0117034912109375, -0.043701171875, 0.0811767578125, -0.0225067138671875, -0.0058135986328125, 0.0007925033569335938, -0.06280517578125, -0.0230255126953125, -0.006256103515625, 0.0144195556640625, 0.00830078125, -0.0775146484375, 0.04876708984375, 0.0545654296875, 0.01149749755859375, -0.04010009765625, -0.029327392578125, 0.0280609130859375, -0.03228759765625, -0.0830078125, 0.0196685791015625, -0.036163330078125, 0.02801513671875, 0.035125732421875, 0.00006979703903198242, -0.044769287109375, 0.040069580078125, -0.034149169921875, 0.0295257568359375, 0.0096893310546875, -0.050140380859375, -0.040283203125, -0.0345458984375, 0.0276947021484375, 0.01229095458984375, 0.0218658447265625, 0.0208740234375, 0.0056915283203125, -0.0748291015625, -0.0028095245361328125, 0.03228759765625, 0.0212249755859375, -0.004436492919921875, -0.01403045654296875, 0.056396484375, 0.00893402099609375, -0.0302276611328125, 0.007213592529296875, -0.038177490234375, -0.00006568431854248047, 0.05474853515625, -0.02777099609375, 0.004238128662109375, 0.02191162109375, -0.004398345947265625, -0.036468505859375, 0.07177734375, -0.0309600830078125, -0.004398345947265625, 0.01177215576171875, 0.037567138671875, -0.0262298583984375, 0.019256591796875, -0.0019626617431640625, 0.0231475830078125, -0.038421630859375, 0.095703125, -0.0595703125, -0.03985595703125, 0.032867431640625, 0.11114501953125, 0.0797119140625, 0.0148468017578125, 0.0352783203125, -0.00809478759765625, 0.0596923828125, 0.06256103515625, -0.01776123046875, -0.0253448486328125, -0.0173187255859375, 0.023773193359375, 0.04046630859375, -0.051025390625, 0.0234832763671875, -0.0113983154296875, -0.02020263671875, -0.01261138916015625, 0.001239776611328125, 0.0089569091796875, 0.015625, 0.0450439453125, 0.029937744140625, 0.0019083023071289062, -0.0273895263671875, -0.00873565673828125, 0.01421356201171875, 0.01515960693359375, 0.03369140625, -0.032928466796875, -0.0213165283203125, -0.0192718505859375, 0.04034423828125, 0.0055999755859375, 0.031219482421875, 0.060394287109375, 0.04559326171875, -0.01529693603515625, -0.01491546630859375, 0.0272674560546875, 0.00699615478515625, -0.036865234375, -0.007343292236328125, 0.02020263671875, 0.0309906005859375, -0.0301666259765625, -0.0200042724609375, 0.0391845703125, 0.027740478515625, -0.0184173583984375, -0.0150604248046875, 0.00536346435546875, 0.007534027099609375, 0.0218963623046875, -0.0166473388671875, 0.0305023193359375, 0.0158233642578125, 0.036712646484375, -0.023193359375, 0.0155029296875, -0.0010738372802734375, 0.0250396728515625, 0.00022530555725097656, 0.019805908203125, -0.0338134765625, 0.01064300537109375, -0.01873779296875, 0.0008940696716308594, -0.035369873046875, 0.005626678466796875, 0.0382080078125, -0.002925872802734375, 0.004413604736328125, 0.0013942718505859375, 0.00576019287109375, 0.0176544189453125, 0.034088134765625, -0.0071868896484375, -0.0222015380859375, -0.02203369140625, 0.0217437744140625, 0.019927978515625, 0.00765228271484375, 0.032379150390625, 0.02484130859375, 0.0308837890625, 0.007106781005859375, 0.009796142578125, 0.0701904296875, -0.017364501953125, -0.0094451904296875, -0.03399658203125, 0.0243377685546875, 0.05419921875, 0.014862060546875, -0.002658843994140625, -0.018890380859375, 0.0865478515625, -0.018035888671875, -0.00659942626953125, 0.00583648681640625, -0.0023822784423828125, 0.017974853515625, 0.054962158203125, -0.0304412841796875, 0.0244598388671875, -0.0256500244140625, 0.01175689697265625, -0.032562255859375, -0.06964111328125, 0.013397216796875, 0.03167724609375, -0.047943115234375, 0.041046142578125, 0.006862640380859375, 0.0208282470703125, -0.0175933837890625, -0.02655029296875, 0.0158538818359375, 0.00859832763671875, 0.0258026123046875, 0.0193328857421875, -0.08087158203125, -0.02880859375, -0.0196380615234375, 0.007495880126953125, 0.021240234375, 0.061248779296875, 0.01522064208984375, 0.0190277099609375, -0.0677490234375, -0.0081939697265625, -0.0162811279296875, -0.0242462158203125, 0.0283050537109375, 0.04296875, -0.0265655517578125, -0.01110076904296875, -0.038543701171875, 0.061767578125, 0.0061492919921875, 0.029083251953125, 0.0643310546875, -0.0460205078125, 0.007396697998046875, -0.0323486328125, 0.0026531219482421875, -0.03607177734375, -0.0217132568359375, 0.004436492919921875, 0.0023136138916015625, -0.0220947265625, -0.0251007080078125, 0.01537322998046875, 0.039947509765625, 0.0006971359252929688, 0.054046630859375, -0.01873779296875, 0.038421630859375, -0.0421142578125, 0.0187835693359375, -0.047149658203125, 0.00807952880859375, 0.004703521728515625, -0.00493621826171875, 0.0005941390991210938, 0.032318115234375, -0.036407470703125, 0.0352783203125, -0.042266845703125, -0.03961181640625, 0.01593017578125, 0.0268096923828125, 0.0108642578125, 0.01003265380859375, -0.0290985107421875, -0.024444580078125, -0.016357421875, 0.01189422607421875, -0.0051422119140625, -0.00921630859375, -0.025634765625, 0.0106201171875, -0.033050537109375, -0.0188140869140625, -0.0255584716796875, -0.025909423828125, -0.00003522634506225586, 0.0175628662109375, -0.0648193359375, 0.0182952880859375, 0.0229949951171875, 0.0206451416015625, -0.041046142578125, 0.01324462890625, 0.0147705078125, 0.0369873046875, -0.0538330078125, -0.00164031982421875, -0.009063720703125, -0.019500732421875, -0.01366424560546875, 0.043701171875, 0.045928955078125, -0.03216552734375, 0.027496337890625, 0.07049560546875, 0.033843994140625, 0.12445068359375, -0.011505126953125, 0.00516510009765625, 0.004558563232421875, 0.008758544921875, -0.01476287841796875, -0.0654296875, 0.0187225341796875, -0.0650634765625, -0.0240936279296875, -0.0465087890625, 0.0189056396484375, 0.0284271240234375, -0.032257080078125, -0.10107421875, 0.01203155517578125, -0.03485107421875, -0.040679931640625, -0.022674560546875, -0.034942626953125, 0.0034275054931640625, 0.0031452178955078125, 0.006145477294921875, -0.03387451171875, -0.06134033203125, 0.0236358642578125, 0.008941650390625, 0.025238037109375, 0.0179443359375, 0.0019006729125976562, -0.008270263671875, 0.03289794921875, 0.0247650146484375, -0.0035343170166015625, 0.0207061767578125, -0.0233001708984375, 0.0178070068359375, 0.01543426513671875, -0.06219482421875, -0.037841796875, -0.03485107421875, 0.03216552734375, 0.01800537109375, -0.046295166015625, -0.027496337890625, -0.0233917236328125, 0.01357269287109375, 0.0614013671875, 0.0074920654296875, -0.02740478515625, 0.037750244140625, -0.043670654296875, -0.06634521484375, -0.0286102294921875, 0.007663726806640625, -0.0205841064453125, 0.0113983154296875, -0.0190887451171875, 0.00952911376953125, -0.005359649658203125, -0.03369140625, -0.0006775856018066406, -0.0090484619140625, -0.0030612945556640625, -0.0254974365234375, 0.035186767578125, 0.0443115234375, 0.0028514862060546875, -0.006107330322265625, 0.0190582275390625, -0.0256195068359375, -0.0184173583984375, 0.0146026611328125, -0.006542205810546875, -0.04412841796875, -0.045166015625, 0.01245880126953125, 0.043060302734375, -0.0226898193359375, 0.07177734375, -0.0231170654296875, -0.0009131431579589844, -0.0018796920776367188, 0.0016040802001953125, 0.0156707763671875, -0.01224517822265625, -0.03717041015625, -0.00836944580078125, -0.01751708984375, 0.024200439453125, 0.0003752708435058594, 0.0200958251953125, -0.026702880859375, 0.05377197265625, 0.0162811279296875, -0.031982421875, 0.040679931640625, -0.03570556640625, 0.006481170654296875, 0.0203399658203125, -0.0217132568359375, -0.0219879150390625, 0.0474853515625, 0.05181884765625, -0.01242828369140625, 0.02349853515625 ]
3769e094f4a3e1fd328f1d5d1c6a93c12b51f11e
Wordpress Stackexchange Q: Displaying a custom post type alphabetically I've created a custom post type which now has around 100 posts in it. I simply want to display these in alphabetical order by the post title rather than the default which seems to be most recent first. I've tried various plugins and other solutions, but most only allow manual sorting (too many posts for that to work), I'm told that the code below should work but it seems to have no effect at all. Any help appreciated. <?php $args = array( 'post_type' => 'tenant', 'posts_per_page', 'orderby=title&order=ASC' => 5 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?> A: try this: <?php $args = array( 'post_type' => 'tenant', 'posts_per_page'=>5, 'orderby'=>'title','order'=>'ASC'); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?> You will find more info o custom queries here: http://codex.wordpress.org/Class_Reference/WP_Query
Q: Displaying a custom post type alphabetically I've created a custom post type which now has around 100 posts in it. I simply want to display these in alphabetical order by the post title rather than the default which seems to be most recent first. I've tried various plugins and other solutions, but most only allow manual sorting (too many posts for that to work), I'm told that the code below should work but it seems to have no effect at all. Any help appreciated. <?php $args = array( 'post_type' => 'tenant', 'posts_per_page', 'orderby=title&order=ASC' => 5 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?> A: try this: <?php $args = array( 'post_type' => 'tenant', 'posts_per_page'=>5, 'orderby'=>'title','order'=>'ASC'); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?> You will find more info o custom queries here: http://codex.wordpress.org/Class_Reference/WP_Query A: I realize this is an old thread, but I came across it trying to do the same thing and settled on adding a pre-query action using functions.php rather than a template and the loop. In my case; I have a page of about 25 yoga classes, set up as a custom post type 'classes' // function and action to order classes alphabetically function alpha_order_classes( $query ) { if ( $query->is_post_type_archive('classes') && $query->is_main_query() ) { $query->set( 'orderby', 'title' ); $query->set( 'order', 'ASC' ); } } add_action( 'pre_get_posts', 'alpha_order_classes' );
wordpress
{ "language": "en", "length": 234, "provenance": "stackexchange_00019.jsonl.gz:413097", "question_score": "7", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28653" }
[ 0.052886962890625, 0.00305938720703125, -0.0013628005981445312, -0.0027923583984375, 0.020965576171875, -0.03900146484375, 0.0648193359375, -0.025177001953125, -0.0074310302734375, 0.033416748046875, -0.0162506103515625, -0.0277862548828125, -0.008544921875, -0.0254058837890625, -0.033416748046875, -0.052337646484375, 0.04632568359375, -0.039215087890625, 0.01922607421875, -0.01477813720703125, 0.027374267578125, 0.008331298828125, 0.052093505859375, 0.05914306640625, -0.0013341903686523438, -0.006443023681640625, 0.10150146484375, -0.0263671875, 0.0086212158203125, -0.0252685546875, 0.0271759033203125, -0.01800537109375, 0.0010461807250976562, 0.00331878662109375, 0.044891357421875, 0.0248870849609375, 0.06390380859375, -0.0152587890625, 0.038238525390625, 0.0231475830078125, -0.00447845458984375, 0.021453857421875, 0.003978729248046875, 0.0293426513671875, -0.01192474365234375, -0.0655517578125, 0.0115203857421875, -0.0119171142578125, 0.009765625, -0.0316162109375, 0.0001971721649169922, 0.01959228515625, 0.029754638671875, -0.05194091796875, -0.00937652587890625, 0.01045989990234375, 0.01129913330078125, -0.0032024383544921875, 0.0330810546875, -0.0631103515625, -0.0369873046875, -0.013397216796875, 0.0428466796875, 0.0231781005859375, -0.038848876953125, 0.022705078125, 0.051605224609375, -0.001811981201171875, -0.0170440673828125, -0.06298828125, -0.0032405853271484375, 0.005367279052734375, 0.006298065185546875, -0.00921630859375, -0.0003845691680908203, -0.027557373046875, -0.0286102294921875, -0.05859375, 0.042236328125, 0.0198516845703125, -0.005977630615234375, -0.0087432861328125, -0.0245513916015625, 0.0008831024169921875, -0.0149993896484375, 0.000040650367736816406, -0.0260772705078125, -0.004825592041015625, -0.005523681640625, -0.02978515625, -0.01525115966796875, 0.01406097412109375, -0.0222320556640625, -0.0021190643310546875, -0.002391815185546875, -0.02923583984375, -0.00017786026000976562, 0.046173095703125, -0.0264739990234375, 0.0128631591796875, -0.0087890625, -0.017059326171875, 0.051055908203125, -0.053375244140625, 0.016754150390625, -0.0230255126953125, -0.01788330078125, -0.0323486328125, 0.042449951171875, 0.051727294921875, 0.0038299560546875, 0.052764892578125, -0.0142059326171875, -0.0189971923828125, -0.0297698974609375, 0.00782012939453125, -0.043853759765625, -0.0054473876953125, 0.007053375244140625, 0.0005421638488769531, 0.0207977294921875, 0.03582763671875, 0.016082763671875, -0.06475830078125, -0.0002548694610595703, -0.007488250732421875, -0.015838623046875, -0.049072265625, 0.021270751953125, 0.035888671875, -0.045684814453125, -0.003662109375, 0.053955078125, 0.0330810546875, 0.0122528076171875, -0.02398681640625, 0.006420135498046875, -0.023651123046875, -0.007843017578125, -0.0015735626220703125, 0.01287078857421875, -0.006183624267578125, 0.0338134765625, 0.0160064697265625, -0.0116729736328125, 0.0274810791015625, 0.0078125, -0.0007171630859375, 0.0012407302856445312, -0.0517578125, 0.003543853759765625, -0.05194091796875, 0.0460205078125, -0.0058441162109375, -0.059539794921875, -0.00826263427734375, -0.021514892578125, -0.004146575927734375, -0.03778076171875, -0.02935791015625, 0.005405426025390625, -0.005962371826171875, -0.0254974365234375, -0.031768798828125, -0.032867431640625, 0.016204833984375, -0.022216796875, 0.0022830963134765625, 0.01427459716796875, -0.0265350341796875, 0.00980377197265625, 0.0124664306640625, 0.07684326171875, -0.01088714599609375, -0.01148223876953125, -0.0031604766845703125, -0.01073455810546875, -0.046783447265625, 0.0229644775390625, 0.019134521484375, -0.02813720703125, -0.019073486328125, -0.02056884765625, 0.003803253173828125, -0.044952392578125, 0.033935546875, 0.0065765380859375, 0.03631591796875, 0.002349853515625, 0.01453399658203125, 0.027069091796875, 0.04351806640625, -0.07843017578125, 0.046844482421875, 0.01395416259765625, -0.0055084228515625, -0.02459716796875, -0.018524169921875, -0.0004851818084716797, -0.01171875, -0.0192413330078125, -0.023773193359375, -0.000041544437408447266, 0.0060882568359375, -0.006587982177734375, -0.023193359375, 0.0029201507568359375, 0.0031719207763671875, 0.0232696533203125, 0.03466796875, 0.022430419921875, 0.0019273757934570312, -0.04461669921875, 0.01113128662109375, -0.034759521484375, -0.01045989990234375, 0.006626129150390625, -0.0188751220703125, -0.0176849365234375, -0.0227508544921875, -0.0185699462890625, -0.035064697265625, -0.02752685546875, 0.06109619140625, 0.053955078125, -0.0283966064453125, -0.0080413818359375, -0.030853271484375, 0.035552978515625, 0.024017333984375, -0.048583984375, 0.017822265625, 0.03155517578125, 0.035980224609375, -0.03253173828125, -0.0119171142578125, -0.0266265869140625, -0.044891357421875, 0.002246856689453125, 0.058929443359375, 0.0251007080078125, 0.018524169921875, 0.00951385498046875, 0.050567626953125, 0.009002685546875, -0.00910186767578125, 0.037139892578125, -0.007541656494140625, 0.0115509033203125, 0.04315185546875, -0.0036182403564453125, 0.006565093994140625, 0.0246124267578125, 0.016021728515625, 0.01171112060546875, 0.02886962890625, 0.014862060546875, 0.041107177734375, -0.013275146484375, -0.022247314453125, 0.021881103515625, -0.055084228515625, -0.056427001953125, -0.0005011558532714844, 0.047271728515625, 0.0200653076171875, 0.039825439453125, 0.0168609619140625, -0.06512451171875, 0.0265045166015625, 0.016998291015625, 0.01242828369140625, 0.0049285888671875, -0.022308349609375, -0.007793426513671875, 0.0066986083984375, -0.04486083984375, 0.01232147216796875, 0.019073486328125, -0.0251312255859375, -0.00257110595703125, 0.033599853515625, -0.027801513671875, -0.001583099365234375, -0.0164947509765625, -0.06329345703125, 0.002727508544921875, 0.048492431640625, -0.043304443359375, -0.0189361572265625, -0.0010738372802734375, 0.050445556640625, -0.02874755859375, 0.0265960693359375, -0.0278472900390625, 0.006557464599609375, 0.021240234375, -0.060302734375, 0.04833984375, -0.0565185546875, 0.04656982421875, 0.07244873046875, -0.01271820068359375, 0.02294921875, 0.002162933349609375, -0.00302886962890625, -0.0223846435546875, 0.033660888671875, 0.0012378692626953125, -0.02667236328125, -0.04449462890625, 0.023406982421875, 0.03863525390625, 0.08050537109375, 0.04364013671875, -0.03045654296875, 0.043060302734375, 0.05908203125, -0.0321044921875, -0.124267578125, 0.040802001953125, -0.01049041748046875, -0.02008056640625, -0.00457763671875, 0.0025653839111328125, -0.01568603515625, -0.0177459716796875, -0.006870269775390625, 0.00817108154296875, -0.0350341796875, -0.0753173828125, -0.048553466796875, -0.061920166015625, -0.0025177001953125, 0.0045623779296875, 0.00435638427734375, 0.019287109375, 0.061431884765625, 0.0185546875, -0.06988525390625, 0.0202178955078125, 0.02471923828125, -0.04425048828125, 0.0413818359375, 0.043609619140625, -0.02838134765625, 0.00952911376953125, 0.0060577392578125, 0.030609130859375, 0.05218505859375, -0.034881591796875, 0.003253936767578125, -0.01154327392578125, 0.00376129150390625, 0.0210418701171875, 0.0005965232849121094, 0.007709503173828125, 0.0399169921875, 0.024688720703125, -0.0176544189453125, -0.00592041015625, 0.002620697021484375, -0.00043654441833496094, -0.01313018798828125, -0.032928466796875, 0.0024318695068359375, -0.0269775390625, 0.03753662109375, -0.022979736328125, -0.004177093505859375, -0.013763427734375, -0.033721923828125, 0.03082275390625, 0.01302337646484375, 0.01146697998046875, 0.0116424560546875, 0.0246124267578125, -0.01235198974609375, 0.01232147216796875, 0.01560211181640625, 0.0271148681640625, 0.00362396240234375, -0.0204315185546875, -0.0249176025390625, -0.09722900390625, 0.0606689453125, -0.024139404296875, -0.005218505859375, -0.0283355712890625, -0.0457763671875, 0.0228118896484375, 0.1268310546875, -0.064453125, -0.007328033447265625, 0.0200347900390625, 0.01088714599609375, -0.040985107421875, -0.013336181640625, -0.06683349609375, -0.0036144256591796875, -0.0726318359375, 0.0132598876953125, -0.014068603515625, -0.020355224609375, -0.01849365234375, -0.0177459716796875, -0.05181884765625, -0.031646728515625, 0.0396728515625, -0.0167083740234375, 0.0093841552734375, -0.0001666545867919922, -0.0109710693359375, 0.0017681121826171875, -0.032012939453125, -0.01540374755859375, -0.10296630859375, -0.025726318359375, 0.0012044906616210938, 0.06109619140625, -0.0223846435546875, -0.0189666748046875, -0.035797119140625, 0.0511474609375, 0.0287933349609375, 0.04010009765625, 0.004180908203125, -0.0159149169921875, 0.0043792724609375, -0.0311431884765625, -0.0004241466522216797, -0.04058837890625, 0.0032482147216796875, -0.0221710205078125, -0.0231170654296875, 0.0037631988525390625, -0.041290283203125, 0.001544952392578125, -0.02337646484375, -0.0196990966796875, -0.0179443359375, -0.021087646484375, -0.0179901123046875, 0.038482666015625, -0.023590087890625, 0.0029430389404296875, -0.04034423828125, -0.049346923828125, 0.01155853271484375, -0.01335906982421875, 0.006847381591796875, 0.0099029541015625, 0.0924072265625, 0.00970458984375, -0.00984954833984375, -0.054962158203125, -0.0167388916015625, 0.01210784912109375, 0.0055999755859375, 0.022735595703125, -0.01102447509765625, 0.00676727294921875, 0.0147857666015625, -0.02520751953125, -0.02191162109375, 0.0193634033203125, -0.0080108642578125, -0.0003132820129394531, -0.043060302734375, 0.015899658203125, -0.0130462646484375, 0.005512237548828125, 0.01476287841796875, 0.0040130615234375, -0.04833984375, -0.01541900634765625, 0.054962158203125, -0.01395416259765625, 0.05206298828125, -0.01505279541015625, -0.0200042724609375, 0.0284271240234375, 0.006771087646484375, -0.00641632080078125, -0.0006709098815917969, 0.0036754608154296875, -0.020782470703125, -0.052001953125, 0.0172882080078125, 0.0101470947265625, 0.03472900390625, 0.0018758773803710938, 0.0445556640625, 0.0035572052001953125, 0.0114898681640625, -0.0179443359375, -0.004955291748046875, 0.053924560546875, -0.0128326416015625, -0.034515380859375, -0.02947998046875, -0.035430908203125, 0.007381439208984375, 0.009674072265625, -0.00917816162109375, 0.0119781494140625, 0.05340576171875, 0.007068634033203125, 0.01065826416015625, -0.013031005859375, 0.052978515625, -0.0084381103515625, 0.0028400421142578125, 0.020355224609375, -0.01306915283203125, -0.03399658203125, 0.0848388671875, -0.0014200210571289062, 0.02508544921875, -0.0261077880859375, -0.00077056884765625, 0.0015888214111328125, 0.029876708984375, 0.0116119384765625, 0.017974853515625, -0.01386260986328125, 0.0338134765625, 0.0264739990234375, -0.0136260986328125, -0.023040771484375, -0.01385498046875, 0.00827789306640625, -0.0152130126953125, 0.0106353759765625, 0.04388427734375, 0.0004935264587402344, -0.03753662109375, 0.051177978515625, 0.04638671875, -0.034912109375, -0.040008544921875, -0.009490966796875, 0.0360107421875, 0.004306793212890625, -0.00579071044921875, 0.044921875, -0.0135955810546875, 0.048919677734375, -0.06640625, 0.033233642578125, -0.006168365478515625, -0.00449371337890625, -0.02716064453125, -0.0312347412109375, -0.0088043212890625, 0.01849365234375, -0.0208892822265625, 0.0127716064453125, -0.006732940673828125, 0.0024547576904296875, -0.0270233154296875, 0.045257568359375, -0.01120758056640625, -0.021453857421875, -0.0186767578125, 0.0275115966796875, 0.038177490234375, 0.022216796875, -0.04388427734375, 0.0208587646484375, -0.052154541015625, -0.0179901123046875, -0.007793426513671875, -0.05218505859375, -0.044403076171875, -0.031890869140625, 0.023223876953125, 0.01345062255859375, 0.01605224609375, -0.055938720703125, -0.030364990234375, 0.01041412353515625, 0.032257080078125, -0.0010805130004882812, -0.03204345703125, 0.0994873046875, -0.009857177734375, 0.0367431640625, -0.006168365478515625, 0.038909912109375, -0.006755828857421875, 0.01361083984375, 0.02935791015625, -0.09405517578125, -0.047882080078125, -0.009857177734375, -0.054962158203125, 0.0175323486328125, -0.0011806488037109375, -0.01383209228515625, 0.044342041015625, -0.0098114013671875, 0.00571441650390625, 0.001674652099609375, -0.0308380126953125, -0.0145111083984375, 0.01290130615234375, 0.05633544921875, 0.0012111663818359375, 0.0006318092346191406, -0.00856781005859375, -0.044769287109375, 0.007312774658203125, 0.0180206298828125, -0.006336212158203125, -0.000957489013671875, -0.0511474609375, 0.031951904296875, 0.033599853515625, 0.03350830078125, 0.03350830078125, -0.01166534423828125, 0.0279998779296875, -0.00664520263671875, -0.00391387939453125, 0.024566650390625, -0.0176849365234375, 0.045745849609375, -0.01715087890625, -0.00299072265625, 0.027587890625, -0.0231170654296875, 0.0012617111206054688, 0.033782958984375, 0.047027587890625, -0.048828125, 0.0017242431640625, -0.000008046627044677734, -0.0171661376953125, 0.02734375, -0.006763458251953125, -0.0098724365234375, -0.0248565673828125, 0.039215087890625, -0.01190185546875, -0.0246429443359375, 0.00534820556640625, -0.006267547607421875, 0.0207977294921875, 0.00116729736328125, 0.0369873046875, -0.00963592529296875, -0.042144775390625, -0.0243072509765625, 0.0072784423828125, -0.0041046142578125, -0.0204315185546875, 0.016845703125, -0.01485443115234375, 0.00771331787109375, -0.058319091796875, 0.00421142578125, -0.0433349609375, -0.00775146484375, 0.024688720703125, 0.0009946823120117188, 0.008575439453125, 0.051788330078125, -0.0189971923828125, 0.021026611328125, 0.0260772705078125, -0.0567626953125, -0.0134124755859375, -0.0289154052734375, -0.0155181884765625, 0.030364990234375, -0.05047607421875, 0.0298919677734375, -0.024383544921875, -0.0012445449829101562, -0.0179595947265625, -0.0037746429443359375, 0.0677490234375, -0.00218963623046875, -0.017547607421875, 0.0240020751953125, 0.0230712890625, -0.01172637939453125, 0.0021209716796875, 0.03851318359375, -0.054931640625, -0.02923583984375, 0.0246734619140625, -0.039947509765625, -0.045562744140625, -0.01177215576171875, -0.051788330078125, 0.066162109375, -0.015838623046875, 0.011138916015625, -0.016845703125, 0.034454345703125, 0.02020263671875, 0.045074462890625, -0.0438232421875, 0.05413818359375, -0.0236053466796875, 0.0755615234375, -0.08563232421875, -0.01476287841796875, 0.0164642333984375, 0.059234619140625, 0.044158935546875, 0.000053822994232177734, -0.0699462890625, -0.00537872314453125, 0.08074951171875, 0.0751953125, 0.042938232421875, 0.037811279296875, -0.0034503936767578125, 0.041717529296875, 0.046600341796875, -0.002208709716796875, 0.049896240234375, -0.005706787109375, -0.04241943359375, 0.0252532958984375, 0.03021240234375, 0.045257568359375, 0.0183258056640625, -0.044036865234375, -0.0615234375, 0.022308349609375, 0.05316162109375, 0.0284423828125, 0.0171051025390625, 0.04583740234375, 0.0745849609375, -0.05621337890625, -0.055206298828125, -0.01505279541015625, 0.053619384765625, 0.023345947265625, 0.035430908203125, 0.0240478515625, 0.0228118896484375, 0.0003604888916015625, -0.0226898193359375, 0.01395416259765625, 0.0009984970092773438, -0.0482177734375, 0.052947998046875, 0.01556396484375, 0.020233154296875, -0.0396728515625, -0.004352569580078125, 0.048187255859375, 0.07318115234375, -0.05474853515625, -0.026031494140625, 0.0189361572265625, 0.0093841552734375, -0.016082763671875, -0.0189056396484375, -0.0352783203125, 0.01806640625, 0.037200927734375, -0.0458984375, -0.005512237548828125, 0.01093292236328125, 0.0302734375, -0.0267791748046875, -0.04168701171875, -0.00222015380859375, -0.0295562744140625, -0.0191650390625, 0.01529693603515625, 0.053497314453125, 0.052886962890625, -0.0239715576171875, 0.07012939453125, -0.0445556640625, -0.01255035400390625, -0.0297698974609375, 0.00848388671875, -0.0191497802734375, 0.03399658203125, -0.05255126953125, -0.01282501220703125, -0.036468505859375, 0.050140380859375, 0.053314208984375, -0.03741455078125, 0.0287933349609375, 0.0240936279296875, -0.003139495849609375, -0.0059051513671875, 0.0020160675048828125, -0.0001825094223022461, -0.03814697265625, -0.01435089111328125, 0.0245819091796875, 0.0345458984375, 0.00974273681640625, 0.0273895263671875, 0.0623779296875, 0.006561279296875, -0.004657745361328125, 0.02239990234375, 0.00630950927734375, -0.0184478759765625, 0.00122833251953125, 0.00543212890625, 0.0239715576171875, 0.021575927734375, -0.04376220703125, -0.0101318359375, -0.011688232421875, -0.058074951171875, 0.02911376953125, 0.04290771484375, 0.014617919921875, -0.0233154296875, 0.03668212890625, -0.037322998046875, -0.0013360977172851562, 0.0222625732421875, 0.04522705078125, 0.031036376953125, -0.003875732421875, 0.0231475830078125, -0.052947998046875, -0.026824951171875, -0.0003533363342285156, 0.0172882080078125, -0.01470947265625, 0.038330078125, 0.0045166015625, 0.006534576416015625, -0.01313018798828125, -0.0086669921875, -0.01136016845703125, -0.041595458984375, 0.0633544921875, -0.0140380859375, -0.00382232666015625, -0.00559234619140625, 0.0164031982421875, -0.03875732421875, 0.055755615234375, -0.060760498046875, -0.045440673828125, -0.0196075439453125, 0.041168212890625, -0.027587890625, 0.0165252685546875, -0.019775390625, 0.01332855224609375, -0.0104522705078125, -0.0367431640625, 0.046630859375, 0.00251007080078125, -0.01201629638671875, 0.01739501953125, 0.0063629150390625, -0.0286102294921875, 0.03399658203125, -0.035064697265625, 0.05560302734375, 0.044219970703125, 0.020721435546875, 0.00496673583984375, 0.0088653564453125, -0.023651123046875, 0.01397705078125, 0.019012451171875, -0.00311279296875, 0.0163726806640625, -0.020111083984375, -0.0100555419921875, 0.00045180320739746094, 0.03619384765625, -0.0095062255859375, 0.00909423828125, -0.00093841552734375, -0.0160980224609375, -0.023468017578125, -0.01543426513671875, -0.043212890625, -0.0198822021484375, 0.0269012451171875, 0.0250396728515625, 0.023590087890625, 0.0176849365234375, -0.0477294921875, -0.050506591796875, 0.0182342529296875, -0.00904083251953125, -0.0027370452880859375, -0.0152587890625, -0.02703857421875, -0.036346435546875, -0.0101165771484375, -0.0239105224609375, 0.005229949951171875, 0.0305023193359375, -0.005161285400390625, 0.01151275634765625, -0.04669189453125, -0.009857177734375, -0.0200958251953125, -0.002567291259765625, 0.0178070068359375, -0.0159759521484375, -0.01447296142578125, -0.0192718505859375, -0.00359344482421875, 0.0185699462890625, 0.042572021484375, -0.000667572021484375, 0.05029296875, -0.00115203857421875, -0.0906982421875, -0.0697021484375, 0.048583984375, -0.06951904296875, -0.03192138671875, 0.0131072998046875, 0.00679779052734375, 0.032684326171875, -0.0115814208984375, -0.026947021484375, 0.04876708984375, -0.00390625, -0.020172119140625, -0.0338134765625, 0.0253753662109375, 0.0004248619079589844, -0.00853729248046875, 0.001506805419921875, -0.0216522216796875, -0.00588226318359375, 0.002597808837890625, 0.0016603469848632812, 0.0540771484375, 0.00286865234375, 0.0213470458984375, -0.032684326171875, 0.00897216796875, -0.018707275390625, -0.01401519775390625, 0.0035552978515625, -0.014923095703125, 0.01424407958984375, 0.0186920166015625, -0.043975830078125, -0.034149169921875, -0.009246826171875, 0.0343017578125, 0.0034770965576171875, -0.00579071044921875, -0.04656982421875, -0.023895263671875, 0.00623321533203125, 0.055206298828125, 0.004787445068359375, -0.0168304443359375, -0.020660400390625, -0.0232086181640625, -0.0010881423950195312, -0.00970458984375, 0.0016012191772460938, -0.03778076171875, -0.0027065277099609375, -0.00021529197692871094, -0.018707275390625, -0.01399993896484375, -0.0017976760864257812, -0.03424072265625, -0.01523590087890625, -0.0156402587890625, -0.01033782958984375, -0.0531005859375, 0.05340576171875, 0.021240234375, -0.035858154296875, -0.0227203369140625, -0.0172576904296875, -0.0020008087158203125, -0.010711669921875, -0.050079345703125, -0.0433349609375, -0.005496978759765625, 0.0085601806640625, 0.01531219482421875, 0.003047943115234375, 0.017303466796875, 0.00603485107421875, 0.01220703125, -0.036834716796875, 0.0031890869140625, 0.01197052001953125, -0.0112457275390625, -0.01055908203125, 0.0230865478515625, 0.0252838134765625, 0.061248779296875, 0.0157012939453125, 0.0169830322265625, 0.0026912689208984375, 0.034393310546875, 0.00244903564453125, -0.0230560302734375, 0.01300811767578125, -0.0178680419921875, 0.01221466064453125, -0.00926971435546875, 0.005718231201171875, 0.016876220703125, -0.004184722900390625, -0.0020771026611328125, -0.0478515625, 0.004695892333984375 ]
792744410594c254ade349fbe380bd3038e337f6
Wordpress Stackexchange Q: "pre_get_posts" firing on every query How can I change arguments for the main query only, and not affect other queries? add_filter('pre_get_posts', 'custom_post_count'); function custom_post_count($query){ $query->set('posts_per_page', 5); return $query; }; Because this action is called inside the get_posts method of WP_Query, this code will alter the posts_per_page argument for all loops, not just the main, so passing this argument to WP_Query is useless... A: Basically what you are looking for is the global $wp_the_query variable which is set to the value of the main query. It may not be a perfect fit for 100% of cases but will probably work fine in 99% of cases: add_action( 'pre_get_posts', 'custom_post_count' ); function custom_post_count( $query ){ global $wp_the_query; if ( $wp_the_query === $query ) { $query->set( 'posts_per_page', 5 ); } return $query; };
Q: "pre_get_posts" firing on every query How can I change arguments for the main query only, and not affect other queries? add_filter('pre_get_posts', 'custom_post_count'); function custom_post_count($query){ $query->set('posts_per_page', 5); return $query; }; Because this action is called inside the get_posts method of WP_Query, this code will alter the posts_per_page argument for all loops, not just the main, so passing this argument to WP_Query is useless... A: Basically what you are looking for is the global $wp_the_query variable which is set to the value of the main query. It may not be a perfect fit for 100% of cases but will probably work fine in 99% of cases: add_action( 'pre_get_posts', 'custom_post_count' ); function custom_post_count( $query ){ global $wp_the_query; if ( $wp_the_query === $query ) { $query->set( 'posts_per_page', 5 ); } return $query; }; A: Firstly, 'pre_get_posts' is an action and not a filter. That's the main problem to start. Secondly, you need to set conditionals for the context. add_action('wp', 'custom_post_count'); function custom_post_count($query){ if($query->is_home || $query->is_front_page){ $query->set('posts_per_page', 5); } return $query; }; The previous example is if you want to use this once in your functions.php without touching your template files. As far as affecting every query, if you don't create a new query, every loop with inherit the pre_get_posts $query. That's why I use query_posts() to create a new query in the following example. Custom Loops This is how I do custom loops: $args = array( 'posts_per_page' => 5 ); query_posts($args); if(have_posts()): while(have_posts()): the_post(); endwhile; else: endif; wp_reset_query(); Just place query_posts() above the loop and wp_reset_query() at the end of the loop. Hope this helps you out. :)
wordpress
{ "language": "en", "length": 265, "provenance": "stackexchange_00019.jsonl.gz:413102", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28670" }
[ 0.09222412109375, -0.0023040771484375, 0.0260772705078125, -0.044036865234375, 0.032989501953125, -0.0307464599609375, 0.07598876953125, -0.01401519775390625, -0.0167083740234375, 0.01238250732421875, -0.0124664306640625, 0.0018301010131835938, -0.01275634765625, -0.018524169921875, 0.0174102783203125, -0.01812744140625, 0.061614990234375, -0.045928955078125, 0.0202178955078125, -0.0179290771484375, 0.004886627197265625, 0.0116424560546875, 0.049591064453125, 0.10760498046875, 0.01381683349609375, -0.021636962890625, 0.037445068359375, -0.0079193115234375, 0.0087738037109375, -0.019073486328125, 0.0163116455078125, -0.0025196075439453125, 0.0196990966796875, 0.0156402587890625, -0.0279541015625, 0.03778076171875, 0.0235595703125, -0.0038623809814453125, 0.002132415771484375, 0.02301025390625, 0.0284881591796875, -0.016998291015625, -0.029022216796875, -0.0190277099609375, -0.03411865234375, -0.01479339599609375, 0.034332275390625, -0.004291534423828125, 0.0141754150390625, -0.036651611328125, 0.00501251220703125, 0.05169677734375, 0.0254058837890625, -0.03668212890625, 0.000507354736328125, 0.033782958984375, 0.0145263671875, -0.0399169921875, 0.05328369140625, -0.03204345703125, -0.036712646484375, -0.04119873046875, 0.040985107421875, -0.02294921875, -0.0191192626953125, -0.01020050048828125, 0.0267486572265625, 0.0036983489990234375, -0.00852203369140625, -0.03314208984375, 0.02215576171875, 0.023529052734375, 0.00022137165069580078, -0.00865936279296875, 0.015716552734375, -0.044921875, 0.01401519775390625, -0.00649261474609375, 0.00885772705078125, 0.04315185546875, 0.0205230712890625, -0.038421630859375, -0.0352783203125, 0.01490020751953125, 0.01435089111328125, 0.038055419921875, -0.0006780624389648438, -0.006317138671875, -0.01241302490234375, -0.0219573974609375, -0.01287078857421875, -0.006198883056640625, -0.0202484130859375, -0.0193634033203125, -0.0252685546875, -0.033905029296875, -0.0235748291015625, 0.0246734619140625, -0.005573272705078125, 0.002227783203125, -0.0242767333984375, -0.0035800933837890625, -0.03216552734375, -0.01007843017578125, 0.006801605224609375, 0.0163421630859375, 0.0016498565673828125, 0.07366943359375, 0.071044921875, 0.050506591796875, 0.028839111328125, 0.040008544921875, -0.002681732177734375, 0.00885772705078125, -0.0567626953125, -0.008453369140625, -0.026092529296875, -0.039703369140625, -0.01275634765625, -0.01277923583984375, 0.0177459716796875, 0.0282745361328125, -0.0007586479187011719, -0.05780029296875, 0.032012939453125, -0.0083160400390625, -0.0215301513671875, -0.0239410400390625, -0.0197906494140625, 0.0765380859375, -0.029876708984375, -0.02996826171875, 0.043548583984375, 0.032684326171875, 0.01232147216796875, -0.048980712890625, 0.0100250244140625, -0.00586700439453125, 0.0005168914794921875, 0.0200653076171875, 0.0174560546875, -0.052276611328125, -0.03179931640625, 0.0203857421875, 0.025970458984375, 0.0203704833984375, 0.0504150390625, 0.0225372314453125, -0.03826904296875, -0.03997802734375, 0.0126800537109375, 0.042938232421875, 0.02838134765625, 0.00815582275390625, -0.0258026123046875, 0.0253753662109375, -0.01238250732421875, 0.00557708740234375, -0.03851318359375, 0.0086822509765625, 0.0321044921875, -0.0298004150390625, -0.038818359375, 0.005664825439453125, -0.04376220703125, 0.0216217041015625, -0.01593017578125, 0.0019741058349609375, 0.01081085205078125, 0.0254974365234375, 0.043670654296875, -0.004077911376953125, 0.01198577880859375, -0.0284271240234375, -0.03045654296875, -0.039886474609375, -0.02191162109375, 0.0017366409301757812, 0.047088623046875, 0.004093170166015625, -0.022186279296875, -0.036590576171875, 0.05316162109375, -0.0134429931640625, -0.0684814453125, 0.041107177734375, -0.008880615234375, 0.052276611328125, 0.013153076171875, 0.0033664703369140625, 0.0233001708984375, 0.024566650390625, -0.03314208984375, 0.0390625, 0.00028014183044433594, -0.01526641845703125, -0.0161590576171875, -0.00167083740234375, -0.00833892822265625, -0.006641387939453125, -0.01190185546875, -0.0031280517578125, 0.0008625984191894531, 0.006191253662109375, -0.062744140625, 0.0144500732421875, -0.0171356201171875, 0.023223876953125, 0.01165008544921875, 0.0478515625, 0.02545166015625, 0.049224853515625, -0.0460205078125, -0.020294189453125, -0.025543212890625, -0.00470733642578125, 0.007274627685546875, 0.035247802734375, -0.003696441650390625, -0.0035991668701171875, 0.01397705078125, -0.0303802490234375, -0.005657196044921875, 0.0357666015625, 0.10107421875, -0.0251922607421875, -0.010284423828125, -0.050018310546875, 0.05328369140625, -0.0239105224609375, -0.053619384765625, 0.053741455078125, 0.09075927734375, 0.0592041015625, -0.040191650390625, -0.009429931640625, -0.00911712646484375, -0.041412353515625, -0.00531768798828125, 0.056793212890625, 0.036102294921875, 0.003475189208984375, 0.00672149658203125, -0.0128326416015625, 0.0251922607421875, -0.0208282470703125, 0.03076171875, -0.029510498046875, 0.01541900634765625, 0.0243988037109375, -0.0180206298828125, -0.046051025390625, 0.0312042236328125, -0.0426025390625, 0.0019121170043945312, 0.029876708984375, 0.03460693359375, 0.00897979736328125, -0.02777099609375, 0.006374359130859375, 0.0071563720703125, -0.003814697265625, -0.04559326171875, 0.0175933837890625, -0.02557373046875, 0.0143890380859375, -0.0035953521728515625, 0.00811767578125, -0.00637054443359375, -0.002353668212890625, 0.00865936279296875, -0.033782958984375, -0.0244293212890625, -0.033477783203125, -0.05853271484375, -0.0010814666748046875, -0.04998779296875, 0.0689697265625, -0.0239715576171875, -0.045257568359375, -0.006439208984375, 0.031707763671875, -0.038665771484375, -0.01441192626953125, -0.02349853515625, -0.0648193359375, 0.0016298294067382812, 0.0193939208984375, 0.005832672119140625, -0.034454345703125, 0.01129150390625, -0.0136871337890625, -0.04388427734375, 0.03851318359375, -0.00783538818359375, -0.0333251953125, 0.02569580078125, -0.0860595703125, 0.050933837890625, -0.054962158203125, 0.078125, 0.08038330078125, -0.01454925537109375, 0.0245208740234375, -0.00817108154296875, 0.0126495361328125, -0.0189208984375, 0.044830322265625, 0.006847381591796875, -0.0271148681640625, -0.038330078125, 0.01448822021484375, 0.028594970703125, 0.046905517578125, -0.0011320114135742188, -0.03851318359375, -0.00023996829986572266, 0.019073486328125, -0.03912353515625, -0.03497314453125, 0.0312347412109375, -0.039886474609375, 0.008026123046875, -0.017974853515625, -0.006824493408203125, -0.01413726806640625, -0.0156707763671875, -0.0084075927734375, -0.00801849365234375, -0.004428863525390625, -0.02899169921875, -0.024749755859375, -0.0347900390625, 0.02435302734375, 0.005100250244140625, 0.01078033447265625, -0.00714111328125, 0.11395263671875, 0.003818511962890625, -0.07025146484375, -0.006229400634765625, 0.0262908935546875, -0.0118255615234375, 0.0205078125, 0.009796142578125, -0.03680419921875, 0.021881103515625, -0.0206756591796875, 0.04888916015625, 0.0411376953125, -0.0220794677734375, 0.01143646240234375, 0.025543212890625, 0.00567626953125, 0.03204345703125, 0.033233642578125, -0.03717041015625, 0.03582763671875, 0.044189453125, -0.0255584716796875, 0.006683349609375, -0.039276123046875, -0.04400634765625, 0.01435089111328125, 0.029693603515625, 0.00974273681640625, -0.01540374755859375, -0.00951385498046875, 0.0231475830078125, -0.003101348876953125, 0.0164337158203125, -0.0208282470703125, 0.0186004638671875, 0.01462554931640625, 0.0279998779296875, -0.029144287109375, -0.0023345947265625, -0.040618896484375, 0.04534912109375, 0.01055908203125, 0.01265716552734375, 0.0217437744140625, -0.00727081298828125, 0.0078277587890625, -0.01580810546875, 0.04058837890625, 0.0119781494140625, 0.0111846923828125, -0.01424407958984375, -0.04150390625, -0.01300048828125, 0.0679931640625, -0.0286102294921875, -0.03271484375, -0.0028324127197265625, 0.013946533203125, 0.00830841064453125, -0.041656494140625, 0.02142333984375, -0.0390625, -0.022918701171875, -0.006420135498046875, -0.0299224853515625, -0.0212860107421875, -0.0200653076171875, -0.0022983551025390625, -0.02960205078125, -0.0238494873046875, 0.052581787109375, -0.03546142578125, 0.007404327392578125, -0.023162841796875, -0.0267333984375, -0.0266876220703125, -0.02972412109375, -0.01383209228515625, -0.0833740234375, -0.0214996337890625, 0.0190887451171875, 0.0677490234375, -0.0021724700927734375, -0.03143310546875, -0.02813720703125, 0.05560302734375, 0.048187255859375, 0.02001953125, 0.01415252685546875, -0.0130615234375, 0.00620269775390625, -0.01168060302734375, 0.011474609375, -0.0291290283203125, -0.00377655029296875, -0.01073455810546875, 0.0216217041015625, 0.0009851455688476562, -0.056884765625, -0.04327392578125, -0.04583740234375, -0.0177154541015625, -0.0775146484375, -0.03662109375, -0.007541656494140625, -0.00568389892578125, -0.0322265625, -0.007038116455078125, -0.0160369873046875, -0.060699462890625, 0.0313720703125, -0.0087890625, -0.019439697265625, 0.004711151123046875, 0.05523681640625, 0.0196990966796875, -0.019134521484375, 0.00811004638671875, 0.0039005279541015625, 0.017578125, -0.0283966064453125, 0.05560302734375, 0.01483154296875, -0.0013284683227539062, 0.0372314453125, -0.025360107421875, -0.01812744140625, -0.026763916015625, 0.045166015625, -0.0033245086669921875, -0.004791259765625, -0.00023627281188964844, -0.031494140625, 0.038604736328125, 0.0248565673828125, -0.0012865066528320312, -0.00946807861328125, 0.00794219970703125, 0.0240020751953125, -0.00615692138671875, 0.01166534423828125, -0.01457977294921875, -0.010955810546875, 0.011810302734375, 0.04254150390625, 0.036163330078125, -0.00608062744140625, 0.0186920166015625, 0.0030994415283203125, 0.01702880859375, 0.031646728515625, 0.0389404296875, 0.07470703125, -0.0256805419921875, 0.056396484375, 0.043701171875, 0.00018298625946044922, -0.01238250732421875, -0.0010843276977539062, 0.0167388916015625, -0.0155181884765625, -0.036590576171875, 0.0186309814453125, -0.0200042724609375, -0.027069091796875, 0.01629638671875, -0.0023174285888671875, 0.038818359375, 0.0290985107421875, -0.0237884521484375, -0.027252197265625, -0.0008845329284667969, -0.02203369140625, -0.05902099609375, -0.005970001220703125, -0.00266265869140625, -0.005252838134765625, 0.0254974365234375, 0.031402587890625, -0.0106048583984375, 0.037109375, -0.019134521484375, 0.00862884521484375, 0.0183563232421875, 0.019775390625, 0.0169677734375, 0.012451171875, -0.0077667236328125, 0.00894927978515625, -0.0020694732666015625, 0.0107269287109375, -0.0173492431640625, 0.0214080810546875, 0.0018205642700195312, 0.016448974609375, 0.033447265625, -0.02825927734375, 0.003910064697265625, -0.021697998046875, 0.017730712890625, 0.0236053466796875, 0.0030002593994140625, -0.0311126708984375, -0.0183258056640625, 0.0287017822265625, 0.0230255126953125, 0.01180267333984375, -0.03662109375, 0.0299835205078125, 0.039764404296875, -0.0623779296875, 0.0279693603515625, -0.004131317138671875, 0.0005588531494140625, -0.0253143310546875, -0.029449462890625, 0.007068634033203125, -0.034820556640625, -0.023345947265625, -0.00102996826171875, -0.00899505615234375, 0.01515960693359375, -0.021484375, 0.0638427734375, -0.0301666259765625, -0.0210418701171875, -0.0277557373046875, 0.0154571533203125, 0.03558349609375, 0.036285400390625, -0.032135009765625, -0.016265869140625, -0.0411376953125, -0.036651611328125, 0.01515960693359375, 0.004459381103515625, -0.052978515625, 0.01446533203125, 0.005767822265625, 0.0246124267578125, -0.006923675537109375, -0.0404052734375, -0.03155517578125, 0.0012216567993164062, 0.0302276611328125, 0.036956787109375, -0.0278167724609375, 0.048797607421875, 0.00522613525390625, 0.021942138671875, 0.0007567405700683594, 0.024139404296875, 0.034393310546875, -0.0285797119140625, 0.0032501220703125, -0.038482666015625, -0.0177154541015625, 0.01007080078125, -0.0014362335205078125, -0.00661468505859375, -0.01047515869140625, -0.004405975341796875, 0.03192138671875, -0.0023632049560546875, 0.00859832763671875, -0.013519287109375, 0.003917694091796875, -0.021728515625, 0.0206756591796875, 0.051910400390625, 0.0180511474609375, 0.01102447509765625, -0.01557159423828125, 0.0034637451171875, -0.01274871826171875, 0.007526397705078125, -0.01064300537109375, -0.03399658203125, -0.03924560546875, 0.06817626953125, 0.0784912109375, 0.004150390625, 0.0556640625, 0.01543426513671875, 0.007488250732421875, 0.0094146728515625, -0.0052337646484375, 0.020751953125, 0.01172637939453125, 0.04376220703125, -0.01380157470703125, 0.0026378631591796875, 0.0295867919921875, -0.0228424072265625, -0.0098114013671875, 0.0146026611328125, 0.01873779296875, -0.034698486328125, 0.001644134521484375, -0.0065155029296875, 0.0046234130859375, -0.0016355514526367188, 0.01300811767578125, -0.0016574859619140625, 0.0244598388671875, 0.062225341796875, -0.00258636474609375, 0.0158843994140625, 0.052764892578125, 0.01430511474609375, -0.0171051025390625, -0.0302886962890625, 0.00014293193817138672, -0.00040841102600097656, -0.006832122802734375, 0.022003173828125, -0.0009379386901855469, -0.01123809814453125, -0.0222625732421875, 0.0333251953125, -0.00362396240234375, 0.0170745849609375, -0.06787109375, 0.01375579833984375, -0.009765625, -0.004924774169921875, -0.0148162841796875, 0.0014629364013671875, -0.0011119842529296875, 0.035430908203125, -0.00887298583984375, -0.0121307373046875, 0.035736083984375, -0.060882568359375, -0.045684814453125, -0.0126495361328125, 0.0254364013671875, 0.03887939453125, -0.05902099609375, 0.0294952392578125, -0.043182373046875, -0.00412750244140625, -0.0157318115234375, -0.0322265625, 0.07257080078125, -0.039459228515625, 0.00215911865234375, 0.0257415771484375, 0.006748199462890625, -0.0192413330078125, -0.01441192626953125, -0.0176239013671875, -0.0478515625, -0.0287933349609375, -0.0236358642578125, -0.054901123046875, 0.002044677734375, -0.03973388671875, -0.039154052734375, 0.1348876953125, -0.046478271484375, 0.0246429443359375, 0.055419921875, 0.046112060546875, -0.044525146484375, 0.0309600830078125, -0.0675048828125, 0.060333251953125, -0.002292633056640625, 0.09881591796875, -0.08642578125, -0.02935791015625, 0.02886962890625, 0.050750732421875, 0.05645751953125, 0.006938934326171875, -0.031402587890625, -0.0036678314208984375, 0.0672607421875, 0.06048583984375, 0.01397705078125, 0.02484130859375, -0.0037593841552734375, 0.06610107421875, 0.06353759765625, -0.0289154052734375, 0.034698486328125, 0.0194244384765625, -0.048675537109375, 0.0321044921875, 0.0049896240234375, 0.01503753662109375, -0.004245758056640625, 0.03851318359375, -0.034423828125, -0.00374603271484375, 0.031463623046875, 0.01898193359375, -0.024444580078125, 0.08935546875, 0.0579833984375, -0.02081298828125, -0.0249176025390625, -0.038116455078125, 0.047698974609375, 0.005558013916015625, 0.0193328857421875, 0.0304412841796875, -0.01047515869140625, 0.08807373046875, 0.018218994140625, 0.004215240478515625, 0.0313720703125, 0.01561737060546875, 0.0738525390625, 0.0182647705078125, 0.03948974609375, -0.051300048828125, 0.023162841796875, 0.02880859375, 0.08624267578125, -0.054962158203125, -0.027618408203125, 0.00144195556640625, -0.027191162109375, -0.0039215087890625, -0.021636962890625, -0.0216827392578125, 0.037017822265625, 0.0234222412109375, -0.0301055908203125, -0.0124664306640625, -0.0008726119995117188, 0.0245361328125, -0.017059326171875, 0.005664825439453125, 0.00994110107421875, -0.038848876953125, -0.019927978515625, -0.037689208984375, -0.0227508544921875, 0.04339599609375, 0.042510986328125, 0.00125885009765625, -0.037109375, -0.0165557861328125, -0.0015535354614257812, 0.0096893310546875, -0.031829833984375, 0.0247344970703125, -0.0289306640625, -0.0276947021484375, -0.0283660888671875, 0.033966064453125, 0.0450439453125, 0.00995635986328125, 0.044097900390625, 0.004459381103515625, -0.0301361083984375, 0.00980377197265625, 0.028594970703125, -0.0206146240234375, 0.0009760856628417969, -0.0118865966796875, -0.028717041015625, 0.00444793701171875, -0.00817108154296875, -0.036041259765625, 0.02685546875, -0.003101348876953125, 0.024200439453125, 0.003261566162109375, 0.0093994140625, -0.022003173828125, 0.042266845703125, 0.0023860931396484375, 0.062103271484375, 0.03338623046875, -0.040557861328125, -0.0023365020751953125, -0.022857666015625, -0.06353759765625, 0.0231781005859375, 0.0340576171875, -0.0240325927734375, 0.021575927734375, -0.012969970703125, 0.005680084228515625, 0.031890869140625, -0.0340576171875, 0.01245880126953125, 0.032012939453125, 0.0220947265625, 0.019622802734375, -0.0292816162109375, -0.0146331787109375, 0.006923675537109375, -0.0013866424560546875, 0.0034427642822265625, 0.0099945068359375, 0.032958984375, 0.0078582763671875, 0.041656494140625, -0.003421783447265625, 0.027099609375, 0.0169830322265625, 0.03009033203125, -0.028594970703125, 0.002960205078125, -0.01284027099609375, -0.037322998046875, -0.025390625, 0.0631103515625, -0.0462646484375, 0.02984619140625, -0.040985107421875, 0.02935791015625, -0.053741455078125, 0.01318359375, -0.01447296142578125, 0.02960205078125, -0.0153350830078125, -0.044464111328125, 0.06396484375, -0.00572967529296875, -0.025054931640625, 0.034088134765625, 0.005367279052734375, -0.01186370849609375, 0.048553466796875, -0.03765869140625, 0.07635498046875, 0.035552978515625, -0.04608154296875, 0.044464111328125, -0.004459381103515625, -0.0301513671875, -0.0048065185546875, 0.0293426513671875, -0.05230712890625, -0.00045752525329589844, -0.017303466796875, -0.06658935546875, -0.01404571533203125, 0.00605010986328125, -0.017669677734375, 0.01055145263671875, -0.034332275390625, -0.007762908935546875, 0.00942230224609375, -0.0169525146484375, -0.015533447265625, -0.0196990966796875, -0.023529052734375, -0.00690460205078125, -0.003986358642578125, -0.0460205078125, 0.01465606689453125, -0.0111541748046875, 0.0288848876953125, -0.00518035888671875, -0.061767578125, 0.04608154296875, -0.0295257568359375, 0.0192413330078125, -0.03570556640625, -0.052825927734375, 0.01556396484375, 0.028472900390625, -0.014404296875, -0.0212860107421875, -0.025726318359375, -0.0057373046875, -0.007434844970703125, -0.0037689208984375, 0.0256500244140625, -0.0153045654296875, -0.014312744140625, 0.0007772445678710938, -0.01904296875, 0.0267181396484375, -0.0202484130859375, -0.007659912109375, 0.048583984375, -0.00330352783203125, -0.0260467529296875, -0.0897216796875, 0.00051116943359375, -0.056732177734375, 0.034637451171875, -0.0034503936767578125, 0.022796630859375, 0.044586181640625, -0.01425933837890625, -0.0711669921875, 0.01296234130859375, -0.0112457275390625, -0.0343017578125, -0.07330322265625, 0.026031494140625, -0.0052642822265625, -0.00128936767578125, -0.005680084228515625, -0.030059814453125, -0.0258941650390625, 0.011505126953125, 0.00966644287109375, 0.032684326171875, 0.027679443359375, 0.0223541259765625, -0.054473876953125, -0.0005512237548828125, -0.02166748046875, 0.025970458984375, 0.0267486572265625, -0.00827789306640625, 0.02972412109375, 0.029632568359375, -0.037872314453125, 0.04095458984375, -0.014739990234375, -0.022216796875, -0.0183868408203125, -0.004642486572265625, -0.022796630859375, -0.0034637451171875, 0.081787109375, 0.042877197265625, 0.03143310546875, -0.04669189453125, -0.0223236083984375, -0.019622802734375, -0.007091522216796875, -0.00858306884765625, 0.0036773681640625, -0.03179931640625, -0.0023899078369140625, -0.00618743896484375, -0.0220947265625, -0.025390625, -0.014678955078125, -0.041290283203125, 0.004924774169921875, -0.02325439453125, 0.000209808349609375, -0.000453948974609375, -0.0039043426513671875, -0.0218048095703125, -0.018829345703125, -0.059783935546875, 0.00499725341796875, -0.0006871223449707031, -0.06195068359375, 0.0166473388671875, 0.0128631591796875, 0.01059722900390625, -0.02349853515625, -0.003864288330078125, 0.01378631591796875, -0.005809783935546875, 0.002532958984375, -0.00942230224609375, -0.007465362548828125, 0.0267486572265625, -0.006687164306640625, 0.0149078369140625, 0.01229095458984375, 0.028289794921875, -0.004627227783203125, 0.0552978515625, -0.000015735626220703125, 0.0487060546875, 0.0161590576171875, 0.0030117034912109375, -0.005886077880859375, 0.01213836669921875, 0.004180908203125, -0.016510009765625, -0.00699615478515625, 0.006900787353515625, -0.07061767578125, -0.00858306884765625, -0.0291595458984375, 0.04766845703125, -0.035552978515625, -0.00431060791015625 ]
f125bccd838145803d32cd95da2ae58b06788c94
Wordpress Stackexchange Q: Need help building a filter to edit the output of "image_send_to_editor" What I'm trying to do is edit the output of image_send_to_editor so that i can make the anchor that wraps around the image have a specific class & rel. I plan to basically make each image that gets inserted into a post become fancybox capable without having to be in a gallery or using a plugin. Heres what I have thus far but I need help filling in the blanks... <?php add_filter( 'image_send_to_editor', 'fancy_capable', 10, 7); function fancy_capable($html, $id, $alt, $title, $align, $url, $size ) { // not sure what to do here??? return "$html"; } ?> A: Your best bet here would be to use jQuery to grab any link that links to an image and tell it to use fanceybox. jQuery(document).ready(function($){ $('a[href$="jpg"], a[href$="png"], a[href$="jpeg"]').fancybox(); }); If you want this to work just for your post content areas use this: $('.post-content a[href$="jpg"], .post-content a[href$="png"], .post-content a[href$="jpeg"]').fancybox(); You will need to replace .post-content with whatever HTML parent element wraps the content area.
Q: Need help building a filter to edit the output of "image_send_to_editor" What I'm trying to do is edit the output of image_send_to_editor so that i can make the anchor that wraps around the image have a specific class & rel. I plan to basically make each image that gets inserted into a post become fancybox capable without having to be in a gallery or using a plugin. Heres what I have thus far but I need help filling in the blanks... <?php add_filter( 'image_send_to_editor', 'fancy_capable', 10, 7); function fancy_capable($html, $id, $alt, $title, $align, $url, $size ) { // not sure what to do here??? return "$html"; } ?> A: Your best bet here would be to use jQuery to grab any link that links to an image and tell it to use fanceybox. jQuery(document).ready(function($){ $('a[href$="jpg"], a[href$="png"], a[href$="jpeg"]').fancybox(); }); If you want this to work just for your post content areas use this: $('.post-content a[href$="jpg"], .post-content a[href$="png"], .post-content a[href$="jpeg"]').fancybox(); You will need to replace .post-content with whatever HTML parent element wraps the content area. A: This is actually pretty easy... the return $html; is just going to return to the editor whatever you send to it... so you could do something like this: <?php add_filter( 'image_send_to_editor', 'fancy_capable', 10, 7); function fancy_capable($html, $id, $alt, $title, $align, $url, $size ) { $url = wp_get_attachment_url($id); // Grab the current image URL $html = '<a href="' . $url . '" class="fancybox" rel="your-rel"><img src="..." /></a>'; return $html; } ?> You can also just insert a shortcode (which may be more familiar to the user) in place of the HTML... and then have your shortcode do the work on the backend. <?php add_filter( 'image_send_to_editor', 'fancy_capable', 10, 7); function fancy_capable($html, $id, $alt, $title, $align, $url, $size ) { $url = wp_get_attachment_url($id); // Grab the current image URL $html = '[image src="' . $url . '" fancybox="true" /]'; return $html; } ?> A: I've found some examples of using regular expressions to add some classes to the HTML. This works for me: add_filter('image_send_to_editor', 'add_class_to_image', 10, 8); with the following function: function add_class_to_image($html, $id, $caption, $title, $align, $url, $size, $alt='') { $classes_to_add = 'media-img'; if (preg_match('/<a.? class=".?">/', $html)) $html = preg_replace('/(<a.? class=".?)(".\?>)/', '$1 ' . $classes_to_add . '$2', $html); else $html = preg_replace('/(<a.*?)>/', '$1 class="' . $classes_to_add . '">', $html); return $html; } Then, in my style.css file I styled the a.media-img selector.
wordpress
{ "language": "en", "length": 394, "provenance": "stackexchange_00019.jsonl.gz:413103", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28673" }
[ 0.036712646484375, -0.01873779296875, 0.01715087890625, -0.029296875, 0.00986480712890625, -0.034393310546875, 0.07122802734375, -0.0072479248046875, 0.0154571533203125, 0.01459503173828125, 0.02410888671875, -0.01727294921875, 0.004016876220703125, -0.05352783203125, -0.01204681396484375, 0.005886077880859375, 0.01934814453125, -0.056976318359375, -0.0011644363403320312, -0.029937744140625, 0.019866943359375, -0.0209503173828125, 0.0244293212890625, 0.0256195068359375, 0.0021533966064453125, 0.0286102294921875, 0.0657958984375, 0.0048828125, -0.006397247314453125, -0.00513458251953125, 0.00894927978515625, -0.0406494140625, 0.0377197265625, 0.0274505615234375, -0.072021484375, 0.0267333984375, 0.014892578125, -0.00630950927734375, -0.034881591796875, 0.04669189453125, 0.0016937255859375, -0.001277923583984375, -0.0146636962890625, 0.0309906005859375, -0.0294189453125, -0.0175933837890625, -0.0186004638671875, -0.060211181640625, 0.048126220703125, -0.0278778076171875, -0.01593017578125, 0.0616455078125, -0.00769805908203125, -0.00472259521484375, -0.00004875659942626953, 0.0266876220703125, -0.038238525390625, -0.003307342529296875, 0.006290435791015625, 0.039031982421875, 0.0036983489990234375, 0.0116119384765625, -0.01032257080078125, -0.01509857177734375, -0.0178680419921875, -0.003711700439453125, -0.0270538330078125, -0.0016775131225585938, -0.041046142578125, -0.0028820037841796875, 0.030731201171875, -0.041748046875, -0.00980377197265625, -0.041259765625, 0.005168914794921875, 0.0232086181640625, -0.0269622802734375, -0.0244293212890625, 0.0189361572265625, -0.00921630859375, 0.034698486328125, 0.0200042724609375, -0.006542205810546875, 0.01470947265625, -0.026519775390625, 0.0218658447265625, -0.00832366943359375, -0.018341064453125, -0.0233154296875, -0.02325439453125, -0.01085662841796875, -0.0192718505859375, -0.046844482421875, -0.01049041748046875, 0.01036834716796875, -0.038604736328125, 0.014617919921875, 0.0015211105346679688, 0.02154541015625, 0.0308837890625, 0.036041259765625, -0.08709716796875, 0.111572265625, -0.04156494140625, 0.007488250732421875, 0.009521484375, -0.0047760009765625, -0.01059722900390625, 0.0270538330078125, 0.0221710205078125, -0.0174102783203125, -0.006561279296875, -0.0193023681640625, 0.0013647079467773438, -0.0304718017578125, 0.017486572265625, -0.036651611328125, 0.01373291015625, -0.0245208740234375, 0.035736083984375, 0.0157623291015625, 0.005611419677734375, 0.0234222412109375, 0.03643798828125, 0.01776123046875, 0.0306396484375, -0.01448822021484375, -0.043304443359375, 0.07244873046875, -0.0187530517578125, -0.07928466796875, 0.01468658447265625, 0.1331787109375, 0.05999755859375, 0.08148193359375, -0.02471923828125, 0.005523681640625, -0.043304443359375, 0.007724761962890625, -0.00004315376281738281, 0.01806640625, -0.0185089111328125, 0.01244354248046875, 0.0080108642578125, -0.0023288726806640625, 0.02886962890625, 0.0217132568359375, 0.00004380941390991211, -0.032470703125, -0.07220458984375, 0.0174713134765625, -0.035186767578125, 0.02496337890625, 0.01491546630859375, -0.011688232421875, -0.032501220703125, 0.026947021484375, -0.038360595703125, 0.0155792236328125, -0.051513671875, 0.00458526611328125, 0.024505615234375, 0.048187255859375, -0.03851318359375, -0.0029315948486328125, -0.06329345703125, -0.056915283203125, 0.0020771026611328125, 0.0263824462890625, 0.0007252693176269531, 0.0212249755859375, -0.046295166015625, -0.0027256011962890625, -0.006214141845703125, -0.01348876953125, 0.0484619140625, 0.007343292236328125, 0.031951904296875, 0.029876708984375, 0.0626220703125, 0.01421356201171875, -0.02801513671875, 0.110595703125, -0.04730224609375, -0.0312347412109375, -0.0222930908203125, 0.00677490234375, -0.0163726806640625, 0.0165863037109375, 0.006168365478515625, 0.0631103515625, 0.0189208984375, -0.046417236328125, -0.0276031494140625, 0.004024505615234375, -0.0017671585083007812, -0.0228271484375, -0.02032470703125, -0.0036144256591796875, 0.04083251953125, -0.010528564453125, -0.017913818359375, 0.030609130859375, 0.01470947265625, -0.0184173583984375, 0.0178070068359375, -0.030548095703125, 0.0307769775390625, 0.01861572265625, 0.004100799560546875, 0.0007495880126953125, 0.0014057159423828125, -0.0098724365234375, -0.01241302490234375, -0.02301025390625, 0.0423583984375, 0.004467010498046875, -0.00443267822265625, -0.0130767822265625, 0.04205322265625, -0.043304443359375, -0.01018524169921875, -0.055328369140625, 0.0063629150390625, 0.0345458984375, 0.01554107666015625, -0.0230865478515625, -0.0098724365234375, -0.033782958984375, 0.033843994140625, -0.08575439453125, 0.033233642578125, 0.02496337890625, 0.0221710205078125, -0.007904052734375, -0.0142822265625, -0.005672454833984375, -0.0638427734375, 0.00705718994140625, 0.044464111328125, 0.0382080078125, 0.056121826171875, 0.0007104873657226562, -0.000396728515625, 0.10443115234375, -0.0176544189453125, -0.01219940185546875, 0.00506591796875, -0.007747650146484375, -0.003925323486328125, -0.0262298583984375, -0.0269012451171875, 0.0333251953125, -0.045318603515625, 0.005840301513671875, 0.027313232421875, -0.00205230712890625, 0.0007967948913574219, -0.0035552978515625, 0.0002548694610595703, 0.006134033203125, 0.0245208740234375, -0.0213623046875, 0.0222930908203125, 0.05322265625, 0.01366424560546875, 0.058685302734375, 0.0272674560546875, -0.055267333984375, 0.02984619140625, 0.018157958984375, 0.0036754608154296875, -0.005725860595703125, 0.0238037109375, 0.0279998779296875, 0.006847381591796875, -0.00905609130859375, -0.0167388916015625, 0.0071258544921875, 0.01922607421875, -0.0044403076171875, 0.032684326171875, 0.0221099853515625, -0.004730224609375, -0.0225372314453125, -0.0257720947265625, 0.03369140625, 0.0014934539794921875, 0.01531982421875, 0.0221099853515625, 0.03277587890625, 0.044219970703125, 0.0283203125, 0.0252532958984375, -0.00850677490234375, 0.01373291015625, 0.021453857421875, -0.044708251953125, 0.043609619140625, -0.039306640625, 0.0728759765625, 0.06719970703125, -0.0299835205078125, 0.0220947265625, -0.023712158203125, 0.063720703125, -0.0428466796875, -0.0177459716796875, -0.0301361083984375, -0.0088043212890625, -0.026123046875, -0.005168914794921875, 0.0144195556640625, 0.007457733154296875, -0.041656494140625, -0.048095703125, -0.045684814453125, -0.01065826416015625, -0.07672119140625, -0.0201873779296875, 0.02032470703125, -0.0560302734375, -0.0296783447265625, 0.009124755859375, -0.03997802734375, -0.00604248046875, 0.038421630859375, -0.009185791015625, -0.032073974609375, -0.0156402587890625, 0.024017333984375, -0.015594482421875, -0.005336761474609375, -0.00826263427734375, 0.0058135986328125, -0.000583648681640625, 0.015899658203125, 0.018646240234375, -0.0006322860717773438, -0.07415771484375, 0.000054836273193359375, 0.001556396484375, -0.0202484130859375, 0.00763702392578125, -0.005558013916015625, -0.0036907196044921875, -0.0235137939453125, -0.0015726089477539062, 0.037811279296875, 0.015655517578125, -0.03839111328125, -0.011138916015625, -0.058074951171875, 0.0278778076171875, 0.01788330078125, -0.0167236328125, 0.0465087890625, 0.0352783203125, 0.0178375244140625, -0.01318359375, 0.020477294921875, -0.07843017578125, -0.0562744140625, 0.018890380859375, 0.03985595703125, 0.02923583984375, -0.0038394927978515625, -0.0028743743896484375, -0.005779266357421875, 0.0095672607421875, 0.039764404296875, -0.0293426513671875, 0.023193359375, -0.00705718994140625, -0.00463104248046875, -0.027313232421875, 0.022918701171875, -0.010894775390625, 0.03228759765625, 0.007289886474609375, 0.0173492431640625, -0.006805419921875, 0.00885772705078125, -0.03631591796875, -0.0692138671875, 0.062744140625, 0.009674072265625, 0.01446533203125, -0.050445556640625, -0.03192138671875, -0.0168304443359375, 0.07086181640625, -0.039459228515625, -0.016510009765625, -0.005802154541015625, 0.0004634857177734375, 0.04339599609375, 0.01177215576171875, -0.0227508544921875, -0.01434326171875, -0.0557861328125, 0.01050567626953125, -0.003475189208984375, -0.03277587890625, -0.0164337158203125, -0.0044097900390625, -0.0302276611328125, -0.0301361083984375, 0.0423583984375, -0.0186920166015625, -0.030029296875, 0.0538330078125, -0.040252685546875, 0.01157379150390625, -0.03399658203125, 0.00772857666015625, -0.07928466796875, -0.0220184326171875, -0.004222869873046875, 0.0635986328125, -0.016754150390625, 0.03851318359375, -0.027923583984375, 0.058258056640625, 0.01178741455078125, 0.01739501953125, 0.003925323486328125, 0.01007080078125, 0.004573822021484375, -0.01523590087890625, 0.01971435546875, -0.0280914306640625, -0.005832672119140625, -0.00984954833984375, -0.027557373046875, 0.005420684814453125, -0.02203369140625, -0.030914306640625, 0.00640869140625, -0.019989013671875, -0.10662841796875, -0.065673828125, -0.01551055908203125, -0.0230865478515625, -0.017364501953125, 0.0002856254577636719, -0.0701904296875, -0.074462890625, -0.03326416015625, 0.0129241943359375, -0.019439697265625, 0.0219268798828125, 0.038238525390625, 0.0479736328125, 0.005352020263671875, -0.0118408203125, 0.0021572113037109375, 0.039794921875, 0.00759124755859375, 0.005901336669921875, 0.0236663818359375, -0.00969696044921875, -0.00559234619140625, 0.0184326171875, 0.0211639404296875, -0.0261383056640625, 0.0689697265625, 0.0232086181640625, 0.0008015632629394531, 0.010650634765625, 0.023590087890625, -0.009246826171875, 0.00850677490234375, -0.040863037109375, 0.036407470703125, -0.0177459716796875, 0.00982666015625, -0.0144805908203125, 0.00571441650390625, -0.027740478515625, -0.017913818359375, -0.01125335693359375, 0.05096435546875, 0.03857421875, 0.04913330078125, -0.00939178466796875, 0.022247314453125, 0.037689208984375, 0.01465606689453125, 0.0016918182373046875, 0.025299072265625, -0.037689208984375, 0.0543212890625, 0.00388336181640625, 0.0024433135986328125, -0.01129913330078125, -0.007106781005859375, -0.0179443359375, 0.013702392578125, -0.00765228271484375, -0.0274658203125, 0.0313720703125, 0.01250457763671875, -0.0160675048828125, -0.0016946792602539062, 0.0147857666015625, -0.0033092498779296875, -0.01068878173828125, -0.018798828125, -0.0201568603515625, -0.0018510818481445312, -0.047088623046875, 0.0180206298828125, 0.030487060546875, -0.0119171142578125, 0.0447998046875, -0.0364990234375, 0.00966644287109375, -0.0218505859375, 0.0010881423950195312, 0.01873779296875, 0.014312744140625, -0.019012451171875, 0.037200927734375, 0.01035308837890625, -0.005290985107421875, -0.045745849609375, 0.004184722900390625, -0.0330810546875, -0.0290679931640625, 0.02056884765625, 0.044403076171875, -0.034027099609375, 0.005523681640625, -0.0012483596801757812, -0.01480865478515625, -0.033935546875, 0.024169921875, 0.0248565673828125, -0.04840087890625, -0.019256591796875, -0.0234832763671875, -0.0170440673828125, 0.027740478515625, -0.03375244140625, 0.0101470947265625, -0.0255584716796875, 0.0159759521484375, -0.016357421875, -0.01503753662109375, 0.02099609375, 0.012725830078125, -0.0284271240234375, -0.04986572265625, -0.02484130859375, -0.00772857666015625, 0.00609588623046875, -0.00862884521484375, 0.01312255859375, 0.0638427734375, 0.00620269775390625, 0.0127105712890625, -0.0404052734375, 0.0027065277099609375, -0.05767822265625, 0.001678466796875, 0.0097808837890625, -0.01654052734375, -0.01079559326171875, -0.005130767822265625, -0.0310821533203125, -0.006671905517578125, -0.0205078125, -0.027557373046875, -0.039520263671875, -0.0201568603515625, -0.00681304931640625, 0.0233154296875, -0.0191650390625, 0.002941131591796875, 0.01216888427734375, 0.012542724609375, -0.0096588134765625, 0.06884765625, 0.02691650390625, 0.032989501953125, -0.0340576171875, 0.04473876953125, 0.01001739501953125, -0.0048675537109375, -0.025421142578125, -0.0311126708984375, -0.038055419921875, -0.048736572265625, 0.007419586181640625, 0.00966644287109375, 0.01073455810546875, 0.05322265625, 0.05255126953125, 0.012054443359375, 0.01038360595703125, -0.02886962890625, -0.0023555755615234375, -0.0330810546875, 0.01323699951171875, -0.051055908203125, -0.02471923828125, 0.01934814453125, -0.028533935546875, 0.0129547119140625, 0.004657745361328125, -0.00914764404296875, 0.01113128662109375, -0.01617431640625, -0.006317138671875, 0.04425048828125, 0.000029325485229492188, 0.023468017578125, 0.060760498046875, -0.00365447998046875, 0.047882080078125, 0.0212554931640625, 0.011871337890625, 0.055938720703125, -0.01605224609375, 0.00795745849609375, 0.0183563232421875, 0.057861328125, 0.0031414031982421875, -0.0006313323974609375, 0.05035400390625, -0.0189208984375, 0.0195770263671875, -0.0120697021484375, 0.0634765625, 0.003078460693359375, 0.006641387939453125, 0.0117034912109375, -0.04290771484375, 0.032012939453125, 0.01180267333984375, -0.0050506591796875, 0.00408935546875, -0.006145477294921875, -0.03192138671875, -0.026458740234375, -0.002086639404296875, 0.005130767822265625, 0.00927734375, 0.03118896484375, 0.0197296142578125, -0.0017728805541992188, -0.07611083984375, -0.0195770263671875, 0.027252197265625, 0.00804901123046875, -0.03033447265625, 0.008880615234375, -0.011505126953125, -0.0236053466796875, -0.0421142578125, -0.004695892333984375, 0.006717681884765625, 0.01519775390625, -0.0284881591796875, -0.0330810546875, 0.0440673828125, 0.02777099609375, -0.006008148193359375, -0.0277862548828125, 0.012420654296875, -0.0238800048828125, -0.00753021240234375, 0.0019273757934570312, 0.00010001659393310547, 0.0172119140625, -0.0194091796875, 0.0098876953125, -0.023651123046875, 0.033538818359375, -0.01540374755859375, 0.0104827880859375, 0.0572509765625, -0.005382537841796875, -0.043487548828125, 0.046356201171875, 0.034820556640625, -0.03778076171875, 0.005558013916015625, -0.0278472900390625, -0.0697021484375, -0.058563232421875, -0.0273284912109375, -0.0946044921875, 0.0008597373962402344, -0.038818359375, -0.0753173828125, 0.08648681640625, -0.015777587890625, 0.0301055908203125, -0.01549530029296875, 0.043487548828125, -0.01399993896484375, 0.0123291015625, -0.03863525390625, 0.0179290771484375, -0.00044035911560058594, 0.026580810546875, -0.019989013671875, 0.01329803466796875, -0.0002027750015258789, 0.004535675048828125, 0.034423828125, 0.0205078125, -0.06689453125, -0.0164337158203125, 0.020599365234375, 0.022369384765625, 0.0095367431640625, 0.061859130859375, 0.01082611083984375, 0.02337646484375, 0.051605224609375, -0.035186767578125, 0.020904541015625, -0.003856658935546875, 0.0046539306640625, 0.03558349609375, 0.018096923828125, 0.01467132568359375, 0.06689453125, 0.0158233642578125, -0.04083251953125, 0.0423583984375, 0.036346435546875, -0.04888916015625, -0.03759765625, 0.059326171875, 0.0158843994140625, -0.03863525390625, -0.050628662109375, -0.02978515625, 0.0242462158203125, 0.006908416748046875, 0.039947509765625, 0.0083465576171875, 0.01100921630859375, 0.006870269775390625, 0.01102447509765625, 0.02734375, 0.0372314453125, -0.0246124267578125, 0.007965087890625, -0.007732391357421875, 0.0161895751953125, -0.07086181640625, -0.03692626953125, 0.053680419921875, 0.0341796875, -0.00438690185546875, -0.0009412765502929688, 0.0128326416015625, 0.00466156005859375, 0.00353240966796875, -0.0295562744140625, -0.0006656646728515625, -0.0253143310546875, -0.007080078125, -0.053497314453125, 0.01490020751953125, 0.03607177734375, 0.036590576171875, -0.00826263427734375, -0.0302734375, -0.040283203125, 0.0021991729736328125, -0.03253173828125, -0.0206451416015625, 0.007617950439453125, 0.0325927734375, 0.03997802734375, 0.0214996337890625, 0.0243682861328125, -0.01136016845703125, -0.0019292831420898438, -0.02679443359375, -0.0241241455078125, 0.0147857666015625, 0.00188446044921875, -0.000010132789611816406, -0.0008988380432128906, 0.0254058837890625, 0.025970458984375, 0.00275421142578125, 0.033966064453125, 0.0106201171875, -0.0379638671875, -0.006359100341796875, 0.01195526123046875, -0.0242767333984375, 0.0251007080078125, -0.0350341796875, 0.036376953125, 0.0181121826171875, 0.008056640625, -0.0146636962890625, -0.00493621826171875, 0.056396484375, -0.061492919921875, 0.03997802734375, -0.023773193359375, -0.0209808349609375, 0.050628662109375, -0.0223388671875, 0.047088623046875, -0.0194244384765625, -0.107666015625, -0.0092926025390625, -0.0129241943359375, -0.09747314453125, 0.037261962890625, 0.045654296875, -0.031402587890625, -0.00800323486328125, -0.0189361572265625, -0.009765625, 0.0020503997802734375, 0.0160064697265625, -0.025787353515625, 0.006378173828125, 0.02496337890625, -0.01088714599609375, 0.016387939453125, -0.0055389404296875, -0.008819580078125, 0.06463623046875, 0.01396942138671875, 0.007633209228515625, -0.0380859375, 0.045745849609375, 0.00795745849609375, 0.039306640625, -0.049041748046875, -0.005619049072265625, 0.0303802490234375, -0.0241851806640625, 0.0108489990234375, -0.006870269775390625, 0.002704620361328125, 0.016754150390625, 0.02923583984375, -0.04534912109375, -0.005046844482421875, 0.0144195556640625, 0.003955841064453125, -0.004169464111328125, 0.0421142578125, -0.0162353515625, 0.0241241455078125, -0.0192108154296875, -0.06304931640625, 0.06805419921875, 0.007450103759765625, 0.03106689453125, 0.035736083984375, 0.038421630859375, 0.01515960693359375, 0.041229248046875, -0.0338134765625, 0.058074951171875, 0.03704833984375, -0.03765869140625, -0.023529052734375, 0.0221405029296875, -0.0079193115234375, 0.0152740478515625, 0.01093292236328125, 0.03277587890625, 0.0028247833251953125, -0.060455322265625, 0.028533935546875, 0.02508544921875, 0.048431396484375, -0.022125244140625, 0.002498626708984375, 0.02276611328125, 0.001888275146484375, -0.00966644287109375, 0.02056884765625, -0.014007568359375, -0.038299560546875, -0.0173492431640625, 0.00536346435546875, -0.006031036376953125, -0.047393798828125, -0.04412841796875, -0.03009033203125, 0.0161285400390625, 0.0206756591796875, -0.06671142578125, -0.00931549072265625, 0.037139892578125, 0.050872802734375, -0.012908935546875, -0.006549835205078125, -0.02410888671875, -0.0277252197265625, -0.0251617431640625, -0.066650390625, -0.05609130859375, 0.055511474609375, -0.04852294921875, 0.03204345703125, 0.06951904296875, -0.034881591796875, -0.0543212890625, 0.0137176513671875, 0.0240020751953125, 0.06341552734375, -0.04095458984375, -0.039093017578125, 0.0011777877807617188, -0.00701904296875, -0.0202789306640625, -0.01230621337890625, 0.0217132568359375, -0.04888916015625, -0.019287109375, 0.01218414306640625, -0.0114898681640625, 0.0014619827270507812, -0.041961669921875, -0.07586669921875, 0.023681640625, 0.00684356689453125, -0.033843994140625, -0.04827880859375, 0.005062103271484375, -0.001819610595703125, 0.01515960693359375, -0.006168365478515625, -0.03790283203125, -0.012969970703125, 0.0277862548828125, -0.008087158203125, 0.002582550048828125, 0.0170135498046875, -0.045074462890625, -0.01233673095703125, 0.00121307373046875, 0.0196990966796875, -0.0175323486328125, 0.00206756591796875, -0.0133056640625, 0.0258941650390625, 0.032379150390625, -0.0272369384765625, -0.051910400390625, -0.0033817291259765625, -0.0307159423828125, 0.0060882568359375, -0.0271148681640625, -0.049652099609375, -0.0265655517578125, 0.0841064453125, 0.0260162353515625, 0.034637451171875, -0.01258087158203125, 0.0606689453125, -0.038604736328125, -0.028778076171875, -0.000865936279296875, -0.00563812255859375, -0.00138092041015625, 0.00042319297790527344, 0.01849365234375, 0.02691650390625, -0.004573822021484375, 0.0020503997802734375, 0.01346588134765625, -0.03265380859375, 0.038482666015625, -0.00884246826171875, -0.0143280029296875, -0.001987457275390625, 0.058074951171875, -0.03851318359375, 0.0101776123046875, 0.00994110107421875, -0.0071868896484375, 0.030426025390625, 0.03118896484375, -0.002628326416015625, -0.025970458984375, -0.0177154541015625, 0.040771484375, 0.0029659271240234375, 0.01479339599609375, -0.0318603515625, -0.0211334228515625, 0.0010700225830078125, 0.0209503173828125, -0.0214691162109375, 0.0142059326171875, 0.001453399658203125, 0.037078857421875, -0.005390167236328125, 0.056854248046875, -0.0498046875, -0.0280303955078125, -0.00484466552734375, -0.018585205078125, -0.0224151611328125, 0.016693115234375, 0.046783447265625, -0.0190582275390625, 0.0163726806640625, -0.0318603515625, -0.004795074462890625, -0.0046539306640625, -0.0038127899169921875, -0.048919677734375, -0.0216064453125, 0.005039215087890625 ]
30b2654413690a5cb705c3e0b3a958966548e222
Wordpress Stackexchange Q: How to Validate Widget Input I have been working with widgets and widgets API. I see that the widget form is rendered and processed through widget() function. I can write validation logic inside the widget() function. I will do a isset($_POST) check and write the form handling logic in it. Something like this: function widget($args){ extract($args); is isset(){$_POST['fieldname'] { // form processing logic } // echo HTML Form } I would like to separate the form processing logic from the widget function. How can I achieve this? Is there a standard way for doing this? A: If you are using the Widget API then declare your widget as a class which extends WP_Widget class and there you can define an upadte function where you can do your validation, the codex as a nice example of doing just that.
Q: How to Validate Widget Input I have been working with widgets and widgets API. I see that the widget form is rendered and processed through widget() function. I can write validation logic inside the widget() function. I will do a isset($_POST) check and write the form handling logic in it. Something like this: function widget($args){ extract($args); is isset(){$_POST['fieldname'] { // form processing logic } // echo HTML Form } I would like to separate the form processing logic from the widget function. How can I achieve this? Is there a standard way for doing this? A: If you are using the Widget API then declare your widget as a class which extends WP_Widget class and there you can define an upadte function where you can do your validation, the codex as a nice example of doing just that.
wordpress
{ "language": "en", "length": 139, "provenance": "stackexchange_00019.jsonl.gz:413125", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28751" }
[ 0.06610107421875, -0.029632568359375, -0.0313720703125, -0.0714111328125, 0.00939178466796875, -0.040374755859375, 0.006793975830078125, 0.021392822265625, 0.0032978057861328125, 0.021759033203125, -0.01189422607421875, -0.00998687744140625, -0.02880859375, -0.024810791015625, -0.03704833984375, -0.036285400390625, -0.00283050537109375, 0.0305633544921875, 0.0275726318359375, -0.024139404296875, 0.0237884521484375, -0.019073486328125, -0.03125, 0.00031828880310058594, 0.0194244384765625, -0.018646240234375, 0.01806640625, 0.0003066062927246094, -0.00868988037109375, -0.0147247314453125, 0.02069091796875, 0.004634857177734375, -0.0015163421630859375, 0.0291595458984375, -0.023529052734375, 0.0008511543273925781, 0.02392578125, 0.01207733154296875, 0.0112152099609375, 0.04962158203125, 0.033538818359375, -0.01361846923828125, -0.051910400390625, 0.006832122802734375, -0.04022216796875, -0.04193115234375, 0.0207366943359375, -0.0244140625, 0.061737060546875, 0.0382080078125, 0.0003714561462402344, -0.00618743896484375, 0.0018215179443359375, -0.027008056640625, -0.025177001953125, -0.03497314453125, -0.0199127197265625, -0.062744140625, 0.045684814453125, 0.04339599609375, -0.01580810546875, -0.06536865234375, 0.022308349609375, -0.06439208984375, 0.001399993896484375, -0.0031642913818359375, -0.0254364013671875, 0.0121612548828125, 0.0250091552734375, 0.0093841552734375, 0.002872467041015625, -0.019561767578125, -0.0121612548828125, 0.0132598876953125, 0.022186279296875, -0.03594970703125, -0.0078125, -0.0265045166015625, 0.0167388916015625, 0.041473388671875, 0.04754638671875, 0.0158843994140625, -0.02349853515625, 0.003482818603515625, 0.02435302734375, 0.042266845703125, 0.0010976791381835938, -0.036468505859375, -0.01605224609375, -0.0179595947265625, -0.0059967041015625, -0.03717041015625, -0.0038433074951171875, -0.00801849365234375, 0.01180267333984375, -0.04937744140625, 0.0255279541015625, -0.0232391357421875, 0.0240631103515625, 0.027252197265625, 0.038818359375, -0.0679931640625, 0.07501220703125, -0.0276336669921875, 0.00027561187744140625, 0.055694580078125, 0.005344390869140625, -0.0589599609375, -0.0041656494140625, -0.004360198974609375, 0.00677490234375, -0.005889892578125, -0.0048065185546875, -0.04681396484375, -0.02239990234375, 0.01959228515625, -0.0029048919677734375, -0.0273590087890625, 0.024078369140625, -0.06048583984375, 0.00341796875, 0.00870513916015625, 0.048248291015625, -0.033111572265625, 0.0435791015625, 0.02252197265625, -0.0249786376953125, -0.038238525390625, 0.03863525390625, -0.0085601806640625, -0.030517578125, 0.021484375, 0.0308074951171875, 0.005420684814453125, 0.00907135009765625, -0.004131317138671875, 0.038482666015625, -0.0005097389221191406, 0.012359619140625, 0.0099029541015625, 0.0313720703125, -0.039642333984375, -0.035064697265625, 0.0238037109375, 0.0216522216796875, 0.0738525390625, 0.02734375, -0.044677734375, -0.0252532958984375, -0.0687255859375, 0.00997161865234375, -0.0672607421875, 0.01187896728515625, 0.027862548828125, 0.0278778076171875, 0.00550079345703125, 0.044677734375, -0.0208282470703125, -0.023345947265625, -0.0167388916015625, -0.0151519775390625, -0.02587890625, -0.0001819133758544922, -0.0693359375, -0.0565185546875, 0.013885498046875, -0.03802490234375, 0.009552001953125, 0.022857666015625, 0.02734375, -0.0222625732421875, 0.0018415451049804688, -0.006465911865234375, 0.01001739501953125, -0.00518798828125, 0.022552490234375, -0.01438140869140625, 0.0020961761474609375, 0.01137542724609375, 0.0178985595703125, -0.022674560546875, -0.04412841796875, 0.00615692138671875, 0.00350189208984375, -0.045257568359375, 0.0294189453125, 0.024444580078125, 0.0657958984375, 0.0041351318359375, 0.0199737548828125, 0.033416748046875, 0.0008988380432128906, -0.02398681640625, -0.004070281982421875, -0.0171661376953125, -0.032958984375, 0.00664520263671875, -0.0157623291015625, -0.01506805419921875, 0.03564453125, 0.0090789794921875, -0.0171661376953125, -0.0012292861938476562, -0.005397796630859375, -0.00907135009765625, -0.01641845703125, -0.006130218505859375, 0.0105133056640625, -0.032745361328125, 0.034393310546875, 0.036956787109375, 0.0028400421142578125, -0.0462646484375, 0.038909912109375, 0.01554107666015625, -0.037750244140625, 0.009490966796875, 0.06378173828125, 0.007778167724609375, 0.02264404296875, -0.0085906982421875, -0.047332763671875, -0.00394439697265625, -0.0022125244140625, 0.02947998046875, -0.00069427490234375, -0.013214111328125, -0.0177001953125, 0.0225067138671875, 0.0034618377685546875, -0.0010852813720703125, 0.0303497314453125, 0.00774383544921875, 0.0191802978515625, -0.03204345703125, -0.0294036865234375, -0.0491943359375, -0.062347412109375, 0.0021514892578125, 0.05975341796875, 0.0241851806640625, 0.009002685546875, -0.0208587646484375, 0.0255126953125, 0.006160736083984375, -0.10882568359375, -0.0213165283203125, 0.0301971435546875, 0.0174102783203125, 0.049468994140625, -0.06524658203125, 0.00661468505859375, 0.0272674560546875, -0.04931640625, 0.005641937255859375, 0.0428466796875, -0.028594970703125, -0.00949859619140625, -0.021240234375, 0.0338134765625, -0.010650634765625, -0.0606689453125, -0.00878143310546875, -0.045989990234375, 0.02728271484375, 0.0018177032470703125, 0.041015625, 0.0224761962890625, -0.008026123046875, -0.00478363037109375, 0.00811004638671875, -0.0295257568359375, 0.009124755859375, 0.0152130126953125, 0.01276397705078125, 0.007450103759765625, -0.004016876220703125, -0.01219940185546875, 0.013763427734375, -0.006198883056640625, -0.00756072998046875, 0.044647216796875, 0.0285797119140625, 0.004589080810546875, -0.045867919921875, -0.04925537109375, 0.052093505859375, 0.055694580078125, 0.049468994140625, 0.0149993896484375, 0.0257568359375, 0.0216217041015625, 0.009552001953125, 0.023468017578125, 0.0433349609375, -0.039947509765625, -0.0287017822265625, 0.04217529296875, -0.010986328125, -0.00795745849609375, -0.0172119140625, 0.02508544921875, -0.00011944770812988281, -0.00951385498046875, -0.005168914794921875, 0.0023441314697265625, -0.01241302490234375, 0.031341552734375, 0.01436614990234375, -0.00921630859375, -0.0247650146484375, 0.035247802734375, 0.0277099609375, 0.07763671875, 0.0052642822265625, -0.0394287109375, 0.011444091796875, 0.055572509765625, -0.0303955078125, -0.04443359375, -0.041778564453125, -0.04925537109375, -0.00296783447265625, 0.003810882568359375, -0.0135040283203125, 0.01593017578125, 0.0148162841796875, 0.0084686279296875, -0.01052093505859375, 0.00954437255859375, -0.062744140625, -0.01398468017578125, -0.051971435546875, 0.0307159423828125, -0.029266357421875, 0.022125244140625, 0.00022161006927490234, 0.052337646484375, -0.01050567626953125, -0.09490966796875, -0.03076171875, 0.0019969940185546875, 0.00673675537109375, 0.038604736328125, -0.07208251953125, -0.00653076171875, 0.00331878662109375, -0.013397216796875, -0.004390716552734375, -0.0238189697265625, 0.046539306640625, 0.005367279052734375, 0.01214599609375, -0.013519287109375, -0.0002849102020263672, 0.039825439453125, -0.00817108154296875, -0.04327392578125, -0.0019588470458984375, -0.059814453125, 0.002338409423828125, 0.032501220703125, -0.004878997802734375, -0.046173095703125, -0.03546142578125, -0.0190887451171875, 0.032379150390625, 0.0030536651611328125, 0.0247344970703125, -0.0031948089599609375, -0.005970001220703125, -0.01351165771484375, 0.052215576171875, 0.013275146484375, 0.029571533203125, 0.0011444091796875, 0.03289794921875, -0.0203704833984375, 0.00029730796813964844, 0.0153045654296875, -0.0175323486328125, -0.00527191162109375, 0.00798797607421875, 0.015350341796875, -0.05224609375, 0.0232696533203125, -0.029998779296875, 0.01277923583984375, -0.00490570068359375, 0.01110076904296875, 0.0223846435546875, 0.06500244140625, -0.0002837181091308594, -0.018524169921875, -0.0107421875, 0.02777099609375, -0.0699462890625, -0.04827880859375, -0.0162506103515625, -0.00444793701171875, -0.0364990234375, 0.007572174072265625, 0.0031185150146484375, -0.01094818115234375, -0.02740478515625, -0.00183868408203125, -0.040313720703125, -0.0220489501953125, 0.044677734375, -0.1011962890625, 0.05322265625, 0.029571533203125, 0.03680419921875, -0.01120758056640625, -0.0126495361328125, -0.068359375, -0.04608154296875, 0.0041656494140625, -0.03131103515625, 0.029205322265625, 0.0082550048828125, -0.0105743408203125, -0.016082763671875, 0.0158233642578125, -0.01049041748046875, -0.0345458984375, 0.0150299072265625, 0.01727294921875, -0.01549530029296875, 0.01055145263671875, -0.012451171875, -0.01446533203125, -0.00270843505859375, -0.0006041526794433594, -0.06060791015625, -0.0006351470947265625, -0.02679443359375, -0.0283355712890625, 0.01264190673828125, -0.03179931640625, 0.0009598731994628906, -0.040771484375, -0.06488037109375, 0.01593017578125, -0.04974365234375, 0.0189056396484375, -0.043212890625, -0.0277099609375, 0.025543212890625, -0.00554656982421875, 0.00156402587890625, 0.0119171142578125, 0.11541748046875, 0.0170135498046875, -0.004985809326171875, -0.0794677734375, -0.033935546875, 0.046478271484375, 0.0027713775634765625, -0.01461029052734375, -0.0086669921875, -0.056976318359375, 0.07281494140625, 0.02227783203125, -0.02374267578125, 0.0261688232421875, 0.03662109375, 0.03778076171875, 0.003650665283203125, -0.03680419921875, 0.0214385986328125, -0.01526641845703125, 0.0208892822265625, 0.01242828369140625, -0.00380706787109375, 0.06024169921875, -0.00760650634765625, -0.04205322265625, 0.0099029541015625, 0.025909423828125, -0.02557373046875, -0.0023593902587890625, -0.015960693359375, 0.01117706298828125, -0.0079498291015625, 0.0176849365234375, -0.0211334228515625, 0.031494140625, -0.0063629150390625, 0.007274627685546875, 0.0311279296875, -0.01119232177734375, 0.0245513916015625, 0.00843048095703125, -0.01239776611328125, -0.033905029296875, -0.01422882080078125, 0.03155517578125, 0.01471710205078125, -0.022369384765625, 0.01495361328125, -0.019195556640625, 0.01226806640625, -0.003330230712890625, 0.032135009765625, 0.0011348724365234375, -0.002410888671875, -0.03350830078125, -0.0008387565612792969, 0.044586181640625, -0.0127716064453125, -0.0306243896484375, -0.07403564453125, -0.0033054351806640625, -0.044097900390625, -0.0018568038940429688, -0.031646728515625, -0.037017822265625, -0.022857666015625, -0.004913330078125, 0.06683349609375, 0.0679931640625, 0.0305938720703125, 0.03302001953125, -0.03118896484375, -0.007068634033203125, -0.018035888671875, -0.024505615234375, -0.03900146484375, -0.054656982421875, 0.030242919921875, 0.0257415771484375, -0.01206207275390625, 0.0251007080078125, 0.005809783935546875, 0.049652099609375, -0.0132293701171875, -0.005031585693359375, -0.0226593017578125, -0.02294921875, -0.0092620849609375, -0.0019683837890625, 0.0168914794921875, 0.01186370849609375, -0.0247650146484375, 0.0183563232421875, -0.03997802734375, 0.0081024169921875, 0.01474761962890625, -0.0057525634765625, 0.0149993896484375, 0.0057373046875, 0.00966644287109375, -0.0188140869140625, -0.03515625, -0.07501220703125, -0.0163726806640625, 0.0011415481567382812, 0.0017118453979492188, 0.0228271484375, -0.037628173828125, 0.037322998046875, -0.061737060546875, 0.0396728515625, -0.0262908935546875, 0.0193634033203125, 0.0126800537109375, 0.00021183490753173828, -0.030303955078125, -0.02960205078125, -0.0501708984375, -0.0286102294921875, -0.048431396484375, -0.035736083984375, -0.031341552734375, 0.02728271484375, -0.005802154541015625, 0.0230865478515625, 0.0014638900756835938, 0.0059814453125, 0.002292633056640625, 0.008209228515625, -0.0103302001953125, 0.0063934326171875, -0.03228759765625, 0.09356689453125, -0.01134490966796875, 0.07196044921875, -0.023712158203125, -0.004680633544921875, -0.055206298828125, 0.0227203369140625, 0.0015668869018554688, -0.050323486328125, -0.0245819091796875, -0.0025310516357421875, -0.0264434814453125, 0.012115478515625, 0.01540374755859375, -0.00954437255859375, 0.028778076171875, -0.035675048828125, -0.016510009765625, -0.0208740234375, 0.048004150390625, -0.0421142578125, 0.0223541259765625, 0.00787353515625, -0.006839752197265625, -0.04241943359375, -0.0032711029052734375, -0.01551055908203125, 0.042205810546875, 0.0291900634765625, 0.0222930908203125, -0.04742431640625, -0.035064697265625, 0.06439208984375, 0.0279083251953125, 0.0045928955078125, 0.035308837890625, 0.0166015625, 0.0237274169921875, 0.0004203319549560547, 0.024078369140625, -0.0225830078125, -0.031097412109375, 0.049591064453125, 0.015777587890625, -0.0081787109375, 0.035400390625, -0.01959228515625, 0.0167999267578125, 0.06658935546875, 0.08056640625, -0.10791015625, 0.0233917236328125, 0.033966064453125, -0.00844573974609375, -0.007781982421875, -0.005588531494140625, 0.0006918907165527344, -0.0008573532104492188, 0.035308837890625, 0.03485107421875, -0.01059722900390625, 0.04052734375, 0.0076751708984375, 0.01812744140625, -0.015899658203125, 0.07684326171875, 0.0159912109375, -0.052978515625, -0.003589630126953125, 0.026611328125, 0.0080718994140625, 0.02008056640625, 0.0217437744140625, -0.01290130615234375, -0.0216217041015625, -0.043853759765625, -0.01403045654296875, -0.025970458984375, -0.057037353515625, 0.004764556884765625, -0.0055694580078125, 0.0777587890625, 0.049468994140625, 0.00511932373046875, 0.0021266937255859375, -0.0056915283203125, 0.08233642578125, -0.0146636962890625, -0.03240966796875, -0.0239715576171875, 0.0225830078125, -0.0224609375, 0.017852783203125, -0.01221466064453125, -0.008453369140625, -0.0006089210510253906, -0.023345947265625, 0.05352783203125, -0.0127716064453125, -0.03076171875, 0.004352569580078125, -0.00737762451171875, 0.01531219482421875, -0.018280029296875, 0.008544921875, -0.060516357421875, -0.0107421875, -0.01739501953125, -0.035003662109375, 0.0015211105346679688, -0.05364990234375, -0.08197021484375, 0.10302734375, 0.073974609375, 0.031890869140625, 0.005725860595703125, 0.022064208984375, -0.059326171875, -0.003368377685546875, -0.048828125, 0.035247802734375, -0.018157958984375, 0.0169219970703125, -0.04022216796875, 0.01219940185546875, -0.0280609130859375, -0.0076141357421875, 0.00890350341796875, -0.00804901123046875, 0.0210723876953125, -0.01073455810546875, 0.036376953125, 0.06976318359375, 0.0156402587890625, -0.0060577392578125, 0.0282440185546875, 0.03271484375, 0.0386962890625, -0.000560760498046875, 0.042388916015625, -0.03729248046875, -0.005992889404296875, 0.051727294921875, 0.0141754150390625, 0.0095977783203125, -0.01459503173828125, 0.01812744140625, 0.0218048095703125, -0.035980224609375, -0.0140228271484375, -0.00327301025390625, -0.01187896728515625, 0.080322265625, 0.0469970703125, -0.005367279052734375, -0.0035381317138671875, -0.043853759765625, 0.04815673828125, -0.0016918182373046875, 0.0263214111328125, 0.0188446044921875, 0.01708984375, 0.041595458984375, 0.0313720703125, 0.024139404296875, 0.050689697265625, -0.0280303955078125, 0.04779052734375, 0.02691650390625, 0.044921875, -0.01251983642578125, 0.01119232177734375, -0.0101318359375, 0.03057861328125, -0.035369873046875, -0.03192138671875, 0.00760650634765625, -0.0029163360595703125, -0.00433349609375, 0.0035037994384765625, 0.03692626953125, -0.01042938232421875, 0.00047707557678222656, -0.00299835205078125, -0.02398681640625, 0.005992889404296875, 0.021697998046875, -0.0001862049102783203, 0.004119873046875, 0.0027008056640625, -0.023681640625, -0.02508544921875, -0.0162506103515625, 0.031646728515625, 0.06982421875, -0.005542755126953125, 0.035125732421875, -0.0401611328125, -0.0107574462890625, -0.004428863525390625, -0.006011962890625, 0.0166015625, 0.0009045600891113281, 0.0014247894287109375, 0.00818634033203125, 0.03387451171875, 0.00592041015625, -0.003570556640625, 0.0206451416015625, 0.0390625, 0.0168609619140625, -0.026031494140625, -0.0155487060546875, 0.02459716796875, -0.0237579345703125, -0.016204833984375, -0.03472900390625, -0.00951385498046875, 0.006683349609375, -0.0114288330078125, -0.004444122314453125, 0.028167724609375, -0.003932952880859375, -0.02044677734375, 0.053741455078125, -0.007259368896484375, -0.00153350830078125, 0.049224853515625, -0.054412841796875, 0.07147216796875, -0.00963592529296875, -0.06463623046875, -0.023468017578125, 0.033447265625, -0.029876708984375, 0.01187896728515625, 0.043792724609375, -0.0283966064453125, 0.005268096923828125, 0.0229949951171875, -0.039093017578125, 0.024688720703125, 0.0102081298828125, 0.006420135498046875, -0.005641937255859375, 0.00662994384765625, -0.0034332275390625, -0.01323699951171875, 0.0034275054931640625, 0.0164794921875, 0.0270538330078125, 0.00464630126953125, 0.036651611328125, -0.002178192138671875, 0.01428985595703125, -0.007465362548828125, 0.0010890960693359375, -0.013702392578125, -0.03106689453125, 0.06707763671875, -0.0017156600952148438, -0.0290374755859375, -0.009124755859375, 0.01824951171875, 0.0249176025390625, 0.00786590576171875, -0.04058837890625, 0.025604248046875, -0.058990478515625, 0.0130157470703125, -0.00048732757568359375, 0.03131103515625, -0.00711822509765625, -0.0101470947265625, 0.01556396484375, 0.0153961181640625, 0.0291900634765625, 0.07232666015625, 0.0017919540405273438, 0.01220703125, -0.01910400390625, -0.01033782958984375, 0.0022563934326171875, -0.0142364501953125, -0.0185394287109375, 0.0205078125, -0.0263214111328125, -0.00492095947265625, -0.0237884521484375, -0.0215606689453125, -0.0240020751953125, 0.0138702392578125, -0.021942138671875, -0.00496673583984375, 0.00839996337890625, -0.00754547119140625, 0.038818359375, 0.0013294219970703125, -0.051483154296875, -0.0030841827392578125, 0.0609130859375, -0.04278564453125, 0.00923919677734375, -0.05645751953125, -0.0174560546875, -0.06402587890625, 0.0008344650268554688, 0.032318115234375, -0.016082763671875, 0.01287078857421875, -0.005252838134765625, 0.0242919921875, -0.0011110305786132812, -0.0125579833984375, -0.0216064453125, 0.00583648681640625, -0.035400390625, 0.061798095703125, -0.045928955078125, 0.0199737548828125, 0.01287078857421875, 0.028472900390625, -0.06378173828125, 0.007663726806640625, -0.0233306884765625, -0.020233154296875, -0.01284027099609375, 0.0284423828125, 0.036407470703125, -0.04364013671875, -0.049835205078125, 0.041046142578125, 0.058990478515625, 0.0811767578125, 0.048828125, -0.002468109130859375, 0.0391845703125, 0.0110931396484375, -0.01070404052734375, -0.06756591796875, -0.01617431640625, -0.00505828857421875, 0.03997802734375, -0.0153961181640625, -0.0289764404296875, -0.0272979736328125, -0.0487060546875, -0.08514404296875, 0.07489013671875, -0.011810302734375, -0.0193634033203125, -0.00766754150390625, -0.01404571533203125, -0.0008754730224609375, 0.0146484375, 0.0017004013061523438, -0.022186279296875, -0.01354217529296875, 0.00881195068359375, 0.01482391357421875, 0.0103759765625, 0.03253173828125, 0.01413726806640625, -0.06927490234375, -0.0174407958984375, -0.041168212890625, 0.04425048828125, -0.0114593505859375, -0.0153656005859375, 0.007450103759765625, 0.0034847259521484375, -0.04730224609375, -0.0369873046875, 0.007793426513671875, 0.05499267578125, -0.002841949462890625, -0.00827789306640625, -0.04888916015625, -0.0243377685546875, 0.056427001953125, 0.054107666015625, 0.0216522216796875, -0.013580322265625, -0.017913818359375, 0.0440673828125, -0.033233642578125, -0.0273284912109375, 0.0152130126953125, -0.05902099609375, -0.0266571044921875, -0.04132080078125, 0.04052734375, 0.0198822021484375, -0.009552001953125, 0.034149169921875, -0.036590576171875, 0.0477294921875, 0.0036163330078125, 0.005893707275390625, -0.04791259765625, 0.0347900390625, -0.0250396728515625, 0.020660400390625, -0.01849365234375, 0.044708251953125, 0.01506805419921875, 0.007282257080078125, 0.00775146484375, 0.02484130859375, -0.060577392578125, 0.00007128715515136719, -0.003406524658203125, 0.03875732421875, -0.0305633544921875, -0.01273345947265625, -0.034881591796875, 0.0106353759765625, 0.01568603515625, 0.0009675025939941406, -0.009124755859375, 0.0179443359375, 0.0205535888671875, 0.0184478759765625, -0.04461669921875, 0.00830078125, -0.0255126953125, 0.0217132568359375, 0.0179290771484375, 0.00452423095703125, 0.08331298828125, -0.0239410400390625, 0.007537841796875, 0.0176849365234375, 0.003002166748046875, -0.0271453857421875, 0.0203704833984375, 0.005649566650390625, 0.0216217041015625, 0.0121307373046875 ]
5184327857d3e2ecc3b2b7aef2a0aae126a30dfa
Wordpress Stackexchange Q: Action wp_login_failed not working if only one field is filled out I created a login form in the frontend with wp_login_form(). In my functions.php file I added an action to prevent the redirect to /wp-login.php if the login failed with add_action('wp_login_failed', …. As it turns out the action only hooks if the username and password fields are filled in. If one of them is left empty I still get redirected to wp-login.php. Is there a possibility to check if both fields are filled in to prevent the redirect? Thanks Julian A: Add this filter to change how blank username/password is treated: add_filter( 'authenticate', 'custom_authenticate_username_password', 30, 3); function custom_authenticate_username_password( $user, $username, $password ) { if ( is_a($user, 'WP_User') ) { return $user; } if ( empty($username) || empty($password) ) { $error = new WP_Error(); $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.')); return $error; } } And then your original redirect on wp_login_failed will work with blank username/password as well.
Q: Action wp_login_failed not working if only one field is filled out I created a login form in the frontend with wp_login_form(). In my functions.php file I added an action to prevent the redirect to /wp-login.php if the login failed with add_action('wp_login_failed', …. As it turns out the action only hooks if the username and password fields are filled in. If one of them is left empty I still get redirected to wp-login.php. Is there a possibility to check if both fields are filled in to prevent the redirect? Thanks Julian A: Add this filter to change how blank username/password is treated: add_filter( 'authenticate', 'custom_authenticate_username_password', 30, 3); function custom_authenticate_username_password( $user, $username, $password ) { if ( is_a($user, 'WP_User') ) { return $user; } if ( empty($username) || empty($password) ) { $error = new WP_Error(); $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.')); return $error; } } And then your original redirect on wp_login_failed will work with blank username/password as well. A: The problem lies with the function wp_authenticate() (found in the file pluggable.php) You have 2 options. * *hack the wordpress core (not advised!) *write your own plugin that overrides wp_authenticate() (this is merely deleting a few characters in an if statement).
wordpress
{ "language": "en", "length": 204, "provenance": "stackexchange_00019.jsonl.gz:413137", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28786" }
[ 0.07159423828125, 0.0007901191711425781, 0.0009927749633789062, -0.038726806640625, 0.01342010498046875, -0.044921875, 0.048095703125, -0.0263671875, -0.0171661376953125, 0.018463134765625, 0.0010862350463867188, -0.0176544189453125, 0.01259613037109375, -0.03680419921875, 0.00862884521484375, -0.033447265625, -0.00005328655242919922, 0.01148223876953125, 0.0015802383422851562, -0.0274658203125, 0.03009033203125, -0.028472900390625, -0.00208282470703125, 0.015625, -0.00487518310546875, -0.01194000244140625, 0.09600830078125, -0.036529541015625, 0.01142120361328125, -0.0048980712890625, 0.0123138427734375, -0.0248565673828125, 0.0123291015625, 0.058685302734375, -0.06201171875, -0.02734375, 0.0004508495330810547, 0.0223236083984375, -0.024658203125, 0.053985595703125, 0.032867431640625, -0.030059814453125, 0.0211944580078125, -0.01129150390625, 0.00775146484375, -0.022857666015625, 0.05438232421875, -0.0255126953125, 0.0251617431640625, 0.0124664306640625, -0.003322601318359375, 0.0197906494140625, 0.01264190673828125, -0.0285491943359375, -0.0203704833984375, -0.0142364501953125, -0.05950927734375, 0.015594482421875, 0.0386962890625, 0.050140380859375, -0.0019702911376953125, -0.05364990234375, -0.00263214111328125, -0.06341552734375, 0.002685546875, -0.0071258544921875, -0.0305938720703125, 0.03363037109375, -0.0235443115234375, -0.0284423828125, -0.0096282958984375, -0.0224456787109375, -0.012481689453125, 0.0126800537109375, -0.0249176025390625, -0.015838623046875, 0.012298583984375, -0.020233154296875, 0.017608642578125, 0.02886962890625, -0.028533935546875, -0.020751953125, -0.01806640625, -0.0253753662109375, 0.018035888671875, 0.01520538330078125, -0.0271759033203125, -0.00923919677734375, 0.00351715087890625, -0.0250244140625, -0.00007462501525878906, -0.0345458984375, -0.017303466796875, 0.0158843994140625, 0.0142364501953125, -0.046356201171875, 0.0307464599609375, 0.049163818359375, 0.01849365234375, -0.00507354736328125, 0.007518768310546875, -0.037322998046875, 0.0028591156005859375, -0.0311126708984375, 0.002689361572265625, 0.048004150390625, 0.0272216796875, 0.007732391357421875, -0.005977630615234375, -0.006504058837890625, 0.0043182373046875, -0.01348876953125, -0.040252685546875, -0.072021484375, -0.0032024383544921875, 0.06951904296875, -0.023345947265625, -0.0161590576171875, 0.018402099609375, -0.006496429443359375, -0.029510498046875, -0.018310546875, 0.03729248046875, -0.01788330078125, 0.0182342529296875, -0.01392364501953125, -0.016845703125, -0.00437164306640625, 0.0341796875, 0.0181732177734375, -0.035308837890625, 0.0059051513671875, 0.046722412109375, 0.004192352294921875, 0.00386810302734375, -0.019989013671875, 0.066650390625, 0.01065826416015625, -0.0067901611328125, 0.03887939453125, -0.00362396240234375, -0.051361083984375, -0.044830322265625, 0.004093170166015625, 0.022705078125, 0.03741455078125, 0.0241546630859375, -0.0006432533264160156, -0.01104736328125, -0.08050537109375, 0.040252685546875, -0.035858154296875, -0.028900146484375, 0.0307769775390625, 0.051849365234375, 0.0308074951171875, 0.022003173828125, 0.0099945068359375, -0.003704071044921875, 0.034515380859375, 0.05010986328125, 0.004306793212890625, -0.004970550537109375, -0.0219573974609375, -0.053863525390625, -0.025421142578125, -0.06036376953125, -0.01174163818359375, 0.0289154052734375, 0.00688934326171875, 0.031097412109375, 0.01812744140625, 0.031982421875, 0.015106201171875, 0.0024967193603515625, -0.011932373046875, -0.0181732177734375, 0.03704833984375, 0.0144195556640625, 0.035491943359375, 0.01268768310546875, -0.0225067138671875, 0.064697265625, 0.004566192626953125, -0.038848876953125, 0.01947021484375, 0.0211639404296875, 0.048248291015625, 0.00948333740234375, 0.0227203369140625, 0.01415252685546875, 0.0203399658203125, -0.029052734375, -0.0051422119140625, -0.023681640625, -0.03887939453125, 0.0350341796875, -0.0108184814453125, -0.00705718994140625, 0.04595947265625, 0.0687255859375, -0.0172882080078125, 0.009979248046875, -0.02313232421875, -0.05816650390625, -0.001373291015625, -0.01209259033203125, 0.00875091552734375, -0.06689453125, 0.02020263671875, 0.03656005859375, 0.0014467239379882812, -0.03167724609375, 0.0140228271484375, 0.0302581787109375, -0.006587982177734375, -0.043487548828125, 0.0277099609375, 0.0054931640625, 0.05657958984375, -0.007640838623046875, -0.01430511474609375, -0.01068115234375, -0.07763671875, 0.01134490966796875, -0.046478271484375, 0.00545501708984375, -0.02716064453125, 0.0018138885498046875, -0.0150146484375, 0.0059967041015625, 0.0321044921875, 0.052459716796875, 0.0166778564453125, -0.0692138671875, -0.00531768798828125, -0.029296875, -0.01085662841796875, -0.0158538818359375, 0.047943115234375, 0.0267791748046875, 0.02032470703125, -0.01399993896484375, 0.033477783203125, 0.0187225341796875, -0.0406494140625, -0.00594329833984375, 0.013916015625, 0.0029125213623046875, 0.0301666259765625, -0.0340576171875, -0.00708770751953125, 0.020751953125, -0.05145263671875, -0.01113128662109375, 0.0426025390625, -0.04095458984375, -0.0430908203125, -0.015380859375, 0.0139923095703125, 0.00981903076171875, -0.06134033203125, -0.0182037353515625, -0.02587890625, -0.0106964111328125, -0.036712646484375, -0.03759765625, -0.05291748046875, -0.034088134765625, -0.01629638671875, 0.0484619140625, -0.050384521484375, 0.0007915496826171875, 0.01329803466796875, 0.02703857421875, -0.02899169921875, -0.0171966552734375, -0.00031113624572753906, 0.0090484619140625, -0.0074310302734375, -0.01436614990234375, -0.0036716461181640625, -0.0043792724609375, -0.00959014892578125, 0.00162506103515625, -0.0291900634765625, 0.035919189453125, 0.01369476318359375, 0.04754638671875, -0.0096282958984375, 0.03521728515625, -0.0082550048828125, -0.01386260986328125, 0.03472900390625, 0.00859832763671875, -0.05291748046875, -0.0160064697265625, -0.02471923828125, 0.040985107421875, -0.053802490234375, -0.003448486328125, 0.04913330078125, -0.02227783203125, 0.0188446044921875, -0.012847900390625, 0.00751495361328125, -0.032958984375, 0.003879547119140625, -0.0178070068359375, -0.046630859375, -0.02044677734375, -0.0031757354736328125, 0.047943115234375, 0.06329345703125, 0.0243988037109375, -0.0211639404296875, 0.01053619384765625, 0.054351806640625, -0.01490020751953125, -0.0555419921875, -0.07366943359375, -0.08184814453125, 0.0758056640625, -0.00537109375, -0.0006551742553710938, -0.01149749755859375, 0.033172607421875, 0.046905517578125, 0.0269927978515625, -0.03851318359375, -0.037384033203125, -0.033416748046875, -0.0626220703125, 0.0064544677734375, 0.0019502639770507812, 0.002201080322265625, -0.003978729248046875, 0.0869140625, 0.0098876953125, -0.0292510986328125, -0.01404571533203125, 0.010498046875, -0.0157928466796875, -0.020660400390625, -0.05419921875, -0.00844573974609375, 0.038726806640625, -0.01172637939453125, -0.004825592041015625, -0.0117950439453125, 0.0360107421875, -0.01026153564453125, 0.0146636962890625, -0.050048828125, 0.01210784912109375, 0.03533935546875, -0.034027099609375, -0.04229736328125, 0.037628173828125, -0.0546875, -0.007213592529296875, -0.00698089599609375, -0.056915283203125, 0.02764892578125, 0.061553955078125, -0.036529541015625, 0.024322509765625, -0.050445556640625, 0.02264404296875, 0.02398681640625, -0.0228424072265625, 0.010589599609375, 0.0335693359375, 0.0037212371826171875, 0.023712158203125, -0.0100555419921875, 0.02459716796875, -0.0272064208984375, -0.01326751708984375, -0.0098114013671875, -0.01153564453125, -0.0086669921875, -0.038330078125, -0.035797119140625, -0.061676025390625, 0.04510498046875, -0.052978515625, 0.016021728515625, -0.05218505859375, -0.0230255126953125, -0.00885772705078125, 0.099853515625, 0.005329132080078125, -0.01202392578125, -0.0010194778442382812, 0.0201263427734375, -0.04730224609375, -0.0262908935546875, -0.01180267333984375, 0.0049285888671875, -0.050384521484375, -0.0226287841796875, -0.026214599609375, -0.01593017578125, 0.033203125, -0.04638671875, 0.0010347366333007812, -0.05517578125, 0.0175018310546875, 0.0235137939453125, 0.038726806640625, -0.0135345458984375, 0.0006380081176757812, -0.004100799560546875, 0.0227203369140625, -0.0191497802734375, -0.0631103515625, -0.01047515869140625, -0.0126800537109375, 0.053009033203125, 0.010101318359375, 0.01129913330078125, -0.0121307373046875, 0.038848876953125, 0.0323486328125, -0.0015783309936523438, 0.0288543701171875, -0.014251708984375, 0.036590576171875, -0.005153656005859375, 0.001735687255859375, -0.009552001953125, -0.0008039474487304688, -0.0196685791015625, -0.0292205810546875, -0.033111572265625, -0.06268310546875, -0.031768798828125, -0.0150604248046875, -0.022857666015625, 0.0031890869140625, -0.0192718505859375, -0.00920867919921875, 0.0036754608154296875, 0.02825927734375, -0.0364990234375, -0.0209503173828125, -0.00572967529296875, 0.0562744140625, -0.01512908935546875, -0.014862060546875, -0.0111541748046875, 0.0496826171875, 0.00698089599609375, -0.0163421630859375, -0.013275146484375, -0.0128173828125, 0.017059326171875, -0.004383087158203125, 0.002643585205078125, -0.037445068359375, -0.029205322265625, 0.07464599609375, -0.033538818359375, 0.0004982948303222656, -0.01727294921875, 0.04412841796875, -0.0226898193359375, -0.041595458984375, 0.0247802734375, -0.046722412109375, 0.0177764892578125, 0.034820556640625, 0.0308685302734375, -0.01177215576171875, 0.026275634765625, -0.006694793701171875, 0.0010156631469726562, -0.0216217041015625, 0.022247314453125, -0.019775390625, -0.007114410400390625, -0.01512908935546875, 0.0010547637939453125, 0.0258636474609375, -0.004604339599609375, -0.01375579833984375, 0.0192413330078125, -0.0129547119140625, -0.0143585205078125, -0.052490234375, 0.01335906982421875, 0.0180511474609375, -0.0231170654296875, 0.005001068115234375, 0.0081634521484375, -0.0240325927734375, 0.1197509765625, 0.0199127197265625, -0.046112060546875, 0.03387451171875, -0.048675537109375, -0.00946044921875, 0.01056671142578125, 0.015228271484375, 0.038238525390625, -0.0005178451538085938, -0.0528564453125, -0.02020263671875, 0.0157470703125, -0.0299224853515625, -0.054962158203125, 0.02313232421875, 0.0184783935546875, -0.0095977783203125, -0.0019435882568359375, 0.04241943359375, 0.0294036865234375, -0.0006237030029296875, -0.01404571533203125, 0.0294036865234375, 0.0259246826171875, 0.04534912109375, 0.01959228515625, -0.01325225830078125, -0.01061248779296875, 0.031890869140625, -0.0003943443298339844, -0.06475830078125, -0.045745849609375, 0.020538330078125, 0.053375244140625, 0.004589080810546875, 0.00687408447265625, 0.006603240966796875, 0.0241851806640625, 0.0199432373046875, 0.042724609375, -0.03594970703125, -0.09295654296875, -0.00931549072265625, 0.003925323486328125, 0.023406982421875, -0.06976318359375, -0.0222015380859375, 0.0169677734375, -0.0408935546875, -0.01552581787109375, 0.052734375, -0.036865234375, -0.0282135009765625, -0.026611328125, 0.0141448974609375, -0.02740478515625, -0.0164947509765625, -0.0030574798583984375, 0.0399169921875, -0.039703369140625, -0.014495849609375, 0.01354217529296875, -0.043853759765625, -0.0209503173828125, -0.0266571044921875, 0.046295166015625, -0.01244354248046875, 0.01165008544921875, 0.0474853515625, 0.0168609619140625, -0.041046142578125, -0.003681182861328125, -0.01548004150390625, -0.01373291015625, -0.00972747802734375, -0.000011324882507324219, -0.0311737060546875, -0.0019388198852539062, 0.0259552001953125, 0.020751953125, 0.0265655517578125, -0.00905609130859375, -0.03887939453125, 0.00591278076171875, 0.0238800048828125, 0.020263671875, -0.0305938720703125, 0.06988525390625, 0.00836944580078125, 0.0127716064453125, 0.0080718994140625, 0.06396484375, 0.0193023681640625, -0.01708984375, 0.0064849853515625, -0.03515625, -0.0112152099609375, -0.017242431640625, 0.034942626953125, 0.02032470703125, 0.037109375, -0.004856109619140625, -0.04766845703125, 0.0019893646240234375, -0.00604248046875, -0.0139617919921875, 0.050994873046875, 0.061004638671875, -0.039794921875, 0.0252685546875, -0.01177215576171875, 0.026123046875, 0.0035877227783203125, -0.004787445068359375, 0.030426025390625, -0.0188140869140625, 0.039215087890625, -0.006076812744140625, -0.04351806640625, 0.0202484130859375, 0.0330810546875, 0.0208892822265625, 0.04302978515625, -0.0133819580078125, 0.037200927734375, 0.032958984375, 0.0050506591796875, -0.0264434814453125, -0.0189056396484375, 0.045684814453125, 0.0015659332275390625, -0.0276031494140625, 0.046875, -0.030517578125, 0.00649261474609375, 0.08135986328125, 0.0787353515625, -0.12225341796875, 0.0247344970703125, 0.020111083984375, 0.01323699951171875, 0.044952392578125, -0.01776123046875, 0.0147552490234375, 0.0259857177734375, 0.0010128021240234375, -0.01230621337890625, -0.046661376953125, -0.00981903076171875, -0.003360748291015625, 0.0162506103515625, -0.005146026611328125, 0.047576904296875, -0.009857177734375, -0.060333251953125, -0.007213592529296875, 0.04095458984375, -0.0025043487548828125, -0.002727508544921875, 0.007171630859375, -0.006290435791015625, -0.0211639404296875, -0.0860595703125, -0.044342041015625, -0.020355224609375, -0.0323486328125, 0.012969970703125, 0.0025234222412109375, 0.052398681640625, 0.042236328125, -0.0002491474151611328, 0.00043892860412597656, 0.002979278564453125, 0.0007367134094238281, 0.028350830078125, -0.03631591796875, -0.0208892822265625, 0.01373291015625, -0.035797119140625, 0.0232086181640625, 0.0107421875, -0.034454345703125, -0.0089569091796875, -0.036346435546875, 0.0689697265625, -0.00102996826171875, -0.03729248046875, 0.016082763671875, -0.046356201171875, -0.003765106201171875, -0.01488494873046875, 0.01384735107421875, -0.06439208984375, -0.0267486572265625, -0.0037555694580078125, -0.0341796875, 0.01751708984375, -0.0080718994140625, -0.066650390625, 0.125244140625, 0.0269927978515625, 0.02667236328125, -0.009674072265625, 0.041412353515625, -0.02685546875, 0.043975830078125, -0.049774169921875, 0.060760498046875, 0.013946533203125, 0.027618408203125, -0.016082763671875, 0.003322601318359375, 0.020477294921875, -0.0184326171875, 0.00225830078125, 0.0235443115234375, -0.0545654296875, 0.006282806396484375, 0.01151275634765625, 0.0119171142578125, 0.0083770751953125, 0.04840087890625, 0.01016998291015625, 0.018585205078125, 0.02899169921875, -0.04400634765625, 0.0282135009765625, -0.03802490234375, 0.0006012916564941406, 0.013702392578125, -0.005733489990234375, -0.04730224609375, -0.0183563232421875, 0.03448486328125, -0.11737060546875, 0.0166015625, 0.0531005859375, 0.058685302734375, 0.0064544677734375, 0.00859832763671875, 0.019256591796875, -0.0250396728515625, 0.0428466796875, -0.034820556640625, 0.043609619140625, 0.00457000732421875, 0.0059051513671875, 0.036956787109375, 0.0239715576171875, -0.00022614002227783203, 0.005859375, 0.0145721435546875, 0.01457977294921875, -0.01580810546875, 0.046295166015625, 0.03167724609375, 0.02410888671875, -0.02655029296875, 0.018585205078125, 0.027557373046875, 0.057098388671875, -0.052154541015625, -0.03436279296875, 0.0002846717834472656, -0.0018444061279296875, 0.0305328369140625, 0.01517486572265625, 0.04608154296875, -0.0061492919921875, 0.0211181640625, -0.0176239013671875, 0.0295562744140625, 0.035736083984375, -0.01462554931640625, -0.0112762451171875, 0.005535125732421875, -0.0201416015625, 0.060272216796875, -0.002155303955078125, -0.0265350341796875, 0.0195159912109375, 0.0361328125, -0.003215789794921875, 0.0165252685546875, -0.02740478515625, -0.00933074951171875, -0.0152740478515625, 0.01313018798828125, -0.017425537109375, 0.0187530517578125, -0.04949951171875, -0.035736083984375, -0.022735595703125, 0.0399169921875, -0.01039886474609375, -0.0274200439453125, -0.01222991943359375, 0.0244140625, 0.0009312629699707031, -0.031707763671875, 0.01220703125, -0.01404571533203125, -0.01143646240234375, -0.011474609375, -0.030059814453125, -0.00200653076171875, -0.0149383544921875, -0.01702880859375, 0.0196685791015625, 0.009857177734375, 0.002925872802734375, 0.03070068359375, 0.0005793571472167969, -0.0215911865234375, -0.00026607513427734375, -0.028289794921875, 0.05511474609375, 0.025634765625, -0.092041015625, -0.02734375, 0.004192352294921875, -0.035003662109375, 0.029144287109375, 0.045562744140625, -0.0177154541015625, 0.0009918212890625, -0.00665283203125, -0.03851318359375, 0.0245513916015625, -0.003570556640625, 0.0295867919921875, 0.0009908676147460938, -0.0131072998046875, -0.00696563720703125, -0.06231689453125, -0.018218994140625, 0.0036869049072265625, -0.01042938232421875, -0.0066680908203125, 0.06939697265625, 0.004230499267578125, -0.00217437744140625, -0.026519775390625, 0.0193634033203125, -0.04449462890625, -0.01044464111328125, 0.003665924072265625, -0.0196990966796875, -0.0130157470703125, 0.015655517578125, -0.06011962890625, 0.059783935546875, -0.027587890625, 0.04071044921875, 0.054962158203125, -0.046844482421875, 0.0057373046875, 0.0262451171875, 0.0423583984375, -0.018585205078125, -0.054779052734375, -0.0377197265625, 0.0276947021484375, -0.0006146430969238281, 0.0413818359375, -0.0018787384033203125, 0.0305633544921875, -0.0745849609375, -0.04058837890625, 0.006866455078125, -0.07122802734375, -0.0239410400390625, 0.01319122314453125, -0.03167724609375, 0.036834716796875, -0.0364990234375, -0.017425537109375, 0.0017042160034179688, 0.00762176513671875, -0.049041748046875, -0.008880615234375, 0.029266357421875, 0.0267486572265625, 0.01934814453125, 0.0401611328125, -0.0012836456298828125, 0.0006809234619140625, 0.03375244140625, -0.0211334228515625, -0.0099334716796875, -0.05670166015625, -0.021270751953125, -0.03082275390625, -0.019012451171875, 0.004528045654296875, -0.0019683837890625, -0.05078125, -0.00681304931640625, 0.01415252685546875, -0.0170440673828125, -0.0264892578125, -0.021392822265625, 0.0032520294189453125, -0.0184326171875, 0.03851318359375, -0.06365966796875, -0.0212554931640625, 0.031707763671875, 0.05352783203125, -0.0241241455078125, 0.00373077392578125, -0.00316619873046875, -0.0118255615234375, -0.0160980224609375, -0.0167999267578125, 0.025787353515625, 0.01337432861328125, -0.02886962890625, -0.039794921875, -0.049285888671875, 0.005107879638671875, -0.036895751953125, -0.0208587646484375, 0.0011014938354492188, 0.00771331787109375, -0.009613037109375, -0.0112762451171875, -0.00392913818359375, 0.004497528076171875, -0.00626373291015625, -0.0185089111328125, -0.017822265625, -0.0263824462890625, -0.050567626953125, -0.0595703125, 0.05963134765625, -0.00824737548828125, -0.0228424072265625, -0.035675048828125, -0.006389617919921875, -0.0181121826171875, 0.002040863037109375, -0.01018524169921875, -0.028106689453125, -0.01134490966796875, 0.038482666015625, 0.0078277587890625, -0.02374267578125, 0.0239715576171875, 0.037261962890625, -0.0219573974609375, 0.031524658203125, 0.020599365234375, -0.032562255859375, -0.005275726318359375, -0.004825592041015625, 0.02545166015625, 0.048126220703125, 0.0011281967163085938, 0.00864410400390625, 0.00848388671875, -0.023590087890625, -0.0027599334716796875, -0.00946044921875, 0.0145721435546875, -0.026153564453125, 0.015625, -0.005741119384765625, -0.01251220703125, 0.018218994140625, -0.0703125, -0.040802001953125, -0.00716400146484375, -0.0198974609375, 0.00504302978515625, -0.07049560546875, -0.00910186767578125, -0.0123291015625, -0.005523681640625, 0.008758544921875, 0.02081298828125, -0.0108642578125, 0.006439208984375, 0.059478759765625, -0.005329132080078125, -0.007129669189453125, -0.023101806640625, 0.07305908203125, -0.0400390625, -0.0127716064453125, 0.0137176513671875, 0.018280029296875, 0.0171661376953125, 0.0160369873046875, 0.03411865234375, 0.015472412109375, -0.03485107421875, -0.0091705322265625, 0.0089569091796875, 0.01361083984375, -0.0242919921875, -0.033660888671875, 0.006069183349609375, 0.012298583984375, -0.0262603759765625, 0.016143798828125, 0.033782958984375, -0.002811431884765625, -0.008819580078125, 0.0129241943359375, -0.027496337890625, -0.00799560546875, -0.03155517578125, 0.018096923828125, 0.0162200927734375, 0.0010576248168945312, 0.045013427734375, 0.01363372802734375, -0.00641632080078125, 0.0303802490234375, 0.01090240478515625, -0.0537109375, 0.0306549072265625, 0.0298614501953125, 0.057403564453125, 0.022857666015625 ]
165e65def48f50fc1af34adfcf61338d58b35dcd
Wordpress Stackexchange Q: Exclude Current Post from Recent Posts Loop what would be the best way to exclude the current post I am viewing from this recent posts query. Thank You! <?php global $post; if (in_category('top-lists')) { $myposts2 = get_posts('numberposts=5&offset=0&category=7'); } else if (in_category('playlists') || in_category('playlistall')) { $myposts2 = get_posts('numberposts=5&offset=0&category=6,37'); } else if (in_category('news') || in_category('news')) { $myposts2 = get_posts('numberposts=5&offset=0&category=95'); } else { $myposts2 = get_posts('numberposts=5&offset=0&category=-6,-7,-37,-95,-177'); } foreach($myposts2 as $post) : ?> A: This the post__not_in arg should work dandy for you: $args = array( 'numberposts' => 5, 'offset' => 0, 'category' => 7, 'post__not_in' => array( $post->ID ) ); $myposts2 = get_posts($args);
Q: Exclude Current Post from Recent Posts Loop what would be the best way to exclude the current post I am viewing from this recent posts query. Thank You! <?php global $post; if (in_category('top-lists')) { $myposts2 = get_posts('numberposts=5&offset=0&category=7'); } else if (in_category('playlists') || in_category('playlistall')) { $myposts2 = get_posts('numberposts=5&offset=0&category=6,37'); } else if (in_category('news') || in_category('news')) { $myposts2 = get_posts('numberposts=5&offset=0&category=95'); } else { $myposts2 = get_posts('numberposts=5&offset=0&category=-6,-7,-37,-95,-177'); } foreach($myposts2 as $post) : ?> A: This the post__not_in arg should work dandy for you: $args = array( 'numberposts' => 5, 'offset' => 0, 'category' => 7, 'post__not_in' => array( $post->ID ) ); $myposts2 = get_posts($args); A: Add this to your $args 'post__not_in' => array( get_the_ID() ) This way you won't have to deal with getting the current post ID and will potentially avoid errors with getting your ID. The get_the_ID() function just get the ID for you so you don't have to deal with or do anything. A: Add below code in active theme functions.php file function be_exclude_current_post( $args ) { if( is_singular() && !isset( $args['post__in'] ) ) $args['post__not_in'] = array( get_the_ID() ); return $args; } add_filter( 'widget_posts_args', 'be_exclude_current_post' );
wordpress
{ "language": "en", "length": 186, "provenance": "stackexchange_00019.jsonl.gz:413139", "question_score": "11", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28792" }
[ 0.0810546875, -0.01983642578125, 0.018524169921875, 0.00890350341796875, 0.018951416015625, -0.04541015625, 0.09228515625, -0.0187530517578125, -0.0183563232421875, 0.0253448486328125, -0.0115203857421875, 0.010040283203125, -0.04486083984375, -0.0275726318359375, 0.0006775856018066406, -0.0270843505859375, 0.03564453125, -0.0123138427734375, 0.032501220703125, -0.00778961181640625, -0.0263824462890625, -0.0066986083984375, 0.06927490234375, 0.06976318359375, 0.00490570068359375, -0.03790283203125, 0.0667724609375, -0.005207061767578125, 0.020355224609375, -0.013671875, 0.016265869140625, -0.00995635986328125, 0.0106353759765625, 0.0311279296875, -0.02508544921875, -0.0266876220703125, 0.002239227294921875, 0.0012426376342773438, 0.025604248046875, -0.0004875659942626953, -0.0194854736328125, 0.01520538330078125, -0.0019779205322265625, 0.00653076171875, -0.043212890625, -0.007366180419921875, -0.0206451416015625, 0.0194854736328125, 0.00366973876953125, -0.037109375, 0.0173187255859375, 0.01233673095703125, 0.038177490234375, 0.01477813720703125, -0.01328277587890625, 0.0184478759765625, -0.019439697265625, 0.023956298828125, 0.05902099609375, -0.00620269775390625, -0.03173828125, -0.017578125, 0.0251617431640625, -0.032745361328125, -0.00395965576171875, 0.00322723388671875, 0.0125732421875, 0.018524169921875, -0.06622314453125, -0.0288848876953125, 0.05706787109375, -0.053131103515625, 0.0107421875, -0.037139892578125, -0.0355224609375, -0.0030841827392578125, 0.0170745849609375, -0.0467529296875, -0.0011920928955078125, -0.0288543701171875, -0.04669189453125, 0.0299224853515625, -0.07318115234375, -0.01163482666015625, -0.0246124267578125, -0.00794219970703125, -0.0307159423828125, 0.0072479248046875, 0.0038051605224609375, -0.011199951171875, -0.0101470947265625, -0.00989532470703125, -0.028350830078125, 0.028411865234375, 0.003772735595703125, -0.0238037109375, 0.0640869140625, 0.0804443359375, -0.024810791015625, -0.027862548828125, -0.02764892578125, -0.01424407958984375, -0.0390625, -0.01010894775390625, 0.03204345703125, 0.044158935546875, -0.04364013671875, -0.0065765380859375, 0.06195068359375, 0.03631591796875, 0.02734375, 0.0187530517578125, -0.0030498504638671875, -0.017486572265625, -0.035186767578125, 0.00859832763671875, -0.0248565673828125, -0.01250457763671875, -0.0116424560546875, -0.0063018798828125, -0.016632080078125, 0.00582122802734375, -0.007099151611328125, 0.004486083984375, 0.01265716552734375, 0.01151275634765625, -0.032012939453125, 0.005382537841796875, 0.0364990234375, 0.049896240234375, -0.047760009765625, -0.023040771484375, 0.08795166015625, 0.0048065185546875, 0.00887298583984375, -0.045135498046875, 0.037322998046875, -0.0404052734375, 0.005588531494140625, -0.011962890625, 0.004787445068359375, -0.02362060546875, -0.0101776123046875, -0.00823211669921875, 0.040374755859375, 0.032470703125, -0.0051116943359375, 0.01175689697265625, 0.0323486328125, -0.0137176513671875, 0.007049560546875, -0.050445556640625, 0.0311126708984375, 0.00969696044921875, -0.00968170166015625, 0.01061248779296875, 0.014678955078125, -0.01123046875, -0.03729248046875, -0.023406982421875, 0.041259765625, -0.0009937286376953125, -0.0303955078125, -0.0567626953125, -0.09698486328125, 0.0103912353515625, -0.0295562744140625, -0.01538848876953125, 0.0200958251953125, 0.019073486328125, -0.017425537109375, 0.00598907470703125, 0.0592041015625, -0.00016677379608154297, -0.0242156982421875, 0.003879547119140625, -0.038909912109375, -0.02618408203125, 0.0234375, 0.042388916015625, -0.0026683807373046875, -0.020965576171875, -0.0302276611328125, 0.032989501953125, -0.0433349609375, 0.049896240234375, 0.013885498046875, 0.01119232177734375, -0.0179901123046875, 0.0011692047119140625, 0.07012939453125, 0.053253173828125, -0.0212249755859375, 0.024749755859375, -0.007152557373046875, -0.046173095703125, 0.0014095306396484375, -0.015167236328125, -0.004322052001953125, 0.021514892578125, 0.0308380126953125, 0.01107025146484375, -0.0343017578125, 0.004528045654296875, -0.0870361328125, -0.00629425048828125, -0.022003173828125, 0.03179931640625, -0.031768798828125, 0.0238189697265625, 0.036956787109375, -0.006252288818359375, -0.038726806640625, 0.029815673828125, -0.005718231201171875, -0.00662994384765625, -0.015350341796875, -0.009246826171875, -0.0008654594421386719, 0.0178070068359375, 0.00856781005859375, -0.00016999244689941406, -0.00606536865234375, 0.00923919677734375, 0.06378173828125, -0.042694091796875, 0.004886627197265625, -0.05242919921875, 0.007137298583984375, 0.0109710693359375, -0.06988525390625, 0.03240966796875, 0.02947998046875, 0.031402587890625, -0.0239410400390625, 0.005153656005859375, 0.019805908203125, -0.00336456298828125, 0.0123291015625, 0.03399658203125, 0.0170440673828125, -0.0014781951904296875, -0.006664276123046875, 0.00991058349609375, 0.0552978515625, -0.034637451171875, 0.0028705596923828125, -0.006824493408203125, 0.018218994140625, 0.033294677734375, 0.05023193359375, 0.003986358642578125, 0.0261688232421875, 0.00872802734375, 0.03717041015625, 0.0219573974609375, -0.0271759033203125, 0.031524658203125, -0.002521514892578125, -0.033538818359375, 0.00994873046875, -0.021881103515625, -0.016265869140625, -0.005832672119140625, 0.0643310546875, -0.0160064697265625, 0.043121337890625, 0.026947021484375, -0.0147705078125, -0.0089874267578125, 0.001399993896484375, -0.039764404296875, 0.01971435546875, -0.0013885498046875, -0.02838134765625, 0.01059722900390625, -0.038665771484375, 0.001598358154296875, 0.061492919921875, -0.01337432861328125, -0.0159454345703125, 0.0460205078125, 0.02099609375, -0.0070648193359375, -0.0297393798828125, -0.0469970703125, 0.0172119140625, -0.00775146484375, 0.005489349365234375, -0.006378173828125, 0.0178070068359375, 0.0287628173828125, -0.011962890625, 0.0206451416015625, 0.0252838134765625, -0.00803375244140625, -0.0002281665802001953, -0.0233154296875, 0.023468017578125, -0.0301971435546875, 0.0103607177734375, 0.041839599609375, 0.0037631988525390625, -0.01465606689453125, -0.01424407958984375, 0.0008144378662109375, -0.011505126953125, -0.028594970703125, -0.04632568359375, 0.010406494140625, -0.090087890625, -0.00023293495178222656, 0.01546478271484375, 0.027923583984375, -0.0012569427490234375, -0.0364990234375, 0.0048675537109375, 0.0099639892578125, -0.0711669921875, -0.059783935546875, 0.0129547119140625, -0.005405426025390625, -0.033843994140625, 0.00860595703125, -0.022979736328125, -0.0022792816162109375, 0.0177459716796875, -0.011688232421875, -0.006320953369140625, -0.042327880859375, -0.06719970703125, -0.06109619140625, -0.053497314453125, 0.0303192138671875, -0.0020389556884765625, 0.01678466796875, 0.007732391357421875, 0.1119384765625, 0.01331329345703125, -0.050323486328125, -0.01336669921875, -0.00453948974609375, -0.0198211669921875, 0.01153564453125, -0.041595458984375, 0.07220458984375, -0.031463623046875, 0.0300445556640625, 0.06524658203125, -0.007205963134765625, -0.036468505859375, -0.01763916015625, -0.0265045166015625, 0.0221405029296875, -0.0028228759765625, 0.0009632110595703125, 0.055328369140625, 0.05853271484375, 0.00930023193359375, 0.0027942657470703125, 0.01053619384765625, -0.031982421875, -0.036468505859375, 0.0190277099609375, 0.01119232177734375, -0.001735687255859375, -0.00347137451171875, -0.002407073974609375, -0.006011962890625, -0.00830078125, 0.020904541015625, -0.05426025390625, 0.0546875, 0.02618408203125, 0.0322265625, -0.00954437255859375, -0.01251983642578125, -0.03759765625, 0.0259857177734375, -0.0174407958984375, -0.01129913330078125, -0.0284271240234375, 0.0212554931640625, -0.034881591796875, -0.007610321044921875, 0.047149658203125, 0.052154541015625, 0.002227783203125, 0.0129547119140625, -0.056549072265625, 0.0102996826171875, 0.060546875, -0.087890625, -0.0419921875, -0.038909912109375, 0.0191192626953125, 0.0298309326171875, -0.0701904296875, 0.024627685546875, -0.0248870849609375, -0.06390380859375, -0.0065460205078125, -0.00988006591796875, -0.01020050048828125, -0.01512908935546875, 0.0086517333984375, -0.0479736328125, -0.024139404296875, 0.034576416015625, -0.02734375, 0.00937652587890625, -0.00689697265625, 0.0110626220703125, -0.0244140625, -0.03680419921875, -0.006298065185546875, -0.0277099609375, -0.002399444580078125, -0.004703521728515625, 0.00244903564453125, -0.01007843017578125, 0.038543701171875, -0.058380126953125, -0.008056640625, -0.01300811767578125, -0.00417327880859375, -0.015655517578125, -0.0007758140563964844, -0.02716064453125, 0.0677490234375, -0.004215240478515625, 0.01641845703125, 0.0008130073547363281, -0.00719451904296875, -0.00554656982421875, 0.01239776611328125, -0.05859375, -0.0247039794921875, -0.014190673828125, -0.02435302734375, -0.08221435546875, -0.03338623046875, 0.0239410400390625, -0.004024505615234375, -0.0117950439453125, 0.007411956787109375, -0.01837158203125, -0.045654296875, 0.057891845703125, 0.04583740234375, -0.052459716796875, -0.00537109375, 0.0909423828125, 0.0198822021484375, -0.043975830078125, -0.052490234375, -0.0271148681640625, 0.042205810546875, -0.0428466796875, 0.045684814453125, 0.0195465087890625, -0.042205810546875, 0.10028076171875, -0.01169586181640625, -0.0264434814453125, 0.00661468505859375, 0.0161895751953125, 0.011199951171875, -0.00821685791015625, -0.0175323486328125, -0.01471710205078125, 0.046875, -0.0017547607421875, -0.024383544921875, -0.048492431640625, -0.007137298583984375, 0.0877685546875, -0.005126953125, 0.0285491943359375, -0.07769775390625, -0.012603759765625, -0.01305389404296875, -0.0015544891357421875, 0.044342041015625, 0.062164306640625, -0.01087188720703125, 0.019622802734375, 0.0178680419921875, -0.0137176513671875, -0.01251983642578125, 0.0382080078125, -0.00316619873046875, 0.0120391845703125, 0.0232086181640625, -0.01483917236328125, -0.02593994140625, -0.0034084320068359375, -0.00012087821960449219, -0.01513671875, -0.055450439453125, 0.003185272216796875, -0.00039505958557128906, 0.047271728515625, 0.0256805419921875, 0.0265960693359375, 0.044952392578125, 0.02337646484375, 0.01446533203125, -0.0276031494140625, -0.034271240234375, 0.0230712890625, -0.04803466796875, -0.0254974365234375, 0.01491546630859375, -0.00394439697265625, 0.0015382766723632812, 0.09197998046875, 0.05413818359375, 0.038330078125, -0.06365966796875, 0.0391845703125, -0.01898193359375, 0.0200653076171875, 0.01092529296875, 0.0032672882080078125, 0.026824951171875, -0.0262603759765625, 0.021697998046875, -0.0269622802734375, -0.043701171875, -0.010498046875, 0.0157012939453125, -0.016845703125, 0.013641357421875, 0.040771484375, 0.031494140625, -0.0304718017578125, 0.0462646484375, 0.07843017578125, -0.00945281982421875, -0.0231781005859375, 0.0051116943359375, 0.0197601318359375, 0.03228759765625, -0.00707244873046875, -0.00016748905181884766, -0.037384033203125, -0.0073394775390625, 0.0086517333984375, -0.01259613037109375, -0.020904541015625, -0.01129150390625, -0.0243682861328125, -0.03497314453125, 0.0011472702026367188, -0.0169525146484375, -0.0249176025390625, -0.00194549560546875, 0.0027942657470703125, 0.01123046875, -0.00411224365234375, 0.058746337890625, -0.0256195068359375, -0.061859130859375, 0.00209808349609375, 0.01030731201171875, 0.0298004150390625, 0.017578125, -0.036224365234375, -0.0020961761474609375, -0.054351806640625, -0.0218658447265625, -0.02874755859375, -0.044525146484375, -0.0379638671875, -0.01873779296875, 0.0276336669921875, 0.032135009765625, -0.01078033447265625, -0.04461669921875, -0.0005998611450195312, -0.019622802734375, -0.00022649765014648438, 0.02972412109375, -0.0092010498046875, 0.081787109375, -0.01020050048828125, 0.0528564453125, 0.0102691650390625, 0.0416259765625, -0.0313720703125, -0.01064300537109375, -0.0073699951171875, -0.06439208984375, 0.01189422607421875, 0.047271728515625, -0.06817626953125, -0.0084228515625, 0.01434326171875, 0.01152801513671875, -0.01155853271484375, -0.006984710693359375, 0.01247406005859375, -0.0281524658203125, -0.0260772705078125, -0.004917144775390625, -0.033203125, -0.01277923583984375, -0.0199737548828125, -0.049224853515625, -0.0308990478515625, -0.005725860595703125, -0.019134521484375, 0.0182647705078125, -0.056671142578125, 0.020111083984375, -0.00010013580322265625, 0.053741455078125, 0.083251953125, -0.0152740478515625, 0.040618896484375, 0.058807373046875, 0.00643157958984375, 0.0156097412109375, -0.0016260147094726562, 0.03863525390625, 0.0012722015380859375, 0.08245849609375, 0.0122528076171875, 0.00591278076171875, 0.048736572265625, -0.041412353515625, -0.005435943603515625, -0.0234222412109375, 0.0260772705078125, 0.003940582275390625, 0.024322509765625, 0.0167694091796875, -0.0006895065307617188, 0.026214599609375, 0.002899169921875, -0.00850677490234375, 0.0022125244140625, 0.047607421875, -0.03717041015625, -0.039825439453125, 0.00972747802734375, -0.00751495361328125, -0.0232391357421875, -0.0112457275390625, 0.03240966796875, 0.0154571533203125, -0.07232666015625, 0.027435302734375, 0.029022216796875, -0.026702880859375, -0.0237274169921875, 0.01030731201171875, -0.00823974609375, -0.035858154296875, -0.0916748046875, -0.024505615234375, 0.0106048583984375, -0.03314208984375, 0.0430908203125, -0.005107879638671875, 0.012786865234375, 0.0643310546875, -0.0162200927734375, 0.034088134765625, 0.0201263427734375, -0.00803375244140625, -0.034637451171875, 0.0127716064453125, 0.004581451416015625, 0.037933349609375, -0.001163482666015625, 0.0123138427734375, -0.03289794921875, 0.0110321044921875, 0.0037078857421875, -0.01175689697265625, 0.06756591796875, -0.04229736328125, -0.0186767578125, 0.024566650390625, -0.000530242919921875, -0.0155487060546875, -0.007232666015625, -0.0072784423828125, -0.0321044921875, -0.005588531494140625, -0.00786590576171875, -0.0111846923828125, -0.0177154541015625, -0.027801513671875, -0.0771484375, 0.064208984375, -0.0168304443359375, 0.06488037109375, 0.0191650390625, 0.01165771484375, -0.023681640625, -0.0240631103515625, -0.05279541015625, 0.053619384765625, 0.00041937828063964844, 0.046234130859375, -0.0489501953125, 0.0010242462158203125, 0.0030670166015625, 0.0028591156005859375, 0.05157470703125, 0.009674072265625, -0.0135498046875, -0.0235748291015625, 0.033843994140625, 0.081787109375, 0.02288818359375, -0.003406524658203125, 0.003131866455078125, 0.038726806640625, 0.0307159423828125, -0.039825439453125, 0.04937744140625, -0.02667236328125, -0.0147552490234375, 0.0197906494140625, -0.0030155181884765625, -0.021697998046875, -0.0018978118896484375, 0.0298309326171875, -0.0158233642578125, -0.0004420280456542969, 0.00909423828125, 0.01161956787109375, -0.005176544189453125, 0.038787841796875, 0.0209808349609375, -0.06585693359375, -0.012542724609375, -0.042755126953125, 0.036163330078125, -0.01303863525390625, 0.043853759765625, 0.050079345703125, 0.0280609130859375, 0.035064697265625, 0.01471710205078125, 0.03753662109375, 0.0235443115234375, -0.0275726318359375, 0.042816162109375, 0.06170654296875, 0.01335906982421875, -0.02587890625, 0.0180206298828125, 0.07281494140625, 0.06298828125, -0.055694580078125, 0.0003032684326171875, 0.0175018310546875, 0.00902557373046875, 0.00494384765625, -0.0200653076171875, 0.007110595703125, 0.0010747909545898438, 0.00482940673828125, -0.04254150390625, -0.01525115966796875, 0.0226898193359375, 0.02642822265625, -0.002994537353515625, -0.06805419921875, -0.004058837890625, -0.0159454345703125, -0.03179931640625, -0.005535125732421875, 0.004070281982421875, 0.0484619140625, 0.04266357421875, 0.0074310302734375, -0.033477783203125, -0.0195770263671875, 0.0162506103515625, 0.016326904296875, -0.0335693359375, -0.0008873939514160156, -0.02490234375, -0.0528564453125, -0.0183868408203125, 0.0257110595703125, 0.02301025390625, -0.01238250732421875, 0.0235748291015625, 0.011749267578125, -0.045806884765625, -0.0160675048828125, -0.00882720947265625, -0.0295867919921875, -0.047882080078125, -0.030242919921875, -0.037689208984375, 0.0240478515625, -0.022308349609375, 0.02960205078125, -0.004146575927734375, 0.0201263427734375, -0.030303955078125, 0.020843505859375, -0.0055389404296875, -0.01345062255859375, 0.0068206787109375, 0.0316162109375, 0.01042938232421875, 0.0044403076171875, -0.038299560546875, 0.01071929931640625, -0.051544189453125, -0.027557373046875, 0.02142333984375, 0.00836181640625, -0.026031494140625, 0.045166015625, 0.0345458984375, -0.0116119384765625, -0.0296478271484375, 0.0362548828125, 0.024139404296875, -0.0029888153076171875, 0.018890380859375, 0.0203399658203125, 0.006343841552734375, 0.00751495361328125, -0.004062652587890625, 0.0133819580078125, 0.041046142578125, -0.00012981891632080078, 0.0193328857421875, 0.0311279296875, -0.00882720947265625, 0.034149169921875, -0.0465087890625, -0.0118865966796875, 0.0303497314453125, 0.0087890625, 0.00719451904296875, -0.0009570121765136719, 0.030914306640625, 0.017059326171875, 0.04119873046875, -0.02313232421875, 0.00928497314453125, -0.04193115234375, 0.0240478515625, -0.031280517578125, -0.01004791259765625, -0.03546142578125, -0.01079559326171875, -0.06304931640625, -0.0340576171875, 0.053070068359375, 0.0009493827819824219, -0.024993896484375, -0.01108551025390625, 0.01544952392578125, -0.03289794921875, 0.02166748046875, 0.0233917236328125, 0.0294189453125, 0.032928466796875, -0.0167083740234375, 0.026580810546875, -0.01105499267578125, -0.018218994140625, 0.01061248779296875, 0.002346038818359375, -0.01285552978515625, -0.0181121826171875, -0.010009765625, 0.006984710693359375, -0.00029015541076660156, 0.034210205078125, -0.02581787109375, 0.00623321533203125, -0.01020050048828125, 0.00446319580078125, 0.007404327392578125, -0.03509521484375, -0.02142333984375, -0.042083740234375, -0.014862060546875, 0.00710296630859375, -0.0279083251953125, -0.036346435546875, -0.0128631591796875, -0.01056671142578125, -0.0022640228271484375, -0.005706787109375, -0.0256500244140625, 0.034820556640625, -0.01256561279296875, -0.01395416259765625, -0.033416748046875, -0.0167694091796875, -0.01531219482421875, 0.002811431884765625, -0.0013980865478515625, -0.0277099609375, -0.048431396484375, 0.031524658203125, -0.0196380615234375, -0.00447845458984375, 0.01500701904296875, -0.0043182373046875, -0.0234375, 0.0117645263671875, -0.0037097930908203125, 0.02532958984375, 0.004917144775390625, 0.0009055137634277344, 0.025543212890625, 0.01433563232421875, -0.04437255859375, -0.034759521484375, 0.0125885009765625, -0.0120697021484375, -0.0364990234375, 0.01178741455078125, -0.0264892578125, -0.01219940185546875, -0.0355224609375, -0.060516357421875, 0.0672607421875, -0.0166015625, -0.033782958984375, -0.044525146484375, 0.034942626953125, 0.019439697265625, -0.01233673095703125, 0.0029392242431640625, -0.048614501953125, -0.0159454345703125, 0.004299163818359375, 0.032196044921875, 0.032989501953125, 0.02935791015625, 0.0230712890625, -0.035797119140625, 0.006649017333984375, -0.029754638671875, 0.0291595458984375, -0.0152130126953125, 0.0306549072265625, 0.003021240234375, 0.046661376953125, -0.02191162109375, 0.047119140625, -0.006191253662109375, 0.0229339599609375, -0.01629638671875, -0.03955078125, -0.07537841796875, -0.029693603515625, 0.08160400390625, 0.10186767578125, 0.0345458984375, -0.04095458984375, -0.033538818359375, -0.0286865234375, -0.01395416259765625, -0.009796142578125, 0.0187530517578125, -0.071044921875, -0.004940032958984375, 0.0223846435546875, 0.01105499267578125, 0.009552001953125, -0.029510498046875, -0.01277923583984375, -0.01507568359375, -0.00856781005859375, 0.002002716064453125, -0.01346588134765625, 0.0650634765625, -0.011016845703125, -0.01654052734375, 0.015899658203125, -0.0303192138671875, -0.0238189697265625, 0.01482391357421875, 0.007251739501953125, -0.0098114013671875, -0.04296875, 0.0196533203125, 0.016693115234375, 0.0175933837890625, 0.0208892822265625, 0.032073974609375, -0.022186279296875, -0.00787353515625, 0.003711700439453125, 0.01702880859375, -0.00878143310546875, -0.008819580078125, -0.0109710693359375, -0.0140228271484375, 0.040802001953125, 0.0137481689453125, 0.052490234375, -0.0018329620361328125, 0.0447998046875, 0.006671905517578125, -0.0311737060546875, 0.037017822265625, -0.0291900634765625, -0.01540374755859375, -0.0064239501953125, -0.008636474609375, -0.042022705078125, 0.005626678466796875, 0.0298309326171875, 0.00024509429931640625, 0.0065460205078125 ]
60cf5c189395be036d5dd1a980885ded0f756db2
Wordpress Stackexchange Q: Does wordpress have a post hit counter? Is there anyway to show in a template for a post, how many times that post has been viewed, like hits without some sort of plugin? It seems wordpress would have this built in, but I am unable to find any template tags for such a think in the documentation? A: Not in core. You can use post meta to store this information on page loads. If you have caching plugins enabled, you might want to increment the hit counter with an AJAX call, otherwise you can just add this directly in your single.php and page.php templates: //Add to functions.php function get_hits(){ global $post; $hits = get_post_meta($post->ID, '_hit-counter', true); return $hits; } function update_hits($count){ global $post; $count = $count ? $count : 0; $hits = update_post_meta($post->ID, '_hit-counter', $count++); return $hits; } //Usage within the loop update_hits(get_hits());
Q: Does wordpress have a post hit counter? Is there anyway to show in a template for a post, how many times that post has been viewed, like hits without some sort of plugin? It seems wordpress would have this built in, but I am unable to find any template tags for such a think in the documentation? A: Not in core. You can use post meta to store this information on page loads. If you have caching plugins enabled, you might want to increment the hit counter with an AJAX call, otherwise you can just add this directly in your single.php and page.php templates: //Add to functions.php function get_hits(){ global $post; $hits = get_post_meta($post->ID, '_hit-counter', true); return $hits; } function update_hits($count){ global $post; $count = $count ? $count : 0; $hits = update_post_meta($post->ID, '_hit-counter', $count++); return $hits; } //Usage within the loop update_hits(get_hits()); A: No, WP doesn't have such functionality built-in. Probably because updating the post table on each page hit would slow down the site. You'll have to use wp-postviews or something related.
wordpress
{ "language": "en", "length": 175, "provenance": "stackexchange_00019.jsonl.gz:413163", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28862" }
[ 0.0732421875, -0.0240478515625, 0.033477783203125, -0.032196044921875, 0.0005469322204589844, -0.0217437744140625, 0.06103515625, -0.021820068359375, 0.0269622802734375, 0.0374755859375, -0.047393798828125, 0.00018680095672607422, -0.00571441650390625, 0.0080413818359375, -0.03216552734375, -0.0270538330078125, 0.053192138671875, -0.05975341796875, 0.043212890625, 0.00704193115234375, 0.0221710205078125, 0.031951904296875, 0.08026123046875, 0.043670654296875, 0.00785064697265625, 0.0035152435302734375, 0.035980224609375, -0.03192138671875, -0.006847381591796875, -0.04296875, 0.01111602783203125, 0.04168701171875, 0.01287841796875, 0.019439697265625, -0.033355712890625, -0.019317626953125, -0.00040531158447265625, 0.002971649169921875, -0.0165863037109375, 0.02508544921875, -0.004512786865234375, 0.003498077392578125, 0.01824951171875, -0.0703125, -0.00030612945556640625, 0.0034637451171875, -0.005489349365234375, -0.039886474609375, 0.038970947265625, -0.0226287841796875, -0.00882720947265625, 0.017486572265625, 0.0128326416015625, -0.0223388671875, -0.0254058837890625, -0.00037407875061035156, 0.017059326171875, -0.01042938232421875, 0.056243896484375, -0.0196075439453125, -0.042083740234375, -0.0211639404296875, 0.035125732421875, -0.038482666015625, -0.028961181640625, -0.0104522705078125, -0.001163482666015625, 0.01404571533203125, -0.017852783203125, -0.02349853515625, 0.01953125, -0.00014591217041015625, -0.017578125, -0.00849151611328125, -0.002666473388671875, -0.0288543701171875, 0.029449462890625, -0.03240966796875, -0.0306243896484375, 0.03900146484375, 0.0015764236450195312, -0.01065826416015625, -0.01580810546875, -0.004817962646484375, -0.00981903076171875, 0.02783203125, -0.01221466064453125, -0.00390625, -0.028656005859375, -0.0198822021484375, -0.0187225341796875, -0.01396942138671875, -0.005462646484375, -0.0107879638671875, -0.04132080078125, -0.016448974609375, 0.0223846435546875, 0.031463623046875, -0.045928955078125, -0.044921875, -0.03564453125, 0.006931304931640625, -0.0670166015625, 0.0060272216796875, -0.0008001327514648438, 0.04998779296875, 0.03228759765625, 0.061981201171875, 0.038482666015625, 0.0174407958984375, 0.0165557861328125, 0.031524658203125, 0.0027027130126953125, 0.0192718505859375, -0.07183837890625, -0.002773284912109375, -0.0177764892578125, -0.04248046875, -0.0169219970703125, 0.00640869140625, -0.007305145263671875, 0.0033550262451171875, 0.00577545166015625, 0.0027027130126953125, 0.0201416015625, 0.006893157958984375, -0.00743865966796875, -0.02093505859375, 0.016326904296875, 0.023468017578125, -0.01523590087890625, 0.005237579345703125, 0.038421630859375, 0.007762908935546875, -0.010772705078125, -0.01239013671875, 0.0040740966796875, -0.032623291015625, -0.036285400390625, 0.0107879638671875, -0.02545166015625, -0.0285491943359375, -0.0039043426513671875, -0.056365966796875, 0.06768798828125, 0.0001900196075439453, 0.00469970703125, 0.034881591796875, 0.041961669921875, 0.0128173828125, 0.04791259765625, -0.01432037353515625, 0.0207366943359375, 0.01222991943359375, -0.00966644287109375, 0.025360107421875, -0.0198974609375, 0.0113372802734375, -0.01148223876953125, 0.013580322265625, 0.046966552734375, -0.0109405517578125, -0.0345458984375, -0.0017414093017578125, -0.04443359375, 0.0254058837890625, -0.0260162353515625, -0.0013790130615234375, 0.02984619140625, 0.01128387451171875, 0.035003662109375, 0.0082855224609375, -0.00197601318359375, -0.0013818740844726562, -0.003002166748046875, -0.034393310546875, -0.0199432373046875, 0.024658203125, 0.027801513671875, -0.0079803466796875, 0.0004534721374511719, -0.0242767333984375, 0.059356689453125, 0.004192352294921875, -0.0301666259765625, 0.035919189453125, -0.004528045654296875, 0.01525115966796875, 0.00814056396484375, -0.00528717041015625, 0.00994873046875, 0.034881591796875, -0.020416259765625, 0.08404541015625, 0.003662109375, -0.0278472900390625, -0.023773193359375, 0.0253753662109375, -0.020751953125, -0.051116943359375, 0.02264404296875, 0.0262603759765625, -0.039703369140625, 0.00942230224609375, -0.054534912109375, -0.001895904541015625, -0.00811004638671875, 0.0175628662109375, -0.017059326171875, 0.02215576171875, 0.0279693603515625, -0.0031986236572265625, -0.018585205078125, -0.019805908203125, -0.01235198974609375, 0.0004639625549316406, 0.006710052490234375, -0.0197601318359375, -0.0183868408203125, -0.01018524169921875, -0.0244903564453125, 0.02166748046875, -0.0361328125, 0.0283966064453125, 0.041259765625, -0.01435089111328125, -0.033111572265625, -0.025360107421875, -0.0185699462890625, -0.0037212371826171875, -0.05755615234375, 0.0863037109375, -0.00249481201171875, 0.021514892578125, -0.022308349609375, -0.0223846435546875, -0.032623291015625, -0.07861328125, 0.0097808837890625, 0.05987548828125, 0.0104217529296875, -0.005413055419921875, -0.00835418701171875, 0.03350830078125, -0.0004696846008300781, -0.05560302734375, -0.01029205322265625, 0.026458740234375, -0.0005564689636230469, 0.014068603515625, 0.011627197265625, -0.016937255859375, 0.00940704345703125, -0.09466552734375, 0.00730133056640625, 0.0238494873046875, 0.0062713623046875, 0.01078033447265625, -0.035003662109375, 0.0212860107421875, 0.01006317138671875, 0.0150604248046875, -0.02294921875, -0.00658416748046875, 0.034210205078125, -0.028289794921875, 0.0330810546875, 0.011383056640625, -0.01116180419921875, -0.0085296630859375, 0.00786590576171875, -0.0158538818359375, 0.006656646728515625, -0.01161956787109375, -0.046051025390625, 0.00463104248046875, -0.0226898193359375, 0.0215301513671875, 0.01187896728515625, -0.033203125, -0.035400390625, -0.006931304931640625, -0.039642333984375, -0.01302337646484375, -0.022430419921875, -0.04949951171875, 0.00714874267578125, 0.0196533203125, 0.051605224609375, 0.0109710693359375, 0.00286102294921875, 0.053619384765625, -0.01404571533203125, 0.0673828125, 0.042205810546875, -0.006103515625, 0.01042938232421875, -0.09429931640625, 0.061431884765625, -0.063720703125, 0.0604248046875, 0.083984375, -0.0118560791015625, 0.01071929931640625, 0.0009908676147460938, -0.003383636474609375, -0.024444580078125, 0.04345703125, 0.01284027099609375, -0.034576416015625, -0.01490020751953125, 0.0154876708984375, 0.01776123046875, 0.044708251953125, -0.00897979736328125, -0.043609619140625, -0.0015802383422851562, 0.00833892822265625, -0.09442138671875, -0.08270263671875, 0.0254364013671875, -0.084228515625, -0.0011701583862304688, -0.03570556640625, -0.045867919921875, -0.0130462646484375, -0.009765625, 0.00621795654296875, -0.06854248046875, -0.020294189453125, 0.016754150390625, -0.06549072265625, -0.022491455078125, -0.031585693359375, 0.018646240234375, 0.000499725341796875, 0.01001739501953125, 0.042755126953125, 0.0035247802734375, -0.06121826171875, -0.005924224853515625, 0.0028133392333984375, -0.01215362548828125, -0.0014200210571289062, 0.0009388923645019531, 0.0202789306640625, -0.0513916015625, 0.023529052734375, -0.054779052734375, -0.0158538818359375, 0.0118255615234375, -0.033416748046875, 0.00894927978515625, -0.03179931640625, 0.0303192138671875, 0.04534912109375, -0.033355712890625, 0.01169586181640625, 0.072998046875, -0.030670166015625, -0.01812744140625, -0.014434814453125, -0.036956787109375, -0.033782958984375, 0.03802490234375, -0.00792694091796875, -0.040863037109375, -0.01425933837890625, -0.0014743804931640625, 0.00832366943359375, -0.0035858154296875, -0.000004172325134277344, 0.03692626953125, -0.004192352294921875, -0.012481689453125, -0.009185791015625, -0.038299560546875, -0.01274871826171875, 0.004627227783203125, -0.039794921875, 0.034820556640625, -0.03387451171875, 0.0660400390625, -0.0599365234375, -0.04742431640625, 0.05645751953125, 0.041961669921875, 0.0110015869140625, -0.0159759521484375, -0.045806884765625, -0.00025010108947753906, 0.08074951171875, -0.01335906982421875, -0.029449462890625, -0.01248931884765625, 0.0140380859375, -0.0087432861328125, -0.03558349609375, 0.01502227783203125, -0.01654052734375, -0.05718994140625, 0.032135009765625, 0.0256805419921875, -0.0216217041015625, -0.0369873046875, 0.0821533203125, -0.04510498046875, 0.003955841064453125, 0.033111572265625, -0.0196990966796875, 0.017852783203125, -0.007144927978515625, 0.00951385498046875, -0.0272979736328125, -0.01165771484375, -0.0249176025390625, 0.01357269287109375, -0.006626129150390625, -0.02081298828125, 0.01910400390625, 0.039520263671875, -0.0404052734375, 0.02301025390625, 0.03021240234375, 0.0162811279296875, 0.03411865234375, -0.01593017578125, -0.0027637481689453125, -0.01464080810546875, -0.0209808349609375, 0.00910186767578125, -0.02783203125, -0.004138946533203125, -0.03143310546875, -0.001018524169921875, -0.01425933837890625, -0.049530029296875, -0.011932373046875, -0.039154052734375, -0.00586700439453125, -0.0185546875, -0.041839599609375, -0.01568603515625, 0.0382080078125, -0.0198974609375, 0.0107574462890625, -0.04974365234375, -0.0364990234375, 0.06170654296875, 0.030548095703125, 0.0096893310546875, -0.01319122314453125, 0.10748291015625, 0.00989532470703125, -0.035858154296875, -0.049560546875, -0.0012197494506835938, 0.04620361328125, 0.003627777099609375, 0.01007843017578125, -0.00879669189453125, -0.053802490234375, 0.08111572265625, 0.007221221923828125, -0.02001953125, -0.0248870849609375, 0.09130859375, -0.0108184814453125, -0.0228271484375, 0.0294342041015625, -0.04132080078125, 0.0188140869140625, 0.0173797607421875, -0.0191497802734375, -0.037261962890625, 0.0191650390625, 0.045257568359375, -0.054168701171875, 0.0721435546875, 0.0048065185546875, -0.0115814208984375, -0.00991058349609375, -0.019744873046875, 0.075927734375, 0.03851318359375, 0.001621246337890625, 0.059539794921875, 0.0618896484375, -0.01439666748046875, -0.015960693359375, -0.01000213623046875, 0.01074981689453125, 0.01084136962890625, 0.01371002197265625, -0.0130462646484375, -0.0212249755859375, -0.0166015625, 0.06292724609375, 0.0017614364624023438, -0.08221435546875, 0.038604736328125, -0.0269012451171875, -0.040740966796875, 0.0234527587890625, 0.0128173828125, 0.032379150390625, 0.0477294921875, -0.018585205078125, -0.0032138824462890625, 0.054046630859375, -0.00333404541015625, -0.033538818359375, -0.0032978057861328125, -0.00011134147644042969, -0.006275177001953125, 0.037200927734375, 0.0482177734375, -0.00980377197265625, 0.042236328125, -0.0139923095703125, 0.04541015625, 0.055023193359375, 0.0343017578125, 0.01739501953125, -0.033294677734375, -0.0241546630859375, 0.0226287841796875, -0.0118865966796875, -0.020050048828125, -0.0009860992431640625, 0.00782012939453125, 0.01763916015625, -0.003978729248046875, -0.01206207275390625, 0.0215301513671875, -0.01306915283203125, -0.005645751953125, -0.0286865234375, 0.0093841552734375, 0.0216217041015625, 0.00830078125, 0.01007843017578125, -0.00885009765625, 0.0270233154296875, 0.01103973388671875, -0.037017822265625, -0.006450653076171875, 0.004528045654296875, -0.0258636474609375, 0.0164794921875, -0.02362060546875, -0.024261474609375, -0.0163726806640625, -0.003269195556640625, 0.01381683349609375, -0.0227508544921875, -0.0230712890625, -0.0170745849609375, -0.021240234375, 0.04766845703125, -0.029083251953125, 0.05401611328125, -0.026275634765625, -0.003406524658203125, -0.003627777099609375, 0.0070953369140625, 0.05438232421875, 0.033172607421875, 0.016754150390625, -0.032257080078125, -0.0301361083984375, -0.03900146484375, 0.045257568359375, 0.0182342529296875, -0.03289794921875, -0.00994873046875, 0.01122283935546875, 0.0308685302734375, -0.0037689208984375, -0.0255584716796875, -0.0150146484375, -0.003604888916015625, 0.01444244384765625, 0.066162109375, -0.006565093994140625, 0.048095703125, 0.016204833984375, 0.0168609619140625, 0.0211944580078125, 0.030303955078125, -0.006725311279296875, -0.0217132568359375, 0.017852783203125, -0.0012760162353515625, -0.001445770263671875, -0.0296630859375, 0.052215576171875, -0.0173797607421875, 0.012176513671875, -0.0034084320068359375, 0.023101806640625, -0.03875732421875, -0.0011911392211914062, -0.02703857421875, 0.04241943359375, -0.027862548828125, 0.0010290145874023438, 0.0184783935546875, 0.0126495361328125, 0.000013172626495361328, -0.0177764892578125, 0.0095977783203125, -0.0145416259765625, 0.00814056396484375, -0.023834228515625, -0.0262603759765625, -0.00858306884765625, 0.029144287109375, 0.006439208984375, 0.01082611083984375, 0.00476837158203125, 0.003795623779296875, 0.00930023193359375, -0.04803466796875, -0.021240234375, 0.0268402099609375, -0.009735107421875, 0.040985107421875, -0.0171356201171875, -0.001903533935546875, 0.037261962890625, -0.0311279296875, -0.013153076171875, -0.006954193115234375, -0.0021572113037109375, 0.0068817138671875, -0.00455474853515625, -0.036773681640625, -0.0279693603515625, 0.02984619140625, -0.01151275634765625, -0.005413055419921875, -0.036163330078125, 0.0928955078125, 0.012481689453125, 0.017059326171875, 0.046173095703125, -0.0156097412109375, -0.0067596435546875, 0.004302978515625, 0.01605224609375, -0.01338958740234375, -0.00981903076171875, -0.049285888671875, 0.0054931640625, -0.032684326171875, -0.045623779296875, 0.0125274658203125, 0.01103973388671875, 0.034576416015625, -0.030059814453125, 0.053070068359375, -0.0523681640625, 0.04791259765625, 0.0360107421875, 0.02874755859375, 0.0120697021484375, 0.042144775390625, 0.00455474853515625, -0.0039005279541015625, 0.0233917236328125, 0.0092315673828125, 0.01045989990234375, -0.005680084228515625, 0.0185089111328125, 0.061126708984375, -0.03729248046875, 0.016571044921875, -0.01328277587890625, 0.01094818115234375, -0.0190582275390625, 0.019775390625, 0.09100341796875, -0.004428863525390625, -0.040679931640625, 0.034881591796875, 0.01125335693359375, -0.024139404296875, -0.00384521484375, -0.0189971923828125, -0.00864410400390625, 0.029205322265625, -0.0021762847900390625, 0.01299285888671875, 0.0153961181640625, 0.011505126953125, -0.06298828125, 0.1048583984375, 0.005641937255859375, 0.03668212890625, 0.033660888671875, 0.034271240234375, -0.043365478515625, 0.01006317138671875, -0.02288818359375, 0.0665283203125, -0.007396697998046875, 0.049224853515625, -0.05133056640625, -0.02484130859375, 0.01666259765625, 0.060089111328125, 0.089599609375, 0.018341064453125, 0.0301055908203125, -0.035400390625, 0.024658203125, 0.018707275390625, -0.044586181640625, 0.01258087158203125, 0.005146026611328125, 0.030609130859375, 0.045562744140625, -0.054168701171875, 0.0352783203125, -0.03045654296875, 0.003849029541015625, 0.011383056640625, 0.00830841064453125, 0.01105499267578125, -0.01485443115234375, 0.0037937164306640625, -0.03204345703125, -0.0140838623046875, 0.01216888427734375, 0.0279541015625, 0.00849151611328125, 0.049652099609375, 0.031829833984375, -0.044464111328125, -0.026885986328125, -0.0269317626953125, 0.047027587890625, -0.00925445556640625, 0.00322723388671875, -0.009490966796875, -0.00795745849609375, 0.0268402099609375, -0.0208282470703125, -0.012451171875, 0.0266876220703125, -0.01256561279296875, 0.10333251953125, 0.0103912353515625, 0.035614013671875, -0.057891845703125, -0.005069732666015625, 0.0110321044921875, 0.0943603515625, -0.053070068359375, -0.03253173828125, 0.0006437301635742188, 0.0156097412109375, -0.0004458427429199219, -0.0151214599609375, 0.008941650390625, 0.0218048095703125, 0.045654296875, 0.0026035308837890625, -0.059814453125, 0.0024547576904296875, 0.01654052734375, 0.010986328125, 0.022003173828125, 0.022857666015625, -0.050933837890625, -0.0205230712890625, -0.023040771484375, 0.0013322830200195312, 0.0460205078125, 0.004062652587890625, 0.03363037109375, -0.01248931884765625, -0.00965118408203125, 0.004528045654296875, 0.01190185546875, 0.01641845703125, -0.0145111083984375, -0.0123443603515625, -0.02093505859375, 0.016021728515625, 0.0217742919921875, 0.0105743408203125, 0.0208740234375, 0.044586181640625, 0.0229644775390625, -0.04034423828125, -0.01450347900390625, 0.0257720947265625, -0.04278564453125, -0.0158233642578125, -0.034332275390625, -0.00665283203125, 0.005931854248046875, -0.005023956298828125, 0.0113372802734375, 0.01175689697265625, 0.00640106201171875, 0.007671356201171875, 0.015167236328125, 0.0117340087890625, -0.0382080078125, 0.0006604194641113281, 0.01476287841796875, 0.059234619140625, 0.029632568359375, -0.06396484375, -0.005306243896484375, -0.01519012451171875, -0.0703125, 0.0130767822265625, 0.0258026123046875, -0.058319091796875, 0.0487060546875, 0.0015964508056640625, 0.00952911376953125, 0.0243988037109375, -0.031829833984375, 0.016326904296875, 0.0164642333984375, 0.0215606689453125, 0.01543426513671875, -0.00975799560546875, -0.0146636962890625, 0.02923583984375, 0.032196044921875, -0.0232696533203125, 0.0635986328125, -0.03668212890625, -0.006084442138671875, -0.01190948486328125, 0.03424072265625, -0.019989013671875, -0.0127410888671875, 0.023345947265625, 0.014617919921875, -0.00010138750076293945, -0.01232147216796875, -0.05316162109375, -0.033447265625, 0.04608154296875, -0.029510498046875, -0.01287841796875, 0.00830841064453125, 0.032501220703125, -0.0143585205078125, 0.056854248046875, 0.00665283203125, 0.0108795166015625, 0.034210205078125, -0.017578125, 0.0302276611328125, 0.044586181640625, 0.0126953125, 0.08111572265625, -0.0165863037109375, 0.0257568359375, 0.00566864013671875, -0.04547119140625, 0.012969970703125, 0.0311279296875, -0.07440185546875, 0.016448974609375, 0.021270751953125, -0.0166015625, -0.00942230224609375, 0.021728515625, 0.001056671142578125, 0.0144805908203125, -0.05352783203125, -0.00909423828125, -0.034820556640625, 0.0310821533203125, -0.01447296142578125, 0.0025768280029296875, -0.035064697265625, 0.03704833984375, 0.00968170166015625, 0.0099945068359375, -0.02044677734375, -0.057342529296875, -0.01300811767578125, -0.01302337646484375, -0.0243988037109375, -0.029083251953125, -0.01097869873046875, -0.00335693359375, 0.000031828880310058594, -0.00875091552734375, -0.01473236083984375, 0.0212860107421875, -0.0096282958984375, -0.0146026611328125, -0.01153564453125, 0.0157623291015625, -0.004852294921875, 0.030975341796875, -0.030029296875, -0.004741668701171875, -0.032012939453125, 0.0005917549133300781, -0.0187835693359375, 0.0061492919921875, 0.028564453125, -0.0261993408203125, -0.0469970703125, -0.03271484375, 0.0156402587890625, 0.0124053955078125, 0.0102691650390625, -0.0005841255187988281, 0.0189666748046875, 0.004497528076171875, -0.0256195068359375, -0.075439453125, 0.0194854736328125, -0.06634521484375, -0.006519317626953125, -0.0218353271484375, -0.0004456043243408203, 0.01386260986328125, -0.04779052734375, -0.1087646484375, 0.030609130859375, -0.044097900390625, -0.04278564453125, -0.0885009765625, 0.003108978271484375, 0.02276611328125, -0.01488494873046875, -0.041839599609375, 0.0251312255859375, -0.065673828125, 0.0299530029296875, -0.007190704345703125, -0.038848876953125, 0.04193115234375, -0.0255126953125, -0.066650390625, -0.00775146484375, 0.0034351348876953125, -0.0291595458984375, 0.023681640625, -0.0167083740234375, 0.0428466796875, 0.03424072265625, -0.055084228515625, 0.026702880859375, -0.004497528076171875, 0.033294677734375, -0.01039886474609375, 0.016876220703125, -0.027557373046875, 0.0019025802612304688, 0.0662841796875, 0.058258056640625, 0.0206298828125, -0.041351318359375, 0.004596710205078125, -0.0294952392578125, -0.06378173828125, -0.033843994140625, 0.0201568603515625, -0.053558349609375, -0.004955291748046875, -0.01371002197265625, -0.00873565673828125, -0.01654052734375, -0.00405120849609375, -0.0384521484375, -0.0104522705078125, -0.0257568359375, -0.005268096923828125, -0.035125732421875, 0.0252685546875, 0.0227813720703125, -0.017303466796875, -0.005878448486328125, 0.005611419677734375, -0.0109405517578125, 0.0123748779296875, 0.024871826171875, 0.051483154296875, 0.051605224609375, -0.03741455078125, 0.0077667236328125, 0.03778076171875, -0.0241241455078125, -0.0296783447265625, -0.022613525390625, -0.0015316009521484375, 0.0183868408203125, -0.018096923828125, 0.0043487548828125, -0.005847930908203125, 0.0234527587890625, -0.01751708984375, 0.05499267578125, 0.00021147727966308594, 0.0228118896484375, 0.0065460205078125, 0.0357666015625, -0.0287628173828125, -0.00591278076171875, -0.01192474365234375, -0.029327392578125, 0.008087158203125, 0.0012998580932617188, 0.01451873779296875, -0.038787841796875, 0.030426025390625, 0.02325439453125, 0.0077362060546875, 0.01861572265625 ]
974eb979c8a3a2c96ea56d831a8d9740065fd76d
Wordpress Stackexchange Q: How can you make permalink work for custom post type and taxonomy? I have spent days now trying to figure this out, StackOverflow is my last resort. All I want is the following: http://www.mydomain.com/my-post-stype/my-top-level-category/my-sub-level-category/my-page.html For posts this is insane easy, just adding /%category%/%postname%.html as a permalink does the trick. However for custom post type this seems insane tough. I have a registered post_type project. And a taxonomy project_category Now I like my permalinks to turn out as /project - Overview of projects in all categories. /project/CATEGORY - Overview of projects within that category. /project/CATEGORY/SUBCATEGORY - Overview of projects within that subcategory. /project/CATEGORY/SUBCATEGORY/postname - The actual post. Probably wp_rewrite needs to help me out here tho I have no clue how. Can anyone help me out? A: I've just gotten my head around Doing something similar. This is adapted from this tutorial * *For your post type registration make sure that query_var, publicly_queryable, and has_archive are set to true and rewrite is set to false. *Next up is the code here. Edit: sorry, but code hinting is completely not working for me today. Code is in above link
Q: How can you make permalink work for custom post type and taxonomy? I have spent days now trying to figure this out, StackOverflow is my last resort. All I want is the following: http://www.mydomain.com/my-post-stype/my-top-level-category/my-sub-level-category/my-page.html For posts this is insane easy, just adding /%category%/%postname%.html as a permalink does the trick. However for custom post type this seems insane tough. I have a registered post_type project. And a taxonomy project_category Now I like my permalinks to turn out as /project - Overview of projects in all categories. /project/CATEGORY - Overview of projects within that category. /project/CATEGORY/SUBCATEGORY - Overview of projects within that subcategory. /project/CATEGORY/SUBCATEGORY/postname - The actual post. Probably wp_rewrite needs to help me out here tho I have no clue how. Can anyone help me out? A: I've just gotten my head around Doing something similar. This is adapted from this tutorial * *For your post type registration make sure that query_var, publicly_queryable, and has_archive are set to true and rewrite is set to false. *Next up is the code here. Edit: sorry, but code hinting is completely not working for me today. Code is in above link
wordpress
{ "language": "en", "length": 188, "provenance": "stackexchange_00019.jsonl.gz:413174", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28891" }
[ 0.0540771484375, -0.004180908203125, 0.00957489013671875, -0.03778076171875, -0.003200531005859375, -0.022552490234375, 0.029754638671875, -0.036376953125, -0.027435302734375, -0.0005125999450683594, -0.055023193359375, 0.021759033203125, 0.0041656494140625, -0.029144287109375, 0.05780029296875, -0.0236663818359375, 0.00292205810546875, 0.00150299072265625, 0.01401519775390625, -0.037567138671875, 0.0178375244140625, -0.03265380859375, 0.029296875, 0.0198211669921875, 0.0252227783203125, -0.02679443359375, 0.0609130859375, -0.038299560546875, 0.01641845703125, -0.033355712890625, 0.01271820068359375, 0.0008893013000488281, -0.0006604194641113281, 0.035308837890625, 0.0106658935546875, 0.026702880859375, 0.020050048828125, 0.01314544677734375, 0.0369873046875, 0.01983642578125, 0.04058837890625, -0.0258941650390625, 0.006862640380859375, 0.0284271240234375, 0.00890350341796875, -0.049041748046875, 0.034698486328125, -0.0648193359375, 0.02264404296875, -0.05291748046875, -0.017730712890625, 0.0297088623046875, 0.0152740478515625, -0.027679443359375, -0.0187835693359375, 0.010528564453125, -0.01433563232421875, -0.02264404296875, 0.027679443359375, 0.005947113037109375, -0.007030487060546875, -0.018280029296875, 0.025115966796875, 0.0007643699645996094, -0.02862548828125, -0.02008056640625, 0.0158843994140625, 0.00922393798828125, -0.007694244384765625, -0.035430908203125, 0.03302001953125, 0.0191192626953125, 0.012908935546875, -0.011199951171875, -0.005584716796875, -0.050811767578125, 0.03851318359375, -0.014373779296875, -0.01493072509765625, 0.01154327392578125, 0.031707763671875, -0.0249786376953125, 0.0023193359375, -0.02166748046875, 0.01100921630859375, -0.003574371337890625, 0.004772186279296875, -0.0137939453125, -0.02215576171875, -0.0205230712890625, -0.01499176025390625, -0.00823211669921875, -0.034027099609375, 0.00766754150390625, -0.008331298828125, -0.00855255126953125, 0.030120849609375, 0.05694580078125, -0.0038242340087890625, -0.0017347335815429688, 0.0298614501953125, -0.051300048828125, 0.03167724609375, -0.05572509765625, 0.0162353515625, 0.027374267578125, -0.0027256011962890625, 0.01131439208984375, 0.060821533203125, 0.0149078369140625, 0.01837158203125, 0.043060302734375, -0.0174102783203125, -0.017181396484375, -0.00711822509765625, 0.0131072998046875, -0.04913330078125, 0.0186920166015625, -0.00391387939453125, 0.01471710205078125, -0.004638671875, 0.062103271484375, -0.0087432861328125, -0.0176239013671875, 0.004833221435546875, 0.01523590087890625, 0.03253173828125, -0.08154296875, 0.056121826171875, 0.0027561187744140625, -0.05224609375, 0.0218048095703125, 0.049072265625, 0.00412750244140625, 0.011566162109375, -0.02288818359375, 0.044097900390625, -0.0086669921875, -0.0113983154296875, 0.0028285980224609375, 0.0030345916748046875, 0.006992340087890625, 0.009429931640625, -0.0197296142578125, -0.0191802978515625, 0.03143310546875, 0.0016918182373046875, 0.01357269287109375, 0.01374053955078125, -0.0301055908203125, -0.0003039836883544922, -0.07305908203125, 0.043212890625, 0.0017824172973632812, -0.052642822265625, -0.045684814453125, 0.01390838623046875, -0.030059814453125, -0.011444091796875, -0.06689453125, 0.038055419921875, -0.00009262561798095703, 0.0264892578125, -0.01024627685546875, -0.039794921875, 0.0160369873046875, -0.08184814453125, -0.0206451416015625, 0.01605224609375, -0.0038242340087890625, 0.0167083740234375, 0.01229095458984375, -0.00431060791015625, -0.0103759765625, 0.01143646240234375, -0.01277923583984375, 0.0228424072265625, 0.0097198486328125, 0.019195556640625, 0.06060791015625, 0.0018014907836914062, -0.03167724609375, 0.052703857421875, -0.04278564453125, -0.044586181640625, 0.0198974609375, 0.047454833984375, 0.060546875, -0.047454833984375, 0.026947021484375, 0.056365966796875, 0.054443359375, -0.06878662109375, 0.026885986328125, 0.0106048583984375, 0.0043182373046875, -0.00482177734375, 0.0037860870361328125, 0.0036563873291015625, -0.0179901123046875, -0.054656982421875, 0.01378631591796875, 0.01403045654296875, 0.0229339599609375, 0.0133209228515625, 0.0469970703125, -0.01464080810546875, 0.05010986328125, 0.034820556640625, 0.03448486328125, 0.0190582275390625, 0.0270538330078125, -0.037139892578125, -0.052490234375, -0.040985107421875, 0.0361328125, -0.0082855224609375, 0.0083770751953125, -0.0216522216796875, 0.01451873779296875, 0.015960693359375, -0.047821044921875, 0.00826263427734375, 0.038055419921875, 0.03619384765625, 0.0213775634765625, -0.01806640625, -0.00033545494079589844, -0.0006794929504394531, 0.044708251953125, -0.074951171875, -0.010711669921875, 0.034149169921875, -0.0132598876953125, -0.0467529296875, 0.023345947265625, -0.0184173583984375, -0.00978851318359375, -0.0203704833984375, 0.04644775390625, 0.0213775634765625, 0.034332275390625, -0.031219482421875, -0.04290771484375, 0.04083251953125, -0.02899169921875, 0.0114288330078125, -0.0426025390625, -0.0048065185546875, 0.0127716064453125, 0.01177978515625, 0.01190185546875, 0.023162841796875, -0.0364990234375, 0.00960540771484375, 0.04156494140625, 0.01050567626953125, -0.0163421630859375, 0.01202392578125, -0.0175018310546875, 0.0191497802734375, -0.0272216796875, -0.06561279296875, -0.00505828857421875, 0.0296630859375, 0.0224609375, 0.05084228515625, 0.049468994140625, -0.0054931640625, -0.003833770751953125, -0.01535797119140625, 0.005420684814453125, 0.0037841796875, 0.0237274169921875, 0.07855224609375, -0.01279449462890625, -0.04669189453125, -0.0180816650390625, 0.05828857421875, 0.01849365234375, -0.01187896728515625, 0.064697265625, -0.00811767578125, -0.0194244384765625, -0.016632080078125, -0.044921875, -0.025726318359375, -0.019927978515625, -0.009796142578125, -0.01971435546875, 0.0257568359375, 0.0080108642578125, -0.0075225830078125, -0.01129150390625, -0.012481689453125, -0.0148162841796875, 0.0345458984375, -0.06317138671875, 0.0697021484375, -0.0660400390625, 0.02044677734375, 0.05914306640625, -0.0237274169921875, 0.0235137939453125, 0.00606536865234375, -0.0177001953125, -0.0213165283203125, 0.03472900390625, 0.004032135009765625, -0.03448486328125, -0.01593017578125, 0.0108184814453125, 0.025848388671875, 0.0236663818359375, 0.040069580078125, -0.0162200927734375, 0.0178985595703125, 0.0338134765625, -0.041168212890625, -0.07049560546875, 0.036376953125, -0.0246124267578125, 0.00783538818359375, 0.01236724853515625, -0.010955810546875, -0.033966064453125, 0.01088714599609375, -0.006999969482421875, 0.01568603515625, -0.0687255859375, -0.071533203125, -0.0948486328125, -0.0843505859375, -0.031829833984375, 0.0202178955078125, -0.0043487548828125, 0.01454925537109375, 0.013458251953125, 0.017059326171875, -0.0267791748046875, 0.042205810546875, 0.043853759765625, -0.012237548828125, -0.002918243408203125, 0.005176544189453125, -0.051239013671875, 0.041412353515625, -0.0140533447265625, 0.04632568359375, 0.03204345703125, -0.01325225830078125, -0.0019073486328125, -0.00763702392578125, -0.0156402587890625, 0.00806427001953125, -0.004611968994140625, 0.03570556640625, 0.003551483154296875, 0.0133514404296875, -0.045196533203125, -0.030242919921875, -0.01010894775390625, -0.046844482421875, -0.0030269622802734375, 0.01861572265625, -0.01568603515625, 0.00238800048828125, 0.0010347366333007812, -0.00640869140625, 0.01268768310546875, 0.0020694732666015625, -0.03765869140625, 0.035430908203125, 0.00856781005859375, 0.0204010009765625, -0.004058837890625, 0.011260986328125, -0.03228759765625, 0.002105712890625, -0.01442718505859375, -0.0256805419921875, -0.0325927734375, 0.024261474609375, -0.037628173828125, -0.048583984375, 0.03680419921875, -0.0762939453125, -0.0160369873046875, -0.046600341796875, 0.000858306884765625, -0.0032901763916015625, 0.058258056640625, -0.00717926025390625, -0.0232696533203125, 0.0032958984375, 0.01375579833984375, -0.02655029296875, -0.01322174072265625, -0.026153564453125, -0.0013494491577148438, -0.08233642578125, -0.02008056640625, -0.000545501708984375, -0.05157470703125, -0.0011281967163085938, 0.001865386962890625, -0.060028076171875, -0.0379638671875, 0.040374755859375, 0.00011718273162841797, 0.0024051666259765625, -0.0120849609375, 0.002140045166015625, -0.03143310546875, -0.0286712646484375, -0.007167816162109375, -0.08465576171875, -0.0298919677734375, 0.042083740234375, 0.0377197265625, -0.025604248046875, -0.0404052734375, -0.0297698974609375, 0.049530029296875, 0.01617431640625, 0.00592041015625, -0.0032501220703125, -0.0164337158203125, -0.014678955078125, 0.004360198974609375, -0.006885528564453125, -0.00067138671875, 0.0283203125, 0.0198974609375, -0.03692626953125, 0.0472412109375, -0.0267181396484375, 0.016510009765625, 0.0103912353515625, -0.044677734375, -0.06536865234375, -0.01800537109375, -0.056121826171875, -0.004077911376953125, -0.0227813720703125, -0.029083251953125, -0.0269622802734375, -0.0667724609375, 0.0206298828125, -0.0207366943359375, 0.0149688720703125, 0.00823211669921875, 0.0701904296875, 0.009796142578125, -0.005840301513671875, 0.0019216537475585938, 0.06854248046875, 0.0245361328125, -0.03271484375, 0.051544189453125, 0.0032558441162109375, 0.000946044921875, 0.044158935546875, -0.0241241455078125, 0.0245208740234375, -0.01239776611328125, -0.0020809173583984375, -0.007244110107421875, 0.01039886474609375, 0.01065826416015625, -0.01690673828125, 0.032257080078125, 0.0181884765625, -0.01103973388671875, -0.03216552734375, -0.061737060546875, 0.05169677734375, 0.04071044921875, 0.0009012222290039062, -0.06451416015625, 0.0008282661437988281, 0.0157928466796875, 0.004772186279296875, 0.0426025390625, -0.003871917724609375, 0.0079498291015625, -0.00885009765625, -0.00989532470703125, 0.005664825439453125, 0.00786590576171875, 0.0147552490234375, 0.0134124755859375, 0.024810791015625, 0.015716552734375, 0.01013946533203125, -0.0178375244140625, 0.0008192062377929688, 0.04132080078125, 0.00829315185546875, 0.005916595458984375, -0.01499176025390625, -0.018798828125, -0.002300262451171875, 0.0292816162109375, -0.0081329345703125, 0.048919677734375, 0.0117340087890625, 0.00754547119140625, 0.0264739990234375, -0.04425048828125, 0.00342559814453125, -0.0256805419921875, 0.042327880859375, 0.0128021240234375, -0.0018749237060546875, -0.01554107666015625, 0.06634521484375, 0.043426513671875, 0.0070953369140625, -0.014129638671875, 0.013153076171875, 0.024017333984375, 0.026763916015625, 0.0173492431640625, -0.0144500732421875, 0.0028781890869140625, -0.00562286376953125, 0.0225067138671875, -0.03387451171875, 0.01062774658203125, 0.0055694580078125, 0.069091796875, -0.00952911376953125, -0.0230255126953125, 0.0106201171875, -0.03387451171875, -0.046356201171875, -0.0087890625, -0.01849365234375, -0.037567138671875, -0.0161285400390625, 0.011474609375, 0.007038116455078125, 0.012176513671875, -0.0296478271484375, 0.031280517578125, -0.034454345703125, 0.03424072265625, 0.0289459228515625, 0.0227203369140625, -0.0064697265625, -0.0088653564453125, -0.0173187255859375, -0.01035308837890625, 0.0243377685546875, -0.0011644363403320312, -0.0035648345947265625, -0.01346588134765625, -0.0227203369140625, 0.00003838539123535156, 0.0041656494140625, 0.042999267578125, -0.004405975341796875, -0.040283203125, 0.061737060546875, -0.0135955810546875, 0.061981201171875, 0.02069091796875, -0.06781005859375, 0.0098876953125, -0.0278167724609375, 0.03289794921875, -0.0010929107666015625, -0.04193115234375, -0.02001953125, -0.01425933837890625, 0.010894775390625, 0.0176544189453125, -0.003772735595703125, -0.0186309814453125, -0.0161285400390625, 0.0282745361328125, 0.020782470703125, 0.030487060546875, -0.031829833984375, 0.06402587890625, -0.00624847412109375, 0.026580810546875, -0.0176544189453125, 0.01470184326171875, 0.00572967529296875, -0.0023021697998046875, -0.005725860595703125, -0.0802001953125, -0.0267486572265625, 0.01053619384765625, -0.0302886962890625, 0.07080078125, 0.03619384765625, 0.004730224609375, -0.0009255409240722656, -0.0028095245361328125, 0.010406494140625, -0.02960205078125, -0.0126800537109375, -0.036834716796875, -0.0229339599609375, 0.01837158203125, 0.0189361572265625, 0.06298828125, 0.03045654296875, -0.02947998046875, -0.006458282470703125, 0.0127105712890625, 0.0199127197265625, 0.00951385498046875, -0.025604248046875, 0.001598358154296875, 0.0633544921875, 0.042236328125, 0.0518798828125, 0.0011148452758789062, 0.0240936279296875, 0.0233306884765625, -0.01117706298828125, 0.03271484375, 0.0221710205078125, 0.040252685546875, -0.011688232421875, 0.024322509765625, 0.02203369140625, -0.007568359375, -0.0190277099609375, 0.0714111328125, 0.055908203125, -0.0848388671875, -0.016143798828125, 0.01202392578125, -0.01320648193359375, -0.011077880859375, 0.0277557373046875, -0.01032257080078125, 0.012481689453125, -0.0232391357421875, -0.032623291015625, -0.03289794921875, -0.01358795166015625, 0.009063720703125, 0.007080078125, 0.0025463104248046875, 0.057891845703125, 0.01375579833984375, -0.03912353515625, -0.01033782958984375, 0.025970458984375, 0.0090484619140625, 0.0013265609741210938, -0.004009246826171875, -0.0011987686157226562, -0.03839111328125, -0.01486968994140625, 0.0271759033203125, -0.024810791015625, 0.006504058837890625, 0.059539794921875, -0.0231170654296875, 0.01503753662109375, 0.020111083984375, -0.0159912109375, 0.0215301513671875, -0.018402099609375, -0.0248260498046875, 0.04364013671875, -0.00850677490234375, -0.005123138427734375, -0.004093170166015625, -0.0020427703857421875, -0.0088348388671875, -0.0277099609375, -0.0109100341796875, -0.00907135009765625, 0.00872802734375, 0.1231689453125, -0.05743408203125, -0.016326904296875, 0.0139923095703125, 0.00696563720703125, -0.0017557144165039062, 0.01314544677734375, -0.003925323486328125, -0.0177764892578125, -0.0182037353515625, 0.007526397705078125, -0.031585693359375, -0.00400543212890625, -0.01392364501953125, -0.04669189453125, 0.09979248046875, 0.00884246826171875, 0.014007568359375, 0.0099639892578125, 0.047698974609375, -0.0194549560546875, 0.03717041015625, -0.0271453857421875, 0.035980224609375, 0.01535797119140625, 0.022064208984375, -0.0222015380859375, -0.005771636962890625, 0.0205535888671875, 0.02783203125, 0.08740234375, 0.020599365234375, -0.049560546875, -0.0034542083740234375, 0.0557861328125, 0.0244598388671875, -0.00978851318359375, 0.035369873046875, -0.0242156982421875, 0.0025501251220703125, 0.003643035888671875, -0.014129638671875, 0.028045654296875, 0.004138946533203125, -0.054595947265625, -0.004486083984375, 0.006664276123046875, 0.0199432373046875, -0.0016546249389648438, -0.00716400146484375, -0.045135498046875, -0.00794219970703125, 0.047576904296875, -0.0308990478515625, 0.01131439208984375, -0.0105133056640625, 0.0128326416015625, -0.0665283203125, 0.002376556396484375, -0.0287017822265625, 0.04608154296875, 0.001537322998046875, 0.034027099609375, -0.000156402587890625, 0.01233673095703125, 0.053863525390625, -0.0303497314453125, 0.01174163818359375, 0.0193634033203125, -0.0313720703125, 0.07232666015625, 0.03900146484375, 0.0307464599609375, -0.0077972412109375, 0.00974273681640625, 0.0687255859375, 0.08758544921875, -0.056915283203125, -0.053131103515625, 0.00647735595703125, 0.036712646484375, 0.023529052734375, 0.01041412353515625, 0.05255126953125, 0.00725555419921875, 0.0579833984375, -0.0291748046875, -0.0242919921875, -0.0010385513305664062, 0.047393798828125, -0.01450347900390625, -0.048858642578125, -0.00943756103515625, -0.022979736328125, -0.06732177734375, 0.04815673828125, 0.0261688232421875, 0.08929443359375, 0.01288604736328125, 0.0858154296875, -0.052703857421875, -0.046630859375, 0.0143585205078125, -0.019622802734375, -0.022857666015625, -0.0173797607421875, -0.01045989990234375, -0.040008544921875, 0.05670166015625, 0.03887939453125, 0.045654296875, -0.01279449462890625, 0.01329803466796875, -0.002285003662109375, 0.002460479736328125, -0.001739501953125, 0.01198577880859375, -0.00988006591796875, 0.029327392578125, -0.047332763671875, 0.02001953125, -0.023651123046875, -0.011993408203125, -0.0201568603515625, 0.01203155517578125, -0.0034389495849609375, -0.0205078125, 0.007232666015625, 0.00135040283203125, -0.029052734375, 0.056427001953125, -0.0400390625, 0.051788330078125, -0.0023021697998046875, -0.040283203125, -0.0123443603515625, -0.01320648193359375, -0.0433349609375, 0.037994384765625, 0.04522705078125, 0.0093994140625, -0.01898193359375, 0.008544921875, -0.01364898681640625, 0.01287841796875, -0.01082611083984375, 0.003093719482421875, 0.0028591156005859375, 0.004261016845703125, 0.00826263427734375, -0.02008056640625, -0.0276641845703125, 0.00603485107421875, 0.03887939453125, -0.02813720703125, 0.09942626953125, -0.053558349609375, 0.0056610107421875, -0.044097900390625, 0.0513916015625, -0.0777587890625, -0.024658203125, 0.01151275634765625, -0.0113983154296875, 0.0063629150390625, 0.0094757080078125, -0.0286102294921875, 0.0036067962646484375, 0.040771484375, -0.03643798828125, 0.004093170166015625, -0.01494598388671875, 0.00922393798828125, -0.030609130859375, 0.007602691650390625, -0.0377197265625, -0.03692626953125, -0.056182861328125, -0.022216796875, 0.020294189453125, -0.012237548828125, -0.031494140625, 0.02728271484375, -0.0074310302734375, -0.03131103515625, 0.0160064697265625, -0.0457763671875, 0.035614013671875, 0.046417236328125, -0.008453369140625, -0.0161285400390625, 0.025115966796875, -0.0085601806640625, -0.018951416015625, 0.039154052734375, -0.0236358642578125, 0.02630615234375, -0.07763671875, 0.00991058349609375, 0.004642486572265625, 0.034393310546875, -0.032257080078125, -0.0008440017700195312, -0.0080718994140625, 0.00316619873046875, 0.04168701171875, -0.0213470458984375, -0.0304107666015625, -0.0214691162109375, 0.0053558349609375, 0.0223236083984375, -0.002597808837890625, -0.0135040283203125, -0.055816650390625, -0.006458282470703125, 0.052032470703125, 0.004299163818359375, -0.0281524658203125, 0.007686614990234375, -0.0255279541015625, 0.047607421875, -0.0078125, -0.04083251953125, 0.00530242919921875, 0.0291595458984375, -0.0183868408203125, -0.0099945068359375, -0.044403076171875, -0.01212310791015625, -0.048309326171875, 0.034027099609375, 0.05853271484375, -0.03387451171875, -0.020904541015625, 0.0038433074951171875, -0.0017328262329101562, 0.0657958984375, -0.00939178466796875, -0.012481689453125, 0.0008077621459960938, 0.0161285400390625, -0.044891357421875, -0.0377197265625, 0.030029296875, -0.04437255859375, -0.019287109375, -0.01959228515625, 0.020355224609375, 0.03759765625, -0.0261077880859375, -0.0618896484375, 0.024017333984375, -0.0195159912109375, -0.0294036865234375, -0.058349609375, -0.01462554931640625, -0.01242828369140625, 0.05535888671875, -0.00562286376953125, -0.038665771484375, -0.052337646484375, 0.037322998046875, 0.0003986358642578125, 0.0543212890625, -0.0172576904296875, 0.025543212890625, 0.015777587890625, 0.0333251953125, 0.0293121337890625, -0.01708984375, 0.01055908203125, -0.020904541015625, 0.034149169921875, 0.03289794921875, -0.03350830078125, 0.0019235610961914062, 0.0015430450439453125, -0.00597381591796875, 0.0112457275390625, -0.057159423828125, -0.046234130859375, -0.059356689453125, 0.057525634765625, -0.011260986328125, 0.0098876953125, 0.01245880126953125, -0.0231781005859375, -0.05908203125, -0.043914794921875, -0.04327392578125, 0.0323486328125, -0.08648681640625, -0.0094757080078125, -0.0006203651428222656, 0.0102996826171875, -0.0177764892578125, -0.01561737060546875, 0.00019431114196777344, -0.0099334716796875, 0.0173492431640625, -0.006542205810546875, 0.0034618377685546875, 0.021636962890625, 0.01397705078125, -0.0256805419921875, -0.04412841796875, -0.0050811767578125, 0.00567626953125, -0.0301361083984375, -0.0421142578125, -0.0159912109375, 0.0224761962890625, -0.00677490234375, -0.024566650390625, 0.0242462158203125, 0.013946533203125, 0.0312042236328125, 0.0012969970703125, -0.0003249645233154297, 0.01824951171875, -0.0073394775390625, -0.00286102294921875, -0.00848388671875, 0.0677490234375, 0.00705718994140625, 0.058807373046875, 0.01259613037109375, -0.01861572265625, -0.004150390625, 0.037017822265625, -0.025604248046875, -0.00983428955078125, 0.0018491744995117188, -0.04095458984375, 0.00189208984375, 0.004871368408203125, 0.0024433135986328125, -0.0268402099609375, 0.0033359527587890625, -0.0261383056640625, 0.00823211669921875, 0.016143798828125 ]
23ba1dd0c157ff887cfc5f8a5097dd572231a0a4
Wordpress Stackexchange Q: why doesn't the_content() work in this {single-custom_post_type.php} page? This code is from my page single-publication.php. It outputs the relevant custom fields etc (here wrapped in template tags), but the_content() won't output the post content. I've resorted to using $post->post_content (which works), but the mystery remains: <div class="publication-info"> <?php printf("<h2>%s</h2>", get_the_title() ); ?> <div class="publication-meta publication-credit"><?php the_publication_credit(); ?></div> <div class="publication-meta publication-date"><?php the_publication_date(); ?></div><br /> <div class="publication-blurb" style="font-family:sans-serif;"><?php echo $post->post_content; // the_content() doesn't work. Why not? ?></div> </div> What's going on here? EDIT: I was driven to ask this question because I believed - mistakenly, as it turns out - that $post working and get_the_title() returning a title were an ironclad sign of being inside the loop. But apparently this is not the case. cf Codex on The Loop (second para) and Codex on get_the_title() (parameter list). Can anyone explain? A: There's a good chance your HTML is not included in the loop. Make sure your code looks like this: if(have_posts()): while(have_posts()): the_post(); ?> <div class="publication-info"> <?php printf("<h2>%s</h2>", get_the_title() ); ?> <div class="publication-meta publication-credit"><?php the_publication_credit(); ?></div> <div class="publication-meta publication-date"><?php the_publication_date(); ?></div><br /> <div class="publication-blurb" style="font-family:sans-serif;"><?php echo $post->post_content; // the_content() doesn't work. Why not? ?></div> </div> <?php endwhile; endif;
Q: why doesn't the_content() work in this {single-custom_post_type.php} page? This code is from my page single-publication.php. It outputs the relevant custom fields etc (here wrapped in template tags), but the_content() won't output the post content. I've resorted to using $post->post_content (which works), but the mystery remains: <div class="publication-info"> <?php printf("<h2>%s</h2>", get_the_title() ); ?> <div class="publication-meta publication-credit"><?php the_publication_credit(); ?></div> <div class="publication-meta publication-date"><?php the_publication_date(); ?></div><br /> <div class="publication-blurb" style="font-family:sans-serif;"><?php echo $post->post_content; // the_content() doesn't work. Why not? ?></div> </div> What's going on here? EDIT: I was driven to ask this question because I believed - mistakenly, as it turns out - that $post working and get_the_title() returning a title were an ironclad sign of being inside the loop. But apparently this is not the case. cf Codex on The Loop (second para) and Codex on get_the_title() (parameter list). Can anyone explain? A: There's a good chance your HTML is not included in the loop. Make sure your code looks like this: if(have_posts()): while(have_posts()): the_post(); ?> <div class="publication-info"> <?php printf("<h2>%s</h2>", get_the_title() ); ?> <div class="publication-meta publication-credit"><?php the_publication_credit(); ?></div> <div class="publication-meta publication-date"><?php the_publication_date(); ?></div><br /> <div class="publication-blurb" style="font-family:sans-serif;"><?php echo $post->post_content; // the_content() doesn't work. Why not? ?></div> </div> <?php endwhile; endif; A: Some post-related data is not available to get_posts by default, such as post content through the_content(), or the numeric ID. This is resolved by calling an internal function setup_postdata(), with the $post array as its argument: <?php $args = array( 'posts_per_page' => 3 ); $lastposts = get_posts( $args ); foreach ( $lastposts as $post ) : setup_postdata( $post ); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_content(); ?> <?php endforeach; wp_reset_postdata(); ?> See Access all post data
wordpress
{ "language": "en", "length": 276, "provenance": "stackexchange_00019.jsonl.gz:413177", "question_score": "8", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28905" }
[ -0.015869140625, -0.041046142578125, -0.0018978118896484375, 0.0219268798828125, -0.0285797119140625, -0.0211181640625, 0.0202484130859375, -0.01548004150390625, 0.0249786376953125, 0.0264129638671875, -0.01100921630859375, -0.0279998779296875, -0.032440185546875, -0.034393310546875, -0.03228759765625, -0.042877197265625, 0.046295166015625, -0.008880615234375, 0.05352783203125, 0.012115478515625, 0.0153656005859375, 0.034881591796875, 0.0260162353515625, 0.003459930419921875, 0.0263214111328125, -0.048126220703125, 0.054046630859375, -0.025360107421875, 0.035125732421875, -0.0077056884765625, 0.031585693359375, -0.0158233642578125, 0.04180908203125, 0.017425537109375, -0.06524658203125, 0.00814056396484375, 0.0082855224609375, -0.01105499267578125, -0.02313232421875, 0.04461669921875, 0.0122528076171875, -0.0003712177276611328, 0.04412841796875, -0.002536773681640625, 0.01800537109375, -0.0289764404296875, 0.032073974609375, -0.045745849609375, -0.0093841552734375, 0.0283203125, 0.016143798828125, -0.037841796875, 0.014556884765625, 0.0055694580078125, -0.01261138916015625, -0.0164947509765625, -0.043243408203125, -0.02801513671875, 0.03436279296875, -0.01358795166015625, -0.0218048095703125, -0.040802001953125, 0.044464111328125, -0.0003762245178222656, -0.01277923583984375, 0.010986328125, 0.043365478515625, -0.0057373046875, -0.0294647216796875, -0.0173797607421875, 0.033599853515625, -0.01334381103515625, -0.0013570785522460938, -0.0211181640625, -0.00006306171417236328, -0.0019779205322265625, -0.029296875, -0.037200927734375, 0.00916290283203125, 0.007160186767578125, 0.0129852294921875, 0.0399169921875, -0.054962158203125, 0.023223876953125, 0.01140594482421875, 0.029083251953125, -0.01800537109375, -0.031646728515625, -0.0036792755126953125, -0.03570556640625, -0.0212860107421875, -0.01445770263671875, 0.02557373046875, -0.022674560546875, -0.032867431640625, -0.04107666015625, 0.035919189453125, 0.09393310546875, -0.0202484130859375, 0.005069732666015625, -0.01151275634765625, -0.028656005859375, 0.0205230712890625, -0.06005859375, 0.0239105224609375, 0.001903533935546875, -0.0205078125, 0.01285552978515625, 0.0638427734375, 0.04248046875, -0.0021724700927734375, 0.0146636962890625, -0.023529052734375, -0.043701171875, 0.0025844573974609375, 0.0192108154296875, -0.039306640625, 0.006023406982421875, 0.023712158203125, -0.01412200927734375, 0.043731689453125, 0.041717529296875, 0.0245361328125, -0.036712646484375, -0.014129638671875, 0.0197296142578125, -0.030487060546875, -0.07891845703125, 0.03533935546875, 0.0183868408203125, -0.040008544921875, -0.0240936279296875, 0.0377197265625, 0.046905517578125, 0.03399658203125, -0.0254974365234375, 0.007106781005859375, -0.00467681884765625, -0.02764892578125, 0.0226287841796875, -0.04486083984375, 0.010589599609375, 0.05560302734375, -0.060821533203125, -0.0517578125, 0.009521484375, 0.02587890625, 0.0214080810546875, -0.035980224609375, -0.08349609375, 0.01187896728515625, 0.004436492919921875, 0.0206451416015625, -0.0140838623046875, -0.0014047622680664062, -0.06524658203125, 0.0205841064453125, -0.043212890625, 0.03619384765625, -0.043304443359375, 0.06109619140625, 0.004688262939453125, -0.01708984375, 0.008209228515625, -0.0240325927734375, -0.0037746429443359375, -0.048492431640625, -0.006305694580078125, 0.0033435821533203125, 0.03131103515625, -0.031463623046875, 0.01824951171875, -0.0328369140625, -0.01446533203125, -0.017486572265625, 0.0072174072265625, -0.006519317626953125, -0.01166534423828125, 0.02728271484375, 0.01242828369140625, -0.047576904296875, -0.039398193359375, 0.02703857421875, -0.03582763671875, -0.05865478515625, 0.010040283203125, 0.0102996826171875, 0.0129547119140625, 0.016998291015625, -0.0029430389404296875, 0.050262451171875, 0.02728271484375, -0.04608154296875, 0.0305938720703125, 0.0264892578125, -0.0231781005859375, -0.0241546630859375, -0.0257415771484375, 0.00246429443359375, -0.00815582275390625, 0.0084991455078125, -0.003345489501953125, 0.01519012451171875, -0.0025005340576171875, -0.0062103271484375, -0.01708984375, -0.00445556640625, 0.012725830078125, -0.0182342529296875, -0.0009102821350097656, 0.0258331298828125, -0.003368377685546875, -0.01551055908203125, -0.0109405517578125, -0.039947509765625, -0.027069091796875, 0.0130615234375, 0.0037708282470703125, -0.003528594970703125, 0.011688232421875, 0.0026092529296875, -0.006908416748046875, -0.01605224609375, 0.037872314453125, 0.1053466796875, 0.00234222412109375, 0.0050201416015625, -0.0258636474609375, 0.0667724609375, 0.012542724609375, -0.04364013671875, 0.0094757080078125, 0.0167999267578125, 0.01030731201171875, -0.057403564453125, -0.01285552978515625, -0.03704833984375, -0.019866943359375, -0.0120391845703125, 0.059051513671875, 0.0284881591796875, 0.07672119140625, -0.030120849609375, -0.0335693359375, 0.06903076171875, -0.0154876708984375, 0.006160736083984375, -0.036529541015625, 0.0242767333984375, 0.0533447265625, 0.00936126708984375, 0.00829315185546875, 0.00846099853515625, -0.03314208984375, 0.0150146484375, 0.0355224609375, -0.0260467529296875, -0.0067138671875, -0.0109405517578125, 0.006946563720703125, 0.01392364501953125, 0.0250091552734375, 0.012298583984375, -0.0005612373352050781, 0.0190582275390625, 0.0280609130859375, 0.03125, 0.0289306640625, -0.023468017578125, 0.0009899139404296875, 0.0047149658203125, 0.039215087890625, -0.0078582763671875, 0.03802490234375, 0.002773284912109375, -0.0052490234375, -0.035552978515625, -0.0078125, -0.02911376953125, 0.005893707275390625, 0.01727294921875, 0.06353759765625, -0.00876617431640625, -0.0101776123046875, -0.00807952880859375, -0.04022216796875, -0.0204315185546875, 0.0168914794921875, 0.0239105224609375, -0.007732391357421875, 0.00018262863159179688, 0.047821044921875, -0.00521087646484375, 0.049560546875, 0.007213592529296875, -0.01364898681640625, 0.01776123046875, -0.039794921875, 0.03424072265625, -0.040618896484375, 0.0296783447265625, 0.043060302734375, -0.0139007568359375, 0.00852203369140625, -0.004825592041015625, -0.0018091201782226562, -0.0096435546875, 0.0108489990234375, -0.004650115966796875, -0.01045989990234375, -0.035675048828125, 0.0124664306640625, 0.03076171875, 0.09637451171875, 0.01268768310546875, -0.045166015625, 0.0280609130859375, 0.047698974609375, -0.06671142578125, -0.108642578125, 0.03118896484375, -0.053802490234375, -0.0037555694580078125, -0.035430908203125, -0.025787353515625, -0.0121612548828125, -0.02178955078125, -0.018585205078125, 0.0181884765625, -0.01454925537109375, -0.074462890625, -0.045562744140625, -0.1038818359375, 0.002838134765625, -0.0027599334716796875, 0.04779052734375, 0.00023245811462402344, 0.0660400390625, 0.0211944580078125, -0.05255126953125, 0.0086212158203125, 0.043548583984375, -0.01386260986328125, 0.01824951171875, -0.0119476318359375, 0.006847381591796875, -0.0166473388671875, 0.005512237548828125, -0.0235443115234375, -0.00736236572265625, 0.0011014938354492188, -0.02301025390625, -0.0233001708984375, 0.02777099609375, 0.03704833984375, 0.0265655517578125, 0.0234527587890625, 0.03924560546875, 0.051177978515625, -0.011688232421875, -0.033782958984375, 0.005107879638671875, -0.04376220703125, 0.003978729248046875, 0.0166168212890625, 0.01220703125, -0.00327301025390625, 0.0255584716796875, -0.044952392578125, 0.007167816162109375, -0.01299285888671875, -0.0218048095703125, 0.04827880859375, -0.0107574462890625, -0.01285552978515625, 0.02734375, 0.00662994384765625, 0.004787445068359375, 0.02178955078125, 0.0095672607421875, 0.051483154296875, 0.00946807861328125, 0.01849365234375, -0.043731689453125, -0.060760498046875, 0.052459716796875, -0.0081329345703125, -0.0051422119140625, -0.0213165283203125, -0.042205810546875, 0.01474761962890625, 0.10699462890625, -0.071044921875, -0.018890380859375, -0.0165252685546875, 0.022857666015625, -0.01062774658203125, -0.0662841796875, -0.01190948486328125, -0.01444244384765625, -0.0863037109375, -0.01102447509765625, -0.010955810546875, -0.0200042724609375, -0.0235137939453125, 0.016357421875, -0.05712890625, -0.037994384765625, 0.008453369140625, -0.004360198974609375, -0.006404876708984375, 0.032135009765625, -0.041961669921875, 0.042327880859375, 0.0003726482391357422, -0.038482666015625, -0.030914306640625, -0.021026611328125, 0.0298004150390625, 0.035797119140625, -0.0034809112548828125, 0.0193634033203125, -0.0301361083984375, 0.0240325927734375, 0.027801513671875, 0.023956298828125, -0.006008148193359375, -0.039459228515625, 0.03155517578125, 0.0430908203125, 0.0173187255859375, 0.0165252685546875, -0.0211334228515625, 0.01099395751953125, -0.010040283203125, 0.059234619140625, -0.01385498046875, -0.0021457672119140625, -0.0181884765625, -0.016448974609375, -0.022979736328125, 0.0186920166015625, 0.016632080078125, -0.0011234283447265625, 0.01218414306640625, -0.009063720703125, 0.0087890625, -0.024261474609375, 0.0310821533203125, 0.00994873046875, -0.014984130859375, -0.00788116455078125, 0.060638427734375, 0.0283203125, -0.0372314453125, -0.03460693359375, 0.005847930908203125, 0.026519775390625, -0.01523590087890625, 0.038604736328125, 0.008758544921875, -0.029022216796875, 0.0780029296875, -0.0108642578125, 0.0160675048828125, -0.037841796875, 0.05426025390625, -0.007480621337890625, 0.0016584396362304688, 0.01456451416015625, -0.0105133056640625, 0.040679931640625, 0.030975341796875, 0.00029158592224121094, -0.0144500732421875, 0.023468017578125, 0.03509521484375, -0.019683837890625, 0.0142822265625, -0.0142974853515625, -0.0122833251953125, -0.01201629638671875, 0.0170135498046875, 0.041015625, 0.04522705078125, -0.00383758544921875, 0.0081939697265625, -0.00362396240234375, 0.01922607421875, -0.01511383056640625, -0.0190277099609375, 0.0040435791015625, 0.03399658203125, -0.0020503997802734375, 0.021270751953125, -0.01250457763671875, -0.0166778564453125, 0.048858642578125, 0.0091705322265625, -0.03302001953125, 0.0022792816162109375, -0.01352691650390625, 0.015960693359375, -0.0013942718505859375, 0.0281829833984375, -0.01399993896484375, 0.0262298583984375, 0.00809478759765625, 0.0021991729736328125, 0.057586669921875, 0.0271148681640625, 0.001155853271484375, 0.026611328125, 0.0106964111328125, -0.0062103271484375, 0.01320648193359375, 0.055328369140625, -0.01453399658203125, 0.036376953125, -0.029510498046875, 0.038604736328125, 0.0211944580078125, 0.04638671875, 0.01146697998046875, -0.023895263671875, -0.01107025146484375, 0.025177001953125, -0.0117645263671875, -0.033935546875, -0.0161895751953125, 0.01352691650390625, 0.03643798828125, 0.00542449951171875, -0.0081329345703125, 0.02117919921875, -0.0005693435668945312, -0.03802490234375, 0.0218048095703125, 0.035400390625, -0.0174560546875, -0.016448974609375, 0.00518035888671875, -0.004058837890625, 0.03790283203125, -0.01120758056640625, -0.004749298095703125, -0.04583740234375, -0.0228424072265625, 0.00153350830078125, -0.025787353515625, -0.007579803466796875, 0.004878997802734375, -0.01751708984375, -0.02410888671875, -0.0055694580078125, 0.0103302001953125, 0.0012044906616210938, -0.01255035400390625, -0.0174560546875, 0.036376953125, -0.033233642578125, 0.051666259765625, -0.045135498046875, 0.0019006729125976562, -0.07574462890625, 0.0023326873779296875, 0.08355712890625, 0.08099365234375, -0.025787353515625, 0.020416259765625, -0.06658935546875, -0.0012731552124023438, -0.0307159423828125, -0.06793212890625, -0.02923583984375, -0.042388916015625, 0.0207366943359375, 0.03399658203125, -0.0012617111206054688, -0.04962158203125, -0.045196533203125, 0.0016384124755859375, 0.04119873046875, 0.0780029296875, -0.0172271728515625, 0.09185791015625, 0.0299224853515625, 0.06939697265625, 0.028228759765625, 0.0557861328125, -0.01593017578125, -0.0259552001953125, -0.019805908203125, -0.08221435546875, 0.01200103759765625, 0.029815673828125, -0.0044097900390625, 0.036376953125, -0.006801605224609375, 0.03228759765625, -0.02069091796875, -0.0013418197631835938, -0.014495849609375, -0.002941131591796875, 0.0274505615234375, 0.0259857177734375, -0.0418701171875, 0.0499267578125, -0.0288543701171875, -0.0106964111328125, -0.0037288665771484375, -0.0290679931640625, 0.02752685546875, -0.01207733154296875, -0.002002716064453125, 0.043182373046875, -0.0077056884765625, -0.003185272216796875, 0.0574951171875, 0.00547027587890625, 0.030670166015625, 0.0189208984375, 0.007049560546875, 0.031707763671875, 0.0229949951171875, 0.0243072509765625, -0.025634765625, 0.05474853515625, -0.003124237060546875, -0.0018711090087890625, 0.04620361328125, -0.02630615234375, 0.031463623046875, 0.0238800048828125, 0.044586181640625, -0.03997802734375, 0.00678253173828125, 0.0102386474609375, -0.0204925537109375, 0.040679931640625, -0.0222320556640625, -0.00476837158203125, -0.01177215576171875, 0.035186767578125, 0.004795074462890625, -0.0278778076171875, -0.00231170654296875, -0.0042877197265625, 0.0242156982421875, -0.031585693359375, 0.026123046875, -0.003875732421875, -0.064453125, -0.005451202392578125, 0.055755615234375, 0.0015077590942382812, -0.026763916015625, -0.00661468505859375, -0.01549530029296875, -0.0350341796875, -0.0435791015625, -0.01450347900390625, 0.0005960464477539062, -0.00311279296875, 0.003040313720703125, 0.033172607421875, -0.0008969306945800781, 0.08123779296875, -0.0223236083984375, 0.01947021484375, 0.057342529296875, -0.04681396484375, -0.0457763671875, -0.01522064208984375, 0.007793426513671875, 0.017669677734375, -0.021820068359375, 0.0245513916015625, -0.0245513916015625, -0.03216552734375, 0.00992584228515625, -0.021942138671875, 0.0347900390625, -0.00745391845703125, -0.02020263671875, 0.040802001953125, -0.0203704833984375, -0.0294952392578125, 0.0126495361328125, 0.0279693603515625, -0.01276397705078125, 0.0285186767578125, 0.0182952880859375, 0.017608642578125, 0.0005421638488769531, 0.0070037841796875, -0.075439453125, 0.08953857421875, 0.0218658447265625, 0.02679443359375, 0.00018930435180664062, 0.032012939453125, -0.0355224609375, -0.011016845703125, -0.050384521484375, 0.04248046875, -0.020843505859375, 0.05340576171875, -0.06903076171875, -0.0242462158203125, 0.01076507568359375, 0.0579833984375, 0.013336181640625, 0.00006866455078125, -0.061004638671875, -0.014862060546875, 0.048309326171875, 0.0377197265625, 0.0190887451171875, 0.049530029296875, 0.002666473388671875, 0.059722900390625, 0.0310516357421875, -0.056304931640625, 0.02056884765625, -0.0283660888671875, -0.014617919921875, 0.049896240234375, 0.0306243896484375, -0.0016908645629882812, 0.0190277099609375, -0.0054168701171875, -0.1009521484375, 0.0178985595703125, 0.0718994140625, 0.0012311935424804688, -0.0185394287109375, 0.048370361328125, 0.038787841796875, -0.046905517578125, 0.017547607421875, -0.049346923828125, 0.0594482421875, 0.00628662109375, 0.01641845703125, -0.025390625, -0.004543304443359375, 0.040435791015625, 0.009735107421875, 0.0008139610290527344, 0.04205322265625, 0.02056884765625, -0.00637054443359375, 0.0114288330078125, -0.008392333984375, -0.051605224609375, 0.0307159423828125, 0.0797119140625, 0.0295867919921875, -0.03485107421875, 0.0063323974609375, 0.0165252685546875, 0.00013339519500732422, -0.026947021484375, -0.044708251953125, -0.0399169921875, 0.033294677734375, 0.0170135498046875, -0.029510498046875, -0.019775390625, 0.0057373046875, 0.0155487060546875, -0.00679779052734375, -0.0145263671875, 0.0092926025390625, -0.036468505859375, -0.054473876953125, 0.0406494140625, 0.022308349609375, 0.0745849609375, -0.0059967041015625, 0.0982666015625, -0.051727294921875, -0.029022216796875, 0.0244598388671875, -0.0150909423828125, -0.03369140625, -0.01155853271484375, -0.024200439453125, -0.04156494140625, 0.002948760986328125, 0.022979736328125, 0.0474853515625, -0.01053619384765625, 0.0084991455078125, -0.0007123947143554688, -0.0035648345947265625, 0.0062255859375, 0.00952911376953125, -0.0135498046875, -0.0250701904296875, -0.0246429443359375, -0.033538818359375, 0.0025157928466796875, -0.0183868408203125, 0.018707275390625, -0.0110015869140625, 0.01186370849609375, -0.0231781005859375, 0.04400634765625, 0.0016813278198242188, -0.02777099609375, 0.0193634033203125, 0.0147552490234375, 0.09063720703125, -0.00029659271240234375, -0.06683349609375, -0.0144805908203125, -0.0192718505859375, -0.0787353515625, 0.035858154296875, 0.058074951171875, -0.00536346435546875, -0.0172271728515625, -0.04705810546875, -0.00429534912109375, -0.018035888671875, 0.008209228515625, 0.00574493408203125, 0.041412353515625, -0.0000826120376586914, 0.0007891654968261719, -0.06298828125, -0.034515380859375, -0.026123046875, 0.037261962890625, -0.02532958984375, 0.046722412109375, -0.003803253173828125, 0.0289459228515625, -0.006439208984375, 0.000690460205078125, -0.0232391357421875, -0.032196044921875, 0.0111541748046875, -0.01091766357421875, 0.015716552734375, -0.004337310791015625, -0.060638427734375, -0.0017557144165039062, 0.061767578125, -0.034393310546875, -0.0226287841796875, 0.047515869140625, 0.022369384765625, -0.05084228515625, -0.0150299072265625, -0.02734375, 0.026519775390625, -0.002201080322265625, -0.019744873046875, 0.055084228515625, -0.0025157928466796875, -0.00852203369140625, 0.01433563232421875, 0.05499267578125, -0.03240966796875, 0.0239105224609375, -0.01525115966796875, 0.05279541015625, 0.046417236328125, 0.0178680419921875, -0.0203094482421875, -0.003322601318359375, -0.00988006591796875, 0.016265869140625, 0.032928466796875, 0.01479339599609375, 0.0084381103515625, 0.0299072265625, 0.0019502639770507812, 0.004573822021484375, 0.0254364013671875, -0.0265960693359375, 0.00482940673828125, 0.031280517578125, -0.0198211669921875, -0.0220794677734375, -0.0109100341796875, -0.005878448486328125, -0.044952392578125, -0.0211639404296875, 0.002696990966796875, -0.03466796875, -0.0210723876953125, -0.0288848876953125, -0.046356201171875, 0.0168304443359375, -0.00800323486328125, 0.0006251335144042969, -0.034576416015625, -0.00702667236328125, -0.00977325439453125, -0.016998291015625, 0.040771484375, 0.0002658367156982422, 0.0304412841796875, -0.03204345703125, 0.0236968994140625, -0.0212860107421875, -0.0171356201171875, 0.004669189453125, 0.022857666015625, 0.0318603515625, -0.0210723876953125, -0.022979736328125, 0.01091766357421875, -0.01690673828125, 0.05926513671875, 0.02862548828125, -0.0009341239929199219, -0.0021381378173828125, 0.00475311279296875, -0.028106689453125, -0.04290771484375, 0.03857421875, -0.045166015625, -0.0662841796875, 0.01399993896484375, 0.0018634796142578125, 0.016998291015625, -0.02056884765625, -0.0022335052490234375, 0.0142822265625, 0.032958984375, -0.016448974609375, -0.01558685302734375, -0.02490234375, -0.00012433528900146484, -0.0028839111328125, -0.0029201507568359375, -0.0225677490234375, -0.043853759765625, 0.0216522216796875, 0.0003407001495361328, -0.0009179115295410156, 0.029083251953125, 0.01116180419921875, -0.04632568359375, -0.0026569366455078125, -0.018096923828125, -0.0267333984375, -0.00463104248046875, 0.004131317138671875, -0.0191650390625, -0.006023406982421875, -0.05810546875, -0.0396728515625, -0.0118255615234375, 0.04998779296875, -0.006168365478515625, -0.01299285888671875, -0.0119781494140625, -0.01212310791015625, 0.02557373046875, 0.0193328857421875, 0.004657745361328125, -0.0198516845703125, 0.031951904296875, 0.023223876953125, -0.07958984375, 0.032135009765625, 0.042022705078125, -0.032745361328125, -0.003673553466796875, -0.0011539459228515625, -0.0232391357421875, -0.015594482421875, 0.0011968612670898438, -0.038177490234375, -0.0113983154296875, -0.007091522216796875, 0.01239013671875, -0.01544189453125, -0.0396728515625, 0.04400634765625, -0.026397705078125, -0.00286865234375, -0.004886627197265625, 0.02227783203125, 0.01300811767578125, 0.027008056640625, 0.0286102294921875, 0.03302001953125, -0.0233001708984375, -0.01195526123046875, 0.0347900390625, 0.0374755859375, 0.01007080078125, -0.0246429443359375, 0.0111846923828125, 0.01690673828125, -0.0185699462890625, -0.0055694580078125, 0.02838134765625, 0.0313720703125, -0.0309295654296875, 0.0626220703125, -0.0141143798828125, 0.06304931640625, 0.0005679130554199219, 0.02081298828125, 0.007152557373046875, -0.0003800392150878906, 0.0190277099609375, 0.0052642822265625, 0.0279083251953125, -0.01678466796875, 0.027557373046875, 0.00608062744140625, 0.00055694580078125, -0.0164947509765625, -0.041900634765625, 0.01100921630859375 ]
c273927ca43cd1b48cc782a3bb2b1fb92be59317
Wordpress Stackexchange Q: add_filter the_content str_replace after shortcode I want to add a PHP str_replace to the add_filter('the_content') function. I believe my problem is that the shortcodes are loading after the str_replace is called. I have a shortcode that outputs a form, i want to make it that in all HTML form tags, the attribute autocomplete='off'. Heres the code i have. add_filter('the_content', 'disable_autocomplete'); function disable_autocomplete( $content ) { return str_replace('<form', '<form autocomplete="off"', $content); } Any ideas? A: You can change the priority of actions and filters, it's the third argument of add_filter (and add_action) and it defaults to 10. So change it to a high number and have your filter fire way after the shortcodes and other stuff are inserted. <?php add_filter('the_content', 'disable_autocomplete', 99); function disable_autocomplete( $content ) { return str_replace('<form', '<form autocomplete="off"', $content); }
Q: add_filter the_content str_replace after shortcode I want to add a PHP str_replace to the add_filter('the_content') function. I believe my problem is that the shortcodes are loading after the str_replace is called. I have a shortcode that outputs a form, i want to make it that in all HTML form tags, the attribute autocomplete='off'. Heres the code i have. add_filter('the_content', 'disable_autocomplete'); function disable_autocomplete( $content ) { return str_replace('<form', '<form autocomplete="off"', $content); } Any ideas? A: You can change the priority of actions and filters, it's the third argument of add_filter (and add_action) and it defaults to 10. So change it to a high number and have your filter fire way after the shortcodes and other stuff are inserted. <?php add_filter('the_content', 'disable_autocomplete', 99); function disable_autocomplete( $content ) { return str_replace('<form', '<form autocomplete="off"', $content); }
wordpress
{ "language": "en", "length": 133, "provenance": "stackexchange_00019.jsonl.gz:413179", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28910" }
[ 0.07415771484375, -0.006649017333984375, 0.037994384765625, -0.059173583984375, 0.027374267578125, -0.03131103515625, 0.05804443359375, -0.01129150390625, 0.01593017578125, 0.044769287109375, -0.0075225830078125, -0.026947021484375, 0.0011358261108398438, -0.024444580078125, -0.04345703125, -0.0286407470703125, -0.006046295166015625, 0.0016021728515625, 0.002716064453125, -0.04681396484375, 0.019805908203125, -0.0484619140625, 0.00395965576171875, -0.006038665771484375, 0.004291534423828125, -0.040283203125, 0.07781982421875, -0.0246734619140625, 0.01367950439453125, -0.01140594482421875, 0.00960540771484375, -0.00881195068359375, 0.054290771484375, 0.040618896484375, -0.10797119140625, 0.03924560546875, -0.023468017578125, 0.00818634033203125, -0.0239105224609375, 0.0290069580078125, 0.0241241455078125, -0.01374053955078125, 0.035980224609375, 0.0029201507568359375, -0.0039825439453125, -0.0178070068359375, 0.05218505859375, -0.030059814453125, 0.0091094970703125, 0.0099639892578125, 0.023712158203125, 0.0178680419921875, 0.04034423828125, -0.050537109375, 0.0166778564453125, 0.0257110595703125, -0.07244873046875, 0.04345703125, 0.0245361328125, 0.06170654296875, 0.0147247314453125, 0.003631591796875, -0.01482391357421875, -0.031982421875, -0.00518798828125, 0.0134735107421875, -0.0014476776123046875, 0.00022876262664794922, -0.050384521484375, -0.00753021240234375, 0.03375244140625, -0.05548095703125, 0.007659912109375, 0.0028171539306640625, -0.00748443603515625, -0.0117340087890625, -0.00751495361328125, -0.00014150142669677734, 0.026641845703125, -0.004581451416015625, 0.0180816650390625, 0.0146636962890625, -0.0006480216979980469, -0.0172882080078125, 0.0039520263671875, -0.0133514404296875, -0.00531005859375, -0.00832366943359375, -0.01904296875, -0.006816864013671875, -0.01751708984375, -0.01175689697265625, 0.0283203125, 0.0046234130859375, -0.0185546875, -0.00913238525390625, 0.01203155517578125, 0.057098388671875, 0.006458282470703125, 0.0418701171875, 0.01361083984375, -0.050262451171875, 0.0711669921875, -0.07476806640625, 0.0018453598022460938, 0.029693603515625, -0.0258941650390625, -0.01314544677734375, 0.053985595703125, 0.03680419921875, 0.01113128662109375, -0.0013113021850585938, -0.0147857666015625, 0.0021877288818359375, -0.051605224609375, 0.007511138916015625, -0.0462646484375, -0.01311492919921875, 0.0012607574462890625, 0.01300048828125, -0.0013895034790039062, -0.0007891654968261719, -0.0199127197265625, -0.038299560546875, 0.01413726806640625, -0.02490234375, -0.022308349609375, 0.02239990234375, 0.0272216796875, -0.012420654296875, -0.035675048828125, 0.0103759765625, 0.06256103515625, 0.04864501953125, 0.0341796875, -0.00794219970703125, -0.01267242431640625, -0.028289794921875, -0.0279388427734375, 0.038055419921875, 0.005283355712890625, -0.048675537109375, -0.0285491943359375, -0.00946044921875, 0.0200042724609375, -0.0012865066528320312, 0.0190277099609375, 0.031219482421875, -0.00939178466796875, -0.052276611328125, 0.04974365234375, -0.01369476318359375, 0.060150146484375, 0.0030517578125, -0.08349609375, 0.0184173583984375, 0.0069122314453125, -0.0232696533203125, -0.054595947265625, -0.058990478515625, 0.0323486328125, -0.01068878173828125, -0.022064208984375, -0.050323486328125, -0.056396484375, -0.038482666015625, -0.037811279296875, 0.010986328125, 0.0153350830078125, -0.0247802734375, 0.006755828857421875, 0.0012712478637695312, -0.00444793701171875, -0.0179443359375, -0.0032024383544921875, 0.0059967041015625, -0.00606536865234375, 0.0667724609375, 0.0310211181640625, -0.00653839111328125, -0.00420379638671875, -0.028411865234375, 0.1107177734375, -0.0208740234375, -0.070068359375, 0.08319091796875, 0.01116943359375, 0.0745849609375, -0.00164794921875, -0.0038394927978515625, 0.037322998046875, 0.043304443359375, -0.00995635986328125, -0.0040130615234375, 0.011627197265625, -0.05938720703125, 0.0017976760864257812, -0.0265655517578125, 0.008087158203125, 0.0151519775390625, 0.0504150390625, -0.0219879150390625, 0.027679443359375, -0.02081298828125, -0.0875244140625, 0.00453948974609375, -0.032867431640625, 0.017822265625, -0.03619384765625, -0.021026611328125, 0.01800537109375, -0.042236328125, -0.0163726806640625, 0.056549072265625, 0.00925445556640625, 0.0067291259765625, -0.047576904296875, 0.0302581787109375, 0.0014677047729492188, 0.08538818359375, 0.0129852294921875, -0.01617431640625, -0.006175994873046875, -0.0377197265625, 0.0767822265625, -0.01177978515625, -0.01837158203125, -0.0236053466796875, 0.0042877197265625, -0.017120361328125, -0.05535888671875, 0.06500244140625, 0.034271240234375, 0.0179901123046875, -0.0516357421875, -0.01177215576171875, -0.03759765625, -0.0482177734375, -0.0178680419921875, 0.07611083984375, 0.04296875, 0.0782470703125, 0.0244293212890625, 0.01129913330078125, 0.0859375, 0.011444091796875, 0.036590576171875, -0.0300445556640625, 0.028961181640625, 0.0721435546875, -0.022918701171875, 0.002048492431640625, 0.001739501953125, -0.06488037109375, 0.0114593505859375, 0.0185394287109375, -0.0152130126953125, -0.00937652587890625, 0.02667236328125, -0.038299560546875, 0.0255126953125, -0.059234619140625, -0.0292510986328125, -0.031646728515625, 0.0230712890625, 0.030548095703125, 0.015411376953125, 0.0113372802734375, -0.031982421875, 0.0345458984375, 0.0242462158203125, -0.00989532470703125, -0.01861572265625, 0.026458740234375, 0.0167388916015625, -0.053863525390625, -0.0167694091796875, 0.007465362548828125, -0.0261993408203125, -0.0088653564453125, -0.003299713134765625, 0.0306854248046875, 0.0047607421875, -0.0028228759765625, 0.004436492919921875, -0.0281982421875, 0.004154205322265625, 0.00067138671875, -0.0221405029296875, -0.0372314453125, -0.0036792755126953125, 0.0264434814453125, -0.013092041015625, -0.004756927490234375, 0.04248046875, -0.0171966552734375, 0.047119140625, -0.0254974365234375, 0.0341796875, -0.01522064208984375, 0.0281219482421875, 0.05224609375, 0.007236480712890625, -0.0214385986328125, 0.007476806640625, 0.01309967041015625, 0.00785064697265625, -0.0201568603515625, -0.01175689697265625, 0.05694580078125, -0.0904541015625, 0.0254974365234375, 0.02423095703125, 0.01178741455078125, 0.00006407499313354492, -0.0311126708984375, -0.0155029296875, 0.0287017822265625, -0.0552978515625, -0.020294189453125, 0.0156097412109375, 0.0029659271240234375, -0.022705078125, 0.014373779296875, -0.00801849365234375, 0.0019197463989257812, 0.018463134765625, -0.009368896484375, -0.021759033203125, 0.0030841827392578125, -0.0193634033203125, -0.01287841796875, -0.024444580078125, 0.052337646484375, -0.01084136962890625, 0.0166778564453125, 0.0218963623046875, 0.058349609375, 0.0203094482421875, -0.048919677734375, 0.03759765625, -0.00396728515625, -0.0196533203125, 0.056121826171875, 0.03472900390625, -0.067138671875, -0.0160369873046875, -0.0096893310546875, 0.02215576171875, 0.028167724609375, -0.0165557861328125, 0.00894927978515625, -0.007110595703125, 0.0533447265625, 0.036834716796875, 0.033233642578125, 0.01959228515625, 0.032379150390625, 0.04730224609375, -0.0238037109375, 0.01377105712890625, 0.005115509033203125, -0.0192718505859375, 0.0096282958984375, 0.031646728515625, -0.04803466796875, -0.0091705322265625, 0.00682830810546875, -0.029937744140625, 0.0131072998046875, 0.040435791015625, -0.016510009765625, -0.0008482933044433594, -0.016387939453125, -0.0455322265625, 0.00881195068359375, 0.0232391357421875, -0.005710601806640625, 0.032623291015625, 0.02978515625, 0.03240966796875, 0.0279541015625, -0.0107269287109375, -0.004489898681640625, -0.02276611328125, 0.043212890625, -0.016571044921875, 0.024627685546875, -0.0601806640625, -0.0182037353515625, -0.042724609375, 0.07635498046875, -0.05194091796875, -0.0015010833740234375, 0.0205535888671875, 0.005901336669921875, 0.029296875, -0.027496337890625, -0.04876708984375, -0.0294647216796875, -0.053741455078125, -0.0011043548583984375, -0.0156707763671875, -0.017303466796875, -0.004669189453125, -0.0169219970703125, -0.018890380859375, -0.0243682861328125, 0.036376953125, -0.057220458984375, 0.01763916015625, 0.00707244873046875, -0.0193939208984375, -0.0103607177734375, -0.0245819091796875, -0.0255584716796875, -0.072265625, -0.003021240234375, -0.0304107666015625, 0.038543701171875, 0.043487548828125, -0.045684814453125, -0.0380859375, 0.017608642578125, 0.028106689453125, -0.0214996337890625, 0.0275115966796875, -0.0082855224609375, 0.00743865966796875, 0.0265960693359375, 0.03399658203125, -0.0166015625, -0.01519775390625, 0.040252685546875, 0.002857208251953125, 0.0679931640625, -0.0192413330078125, -0.02801513671875, 0.030029296875, -0.03717041015625, -0.0462646484375, -0.039031982421875, -0.05108642578125, -0.00859832763671875, -0.051788330078125, 0.01143646240234375, -0.01922607421875, -0.060760498046875, 0.045806884765625, 0.0200958251953125, -0.0199432373046875, -0.013641357421875, 0.0279388427734375, 0.023590087890625, -0.03070068359375, 0.018463134765625, 0.017852783203125, 0.034820556640625, -0.035430908203125, 0.01334381103515625, -0.01337432861328125, -0.0479736328125, 0.08514404296875, -0.025848388671875, 0.0306549072265625, -0.04364013671875, 0.06561279296875, 0.0177764892578125, 0.0234832763671875, 0.0033626556396484375, 0.0261993408203125, -0.0164794921875, -0.0289154052734375, -0.01885986328125, 0.02618408203125, 0.049591064453125, -0.0165863037109375, -0.0114288330078125, 0.0030517578125, 0.01508331298828125, -0.0160369873046875, 0.0104827880859375, 0.059967041015625, -0.0079345703125, -0.00489044189453125, 0.0127105712890625, -0.0117645263671875, 0.0157623291015625, 0.006378173828125, 0.01160430908203125, 0.0323486328125, -0.01837158203125, 0.0662841796875, -0.044647216796875, -0.00913238525390625, -0.01442718505859375, -0.01120758056640625, 0.03875732421875, -0.00037670135498046875, -0.01552581787109375, -0.01103973388671875, -0.01910400390625, 0.0010118484497070312, -0.00783538818359375, 0.03143310546875, -0.0102386474609375, 0.0246124267578125, 0.0160675048828125, 0.03924560546875, 0.039459228515625, 0.051849365234375, 0.0165252685546875, -0.028594970703125, -0.001026153564453125, -0.0214996337890625, -0.0007572174072265625, 0.00302886962890625, -0.023773193359375, -0.0024471282958984375, -0.0030059814453125, 0.0186309814453125, -0.00498199462890625, 0.006488800048828125, 0.0221710205078125, 0.01453399658203125, 0.00707244873046875, -0.01226043701171875, 0.013275146484375, -0.016998291015625, -0.036163330078125, 0.019256591796875, 0.02606201171875, -0.046051025390625, 0.01366424560546875, 0.014434814453125, 0.00786590576171875, -0.000682830810546875, 0.0206146240234375, -0.0040740966796875, -0.0243072509765625, -0.0286102294921875, -0.00457000732421875, 0.0196380615234375, -0.01334381103515625, -0.001392364501953125, 0.0040283203125, -0.0256500244140625, -0.00800323486328125, 0.0338134765625, -0.029998779296875, -0.013336181640625, -0.024810791015625, 0.01580810546875, -0.043701171875, -0.01108551025390625, -0.038909912109375, 0.00499725341796875, -0.01239776611328125, 0.0158233642578125, 0.027618408203125, -0.0127105712890625, 0.01763916015625, -0.028961181640625, 0.019012451171875, 0.01200103759765625, 0.0081329345703125, -0.0058135986328125, -0.0257568359375, -0.037109375, -0.00948333740234375, -0.05120849609375, -0.00278472900390625, -0.041656494140625, -0.0531005859375, -0.01044464111328125, -0.0011243820190429688, -0.004352569580078125, 0.02581787109375, -0.0157623291015625, 0.01324462890625, 0.02569580078125, -0.00428009033203125, -0.0265960693359375, 0.062286376953125, 0.0098876953125, 0.0192718505859375, 0.0159454345703125, 0.019256591796875, 0.040374755859375, 0.033966064453125, 0.0313720703125, -0.059967041015625, 0.006893157958984375, -0.045166015625, -0.05523681640625, -0.01007843017578125, -0.05059814453125, 0.06341552734375, 0.07025146484375, -0.0156097412109375, 0.0292205810546875, -0.025177001953125, -0.00975799560546875, -0.0278167724609375, 0.01149749755859375, -0.0440673828125, 0.01226806640625, -0.0268402099609375, -0.021636962890625, 0.02008056640625, -0.0006775856018066406, -0.0287322998046875, 0.05572509765625, -0.0085601806640625, 0.031494140625, 0.0244140625, -0.0011167526245117188, 0.0235137939453125, 0.05267333984375, -0.01380157470703125, 0.016693115234375, 0.0305938720703125, -0.005924224853515625, 0.01534271240234375, 0.00258636474609375, 0.0051422119140625, -0.0160675048828125, 0.024505615234375, -0.000537872314453125, -0.0008282661437988281, 0.01947021484375, -0.01515960693359375, 0.033355712890625, 0.059478759765625, 0.055023193359375, -0.07684326171875, 0.0023136138916015625, 0.017913818359375, -0.03826904296875, 0.00269317626953125, 0.002048492431640625, -0.0061798095703125, -0.01104736328125, 0.053497314453125, 0.01259613037109375, -0.010406494140625, 0.027679443359375, 0.0021724700927734375, -0.04486083984375, 0.0113677978515625, -0.0195159912109375, 0.0035228729248046875, 0.01910400390625, -0.015838623046875, -0.01507568359375, 0.0052490234375, -0.0170440673828125, 0.02099609375, 0.006450653076171875, -0.03973388671875, -0.0673828125, -0.00034809112548828125, 0.017303466796875, -0.03106689453125, 0.035675048828125, -0.00896453857421875, 0.0055999755859375, 0.0418701171875, -0.0269012451171875, 0.038726806640625, 0.0118865966796875, -0.0224456787109375, 0.03253173828125, -0.0321044921875, -0.00815582275390625, 0.01305389404296875, -0.025848388671875, 0.0037899017333984375, 0.00567626953125, -0.0218048095703125, 0.0036563873291015625, -0.0100250244140625, 0.05157470703125, -0.0147552490234375, -0.03448486328125, 0.01357269287109375, -0.041595458984375, -0.0052337646484375, -0.0180206298828125, 0.003803253173828125, -0.044036865234375, -0.0157928466796875, -0.023040771484375, -0.040435791015625, -0.0038623809814453125, -0.058502197265625, -0.0906982421875, 0.1282958984375, -0.003040313720703125, 0.036865234375, 0.010223388671875, 0.04034423828125, -0.07562255859375, -0.009185791015625, -0.0202484130859375, 0.07122802734375, -0.00662994384765625, 0.02081298828125, -0.045806884765625, -0.007007598876953125, 0.02069091796875, 0.04290771484375, 0.0037899017333984375, -0.00724029541015625, -0.005161285400390625, 0.00460052490234375, 0.05474853515625, -0.00994873046875, -0.005535125732421875, 0.0262603759765625, -0.01143646240234375, -0.00885009765625, 0.0140838623046875, -0.053680419921875, 0.0167388916015625, -0.03729248046875, 0.005603790283203125, 0.007747650146484375, -0.005535125732421875, -0.0023441314697265625, 0.01041412353515625, 0.01788330078125, 0.00783538818359375, -0.0181121826171875, 0.0004794597625732422, -0.0201416015625, -0.0295257568359375, 0.037811279296875, -0.00644683837890625, -0.055999755859375, -0.04937744140625, -0.039337158203125, 0.0244293212890625, 0.0114288330078125, 0.053375244140625, 0.034393310546875, 0.0225830078125, 0.06390380859375, 0.01177978515625, 0.039215087890625, 0.028564453125, -0.00574493408203125, 0.0345458984375, 0.01250457763671875, 0.021881103515625, 0.000016570091247558594, 0.024658203125, -0.00928497314453125, 0.0182342529296875, -0.0218048095703125, -0.0195159912109375, 0.01383209228515625, 0.019317626953125, -0.009796142578125, -0.0231475830078125, -0.00864410400390625, -0.0479736328125, -0.0033740997314453125, -0.0217437744140625, -0.01055145263671875, 0.033111572265625, 0.004383087158203125, 0.0094451904296875, 0.0162200927734375, -0.00756072998046875, -0.00943756103515625, -0.037078857421875, 0.021881103515625, -0.0015478134155273438, 0.05133056640625, 0.00801849365234375, 0.062225341796875, -0.0460205078125, -0.019866943359375, -0.0170440673828125, -0.006999969482421875, -0.0153350830078125, 0.0355224609375, -0.0296783447265625, -0.0019292831420898438, -0.001613616943359375, 0.028564453125, 0.0200347900390625, 0.0172271728515625, 0.04217529296875, 0.0275421142578125, -0.03936767578125, 0.0004737377166748047, 0.047454833984375, -0.0221099853515625, 0.0269775390625, -0.01305389404296875, 0.0104217529296875, 0.01415252685546875, -0.0012416839599609375, -0.0202178955078125, 0.016937255859375, 0.031829833984375, 0.0027618408203125, 0.00859832763671875, -0.001720428466796875, -0.032623291015625, 0.0268096923828125, -0.0027065277099609375, 0.049407958984375, 0.0163116455078125, -0.06903076171875, 0.00011473894119262695, -0.0261688232421875, -0.08282470703125, 0.045013427734375, 0.05120849609375, -0.0226287841796875, 0.00508880615234375, 0.01328277587890625, -0.03448486328125, -0.014007568359375, 0.0286865234375, 0.0184783935546875, -0.00992584228515625, 0.007015228271484375, -0.01500701904296875, -0.01496124267578125, 0.0137481689453125, 0.0159759521484375, 0.01555633544921875, 0.009124755859375, 0.048583984375, -0.0031890869140625, 0.00928497314453125, -0.0088653564453125, -0.0297393798828125, 0.007049560546875, -0.013397216796875, 0.01221466064453125, 0.0006718635559082031, 0.006103515625, -0.0011692047119140625, 0.0285797119140625, -0.014190673828125, 0.05242919921875, -0.019073486328125, 0.0355224609375, -0.046722412109375, 0.01666259765625, -0.050506591796875, 0.055206298828125, -0.0210418701171875, 0.027374267578125, -0.02606201171875, -0.036376953125, 0.039703369140625, -0.0014219284057617188, 0.01148223876953125, -0.018951416015625, 0.042877197265625, 0.01419830322265625, 0.032318115234375, 0.04229736328125, 0.053314208984375, 0.02899169921875, -0.04736328125, 0.001369476318359375, 0.0034122467041015625, -0.0194244384765625, 0.0244293212890625, 0.009765625, -0.01387786865234375, 0.0347900390625, -0.033233642578125, -0.04852294921875, 0.0253143310546875, 0.04510498046875, 0.00965118408203125, 0.0338134765625, -0.0221710205078125, -0.020416259765625, -0.01181793212890625, 0.037261962890625, -0.0187530517578125, -0.0204925537109375, -0.0181121826171875, -0.0308837890625, -0.0015439987182617188, -0.08489990234375, -0.0355224609375, 0.009185791015625, 0.03692626953125, 0.0345458984375, -0.070068359375, 0.0082244873046875, 0.01328277587890625, 0.050933837890625, 0.015625, -0.004611968994140625, -0.01207733154296875, 0.013458251953125, -0.0343017578125, -0.0128936767578125, -0.069091796875, 0.00811004638671875, -0.04205322265625, -0.01297760009765625, 0.0667724609375, 0.012542724609375, -0.014495849609375, -0.0269012451171875, -0.0440673828125, 0.0303192138671875, -0.12548828125, -0.013275146484375, 0.035400390625, -0.0036258697509765625, -0.0179595947265625, -0.05908203125, -0.01380157470703125, -0.041351318359375, 0.0243988037109375, 0.013916015625, 0.0097808837890625, 0.033721923828125, -0.01172637939453125, -0.0484619140625, -0.008270263671875, 0.018585205078125, -0.0310211181640625, 0.0049591064453125, -0.0237579345703125, -0.009063720703125, 0.00655364990234375, -0.0033702850341796875, -0.003978729248046875, -0.038299560546875, 0.01219940185546875, -0.00530242919921875, 0.06378173828125, 0.0168304443359375, -0.00858306884765625, -0.0211334228515625, -0.0193023681640625, -0.03985595703125, -0.00202178955078125, 0.0300750732421875, -0.032928466796875, 0.0260772705078125, 0.0199432373046875, -0.050018310546875, -0.03704833984375, -0.007701873779296875, -0.030731201171875, -0.01190948486328125, -0.046295166015625, -0.04315185546875, -0.0406494140625, 0.0980224609375, 0.017303466796875, 0.03509521484375, -0.0191497802734375, 0.0139312744140625, 0.0369873046875, 0.0283966064453125, -0.0005927085876464844, -0.0012302398681640625, -0.0285186767578125, -0.043975830078125, -0.021728515625, -0.0030155181884765625, 0.01143646240234375, -0.039947509765625, -0.00904083251953125, -0.0112152099609375, -0.0027179718017578125, 0.0132904052734375, -0.007068634033203125, 0.003803253173828125, 0.036102294921875, -0.03125, -0.005748748779296875, 0.0012083053588867188, 0.014373779296875, -0.004329681396484375, -0.0238189697265625, -0.00274658203125, -0.004730224609375, 0.020263671875, 0.0212249755859375, 0.030975341796875, 0.006885528564453125, 0.0219879150390625, -0.00330352783203125, -0.02276611328125, 0.0186309814453125, -0.0059967041015625, 0.020111083984375, 0.0154876708984375, 0.04205322265625, 0.002849578857421875, 0.0836181640625, -0.03546142578125, 0.0303192138671875, 0.0018453598022460938, -0.0067596435546875, -0.004138946533203125, 0.0209503173828125, 0.051177978515625, -0.0180816650390625, 0.011444091796875, -0.0090179443359375, 0.02691650390625, -0.0194549560546875, -0.00650787353515625, -0.038909912109375, 0.0190887451171875, 0.001277923583984375 ]
90f6c1dd55cf3567ad94b6ef47778831406827b6
Wordpress Stackexchange Q: Where is a custom post type's "description" surfaced in WordPress? Note that this is not a question about how to change / edit a CPT's description. It's more about "why the heck is it provided?" because I haven't found anywhere either in the Admin back-end or the front end, where this description is actually shown. What am I missing? A: There's not really a good usage of the description in WP. However, if you wish to extend the Wordpress functionality and use the description in your theme or plugins, it's available to you with the following: global $wp_post_types; $post_type = 'my_cpt'; $description = $wp_post_types[$post_type]->description;
Q: Where is a custom post type's "description" surfaced in WordPress? Note that this is not a question about how to change / edit a CPT's description. It's more about "why the heck is it provided?" because I haven't found anywhere either in the Admin back-end or the front end, where this description is actually shown. What am I missing? A: There's not really a good usage of the description in WP. However, if you wish to extend the Wordpress functionality and use the description in your theme or plugins, it's available to you with the following: global $wp_post_types; $post_type = 'my_cpt'; $description = $wp_post_types[$post_type]->description;
wordpress
{ "language": "en", "length": 105, "provenance": "stackexchange_00019.jsonl.gz:413180", "question_score": "7", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28914" }
[ 0.04595947265625, -0.0031528472900390625, 0.0141448974609375, 0.014739990234375, 0.00022411346435546875, -0.04095458984375, 0.05181884765625, -0.0318603515625, -0.0423583984375, 0.035552978515625, -0.005466461181640625, 0.017578125, -0.01152801513671875, -0.0168609619140625, -0.002685546875, -0.031646728515625, 0.0294647216796875, 0.03369140625, 0.06060791015625, -0.0024814605712890625, 0.00787353515625, 0.01311492919921875, 0.037139892578125, 0.0213775634765625, 0.00548553466796875, -0.0046844482421875, 0.08319091796875, -0.039306640625, 0.039642333984375, -0.001705169677734375, 0.03741455078125, -0.0362548828125, 0.0228729248046875, -0.00434112548828125, 0.0011501312255859375, 0.001071929931640625, 0.00128936767578125, -0.00830841064453125, -0.0023822784423828125, 0.03179931640625, -0.0143890380859375, 0.00907135009765625, 0.05120849609375, -0.046234130859375, -0.006191253662109375, 0.00881195068359375, -0.0158843994140625, -0.0186004638671875, 0.020843505859375, -0.045166015625, 0.00669097900390625, -0.004543304443359375, 0.047210693359375, -0.0253448486328125, -0.0239715576171875, -0.0018253326416015625, -0.007778167724609375, 0.0158538818359375, 0.037933349609375, -0.0390625, -0.03875732421875, -0.0270843505859375, 0.0380859375, 0.0208282470703125, 0.0023822784423828125, 0.018463134765625, 0.04400634765625, 0.0154266357421875, -0.033721923828125, -0.032867431640625, 0.026397705078125, -0.017425537109375, 0.0221099853515625, -0.026031494140625, 0.0223388671875, -0.0126495361328125, 0.0123748779296875, -0.01531982421875, 0.01453399658203125, 0.006809234619140625, 0.0166473388671875, -0.0182342529296875, -0.0180511474609375, 0.00911712646484375, 0.00313568115234375, 0.0245208740234375, -0.00453948974609375, -0.018096923828125, -0.01617431640625, -0.0052642822265625, -0.01953125, -0.0239715576171875, -0.0062255859375, 0.01399993896484375, -0.01393890380859375, -0.01519775390625, 0.023529052734375, 0.033538818359375, -0.0201568603515625, 0.0169525146484375, 0.01751708984375, -0.040924072265625, 0.07537841796875, -0.049041748046875, 0.01302337646484375, -0.004825592041015625, -0.005706787109375, -0.0231475830078125, 0.02447509765625, 0.01983642578125, -0.025787353515625, 0.00849151611328125, -0.006946563720703125, -0.01580810546875, -0.01090240478515625, 0.01108551025390625, -0.037567138671875, 0.03619384765625, -0.01490020751953125, 0.037506103515625, 0.03643798828125, 0.034088134765625, 0.0271759033203125, 0.0298614501953125, -0.010284423828125, 0.00893402099609375, -0.0108795166015625, -0.058197021484375, 0.01526641845703125, 0.019989013671875, -0.0201263427734375, 0.00559234619140625, 0.05609130859375, 0.007648468017578125, -0.0127105712890625, -0.0223388671875, 0.017608642578125, 0.0220947265625, -0.01178741455078125, 0.03228759765625, -0.001953125, -0.03289794921875, 0.00392913818359375, -0.01018524169921875, -0.0011262893676757812, 0.0229339599609375, 0.016693115234375, 0.0065765380859375, -0.01094818115234375, -0.0152740478515625, -0.002349853515625, -0.0285491943359375, 0.03839111328125, 0.01458740234375, -0.00994110107421875, -0.035186767578125, 0.037353515625, -0.0433349609375, -0.0117645263671875, -0.04541015625, 0.035400390625, 0.003154754638671875, -0.03631591796875, 0.0027065277099609375, -0.038665771484375, 0.017242431640625, 0.0103302001953125, 0.007843017578125, 0.0200958251953125, 0.039947509765625, -0.027252197265625, -0.0303802490234375, -0.022308349609375, 0.00591278076171875, -0.0186920166015625, 0.0153350830078125, -0.0236358642578125, -0.0017604827880859375, 0.042877197265625, -0.01126861572265625, -0.033050537109375, -0.03704833984375, 0.036163330078125, -0.01788330078125, -0.035980224609375, 0.00849151611328125, 0.014556884765625, 0.054473876953125, 0.00380706787109375, 0.038970947265625, 0.00399017333984375, 0.02362060546875, -0.0291290283203125, 0.0543212890625, -0.0214996337890625, -0.0135650634765625, -0.062469482421875, 0.01078033447265625, -0.048431396484375, 0.0104217529296875, -0.039947509765625, 0.02337646484375, -0.0193939208984375, 0.036376953125, -0.0606689453125, 0.027374267578125, -0.0246734619140625, 0.040618896484375, 0.014892578125, -0.0213775634765625, 0.0105133056640625, -0.01806640625, 0.0147247314453125, -0.0687255859375, -0.06365966796875, 0.043487548828125, 0.00036334991455078125, 0.0272979736328125, 0.0169830322265625, 0.0030956268310546875, 0.03863525390625, -0.01146697998046875, 0.0152587890625, 0.042022705078125, 0.052093505859375, 0.059295654296875, -0.0308837890625, 0.0280914306640625, 0.07647705078125, 0.06378173828125, -0.02423095703125, -0.039703369140625, 0.054779052734375, 0.017059326171875, -0.018157958984375, 0.01092529296875, 0.0142974853515625, -0.057220458984375, -0.01385498046875, 0.0482177734375, 0.00853729248046875, 0.04949951171875, -0.00732421875, 0.039459228515625, 0.053131103515625, 0.0217132568359375, 0.028839111328125, 0.0025997161865234375, 0.02520751953125, 0.045684814453125, 0.010986328125, -0.03466796875, 0.024871826171875, -0.0469970703125, 0.0122833251953125, 0.0187530517578125, 0.0054931640625, -0.0053863525390625, 0.048583984375, -0.0030841827392578125, -0.0249481201171875, -0.002620697021484375, -0.0079193115234375, -0.006092071533203125, 0.05133056640625, 0.01097869873046875, 0.07318115234375, 0.051177978515625, -0.04376220703125, -0.0125274658203125, 0.0211181640625, 0.057647705078125, 0.0093841552734375, 0.0184326171875, 0.04443359375, 0.0282745361328125, -0.055999755859375, -0.00444793701171875, 0.05206298828125, 0.01012420654296875, -0.0017995834350585938, -0.011932373046875, -0.03472900390625, 0.0008645057678222656, 0.0185699462890625, -0.06610107421875, 0.0177764892578125, 0.053497314453125, -0.029937744140625, -0.01251983642578125, 0.004688262939453125, 0.0293731689453125, -0.0204010009765625, 0.01050567626953125, -0.01187896728515625, -0.01031494140625, -0.03045654296875, -0.062042236328125, 0.04888916015625, -0.0511474609375, 0.036468505859375, 0.077392578125, 0.0037670135498046875, 0.00872039794921875, 0.008270263671875, -0.0011739730834960938, 0.0165557861328125, 0.0220184326171875, 0.00008559226989746094, -0.00855255126953125, -0.03033447265625, 0.0238189697265625, 0.0215911865234375, 0.06884765625, -0.028656005859375, -0.0301971435546875, -0.010223388671875, 0.03369140625, -0.039276123046875, -0.0230255126953125, -0.00699615478515625, -0.05657958984375, 0.005001068115234375, -0.0088958740234375, -0.0184478759765625, -0.01068115234375, 0.006290435791015625, 0.01251220703125, 0.00096893310546875, -0.03668212890625, -0.041229248046875, -0.06402587890625, -0.07489013671875, -0.04681396484375, 0.00867462158203125, 0.028411865234375, 0.0032367706298828125, 0.05987548828125, 0.0263671875, -0.0312042236328125, 0.0173187255859375, 0.0272674560546875, -0.01442718505859375, 0.006221771240234375, 0.042236328125, -0.051177978515625, 0.02880859375, 0.00884246826171875, -0.01107025146484375, 0.0255584716796875, -0.0188751220703125, -0.02587890625, 0.00957489013671875, 0.0027675628662109375, 0.01290130615234375, 0.019012451171875, -0.0028896331787109375, -0.01242828369140625, -0.0057525634765625, -0.052764892578125, -0.031707763671875, 0.0068359375, -0.0292816162109375, -0.0096282958984375, -0.00908660888671875, -0.0030574798583984375, -0.040985107421875, 0.06500244140625, -0.01062774658203125, -0.0026683807373046875, 0.027984619140625, -0.033111572265625, 0.0206146240234375, 0.00855255126953125, -0.0009169578552246094, -0.01849365234375, -0.0033054351806640625, -0.0188751220703125, 0.0093536376953125, -0.01070404052734375, 0.03961181640625, -0.01055145263671875, 0.03363037109375, -0.0625, -0.0631103515625, 0.046661376953125, -0.057342529296875, -0.0010356903076171875, -0.0296173095703125, -0.0165557861328125, 0.02679443359375, 0.10687255859375, -0.01425933837890625, -0.0017642974853515625, -0.0089874267578125, -0.0212554931640625, 0.01483154296875, -0.0110931396484375, -0.05010986328125, -0.006622314453125, -0.06610107421875, 0.0057373046875, 0.0084991455078125, -0.02789306640625, -0.033172607421875, 0.05560302734375, -0.06475830078125, -0.027496337890625, 0.03460693359375, 0.0263519287109375, -0.0152740478515625, 0.0026378631591796875, -0.01548004150390625, -0.01470947265625, -0.0244598388671875, 0.0036411285400390625, -0.0203857421875, -0.0196990966796875, 0.023834228515625, 0.02655029296875, 0.01544189453125, -0.043792724609375, 0.0128326416015625, 0.035400390625, 0.08245849609375, -0.0061492919921875, 0.01172637939453125, -0.06585693359375, 0.0231781005859375, -0.00592041015625, 0.00794219970703125, -0.00878143310546875, -0.0306549072265625, 0.001941680908203125, -0.0123291015625, 0.048828125, 0.00949859619140625, -0.00545501708984375, 0.041351318359375, -0.02264404296875, -0.0124969482421875, -0.01114654541015625, -0.028167724609375, 0.03265380859375, 0.0008807182312011719, -0.013336181640625, -0.037384033203125, -0.034088134765625, 0.055511474609375, 0.0201416015625, -0.0172119140625, 0.00855255126953125, 0.025543212890625, -0.0014562606811523438, -0.037384033203125, -0.0748291015625, -0.0296173095703125, 0.035888671875, -0.00003826618194580078, 0.0026226043701171875, 0.012451171875, -0.006931304931640625, -0.0011548995971679688, -0.0006766319274902344, -0.0208740234375, -0.01303863525390625, 0.055206298828125, 0.0225830078125, 0.00927734375, -0.00218963623046875, -0.02093505859375, 0.038421630859375, -0.0311279296875, -0.033477783203125, -0.004131317138671875, 0.0180816650390625, 0.0550537109375, -0.039337158203125, 0.0499267578125, -0.0311431884765625, -0.0179290771484375, 0.0191497802734375, 0.00397491455078125, 0.0282440185546875, -0.0005106925964355469, 0.018890380859375, -0.0007233619689941406, -0.03863525390625, 0.012176513671875, -0.0112457275390625, -0.0261077880859375, -0.005397796630859375, 0.00719451904296875, 0.020111083984375, 0.0016689300537109375, 0.00982666015625, -0.0045623779296875, 0.04583740234375, -0.050628662109375, -0.07464599609375, 0.0087738037109375, -0.0316162109375, 0.027618408203125, 0.0711669921875, 0.0560302734375, 0.02099609375, 0.048248291015625, 0.01209259033203125, 0.01265716552734375, 0.06158447265625, 0.0435791015625, -0.0093994140625, 0.0250091552734375, 0.004726409912109375, -0.0034027099609375, 0.01171112060546875, 0.06488037109375, -0.01226806640625, 0.037567138671875, -0.01404571533203125, 0.0426025390625, 0.0280914306640625, 0.0301361083984375, 0.01322174072265625, 0.00006628036499023438, -0.0199432373046875, 0.01525115966796875, -0.02703857421875, -0.038116455078125, -0.041046142578125, -0.0072479248046875, 0.0243682861328125, -0.041107177734375, -0.0008158683776855469, 0.03924560546875, 0.003570556640625, -0.0030517578125, -0.01922607421875, -0.0005922317504882812, -0.020111083984375, 0.0347900390625, 0.0294189453125, -0.008544921875, -0.01499176025390625, -0.0509033203125, 0.0295867919921875, -0.07147216796875, 0.018310546875, -0.0572509765625, -0.015777587890625, 0.01154327392578125, 0.0188446044921875, -0.051666259765625, -0.02471923828125, -0.025360107421875, 0.022308349609375, -0.03192138671875, 0.0234832763671875, -0.0188140869140625, 0.0019359588623046875, -0.032958984375, -0.0178375244140625, 0.0111236572265625, 0.00861358642578125, -0.02685546875, 0.021331787109375, 0.0479736328125, 0.029205322265625, 0.01221466064453125, -0.035064697265625, -0.0235137939453125, -0.046417236328125, -0.03759765625, -0.0273590087890625, -0.043731689453125, 0.016204833984375, -0.0218048095703125, -0.0105743408203125, 0.0015382766723632812, 0.031402587890625, -0.034759521484375, 0.050750732421875, 0.027557373046875, 0.0084991455078125, -0.01509857177734375, 0.034515380859375, -0.0024433135986328125, 0.034210205078125, -0.00502777099609375, 0.00885772705078125, -0.0002677440643310547, -0.0189971923828125, 0.0231475830078125, -0.0135345458984375, -0.030303955078125, -0.046630859375, -0.0012140274047851562, 0.0217132568359375, 0.059661865234375, -0.0168609619140625, -0.0088653564453125, -0.0158233642578125, 0.00440216064453125, -0.02899169921875, 0.044952392578125, -0.041015625, 0.0028514862060546875, -0.0193023681640625, -0.0155792236328125, 0.0089874267578125, -0.005435943603515625, 0.01116180419921875, 0.0045623779296875, -0.019012451171875, 0.0207977294921875, 0.00969696044921875, -0.06341552734375, 0.06396484375, 0.086669921875, 0.031158447265625, 0.047393798828125, 0.0118865966796875, 0.01055908203125, -0.0146942138671875, -0.0030670166015625, -0.0240631103515625, -0.0004324913024902344, 0.064697265625, 0.0191192626953125, -0.0292205810546875, 0.04681396484375, -0.036102294921875, -0.0014753341674804688, 0.054107666015625, 0.053619384765625, -0.080322265625, 0.006816864013671875, 0.025177001953125, -0.00860595703125, -0.0028591156005859375, -0.01171875, -0.0172119140625, -0.0267791748046875, -0.016510009765625, 0.0016717910766601562, -0.055908203125, -0.039398193359375, 0.01052093505859375, 0.006496429443359375, -0.004421234130859375, 0.027984619140625, -0.0014715194702148438, -0.06292724609375, 0.0156707763671875, 0.0279388427734375, -0.004119873046875, -0.042083740234375, -0.01165771484375, 0.006378173828125, -0.0017900466918945312, -0.0455322265625, 0.05078125, -0.05621337890625, 0.044586181640625, 0.0169677734375, 0.036712646484375, 0.01128387451171875, 0.0499267578125, -0.0044097900390625, -0.01006317138671875, 0.0134735107421875, 0.002742767333984375, -0.029327392578125, -0.0193634033203125, 0.00948333740234375, 0.08001708984375, -0.022491455078125, 0.035675048828125, -0.0222015380859375, 0.002536773681640625, -0.0205841064453125, -0.04327392578125, 0.0916748046875, -0.0333251953125, 0.000335693359375, 0.0286407470703125, 0.026031494140625, 0.00334930419921875, -0.0005354881286621094, -0.004589080810546875, -0.031829833984375, -0.0009059906005859375, 0.0028629302978515625, 0.0024089813232421875, 0.003566741943359375, 0.02410888671875, -0.038818359375, 0.046234130859375, 0.0279693603515625, -0.016357421875, 0.006198883056640625, 0.0256805419921875, -0.03887939453125, 0.004756927490234375, -0.035003662109375, 0.038543701171875, -0.037811279296875, 0.049896240234375, -0.0675048828125, -0.0219268798828125, 0.010528564453125, 0.048431396484375, 0.045989990234375, 0.0108642578125, 0.0167999267578125, 0.0095977783203125, 0.046875, 0.02935791015625, -0.022247314453125, 0.0033016204833984375, 0.03076171875, 0.04656982421875, 0.026580810546875, -0.0203857421875, 0.04608154296875, -0.0267791748046875, -0.02301025390625, 0.054962158203125, 0.0202484130859375, 0.01313018798828125, -0.011566162109375, -0.036590576171875, -0.027252197265625, -0.0126190185546875, 0.0167083740234375, -0.00754547119140625, -0.006542205810546875, 0.052764892578125, 0.0238494873046875, -0.046661376953125, 0.005336761474609375, -0.04571533203125, 0.0592041015625, -0.0185089111328125, 0.03741455078125, 0.033050537109375, 0.02081298828125, 0.0240020751953125, -0.021087646484375, 0.0202178955078125, 0.01506805419921875, -0.02630615234375, 0.0216064453125, 0.00276947021484375, 0.017913818359375, -0.045318603515625, 0.028228759765625, 0.017059326171875, 0.032684326171875, -0.051910400390625, -0.043487548828125, 0.01629638671875, 0.0124969482421875, -0.0155181884765625, 0.01235198974609375, 0.0147705078125, -0.016876220703125, 0.01448822021484375, -0.0169677734375, -0.005947113037109375, 0.010040283203125, 0.0469970703125, -0.003589630126953125, -0.0208892822265625, -0.031341552734375, -0.039581298828125, -0.072998046875, 0.03717041015625, 0.02825927734375, 0.09259033203125, 0.0309600830078125, 0.0665283203125, -0.007450103759765625, -0.042999267578125, 0.0116424560546875, 0.02618408203125, -0.0034427642822265625, -0.0095062255859375, 0.0036258697509765625, -0.03302001953125, -0.0156707763671875, 0.00612640380859375, 0.0262908935546875, -0.00891876220703125, 0.0033321380615234375, 0.00963592529296875, -0.01145172119140625, -0.006931304931640625, 0.0190582275390625, -0.01003265380859375, -0.009246826171875, -0.050933837890625, 0.0163726806640625, 0.0249176025390625, 0.0017843246459960938, 0.003543853759765625, -0.01294708251953125, 0.04510498046875, 0.0093841552734375, 0.037567138671875, 0.0159759521484375, 0.0059814453125, 0.0224761962890625, -0.0132904052734375, 0.0240478515625, 0.03350830078125, -0.01247406005859375, 0.008575439453125, -0.034881591796875, -0.021820068359375, 0.01279449462890625, 0.02593994140625, 0.02044677734375, -0.00717926025390625, 0.037445068359375, 0.006103515625, -0.01122283935546875, -0.0105133056640625, 0.0247039794921875, -0.033966064453125, 0.01873779296875, 0.003833770751953125, -0.10052490234375, -0.05975341796875, -0.056549072265625, 0.0262603759765625, 0.0187225341796875, 0.07666015625, 0.0113677978515625, 0.04498291015625, -0.037109375, 0.057525634765625, -0.06915283203125, -0.0535888671875, 0.03778076171875, 0.012786865234375, 0.0244140625, 0.00336456298828125, -0.052734375, 0.036041259765625, 0.045501708984375, 0.0001302957534790039, 0.052764892578125, -0.005126953125, 0.0105438232421875, -0.05621337890625, -0.01212310791015625, -0.0202789306640625, -0.01029205322265625, 0.01132965087890625, -0.0104217529296875, 0.03131103515625, 0.03912353515625, 0.01540374755859375, -0.0034389495849609375, 0.017333984375, -0.07171630859375, 0.046417236328125, -0.048004150390625, 0.08056640625, 0.049163818359375, 0.0197296142578125, -0.035369873046875, -0.00952911376953125, -0.0195159912109375, 0.00748443603515625, -0.00325775146484375, 0.060272216796875, 0.0028896331787109375, -0.0096588134765625, -0.0430908203125, -0.06488037109375, -0.0204925537109375, -0.0430908203125, -0.02685546875, -0.0313720703125, -0.00537872314453125, -0.0056915283203125, 0.0005002021789550781, -0.0249481201171875, -0.03204345703125, -0.01491546630859375, 0.016357421875, -0.0212249755859375, -0.01073455810546875, -0.039306640625, -0.037078857421875, 0.042449951171875, -0.020294189453125, 0.0228729248046875, -0.0211639404296875, -0.032989501953125, -0.0011539459228515625, 0.009765625, -0.0169677734375, 0.026275634765625, 0.0701904296875, -0.015655517578125, 0.041473388671875, -0.0167388916015625, -0.043426513671875, 0.01413726806640625, 0.0311279296875, 0.0487060546875, -0.036651611328125, -0.0162811279296875, 0.07965087890625, 0.046966552734375, 0.11749267578125, 0.01113128662109375, -0.01629638671875, 0.0098876953125, 0.029876708984375, -0.0204010009765625, -0.0672607421875, -0.003154754638671875, -0.0421142578125, 0.00110626220703125, -0.05450439453125, 0.0138702392578125, -0.0029354095458984375, -0.039337158203125, -0.059173583984375, 0.042144775390625, -0.0194091796875, -0.01181793212890625, -0.010162353515625, 0.0211029052734375, -0.006591796875, 0.0201568603515625, 0.01200103759765625, -0.03680419921875, -0.007732391357421875, 0.007781982421875, -0.00534820556640625, 0.03533935546875, 0.0128326416015625, -0.026824951171875, -0.0199737548828125, -0.001369476318359375, 0.0142974853515625, 0.0094451904296875, 0.0288543701171875, -0.0093841552734375, -0.0171051025390625, 0.0039520263671875, -0.07000732421875, -0.058990478515625, -0.048248291015625, 0.042083740234375, 0.0052947998046875, -0.054931640625, -0.0031185150146484375, -0.0148468017578125, 0.023345947265625, 0.00766754150390625, -0.00959014892578125, -0.01523590087890625, 0.053985595703125, 0.019287109375, -0.07470703125, -0.023956298828125, 0.0210723876953125, -0.034210205078125, -0.039031982421875, 0.00530242919921875, -0.0023975372314453125, 0.006282806396484375, 0.007190704345703125, -0.01580810546875, -0.0009140968322753906, 0.0250396728515625, -0.0197906494140625, -0.033721923828125, -0.0026988983154296875, -0.001064300537109375, -0.0135345458984375, 0.006412506103515625, -0.0266571044921875, 0.0187530517578125, -0.0015926361083984375, -0.02557373046875, -0.07110595703125, 0.020660400390625, 0.0017938613891601562, 0.0036182403564453125, -0.026458740234375, 0.024993896484375, -0.00783538818359375, 0.055755615234375, -0.032958984375, 0.017425537109375, -0.007358551025390625, 0.0008292198181152344, -0.021820068359375, 0.03424072265625, 0.0088348388671875, 0.057952880859375, 0.0299224853515625, 0.02496337890625, -0.0132598876953125, 0.06591796875, -0.0033740997314453125, -0.043670654296875, -0.01448822021484375, -0.03277587890625, 0.0237884521484375, 0.0112457275390625, 0.0174713134765625, 0.0023059844970703125, -0.0082244873046875, 0.011566162109375, 0.00069427490234375, 0.006900787353515625 ]
1a293787e2fc7d667ef6ffe4985541f5c1a57a40
Wordpress Stackexchange Q: Hide password protected posts If I create a post and set the visibility to "password protected", it still shows up on the front page and in the feeds. Is it possible to hide posts from general view altogether, but still allow quick access to some people without creating an account for them? (This is in WP 3.0.4) A: Both the the_content() and the the_excerpt() template tags already account for password-protected posts, via the post_password_required() conditional. If you need to output content, or comments, etc. outside of the_content()/the_excerpt(), call the post_password_required() conditional directly. For example, if you don't want the comments template to be output if the post is password-protected. you could do the following: if ( ! post_password_required() && ( is_single() || ( is_page() && comments_open() ) ) ) { comments_template( '', true ); } Or, if you don't want to display the post at all if it is password-protected, you could do something like this, inside the Loop: if ( post_password_required() ) { return; } else { // Normal Loop Post output goes here }
Q: Hide password protected posts If I create a post and set the visibility to "password protected", it still shows up on the front page and in the feeds. Is it possible to hide posts from general view altogether, but still allow quick access to some people without creating an account for them? (This is in WP 3.0.4) A: Both the the_content() and the the_excerpt() template tags already account for password-protected posts, via the post_password_required() conditional. If you need to output content, or comments, etc. outside of the_content()/the_excerpt(), call the post_password_required() conditional directly. For example, if you don't want the comments template to be output if the post is password-protected. you could do the following: if ( ! post_password_required() && ( is_single() || ( is_page() && comments_open() ) ) ) { comments_template( '', true ); } Or, if you don't want to display the post at all if it is password-protected, you could do something like this, inside the Loop: if ( post_password_required() ) { return; } else { // Normal Loop Post output goes here } A: My very simple solution is to put something like this in your loop: <?php if( post_password_required() ) continue; ?> This just skip the password protected entry.
wordpress
{ "language": "en", "length": 204, "provenance": "stackexchange_00019.jsonl.gz:413200", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28973" }
[ 0.06414794921875, 0.00270843505859375, 0.0234527587890625, 0.002010345458984375, 0.0181427001953125, -0.033355712890625, 0.064453125, -0.067626953125, 0.00829315185546875, 0.018402099609375, -0.034454345703125, -0.0269775390625, -0.045074462890625, -0.00910186767578125, -0.04071044921875, -0.06915283203125, 0.0250091552734375, 0.021331787109375, 0.0650634765625, -0.0039043426513671875, 0.0250396728515625, 0.00986480712890625, 0.03680419921875, 0.0008115768432617188, 0.0274200439453125, 0.0054168701171875, 0.1036376953125, -0.0250701904296875, 0.0274505615234375, -0.0172576904296875, 0.035675048828125, -0.05126953125, -0.0079803466796875, 0.019073486328125, -0.01035308837890625, 0.0084075927734375, -0.0293121337890625, 0.0299530029296875, 0.022003173828125, -0.016204833984375, 0.0107879638671875, -0.01265716552734375, -0.006160736083984375, -0.004444122314453125, -0.0017786026000976562, -0.021240234375, 0.02447509765625, -0.051605224609375, 0.0247344970703125, 0.063232421875, 0.015106201171875, 0.045135498046875, 0.0009188652038574219, 0.023162841796875, -0.00780487060546875, -0.003749847412109375, -0.038818359375, 0.00418853759765625, 0.04443359375, 0.0202484130859375, -0.0213470458984375, -0.032135009765625, 0.008544921875, -0.03875732421875, -0.021636962890625, 0.0222015380859375, 0.026031494140625, 0.006031036376953125, -0.02886962890625, -0.018463134765625, 0.01512908935546875, -0.0116424560546875, 0.02117919921875, -0.053375244140625, -0.01166534423828125, 0.0364990234375, -0.02435302734375, 0.01476287841796875, 0.0272674560546875, -0.04638671875, -0.019195556640625, 0.0234527587890625, -0.0143280029296875, -0.0296630859375, 0.005542755126953125, 0.005252838134765625, -0.0256195068359375, -0.00829315185546875, 0.02447509765625, -0.01812744140625, -0.00031375885009765625, 0.00885772705078125, 0.01062774658203125, 0.04302978515625, -0.018218994140625, -0.0298004150390625, 0.0229034423828125, 0.055267333984375, -0.0247650146484375, -0.00020420551300048828, -0.037109375, -0.0265960693359375, -0.02630615234375, -0.0185394287109375, -0.01190948486328125, 0.06451416015625, 0.0128173828125, 0.022308349609375, 0.0177764892578125, 0.022674560546875, 0.016937255859375, -0.04736328125, -0.0166015625, -0.035369873046875, -0.018798828125, 0.02734375, -0.0222015380859375, -0.01184844970703125, 0.01519012451171875, 0.0092010498046875, -0.019989013671875, -0.0234527587890625, 0.01904296875, -0.0171661376953125, 0.03125, -0.001308441162109375, -0.04443359375, 0.00899505615234375, 0.0288543701171875, 0.061737060546875, -0.053497314453125, -0.027313232421875, 0.054718017578125, 0.0208740234375, 0.017547607421875, -0.054046630859375, -0.0178070068359375, -0.0009813308715820312, -0.004669189453125, 0.01392364501953125, -0.0189361572265625, -0.038970947265625, 0.0247955322265625, -0.0129547119140625, -0.0017547607421875, 0.04364013671875, 0.0281982421875, -0.010650634765625, -0.0101318359375, -0.0740966796875, -0.00873565673828125, -0.0228271484375, 0.004486083984375, 0.007350921630859375, 0.037872314453125, 0.006259918212890625, 0.0328369140625, -0.0108184814453125, 0.0016536712646484375, -0.0024967193603515625, 0.05853271484375, -0.0010242462158203125, -0.0158538818359375, 0.00836181640625, -0.03350830078125, -0.0189056396484375, -0.03289794921875, -0.0020771026611328125, 0.00939178466796875, 0.0150146484375, -0.0167999267578125, -0.0670166015625, -0.0301971435546875, -0.0290679931640625, -0.030853271484375, 0.035675048828125, -0.00470733642578125, -0.00032973289489746094, 0.021453857421875, 0.0136871337890625, -0.0197296142578125, -0.041961669921875, 0.028961181640625, -0.015380859375, -0.057220458984375, 0.021270751953125, 0.0300140380859375, 0.035003662109375, 0.00498199462890625, 0.0169219970703125, 0.0587158203125, 0.03277587890625, -0.00618743896484375, 0.0247039794921875, -0.0300445556640625, -0.05364990234375, 0.0144805908203125, -0.006744384765625, -0.0178985595703125, 0.0272216796875, 0.047607421875, -0.00516510009765625, -0.0023860931396484375, 0.00875091552734375, -0.019561767578125, -0.0154876708984375, -0.00147247314453125, 0.005420684814453125, -0.059478759765625, 0.0033664703369140625, 0.043731689453125, -0.00006723403930664062, -0.04107666015625, -0.01180267333984375, -0.01355743408203125, 0.0068206787109375, -0.036529541015625, 0.062103271484375, 0.00780487060546875, 0.051971435546875, 0.02154541015625, -0.05816650390625, 0.0248870849609375, -0.02215576171875, 0.055267333984375, -0.0261993408203125, -0.005840301513671875, -0.027679443359375, 0.027923583984375, -0.003398895263671875, -0.0139923095703125, 0.02069091796875, -0.0032100677490234375, 0.01552581787109375, -0.04840087890625, -0.0095062255859375, -0.0298919677734375, -0.00690460205078125, -0.002391815185546875, 0.05364990234375, 0.033355712890625, 0.04681396484375, -0.0023345947265625, -0.0230255126953125, 0.107177734375, -0.037200927734375, -0.007236480712890625, -0.0024356842041015625, -0.00024235248565673828, 0.02532958984375, 0.0298309326171875, 0.0079345703125, 0.007076263427734375, -0.05462646484375, 0.01306915283203125, 0.027069091796875, 0.00031876564025878906, 0.041717529296875, -0.01172637939453125, -0.0289154052734375, 0.0019273757934570312, 0.01018524169921875, 0.00727081298828125, -0.00998687744140625, 0.0001920461654663086, -0.034210205078125, 0.023956298828125, 0.0140533447265625, -0.002292633056640625, -0.048553466796875, 0.0224456787109375, 0.0517578125, 0.0006136894226074219, 0.045013427734375, 0.02728271484375, -0.0074005126953125, -0.023284912109375, -0.032379150390625, 0.0080108642578125, 0.02642822265625, -0.0008854866027832031, 0.004497528076171875, -0.0791015625, -0.00005924701690673828, 0.01348876953125, -0.0092926025390625, -0.01139068603515625, 0.04864501953125, 0.00562286376953125, -0.007289886474609375, 0.01361846923828125, 0.04278564453125, 0.014068603515625, 0.031951904296875, 0.0048065185546875, 0.0030231475830078125, -0.061981201171875, -0.084716796875, 0.07952880859375, -0.07354736328125, 0.01183319091796875, 0.080810546875, 0.003662109375, 0.0276947021484375, 0.00045013427734375, 0.0247344970703125, 0.0011730194091796875, 0.01544189453125, -0.002079010009765625, -0.01971435546875, -0.01091766357421875, 0.014739990234375, 0.0163116455078125, 0.007137298583984375, -0.0168914794921875, -0.028533935546875, -0.0161895751953125, 0.01514434814453125, -0.01210784912109375, 0.040435791015625, -0.04541015625, -0.09320068359375, -0.0231475830078125, -0.03131103515625, -0.05218505859375, 0.0265350341796875, -0.0003123283386230469, 0.0190582275390625, -0.032806396484375, 0.00820159912109375, -0.06390380859375, -0.02386474609375, -0.0386962890625, 0.05010986328125, -0.0210113525390625, 0.0257568359375, 0.000934600830078125, 0.1162109375, 0.0098724365234375, -0.0653076171875, -0.008575439453125, -0.0164031982421875, -0.021575927734375, 0.03448486328125, -0.038909912109375, -0.020172119140625, -0.0131683349609375, -0.0004589557647705078, -0.054046630859375, -0.0484619140625, 0.059906005859375, -0.0249481201171875, 0.0243988037109375, -0.0218658447265625, 0.035247802734375, 0.052032470703125, -0.043212890625, -0.006534576416015625, 0.041259765625, -0.0416259765625, -0.0107269287109375, -0.0228424072265625, -0.0452880859375, -0.01284027099609375, 0.0283966064453125, -0.00045180320739746094, -0.040435791015625, 0.023773193359375, 0.01447296142578125, 0.032135009765625, 0.00835418701171875, 0.0031719207763671875, 0.003101348876953125, 0.0039215087890625, -0.00907135009765625, -0.0129241943359375, -0.02374267578125, -0.035400390625, -0.0025959014892578125, -0.0257110595703125, -0.002105712890625, -0.00494384765625, 0.00830841064453125, 0.01416015625, -0.0457763671875, 0.052093505859375, -0.028900146484375, -0.0238494873046875, -0.039947509765625, -0.0157470703125, -0.02435302734375, 0.060302734375, -0.044952392578125, -0.005764007568359375, 0.00009232759475708008, 0.024932861328125, -0.035736083984375, -0.043975830078125, -0.016693115234375, -0.0025768280029296875, -0.046173095703125, 0.0104217529296875, -0.0301513671875, -0.016998291015625, 0.0041961669921875, -0.07647705078125, 0.00363922119140625, -0.042236328125, 0.0190582275390625, -0.00690460205078125, 0.0309600830078125, -0.0063934326171875, 0.0177764892578125, -0.017120361328125, 0.00423431396484375, -0.0202789306640625, -0.0670166015625, -0.00437164306640625, 0.01427459716796875, 0.0221710205078125, -0.00788116455078125, -0.005611419677734375, -0.0159454345703125, 0.026092529296875, 0.0281219482421875, 0.01512908935546875, -0.012664794921875, -0.0063323974609375, -0.021453857421875, -0.0038928985595703125, 0.00894927978515625, -0.016204833984375, -0.00982666015625, -0.015655517578125, -0.0260772705078125, 0.0058746337890625, -0.032623291015625, 0.0031185150146484375, -0.00926971435546875, -0.009063720703125, -0.0258636474609375, -0.031463623046875, -0.0171661376953125, 0.01378631591796875, -0.03387451171875, 0.02447509765625, -0.022796630859375, -0.0274658203125, 0.0302581787109375, -0.01861572265625, -0.036407470703125, 0.009124755859375, 0.061798095703125, 0.0226287841796875, -0.00045013427734375, -0.03271484375, -0.01202392578125, 0.0352783203125, 0.0160980224609375, 0.023590087890625, 0.0462646484375, -0.02606201171875, 0.0090179443359375, 0.035003662109375, -0.0125274658203125, -0.0118408203125, 0.036590576171875, -0.0184478759765625, -0.0362548828125, 0.0186309814453125, -0.0416259765625, 0.035614013671875, 0.0256195068359375, 0.01141357421875, -0.012481689453125, -0.01091766357421875, 0.0283355712890625, 0.0286865234375, -0.040679931640625, -0.042755126953125, -0.033966064453125, 0.02471923828125, 0.015716552734375, -0.0185089111328125, -0.01352691650390625, 0.018463134765625, 0.00032019615173339844, -0.019561767578125, 0.00846099853515625, -0.007518768310546875, -0.00958251953125, -0.0123291015625, 0.0288238525390625, -0.0004248619079589844, 0.006153106689453125, -0.0027599334716796875, -0.02130126953125, 0.06829833984375, -0.0137176513671875, -0.0850830078125, 0.0364990234375, -0.00936126708984375, 0.0552978515625, 0.058746337890625, -0.0229949951171875, 0.035797119140625, -0.0090789794921875, -0.0028839111328125, -0.00687408447265625, -0.031494140625, -0.02734375, -0.0322265625, -0.01117706298828125, 0.0049896240234375, -0.01178741455078125, 0.03076171875, 0.040069580078125, -0.0211944580078125, 0.047149658203125, -0.0229949951171875, 0.01824951171875, 0.02166748046875, -0.039276123046875, 0.0057525634765625, 0.06927490234375, -0.0078125, -0.032440185546875, 0.0404052734375, -0.02667236328125, -0.056884765625, 0.01238250732421875, 0.0189971923828125, 0.011505126953125, 0.043975830078125, -0.0013179779052734375, 0.03424072265625, -0.003513336181640625, 0.0305633544921875, 0.006061553955078125, -0.05224609375, -0.01389312744140625, 0.0101165771484375, 0.0154266357421875, -0.0199432373046875, -0.00446319580078125, -0.056671142578125, -0.04241943359375, -0.031890869140625, 0.0080718994140625, -0.0335693359375, -0.004192352294921875, -0.01178741455078125, 0.000050127506256103516, -0.041717529296875, -0.0204315185546875, 0.01354217529296875, 0.0184173583984375, -0.0181884765625, -0.007434844970703125, 0.0305633544921875, -0.00873565673828125, 0.007450103759765625, -0.014739990234375, -0.0189056396484375, 0.03924560546875, 0.00534820556640625, 0.034942626953125, -0.0098876953125, -0.047393798828125, 0.009429931640625, -0.03936767578125, -0.005878448486328125, -0.0256805419921875, -0.0318603515625, -0.051727294921875, -0.00955963134765625, 0.0202789306640625, -0.0013723373413085938, -0.0009160041809082031, -0.02752685546875, -0.036956787109375, 0.009979248046875, 0.027099609375, 0.026336669921875, 0.01568603515625, 0.0535888671875, 0.0003199577331542969, 0.04669189453125, 0.045745849609375, 0.03240966796875, -0.0155487060546875, -0.040374755859375, 0.0048675537109375, -0.05364990234375, -0.024017333984375, 0.0005087852478027344, 0.01244354248046875, 0.037811279296875, 0.0154876708984375, 0.000461578369140625, -0.0267486572265625, -0.01055145263671875, 0.007503509521484375, -0.023468017578125, 0.0694580078125, 0.00569915771484375, -0.0216827392578125, 0.010009765625, 0.006359100341796875, 0.040771484375, -0.029205322265625, -0.0565185546875, 0.0489501953125, -0.007007598876953125, 0.0282745361328125, 0.03204345703125, -0.03704833984375, 0.058929443359375, 0.0836181640625, -0.01776123046875, 0.037567138671875, 0.02825927734375, -0.0102996826171875, 0.0219573974609375, -0.06207275390625, -0.0677490234375, 0.03643798828125, 0.035736083984375, 0.0032749176025390625, -0.011322021484375, 0.057098388671875, -0.014923095703125, 0.03607177734375, 0.042327880859375, 0.052459716796875, -0.070556640625, 0.014495849609375, -0.00247955322265625, -0.033233642578125, 0.048095703125, 0.00862884521484375, 0.0017213821411132812, 0.00205230712890625, 0.0289459228515625, -0.01241302490234375, -0.00420379638671875, 0.031982421875, -0.01395416259765625, -0.004901885986328125, -0.00893402099609375, 0.06732177734375, 0.0010175704956054688, -0.060699462890625, -0.0006880760192871094, 0.02587890625, -0.0178375244140625, -0.054290771484375, -0.04339599609375, 0.004482269287109375, -0.043243408203125, -0.10498046875, -0.037628173828125, -0.02239990234375, 0.0268707275390625, 0.0216522216796875, 0.002758026123046875, -0.01160430908203125, 0.05059814453125, -0.0416259765625, 0.06109619140625, 0.0035686492919921875, 0.00347900390625, -0.0276336669921875, -0.01513671875, 0.00803375244140625, 0.0200653076171875, -0.042572021484375, 0.01910400390625, -0.0166473388671875, -0.0179290771484375, -0.01873779296875, -0.0234527587890625, 0.08251953125, 0.0010881423950195312, -0.037139892578125, 0.025634765625, 0.011138916015625, -0.029998779296875, 0.0028553009033203125, 0.0447998046875, -0.0089569091796875, 0.0377197265625, 0.00487518310546875, 0.012847900390625, -0.027740478515625, -0.007732391357421875, -0.06951904296875, 0.10009765625, -0.01605224609375, 0.040374755859375, -0.007904052734375, 0.0266876220703125, 0.005901336669921875, 0.038726806640625, -0.019073486328125, 0.053131103515625, -0.0240478515625, 0.06243896484375, -0.00994873046875, 0.0079345703125, 0.0305328369140625, 0.0219573974609375, 0.03057861328125, 0.011260986328125, 0.00531005859375, -0.035369873046875, 0.001621246337890625, 0.01448822021484375, -0.016998291015625, 0.00708770751953125, -0.004192352294921875, 0.0523681640625, 0.00457000732421875, -0.08233642578125, 0.01218414306640625, -0.05615234375, -0.0088348388671875, 0.022705078125, 0.0103759765625, 0.0086822509765625, 0.0273284912109375, 0.031829833984375, -0.0716552734375, 0.03350830078125, 0.05419921875, 0.00997161865234375, 0.00992584228515625, 0.0167236328125, 0.056182861328125, -0.081298828125, -0.0095977783203125, -0.026611328125, 0.0509033203125, 0.016021728515625, 0.0303955078125, 0.030120849609375, 0.0264892578125, 0.0162200927734375, -0.007110595703125, 0.02008056640625, 0.006587982177734375, -0.028656005859375, 0.0294189453125, 0.0343017578125, 0.034210205078125, -0.0272674560546875, 0.0205078125, 0.030426025390625, 0.0423583984375, -0.0306396484375, -0.01873779296875, 0.0211029052734375, 0.0253143310546875, 0.0087127685546875, -0.00930023193359375, 0.01934814453125, 0.03192138671875, 0.0625, -0.031280517578125, -0.0196075439453125, 0.0209808349609375, 0.0013494491577148438, -0.0048980712890625, -0.005527496337890625, 0.0117034912109375, -0.00403594970703125, -0.033966064453125, -0.04119873046875, 0.029144287109375, 0.039642333984375, 0.03900146484375, 0.01200103759765625, 0.0177764892578125, -0.01276397705078125, 0.006763458251953125, -0.007659912109375, 0.01120758056640625, 0.0016298294067382812, -0.0443115234375, -0.006763458251953125, -0.0013866424560546875, 0.04449462890625, -0.00814056396484375, 0.0181732177734375, 0.052276611328125, 0.024993896484375, -0.0450439453125, -0.03167724609375, -0.0143280029296875, -0.02410888671875, 0.0362548828125, -0.0161895751953125, 0.006534576416015625, 0.002361297607421875, -0.0321044921875, -0.0229339599609375, -0.0039825439453125, 0.050018310546875, 0.0193939208984375, 0.0265655517578125, 0.0160064697265625, 0.01407623291015625, 0.048126220703125, 0.0155792236328125, 0.01299285888671875, 0.037567138671875, -0.04473876953125, 0.00897216796875, -0.01580810546875, -0.1248779296875, 0.01448822021484375, 0.036651611328125, -0.051361083984375, 0.00791168212890625, 0.05157470703125, 0.011199951171875, -0.012115478515625, -0.00843048095703125, 0.03240966796875, -0.01175689697265625, 0.0210113525390625, 0.0267333984375, -0.0928955078125, -0.071044921875, -0.044921875, 0.065185546875, 0.003025054931640625, 0.07489013671875, -0.01056671142578125, 0.024749755859375, -0.02899169921875, 0.042205810546875, -0.06005859375, -0.0109100341796875, 0.0018787384033203125, -0.006801605224609375, 0.004848480224609375, -0.000415802001953125, -0.0225677490234375, 0.053985595703125, 0.004329681396484375, 0.011810302734375, 0.053131103515625, -0.042083740234375, -0.00835418701171875, -0.01334381103515625, 0.02386474609375, -0.0189056396484375, -0.0163726806640625, -0.02386474609375, 0.00771331787109375, 0.01497650146484375, 0.006473541259765625, -0.046417236328125, 0.049224853515625, -0.038909912109375, -0.0164642333984375, -0.0019931793212890625, -0.054046630859375, -0.0222625732421875, 0.01447296142578125, -0.027984619140625, 0.0233612060546875, -0.002140045166015625, -0.01009368896484375, 0.0102996826171875, 0.0255126953125, -0.035919189453125, 0.01080322265625, -0.004650115966796875, -0.00548553466796875, 0.038787841796875, 0.04388427734375, -0.01018524169921875, 0.0261993408203125, 0.0134124755859375, -0.020477294921875, 0.0256805419921875, 0.033355712890625, -0.039703369140625, -0.006145477294921875, -0.0214996337890625, -0.0145721435546875, -0.0266876220703125, -0.10809326171875, -0.1099853515625, 0.01348876953125, 0.010589599609375, -0.0126190185546875, -0.04278564453125, 0.006687164306640625, -0.0048675537109375, 0.07098388671875, -0.04913330078125, 0.0259857177734375, 0.006504058837890625, 0.035675048828125, -0.0212554931640625, 0.02978515625, -0.00885772705078125, -0.028778076171875, 0.004241943359375, 0.019989013671875, 0.04461669921875, -0.02392578125, -0.00396728515625, 0.00897216796875, 0.004917144775390625, 0.05078125, -0.044464111328125, -0.028564453125, -0.0202178955078125, 0.0036334991455078125, 0.00917816162109375, -0.04168701171875, 0.01593017578125, -0.071044921875, -0.02630615234375, 0.0292205810546875, -0.0138092041015625, 0.01433563232421875, -0.0316162109375, -0.06671142578125, 0.04864501953125, 0.0006852149963378906, -0.0330810546875, -0.007640838623046875, 0.0081634521484375, -0.01514434814453125, 0.020416259765625, 0.0120697021484375, -0.0175323486328125, 0.0032596588134765625, 0.0238037109375, 0.018096923828125, -0.0035419464111328125, 0.041900634765625, 0.012603759765625, -0.017608642578125, 0.005764007568359375, 0.003665924072265625, -0.02557373046875, -0.02197265625, 0.0027675628662109375, -0.0046234130859375, 0.0260162353515625, -0.03509521484375, 0.00750732421875, 0.007537841796875, 0.0180206298828125, 0.0132904052734375, -0.0009284019470214844, -0.021881103515625, -0.0253143310546875, 0.00103759765625, 0.027557373046875, 0.0015096664428710938, 0.0008215904235839844, 0.0214080810546875, -0.023590087890625, -0.046539306640625, 0.00768280029296875, 0.0263824462890625, -0.06298828125, -0.008331298828125, 0.037445068359375, 0.00534820556640625, -0.01483154296875, -0.038177490234375, -0.0213165283203125, -0.0275421142578125, -0.049774169921875, 0.0003829002380371094, -0.00968170166015625, -0.0128021240234375, 0.015655517578125, -0.01540374755859375, -0.022308349609375, -0.006946563720703125, 0.01654052734375, -0.01415252685546875, 0.0184478759765625, -0.0218963623046875, -0.0279388427734375, -0.0030975341796875, 0.0047149658203125, 0.00238800048828125, 0.04107666015625, 0.00681304931640625, -0.0017948150634765625, -0.012542724609375, 0.0159454345703125, 0.01666259765625, 0.032470703125, -0.028106689453125, 0.035552978515625, 0.02850341796875, -0.006504058837890625, -0.032440185546875, 0.023590087890625, -0.021697998046875, 0.01064300537109375, 0.00504302978515625, 0.010650634765625, 0.041656494140625, 0.021392822265625, 0.0013074874877929688, -0.020111083984375, -0.003566741943359375, -0.0088348388671875, 0.007732391357421875, -0.049346923828125, -0.00748443603515625, 0.0024662017822265625 ]
c7f6fd745c70159874615e8c32098a7d59c3a361
Wordpress Stackexchange Q: How to set back-end language per user? I would like to use the english interface for the back-end but I would like to set it to native language for an editor. I know WPML has this feature, but I don't want to install the unsupported WPML just for this reason. What I am looking is a tiny plugin which gives a switchbox for the user profile page for setting the back-end language. Is there such a plugin? A: Have you seen http://wordpress.org/extend/plugins/wp-native-dashboard/? I think it does exactly what you are asking. Also 'interesting' is http://wordpress.org/extend/plugins/in-their-language/ which attempts to set the locale automatically based n browser settings.
Q: How to set back-end language per user? I would like to use the english interface for the back-end but I would like to set it to native language for an editor. I know WPML has this feature, but I don't want to install the unsupported WPML just for this reason. What I am looking is a tiny plugin which gives a switchbox for the user profile page for setting the back-end language. Is there such a plugin? A: Have you seen http://wordpress.org/extend/plugins/wp-native-dashboard/? I think it does exactly what you are asking. Also 'interesting' is http://wordpress.org/extend/plugins/in-their-language/ which attempts to set the locale automatically based n browser settings. A: Starting with Wordpress 4.1 (maybe even earlier, I don't know) this functionality is built-in (no need for a plugin). Simply: * *Download the language pack of your choice from http://wpcentral.io/internationalization/ *extract the content into wp-content/languages (create the languages folder if it does not exist yet) *Done! Logon as the editor who needs a different language, and go to his/her profile and set the Admin Language. A: The plugin that you need is "Admin Language Per User". * *Download the language pack of your choice from http://wpcentral.io/internationalization/ *Extract the content into wp-content/languages (create the languages folder if it does not exist yet) *Install and activate this plugin: https://wordpress.org/plugins/admin-language-per-user/ (Compatible up to: 4.5.2) *Login as admin user, go to your profile page (http://www.yoursite.com/wp-admin/profile.php), change the "Site language" field. In this way you are changing just the language of the backoffice for your user.
wordpress
{ "language": "en", "length": 249, "provenance": "stackexchange_00019.jsonl.gz:413202", "question_score": "9", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/28975" }
[ 0.0043792724609375, -0.01226806640625, -0.0204315185546875, 0.01331329345703125, -0.025238037109375, -0.028564453125, 0.0026569366455078125, -0.036590576171875, -0.01004791259765625, 0.020782470703125, 0.027587890625, -0.0169525146484375, -0.00739288330078125, -0.042938232421875, -0.00923919677734375, -0.0206756591796875, 0.017486572265625, 0.025054931640625, 0.01136016845703125, -0.00594329833984375, -0.006011962890625, 0.0021724700927734375, 0.00102996826171875, -0.00945281982421875, 0.036773681640625, -0.025787353515625, 0.0119171142578125, -0.0294189453125, -0.0026397705078125, -0.0285797119140625, 0.0221099853515625, 0.0280303955078125, 0.0284271240234375, -0.0164794921875, -0.00997161865234375, -0.0128936767578125, 0.006702423095703125, -0.019775390625, -0.019989013671875, 0.0178375244140625, 0.033294677734375, -0.024139404296875, -0.03814697265625, 0.0728759765625, -0.01532745361328125, -0.078857421875, 0.076416015625, -0.0277862548828125, 0.0217132568359375, -0.0394287109375, -0.004573822021484375, -0.01210784912109375, 0.01015472412109375, -0.0097808837890625, -0.0091552734375, 0.0020084381103515625, -0.002330780029296875, 0.0175323486328125, 0.025726318359375, 0.00823211669921875, -0.00927734375, -0.0031986236572265625, 0.0075531005859375, -0.0164794921875, 0.0177001953125, -0.0218353271484375, -0.04107666015625, 0.043548583984375, -0.037200927734375, 0.005725860595703125, 0.031829833984375, -0.035888671875, 0.0184783935546875, -0.0177154541015625, -0.00366973876953125, 0.0347900390625, -0.01922607421875, 0.003185272216796875, 0.034881591796875, -0.0185089111328125, -0.04339599609375, -0.0017375946044921875, -0.054229736328125, -0.05584716796875, 0.032958984375, -0.009552001953125, -0.02685546875, 0.0093231201171875, -0.07342529296875, -0.02484130859375, -0.045318603515625, -0.01526641845703125, -0.114501953125, 0.020263671875, 0.01433563232421875, -0.00830841064453125, -0.0001709461212158203, 0.025054931640625, -0.00951385498046875, -0.00623321533203125, 0.0110626220703125, -0.035552978515625, 0.022613525390625, -0.0286407470703125, 0.00867462158203125, -0.03173828125, -0.032684326171875, 0.00885772705078125, 0.05810546875, 0.05035400390625, -0.007049560546875, 0.0615234375, -0.005748748779296875, -0.02618408203125, -0.01285552978515625, -0.0066070556640625, -0.03961181640625, 0.01316070556640625, 0.00921630859375, -0.0306243896484375, -0.007232666015625, 0.034759521484375, -0.047271728515625, -0.00673675537109375, -0.01349639892578125, -0.039520263671875, 0.019287109375, 0.0089111328125, -0.01395416259765625, 0.0250244140625, -0.041351318359375, -0.0032749176025390625, 0.07904052734375, 0.0521240234375, 0.0177001953125, -0.0155487060546875, 0.01177215576171875, -0.01422119140625, -0.01334381103515625, 0.04156494140625, -0.01030731201171875, -0.05029296875, -0.01190185546875, 0.0114593505859375, -0.00553131103515625, 0.0015859603881835938, 0.02850341796875, 0.02227783203125, -0.004772186279296875, -0.0467529296875, 0.04510498046875, -0.031097412109375, -0.01309967041015625, 0.0159149169921875, 0.01062774658203125, 0.006862640380859375, -0.0004086494445800781, -0.000415802001953125, 0.0088043212890625, 0.00868988037109375, -0.019256591796875, -0.0222320556640625, 0.0234527587890625, -0.0130767822265625, -0.00421142578125, 0.00010544061660766602, -0.007160186767578125, 0.0230560302734375, 0.017578125, -0.0062713623046875, 0.0263824462890625, 0.0039043426513671875, -0.01507568359375, -0.031524658203125, -0.001781463623046875, -0.00426483154296875, -0.043121337890625, 0.0386962890625, 0.0219268798828125, -0.01250457763671875, 0.0140228271484375, -0.0180511474609375, 0.06158447265625, 0.02838134765625, -0.040252685546875, -0.0113677978515625, 0.00426483154296875, 0.048858642578125, 0.051239013671875, 0.0193328857421875, -0.0191650390625, -0.022552490234375, -0.017578125, 0.036163330078125, -0.01441192626953125, -0.01229095458984375, -0.05645751953125, 0.01190185546875, -0.0303955078125, -0.0204925537109375, 0.035125732421875, -0.0260009765625, 0.0039215087890625, -0.01413726806640625, -0.07623291015625, -0.0164642333984375, -0.0278778076171875, 0.0232086181640625, 0.049224853515625, 0.00034117698669433594, 0.0031261444091796875, 0.01361083984375, 0.0079498291015625, -0.0792236328125, -0.061004638671875, 0.04534912109375, -0.008453369140625, 0.037017822265625, 0.024932861328125, -0.0019140243530273438, 0.064697265625, -0.0182952880859375, 0.058746337890625, 0.03558349609375, 0.0009751319885253906, -0.0127105712890625, 0.01123046875, -0.002941131591796875, 0.028839111328125, -0.006195068359375, 0.0435791015625, 0.0086669921875, -0.0217132568359375, -0.0071258544921875, -0.0005154609680175781, 0.0199432373046875, 0.03179931640625, -0.05389404296875, 0.010223388671875, 0.04339599609375, 0.0279388427734375, 0.01465606689453125, -0.006710052490234375, 0.00897216796875, 0.0240325927734375, 0.020599365234375, 0.046539306640625, -0.01189422607421875, 0.01114654541015625, 0.057861328125, -0.052276611328125, 0.003353118896484375, 0.01263427734375, -0.07855224609375, -0.0040283203125, 0.06890869140625, -0.048370361328125, -0.0276031494140625, 0.052947998046875, -0.033782958984375, 0.0156097412109375, -0.0254058837890625, -0.01445770263671875, -0.019317626953125, 0.04571533203125, -0.0587158203125, 0.011383056640625, -0.005092620849609375, -0.01366424560546875, -0.0270843505859375, 0.02923583984375, -0.0147552490234375, 0.01096343994140625, 0.006420135498046875, -0.048492431640625, 0.03387451171875, -0.0091400146484375, -0.0106048583984375, 0.04718017578125, 0.00954437255859375, 0.0017309188842773438, 0.03387451171875, 0.0023021697998046875, -0.0183868408203125, 0.0087432861328125, -0.044464111328125, -0.004611968994140625, -0.01568603515625, 0.010467529296875, -0.00902557373046875, 0.048828125, -0.0467529296875, -0.039276123046875, 0.022247314453125, -0.0494384765625, -0.056427001953125, 0.033935546875, -0.031646728515625, 0.0253448486328125, -0.0202178955078125, 0.052825927734375, 0.060882568359375, 0.0238800048828125, -0.02398681640625, -0.005924224853515625, -0.026763916015625, -0.01531982421875, 0.0276947021484375, -0.0011081695556640625, -0.0169830322265625, -0.052825927734375, 0.018768310546875, 0.01739501953125, -0.01971435546875, -0.0241241455078125, -0.028594970703125, -0.054107666015625, -0.004199981689453125, -0.058807373046875, -0.0037097930908203125, 0.0279541015625, -0.03179931640625, 0.025970458984375, -0.0042266845703125, -0.004337310791015625, -0.038177490234375, 0.024017333984375, 0.002300262451171875, 0.039794921875, -0.036163330078125, -0.0237579345703125, -0.0274658203125, -0.0452880859375, -0.05780029296875, 0.00501251220703125, -0.026641845703125, 0.0031833648681640625, 0.0011663436889648438, -0.018341064453125, -0.053192138671875, -0.040008544921875, 0.04071044921875, -0.00527191162109375, -0.010162353515625, -0.018768310546875, -0.0189971923828125, 0.033599853515625, -0.019317626953125, -0.042205810546875, 0.0290985107421875, -0.01099395751953125, 0.0092926025390625, -0.0095367431640625, -0.018096923828125, -0.01174163818359375, -0.0560302734375, 0.008453369140625, 0.0261383056640625, -0.0312042236328125, -0.03216552734375, -0.00766754150390625, 0.0222320556640625, -0.0154876708984375, 0.0086822509765625, -0.0303955078125, -0.01024627685546875, 0.005615234375, 0.032257080078125, -0.006000518798828125, -0.01168060302734375, 0.0169525146484375, -0.0219573974609375, 0.0094146728515625, 0.004062652587890625, -0.013916015625, -0.00479888916015625, 0.03582763671875, -0.0181427001953125, 0.01471710205078125, 0.00981903076171875, -0.00943756103515625, -0.0080718994140625, 0.0183563232421875, 0.00429534912109375, -0.04364013671875, 0.05633544921875, -0.03094482421875, -0.0099639892578125, -0.0254364013671875, -0.043243408203125, -0.0057373046875, 0.09161376953125, -0.059967041015625, 0.007022857666015625, 0.0164031982421875, 0.027435302734375, -0.05517578125, -0.05999755859375, -0.08203125, 0.005504608154296875, -0.01332855224609375, -0.01812744140625, -0.0018701553344726562, -0.021636962890625, -0.021881103515625, 0.039886474609375, -0.0024776458740234375, -0.00555419921875, 0.037841796875, -0.046600341796875, -0.0060882568359375, -0.01213836669921875, -0.0015249252319335938, -0.040191650390625, -0.0154266357421875, -0.03076171875, -0.07861328125, -0.02423095703125, -0.004016876220703125, 0.07781982421875, 0.03485107421875, -0.069091796875, 0.0037631988525390625, 0.05377197265625, -0.0239410400390625, 0.022430419921875, -0.00116729736328125, 0.0289154052734375, 0.0540771484375, -0.0252685546875, -0.0171661376953125, -0.007472991943359375, -0.0047149658203125, 0.0037822723388671875, -0.01873779296875, 0.06903076171875, -0.016937255859375, 0.00677490234375, 0.01104736328125, -0.035308837890625, -0.07708740234375, -0.045074462890625, -0.0243072509765625, 0.029754638671875, -0.01018524169921875, 0.00231170654296875, -0.064697265625, -0.07867431640625, 0.07843017578125, 0.0007433891296386719, 0.01338958740234375, -0.003215789794921875, 0.07159423828125, -0.01129150390625, -0.03216552734375, -0.034820556640625, -0.0027866363525390625, 0.02655029296875, 0.0256500244140625, 0.0426025390625, -0.0049896240234375, -0.044525146484375, 0.10888671875, 0.0142364501953125, 0.007801055908203125, 0.0002701282501220703, 0.0232086181640625, 0.0030345916748046875, -0.04595947265625, 0.051177978515625, 0.0234222412109375, -0.05316162109375, 0.0161285400390625, -0.00015211105346679688, 0.0232391357421875, 0.01038360595703125, -0.0020656585693359375, -0.0075531005859375, -0.0295562744140625, -0.0165252685546875, -0.07269287109375, 0.0316162109375, -0.044921875, -0.0145416259765625, -0.0144805908203125, 0.01035308837890625, 0.0016689300537109375, 0.00894927978515625, -0.0300445556640625, 0.0526123046875, -0.01531982421875, 0.0546875, 0.0208282470703125, 0.0023345947265625, -0.0023059844970703125, 0.005878448486328125, -0.01702880859375, 0.06744384765625, 0.011260986328125, -0.032745361328125, 0.01462554931640625, -0.0201263427734375, 0.0027484893798828125, 0.0187835693359375, -0.01316070556640625, 0.035797119140625, 0.032501220703125, -0.02215576171875, -0.007701873779296875, -0.0013294219970703125, -0.005947113037109375, -0.061767578125, 0.0007543563842773438, 0.0114288330078125, -0.009735107421875, 0.0216217041015625, 0.06573486328125, -0.00476837158203125, 0.036590576171875, -0.0113372802734375, 0.017059326171875, 0.0241546630859375, 0.0171356201171875, 0.0230560302734375, 0.00846099853515625, -0.015106201171875, -0.007183074951171875, 0.006282806396484375, -0.016357421875, 0.0413818359375, 0.039581298828125, 0.036285400390625, 0.03594970703125, -0.0091705322265625, -0.03143310546875, -0.043304443359375, 0.001514434814453125, 0.0386962890625, -0.0102386474609375, -0.04730224609375, -0.010284423828125, 0.019439697265625, 0.026123046875, -0.03839111328125, 0.0015249252319335938, -0.04193115234375, -0.02099609375, -0.0036182403564453125, 0.0538330078125, -0.0362548828125, 0.0091705322265625, 0.004627227783203125, -0.053802490234375, -0.00882720947265625, 0.02911376953125, -0.10797119140625, -0.007038116455078125, -0.01003265380859375, -0.0123138427734375, 0.027008056640625, 0.0021381378173828125, 0.00809478759765625, -0.021881103515625, -0.0087127685546875, -0.012542724609375, 0.005889892578125, 0.0311431884765625, -0.01110076904296875, -0.032684326171875, -0.006908416748046875, -0.01515960693359375, -0.01152801513671875, -0.0192108154296875, -0.02862548828125, -0.0408935546875, -0.0175018310546875, 0.0266265869140625, 0.025909423828125, 0.0007557868957519531, -0.02032470703125, -0.021820068359375, 0.0179595947265625, 0.03472900390625, 0.03302001953125, -0.009674072265625, 0.064697265625, -0.01311492919921875, 0.055694580078125, -0.0014619827270507812, 0.0265350341796875, -0.01078033447265625, -0.00008767843246459961, 0.0170135498046875, 0.03607177734375, -0.00901031494140625, -0.0268707275390625, 0.004863739013671875, -0.055084228515625, 0.03277587890625, -0.011810302734375, -0.0061798095703125, 0.0001291036605834961, 0.01146697998046875, -0.0296173095703125, 0.027435302734375, -0.0206298828125, -0.0022830963134765625, 0.021636962890625, -0.031646728515625, -0.0127105712890625, -0.014862060546875, -0.0030670166015625, 0.0357666015625, -0.01263427734375, 0.0131988525390625, 0.00922393798828125, -0.01331329345703125, 0.015289306640625, 0.042724609375, 0.007720947265625, 0.048126220703125, 0.031158447265625, 0.01556396484375, 0.01297760009765625, 0.01209259033203125, -0.0186767578125, 0.006710052490234375, -0.007183074951171875, -0.025360107421875, 0.0188140869140625, -0.017364501953125, 0.007671356201171875, 0.01348876953125, 0.100830078125, 0.07061767578125, -0.144775390625, -0.0009131431579589844, 0.01131439208984375, -0.01435089111328125, -0.01540374755859375, -0.01409149169921875, -0.01226806640625, -0.058013916015625, 0.0963134765625, -0.022491455078125, -0.0040130615234375, 0.037109375, -0.0341796875, -0.0044403076171875, 0.018218994140625, 0.04083251953125, 0.020477294921875, 0.02191162109375, -0.04248046875, -0.0018281936645507812, 0.0249786376953125, -0.026336669921875, -0.01947021484375, 0.031402587890625, -0.03973388671875, -0.08544921875, 0.01485443115234375, -0.0081024169921875, -0.015869140625, 0.026153564453125, -0.00882720947265625, 0.0209503173828125, 0.043426513671875, -0.014801025390625, -0.015533447265625, 0.01406097412109375, -0.0202484130859375, 0.03399658203125, -0.0152130126953125, 0.0183258056640625, 0.004039764404296875, -0.04119873046875, 0.0025272369384765625, -0.0335693359375, -0.01036834716796875, -0.0176239013671875, -0.00604248046875, 0.0472412109375, 0.054840087890625, -0.03961181640625, 0.0264892578125, 0.01444244384765625, -0.016754150390625, -0.02386474609375, -0.0361328125, -0.08343505859375, -0.06561279296875, -0.0305023193359375, -0.07940673828125, 0.0156402587890625, -0.0048675537109375, -0.03631591796875, 0.045867919921875, -0.033050537109375, 0.012115478515625, 0.019195556640625, 0.01479339599609375, -0.011810302734375, -0.005985260009765625, -0.01026153564453125, -0.0288848876953125, -0.0249176025390625, -0.004627227783203125, -0.0350341796875, 0.0009918212890625, -0.0312347412109375, 0.04901123046875, 0.020660400390625, 0.021270751953125, -0.022735595703125, -0.0235748291015625, -0.0396728515625, -0.0312042236328125, -0.034820556640625, 0.051422119140625, 0.0233612060546875, 0.03448486328125, 0.0310211181640625, -0.0294952392578125, 0.037994384765625, -0.040679931640625, 0.0003414154052734375, 0.0252685546875, 0.009429931640625, -0.0086212158203125, -0.0008034706115722656, 0.05572509765625, -0.036468505859375, -0.007732391357421875, 0.0302276611328125, -0.0482177734375, 0.0316162109375, 0.004627227783203125, 0.0360107421875, -0.0306549072265625, 0.00833892822265625, -0.0216827392578125, 0.043853759765625, -0.006439208984375, -0.033599853515625, 0.031768798828125, 0.01149749755859375, -0.02197265625, 0.0158843994140625, -0.012725830078125, 0.01806640625, 0.01995849609375, 0.0267333984375, 0.007312774658203125, 0.02423095703125, -0.01523590087890625, -0.0098876953125, -0.00067138671875, 0.026641845703125, -0.01528167724609375, -0.075927734375, 0.011077880859375, 0.01873779296875, 0.0078582763671875, 0.059844970703125, 0.012420654296875, 0.003429412841796875, 0.07489013671875, 0.03363037109375, -0.0022792816162109375, -0.0447998046875, 0.034027099609375, -0.0017137527465820312, 0.028839111328125, -0.003086090087890625, 0.01285552978515625, -0.025848388671875, 0.007495880126953125, 0.0152435302734375, 0.0214080810546875, 0.0086212158203125, 0.01873779296875, 0.0183258056640625, -0.01290130615234375, -0.00580596923828125, 0.02716064453125, 0.00870513916015625, -0.0023555755615234375, 0.0010786056518554688, -0.01398468017578125, -0.0206146240234375, 0.00946044921875, 0.0265045166015625, -0.01544189453125, 0.0445556640625, 0.05401611328125, -0.031829833984375, -0.021270751953125, -0.00873565673828125, -0.00787353515625, -0.01273345947265625, -0.010040283203125, 0.04156494140625, 0.03961181640625, 0.022308349609375, -0.018524169921875, 0.065185546875, 0.015960693359375, -0.0218505859375, 0.022003173828125, -0.0097198486328125, -0.026580810546875, 0.0234375, -0.0139007568359375, 0.0455322265625, -0.01020050048828125, -0.029632568359375, 0.008544921875, -0.0267791748046875, -0.0643310546875, 0.0293731689453125, 0.0304718017578125, -0.0294036865234375, 0.037322998046875, 0.01204681396484375, -0.0218505859375, 0.0253448486328125, 0.01352691650390625, 0.0089569091796875, -0.0002142190933227539, 0.01239776611328125, -0.0175933837890625, -0.050445556640625, -0.035736083984375, -0.033935546875, 0.043731689453125, 0.016754150390625, 0.0280609130859375, -0.00478363037109375, 0.0487060546875, -0.005889892578125, 0.01483917236328125, 0.01496124267578125, 0.00879669189453125, -0.00783538818359375, 0.05938720703125, 0.032470703125, -0.046173095703125, -0.073974609375, 0.027984619140625, -0.0038356781005859375, -0.005584716796875, 0.0494384765625, -0.0132904052734375, 0.0016632080078125, -0.0007653236389160156, -0.0123443603515625, -0.044036865234375, -0.04248046875, -0.0704345703125, -0.030120849609375, 0.031982421875, 0.01580810546875, 0.0010404586791992188, 0.0330810546875, -0.04473876953125, -0.029205322265625, 0.00824737548828125, -0.041351318359375, -0.040191650390625, 0.0084686279296875, -0.001277923583984375, 0.0142822265625, 0.003936767578125, -0.018096923828125, -0.01464080810546875, 0.0224609375, -0.004642486572265625, 0.0036602020263671875, 0.02337646484375, -0.004547119140625, -0.005641937255859375, 0.01421356201171875, -0.0210113525390625, -0.00853729248046875, 0.0211181640625, -0.010162353515625, -0.031402587890625, -0.003215789794921875, -0.0124359130859375, 0.0031452178955078125, 0.00823211669921875, 0.01006317138671875, 0.0301971435546875, -0.02154541015625, -0.0235443115234375, 0.02166748046875, -0.0069122314453125, -0.0275115966796875, -0.0281524658203125, 0.0179901123046875, -0.031524658203125, 0.042724609375, -0.04840087890625, -0.058197021484375, 0.0261383056640625, 0.01160430908203125, -0.038299560546875, -0.00807952880859375, -0.042633056640625, -0.034637451171875, -0.037933349609375, 0.00691986083984375, 0.0416259765625, 0.0083160400390625, -0.02984619140625, 0.0217132568359375, -0.0148773193359375, 0.0738525390625, -0.04718017578125, -0.014923095703125, 0.006931304931640625, 0.0134124755859375, -0.0165863037109375, -0.1116943359375, -0.0122528076171875, -0.06732177734375, 0.027099609375, -0.0242919921875, -0.0186614990234375, -0.0207366943359375, -0.08111572265625, -0.1241455078125, 0.02410888671875, -0.0207366943359375, -0.0474853515625, 0.006328582763671875, 0.03961181640625, 0.002910614013671875, -0.04541015625, 0.006908416748046875, -0.01544189453125, 0.00962066650390625, -0.0279388427734375, 0.043548583984375, 0.037017822265625, 0.0004649162292480469, 0.013824462890625, -0.0283203125, 0.03887939453125, 0.037811279296875, 0.036834716796875, 0.025634765625, -0.012908935546875, 0.01000213623046875, 0.01154327392578125, -0.04412841796875, -0.035400390625, -0.005184173583984375, 0.00978851318359375, -0.016571044921875, -0.041290283203125, -0.000888824462890625, -0.044921875, 0.055267333984375, -0.00716400146484375, 0.006595611572265625, 0.007076263427734375, -0.01247406005859375, -0.010650634765625, 0.0077362060546875, -0.039794921875, -0.007724761962890625, -0.049896240234375, -0.005523681640625, -0.0158843994140625, -0.0134735107421875, 0.0051727294921875, 0.030609130859375, -0.02044677734375, 0.005374908447265625, 0.025634765625, -0.0246124267578125, -0.046722412109375, -0.042816162109375, 0.037841796875, -0.0279998779296875, -0.0163116455078125, 0.0217437744140625, 0.03509521484375, -0.0010824203491210938, 0.05181884765625, -0.03118896484375, 0.003925323486328125, 0.00467681884765625, 0.041412353515625, -0.00737762451171875, 0.006160736083984375, -0.018341064453125, 0.0258026123046875, -0.0186920166015625, 0.03118896484375, 0.00945281982421875, 0.0556640625, -0.0235748291015625, 0.0189056396484375, 0.039306640625, -0.02496337890625, -0.018218994140625, -0.06939697265625, -0.0238800048828125, 0.009490966796875, -0.02777099609375, 0.012115478515625, 0.0164031982421875, -0.038238525390625, 0.013214111328125, 0.0016765594482421875, 0.0275115966796875, -0.045806884765625, 0.029388427734375, 0.03338623046875, 0.01385498046875, 0.028778076171875 ]
cb559dc72c4458a6a93dda33972555a56a723920
Wordpress Stackexchange Q: How to remove "prev, next, shortlink" from wp_head()? I'm using these filters to clean the head of my theme: remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'start_post_rel_link', 10, 0); remove_action('wp_head', 'parent_post_rel_link', 10, 0); remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); remove_action('wp_head', 'locale_stylesheet'); remove_action('wp_head', 'noindex'); remove_action('wp_head', 'wp_print_styles'); remove_action('wp_head', 'wp_print_head_scripts'); However, I can't seem to get rid of these: <link rel='prev' title='Top Menu Item 1' href='http://localhost/test/test-prev.html' /> <link rel='next' title='Internal title test default title' href='http://localhost/test/text-next.html' /> <link rel='shortlink' href='http://localhost/test/?p=528' /> A: Add these to your list: <?php remove_action('wp_head', 'wp_shortlink_wp_head'); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); wp-includes/default-filters.php should be your first stop to check out what WordPress is using its own hook system for.
Q: How to remove "prev, next, shortlink" from wp_head()? I'm using these filters to clean the head of my theme: remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'start_post_rel_link', 10, 0); remove_action('wp_head', 'parent_post_rel_link', 10, 0); remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); remove_action('wp_head', 'locale_stylesheet'); remove_action('wp_head', 'noindex'); remove_action('wp_head', 'wp_print_styles'); remove_action('wp_head', 'wp_print_head_scripts'); However, I can't seem to get rid of these: <link rel='prev' title='Top Menu Item 1' href='http://localhost/test/test-prev.html' /> <link rel='next' title='Internal title test default title' href='http://localhost/test/text-next.html' /> <link rel='shortlink' href='http://localhost/test/?p=528' /> A: Add these to your list: <?php remove_action('wp_head', 'wp_shortlink_wp_head'); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); wp-includes/default-filters.php should be your first stop to check out what WordPress is using its own hook system for. A: I've been struggling with this for a while, too, and it appears you should remove action with exactly the same parameters it was added. so for me the following like in functions.php did the job: remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10,0); I'm using WP 3.3.1 A: One shouldn't remove them. They are important for search engines like Google. One can remove them like this: remove_action('wp_head', 'wp_shortlink_wp_head'); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); Here are some additional explanations why they should not be removed and how this effects search engines: * *Core Code insertion *The related trac ticket *Google Webmaster Central Article about changes & impact on SEO In case one removes them, one should really add its own (in case one has changed their links and they are not pointing to the correct urls, that the pagination points to).
wordpress
{ "language": "en", "length": 246, "provenance": "stackexchange_00019.jsonl.gz:413212", "question_score": "7", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29001" }
[ 0.0693359375, 0.0225982666015625, 0.02532958984375, -0.020843505859375, 0.028839111328125, -0.035980224609375, 0.0653076171875, -0.040008544921875, -0.0182952880859375, 0.02764892578125, 0.032806396484375, -0.006908416748046875, -0.022613525390625, -0.04302978515625, -0.0003108978271484375, -0.016845703125, 0.047821044921875, -0.033538818359375, 0.029266357421875, 0.01148223876953125, -0.0178375244140625, 0.0521240234375, 0.046356201171875, 0.035125732421875, 0.024688720703125, -0.043212890625, 0.05828857421875, -0.006931304931640625, 0.0002765655517578125, -0.038116455078125, 0.0215606689453125, 0.0426025390625, 0.006256103515625, 0.0396728515625, -0.02557373046875, -0.0012941360473632812, 0.00390625, 0.01580810546875, 0.0143585205078125, 0.005496978759765625, -0.01363372802734375, 0.006290435791015625, -0.012969970703125, -0.036834716796875, -0.03857421875, -0.0162200927734375, -0.00899505615234375, -0.0056915283203125, -0.0184326171875, -0.002788543701171875, 0.0187225341796875, 0.01025390625, 0.03570556640625, -0.02398681640625, -0.015838623046875, -0.01055145263671875, -0.006855010986328125, -0.033966064453125, 0.024688720703125, 0.031829833984375, 0.0020294189453125, -0.0135345458984375, 0.007022857666015625, -0.0467529296875, -0.00894927978515625, 0.0217437744140625, 0.037933349609375, -0.003948211669921875, -0.018829345703125, 0.0094146728515625, 0.031402587890625, -0.0177459716796875, -0.0178680419921875, -0.007167816162109375, -0.039031982421875, 0.00878143310546875, -0.019012451171875, -0.0367431640625, 0.039031982421875, -0.016693115234375, -0.04779052734375, -0.0391845703125, -0.055206298828125, 0.01213836669921875, 0.00212860107421875, 0.049835205078125, -0.017608642578125, -0.010467529296875, -0.0423583984375, -0.0079345703125, -0.042694091796875, -0.04150390625, 0.03338623046875, -0.036224365234375, -0.044708251953125, 0.00496673583984375, 0.0408935546875, 0.055816650390625, 0.0012598037719726562, 0.0014476776123046875, 0.00732421875, -0.025726318359375, -0.0033397674560546875, -0.029296875, 0.003963470458984375, 0.025726318359375, -0.0005369186401367188, 0.04302978515625, 0.0504150390625, 0.02716064453125, 0.0172271728515625, 0.0181427001953125, -0.0177459716796875, -0.00412750244140625, -0.02197265625, 0.0218048095703125, -0.060943603515625, 0.015838623046875, -0.0128631591796875, 0.035247802734375, 0.0075531005859375, 0.01262664794921875, -0.00806427001953125, 0.0002014636993408203, 0.0258026123046875, 0.006931304931640625, -0.029937744140625, -0.003795623779296875, 0.0087890625, 0.02899169921875, -0.0443115234375, 0.00034499168395996094, 0.06304931640625, 0.0181884765625, 0.00928497314453125, -0.033905029296875, 0.0205230712890625, 0.0019092559814453125, 0.00873565673828125, -0.0016384124755859375, 0.023223876953125, 0.0025691986083984375, -0.006229400634765625, 0.0123748779296875, 0.02587890625, -0.00580596923828125, -0.006519317626953125, 0.03155517578125, 0.00380706787109375, -0.004932403564453125, 0.040130615234375, -0.05938720703125, 0.0286712646484375, 0.0037441253662109375, -0.026031494140625, -0.0330810546875, 0.03173828125, -0.04058837890625, -0.00788116455078125, -0.04962158203125, -0.01381683349609375, -0.01324462890625, 0.012237548828125, -0.07733154296875, -0.08990478515625, 0.003692626953125, -0.044891357421875, -0.0102996826171875, 0.0225982666015625, 0.0183563232421875, 0.0221710205078125, -0.032562255859375, 0.029541015625, 0.012664794921875, 0.0024356842041015625, 0.01910400390625, -0.0137176513671875, -0.006053924560546875, 0.0098724365234375, 0.019500732421875, 0.0036144256591796875, -0.0274810791015625, 0.0111541748046875, 0.006389617919921875, -0.07830810546875, 0.026123046875, 0.0362548828125, 0.09857177734375, 0.0017681121826171875, 0.0311431884765625, 0.08978271484375, -0.01824951171875, 0.0017023086547851562, -0.01043701171875, 0.00833892822265625, -0.027313232421875, 0.0006775856018066406, -0.01971435546875, 0.00021469593048095703, 0.02020263671875, 0.00794219970703125, 0.02935791015625, -0.0146484375, 0.00830078125, -0.067138671875, 0.0138702392578125, -0.040130615234375, 0.046661376953125, -0.0218963623046875, -0.004039764404296875, 0.02099609375, -0.019012451171875, -0.0098114013671875, -0.037200927734375, -0.0238189697265625, 0.01763916015625, -0.01184844970703125, 0.0016632080078125, 0.004634857177734375, -0.02099609375, 0.01580810546875, 0.00566864013671875, 0.0006232261657714844, 0.016998291015625, 0.033477783203125, -0.018310546875, -0.0244903564453125, -0.03753662109375, -0.016082763671875, 0.0014505386352539062, -0.0723876953125, 0.07550048828125, 0.002132415771484375, 0.032318115234375, -0.0160675048828125, 0.0064697265625, 0.00969696044921875, -0.00125885009765625, -0.00177001953125, 0.01922607421875, 0.044281005859375, 0.0274200439453125, 0.0158233642578125, 0.0043487548828125, 0.031829833984375, -0.0087432861328125, 0.048004150390625, -0.0465087890625, 0.0142974853515625, 0.030120849609375, -0.006847381591796875, -0.011505126953125, 0.024688720703125, 0.01030731201171875, 0.01078033447265625, 0.0258636474609375, -0.003559112548828125, -0.05120849609375, 0.0214080810546875, -0.01294708251953125, 0.03656005859375, -0.029327392578125, -0.0599365234375, 0.00740814208984375, 0.015045166015625, -0.0255889892578125, -0.0011510848999023438, -0.0025787353515625, -0.0297698974609375, -0.01629638671875, 0.0416259765625, 0.01424407958984375, -0.021240234375, 0.0265350341796875, 0.033111572265625, -0.03173828125, 0.0134124755859375, -0.01285552978515625, -0.04840087890625, -0.01141357421875, 0.0036830902099609375, 0.052947998046875, 0.0302581787109375, -0.0229339599609375, -0.004497528076171875, -0.040496826171875, 0.004924774169921875, -0.014617919921875, 0.03985595703125, 0.0233612060546875, 0.02471923828125, 0.0264739990234375, -0.02520751953125, 0.053253173828125, 0.03363037109375, -0.031524658203125, 0.04718017578125, -0.0238800048828125, 0.0255889892578125, -0.0259857177734375, 0.0350341796875, 0.043548583984375, -0.0176544189453125, 0.00521087646484375, -0.00945281982421875, 0.0086517333984375, 0.0155181884765625, -0.036407470703125, -0.03515625, 0.0222320556640625, -0.08026123046875, -0.02911376953125, 0.0198974609375, 0.01396942138671875, 0.0012826919555664062, -0.041778564453125, 0.0025634765625, 0.009063720703125, -0.060150146484375, -0.022552490234375, 0.0191192626953125, -0.01146697998046875, -0.00015819072723388672, 0.0300750732421875, -0.020538330078125, -0.031768798828125, 0.07672119140625, 0.005405426025390625, 0.03814697265625, -0.051300048828125, -0.0276031494140625, -0.0253143310546875, -0.045501708984375, -0.00548553466796875, 0.00335693359375, -0.027008056640625, -0.00733184814453125, 0.038482666015625, 0.0004487037658691406, -0.0322265625, 0.00681304931640625, -0.00737762451171875, -0.0008177757263183594, 0.0216522216796875, -0.02777099609375, -0.0015716552734375, -0.0148773193359375, -0.00995635986328125, 0.0164337158203125, 0.0122833251953125, 0.0008726119995117188, 0.005764007568359375, -0.01372528076171875, 0.0263671875, 0.0270233154296875, 0.019287109375, 0.004779815673828125, -0.0235443115234375, 0.0117950439453125, -0.040740966796875, -0.0333251953125, -0.0219268798828125, -0.054107666015625, 0.054779052734375, 0.035675048828125, -0.0004699230194091797, -0.012237548828125, 0.034454345703125, 0.04571533203125, 0.0193023681640625, 0.0235595703125, -0.0013723373413085938, 0.0067596435546875, -0.003330230712890625, 0.017486572265625, -0.052398681640625, 0.0631103515625, 0.01329803466796875, 0.007801055908203125, 0.0313720703125, 0.0210723876953125, 0.004932403564453125, -0.0028820037841796875, -0.0277252197265625, 0.0119171142578125, 0.04443359375, -0.021820068359375, 0.035491943359375, -0.01059722900390625, -0.0173187255859375, -0.0245513916015625, 0.052215576171875, -0.05975341796875, -0.0247344970703125, -0.00406646728515625, 0.0268096923828125, 0.0122222900390625, -0.062469482421875, 0.012603759765625, -0.021209716796875, -0.1683349609375, 0.02032470703125, -0.01363372802734375, -0.035858154296875, -0.016510009765625, 0.01299285888671875, -0.08441162109375, -0.0758056640625, 0.0360107421875, 0.0511474609375, -0.0221710205078125, 0.0164947509765625, -0.0494384765625, 0.00537872314453125, -0.051177978515625, 0.02398681640625, -0.087158203125, -0.016021728515625, -0.035614013671875, 0.07110595703125, 0.033599853515625, -0.033050537109375, -0.035980224609375, 0.025482177734375, -0.0022335052490234375, 0.01293182373046875, -0.00009065866470336914, -0.006317138671875, 0.0023288726806640625, 0.0249176025390625, -0.0008859634399414062, -0.01806640625, 0.00494384765625, 0.01544952392578125, -0.0268402099609375, 0.02838134765625, -0.01555633544921875, -0.00815582275390625, 0.01351165771484375, -0.032745361328125, -0.0587158203125, -0.049591064453125, -0.002399444580078125, 0.0275421142578125, 0.00536346435546875, 0.006427764892578125, -0.068603515625, -0.052978515625, 0.02337646484375, -0.0222930908203125, -0.0147857666015625, 0.0019178390502929688, 0.0004558563232421875, 0.021087646484375, -0.0294952392578125, 0.059814453125, 0.007137298583984375, 0.0152740478515625, -0.0281219482421875, 0.06341552734375, -0.001544952392578125, 0.002529144287109375, 0.07806396484375, -0.0303802490234375, 0.0118865966796875, -0.0294952392578125, 0.05743408203125, 0.001270294189453125, -0.0171356201171875, 0.0256500244140625, 0.00067138671875, -0.015716552734375, -0.0027370452880859375, 0.0074310302734375, -0.037109375, 0.01364898681640625, 0.01509857177734375, 0.012176513671875, 0.0219573974609375, -0.00247955322265625, 0.00519561767578125, -0.01110076904296875, 0.036590576171875, 0.058441162109375, 0.034515380859375, 0.0021572113037109375, 0.0014181137084960938, 0.00644683837890625, 0.0290374755859375, -0.012176513671875, 0.035491943359375, -0.043548583984375, 0.06146240234375, -0.03924560546875, -0.0196990966796875, -0.00807952880859375, -0.01036834716796875, 0.065673828125, 0.00812530517578125, -0.01401519775390625, -0.0032958984375, -0.005237579345703125, 0.0159149169921875, -0.0046234130859375, 0.0173492431640625, 0.030364990234375, 0.01357269287109375, 0.0069122314453125, 0.0096588134765625, -0.0020160675048828125, 0.004985809326171875, -0.0242767333984375, -0.0304718017578125, -0.0290679931640625, 0.00012934207916259766, 0.054901123046875, -0.010589599609375, -0.02056884765625, 0.028350830078125, -0.0220947265625, 0.011444091796875, 0.003131866455078125, 0.0166168212890625, -0.00040340423583984375, 0.01511383056640625, 0.02734375, -0.00270843505859375, 0.04949951171875, -0.05816650390625, -0.039947509765625, 0.043243408203125, 0.04156494140625, 0.005153656005859375, 0.00482177734375, 0.004486083984375, 0.012176513671875, -0.02069091796875, 0.0222625732421875, 0.022430419921875, -0.0478515625, 0.01465606689453125, 0.05279541015625, -0.0019969940185546875, -0.00269317626953125, -0.01468658447265625, 0.0292205810546875, -0.0037860870361328125, 0.01042938232421875, 0.018035888671875, -0.0535888671875, 0.003108978271484375, 0.024322509765625, -0.000408172607421875, 0.004726409912109375, 0.01197052001953125, -0.0682373046875, -0.028961181640625, -0.01448822021484375, -0.01085662841796875, 0.04168701171875, -0.0136566162109375, 0.0299835205078125, -0.042724609375, 0.014434814453125, -0.026092529296875, -0.0108642578125, 0.05328369140625, 0.0210418701171875, -0.03326416015625, 0.001064300537109375, -0.043853759765625, -0.0232086181640625, -0.059295654296875, -0.04351806640625, -0.04132080078125, 0.00714111328125, 0.0004963874816894531, 0.0212554931640625, -0.001819610595703125, 0.0243377685546875, 0.0022449493408203125, 0.031707763671875, -0.002353668212890625, 0.04705810546875, -0.022613525390625, 0.0667724609375, 0.006473541259765625, 0.0308990478515625, 0.01235198974609375, 0.03717041015625, -0.00024819374084472656, -0.0230255126953125, 0.03814697265625, -0.020050048828125, -0.038055419921875, -0.049163818359375, -0.02532958984375, 0.005664825439453125, 0.03729248046875, -0.0260162353515625, -0.01123809814453125, -0.0002684593200683594, 0.0016870498657226562, -0.025482177734375, 0.0098876953125, -0.0034313201904296875, -0.01221466064453125, -0.01274871826171875, -0.0171966552734375, 0.030181884765625, 0.021240234375, 0.04638671875, -0.01451873779296875, -0.03192138671875, 0.0021820068359375, 0.001499176025390625, -0.00743865966796875, 0.03851318359375, 0.06439208984375, -0.019775390625, 0.056793212890625, 0.05059814453125, 0.0162506103515625, 0.060333251953125, -0.0012178421020507812, 0.0217132568359375, -0.00719451904296875, 0.063232421875, -0.0015993118286132812, 0.01442718505859375, 0.056915283203125, -0.0175323486328125, 0.012298583984375, 0.0157470703125, 0.04052734375, -0.040283203125, -0.0016384124755859375, 0.020263671875, -0.01111602783203125, 0.042724609375, -0.0030193328857421875, 0.0202789306640625, 0.001979827880859375, -0.00959014892578125, 0.053131103515625, -0.01544189453125, -0.006961822509765625, 0.031158447265625, 0.0158233642578125, -0.01496124267578125, 0.0057220458984375, -0.0033512115478515625, -0.02459716796875, -0.045654296875, 0.0491943359375, -0.0501708984375, -0.044677734375, 0.018218994140625, 0.01425933837890625, -0.0263214111328125, -0.07403564453125, 0.034942626953125, 0.031524658203125, -0.00945281982421875, 0.00623321533203125, -0.020111083984375, 0.002780914306640625, 0.01800537109375, -0.01435089111328125, 0.01065826416015625, -0.01375579833984375, -0.031890869140625, -0.0240020751953125, -0.0225067138671875, 0.009857177734375, -0.03387451171875, -0.047607421875, 0.01454925537109375, -0.057159423828125, -0.0187835693359375, -0.00368499755859375, -0.0224761962890625, 0.0684814453125, -0.0225372314453125, -0.031402587890625, -0.004261016845703125, -0.00527191162109375, 0.018280029296875, -0.02130126953125, 0.03509521484375, -0.05938720703125, -0.0241546630859375, -0.01328277587890625, -0.01145172119140625, 0.0112762451171875, -0.032928466796875, -0.1129150390625, 0.094970703125, 0.0005736351013183594, 0.079345703125, 0.0139312744140625, 0.0229034423828125, -0.021575927734375, -0.01506805419921875, -0.010498046875, 0.058990478515625, 0.021026611328125, -0.0002009868621826172, 0.013763427734375, 0.0006604194641113281, 0.0299072265625, 0.02081298828125, 0.030242919921875, 0.00978851318359375, 0.0101165771484375, 0.00711822509765625, 0.0648193359375, 0.038299560546875, -0.00949859619140625, 0.0049285888671875, -0.03204345703125, 0.01885986328125, 0.00504302978515625, -0.088623046875, -0.0013828277587890625, -0.01483154296875, -0.0226898193359375, -0.003421783447265625, 0.031646728515625, 0.034454345703125, 0.0016651153564453125, 0.024322509765625, -0.04656982421875, 0.0192718505859375, 0.037139892578125, 0.022796630859375, -0.0102691650390625, 0.04046630859375, -0.0006017684936523438, -0.0201416015625, -0.033843994140625, -0.0214080810546875, 0.02606201171875, 0.00812530517578125, 0.0306243896484375, 0.054168701171875, 0.025390625, 0.042327880859375, -0.0275115966796875, 0.0230255126953125, -0.0157928466796875, -0.0058441162109375, 0.074951171875, 0.02532958984375, 0.035369873046875, -0.0250244140625, 0.053497314453125, 0.0193023681640625, 0.058990478515625, -0.061309814453125, -0.0655517578125, -0.0031948089599609375, -0.0085296630859375, 0.00507354736328125, 0.00768280029296875, 0.019744873046875, -0.061309814453125, 0.004711151123046875, -0.038116455078125, -0.0162506103515625, 0.00959014892578125, 0.01081085205078125, 0.00994110107421875, 0.05621337890625, -0.0092926025390625, -0.0310211181640625, -0.0237274169921875, -0.0253753662109375, 0.01108551025390625, 0.048309326171875, 0.037017822265625, 0.029937744140625, -0.00467681884765625, -0.01904296875, -0.0196075439453125, 0.0374755859375, -0.055023193359375, 0.0264739990234375, -0.078125, -0.0628662109375, -0.0516357421875, 0.05712890625, 0.042877197265625, 0.0216217041015625, 0.034088134765625, -0.0242919921875, -0.036102294921875, 0.015716552734375, -0.018463134765625, -0.052215576171875, -0.0203857421875, -0.0004954338073730469, -0.0009813308715820312, 0.01177215576171875, -0.0024127960205078125, -0.026031494140625, 0.05517578125, -0.01544952392578125, -0.0443115234375, 0.0084381103515625, -0.01263427734375, -0.039215087890625, 0.031402587890625, -0.0023097991943359375, 0.0234527587890625, -0.0023708343505859375, -0.031768798828125, -0.00437164306640625, -0.0239715576171875, -0.020965576171875, 0.0108795166015625, 0.03594970703125, -0.005184173583984375, 0.0193634033203125, -0.00330352783203125, -0.0303955078125, 0.026092529296875, -0.005523681640625, 0.00946807861328125, 0.0211334228515625, 0.003734588623046875, -0.00966644287109375, -0.00000959634780883789, -0.003887176513671875, 0.022613525390625, 0.01751708984375, 0.01358795166015625, 0.01702880859375, -0.001983642578125, 0.02325439453125, -0.0302276611328125, 0.055999755859375, -0.025970458984375, -0.004932403564453125, 0.031494140625, 0.0318603515625, 0.0266571044921875, -0.03936767578125, -0.06005859375, 0.0111846923828125, 0.031494140625, -0.0160980224609375, 0.044586181640625, -0.01556396484375, 0.0086517333984375, -0.038177490234375, 0.0221099853515625, -0.0071868896484375, -0.0261688232421875, -0.035797119140625, 0.0086822509765625, 0.047149658203125, 0.04351806640625, -0.036529541015625, 0.02239990234375, 0.0404052734375, 0.0210113525390625, 0.032012939453125, 0.0068206787109375, 0.05657958984375, 0.0289459228515625, 0.0011205673217773438, 0.0208587646484375, 0.035369873046875, -0.0168609619140625, 0.0187835693359375, 0.024017333984375, 0.0036983489990234375, 0.0184783935546875, -0.0278778076171875, -0.0286712646484375, -0.037445068359375, 0.02178955078125, 0.00435638427734375, -0.0024662017822265625, -0.036529541015625, 0.01324462890625, -0.04754638671875, -0.00782012939453125, -0.00665283203125, -0.0220184326171875, -0.03070068359375, 0.00756072998046875, -0.0223388671875, -0.035125732421875, -0.00970458984375, -0.0299072265625, 0.032012939453125, 0.0247039794921875, -0.041473388671875, 0.026885986328125, 0.02099609375, -0.0149078369140625, 0.016265869140625, 0.0181884765625, -0.06390380859375, -0.0307159423828125, -0.023651123046875, -0.06695556640625, -0.0908203125, 0.08917236328125, -0.08245849609375, -0.00075531005859375, 0.022186279296875, 0.000052809715270996094, 0.006313323974609375, -0.017181396484375, -0.0008006095886230469, 0.034759521484375, -0.0026302337646484375, -0.0194091796875, 0.01617431640625, 0.0028591156005859375, -0.005443572998046875, -0.05413818359375, -0.019378662109375, -0.06341552734375, -0.016937255859375, -0.0007910728454589844, -0.01233673095703125, -0.0176849365234375, -0.043243408203125, -0.04962158203125, 0.04534912109375, 0.00470733642578125, -0.02764892578125, -0.039825439453125, 0.044525146484375, -0.006805419921875, -0.0151519775390625, -0.009429931640625, -0.018280029296875, 0.0029582977294921875, 0.01117706298828125, 0.006900787353515625, 0.07318115234375, -0.0124969482421875, 0.02978515625, 0.0391845703125, 0.055755615234375, 0.04156494140625, -0.0081787109375, -0.004695892333984375, 0.011810302734375, 0.01380157470703125, 0.0178375244140625, -0.0269622802734375, 0.06951904296875, -0.01343536376953125, 0.004398345947265625, -0.00876617431640625, -0.024078369140625, -0.041717529296875, -0.00732421875, 0.053497314453125, 0.079345703125, 0.01552581787109375, -0.02838134765625, -0.0162200927734375, 0.038818359375, 0.0007061958312988281, -0.0176544189453125, 0.0211334228515625, -0.047821044921875, -0.045257568359375, -0.032501220703125, -0.006443023681640625, -0.040252685546875, -0.04388427734375, -0.024078369140625, -0.0193328857421875, -0.003223419189453125, 0.045196533203125, 0.039398193359375, 0.049468994140625, 0.01520538330078125, -0.02935791015625, 0.0190887451171875, -0.0308685302734375, -0.0037841796875, 0.01500701904296875, -0.050811767578125, -0.0092010498046875, -0.000762939453125, -0.0298614501953125, -0.0010051727294921875, -0.0029087066650390625, 0.0283966064453125, -0.0283660888671875, -0.01557159423828125, -0.0169219970703125, 0.01032257080078125, 0.012908935546875, 0.005878448486328125, -0.040374755859375, 0.0199127197265625, -0.00469207763671875, 0.027923583984375, -0.01039886474609375, 0.07562255859375, -0.0026836395263671875, 0.0240478515625, -0.0099334716796875, -0.00835418701171875, 0.00832366943359375, -0.00833892822265625, -0.006694793701171875, 0.01425933837890625, -0.01380157470703125, -0.0811767578125, 0.0180511474609375, 0.047576904296875, 0.035125732421875, 0.0322265625 ]
ad67d3d58fadd83fbb9dfe8c9f46cbce716aa1b3
Wordpress Stackexchange Q: Better way to enforce category hierarchy in post_categories_metabox? The objective is to ensure that when editing a post, the metabox that lists a hierarchical taxonomy doesn't reorder itself upon Update to put checked items on top. Right now, edit-form-advanced.php calls add_meta_box(), passing a callback of post_categories_meta_box, which is defined in meta-boxes.php. post_categories_meta_box() invokes wp_terms_checklist(), leaving the checked_ontop parameter undefined. wp_terms_checklist() defaults that parameter to true, which is the root cause of all this hooplah. Nary a filter hook to be found anywhere along the chain until we back out and discover add_meta_boxes and add_meta_boxes_{$post_type}. The only solution I was able to come up with myself was to hook onto one of these actions, globalize $wp_meta_boxes, and replace occurrences of the post_categories_meta_box callback with a callback of my own, where I completely duplicate all of post_categories_meta_box() and simply add the parameter 'checked_ontop' => false. Works. But fugly. This seems ridiculous - is there no more elegant way to simply let your hierarchical taxonomies keep their order in metaboxes? A: There's a plugin written specifically to fix this 'feature' of WordPress, it's called Category Checklist Tree. Despite the name, it works on custom taxonomies too.
Q: Better way to enforce category hierarchy in post_categories_metabox? The objective is to ensure that when editing a post, the metabox that lists a hierarchical taxonomy doesn't reorder itself upon Update to put checked items on top. Right now, edit-form-advanced.php calls add_meta_box(), passing a callback of post_categories_meta_box, which is defined in meta-boxes.php. post_categories_meta_box() invokes wp_terms_checklist(), leaving the checked_ontop parameter undefined. wp_terms_checklist() defaults that parameter to true, which is the root cause of all this hooplah. Nary a filter hook to be found anywhere along the chain until we back out and discover add_meta_boxes and add_meta_boxes_{$post_type}. The only solution I was able to come up with myself was to hook onto one of these actions, globalize $wp_meta_boxes, and replace occurrences of the post_categories_meta_box callback with a callback of my own, where I completely duplicate all of post_categories_meta_box() and simply add the parameter 'checked_ontop' => false. Works. But fugly. This seems ridiculous - is there no more elegant way to simply let your hierarchical taxonomies keep their order in metaboxes? A: There's a plugin written specifically to fix this 'feature' of WordPress, it's called Category Checklist Tree. Despite the name, it works on custom taxonomies too. A: Nowadays there is a hook available for this problem: https://developer.wordpress.org/reference/hooks/wp_terms_checklist_args/
wordpress
{ "language": "en", "length": 205, "provenance": "stackexchange_00019.jsonl.gz:413220", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29033" }
[ 0.0684814453125, 0.00243377685546875, -0.007381439208984375, -0.0802001953125, 0.044677734375, -0.0094146728515625, 0.0034084320068359375, -0.005207061767578125, 0.0089111328125, 0.03961181640625, 0.00629425048828125, -0.03814697265625, 0.01087188720703125, -0.028564453125, -0.0487060546875, -0.01348876953125, -0.005023956298828125, 0.0046539306640625, 0.0009045600891113281, -0.0293426513671875, 0.0041351318359375, -0.033203125, 0.01206207275390625, 0.0103912353515625, 0.00762176513671875, -0.0323486328125, 0.04241943359375, -0.041748046875, 0.01255035400390625, -0.03564453125, 0.01104736328125, 0.017486572265625, 0.007373809814453125, 0.020782470703125, -0.01702880859375, 0.0005383491516113281, 0.031158447265625, 0.00577545166015625, -0.0033016204833984375, 0.036529541015625, 0.01526641845703125, -0.00867462158203125, 0.0023326873779296875, 0.0040283203125, -0.0255126953125, -0.041595458984375, 0.00923919677734375, -0.0165557861328125, 0.03875732421875, -0.035980224609375, 0.01560211181640625, -0.001953125, 0.02996826171875, -0.0755615234375, -0.03387451171875, -0.0178680419921875, -0.01375579833984375, -0.036041259765625, 0.0273590087890625, 0.0309295654296875, -0.0044708251953125, -0.02777099609375, 0.0138702392578125, -0.038482666015625, -0.004177093505859375, -0.01418304443359375, -0.02447509765625, 0.01568603515625, -0.0428466796875, 0.01702880859375, 0.061431884765625, -0.043792724609375, 0.01207733154296875, -0.01276397705078125, -0.005771636962890625, -0.0124969482421875, 0.0018587112426757812, 0.0006184577941894531, 0.030609130859375, -0.002254486083984375, 0.03582763671875, 0.0172119140625, -0.004894256591796875, -0.006877899169921875, 0.0227813720703125, 0.0330810546875, -0.00463104248046875, -0.0360107421875, -0.03436279296875, -0.048431396484375, -0.0170440673828125, -0.05633544921875, -0.0714111328125, 0.003452301025390625, 0.017364501953125, -0.047882080078125, 0.025665283203125, 0.0601806640625, -0.034698486328125, 0.0005726814270019531, -0.0256805419921875, -0.00968170166015625, 0.000023424625396728516, -0.0262603759765625, 0.0006041526794433594, 0.009246826171875, -0.0275421142578125, -0.0128936767578125, 0.04571533203125, 0.05364990234375, -0.0010023117065429688, 0.0228424072265625, 0.005695343017578125, -0.027313232421875, 0.0253143310546875, -0.00038361549377441406, -0.0302581787109375, 0.052978515625, 0.0086212158203125, 0.0086517333984375, 0.0287933349609375, 0.04119873046875, 0.007232666015625, -0.023651123046875, 0.004119873046875, -0.0033054351806640625, -0.044891357421875, -0.023529052734375, -0.0186004638671875, 0.008514404296875, -0.055328369140625, 0.01056671142578125, 0.10089111328125, 0.044036865234375, 0.02435302734375, -0.0255126953125, 0.0205535888671875, 0.00940704345703125, 0.01363372802734375, 0.0023784637451171875, -0.00611114501953125, -0.026031494140625, 0.00978851318359375, 0.00443267822265625, -0.0345458984375, 0.01477813720703125, 0.017913818359375, -0.0033473968505859375, -0.01201629638671875, -0.0487060546875, -0.00235748291015625, -0.0560302734375, 0.07208251953125, -0.0029010772705078125, -0.046630859375, -0.040740966796875, 0.050567626953125, -0.050506591796875, -0.043548583984375, -0.0875244140625, -0.038421630859375, 0.007686614990234375, 0.02569580078125, -0.056243896484375, -0.04986572265625, 0.004856109619140625, -0.01221466064453125, -0.00031375885009765625, 0.024658203125, -0.0087738037109375, 0.0386962890625, 0.0269927978515625, -0.01654052734375, -0.012451171875, 0.0107574462890625, -0.01390838623046875, -0.007007598876953125, 0.03167724609375, 0.00807952880859375, 0.0140533447265625, -0.00769805908203125, -0.042144775390625, 0.039794921875, -0.007843017578125, -0.034393310546875, 0.0201416015625, 0.0084686279296875, 0.02935791015625, 0.00792694091796875, 0.0219268798828125, 0.040069580078125, 0.002796173095703125, -0.082275390625, 0.049407958984375, 0.0207977294921875, 0.029815673828125, -0.0171661376953125, 0.020477294921875, 0.011627197265625, -0.05792236328125, -0.0435791015625, 0.00225067138671875, -0.021728515625, 0.0163421630859375, -0.031341552734375, -0.010223388671875, -0.021270751953125, 0.040191650390625, 0.0251617431640625, 0.0025844573974609375, -0.00391387939453125, -0.0091094970703125, -0.00024437904357910156, -0.0267333984375, -0.03375244140625, 0.01123809814453125, 0.00318145751953125, 0.021209716796875, -0.0025310516357421875, -0.0164947509765625, -0.00612640380859375, -0.01128387451171875, -0.023773193359375, -0.0103759765625, 0.0211029052734375, 0.036285400390625, -0.0274200439453125, 0.006076812744140625, 0.00243377685546875, 0.040985107421875, -0.03131103515625, 0.01064300537109375, 0.030731201171875, 0.0150146484375, -0.033172607421875, -0.017425537109375, 0.002208709716796875, -0.09112548828125, 0.01206207275390625, 0.06378173828125, 0.01103973388671875, 0.0288238525390625, -0.032806396484375, 0.0291900634765625, 0.018951416015625, -0.0782470703125, -0.035400390625, 0.034576416015625, -0.018463134765625, 0.0258331298828125, -0.0197296142578125, 0.02630615234375, 0.024993896484375, 0.050933837890625, 0.00623321533203125, 0.0237884521484375, 0.0034770965576171875, -0.001667022705078125, -0.01543426513671875, -0.01708984375, 0.0184783935546875, -0.033935546875, -0.056793212890625, 0.0037784576416015625, 0.06195068359375, -0.0254364013671875, 0.04998779296875, 0.0214691162109375, 0.002101898193359375, -0.01030731201171875, -0.002613067626953125, -0.034210205078125, -0.002468109130859375, 0.0007977485656738281, 0.0026645660400390625, 0.009246826171875, -0.0361328125, 0.01171875, 0.0015058517456054688, 0.003307342529296875, -0.008209228515625, 0.0235443115234375, 0.0032501220703125, -0.0014209747314453125, -0.0097503662109375, -0.038055419921875, 0.01506805419921875, 0.024871826171875, -0.03045654296875, -0.04229736328125, 0.008514404296875, -0.002559661865234375, -0.057952880859375, 0.031341552734375, -0.01273345947265625, -0.043426513671875, 0.01212310791015625, 0.007183074951171875, 0.00702667236328125, -0.019683837890625, 0.0246429443359375, 0.031951904296875, -0.01248931884765625, -0.00927734375, -0.007709503173828125, 0.0284271240234375, -0.02386474609375, 0.01335906982421875, -0.0224456787109375, -0.0222625732421875, -0.048675537109375, -0.0160675048828125, 0.036346435546875, 0.0234375, 0.045318603515625, -0.032684326171875, 0.0266265869140625, 0.032806396484375, -0.0235443115234375, -0.04339599609375, 0.00811004638671875, -0.021392822265625, 0.006439208984375, 0.0268707275390625, -0.0168914794921875, -0.0258636474609375, 0.049896240234375, 0.00933074951171875, -0.0341796875, -0.02447509765625, -0.0015192031860351562, -0.06182861328125, -0.0372314453125, -0.01538848876953125, 0.0262603759765625, 0.00518798828125, 0.0013446807861328125, 0.091796875, 0.007663726806640625, -0.08367919921875, -0.0158538818359375, 0.01393890380859375, -0.00920867919921875, 0.052520751953125, 0.0273895263671875, -0.045562744140625, -0.004413604736328125, -0.00807952880859375, 0.0074615478515625, 0.01367950439453125, -0.0143585205078125, 0.0017976760864257812, -0.034271240234375, 0.0231781005859375, 0.0053863525390625, -0.004673004150390625, 0.0369873046875, 0.060302734375, 0.0237274169921875, -0.0003376007080078125, 0.00716400146484375, 0.0094451904296875, -0.01001739501953125, -0.022796630859375, -0.031219482421875, 0.0014629364013671875, 0.003932952880859375, 0.015106201171875, 0.026336669921875, 0.042449951171875, 0.00868988037109375, 0.0147857666015625, -0.0023403167724609375, -0.0142974853515625, -0.00299072265625, -0.03790283203125, 0.0038928985595703125, -0.0088348388671875, -0.01373291015625, -0.0179595947265625, 0.0017290115356445312, -0.0296630859375, 0.044769287109375, -0.037841796875, -0.033294677734375, 0.021209716796875, -0.0560302734375, 0.00982666015625, -0.052215576171875, 0.0026340484619140625, -0.03411865234375, 0.042999267578125, -0.07452392578125, -0.0253753662109375, 0.029693603515625, 0.0186309814453125, 0.0146636962890625, -0.0028247833251953125, -0.0401611328125, -0.03887939453125, -0.10186767578125, -0.0005736351013183594, 0.0335693359375, -0.07891845703125, -0.003414154052734375, 0.040130615234375, -0.09552001953125, -0.007274627685546875, 0.05767822265625, -0.07373046875, -0.003368377685546875, 0.040985107421875, 0.0144805908203125, -0.0316162109375, -0.040740966796875, -0.0027313232421875, -0.083251953125, -0.0096893310546875, -0.034698486328125, 0.04034423828125, -0.01702880859375, 0.010711669921875, -0.038238525390625, 0.039642333984375, 0.0029506683349609375, 0.0120086669921875, 0.0014219284057617188, 0.0172882080078125, 0.00742340087890625, -0.0310516357421875, -0.0012025833129882812, -0.02825927734375, -0.0301513671875, 0.005748748779296875, 0.00247955322265625, 0.02020263671875, 0.00864410400390625, -0.058258056640625, 0.048065185546875, -0.0204010009765625, -0.09234619140625, -0.08746337890625, -0.10015869140625, -0.042388916015625, -0.03619384765625, -0.0197601318359375, -0.08111572265625, -0.10662841796875, 0.0017347335815429688, -0.032989501953125, -0.00012004375457763672, 0.0200042724609375, 0.060882568359375, 0.0222625732421875, 0.0092315673828125, -0.0509033203125, 0.0009317398071289062, 0.021636962890625, 0.0161590576171875, 0.0189361572265625, -0.002124786376953125, -0.00778961181640625, 0.038360595703125, -0.013946533203125, 0.005924224853515625, -0.0096282958984375, 0.043304443359375, 0.008209228515625, -0.04412841796875, 0.0309295654296875, 0.004039764404296875, -0.02008056640625, 0.0234375, 0.0016565322875976562, -0.026702880859375, -0.043670654296875, 0.0311431884765625, 0.0352783203125, -0.0276031494140625, -0.046966552734375, -0.0261383056640625, 0.019317626953125, 0.0176849365234375, 0.03338623046875, 0.0293121337890625, -0.006397247314453125, 0.00901031494140625, -0.0234527587890625, 0.013275146484375, -0.031280517578125, 0.002323150634765625, -0.03155517578125, 0.0188446044921875, 0.0078887939453125, 0.004238128662109375, -0.028228759765625, 0.003208160400390625, 0.038848876953125, -0.004390716552734375, -0.0289154052734375, -0.025634765625, 0.0017633438110351562, 0.01568603515625, 0.019287109375, -0.002841949462890625, 0.035064697265625, -0.0068206787109375, -0.014190673828125, -0.01393890380859375, -0.0477294921875, -0.005962371826171875, -0.05084228515625, 0.0046844482421875, 0.027557373046875, -0.02825927734375, 0.017242431640625, -0.01219940185546875, -0.0031642913818359375, -0.015899658203125, -0.007080078125, 0.0241241455078125, 0.026580810546875, 0.007297515869140625, 0.0175628662109375, -0.02874755859375, 0.018280029296875, -0.034637451171875, 0.02880859375, -0.060791015625, -0.0521240234375, 0.0211639404296875, 0.052459716796875, 0.00630950927734375, 0.003261566162109375, 0.00414276123046875, 0.018463134765625, -0.0254364013671875, -0.01076507568359375, -0.01442718505859375, -0.032257080078125, -0.0007305145263671875, -0.007228851318359375, -0.007572174072265625, 0.00937652587890625, -0.01146697998046875, 0.0157623291015625, -0.0177764892578125, 0.016571044921875, -0.006923675537109375, -0.03240966796875, 0.00959014892578125, 0.0257415771484375, -0.09356689453125, 0.009124755859375, 0.037445068359375, -0.0283050537109375, -0.057952880859375, 0.01137542724609375, -0.0465087890625, 0.008270263671875, -0.03399658203125, 0.048004150390625, -0.0171356201171875, -0.0129241943359375, -0.0003631114959716797, 0.01186370849609375, 0.04766845703125, 0.0323486328125, -0.0226287841796875, -0.011932373046875, -0.04986572265625, -0.0266265869140625, -0.059051513671875, -0.05694580078125, -0.029266357421875, 0.023529052734375, 0.0015077590942382812, 0.0244140625, -0.0247650146484375, -0.01715087890625, -0.01050567626953125, -0.0038547515869140625, 0.00716400146484375, 0.03106689453125, -0.00995635986328125, 0.03765869140625, -0.00782012939453125, 0.03179931640625, -0.00812530517578125, -0.0091094970703125, -0.0215606689453125, -0.00022363662719726562, -0.00443267822265625, -0.08642578125, -0.0290374755859375, -0.0108642578125, -0.02813720703125, 0.060943603515625, 0.0270538330078125, 0.0048370361328125, 0.0218505859375, 0.0080718994140625, 0.0240478515625, -0.002681732177734375, -0.04083251953125, 0.004848480224609375, -0.03302001953125, 0.05743408203125, -0.026885986328125, 0.0007658004760742188, -0.005718231201171875, 0.00225067138671875, 0.03814697265625, -0.0239410400390625, 0.032958984375, 0.009796142578125, -0.05780029296875, 0.03631591796875, -0.0249786376953125, 0.0469970703125, 0.035064697265625, -0.034210205078125, 0.049468994140625, -0.02154541015625, -0.01268768310546875, 0.03314208984375, -0.001659393310546875, 0.062347412109375, -0.01247406005859375, -0.0008978843688964844, 0.048675537109375, -0.031494140625, 0.0006513595581054688, 0.01177978515625, 0.020843505859375, -0.05206298828125, 0.021270751953125, 0.0159912109375, 0.005130767822265625, 0.0003662109375, -0.005401611328125, -0.01080322265625, -0.0095977783203125, 0.02301025390625, -0.0284423828125, -0.042694091796875, 0.01334381103515625, 0.0013942718505859375, -0.02069091796875, -0.032318115234375, 0.01425933837890625, 0.0198822021484375, 0.034454345703125, 0.0172119140625, -0.040924072265625, 0.019256591796875, -0.005329132080078125, 0.0189056396484375, -0.00807952880859375, -0.0159149169921875, -0.03765869140625, 0.0150909423828125, -0.0032749176025390625, -0.023223876953125, 0.033203125, -0.033660888671875, 0.0174713134765625, 0.040130615234375, -0.016845703125, 0.0014410018920898438, -0.0057830810546875, -0.024078369140625, 0.026611328125, -0.014892578125, 0.008209228515625, -0.0172271728515625, -0.019866943359375, -0.005523681640625, -0.0211181640625, -0.0277557373046875, -0.01097869873046875, -0.0284423828125, 0.052398681640625, -0.0254058837890625, -0.0149688720703125, 0.0033512115478515625, 0.036285400390625, 0.0171966552734375, 0.03759765625, 0.07110595703125, -0.05023193359375, -0.049713134765625, 0.054351806640625, -0.03704833984375, -0.056640625, 0.02740478515625, -0.059814453125, 0.0479736328125, 0.01329803466796875, -0.00460052490234375, -0.0263519287109375, 0.0296783447265625, -0.01898193359375, 0.005584716796875, -0.0195465087890625, 0.04876708984375, 0.0102996826171875, 0.0168304443359375, -0.0789794921875, -0.030364990234375, -0.01507568359375, 0.07049560546875, 0.03265380859375, 0.0165863037109375, -0.03961181640625, -0.0247039794921875, 0.01224517822265625, 0.028228759765625, -0.0029201507568359375, 0.049560546875, 0.026397705078125, 0.01470947265625, 0.01416778564453125, 0.00763702392578125, 0.0513916015625, -0.044464111328125, -0.027496337890625, 0.0401611328125, 0.0194244384765625, -0.002536773681640625, -0.0246734619140625, 0.046600341796875, -0.04986572265625, -0.00383758544921875, 0.04595947265625, 0.00020456314086914062, 0.01165008544921875, -0.0021152496337890625, 0.01258087158203125, 0.0033550262451171875, -0.025115966796875, 0.00817108154296875, 0.0318603515625, 0.01776123046875, 0.055572509765625, 0.032135009765625, 0.0279541015625, 0.043609619140625, -0.0254669189453125, 0.03155517578125, 0.01273345947265625, -0.038116455078125, 0.0167694091796875, -0.0181732177734375, 0.0020465850830078125, -0.07025146484375, 0.00710296630859375, 0.05712890625, 0.0374755859375, -0.0286102294921875, -0.07073974609375, 0.00638580322265625, 0.01450347900390625, 0.02294921875, 0.0264129638671875, 0.040008544921875, 0.0113983154296875, 0.0579833984375, -0.050750732421875, -0.01465606689453125, 0.00441741943359375, 0.0394287109375, -0.012420654296875, 0.00445556640625, -0.0162353515625, -0.02581787109375, -0.039886474609375, 0.01372528076171875, 0.014129638671875, 0.034454345703125, 0.00757598876953125, 0.064208984375, -0.010498046875, -0.020111083984375, -0.0252685546875, 0.050140380859375, 0.01047515869140625, 0.0195159912109375, -0.020416259765625, -0.0086669921875, 0.0155029296875, 0.0214691162109375, 0.0262298583984375, 0.03912353515625, 0.058685302734375, 0.06805419921875, 0.032012939453125, 0.0034961700439453125, 0.06573486328125, 0.005008697509765625, -0.0198974609375, -0.04595947265625, 0.06683349609375, 0.03857421875, 0.037841796875, 0.005764007568359375, 0.041351318359375, 0.046600341796875, -0.004520416259765625, 0.02288818359375, 0.006183624267578125, 0.0032749176025390625, 0.0162506103515625, -0.0137481689453125, 0.02337646484375, 0.024993896484375, -0.0528564453125, -0.01312255859375, -0.00803375244140625, -0.0183563232421875, 0.021087646484375, 0.042144775390625, -0.004329681396484375, -0.006320953369140625, -0.0223236083984375, -0.056488037109375, 0.016021728515625, 0.03399658203125, 0.0003337860107421875, 0.0283660888671875, -0.00673675537109375, -0.01303863525390625, 0.01430511474609375, 0.0269927978515625, 0.0222930908203125, 0.00995635986328125, -0.00039005279541015625, 0.061737060546875, -0.0223236083984375, 0.0027523040771484375, -0.046966552734375, 0.023162841796875, -0.06304931640625, -0.04437255859375, 0.029327392578125, -0.016632080078125, -0.014312744140625, 0.02008056640625, -0.01262664794921875, -0.0117034912109375, 0.061187744140625, -0.0361328125, -0.007244110107421875, -0.01258087158203125, 0.01549530029296875, -0.0450439453125, 0.03546142578125, -0.0111236572265625, -0.01393890380859375, -0.03131103515625, -0.0269317626953125, 0.047454833984375, 0.08026123046875, 0.0249481201171875, 0.0163116455078125, 0.0036983489990234375, 0.00437164306640625, 0.013916015625, 0.0014629364013671875, 0.016998291015625, 0.034332275390625, -0.038421630859375, -0.003307342529296875, 0.0231781005859375, -0.0235443115234375, 0.0206756591796875, 0.00583648681640625, -0.0067291259765625, 0.03741455078125, -0.1224365234375, -0.01448822021484375, 0.039520263671875, 0.025421142578125, -0.018829345703125, 0.0053253173828125, 0.0214996337890625, -0.032989501953125, -0.01070404052734375, 0.0054168701171875, -0.0092010498046875, -0.0124969482421875, -0.011077880859375, -0.0091400146484375, 0.003101348876953125, -0.0377197265625, -0.01678466796875, 0.011474609375, 0.03143310546875, 0.00931549072265625, -0.04107666015625, 0.02911376953125, -0.01305389404296875, 0.024932861328125, 0.0180816650390625, -0.00476837158203125, 0.0007562637329101562, 0.044525146484375, -0.0308685302734375, 0.02703857421875, -0.0250091552734375, -0.0290985107421875, -0.01000213623046875, 0.0011472702026367188, -0.0025272369384765625, -0.011962890625, -0.00046563148498535156, 0.000049114227294921875, 0.007335662841796875, 0.0311431884765625, 0.06597900390625, -0.01561737060546875, -0.0211639404296875, 0.029693603515625, -0.01385498046875, -0.02056884765625, 0.00649261474609375, 0.0017766952514648438, -0.0230560302734375, -0.01800537109375, 0.007434844970703125, 0.032867431640625, -0.0305023193359375, -0.08026123046875, 0.00269317626953125, -0.01513671875, -0.04022216796875, -0.00858306884765625, -0.0257720947265625, -0.019500732421875, 0.08349609375, 0.0202178955078125, -0.0271148681640625, -0.032257080078125, 0.0171966552734375, 0.01445770263671875, 0.0215911865234375, 0.03485107421875, -0.004367828369140625, -0.057281494140625, -0.00196075439453125, -0.008392333984375, 0.0152740478515625, -0.027069091796875, 0.0240020751953125, -0.01480865478515625, 0.01422119140625, -0.0421142578125, -0.0249176025390625, 0.007671356201171875, 0.048858642578125, 0.0235748291015625, -0.05413818359375, -0.017730712890625, -0.03741455078125, 0.021484375, -0.0222015380859375, 0.0009045600891113281, -0.0006642341613769531, -0.046478271484375, -0.0826416015625, -0.02398681640625, -0.02557373046875, 0.01024627685546875, -0.0657958984375, 0.0206451416015625, 0.0175018310546875, -0.0200042724609375, 0.005901336669921875, -0.0095062255859375, -0.021636962890625, 0.007076263427734375, 0.04443359375, 0.0050201416015625, -0.048553466796875, -0.022705078125, -0.0285186767578125, -0.01038360595703125, -0.047760009765625, 0.006259918212890625, 0.01352691650390625, -0.071044921875, 0.0042724609375, -0.0419921875, 0.032562255859375, -0.029510498046875, 0.01403045654296875, -0.0194244384765625, 0.038726806640625, -0.033172607421875, 0.0262908935546875, -0.02618408203125, 0.0025768280029296875, -0.006160736083984375, -0.023284912109375, -0.0176544189453125, 0.061767578125, 0.02899169921875, 0.0753173828125, -0.01276397705078125, 0.003387451171875, -0.0251007080078125, 0.0220947265625, 0.01763916015625, -0.005863189697265625, 0.073486328125, -0.026611328125, 0.01274871826171875, -0.019256591796875, -0.004344940185546875, 0.0024929046630859375, -0.0207061767578125, -0.01447296142578125, -0.032745361328125, 0.0021533966064453125 ]
fcd3889f68e728d2b18a427fa2fa5fda3c006a08
Wordpress Stackexchange Q: Is there a way to make a custom Page type? In a theme I'm building, there are two main types of page. One is a product-gallery, one is for general info. I'd like to use wp_get_pages() or wp_list_pages() twice in the sidebar, one with a list of one type of page, and one with the other. I don't want to hard-code include or exclude in either list, as I can't predict which page IDs will be which type of page. So I'd like to do something like: wp_list_pages('type=gallery') and wp_list_pages('type=page') What technique should I be using here? A: Create a hierarchical custom post type, then pass post_type to wp_list_pages: $args = array( 'post_type'=>'gallery' ); wp_list_pages( $args );
Q: Is there a way to make a custom Page type? In a theme I'm building, there are two main types of page. One is a product-gallery, one is for general info. I'd like to use wp_get_pages() or wp_list_pages() twice in the sidebar, one with a list of one type of page, and one with the other. I don't want to hard-code include or exclude in either list, as I can't predict which page IDs will be which type of page. So I'd like to do something like: wp_list_pages('type=gallery') and wp_list_pages('type=page') What technique should I be using here? A: Create a hierarchical custom post type, then pass post_type to wp_list_pages: $args = array( 'post_type'=>'gallery' ); wp_list_pages( $args );
wordpress
{ "language": "en", "length": 118, "provenance": "stackexchange_00019.jsonl.gz:413225", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29054" }
[ 0.0119171142578125, -0.0091400146484375, -0.0154571533203125, -0.033538818359375, 0.001708984375, -0.027374267578125, 0.055084228515625, 0.01412200927734375, -0.08349609375, -0.0186767578125, 0.01203155517578125, 0.025238037109375, -0.0855712890625, -0.037689208984375, 0.043701171875, -0.06549072265625, 0.0282135009765625, -0.01715087890625, 0.02960205078125, -0.0186309814453125, 0.026123046875, -0.026885986328125, 0.040802001953125, 0.047760009765625, 0.037506103515625, -0.029083251953125, 0.01458740234375, 0.007434844970703125, 0.022674560546875, -0.003780364990234375, 0.0232086181640625, -0.0258941650390625, 0.023162841796875, -0.0184326171875, 0.029388427734375, 0.039093017578125, 0.0040740966796875, -0.007076263427734375, 0.02703857421875, 0.005931854248046875, 0.01214599609375, 0.0052490234375, 0.034912109375, -0.0312347412109375, -0.01143646240234375, 0.0036258697509765625, -0.0017194747924804688, -0.020751953125, 0.007152557373046875, -0.0280303955078125, 0.00727081298828125, -0.0247955322265625, 0.020172119140625, -0.0335693359375, -0.030792236328125, -0.0258026123046875, 0.040008544921875, -0.0408935546875, 0.05242919921875, -0.081787109375, -0.055816650390625, -0.034210205078125, 0.0623779296875, 0.0233917236328125, -0.0180206298828125, 0.0008463859558105469, -0.034210205078125, 0.012481689453125, -0.01407623291015625, -0.023773193359375, 0.01294708251953125, -0.01605224609375, 0.009552001953125, -0.03265380859375, -0.012603759765625, -0.002246856689453125, 0.0021610260009765625, -0.01276397705078125, 0.0031337738037109375, -0.0030879974365234375, -0.0304107666015625, 0.002201080322265625, -0.041259765625, -0.04925537109375, 0.0205535888671875, -0.011077880859375, -0.035064697265625, -0.000003516674041748047, 0.01551055908203125, 0.015960693359375, -0.00994873046875, 0.00974273681640625, 0.026763916015625, 0.035308837890625, -0.0189208984375, 0.0032329559326171875, -0.01374053955078125, 0.0270843505859375, 0.01473236083984375, 0.06903076171875, -0.004547119140625, -0.050262451171875, 0.10723876953125, -0.07568359375, 0.049285888671875, 0.041534423828125, -0.037139892578125, 0.00995635986328125, 0.09442138671875, 0.0360107421875, 0.041778564453125, 0.0537109375, -0.0147247314453125, -0.0295257568359375, -0.0141754150390625, 0.03253173828125, -0.02203369140625, 0.0181121826171875, 0.01410675048828125, 0.0225830078125, 0.01313018798828125, 0.039276123046875, 0.0333251953125, -0.02960205078125, 0.004913330078125, 0.029327392578125, -0.002452850341796875, -0.08648681640625, 0.038330078125, 0.015380859375, -0.052764892578125, -0.00511932373046875, 0.055755615234375, 0.0190887451171875, 0.01100921630859375, -0.0175323486328125, 0.0229034423828125, -0.0243988037109375, 0.004909515380859375, -0.003612518310546875, 0.0382080078125, -0.006000518798828125, 0.01004791259765625, 0.00041294097900390625, 0.0247650146484375, 0.01055908203125, 0.013458251953125, 0.03411865234375, -0.0126190185546875, -0.01244354248046875, 0.044677734375, -0.0160980224609375, 0.01352691650390625, 0.007221221923828125, -0.0214080810546875, -0.02154541015625, -0.013946533203125, -0.01251220703125, 0.02435302734375, -0.0243682861328125, -0.0030517578125, -0.01068115234375, -0.00377655029296875, -0.033233642578125, -0.02728271484375, 0.01270294189453125, -0.006351470947265625, -0.006221771240234375, 0.01837158203125, -0.045440673828125, 0.0316162109375, -0.048492431640625, -0.018768310546875, 0.01922607421875, 0.0210113525390625, 0.044525146484375, -0.0119171142578125, -0.00315093994140625, 0.00811004638671875, 0.022308349609375, -0.0172882080078125, -0.026763916015625, 0.016357421875, -0.00696563720703125, -0.060272216796875, 0.037017822265625, 0.0174407958984375, 0.051055908203125, -0.00501251220703125, 0.0197906494140625, 0.0301513671875, 0.03228759765625, -0.051025390625, 0.0291748046875, -0.0172882080078125, -0.0264892578125, -0.01515960693359375, -0.005992889404296875, -0.0291290283203125, 0.0256195068359375, -0.03192138671875, -0.0016078948974609375, -0.00232696533203125, 0.052978515625, -0.03656005859375, 0.0250244140625, -0.0186767578125, 0.028900146484375, 0.00945281982421875, 0.0007166862487792969, 0.005695343017578125, -0.00958251953125, -0.01114654541015625, 0.0002332925796508789, -0.0272369384765625, 0.017913818359375, 0.02996826171875, 0.013702392578125, -0.0222625732421875, 0.01091766357421875, -0.016876220703125, -0.02471923828125, -0.027008056640625, 0.05316162109375, 0.05328369140625, 0.0055694580078125, -0.0238494873046875, -0.01056671142578125, 0.0261993408203125, 0.04248046875, -0.07415771484375, -0.0036163330078125, 0.06884765625, 0.0165252685546875, -0.0270233154296875, 0.0012044906616210938, 0.0161285400390625, -0.05181884765625, -0.0005078315734863281, 0.06170654296875, 0.032989501953125, 0.030487060546875, 0.0117950439453125, 0.0265960693359375, 0.0386962890625, -0.036102294921875, 0.0206146240234375, -0.00954437255859375, -0.0275115966796875, 0.0236358642578125, 0.0256500244140625, 0.02618408203125, 0.0051727294921875, -0.01244354248046875, 0.021942138671875, 0.0233917236328125, -0.020782470703125, 0.029083251953125, 0.01776123046875, -0.0261383056640625, -0.007343292236328125, -0.0018682479858398438, 0.0101165771484375, -0.01561737060546875, 0.06890869140625, 0.01174163818359375, 0.06951904296875, 0.043670654296875, -0.021240234375, -0.00775909423828125, -0.0013370513916015625, 0.01149749755859375, 0.000232696533203125, -0.004947662353515625, 0.042572021484375, -0.017303466796875, -0.041107177734375, -0.006320953369140625, 0.0262451171875, -0.0060272216796875, -0.019500732421875, 0.01096343994140625, -0.05999755859375, -0.01145172119140625, -0.0179595947265625, -0.06646728515625, -0.0022525787353515625, 0.03729248046875, -0.01422119140625, -0.0302276611328125, -0.005504608154296875, 0.01293182373046875, -0.0323486328125, 0.0150909423828125, 0.0126495361328125, -0.0275726318359375, 0.04364013671875, -0.07171630859375, 0.05255126953125, -0.05108642578125, 0.05889892578125, 0.055450439453125, -0.0261383056640625, -0.005405426025390625, 0.000023245811462402344, -0.012725830078125, 0.00873565673828125, 0.0171661376953125, 0.01004791259765625, -0.0247344970703125, -0.0106964111328125, 0.0167083740234375, 0.02490234375, 0.0246429443359375, 0.0265350341796875, -0.0089874267578125, 0.01358795166015625, 0.03857421875, -0.00995635986328125, -0.011749267578125, 0.062255859375, -0.05657958984375, -0.0012922286987304688, -0.0193023681640625, -0.029754638671875, -0.0229339599609375, 0.01959228515625, -0.0094146728515625, -0.01092529296875, -0.0078582763671875, -0.026153564453125, -0.0345458984375, -0.03851318359375, -0.019775390625, -0.00746917724609375, 0.008636474609375, -0.0007357597351074219, 0.07293701171875, 0.01061248779296875, -0.045654296875, -0.003459930419921875, 0.053314208984375, 0.006229400634765625, 0.0019397735595703125, -0.0018596649169921875, -0.0312347412109375, 0.036346435546875, -0.0135040283203125, 0.0301971435546875, 0.0279998779296875, 0.01258087158203125, -0.005855560302734375, -0.039947509765625, 0.0012922286987304688, -0.0111846923828125, 0.015289306640625, 0.05303955078125, 0.03350830078125, 0.005695343017578125, -0.0266571044921875, -0.03948974609375, 0.0015430450439453125, -0.046417236328125, -0.0154571533203125, 0.01261138916015625, -0.00829315185546875, -0.0309906005859375, 0.036895751953125, 0.00457763671875, 0.01387786865234375, 0.0279083251953125, -0.027252197265625, 0.040557861328125, -0.00621795654296875, 0.005084991455078125, -0.0298919677734375, 0.017333984375, -0.0252838134765625, 0.026397705078125, 0.0248870849609375, 0.0015573501586914062, 0.002254486083984375, 0.0141448974609375, 0.0020084381103515625, -0.093505859375, 0.052825927734375, -0.0184326171875, -0.0011606216430664062, -0.020263671875, -0.0276641845703125, 0.021270751953125, 0.1075439453125, -0.06903076171875, -0.01055145263671875, -0.0202178955078125, 0.021209716796875, -0.0268707275390625, -0.0802001953125, -0.0416259765625, -0.0159912109375, -0.07647705078125, 0.014923095703125, 0.00826263427734375, -0.038818359375, -0.0136260986328125, 0.004344940185546875, -0.045257568359375, -0.033905029296875, 0.044097900390625, -0.0205841064453125, -0.0027103424072265625, 0.035552978515625, -0.022613525390625, 0.0227508544921875, -0.0548095703125, -0.0002353191375732422, -0.0958251953125, -0.02227783203125, 0.006237030029296875, 0.063720703125, -0.0035114288330078125, -0.0307159423828125, -0.0181884765625, 0.052886962890625, 0.045166015625, 0.01611328125, 0.0263214111328125, -0.030853271484375, 0.0236663818359375, -0.0005970001220703125, 0.0264739990234375, -0.0164947509765625, -0.0274505615234375, -0.00568389892578125, 0.01486968994140625, 0.03521728515625, -0.01995849609375, -0.0302886962890625, -0.009735107421875, -0.01605224609375, -0.0447998046875, -0.0298004150390625, 0.004772186279296875, -0.00437164306640625, 0.000606536865234375, -0.00542449951171875, -0.023712158203125, -0.03790283203125, 0.0247039794921875, 0.004154205322265625, -0.02001953125, 0.015472412109375, 0.057769775390625, 0.01143646240234375, -0.0280303955078125, -0.07513427734375, 0.00380706787109375, 0.01611328125, -0.01275634765625, 0.0166015625, -0.002384185791015625, 0.0070037841796875, 0.017181396484375, -0.03668212890625, -0.034454345703125, -0.007171630859375, 0.054962158203125, -0.0019025802612304688, -0.0280914306640625, 0.0117645263671875, -0.0447998046875, 0.0241851806640625, 0.03790283203125, -0.034942626953125, -0.00383758544921875, -0.015411376953125, 0.059326171875, -0.0308837890625, 0.02410888671875, -0.062744140625, 0.022003173828125, -0.014617919921875, 0.06097412109375, 0.02130126953125, 0.01090240478515625, 0.008544921875, -0.0223388671875, -0.01389312744140625, 0.02581787109375, 0.036407470703125, 0.03131103515625, 0.0010995864868164062, 0.0518798828125, 0.01300811767578125, 0.00439453125, 0.024688720703125, 0.01175689697265625, -0.03411865234375, 0.022491455078125, -0.00914764404296875, -0.01953125, 0.01425933837890625, -0.01337432861328125, -0.01561737060546875, 0.0226287841796875, 0.039276123046875, 0.0103302001953125, -0.0079803466796875, -0.0101776123046875, -0.0269622802734375, 0.004673004150390625, -0.048431396484375, -0.0178985595703125, 0.01397705078125, -0.0198211669921875, -0.0231781005859375, 0.060394287109375, -0.0005273818969726562, 0.0297088623046875, -0.027374267578125, 0.03155517578125, 0.04620361328125, 0.02203369140625, -0.00264739990234375, 0.031646728515625, -0.0034198760986328125, -0.0005035400390625, 0.0169525146484375, -0.0289764404296875, -0.02398681640625, 0.04547119140625, 0.034149169921875, 0.0172882080078125, 0.0108642578125, -0.0258026123046875, -0.0108795166015625, -0.0232391357421875, -0.01494598388671875, -0.0245819091796875, -0.023040771484375, -0.01503753662109375, 0.018890380859375, 0.0279388427734375, -0.0020751953125, -0.03167724609375, 0.04656982421875, -0.0287933349609375, 0.00916290283203125, -0.0005784034729003906, -0.055572509765625, 0.0241851806640625, 0.041259765625, -0.05377197265625, -0.03057861328125, 0.0305328369140625, -0.10198974609375, -0.01428985595703125, -0.0036163330078125, -0.0272369384765625, -0.007396697998046875, -0.03155517578125, 0.032440185546875, -0.02911376953125, -0.00868988037109375, -0.0290679931640625, 0.0189361572265625, 0.046875, 0.0246734619140625, -0.00653839111328125, -0.006927490234375, -0.035003662109375, -0.022003173828125, -0.053802490234375, -0.037322998046875, -0.050323486328125, 0.010955810546875, 0.0022792816162109375, 0.036529541015625, -0.0216217041015625, -0.01360321044921875, -0.03082275390625, 0.00199127197265625, 0.0070037841796875, 0.0157012939453125, -0.0056304931640625, 0.03570556640625, -0.01297760009765625, 0.0496826171875, 0.0029277801513671875, 0.01381683349609375, -0.00797271728515625, -0.023284912109375, -0.007068634033203125, -0.046417236328125, -0.00897979736328125, -0.026275634765625, -0.005626678466796875, 0.052520751953125, 0.07281494140625, 0.0135650634765625, 0.02008056640625, -0.034027099609375, -0.0104827880859375, -0.01129913330078125, 0.0205230712890625, -0.042816162109375, 0.02471923828125, -0.0168914794921875, -0.01323699951171875, 0.0081634521484375, 0.00798797607421875, -0.036346435546875, 0.023590087890625, -0.0023097991943359375, 0.03314208984375, 0.004302978515625, -0.04937744140625, 0.040283203125, 0.04754638671875, 0.01032257080078125, 0.05743408203125, -0.009674072265625, 0.011810302734375, 0.057861328125, 0.023101806640625, 0.0131378173828125, -0.007091522216796875, 0.07904052734375, 0.008331298828125, -0.037689208984375, 0.0306243896484375, -0.044891357421875, 0.00009769201278686523, 0.061859130859375, 0.071044921875, -0.080078125, 0.0144500732421875, 0.01763916015625, 0.004413604736328125, 0.0258636474609375, -0.0267333984375, -0.0237884521484375, -0.0280914306640625, 0.05804443359375, -0.0179443359375, -0.029571533203125, -0.006404876708984375, -0.0101776123046875, 0.003986358642578125, -0.0016546249389648438, 0.06793212890625, 0.012451171875, 0.01021575927734375, -0.029937744140625, -0.0157928466796875, 0.01415252685546875, -0.00763702392578125, 0.0286865234375, -0.034332275390625, 0.004421234130859375, -0.043975830078125, 0.0081939697265625, -0.01364898681640625, -0.007175445556640625, 0.044647216796875, 0.01544952392578125, 0.0175933837890625, 0.025299072265625, 0.00336456298828125, 0.004627227783203125, -0.001850128173828125, -0.0178985595703125, -0.030914306640625, -0.007602691650390625, 0.003139495849609375, -0.0245361328125, -0.037811279296875, 0.0016527175903320312, -0.07843017578125, 0.0080413818359375, -0.017425537109375, 0.005382537841796875, 0.11102294921875, -0.03594970703125, -0.023651123046875, 0.01849365234375, 0.032745361328125, -0.01898193359375, 0.01016998291015625, -0.00800323486328125, -0.0426025390625, -0.034454345703125, 0.00750732421875, -0.044097900390625, 0.00933837890625, 0.0034122467041015625, -0.06329345703125, 0.05633544921875, -0.015899658203125, 0.04559326171875, 0.03912353515625, 0.0147247314453125, -0.042205810546875, -0.023162841796875, -0.0253448486328125, 0.036224365234375, 0.01203155517578125, 0.035919189453125, -0.0271759033203125, -0.0194854736328125, 0.0175018310546875, 0.042388916015625, 0.0166778564453125, 0.0034008026123046875, -0.0193328857421875, -0.0039520263671875, 0.052276611328125, 0.02752685546875, 0.006137847900390625, 0.03656005859375, -0.0107879638671875, 0.0230865478515625, 0.043701171875, -0.0130767822265625, 0.04486083984375, -0.003536224365234375, -0.00949859619140625, 0.00350189208984375, 0.005016326904296875, -0.02203369140625, -0.012359619140625, 0.0023174285888671875, -0.037933349609375, -0.0174407958984375, 0.01476287841796875, 0.007110595703125, 0.003131866455078125, 0.046630859375, 0.041290283203125, -0.0011262893676757812, 0.0171966552734375, -0.0264129638671875, 0.055908203125, -0.0018796920776367188, 0.0026493072509765625, 0.00521087646484375, 0.0138092041015625, 0.0107879638671875, -0.0004353523254394531, -0.0079498291015625, 0.0269317626953125, -0.002262115478515625, 0.061767578125, 0.0067291259765625, 0.004207611083984375, -0.072021484375, 0.0220947265625, 0.033447265625, 0.065185546875, -0.06689453125, -0.070068359375, 0.005054473876953125, 0.0213775634765625, 0.025848388671875, 0.018096923828125, 0.0419921875, 0.0002053976058959961, 0.053497314453125, -0.03887939453125, -0.00019419193267822266, 0.005870819091796875, 0.02685546875, -0.0268096923828125, -0.035980224609375, -0.0201263427734375, -0.00588226318359375, -0.045257568359375, 0.00028824806213378906, 0.024383544921875, 0.04058837890625, 0.019256591796875, 0.027618408203125, 0.0128936767578125, -0.0158233642578125, 0.01332855224609375, -0.0104827880859375, -0.046356201171875, 0.0152130126953125, -0.0386962890625, -0.052734375, -0.00634002685546875, 0.047393798828125, 0.0227508544921875, 0.01270294189453125, 0.0138702392578125, 0.0205230712890625, 0.0009784698486328125, -0.003673553466796875, 0.06689453125, -0.002132415771484375, -0.016754150390625, -0.0217132568359375, -0.00934600830078125, 0.01444244384765625, -0.0183258056640625, 0.0113983154296875, -0.022186279296875, 0.03466796875, 0.0043792724609375, 0.0261383056640625, 0.0024662017822265625, -0.034912109375, 0.04071044921875, -0.0196075439453125, 0.09173583984375, 0.019927978515625, -0.10235595703125, -0.031463623046875, -0.039642333984375, -0.045074462890625, 0.06488037109375, 0.053924560546875, -0.039337158203125, 0.0157623291015625, 0.040557861328125, 0.004547119140625, -0.014007568359375, -0.00733184814453125, 0.01385498046875, -0.0036945343017578125, 0.030975341796875, 0.0335693359375, -0.068115234375, -0.034881591796875, -0.0283660888671875, 0.018310546875, 0.0006427764892578125, 0.08245849609375, -0.0121002197265625, 0.01183319091796875, -0.0178680419921875, 0.04815673828125, -0.037078857421875, -0.027618408203125, 0.03460693359375, 0.0182647705078125, 0.0303802490234375, -0.0241851806640625, -0.0037994384765625, 0.001789093017578125, 0.038360595703125, -0.05682373046875, -0.00940704345703125, -0.0263824462890625, 0.02996826171875, -0.01422882080078125, 0.020904541015625, -0.0244903564453125, -0.01508331298828125, -0.018646240234375, -0.0220947265625, 0.0200958251953125, -0.0143585205078125, -0.01953125, 0.04150390625, 0.006412506103515625, -0.03533935546875, 0.042083740234375, -0.06597900390625, 0.04925537109375, 0.027130126953125, 0.0295562744140625, -0.0567626953125, 0.0120697021484375, -0.002590179443359375, -0.005191802978515625, 0.0255126953125, 0.052734375, 0.01461029052734375, 0.0006403923034667969, 0.01468658447265625, -0.0144500732421875, 0.01218414306640625, -0.027618408203125, -0.0208587646484375, 0.00583648681640625, -0.006893157958984375, 0.00667572021484375, -0.018646240234375, -0.0193328857421875, -0.045562744140625, 0.03411865234375, 0.0279998779296875, 0.0281219482421875, 0.0278778076171875, -0.0007987022399902344, 0.007091522216796875, 0.043304443359375, 0.0242767333984375, -0.0775146484375, 0.0653076171875, -0.0183868408203125, 0.0004711151123046875, 0.013885498046875, -0.0193634033203125, 0.020172119140625, 0.0231170654296875, -0.020233154296875, 0.01554107666015625, -0.0203857421875, -0.0218963623046875, 0.0063934326171875, 0.034576416015625, 0.04705810546875, -0.048858642578125, -0.0167388916015625, 0.034881591796875, 0.036102294921875, 0.07806396484375, 0.01873779296875, -0.027435302734375, 0.0143890380859375, 0.0102386474609375, -0.019927978515625, -0.047821044921875, 0.0083160400390625, -0.0440673828125, 0.0047607421875, 0.0118408203125, 0.0024547576904296875, 0.0350341796875, -0.01393890380859375, -0.03363037109375, 0.059783935546875, 0.0020961761474609375, -0.0298614501953125, -0.06488037109375, 0.04559326171875, -0.0005335807800292969, 0.0018186569213867188, -0.01105499267578125, -0.01435089111328125, 0.01148223876953125, 0.0230712890625, 0.0175628662109375, 0.0296783447265625, 0.01349639892578125, 0.0399169921875, -0.03509521484375, 0.02783203125, -0.01178741455078125, 0.005260467529296875, 0.0092620849609375, -0.043548583984375, 0.03662109375, 0.00719451904296875, -0.04656982421875, -0.011260986328125, 0.01506805419921875, 0.03436279296875, 0.0223388671875, -0.0279541015625, -0.032623291015625, -0.051910400390625, 0.010162353515625, 0.024749755859375, 0.01180267333984375, 0.01265716552734375, -0.007266998291015625, -0.015472412109375, -0.06024169921875, 0.007415771484375, 0.034515380859375, -0.052947998046875, 0.00598907470703125, -0.0006251335144042969, -0.01232147216796875, -0.0067901611328125, 0.01192474365234375, -0.01415252685546875, -0.00765228271484375, 0.0174713134765625, -0.0167236328125, -0.041229248046875, 0.053924560546875, 0.0110931396484375, -0.014007568359375, 0.01898193359375, -0.039459228515625, -0.01300811767578125, 0.021820068359375, -0.035064697265625, -0.0377197265625, 0.025177001953125, -0.046905517578125, 0.01064300537109375, -0.0251922607421875, 0.003963470458984375, -0.0318603515625, 0.032470703125, 0.002834320068359375, 0.02703857421875, -0.0041351318359375, 0.021759033203125, -0.0032901763916015625, 0.062286376953125, 0.024993896484375, 0.038421630859375, 0.01715087890625, 0.032684326171875, 0.002429962158203125, 0.03582763671875, 0.0165252685546875, -0.033599853515625, 0.0304718017578125, -0.04461669921875, 0.003940582275390625, -0.0168914794921875, -0.0576171875, -0.0458984375, -0.003925323486328125, 0.027374267578125, -0.03118896484375, 0.011016845703125 ]
3158dbf173de91141bff48e2d0b0d3a44321a039
Wordpress Stackexchange Q: How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with Wordpress 3.0 and up? I'm trying to add tinyMCE instead of textarea for one of my options in my plugin with no luck so far. I tried this : http://www.dbuggr.com/smallwei/add-wysiwyg-editor-tinymce-wordpress-plugin/ and this: http://blog.imwd8solutions.com/wordpress/wordpress-plugin-development-add-editor-to-plugin-admin-page/ There seems to be some problem with styles as styles for tabs (HTML style/Visual style) dont work. Anybody knows about implementation that works 100% with WP 3.0 and up ? A: <?php function my_address_function(){ if(isset($_POST['special_content'])){ update_option('special_content', $_POST['special_content']); } ?> <div class='wrap'> <h2>My Super Admin Page</h2> <form method='post'> <?php $content = get_option('special_content'); wp_editor( $content, 'special_content', $settings = array('textarea_rows'=> '10') ); submit_button('Save', 'primary'); ?> </form> </div><!-- .wrap --> <?php } ?>
Q: How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with Wordpress 3.0 and up? I'm trying to add tinyMCE instead of textarea for one of my options in my plugin with no luck so far. I tried this : http://www.dbuggr.com/smallwei/add-wysiwyg-editor-tinymce-wordpress-plugin/ and this: http://blog.imwd8solutions.com/wordpress/wordpress-plugin-development-add-editor-to-plugin-admin-page/ There seems to be some problem with styles as styles for tabs (HTML style/Visual style) dont work. Anybody knows about implementation that works 100% with WP 3.0 and up ? A: <?php function my_address_function(){ if(isset($_POST['special_content'])){ update_option('special_content', $_POST['special_content']); } ?> <div class='wrap'> <h2>My Super Admin Page</h2> <form method='post'> <?php $content = get_option('special_content'); wp_editor( $content, 'special_content', $settings = array('textarea_rows'=> '10') ); submit_button('Save', 'primary'); ?> </form> </div><!-- .wrap --> <?php } ?> A: Pre WP 3.3: http://www.dev4press.com/2010/tutorials/wordpress/tips/add-rich-text-editor-to-your-plugin/ If you are using WP 3.3 or later you might look up wp_editor: http://codex.wordpress.org/Function_Reference/wp_editor $settings = array( 'teeny' => true, 'textarea_rows' => 15, 'tabindex' => 1 ); wp_editor(esc_html( __(get_option('whatever_you_need', 'whatever'))), 'terms_wp_content', $settings); A: If I am reading your question correctly: wordpress.org/extend/plugins/tinymce-advanced/ There's a checkbox in the options to show the custom styles of the theme.
wordpress
{ "language": "en", "length": 175, "provenance": "stackexchange_00019.jsonl.gz:413230", "question_score": "11", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29066" }
[ 0.0093536376953125, -0.007190704345703125, -0.030120849609375, 0.01263427734375, 0.006717681884765625, -0.048248291015625, 0.053314208984375, -0.0018901824951171875, 0.00574493408203125, 0.04437255859375, -0.00858306884765625, -0.006153106689453125, -0.0259552001953125, -0.0180816650390625, -0.04962158203125, -0.0193634033203125, 0.036407470703125, -0.0251922607421875, 0.0100555419921875, -0.009918212890625, 0.0175323486328125, 0.01290130615234375, -0.0174713134765625, 0.01152801513671875, 0.03375244140625, -0.0042572021484375, 0.074951171875, -0.01308441162109375, 0.0262908935546875, -0.01480865478515625, 0.018341064453125, -0.0118255615234375, 0.04296875, 0.046783447265625, -0.0714111328125, 0.0125885009765625, 0.0224151611328125, -0.00890350341796875, -0.0241241455078125, 0.056396484375, 0.0139007568359375, 0.0091094970703125, 0.00904083251953125, 0.016693115234375, -0.009429931640625, -0.07049560546875, 0.058380126953125, -0.02520751953125, -0.00518035888671875, -0.045928955078125, -0.0018014907836914062, -0.0024814605712890625, 0.0328369140625, -0.0596923828125, -0.01467132568359375, 0.0093841552734375, -0.046722412109375, 0.0079803466796875, -0.01230621337890625, 0.042144775390625, 0.035736083984375, 0.040374755859375, -0.01363372802734375, 0.0278472900390625, 0.01294708251953125, 0.0103302001953125, 0.0034275054931640625, 0.01346588134765625, 0.006381988525390625, 0.01192474365234375, -0.00708770751953125, -0.03515625, 0.031982421875, -0.053131103515625, 0.0288543701171875, 0.02838134765625, -0.01204681396484375, 0.0108489990234375, 0.0230255126953125, -0.0218353271484375, 0.0022068023681640625, 0.0214996337890625, -0.0103912353515625, -0.0350341796875, 0.037139892578125, 0.0157318115234375, -0.01898193359375, -0.0230712890625, -0.0400390625, 0.0022144317626953125, -0.0165557861328125, -0.064453125, -0.0233154296875, 0.040985107421875, 0.0183563232421875, -0.02642822265625, 0.01727294921875, -0.0004515647888183594, 0.0115966796875, 0.038665771484375, 0.028656005859375, -0.07952880859375, 0.093994140625, -0.05078125, -0.0056610107421875, -0.00772857666015625, 0.00725555419921875, -0.0161590576171875, 0.019622802734375, 0.02459716796875, -0.0180816650390625, 0.01491546630859375, 0.0262298583984375, -0.01433563232421875, 0.01708984375, -0.0192413330078125, -0.013916015625, 0.0428466796875, 0.010467529296875, 0.024383544921875, -0.0030765533447265625, 0.024169921875, -0.0189666748046875, -0.040069580078125, -0.0126495361328125, -0.0262908935546875, -0.00975799560546875, -0.01198577880859375, 0.005950927734375, -0.00191497802734375, -0.0362548828125, 0.025604248046875, 0.05413818359375, 0.024261474609375, 0.0081787109375, -0.0171661376953125, 0.0273590087890625, -0.0033893585205078125, -0.0104522705078125, 0.01387786865234375, -0.0278778076171875, 0.004535675048828125, 0.0272064208984375, -0.042266845703125, -0.01404571533203125, 0.03668212890625, 0.032196044921875, 0.0109405517578125, -0.0262603759765625, -0.09808349609375, 0.03948974609375, -0.0159454345703125, 0.0438232421875, 0.007022857666015625, -0.030426025390625, -0.04278564453125, 0.02825927734375, -0.052734375, -0.0224456787109375, -0.069091796875, 0.01232147216796875, 0.01143646240234375, 0.0302886962890625, -0.041290283203125, -0.0124664306640625, -0.029296875, -0.05712890625, -0.00429534912109375, 0.02197265625, -0.01262664794921875, 0.0179901123046875, -0.038848876953125, 0.007740020751953125, 0.005329132080078125, -0.01482391357421875, 0.035125732421875, -0.0269012451171875, 0.04693603515625, 0.044769287109375, 0.00263214111328125, 0.00864410400390625, -0.036712646484375, 0.1009521484375, -0.0132904052734375, -0.047119140625, 0.004619598388671875, -0.006557464599609375, 0.03778076171875, 0.0267181396484375, 0.0193023681640625, -0.004116058349609375, -0.01012420654296875, 0.0284881591796875, -0.020904541015625, 0.0133056640625, -0.032806396484375, -0.0243072509765625, -0.003917694091796875, -0.01708984375, -0.006420135498046875, 0.01189422607421875, 0.0013484954833984375, 0.03460693359375, -0.026763916015625, -0.0401611328125, 0.00894927978515625, -0.0114593505859375, 0.037872314453125, 0.0111083984375, -0.0228729248046875, 0.0166778564453125, -0.006622314453125, -0.008941650390625, -0.001972198486328125, -0.046875, 0.03515625, 0.00010198354721069336, 0.09246826171875, 0.0225830078125, 0.089111328125, 0.033447265625, -0.0289306640625, 0.0494384765625, -0.035247802734375, 0.021392822265625, -0.036376953125, -0.007465362548828125, -0.0172882080078125, 0.0115203857421875, -0.00018846988677978516, -0.0027790069580078125, 0.03302001953125, 0.01157379150390625, 0.025543212890625, -0.0452880859375, -0.0295867919921875, -0.058013916015625, -0.044097900390625, 0.01354217529296875, 0.0638427734375, 0.0408935546875, 0.0634765625, -0.0078582763671875, -0.0082855224609375, 0.04791259765625, -0.041259765625, 0.01287078857421875, -0.0181121826171875, 0.019683837890625, 0.04254150390625, 0.0284271240234375, -0.026458740234375, -0.005828857421875, -0.043182373046875, 0.0189666748046875, 0.0013742446899414062, -0.011383056640625, 0.014068603515625, 0.0085296630859375, -0.0243072509765625, 0.00395965576171875, -0.0081329345703125, -0.01385498046875, -0.01605224609375, 0.040069580078125, 0.02630615234375, 0.054779052734375, 0.05401611328125, -0.027191162109375, 0.009368896484375, -0.008697509765625, 0.0248260498046875, 0.003986358642578125, 0.011474609375, -0.01497650146484375, 0.0200347900390625, -0.04461669921875, 0.0090179443359375, 0.0352783203125, 0.0223388671875, 0.0007338523864746094, 0.045379638671875, 0.01267242431640625, -0.01131439208984375, -0.01959228515625, -0.0623779296875, -0.0019664764404296875, -0.0219879150390625, 0.038909912109375, -0.0167388916015625, 0.03656005859375, -0.03179931640625, -0.036285400390625, 0.023162841796875, 0.0174713134765625, -0.06671142578125, 0.0426025390625, 0.01035308837890625, 0.01641845703125, -0.004055023193359375, 0.04022216796875, 0.03302001953125, -0.03515625, 0.0006232261657714844, 0.0275726318359375, -0.046905517578125, -0.0248565673828125, 0.0533447265625, 0.01477813720703125, 0.0080413818359375, -0.070556640625, 0.033050537109375, 0.02032470703125, 0.0186614990234375, -0.00812530517578125, -0.026580810546875, -0.0122528076171875, 0.0218505859375, -0.02679443359375, -0.0035037994384765625, -0.02899169921875, -0.08843994140625, -0.00218963623046875, -0.0160064697265625, -0.048248291015625, 0.0033779144287109375, 0.03045654296875, 0.0179443359375, -0.0130767822265625, 0.0085906982421875, -0.0438232421875, -0.0297393798828125, -0.070556640625, -0.03314208984375, -0.01291656494140625, 0.0220184326171875, 0.0191802978515625, 0.036376953125, 0.0345458984375, -0.06396484375, 0.0408935546875, -0.0279083251953125, -0.0245361328125, 0.06378173828125, 0.02777099609375, -0.0243072509765625, -0.00279998779296875, 0.0014810562133789062, 0.0126495361328125, 0.02587890625, -0.026092529296875, -0.00913238525390625, -0.003925323486328125, -0.003215789794921875, 0.0225067138671875, -0.010955810546875, 0.0013036727905273438, 0.021484375, 0.0369873046875, -0.035064697265625, 0.003993988037109375, 0.00913238525390625, -0.022003173828125, 0.0133819580078125, -0.0166473388671875, -0.0205535888671875, 0.0180511474609375, 0.01528167724609375, -0.01242828369140625, 0.039703369140625, 0.04718017578125, -0.010467529296875, -0.0004761219024658203, -0.03497314453125, -0.05712890625, -0.01947021484375, 0.002330780029296875, -0.03216552734375, 0.02960205078125, -0.00803375244140625, -0.0189056396484375, -0.00861358642578125, 0.0270233154296875, -0.0011739730834960938, -0.03057861328125, 0.0203704833984375, -0.052978515625, 0.0240325927734375, -0.040618896484375, -0.002925872802734375, -0.00827789306640625, 0.08746337890625, -0.04833984375, -0.0108795166015625, 0.003864288330078125, 0.009429931640625, -0.0099639892578125, -0.00856781005859375, -0.03680419921875, -0.0128173828125, -0.042938232421875, 0.03192138671875, 0.00855255126953125, -0.0018587112426757812, -0.0247344970703125, 0.060638427734375, -0.021881103515625, -0.0232696533203125, 0.01055908203125, -0.01551055908203125, -0.017822265625, 0.037109375, -0.033599853515625, 0.008453369140625, 0.0229644775390625, -0.04791259765625, -0.097412109375, -0.00428009033203125, -0.040283203125, 0.0743408203125, 0.0460205078125, -0.01369476318359375, -0.01189422607421875, 0.061065673828125, -0.0026092529296875, -0.00678253173828125, 0.0229034423828125, 0.03277587890625, -0.040283203125, -0.0293731689453125, 0.01146697998046875, -0.045867919921875, -0.00469207763671875, 0.006175994873046875, -0.007038116455078125, -0.02142333984375, -0.03466796875, -0.0657958984375, 0.01873779296875, -0.0307159423828125, -0.02197265625, -0.0159759521484375, -0.0265960693359375, 0.0252532958984375, -0.049102783203125, 0.01345062255859375, -0.0167999267578125, -0.04583740234375, 0.055511474609375, -0.00214385986328125, -0.0230712890625, 0.0015096664428710938, 0.0574951171875, 0.01282501220703125, -0.0256195068359375, -0.03009033203125, 0.0018186569213867188, 0.04296875, 0.020294189453125, -0.00385284423828125, 0.001598358154296875, -0.04327392578125, 0.047576904296875, 0.025115966796875, 0.042816162109375, -0.057525634765625, 0.03564453125, 0.015625, 0.0009512901306152344, 0.0171356201171875, 0.023834228515625, 0.0216217041015625, 0.005397796630859375, -0.01971435546875, 0.0006346702575683594, -0.026763916015625, 0.0132904052734375, 0.0017948150634765625, 0.0269622802734375, -0.0239410400390625, -0.0258026123046875, -0.01322174072265625, 0.0247650146484375, 0.044769287109375, 0.0286712646484375, -0.005985260009765625, 0.019317626953125, 0.037078857421875, -0.018402099609375, 0.04193115234375, 0.033966064453125, 0.037078857421875, 0.021820068359375, 0.043548583984375, -0.006534576416015625, -0.01537322998046875, -0.0113525390625, 0.0148162841796875, 0.002559661865234375, -0.04595947265625, -0.032470703125, 0.00296783447265625, 0.054931640625, -0.01284027099609375, 0.0241241455078125, 0.01727294921875, 0.021514892578125, -0.03692626953125, 0.00933837890625, 0.042083740234375, -0.01177215576171875, -0.034881591796875, -0.022674560546875, -0.0167999267578125, -0.012237548828125, -0.00292205810546875, 0.056671142578125, -0.0323486328125, 0.039581298828125, 0.004825592041015625, 0.014617919921875, 0.0240631103515625, 0.00908660888671875, 0.0224456787109375, 0.02569580078125, -0.018280029296875, -0.01515960693359375, 0.010284423828125, -0.0216522216796875, 0.0244140625, -0.0036830902099609375, -0.0018405914306640625, 0.01290130615234375, -0.0139312744140625, 0.0213470458984375, -0.025787353515625, -0.0095367431640625, -0.003948211669921875, -0.0255126953125, -0.049652099609375, 0.023895263671875, 0.0445556640625, 0.0015954971313476562, -0.0074615478515625, 0.0017108917236328125, -0.017974853515625, -0.05975341796875, -0.019134521484375, -0.00020885467529296875, -0.0295562744140625, -0.016387939453125, -0.0165252685546875, 0.01139068603515625, -0.002544403076171875, -0.0213470458984375, -0.05157470703125, -0.0513916015625, -0.003917694091796875, 0.025482177734375, 0.0340576171875, -0.0240478515625, 0.0570068359375, -0.033172607421875, -0.026611328125, -0.05706787109375, 0.01629638671875, -0.00835418701171875, 0.01348114013671875, 0.01422882080078125, -0.0200653076171875, -0.032318115234375, -0.0274658203125, 0.01313018798828125, -0.006336212158203125, -0.0198822021484375, -0.016082763671875, 0.004642486572265625, 0.019195556640625, -0.007904052734375, -0.0235137939453125, -0.0243072509765625, 0.0001348257064819336, 0.009429931640625, 0.0322265625, 0.01392364501953125, 0.051544189453125, -0.044647216796875, 0.05670166015625, -0.0035305023193359375, 0.0021572113037109375, -0.02813720703125, -0.0145263671875, -0.0019931793212890625, -0.048309326171875, -0.0223388671875, 0.0024471282958984375, -0.01259613037109375, 0.0362548828125, 0.029541015625, -0.0028858184814453125, 0.01271820068359375, -0.00635528564453125, -0.006092071533203125, -0.0120086669921875, -0.004474639892578125, 0.005023956298828125, -0.0098419189453125, 0.0268096923828125, -0.05194091796875, -0.0321044921875, 0.0004394054412841797, 0.04705810546875, 0.0246124267578125, -0.02301025390625, -0.0005517005920410156, 0.0094757080078125, -0.0268707275390625, 0.054412841796875, 0.042449951171875, 0.0172271728515625, 0.035888671875, 0.007595062255859375, 0.010955810546875, -0.016021728515625, 0.0015096664428710938, -0.005340576171875, 0.0249176025390625, 0.0386962890625, 0.00386810302734375, 0.0103607177734375, 0.0189971923828125, -0.01226806640625, 0.0404052734375, 0.059234619140625, 0.07818603515625, -0.0809326171875, 0.017822265625, 0.0310516357421875, -0.019195556640625, 0.045745849609375, -0.0237579345703125, -0.00858306884765625, -0.0439453125, 0.09136962890625, -0.0023975372314453125, 0.0073089599609375, 0.03704833984375, -0.033935546875, -0.00992584228515625, -0.0201416015625, 0.0013608932495117188, -0.01134490966796875, -0.005664825439453125, -0.01812744140625, 0.01459503173828125, -0.0054168701171875, 0.017974853515625, 0.031280517578125, -0.02325439453125, -0.01259613037109375, -0.048736572265625, -0.0182952880859375, -0.00875091552734375, -0.043853759765625, -0.0003330707550048828, 0.0025234222412109375, 0.004444122314453125, 0.0643310546875, -0.031494140625, 0.02911376953125, 0.037841796875, -0.0033588409423828125, 0.04681396484375, -0.0309600830078125, 0.019683837890625, 0.0185546875, -0.06414794921875, 0.0082550048828125, 0.0101776123046875, -0.0141754150390625, 0.013580322265625, 0.045501708984375, 0.055328369140625, -0.0082855224609375, -0.034271240234375, 0.03460693359375, -0.007701873779296875, -0.0008754730224609375, -0.04541015625, -0.04083251953125, -0.08306884765625, -0.0291290283203125, -0.04949951171875, -0.044769287109375, 0.017059326171875, -0.054931640625, -0.0845947265625, 0.12481689453125, 0.013031005859375, 0.01309967041015625, -0.011688232421875, 0.07208251953125, -0.08013916015625, 0.00868988037109375, 0.020843505859375, 0.005748748779296875, -0.04046630859375, -0.03173828125, -0.00789642333984375, 0.0090179443359375, -0.01290130615234375, 0.039642333984375, 0.0338134765625, 0.0100860595703125, -0.033477783203125, 0.0012331008911132812, 0.044677734375, 0.04278564453125, 0.01461029052734375, 0.0192413330078125, 0.024017333984375, -0.0516357421875, 0.0277099609375, 0.0214996337890625, 0.047027587890625, -0.0160369873046875, 0.017852783203125, 0.03125, 0.005565643310546875, -0.0235595703125, -0.01605224609375, 0.019622802734375, -0.03350830078125, 0.00034308433532714844, 0.0261993408203125, -0.05340576171875, -0.03570556640625, 0.052886962890625, -0.0020961761474609375, -0.027191162109375, -0.01470947265625, -0.0364990234375, 0.022674560546875, 0.00910186767578125, -0.02545166015625, -0.026641845703125, 0.004825592041015625, -0.000014603137969970703, -0.015655517578125, -0.0272979736328125, 0.036590576171875, -0.0036754608154296875, 0.006145477294921875, -0.029571533203125, -0.00568389892578125, -0.040374755859375, 0.0305023193359375, 0.021484375, 0.002170562744140625, -0.033172607421875, -0.031494140625, 0.0118560791015625, 0.0092010498046875, 0.0031871795654296875, -0.01488494873046875, -0.0015401840209960938, -0.035125732421875, 0.020355224609375, 0.0031795501708984375, -0.01507568359375, 0.0027484893798828125, -0.0069427490234375, 0.0017366409301757812, 0.001010894775390625, 0.022979736328125, 0.0027008056640625, -0.040191650390625, 0.01119232177734375, -0.00030922889709472656, 0.054443359375, 0.037567138671875, 0.0274200439453125, -0.0269012451171875, -0.02911376953125, -0.0207366943359375, 0.0088348388671875, 0.01230621337890625, 0.0182647705078125, -0.0261077880859375, -0.00566864013671875, 0.0241851806640625, 0.025238037109375, 0.0051422119140625, 0.05908203125, 0.053680419921875, 0.035491943359375, -0.006824493408203125, 0.0069122314453125, 0.0494384765625, -0.01181793212890625, -0.017974853515625, -0.0251007080078125, -0.0112152099609375, 0.0175628662109375, -0.0020542144775390625, 0.0057373046875, -0.006107330322265625, 0.04461669921875, -0.0107574462890625, 0.01166534423828125, 0.01812744140625, -0.01556396484375, 0.03802490234375, -0.0054779052734375, 0.00955963134765625, 0.0189361572265625, -0.055908203125, -0.0182037353515625, 0.021514892578125, -0.02197265625, -0.00612640380859375, 0.0284423828125, -0.02447509765625, 0.024017333984375, -0.035675048828125, -0.0341796875, 0.0126495361328125, -0.00882720947265625, 0.03265380859375, -0.0013036727905273438, -0.04022216796875, -0.026702880859375, -0.010009765625, -0.01947021484375, -0.006717681884765625, 0.05389404296875, 0.0285186767578125, 0.041534423828125, -0.016693115234375, 0.04583740234375, -0.030120849609375, 0.019561767578125, -0.029052734375, -0.0338134765625, 0.035797119140625, 0.01641845703125, -0.002010345458984375, -0.007617950439453125, -0.036956787109375, 0.03448486328125, 0.0118255615234375, -0.0114898681640625, -0.004695892333984375, 0.0049591064453125, 0.005374908447265625, 0.031707763671875, 0.017608642578125, -0.031463623046875, -0.032806396484375, -0.058258056640625, -0.0183258056640625, 0.01258087158203125, -0.00707244873046875, 0.0009360313415527344, 0.036865234375, 0.045989990234375, 0.0114288330078125, 0.01042938232421875, -0.0180206298828125, 0.03424072265625, 0.036773681640625, -0.0061798095703125, -0.042083740234375, 0.0243377685546875, -0.00485992431640625, 0.01013946533203125, -0.005084991455078125, 0.057464599609375, 0.01044464111328125, -0.02862548828125, 0.048797607421875, 0.0416259765625, 0.0517578125, -0.0232086181640625, 0.00981903076171875, 0.044036865234375, -0.004795074462890625, 0.01406097412109375, -0.01262664794921875, -0.0404052734375, -0.057769775390625, 0.01313018798828125, 0.029266357421875, -0.0244903564453125, -0.036529541015625, -0.0968017578125, -0.00873565673828125, 0.01476287841796875, -0.00122833251953125, -0.0634765625, 0.00853729248046875, -0.006893157958984375, 0.06549072265625, -0.049163818359375, 0.0341796875, -0.01551055908203125, 0.034820556640625, -0.02685546875, -0.0262451171875, -0.0283203125, 0.029998779296875, -0.048095703125, 0.0294036865234375, 0.06585693359375, -0.03143310546875, -0.0250701904296875, 0.0162353515625, 0.00833892822265625, 0.061187744140625, -0.0223541259765625, 0.006916046142578125, 0.062469482421875, -0.0221099853515625, -0.057373046875, -0.076904296875, 0.000667572021484375, -0.06976318359375, 0.014862060546875, 0.00864410400390625, -0.00981903076171875, 0.0180511474609375, -0.039306640625, -0.09521484375, -0.029083251953125, 0.0009288787841796875, -0.0450439453125, 0.01007843017578125, -0.0201416015625, 0.003124237060546875, -0.0183868408203125, -0.004962921142578125, -0.0224151611328125, -0.0304412841796875, 0.0180816650390625, 0.003173828125, 0.056427001953125, 0.01555633544921875, -0.020904541015625, -0.0292816162109375, -0.0194244384765625, -0.0212860107421875, 0.0026092529296875, 0.0226287841796875, -0.0167388916015625, 0.035369873046875, 0.053863525390625, -0.01457977294921875, -0.06878662109375, -0.00862884521484375, -0.0718994140625, -0.013397216796875, -0.0224609375, -0.029327392578125, 0.0070343017578125, 0.10723876953125, 0.06146240234375, 0.0240631103515625, -0.040618896484375, 0.0157470703125, -0.031524658203125, -0.04962158203125, -0.006603240966796875, 0.039154052734375, -0.0623779296875, -0.00978851318359375, 0.019012451171875, -0.0163421630859375, 0.004550933837890625, 0.0269622802734375, -0.006916046142578125, -0.0009183883666992188, 0.03192138671875, -0.03997802734375, -0.0162506103515625, 0.0008807182312011719, 0.09613037109375, -0.059844970703125, -0.0182647705078125, 0.029632568359375, 0.0017499923706054688, 0.0254058837890625, 0.029541015625, -0.0112152099609375, -0.01413726806640625, -0.026123046875, 0.0340576171875, -0.0146331787109375, 0.039703369140625, -0.054290771484375, -0.0116729736328125, 0.00386810302734375, 0.00014257431030273438, -0.01456451416015625, -0.00278472900390625, 0.00846099853515625, 0.0005903244018554688, -0.024017333984375, 0.05450439453125, -0.0364990234375, -0.0205230712890625, -0.021759033203125, -0.00952911376953125, 0.01377105712890625, 0.0213470458984375, 0.054473876953125, 0.009368896484375, 0.0213775634765625, 0.0206298828125, -0.0011777877807617188, 0.0015850067138671875, 0.005222320556640625, 0.005283355712890625, -0.013092041015625, -0.008941650390625 ]
320f01469ba811480fde1299ba47cb7a68a62027
Wordpress Stackexchange Q: Redirection Plugin: Redirect all URLs with a regular expression I understand little about regular expressions, but I need to figure one out to use with the Redirection plugin which supports redirects with regular expressions. http://urbangiraffe.com/plugins/redirection/ What I need to do is redirect all urls in /oldsite/ to the domain root. That means any page in /oldsite/ like /oldsite/this-is-my-page.html, /oldsite/this-is-my-page-too.html, etc., needs to go to root via a regular expression. I can't get a 301 redirect rule to work in .htaccess for some reason; there may be a restriction at the host, so I need to use this plugin. It needs to be a regular expression in the format that the plugin understands. Some examples are in the docs for the plugin at that link above. The first field for a new redirection in the plugin takes the regular expression; the second field is the target URL. This doesn't work: Source: /oldsite/* Target: http://mydomain.com Nor does this: Source: ^oldsite/(.*) Target: http://mydomain.com A: I modified it to redirect to a different URL but maintain the requested page: Source: /(.*) Target: http://mysite.com/$1
Q: Redirection Plugin: Redirect all URLs with a regular expression I understand little about regular expressions, but I need to figure one out to use with the Redirection plugin which supports redirects with regular expressions. http://urbangiraffe.com/plugins/redirection/ What I need to do is redirect all urls in /oldsite/ to the domain root. That means any page in /oldsite/ like /oldsite/this-is-my-page.html, /oldsite/this-is-my-page-too.html, etc., needs to go to root via a regular expression. I can't get a 301 redirect rule to work in .htaccess for some reason; there may be a restriction at the host, so I need to use this plugin. It needs to be a regular expression in the format that the plugin understands. Some examples are in the docs for the plugin at that link above. The first field for a new redirection in the plugin takes the regular expression; the second field is the target URL. This doesn't work: Source: /oldsite/* Target: http://mydomain.com Nor does this: Source: ^oldsite/(.*) Target: http://mydomain.com A: I modified it to redirect to a different URL but maintain the requested page: Source: /(.*) Target: http://mysite.com/$1 A: Got it to work with this: Source: /oldsite/(.*) Target: http://mydomain.com
wordpress
{ "language": "en", "length": 191, "provenance": "stackexchange_00019.jsonl.gz:413257", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29147" }
[ 0.05181884765625, 0.030120849609375, -0.01158905029296875, -0.00689697265625, 0.0081939697265625, -0.0155029296875, 0.01178741455078125, -0.04327392578125, -0.032562255859375, 0.027801513671875, 0.05206298828125, -0.0008597373962402344, -0.03533935546875, -0.055908203125, 0.0023403167724609375, -0.0010805130004882812, 0.036590576171875, -0.0160369873046875, 0.007213592529296875, -0.0289764404296875, 0.01496124267578125, 0.0026111602783203125, 0.008575439453125, 0.048126220703125, 0.011962890625, -0.010284423828125, 0.09906005859375, -0.0469970703125, 0.0231781005859375, -0.030364990234375, 0.0185699462890625, -0.0194091796875, 0.046966552734375, 0.03924560546875, -0.070068359375, -0.044525146484375, 0.0164947509765625, -0.01085662841796875, -0.0266876220703125, 0.02630615234375, 0.060516357421875, -0.0310211181640625, -0.05035400390625, 0.049835205078125, -0.03509521484375, -0.067626953125, 0.08294677734375, -0.01265716552734375, 0.00835418701171875, 0.006687164306640625, -0.01523590087890625, 0.0078277587890625, -0.01183319091796875, 0.01497650146484375, 0.004730224609375, 0.01331329345703125, -0.017181396484375, -0.00444793701171875, -0.0082244873046875, 0.01232147216796875, 0.0155487060546875, 0.03106689453125, 0.0009341239929199219, 0.0248565673828125, -0.031890869140625, -0.0133056640625, -0.0186767578125, 0.00511932373046875, -0.040374755859375, -0.03656005859375, 0.038665771484375, -0.00872802734375, 0.007663726806640625, 0.002605438232421875, -0.0278167724609375, -0.042449951171875, 0.028106689453125, -0.019622802734375, 0.0285186767578125, 0.002849578857421875, -0.0146942138671875, -0.01873779296875, 0.01134490966796875, -0.0535888671875, 0.0242462158203125, -0.00977325439453125, -0.0211029052734375, 0.00629425048828125, -0.0650634765625, -0.03936767578125, -0.03436279296875, -0.0129852294921875, -0.06805419921875, -0.044891357421875, -0.00337982177734375, -0.037567138671875, 0.0108642578125, 0.045501708984375, 0.01293182373046875, 0.0029430389404296875, -0.0027923583984375, -0.04083251953125, -0.006740570068359375, -0.024749755859375, -0.01983642578125, 0.04754638671875, 0.0516357421875, 0.0484619140625, 0.0015344619750976562, -0.01412200927734375, -0.00376129150390625, 0.0131988525390625, -0.023193359375, 0.012542724609375, -0.0287017822265625, 0.00962066650390625, -0.04351806640625, -0.0124053955078125, -0.033935546875, 0.0099029541015625, -0.0027637481689453125, 0.020660400390625, 0.0433349609375, -0.028045654296875, -0.031280517578125, -0.03228759765625, -0.02294921875, -0.0576171875, 0.00881195068359375, -0.02655029296875, 0.01140594482421875, 0.0269622802734375, -0.0433349609375, 0.014434814453125, -0.016876220703125, 0.014404296875, 0.050628662109375, -0.0290679931640625, -0.023681640625, 0.006282806396484375, 0.010009765625, -0.0200347900390625, -0.0302276611328125, -0.01493072509765625, 0.00911712646484375, 0.0251007080078125, 0.024139404296875, 0.022064208984375, -0.025054931640625, -0.062286376953125, 0.037109375, -0.047576904296875, 0.06732177734375, -0.024932861328125, -0.0200958251953125, -0.06781005859375, 0.0167694091796875, -0.050445556640625, 0.00429534912109375, -0.040985107421875, 0.01387786865234375, 0.00464630126953125, 0.034088134765625, -0.051300048828125, -0.083740234375, -0.0108489990234375, -0.07073974609375, -0.0270538330078125, 0.007965087890625, -0.039886474609375, -0.00878143310546875, -0.0001837015151977539, 0.0255279541015625, -0.016998291015625, -0.0110321044921875, 0.0202178955078125, -0.043548583984375, -0.0011301040649414062, 0.01441192626953125, 0.0650634765625, 0.0377197265625, -0.0176544189453125, -0.006229400634765625, 0.041259765625, -0.02923583984375, 0.0292205810546875, 0.00359344482421875, 0.030364990234375, -0.01348114013671875, 0.01317596435546875, 0.036285400390625, 0.038726806640625, -0.0411376953125, 0.05950927734375, -0.039794921875, -0.0201263427734375, 0.0183563232421875, 0.0328369140625, -0.0222320556640625, -0.028106689453125, -0.00994873046875, 0.0133819580078125, -0.0301055908203125, 0.0341796875, -0.00925445556640625, 0.006103515625, -0.014129638671875, 0.01090240478515625, 0.030914306640625, 0.043609619140625, -0.01343536376953125, 0.01108551025390625, -0.0198211669921875, -0.020233154296875, -0.013519287109375, 0.0250701904296875, -0.01528167724609375, 0.03680419921875, 0.005313873291015625, 0.032989501953125, 0.01078033447265625, -0.0296783447265625, 0.0034503936767578125, -0.029052734375, 0.031463623046875, -0.0211029052734375, -0.0195770263671875, -0.0241241455078125, -0.0234832763671875, 0.010894775390625, -0.0859375, 0.059234619140625, 0.010955810546875, 0.0166015625, -0.059051513671875, -0.00022137165069580078, -0.050933837890625, -0.02191162109375, -0.0179290771484375, 0.056884765625, 0.041961669921875, 0.00641632080078125, -0.026885986328125, -0.037811279296875, -0.005252838134765625, -0.0972900390625, -0.0017633438110351562, -0.0175018310546875, 0.021759033203125, 0.0261077880859375, -0.0023860931396484375, -0.0404052734375, 0.0232086181640625, -0.044525146484375, -0.00658416748046875, 0.0330810546875, 0.0063629150390625, 0.003505706787109375, -0.07049560546875, 0.0250396728515625, 0.00737762451171875, -0.0227813720703125, -0.04412841796875, 0.007366180419921875, 0.0114593505859375, -0.0164794921875, 0.0211181640625, 0.033447265625, 0.0019550323486328125, -0.032745361328125, 0.015777587890625, 0.00537109375, 0.01042938232421875, 0.036407470703125, 0.03204345703125, -0.04925537109375, -0.0287322998046875, 0.003513336181640625, 0.01666259765625, -0.005352020263671875, -0.00862884521484375, 0.0426025390625, -0.01788330078125, -0.01129913330078125, -0.01873779296875, -0.017181396484375, -0.0076751708984375, 0.0137176513671875, 0.05975341796875, 0.0347900390625, 0.041748046875, 0.0147705078125, -0.0033130645751953125, 0.054046630859375, 0.006809234619140625, -0.03179931640625, -0.00226593017578125, -0.041961669921875, 0.0374755859375, -0.03582763671875, 0.0275421142578125, 0.06256103515625, -0.0036678314208984375, 0.01108551025390625, 0.00392913818359375, 0.006351470947265625, 0.021209716796875, -0.00576019287109375, -0.0153961181640625, 0.01064300537109375, -0.07720947265625, -0.027740478515625, 0.027496337890625, 0.0216827392578125, 0.0201416015625, -0.0208892822265625, 0.00323486328125, 0.03338623046875, -0.0711669921875, -0.08428955078125, -0.0264129638671875, -0.057403564453125, -0.005924224853515625, 0.01262664794921875, -0.0279998779296875, 0.00392913818359375, 0.039825439453125, 0.00958251953125, 0.006626129150390625, -0.00005072355270385742, -0.037628173828125, -0.0176849365234375, -0.0750732421875, -0.009979248046875, -0.0084381103515625, 0.020416259765625, 0.01262664794921875, -0.020233154296875, -0.013641357421875, -0.023040771484375, 0.0205230712890625, 0.035003662109375, 0.0239105224609375, -0.01039886474609375, -0.03564453125, -0.0048980712890625, -0.019775390625, 0.005199432373046875, 0.070556640625, 0.002838134765625, 0.0024127960205078125, 0.0210113525390625, -0.008087158203125, -0.0148773193359375, 0.002597808837890625, -0.073486328125, -0.0061187744140625, -0.005031585693359375, -0.0278167724609375, -0.0457763671875, -0.02362060546875, -0.004634857177734375, -0.0311126708984375, 0.01261138916015625, 0.006103515625, -0.01186370849609375, 0.016082763671875, 0.0006322860717773438, 0.03350830078125, 0.0130462646484375, 0.050628662109375, -0.00787353515625, -0.039794921875, -0.01325225830078125, 0.00823974609375, -0.057098388671875, 0.040252685546875, -0.0139923095703125, 0.0149383544921875, 0.022735595703125, -0.005260467529296875, 0.018768310546875, 0.0167236328125, 0.015045166015625, -0.047698974609375, 0.023773193359375, -0.0308990478515625, -0.0030059814453125, -0.022735595703125, -0.0004374980926513672, -0.01434326171875, 0.060577392578125, -0.045989990234375, -0.01236724853515625, -0.0140228271484375, 0.0018472671508789062, 0.03143310546875, 0.005306243896484375, -0.037506103515625, -0.0233154296875, -0.131103515625, -0.0252532958984375, -0.00670623779296875, -0.07122802734375, 0.03009033203125, -0.0557861328125, -0.053436279296875, -0.06591796875, 0.01367950439453125, 0.00949859619140625, 0.0156402587890625, 0.004184722900390625, 0.00820159912109375, -0.00399017333984375, 0.00011909008026123047, -0.0288238525390625, -0.0192718505859375, -0.004543304443359375, 0.02728271484375, 0.017425537109375, -0.0008449554443359375, -0.006389617919921875, 0.020050048828125, 0.043182373046875, -0.0257415771484375, 0.030914306640625, -0.00157928466796875, 0.0023193359375, 0.004344940185546875, 0.02581787109375, 0.01399993896484375, -0.0034084320068359375, -0.012359619140625, 0.01018524169921875, -0.00983428955078125, 0.0014142990112304688, -0.008880615234375, -0.062744140625, 0.046112060546875, -0.049041748046875, -0.060211181640625, -0.01320648193359375, -0.03143310546875, 0.001922607421875, -0.026275634765625, -0.01922607421875, -0.0082550048828125, -0.053680419921875, 0.01442718505859375, -0.0093994140625, -0.0305023193359375, 0.0016765594482421875, 0.012939453125, 0.0262298583984375, -0.0241546630859375, 0.045379638671875, 0.00412750244140625, 0.0136566162109375, 0.01294708251953125, 0.0149688720703125, -0.0311431884765625, -0.022613525390625, 0.074951171875, -0.019317626953125, 0.024688720703125, -0.0311737060546875, 0.01375579833984375, -0.01580810546875, -0.045745849609375, 0.03265380859375, -0.0179901123046875, -0.006710052490234375, 0.05816650390625, 0.01605224609375, -0.0180206298828125, -0.031280517578125, 0.0177001953125, 0.01377105712890625, -0.0105743408203125, -0.0208282470703125, -0.0604248046875, 0.0281219482421875, 0.038604736328125, 0.018646240234375, 0.03729248046875, -0.01070404052734375, 0.05950927734375, 0.0243682861328125, -0.0198822021484375, -0.011688232421875, 0.01499176025390625, -0.0190887451171875, 0.006488800048828125, -0.01366424560546875, -0.037322998046875, -0.01861572265625, 0.0024051666259765625, 0.0284576416015625, -0.0185089111328125, -0.040863037109375, -0.02874755859375, -0.047515869140625, -0.07818603515625, 0.0203704833984375, -0.00800323486328125, 0.0201873779296875, 0.041107177734375, -0.04681396484375, -0.0092315673828125, 0.02496337890625, -0.0261383056640625, -0.053863525390625, 0.012481689453125, 0.0013914108276367188, -0.0028018951416015625, 0.0178375244140625, 0.07403564453125, 0.038055419921875, 0.024017333984375, -0.02374267578125, 0.0165557861328125, 0.00632476806640625, 0.030975341796875, 0.01434326171875, 0.0021648406982421875, 0.0072174072265625, -0.01088714599609375, -0.0007963180541992188, -0.0189056396484375, 0.0031795501708984375, 0.01934814453125, 0.031280517578125, 0.0121307373046875, -0.0202178955078125, 0.01323699951171875, 0.003131866455078125, -0.0019197463989257812, 0.030487060546875, 0.0070953369140625, -0.01061248779296875, -0.03326416015625, -0.00514984130859375, 0.044830322265625, 0.0015087127685546875, -0.0389404296875, 0.0130615234375, -0.0428466796875, 0.01473236083984375, 0.01308441162109375, -0.0426025390625, 0.01207733154296875, 0.0230865478515625, -0.016204833984375, -0.0211944580078125, -0.0193023681640625, -0.0022716522216796875, -0.0169677734375, -0.0222320556640625, -0.0034351348876953125, 0.02069091796875, 0.001056671142578125, 0.0225067138671875, -0.006252288818359375, -0.0435791015625, 0.01029205322265625, -0.0020809173583984375, 0.038726806640625, 0.0090179443359375, -0.0501708984375, 0.01242828369140625, -0.035186767578125, 0.001621246337890625, 0.0635986328125, 0.00783538818359375, -0.003063201904296875, -0.03533935546875, 0.012298583984375, 0.03131103515625, 0.0210723876953125, 0.0289154052734375, -0.01306915283203125, -0.0184173583984375, 0.00044798851013183594, 0.00911712646484375, -0.005786895751953125, 0.00586700439453125, -0.031463623046875, 0.0360107421875, -0.01947021484375, -0.004878997802734375, 0.0211334228515625, -0.028472900390625, 0.01380157470703125, -0.010589599609375, -0.019744873046875, -0.0207977294921875, -0.008636474609375, -0.0186004638671875, 0.044677734375, -0.006252288818359375, -0.0152587890625, 0.01407623291015625, 0.004802703857421875, -0.0261688232421875, 0.007022857666015625, 0.01522064208984375, 0.016448974609375, -0.016357421875, 0.01326751708984375, 0.04290771484375, -0.036224365234375, -0.0273895263671875, 0.0017881393432617188, 0.007152557373046875, 0.019378662109375, 0.0027332305908203125, -0.057830810546875, 0.037811279296875, 0.04351806640625, -0.0010967254638671875, 0.029541015625, 0.00043487548828125, 0.008636474609375, 0.036529541015625, -0.02862548828125, 0.051605224609375, 0.004192352294921875, 0.017669677734375, -0.0284576416015625, 0.01380157470703125, 0.01123809814453125, -0.01450347900390625, -0.01325225830078125, 0.053192138671875, 0.0258941650390625, -0.1044921875, 0.0030078887939453125, 0.0025348663330078125, 0.01355743408203125, 0.0023555755615234375, -0.00028586387634277344, 0.035980224609375, 0.0548095703125, -0.058074951171875, 0.026458740234375, -0.034759521484375, -0.021453857421875, 0.045013427734375, -0.019561767578125, 0.0233154296875, -0.0018901824951171875, 0.007274627685546875, -0.035919189453125, -0.01410675048828125, 0.019866943359375, -0.005374908447265625, 0.00046539306640625, 0.005466461181640625, 0.01557159423828125, -0.030303955078125, -0.0133209228515625, 0.0272064208984375, -0.034454345703125, -0.0089874267578125, 0.01552581787109375, -0.0098724365234375, 0.04620361328125, 0.061187744140625, -0.007205963134765625, -0.00662994384765625, 0.039093017578125, -0.03668212890625, 0.034454345703125, -0.0587158203125, -0.0234527587890625, -0.01184844970703125, -0.0214996337890625, 0.004299163818359375, 0.0108642578125, -0.034423828125, -0.0029315948486328125, 0.0067138671875, 0.02325439453125, -0.04949951171875, -0.003936767578125, -0.0124664306640625, 0.057037353515625, 0.032470703125, -0.03143310546875, -0.007350921630859375, -0.03955078125, -0.0030117034912109375, -0.040283203125, -0.01409912109375, 0.0423583984375, -0.044830322265625, -0.0694580078125, 0.0736083984375, -0.001651763916015625, 0.0609130859375, 0.006130218505859375, 0.0224151611328125, -0.00615692138671875, -0.0012311935424804688, -0.0062103271484375, 0.035491943359375, -0.0156707763671875, -0.0105133056640625, -0.0211944580078125, 0.005290985107421875, -0.00787353515625, 0.01287078857421875, 0.072021484375, 0.02154541015625, -0.1025390625, 0.006366729736328125, 0.056182861328125, 0.0018558502197265625, -0.0012979507446289062, 0.103759765625, -0.01078033447265625, -0.0305938720703125, 0.01953125, -0.0252532958984375, 0.0112152099609375, -0.00838470458984375, -0.00689697265625, -0.00846099853515625, -0.0033397674560546875, -0.026336669921875, 0.010162353515625, -0.031646728515625, -0.06683349609375, 0.0191497802734375, 0.031280517578125, -0.002002716064453125, 0.007785797119140625, 0.0208892822265625, 0.0247650146484375, -0.031463623046875, 0.04608154296875, -0.046783447265625, 0.055694580078125, -0.01425933837890625, 0.030059814453125, 0.00691986083984375, 0.01468658447265625, 0.0625, -0.042999267578125, 0.01082611083984375, -0.00029778480529785156, -0.02264404296875, 0.035369873046875, 0.058441162109375, 0.030487060546875, 0.0202789306640625, -0.00502777099609375, 0.02362060546875, 0.05181884765625, -0.015472412109375, -0.0036602020263671875, 0.0033969879150390625, -0.00524139404296875, 0.0309600830078125, -0.0109100341796875, 0.05938720703125, -0.03857421875, -0.048309326171875, -0.0022373199462890625, -0.0017900466918945312, 0.032470703125, 0.005748748779296875, 0.002655029296875, -0.01346588134765625, -0.01059722900390625, 0.0254058837890625, 0.002964019775390625, -0.01067352294921875, 0.0246124267578125, 0.00936126708984375, -0.0106658935546875, 0.034149169921875, 0.03173828125, 0.005123138427734375, 0.00821685791015625, -0.011322021484375, -0.0219573974609375, -0.006771087646484375, -0.0219573974609375, -0.02850341796875, 0.025238037109375, 0.040863037109375, 0.0036678314208984375, -0.00432586669921875, 0.0120849609375, 0.0150146484375, -0.00838470458984375, -0.0106658935546875, 0.00701904296875, -0.0246429443359375, 0.0482177734375, -0.0260009765625, 0.0260162353515625, -0.01708984375, -0.035125732421875, -0.02911376953125, 0.0201568603515625, 0.009429931640625, -0.0090789794921875, 0.031341552734375, -0.001678466796875, -0.0299072265625, -0.01447296142578125, -0.0277099609375, 0.0560302734375, 0.01036834716796875, 0.00936126708984375, -0.012786865234375, 0.002567291259765625, -0.010009765625, 0.00632476806640625, 0.0255279541015625, -0.00923919677734375, 0.041717529296875, 0.0016269683837890625, 0.033843994140625, 0.018829345703125, -0.0298004150390625, -0.020172119140625, 0.015960693359375, 0.050628662109375, 0.005687713623046875, -0.0028247833251953125, 0.0233612060546875, 0.002521514892578125, -0.006984710693359375, 0.0018053054809570312, 0.08154296875, -0.032745361328125, 0.006488800048828125, -0.0016231536865234375, -0.0086212158203125, -0.004001617431640625, 0.0012359619140625, -0.03515625, -0.0266571044921875, 0.01409912109375, 0.01031494140625, -0.09246826171875, 0.00475311279296875, 0.01059722900390625, 0.00258636474609375, 0.002834320068359375, 0.002796173095703125, 0.0251007080078125, 0.01507568359375, 0.0477294921875, -0.03582763671875, -0.0892333984375, -0.06878662109375, 0.0013246536254882812, -0.006221771240234375, 0.027740478515625, 0.01142120361328125, 0.04876708984375, 0.003971099853515625, -0.0265350341796875, 0.01529693603515625, -0.07489013671875, 0.01486968994140625, 0.03778076171875, 0.0228118896484375, -0.020294189453125, 0.053802490234375, -0.007358551025390625, 0.00923919677734375, 0.0321044921875, 0.045654296875, 0.0266571044921875, 0.013397216796875, -0.046966552734375, -0.039276123046875, -0.0110321044921875, 0.002712249755859375, -0.0013570785522460938, -0.037872314453125, -0.0193939208984375, -0.036712646484375, -0.0513916015625, -0.03253173828125, -0.04229736328125, -0.00457763671875, 0.0213623046875, -0.022705078125, -0.03851318359375, -0.02587890625, 0.01015472412109375, 0.0171356201171875, 0.003276824951171875, -0.07177734375, 0.031402587890625, -0.037750244140625, 0.067138671875, -0.035919189453125, 0.01715087890625, -0.00046753883361816406, 0.021820068359375, -0.04071044921875, -0.050048828125, -0.04779052734375, 0.0355224609375, -0.0640869140625, 0.000021576881408691406, 0.058349609375, -0.0219573974609375, -0.061126708984375, -0.038726806640625, -0.0197906494140625, 0.00888824462890625, -0.033660888671875, -0.0183868408203125, 0.0183258056640625, -0.003326416015625, -0.028594970703125, 0.006519317626953125, 0.0189666748046875, 0.002033233642578125, -0.0240020751953125, -0.0204620361328125, -0.0382080078125, -0.05731201171875, -0.062103271484375, -0.06298828125, 0.04437255859375, 0.00882720947265625, -0.0171966552734375, -0.0277862548828125, 0.033416748046875, 0.012664794921875, 0.01342010498046875, 0.01415252685546875, -0.040985107421875, -0.031585693359375, -0.0204620361328125, 0.00815582275390625, 0.038177490234375, -0.029327392578125, 0.0160675048828125, 0.0302276611328125, 0.07666015625, 0.0714111328125, 0.0004611015319824219, -0.005634307861328125, -0.0028285980224609375, 0.030548095703125, 0.06658935546875, 0.00047707557678222656, 0.0175323486328125, 0.00937652587890625, -0.04473876953125, -0.00240325927734375, -0.0190582275390625, -0.059051513671875, -0.057586669921875, 0.08380126953125, 0.01392364501953125, 0.0193023681640625, 0.0023193359375, -0.040679931640625, -0.0018987655639648438, 0.005279541015625, -0.02923583984375, 0.0169830322265625, -0.05718994140625, -0.018585205078125, -0.01500701904296875, -0.0107269287109375, 0.00019657611846923828, 0.0019683837890625, -0.0207672119140625, 0.0010852813720703125, 0.01181793212890625, -0.028045654296875, 0.00966644287109375, 0.01468658447265625, 0.09954833984375, -0.060577392578125, 0.01142120361328125, -0.0007925033569335938, 0.01934814453125, 0.029815673828125, -0.055145263671875, 0.033660888671875, 0.033966064453125, -0.026885986328125, -0.001068115234375, 0.019195556640625, -0.0050048828125, -0.01410675048828125, -0.038970947265625, -0.0311431884765625, 0.025421142578125, 0.0012941360473632812, 0.0225677490234375, -0.0019989013671875, 0.0267791748046875, 0.028350830078125, 0.068359375, 0.021087646484375, -0.07061767578125, -0.0140838623046875, 0.04248046875, -0.005138397216796875, -0.037506103515625, -0.0012645721435546875, -0.038360595703125, 0.00579833984375, 0.045074462890625, 0.047821044921875, -0.01512908935546875, 0.03857421875, -0.01416015625, 0.036529541015625, -0.004444122314453125 ]
4e285578dad3809b8ca363e012a969b63ddfb5ee
Wordpress Stackexchange Q: Why is my working Custom Taxonomy not in get_taxonomies array? I've created a custom taxonomy. It's working just as expected, aside from it is not showing in the get_taxonomies array. get_terms function returns an invalid taxonomy error. I want to use get_terms to loop through the Double India Pale Ales and print each name for a select box. Here is the code used to register it. add_action( 'init', 'double_ipa_init' ); function double_ipa_init() { register_taxonomy( 'double-ipa', array ( 0 => 'post', 1 => 'page', ), array( 'hierarchical' => true, 'label' => 'Double IPAs', 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'double-ipa' ), 'singular_label' => 'Double IPA' ) ); } This code is in a plugin, and is on Multisite. Thanks in advance for your help. A: You're looking to use get_terms() before 'Init' action hook. Here's the order of the hooks run in a typical request: muplugins_loaded registered_taxonomy registered_post_type plugins_loaded sanitize_comment_cookies setup_theme load_textdomain after_setup_theme auth_cookie_malformed auth_cookie_valid set_current_user **init** widgets_init register_sidebar wp_register_sidebar_widget wp_default_scripts wp_default_stypes admin_bar_init add_admin_bar_menus wp_loaded parse_request send_headers parse_query pre_get_posts posts_selection wp template_redirect get_header wp_head wp_enqueue_scripts wp_print_styles wp_print_scripts
Q: Why is my working Custom Taxonomy not in get_taxonomies array? I've created a custom taxonomy. It's working just as expected, aside from it is not showing in the get_taxonomies array. get_terms function returns an invalid taxonomy error. I want to use get_terms to loop through the Double India Pale Ales and print each name for a select box. Here is the code used to register it. add_action( 'init', 'double_ipa_init' ); function double_ipa_init() { register_taxonomy( 'double-ipa', array ( 0 => 'post', 1 => 'page', ), array( 'hierarchical' => true, 'label' => 'Double IPAs', 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'double-ipa' ), 'singular_label' => 'Double IPA' ) ); } This code is in a plugin, and is on Multisite. Thanks in advance for your help. A: You're looking to use get_terms() before 'Init' action hook. Here's the order of the hooks run in a typical request: muplugins_loaded registered_taxonomy registered_post_type plugins_loaded sanitize_comment_cookies setup_theme load_textdomain after_setup_theme auth_cookie_malformed auth_cookie_valid set_current_user **init** widgets_init register_sidebar wp_register_sidebar_widget wp_default_scripts wp_default_stypes admin_bar_init add_admin_bar_menus wp_loaded parse_request send_headers parse_query pre_get_posts posts_selection wp template_redirect get_header wp_head wp_enqueue_scripts wp_print_styles wp_print_scripts A: The Invalid Taxonomy error will be raised by the function get_terms(). You're registring your taxonomy on the init action hook. Therefore you have to call your get_terms() function on the same or a later hook. Try this snippet. It should display all term names of your taxonomy, regardless if the term is empty. add_action('init', 'wpse29164_registerTaxonomy'); function wpse29164_registerTaxonomy() { $args = array( 'hierarchical' => true, 'label' => 'Double IPAs', 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'double-ipa' ), 'singular_label' => 'Double IPA' ); register_taxonomy('double-ipa', array('post', 'page'), $args); $terms = get_terms('double-ipa', array('hide_empty' => false)); foreach ($terms as $term) { echo $term->name; } } A: I got the same issue before, but using WP_Term_Query helped me retrieve what i needed give it a try it should work. More details here : https://developer.wordpress.org/reference/classes/WP_Term_Query/__construct/
wordpress
{ "language": "en", "length": 316, "provenance": "stackexchange_00019.jsonl.gz:413259", "question_score": "7", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29150" }
[ 0.045684814453125, 0.01515960693359375, -0.044219970703125, -0.0252532958984375, 0.024688720703125, -0.0391845703125, 0.0254364013671875, -0.01995849609375, -0.052032470703125, 0.01104736328125, -0.056488037109375, 0.01448822021484375, -0.067626953125, 0.0027713775634765625, -0.0058135986328125, -0.07904052734375, 0.0279693603515625, -0.042022705078125, 0.015228271484375, -0.0162506103515625, 0.0006852149963378906, 0.0016469955444335938, 0.041961669921875, -0.0379638671875, 0.035400390625, -0.031341552734375, 0.053253173828125, -0.04412841796875, 0.033447265625, -0.0213165283203125, 0.0295257568359375, 0.017791748046875, 0.0279998779296875, -0.0074462890625, 0.01105499267578125, 0.05621337890625, 0.03302001953125, -0.01004791259765625, 0.0011358261108398438, 0.0501708984375, 0.0301055908203125, -0.01355743408203125, 0.0029964447021484375, 0.051300048828125, -0.016143798828125, -0.03692626953125, 0.03240966796875, -0.028564453125, -0.0035648345947265625, -0.033294677734375, 0.045013427734375, -0.03118896484375, 0.058868408203125, -0.0390625, -0.0147705078125, 0.0235443115234375, 0.0008959770202636719, -0.0330810546875, 0.023040771484375, 0.02215576171875, -0.01171875, -0.0243682861328125, 0.0208892822265625, -0.0254364013671875, 0.0095977783203125, 0.0296783447265625, -0.01434326171875, 0.01605224609375, -0.0279388427734375, -0.00812530517578125, -0.00847625732421875, -0.04132080078125, 0.004978179931640625, 0.022064208984375, -0.0095977783203125, -0.0892333984375, 0.0241546630859375, -0.05181884765625, 0.00762939453125, 0.04351806640625, 0.059600830078125, 0.0025081634521484375, -0.051483154296875, 0.051666259765625, 0.00008237361907958984, 0.05731201171875, 0.005184173583984375, -0.069580078125, -0.0146484375, 0.009002685546875, -0.0066375732421875, -0.0452880859375, -0.0275726318359375, 0.050750732421875, 0.027313232421875, -0.0361328125, 0.02886962890625, 0.06939697265625, -0.01094818115234375, 0.034423828125, -0.023468017578125, -0.034698486328125, 0.051177978515625, -0.055938720703125, 0.03411865234375, 0.005985260009765625, -0.0193328857421875, -0.00902557373046875, 0.066162109375, 0.01727294921875, 0.001834869384765625, 0.0426025390625, 0.005741119384765625, -0.041778564453125, -0.0303802490234375, 0.00012576580047607422, -0.0043182373046875, -0.0197601318359375, 0.040435791015625, -0.04132080078125, 0.01180267333984375, 0.0430908203125, -0.005107879638671875, 0.019744873046875, -0.004852294921875, 0.0139007568359375, 0.0094146728515625, -0.038116455078125, 0.00461578369140625, 0.029693603515625, -0.019805908203125, -0.00435638427734375, 0.032012939453125, 0.0253753662109375, 0.0009918212890625, -0.020599365234375, 0.01629638671875, -0.0102081298828125, -0.0038089752197265625, -0.01322174072265625, 0.041290283203125, 0.0005164146423339844, 0.00305938720703125, 0.007106781005859375, 0.015045166015625, -0.01971435546875, 0.031524658203125, 0.03057861328125, -0.0201263427734375, 0.01006317138671875, -0.0042877197265625, 0.036285400390625, 0.09002685546875, -0.010711669921875, -0.10174560546875, -0.0216217041015625, 0.01143646240234375, -0.037017822265625, -0.061065673828125, -0.09100341796875, -0.001979827880859375, -0.0210418701171875, -0.01398468017578125, -0.039886474609375, -0.043975830078125, 0.0172271728515625, -0.018585205078125, 0.00150299072265625, 0.021026611328125, 0.004680633544921875, 0.027374267578125, -0.0038394927978515625, 0.0139617919921875, 0.012237548828125, 0.005062103271484375, -0.0045166015625, -0.033538818359375, 0.023651123046875, 0.01470947265625, -0.004337310791015625, -0.01788330078125, -0.049957275390625, 0.03167724609375, -0.01551055908203125, -0.07293701171875, 0.04290771484375, -0.01256561279296875, 0.07177734375, 0.048370361328125, 0.01151275634765625, 0.0178985595703125, 0.00013053417205810547, -0.08184814453125, 0.048126220703125, 0.01361083984375, -0.0236663818359375, -0.0050048828125, -0.0222625732421875, 0.00469970703125, 0.00902557373046875, -0.062042236328125, -0.034027099609375, 0.004657745361328125, 0.0076904296875, -0.042388916015625, 0.012298583984375, -0.0292205810546875, 0.0408935546875, 0.030487060546875, 0.017852783203125, -0.00278472900390625, 0.00931549072265625, -0.0249481201171875, -0.0017337799072265625, -0.02734375, 0.0313720703125, -0.03253173828125, 0.04046630859375, 0.011016845703125, -0.0211181640625, 0.026611328125, -0.0266571044921875, 0.04364013671875, 0.0325927734375, 0.0017709732055664062, 0.0044403076171875, -0.021759033203125, 0.0087127685546875, 0.00315093994140625, 0.021697998046875, -0.0186004638671875, 0.02740478515625, 0.037109375, 0.0491943359375, -0.01131439208984375, -0.0213775634765625, 0.02801513671875, -0.07373046875, 0.0245819091796875, 0.045257568359375, 0.0249786376953125, 0.01042938232421875, 0.00357818603515625, 0.013519287109375, 0.044708251953125, -0.042510986328125, -0.01593017578125, -0.0008611679077148438, -0.0097198486328125, 0.00786590576171875, 0.0523681640625, 0.016998291015625, 0.0029010772705078125, 0.021881103515625, 0.040618896484375, 0.00800323486328125, -0.0302276611328125, -0.0255584716796875, 0.021820068359375, -0.0015201568603515625, 0.01468658447265625, -0.006984710693359375, -0.007167816162109375, -0.009246826171875, 0.0294036865234375, 0.007328033447265625, 0.004100799560546875, -0.007720947265625, -0.048065185546875, 0.025421142578125, 0.017425537109375, -0.0400390625, -0.0164337158203125, 0.0028171539306640625, 0.05645751953125, -0.044921875, -0.032257080078125, 0.0091400146484375, 0.021087646484375, -0.005741119384765625, 0.02105712890625, 0.0574951171875, -0.046295166015625, -0.00666046142578125, -0.0231475830078125, -0.0599365234375, -0.0239410400390625, 0.06781005859375, -0.01332855224609375, -0.032196044921875, -0.008087158203125, 0.05096435546875, -0.0179443359375, 0.034393310546875, 0.0252838134765625, -0.000007808208465576172, 0.039398193359375, -0.01226043701171875, 0.0199127197265625, 0.00440216064453125, 0.0521240234375, 0.0439453125, 0.01300811767578125, 0.0012454986572265625, 0.01540374755859375, -0.04840087890625, -0.0011415481567382812, 0.02838134765625, 0.018157958984375, -0.05474853515625, 0.0274658203125, 0.050689697265625, 0.0134735107421875, 0.0222015380859375, 0.005283355712890625, -0.035125732421875, 0.00258636474609375, 0.00936126708984375, -0.039520263671875, -0.03717041015625, 0.025421142578125, -0.033660888671875, 0.0006718635559082031, -0.054412841796875, -0.00811004638671875, -0.0041961669921875, -0.06475830078125, -0.004032135009765625, 0.014068603515625, -0.035919189453125, -0.023468017578125, -0.0528564453125, -0.08001708984375, -0.05255126953125, 0.00955963134765625, 0.002872467041015625, 0.0034160614013671875, 0.0740966796875, 0.01215362548828125, -0.0299835205078125, 0.0279998779296875, 0.033660888671875, -0.0029201507568359375, 0.0238494873046875, -0.005733489990234375, 0.0093536376953125, 0.03167724609375, -0.0100860595703125, 0.004131317138671875, 0.04058837890625, -0.041534423828125, -0.017425537109375, -0.0038661956787109375, -0.00408935546875, 0.0038089752197265625, -0.027252197265625, 0.0052490234375, 0.002471923828125, -0.004878997802734375, -0.03704833984375, -0.0036907196044921875, -0.004638671875, -0.017333984375, -0.006862640380859375, 0.0156402587890625, -0.018524169921875, -0.0269012451171875, 0.01203155517578125, -0.03594970703125, -0.01073455810546875, 0.018768310546875, -0.045074462890625, 0.053802490234375, -0.011566162109375, -0.0341796875, -0.010223388671875, 0.03338623046875, 0.0028018951416015625, -0.00742340087890625, 0.0200958251953125, 0.031280517578125, 0.007598876953125, 0.0111846923828125, -0.045623779296875, -0.05535888671875, 0.038848876953125, -0.06085205078125, -0.0262603759765625, -0.0285797119140625, -0.0018453598022460938, -0.00189971923828125, 0.07293701171875, -0.047760009765625, 0.0012683868408203125, 0.0280609130859375, 0.0236358642578125, -0.02069091796875, -0.0217132568359375, -0.053192138671875, -0.01300811767578125, -0.08026123046875, -0.0132904052734375, -0.040435791015625, -0.00830078125, -0.0175628662109375, -0.0173492431640625, -0.03509521484375, -0.06280517578125, 0.047119140625, -0.04107666015625, -0.005672454833984375, 0.035888671875, -0.015899658203125, -0.0128326416015625, -0.034027099609375, -0.0007171630859375, -0.05712890625, -0.0003216266632080078, -0.014373779296875, 0.01543426513671875, 0.00765228271484375, -0.009063720703125, -0.0025196075439453125, 0.03643798828125, -0.01103973388671875, 0.007564544677734375, -0.0034389495849609375, 0.0308837890625, 0.00498199462890625, -0.016632080078125, -0.017333984375, -0.01313018798828125, -0.0099029541015625, 0.021026611328125, -0.03106689453125, 0.0384521484375, 0.0034580230712890625, -0.0006251335144042969, 0.026885986328125, -0.04986572265625, -0.057342529296875, -0.042633056640625, -0.0125732421875, -0.0249481201171875, -0.006816864013671875, -0.0003345012664794922, -0.01151275634765625, -0.0384521484375, 0.02642822265625, -0.0034313201904296875, 0.0013875961303710938, -0.0058441162109375, 0.07061767578125, 0.025115966796875, -0.0162506103515625, 0.007602691650390625, -0.0152587890625, 0.01213836669921875, -0.0294189453125, 0.02978515625, 0.01519012451171875, -0.007904052734375, 0.062225341796875, -0.020111083984375, 0.018096923828125, 0.017669677734375, 0.0096435546875, 0.02276611328125, -0.005146026611328125, 0.0079498291015625, 0.007904052734375, -0.024200439453125, 0.0130462646484375, -0.0038547515869140625, -0.0234832763671875, -0.0022792816162109375, 0.04949951171875, -0.00920867919921875, 0.0164031982421875, -0.053009033203125, -0.034515380859375, 0.009063720703125, -0.0220184326171875, 0.0298004150390625, -0.0037212371826171875, 0.002300262451171875, 0.002685546875, -0.014312744140625, -0.0018787384033203125, 0.037139892578125, 0.0071563720703125, 0.0025234222412109375, 0.0216217041015625, 0.02398681640625, -0.0006537437438964844, 0.011688232421875, -0.004489898681640625, 0.037841796875, 0.005092620849609375, -0.042999267578125, 0.01149749755859375, -0.01006317138671875, -0.00931549072265625, 0.0360107421875, 0.005558013916015625, 0.057830810546875, 0.040374755859375, 0.00360870361328125, 0.0003414154052734375, -0.0192108154296875, 0.006023406982421875, -0.039154052734375, -0.0082244873046875, 0.01183319091796875, -0.0025959014892578125, -0.0216217041015625, 0.07794189453125, 0.00904083251953125, 0.022003173828125, -0.0160675048828125, 0.0241851806640625, 0.0168914794921875, 0.044525146484375, 0.0203399658203125, -0.036102294921875, 0.00016236305236816406, 0.025146484375, -0.01020050048828125, -0.0618896484375, -0.0023212432861328125, 0.0197296142578125, 0.036834716796875, -0.00388336181640625, -0.0309600830078125, 0.026885986328125, 0.004711151123046875, -0.0204620361328125, 0.023529052734375, -0.024810791015625, -0.028717041015625, -0.042724609375, 0.030487060546875, 0.060302734375, 0.00849151611328125, -0.0130615234375, 0.040924072265625, -0.038604736328125, 0.0076141357421875, -0.00347900390625, 0.0013780593872070312, -0.0164794921875, -0.0157318115234375, -0.02093505859375, -0.0064697265625, 0.004619598388671875, -0.0032901763916015625, -0.0182342529296875, -0.00846099853515625, -0.0421142578125, 0.0455322265625, -0.039093017578125, 0.018463134765625, -0.043212890625, 0.01849365234375, -0.03485107421875, -0.0019130706787109375, 0.07061767578125, 0.046478271484375, -0.0537109375, 0.038299560546875, -0.042755126953125, 0.0163726806640625, -0.005771636962890625, -0.058746337890625, -0.03369140625, -0.034759521484375, -0.0176544189453125, 0.0243377685546875, 0.01425933837890625, 0.01189422607421875, -0.0128173828125, 0.01800537109375, -0.0006461143493652344, 0.0283050537109375, -0.037841796875, 0.0302276611328125, 0.03228759765625, -0.00992584228515625, -0.0065155029296875, 0.00887298583984375, 0.00984954833984375, 0.00460052490234375, -0.049407958984375, -0.0841064453125, -0.006191253662109375, 0.045654296875, -0.034027099609375, 0.1041259765625, 0.092529296875, 0.0306243896484375, 0.0246429443359375, 0.005565643310546875, 0.006103515625, 0.00007742643356323242, -0.04925537109375, 0.0256805419921875, 0.0081024169921875, 0.026580810546875, -0.039794921875, 0.01287078857421875, 0.00875091552734375, 0.0198822021484375, 0.0213470458984375, -0.047210693359375, 0.015869140625, 0.034423828125, -0.01357269287109375, 0.01227569580078125, -0.005542755126953125, 0.0207672119140625, 0.025054931640625, -0.0161590576171875, 0.03173828125, -0.01328277587890625, -0.01004791259765625, -0.005828857421875, -0.03167724609375, 0.03472900390625, -0.003971099853515625, -0.0178985595703125, 0.040374755859375, -0.034759521484375, -0.01488494873046875, 0.033477783203125, 0.066162109375, -0.052581787109375, 0.0045013427734375, 0.056427001953125, 0.003269195556640625, -0.022674560546875, 0.01404571533203125, -0.041534423828125, -0.023284912109375, -0.0109100341796875, -0.00914764404296875, -0.0352783203125, -0.00363922119140625, 0.03045654296875, -0.0027027130126953125, 0.00919342041015625, 0.049530029296875, 0.02020263671875, -0.01222991943359375, -0.0008554458618164062, 0.0130157470703125, 0.00826263427734375, -0.0039005279541015625, -0.003131866455078125, 0.001247406005859375, -0.0303802490234375, -0.055694580078125, 0.0034465789794921875, -0.049163818359375, -0.0125732421875, 0.048126220703125, -0.03155517578125, 0.04486083984375, 0.02203369140625, 0.00801849365234375, -0.0025920867919921875, -0.0206756591796875, -0.043060302734375, 0.005550384521484375, -0.02935791015625, 0.0103912353515625, -0.00882720947265625, -0.024261474609375, 0.0287933349609375, -0.01036834716796875, -0.048919677734375, -0.034454345703125, -0.05242919921875, 0.058990478515625, -0.0218048095703125, -0.0024814605712890625, 0.01210784912109375, 0.046783447265625, 0.00415802001953125, 0.002460479736328125, 0.0404052734375, -0.06536865234375, -0.04852294921875, 0.02001953125, -0.05291748046875, -0.02423095703125, 0.0174560546875, -0.03314208984375, 0.11041259765625, 0.0096282958984375, 0.0019121170043945312, 0.0235595703125, 0.04754638671875, -0.051055908203125, 0.0229644775390625, -0.016571044921875, 0.0362548828125, 0.0015544891357421875, 0.006839752197265625, -0.0447998046875, -0.002872467041015625, -0.0142059326171875, 0.034332275390625, 0.0092315673828125, 0.0017576217651367188, -0.0282440185546875, -0.01898193359375, 0.03515625, 0.0221099853515625, 0.0054931640625, 0.0266265869140625, 0.00928497314453125, 0.00785064697265625, -0.029052734375, -0.0002321004867553711, 0.0400390625, -0.045867919921875, -0.049957275390625, 0.03265380859375, 0.00783538818359375, 0.0010585784912109375, 0.006946563720703125, 0.01161956787109375, -0.050537109375, 0.0012416839599609375, 0.040679931640625, -0.0191802978515625, -0.005428314208984375, -0.001239776611328125, -0.01410675048828125, 0.0333251953125, 0.02105712890625, -0.0170440673828125, 0.0246734619140625, -0.00543975830078125, 0.021636962890625, 0.0010766983032226562, 0.0052642822265625, 0.06036376953125, -0.023040771484375, 0.00644683837890625, 0.027587890625, 0.0052490234375, 0.035614013671875, -0.0003256797790527344, 0.0200042724609375, -0.05133056640625, -0.01096343994140625, 0.059600830078125, 0.057373046875, -0.03680419921875, -0.05975341796875, 0.002704620361328125, 0.01171875, 0.0246734619140625, 0.054046630859375, 0.052001953125, 0.039398193359375, 0.0797119140625, -0.044647216796875, -0.0212249755859375, 0.0101318359375, 0.0401611328125, -0.01105499267578125, -0.0013866424560546875, -0.018585205078125, -0.048004150390625, -0.035888671875, -0.002048492431640625, 0.02520751953125, 0.07073974609375, -0.006744384765625, 0.055511474609375, -0.0562744140625, -0.0345458984375, -0.01548004150390625, 0.052154541015625, 0.00226593017578125, 0.008392333984375, -0.026519775390625, -0.043304443359375, -0.0166168212890625, 0.032684326171875, 0.0235595703125, -0.0288848876953125, 0.0083770751953125, 0.01079559326171875, -0.02679443359375, -0.005672454833984375, 0.036102294921875, -0.0026874542236328125, -0.0208282470703125, -0.0118408203125, -0.00396728515625, 0.01381683349609375, -0.0020351409912109375, 0.0259552001953125, 0.0311126708984375, -0.005428314208984375, -0.029449462890625, 0.0638427734375, -0.0009636878967285156, 0.0277252197265625, 0.044677734375, -0.036834716796875, 0.04400634765625, 0.01190185546875, -0.08660888671875, -0.029327392578125, -0.0241851806640625, -0.00980377197265625, 0.03277587890625, 0.048797607421875, 0.005458831787109375, -0.0018663406372070312, 0.013519287109375, -0.0092315673828125, -0.01788330078125, 0.0133514404296875, 0.031585693359375, -0.021942138671875, -0.002529144287109375, 0.008056640625, 0.02252197265625, 0.021331787109375, 0.035675048828125, 0.0214691162109375, -0.0005817413330078125, 0.044464111328125, -0.0230560302734375, 0.0101470947265625, -0.0389404296875, 0.048675537109375, -0.045562744140625, -0.050323486328125, 0.041656494140625, 0.01175689697265625, 0.016510009765625, -0.0109100341796875, -0.0302581787109375, 0.0484619140625, 0.028778076171875, -0.03594970703125, 0.0262298583984375, 0.005767822265625, 0.003444671630859375, -0.031280517578125, 0.0237579345703125, -0.01515960693359375, -0.059600830078125, -0.045257568359375, -0.00623321533203125, 0.0251007080078125, 0.04931640625, -0.02685546875, 0.023193359375, 0.0261077880859375, -0.0179290771484375, 0.03411865234375, -0.0220794677734375, 0.0501708984375, 0.02490234375, 0.015655517578125, 0.01497650146484375, 0.0010709762573242188, -0.0287322998046875, 0.0218505859375, -0.00514984130859375, 0.007781982421875, 0.0005922317504882812, 0.01219940185546875, 0.06463623046875, 0.00966644287109375, 0.0419921875, -0.046844482421875, -0.006626129150390625, 0.053985595703125, 0.01227569580078125, 0.006595611572265625, -0.029937744140625, -0.03143310546875, -0.058807373046875, -0.0080413818359375, 0.0135498046875, -0.016326904296875, -0.0167236328125, -0.040496826171875, 0.00009912252426147461, 0.048675537109375, -0.0196990966796875, -0.0017528533935546875, -0.01546478271484375, -0.054718017578125, 0.043212890625, -0.0013265609741210938, -0.012237548828125, 0.00643157958984375, 0.051025390625, -0.019500732421875, 0.0182647705078125, -0.0208892822265625, -0.033111572265625, -0.035919189453125, -0.020782470703125, -0.01020050048828125, 0.0072784423828125, -0.039947509765625, -0.0119171142578125, -0.03570556640625, 0.0208892822265625, 0.050506591796875, 0.0033779144287109375, 0.02459716796875, 0.0237274169921875, -0.060394287109375, -0.09979248046875, 0.0170440673828125, -0.05157470703125, 0.00183868408203125, 0.006954193115234375, 0.0008711814880371094, 0.01407623291015625, -0.0452880859375, -0.0726318359375, 0.03179931640625, -0.012054443359375, -0.03692626953125, -0.075439453125, 0.025299072265625, 0.005611419677734375, -0.001331329345703125, -0.02667236328125, 0.00540924072265625, -0.0177154541015625, 0.037506103515625, 0.002838134765625, 0.016143798828125, 0.04962158203125, -0.005870819091796875, -0.0226898193359375, -0.010467529296875, -0.00908660888671875, -0.0238494873046875, -0.0095062255859375, -0.0137786865234375, -0.003643035888671875, 0.015594482421875, -0.045379638671875, -0.04791259765625, -0.005290985107421875, 0.043609619140625, 0.0003552436828613281, -0.043304443359375, -0.00897216796875, -0.0192718505859375, 0.063232421875, -0.040557861328125, 0.004215240478515625, 0.00457000732421875, -0.024749755859375, -0.047088623046875, -0.04541015625, -0.008270263671875, 0.037933349609375, -0.08599853515625, 0.01284027099609375, 0.0439453125, -0.0043792724609375, -0.00563812255859375, -0.021209716796875, -0.042266845703125, -0.016326904296875, -0.0222625732421875, -0.008575439453125, -0.022491455078125, -0.002613067626953125, -0.01096343994140625, -0.01094818115234375, -0.07025146484375, -0.008758544921875, 0.0171051025390625, -0.07501220703125, -0.028533935546875, -0.0038299560546875, 0.022796630859375, -0.005825042724609375, -0.00563812255859375, 0.0208282470703125, 0.0189208984375, 0.01032257080078125, 0.0031299591064453125, 0.0011854171752929688, 0.0120849609375, -0.022491455078125, 0.0116729736328125, 0.02471923828125, 0.00153350830078125, -0.0224151611328125, 0.07073974609375, -0.032073974609375, 0.037078857421875, -0.021575927734375, 0.0008244514465332031, 0.00504302978515625, 0.0244140625, 0.0394287109375, 0.0087127685546875, 0.01751708984375, -0.038604736328125, 0.00830841064453125, -0.024261474609375, -0.0014944076538085938, 0.007152557373046875, -0.0265960693359375, 0.0276947021484375 ]
b1c8a4ac6e2d65274eb595f8b5200f73ef5ad9d5
Wordpress Stackexchange Q: Order by first name I'm trying to order the member list by display_name or first name ASC. http://sim.is/sim/felagatal-sim/ This doesn't seem to work. Any pointers out there? :/ $users = get_users(array( 'role' => 'sm_flagar', 'orderby' => 'display_name', 'order' => 'ASC', )); foreach ($users as $user) { $firstName = get_user_meta($user->ID, 'first_name', true); $lastName = get_user_meta($user->ID, 'last_name', true); echo '<li><a href="' . $user->user_url . '">' . $firstName . ' ' . $lastName . '</a></li>' . PHP_EOL; } A: The original code is not so bad. It just is missing the meta_key parameter. Example: $theusers = get_users( array( 'role' => 'contributor', 'meta_key' => 'first_name', 'orderby' => 'meta_value', ) );
Q: Order by first name I'm trying to order the member list by display_name or first name ASC. http://sim.is/sim/felagatal-sim/ This doesn't seem to work. Any pointers out there? :/ $users = get_users(array( 'role' => 'sm_flagar', 'orderby' => 'display_name', 'order' => 'ASC', )); foreach ($users as $user) { $firstName = get_user_meta($user->ID, 'first_name', true); $lastName = get_user_meta($user->ID, 'last_name', true); echo '<li><a href="' . $user->user_url . '">' . $firstName . ' ' . $lastName . '</a></li>' . PHP_EOL; } A: The original code is not so bad. It just is missing the meta_key parameter. Example: $theusers = get_users( array( 'role' => 'contributor', 'meta_key' => 'first_name', 'orderby' => 'meta_value', ) ); A: Here is my solution function split_names( $name ) { $names = explode( " ", trim( join( " ", $name ) ) ); $first_name = array_shift( $names ); $last_name = array_pop( $names ); $middle_name = join( " ", $names ); return array( "first_name" => $first_name, "middle_name" => $middle_name, "last_name" => $last_name ); } function sort_by_full_name( $arr1, $arr2 ) { $arr1 = split_names( $arr1 ); $arr2 = split_names( $arr2 ); $retval = strcoll( $arr1['first_name'], $arr2['first_name'] ); if ( ! $retval ) $retval = strcoll( $arr1['last_name'], $arr2['last_name'] ); if ( ! $retval ) $retval = strcoll( $arr1['middle_name'], $arr2['middle_name'] ); return $retval; } $users = get_users( array( 'role' => 'sm_flagar', 'orderby' => 'display_name', 'order' => 'ASC' ) ); $user_list = array(); foreach ( $users as $user ) { $firstName = get_user_meta( $user->ID, 'first_name', true ); $lastName = get_user_meta( $user->ID, 'last_name', true ); $user_list[] = split_names( array( "first_name" => $firstName, "last_name" => $lastName, "url" => $user->user_url ) ); } usort( $user_list, 'sort_by_full_name' ); setlocale( LC_COLLATE, $locale ); $locale = setlocale( LC_COLLATE, 'is_IS.utf8' ); foreach ( $user_list as $user ) { echo '<li><a href="' . $user["url"] . '">' . $user["first_name"] . ' ' . $user["middle_name"] $user["last_name"] . '</a></li>' . PHP_EOL; } A: Nowadays you can do something like this, as long as you're trying to sort via the default WP usermeta fields: $users = get_users(array( 'fields' => 'all_with_meta' // Add whatever arguments you need )); // Sort by first name, ascending usort($users, create_function('$a, $b', 'if($a->first_name == $b->first_name) { return 0;} return ($a->first_name > $b->first_name) ? 1 : -1;')); A: remove ',' (without quotes) after 'ASC'. It will do the trick. $users = get_users(array( 'role' => 'sm_flagar', 'orderby' => 'display_name', 'order' => 'ASC' )); foreach ($users as $user) { $firstName = get_user_meta($user->ID, 'first_name', true); $lastName = get_user_meta($user->ID, 'last_name', true); echo '<li><a href="' . $user->user_url . '">' . $firstName . ' ' . $lastName . '</a></li>' . PHP_EOL; } It is working as it is asked to be. If you echo out the display name of each user in the loop, then you will understand what is going on. replace the 'echo' line with: echo '<li><a href="' . $user->user_url . '">' . $firstName . ' ' . $lastName . '</a>' . $user->display_name . '</li>' . PHP_EOL; It is not ordering by first and last name but by "display name". A: To get all users ordered by first name, set the meta_key and orderby meta_value. $users = get_users( array( 'role' => 'director', 'meta_key' => 'first_name', 'orderby' => 'meta_value', 'order' => 'ASC' ) ); EDIT: This appeared to work and SHOULD work. I believe it will work in the next version. But for now, it does not work. The chosen answer here is the best option I have found until that time: Ordering users of a specific role by last name
wordpress
{ "language": "en", "length": 569, "provenance": "stackexchange_00019.jsonl.gz:413265", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29179" }
[ 0.0173187255859375, 0.005558013916015625, 0.01593017578125, -0.00766754150390625, -0.0023822784423828125, -0.011444091796875, 0.01329803466796875, -0.03521728515625, 0.041534423828125, 0.037322998046875, 0.01113128662109375, -0.027252197265625, 0.0014858245849609375, -0.0259552001953125, -0.056915283203125, -0.0187225341796875, 0.031280517578125, 0.00719451904296875, 0.0242919921875, -0.0037555694580078125, 0.0198211669921875, 0.00920867919921875, 0.01407623291015625, 0.026611328125, 0.00504302978515625, -0.01375579833984375, 0.05609130859375, -0.0458984375, 0.04315185546875, -0.0067138671875, 0.019378662109375, -0.04144287109375, -0.01052093505859375, 0.007358551025390625, 0.03790283203125, 0.001346588134765625, 0.044586181640625, -0.000446319580078125, 0.0467529296875, -0.0029010772705078125, 0.01763916015625, 0.00982666015625, -0.057342529296875, 0.05426025390625, -0.03582763671875, -0.1160888671875, 0.0665283203125, -0.007160186767578125, 0.0186309814453125, 0.005245208740234375, 0.0087127685546875, 0.01189422607421875, 0.00882720947265625, -0.004180908203125, -0.0010671615600585938, 0.01198577880859375, -0.00605010986328125, 0.0305328369140625, 0.01515960693359375, 0.00457000732421875, -0.0177459716796875, 0.04034423828125, 0.006771087646484375, -0.0179443359375, -0.016387939453125, -0.018463134765625, 0.01995849609375, 0.01373291015625, -0.00804901123046875, -0.01287078857421875, 0.0243072509765625, 0.0155181884765625, -0.00916290283203125, 0.0008254051208496094, -0.00539398193359375, -0.01369476318359375, 0.0013208389282226562, -0.01165771484375, 0.005214691162109375, 0.0306243896484375, -0.0721435546875, 0.00649261474609375, -0.073974609375, -0.021453857421875, -0.007587432861328125, 0.0015010833740234375, -0.049407958984375, 0.00708770751953125, -0.00287628173828125, -0.0267791748046875, -0.0126953125, -0.03607177734375, 0.0172576904296875, 0.0158843994140625, -0.0282135009765625, -0.01580810546875, 0.08349609375, 0.0986328125, -0.0197601318359375, -0.062042236328125, -0.0203094482421875, -0.01107025146484375, -0.07232666015625, -0.0013217926025390625, -0.00577545166015625, 0.00124359130859375, 0.01432037353515625, 0.013458251953125, 0.011871337890625, 0.019805908203125, -0.0184783935546875, -0.01430511474609375, -0.021270751953125, -0.028228759765625, 0.026611328125, 0.039520263671875, -0.05230712890625, 0.05169677734375, -0.00006705522537231445, 0.0246734619140625, 0.01141357421875, 0.05096435546875, -0.0299530029296875, -0.02734375, 0.0051422119140625, 0.0210418701171875, -0.0019483566284179688, -0.046966552734375, -0.0250396728515625, 0.01111602783203125, -0.04046630859375, 0.0243377685546875, 0.07275390625, 0.034149169921875, 0.0078582763671875, -0.0169525146484375, -0.0025806427001953125, -0.04376220703125, 0.0061798095703125, 0.0157623291015625, -0.016937255859375, -0.0204315185546875, 0.03863525390625, -0.0139617919921875, -0.00890350341796875, 0.032073974609375, 0.01329803466796875, -0.01202392578125, -0.009307861328125, -0.044097900390625, -0.020721435546875, -0.04058837890625, 0.0026302337646484375, 0.01519775390625, -0.0117645263671875, 0.0261077880859375, -0.01702880859375, 0.00360870361328125, -0.015380859375, 0.0177154541015625, 0.017120361328125, -0.00859832763671875, -0.012176513671875, -0.035125732421875, -0.057220458984375, 0.004070281982421875, -0.017303466796875, -0.0082244873046875, 0.0174102783203125, 0.0201568603515625, -0.00021791458129882812, 0.0188140869140625, 0.046356201171875, 0.0305633544921875, -0.008148193359375, 0.0163421630859375, -0.0019254684448242188, -0.0101165771484375, -0.00545501708984375, 0.0101470947265625, -0.034423828125, -0.0482177734375, -0.0244903564453125, -0.00933837890625, -0.05181884765625, 0.047637939453125, -0.0027217864990234375, 0.042388916015625, 0.01290130615234375, -0.007030487060546875, 0.0218505859375, 0.05157470703125, -0.02459716796875, 0.04913330078125, -0.00844573974609375, -0.07611083984375, 0.047332763671875, 0.005435943603515625, -0.0029392242431640625, -0.0081024169921875, 0.05364990234375, -0.0006356239318847656, 0.0177459716796875, -0.047760009765625, -0.0256805419921875, -0.0132293701171875, -0.004215240478515625, 0.0241546630859375, -0.0011444091796875, -0.0115203857421875, 0.02288818359375, -0.01050567626953125, -0.02197265625, -0.01090240478515625, -0.042877197265625, -0.0160675048828125, 0.0038604736328125, 0.00008660554885864258, -0.001674652099609375, 0.0028400421142578125, -0.020751953125, -0.0019779205322265625, -0.042236328125, 0.006984710693359375, 0.0125885009765625, -0.01357269287109375, -0.02862548828125, -0.037078857421875, -0.00591278076171875, -0.010986328125, -0.00792694091796875, 0.0369873046875, 0.00341796875, 0.0245208740234375, -0.0357666015625, -0.00724029541015625, -0.01238250732421875, -0.0305023193359375, 0.004238128662109375, 0.036163330078125, 0.01763916015625, 0.0225677490234375, 0.0251617431640625, 0.060882568359375, 0.07098388671875, 0.035003662109375, 0.027984619140625, 0.002613067626953125, 0.005584716796875, 0.036224365234375, -0.0219268798828125, 0.0345458984375, 0.03179931640625, 0.006282806396484375, 0.0083160400390625, 0.040924072265625, 0.005077362060546875, 0.0281829833984375, 0.0192718505859375, -0.0103302001953125, -0.0041046142578125, -0.04083251953125, -0.01300811767578125, -0.021759033203125, -0.0172119140625, -0.0168304443359375, -0.0157623291015625, -0.024627685546875, -0.0333251953125, -0.012725830078125, 0.041015625, 0.00618743896484375, -0.00577545166015625, 0.0228118896484375, -0.01068878173828125, -0.017791748046875, -0.01031494140625, -0.0042724609375, -0.04498291015625, -0.016998291015625, 0.03704833984375, 0.029815673828125, 0.02734375, 0.01522064208984375, 0.016815185546875, -0.006359100341796875, 0.03668212890625, 0.0877685546875, -0.0555419921875, -0.034210205078125, 0.01262664794921875, 0.022613525390625, -0.0286865234375, 0.0105438232421875, -0.0037555694580078125, -0.01110076904296875, 0.00510406494140625, -0.011505126953125, 0.003841400146484375, -0.01548004150390625, 0.020416259765625, 0.052642822265625, 0.00598907470703125, -0.00644683837890625, -0.0233612060546875, -0.01983642578125, -0.0274505615234375, 0.01441192626953125, -0.013458251953125, -0.06610107421875, 0.0160064697265625, 0.044586181640625, 0.046783447265625, 0.0828857421875, -0.00009357929229736328, -0.034820556640625, 0.01248931884765625, 0.048583984375, -0.0458984375, -0.09130859375, -0.0531005859375, -0.035491943359375, 0.0120086669921875, 0.00676727294921875, -0.004039764404296875, 0.0098724365234375, 0.0133514404296875, 0.0170135498046875, 0.0546875, -0.013946533203125, -0.0704345703125, -0.00424957275390625, -0.0626220703125, 0.031982421875, 0.0022716522216796875, -0.00034427642822265625, 0.019500732421875, -0.03594970703125, -0.0014314651489257812, -0.043182373046875, 0.01145172119140625, 0.032257080078125, -0.005340576171875, -0.003997802734375, 0.00952911376953125, -0.025238037109375, -0.0279693603515625, 0.0026397705078125, 0.042999267578125, 0.010406494140625, -0.017730712890625, 0.004398345947265625, -0.0210113525390625, -0.03216552734375, 0.03070068359375, 0.00537872314453125, -0.0008111000061035156, 0.02618408203125, 0.07659912109375, -0.0164947509765625, 0.001636505126953125, -0.006805419921875, -0.006134033203125, -0.0125732421875, -0.02191162109375, 0.004207611083984375, -0.01146697998046875, 0.030364990234375, -0.002452850341796875, 0.0012950897216796875, -0.028594970703125, 0.0144195556640625, -0.061767578125, 0.0100555419921875, 0.03753662109375, 0.048553466796875, 0.01343536376953125, -0.0172882080078125, 0.01788330078125, 0.0008072853088378906, 0.026336669921875, -0.0069122314453125, 0.033721923828125, -0.0213165283203125, -0.07305908203125, 0.0655517578125, -0.0138092041015625, -0.021270751953125, -0.0257720947265625, -0.0233917236328125, 0.0140228271484375, 0.08721923828125, 0.01299285888671875, -0.0306549072265625, -0.00276947021484375, 0.0211029052734375, -0.07135009765625, -0.013153076171875, -0.01806640625, 0.0175323486328125, -0.045562744140625, -0.006900787353515625, 0.004253387451171875, -0.0386962890625, -0.006561279296875, -0.01302337646484375, -0.02642822265625, -0.0283203125, 0.027496337890625, -0.0163421630859375, 0.006290435791015625, 0.00482940673828125, -0.00957489013671875, -0.01432037353515625, -0.01271820068359375, -0.01232147216796875, -0.07122802734375, -0.0182037353515625, -0.0198974609375, 0.05340576171875, 0.0098724365234375, 0.006366729736328125, -0.01061248779296875, 0.05828857421875, -0.03155517578125, -0.0008063316345214844, 0.0263214111328125, 0.04302978515625, 0.0174560546875, -0.02337646484375, -0.005878448486328125, -0.04119873046875, -0.028076171875, -0.04150390625, -0.0187835693359375, -0.01531982421875, -0.0176849365234375, 0.01439666748046875, -0.0158233642578125, 0.0015707015991210938, -0.01099395751953125, -0.0276336669921875, -0.0064849853515625, 0.03485107421875, -0.00482940673828125, -0.00490570068359375, -0.04486083984375, -0.0413818359375, -0.0074005126953125, -0.054168701171875, -0.01082611083984375, 0.022125244140625, 0.05145263671875, 0.022491455078125, 0.007183074951171875, -0.0165252685546875, -0.005954742431640625, 0.031402587890625, 0.0051727294921875, 0.0198822021484375, 0.0030364990234375, -0.0270843505859375, 0.038909912109375, -0.0034122467041015625, 0.030975341796875, 0.0266876220703125, 0.004299163818359375, -0.001865386962890625, -0.0479736328125, 0.042877197265625, 0.027008056640625, -0.07525634765625, 0.003879547119140625, 0.01470947265625, -0.0161590576171875, 0.0210418701171875, 0.0216522216796875, 0.014434814453125, -0.0149078369140625, -0.01296234130859375, -0.044281005859375, 0.0080413818359375, -0.043731689453125, 0.01364898681640625, -0.01000213623046875, 0.0074920654296875, -0.00860595703125, -0.0008802413940429688, -0.017547607421875, -0.0033283233642578125, -0.0192413330078125, -0.01371002197265625, 0.0105743408203125, -0.0284271240234375, -0.0196990966796875, 0.02386474609375, -0.0221710205078125, 0.12939453125, 0.0263519287109375, -0.01445770263671875, -0.0154876708984375, -0.02398681640625, 0.0200653076171875, -0.02972412109375, -0.00200653076171875, 0.0179443359375, 0.0159454345703125, 0.018768310546875, 0.015655517578125, -0.01104736328125, 0.02752685546875, -0.01168060302734375, 0.0545654296875, 0.0175323486328125, -0.0015621185302734375, -0.0147247314453125, 0.10614013671875, -0.00518798828125, 0.041900634765625, -0.02691650390625, 0.0193939208984375, 0.030242919921875, 0.007556915283203125, 0.0313720703125, 0.004901885986328125, -0.0176849365234375, -0.014495849609375, 0.008026123046875, -0.02398681640625, 0.0247344970703125, 0.00173187255859375, -0.01027679443359375, 0.0399169921875, 0.0003039836883544922, 0.02490234375, 0.01171112060546875, -0.0015811920166015625, 0.03570556640625, 0.00008487701416015625, -0.042327880859375, -0.0260467529296875, -0.027679443359375, 0.005706787109375, -0.0261077880859375, -0.01274871826171875, 0.02459716796875, 0.01134490966796875, 0.03515625, -0.036529541015625, 0.0017499923706054688, -0.01001739501953125, 0.003414154052734375, -0.01390838623046875, -0.0186767578125, 0.01058197021484375, 0.0132904052734375, -0.0004067420959472656, -0.02752685546875, -0.029510498046875, 0.05718994140625, 0.006313323974609375, 0.037811279296875, -0.0518798828125, 0.01678466796875, -0.07464599609375, -0.0025234222412109375, 0.045257568359375, 0.0209808349609375, -0.0517578125, 0.01556396484375, -0.034881591796875, -0.0017461776733398438, 0.03131103515625, -0.0224151611328125, -0.0260467529296875, -0.050262451171875, -0.0004794597625732422, 0.0224761962890625, -0.0097503662109375, -0.032684326171875, -0.0028934478759765625, -0.003429412841796875, -0.00878143310546875, -0.022003173828125, -0.0173797607421875, 0.0701904296875, -0.0146484375, 0.0251922607421875, -0.00266265869140625, 0.025238037109375, -0.016876220703125, 0.00494384765625, 0.01611328125, -0.00542449951171875, -0.0418701171875, -0.031982421875, -0.042724609375, -0.0179443359375, 0.055877685546875, -0.0146331787109375, 0.049163818359375, 0.00988006591796875, 0.01088714599609375, -0.0090484619140625, -0.07330322265625, -0.0019989013671875, 0.005870819091796875, 0.030975341796875, -0.0272369384765625, -0.033416748046875, -0.0021343231201171875, -0.05322265625, 0.047332763671875, 0.025238037109375, 0.0204925537109375, -0.005336761474609375, -0.043701171875, 0.016387939453125, 0.03948974609375, 0.0245819091796875, 0.03948974609375, 0.0010194778442382812, 0.04022216796875, 0.007534027099609375, 0.0202789306640625, 0.0078582763671875, -0.0020923614501953125, 0.055145263671875, -0.003055572509765625, -0.0110015869140625, 0.0206451416015625, -0.0227813720703125, 0.03729248046875, 0.02606201171875, 0.076904296875, -0.052337646484375, 0.0272369384765625, 0.0390625, -0.0174102783203125, 0.03167724609375, 0.00920867919921875, -0.0084381103515625, -0.0291290283203125, 0.065185546875, -0.06085205078125, -0.01342010498046875, 0.012542724609375, -0.042755126953125, -0.005840301513671875, -0.01441192626953125, 0.0087890625, -0.0029239654541015625, 0.0243072509765625, -0.053375244140625, -0.0218048095703125, -0.032379150390625, -0.033599853515625, 0.01389312744140625, -0.005931854248046875, -0.00955963134765625, -0.072265625, -0.01873779296875, 0.00366973876953125, -0.01837158203125, 0.04937744140625, -0.0265350341796875, 0.027618408203125, -0.0016450881958007812, -0.002361297607421875, 0.007843017578125, -0.0305633544921875, -0.06158447265625, 0.018890380859375, -0.031402587890625, -0.049560546875, -0.01280975341796875, 0.02520751953125, 0.004772186279296875, 0.013153076171875, -0.0279388427734375, -0.01261138916015625, -0.010711669921875, 0.07965087890625, -0.01430511474609375, -0.0311126708984375, 0.00666046142578125, 0.0638427734375, -0.00888824462890625, 0.019287109375, 0.01708984375, -0.053863525390625, -0.026519775390625, 0.03594970703125, -0.021240234375, -0.0088348388671875, 0.0299530029296875, -0.08050537109375, 0.034423828125, -0.01425933837890625, 0.05267333984375, -0.0166168212890625, -0.004245758056640625, 0.037506103515625, -0.01544189453125, -0.051971435546875, 0.045989990234375, -0.0062255859375, 0.07464599609375, -0.06488037109375, -0.013336181640625, 0.008575439453125, 0.026947021484375, 0.00514984130859375, 0.0104827880859375, -0.0626220703125, 0.0173187255859375, 0.042449951171875, 0.049591064453125, 0.0231781005859375, 0.042205810546875, -0.01277923583984375, 0.0005998611450195312, 0.01305389404296875, 0.006622314453125, 0.032440185546875, -0.00588226318359375, -0.051422119140625, 0.0140380859375, 0.01151275634765625, 0.0257568359375, -0.0237884521484375, -0.0218048095703125, -0.054840087890625, -0.0231781005859375, 0.044586181640625, 0.0018978118896484375, 0.01180267333984375, 0.036834716796875, 0.0234527587890625, 0.0013904571533203125, -0.05035400390625, -0.0007524490356445312, 0.032073974609375, 0.02337646484375, 0.023590087890625, 0.056304931640625, 0.030517578125, 0.004680633544921875, -0.0237884521484375, 0.015594482421875, -0.0169677734375, -0.0220947265625, 0.05535888671875, 0.030975341796875, 0.0236053466796875, -0.06683349609375, -0.043365478515625, 0.0914306640625, 0.1051025390625, -0.0399169921875, -0.01605224609375, 0.004894256591796875, -0.005645751953125, 0.026947021484375, -0.0090484619140625, 0.01100921630859375, 0.004627227783203125, 0.01265716552734375, -0.1060791015625, 0.012939453125, 0.047637939453125, 0.0209197998046875, -0.03485107421875, -0.043792724609375, -0.01557159423828125, -0.00853729248046875, -0.01454925537109375, 0.0116424560546875, 0.01062774658203125, -0.01361846923828125, -0.0190277099609375, 0.0301513671875, 0.015594482421875, 0.0190887451171875, -0.0216522216796875, 0.0110015869140625, -0.022979736328125, 0.0248870849609375, -0.036956787109375, -0.010406494140625, -0.031463623046875, 0.0273284912109375, 0.0182647705078125, 0.015533447265625, 0.0269012451171875, 0.0211944580078125, -0.02069091796875, 0.0079498291015625, 0.07940673828125, -0.013458251953125, -0.005889892578125, -0.00504302978515625, 0.0017070770263671875, 0.01416015625, -0.0066986083984375, -0.01067352294921875, 0.0443115234375, 0.03289794921875, -0.0338134765625, 0.059326171875, -0.01322174072265625, 0.0011548995971679688, 0.0307464599609375, -0.0014867782592773438, 0.06097412109375, -0.002292633056640625, -0.04901123046875, 0.01174163818359375, -0.05316162109375, -0.032440185546875, 0.0254058837890625, 0.03997802734375, 0.00814056396484375, 0.0109710693359375, -0.005645751953125, -0.060546875, 0.039031982421875, 0.017059326171875, 0.0255889892578125, 0.042724609375, -0.014434814453125, -0.026275634765625, -0.034271240234375, -0.0210113525390625, 0.019561767578125, -0.0020236968994140625, -0.021331787109375, 0.046234130859375, 0.006134033203125, -0.006626129150390625, -0.0780029296875, -0.0321044921875, -0.032135009765625, -0.0841064453125, 0.05792236328125, 0.00434112548828125, -0.048919677734375, 0.0127410888671875, -0.03240966796875, -0.00241851806640625, 0.042236328125, -0.027862548828125, 0.00003892183303833008, 0.002811431884765625, 0.01471710205078125, -0.0226898193359375, 0.004390716552734375, -0.0199737548828125, -0.0257568359375, -0.0028362274169921875, 0.007663726806640625, 0.023773193359375, 0.0667724609375, -0.00435638427734375, -0.002185821533203125, -0.0006618499755859375, -0.06884765625, 0.03045654296875, -0.0374755859375, 0.046142578125, 0.028656005859375, 0.0382080078125, -0.034759521484375, -0.0240478515625, -0.01181793212890625, -0.026458740234375, 0.0149993896484375, -0.0194549560546875, 0.004390716552734375, -0.0030384063720703125, 0.056915283203125, 0.04473876953125, 0.0482177734375, -0.004238128662109375, -0.003696441650390625, 0.05419921875, -0.035247802734375, -0.007904052734375, -0.0207366943359375, -0.0426025390625, -0.035369873046875, 0.00115203857421875, 0.014404296875, 0.0032634735107421875, -0.059783935546875, -0.0419921875, -0.0038127899169921875, -0.006191253662109375, -0.02301025390625, -0.01959228515625, -0.00960540771484375, -0.01197052001953125, -0.010955810546875, -0.03948974609375, -0.049713134765625, 0.01580810546875, 0.036895751953125, 0.00531005859375, 0.01058197021484375, -0.0264129638671875, -0.0089874267578125, 0.0054779052734375, 0.019683837890625, 0.0400390625, 0.0005879402160644531, 0.005443572998046875, 0.004436492919921875, 0.0006232261657714844, 0.047943115234375, -0.051910400390625, -0.0225982666015625, 0.007648468017578125, 0.007720947265625, -0.014923095703125, -0.0859375, -0.004878997802734375, -0.059112548828125, 0.0172882080078125, -0.0408935546875, 0.053131103515625, 0.05865478515625, -0.01287841796875, -0.03179931640625, 0.1195068359375, -0.0266571044921875, -0.006927490234375, -0.016815185546875, -0.0078887939453125, -0.01806640625, 0.04168701171875, 0.00003618001937866211, -0.030517578125, -0.035736083984375, 0.0089111328125, 0.004085540771484375, 0.013397216796875, 0.0207977294921875, 0.0176849365234375, -0.0455322265625, 0.00835418701171875, -0.00878143310546875, -0.0212860107421875, -0.025054931640625, 0.0186614990234375, 0.005062103271484375, 0.032867431640625, 0.0015659332275390625, -0.008209228515625, 0.023040771484375, -0.009185791015625, 0.00882720947265625, -0.038177490234375, -0.023834228515625, -0.0241546630859375, -0.02789306640625, 0.0305023193359375, -0.0026340484619140625, -0.01453399658203125, -0.0242919921875, -0.003986358642578125, -0.00528717041015625, -0.0268402099609375, 0.0217437744140625, -0.0828857421875, -0.037506103515625, -0.0025730133056640625, -0.05584716796875, 0.0298614501953125, -0.01201629638671875, -0.059661865234375, 0.036590576171875, -0.0005488395690917969, -0.01311492919921875, -0.0251007080078125, 0.044158935546875, 0.044525146484375, -0.0675048828125, -0.06744384765625, -0.0106048583984375, -0.01023101806640625, -0.03558349609375, -0.11199951171875, 0.023345947265625, -0.0146331787109375, 0.013031005859375, 0.01690673828125, 0.035125732421875, 0.0201568603515625, 0.0192718505859375, -0.040985107421875, -0.0039825439453125, 0.0304107666015625, -0.0140533447265625, 0.01239013671875, 0.0175628662109375, 0.0445556640625, 0.0113372802734375, 0.0211639404296875, -0.04974365234375, 0.04998779296875, -0.01654052734375, 0.0110626220703125, -0.00821685791015625, 0.02398681640625, 0.0576171875, -0.0201568603515625, 0.0097808837890625, 0.0033359527587890625, -0.0079345703125, 0.0160064697265625, -0.01045989990234375, 0.035888671875, -0.029449462890625, -0.0014667510986328125 ]
751cf414595147ad7c4ed12607ced36ebd8d82f0
Wordpress Stackexchange Q: Loop.php vs looping inside template file What is best practice for WP with regard to using loop.php (loop-single.php, etc) versus looping inside the template file? Does it matter with regard to efficiency or ? A: Depends on whether you would use that single-loop in more places. If you're only using it in one place and that will remain the case, do it within single.php, if you're going to be reusing it elsewhere, I'd highly suggest using a single-loop template part.
Q: Loop.php vs looping inside template file What is best practice for WP with regard to using loop.php (loop-single.php, etc) versus looping inside the template file? Does it matter with regard to efficiency or ? A: Depends on whether you would use that single-loop in more places. If you're only using it in one place and that will remain the case, do it within single.php, if you're going to be reusing it elsewhere, I'd highly suggest using a single-loop template part. A: No, it's just a Q of organizing your theme files. It's template vs. template part. Later will do some searching inside your parent & child theme and then include your template part, but that doesn't do much perfomanze decrease.
wordpress
{ "language": "en", "length": 121, "provenance": "stackexchange_00019.jsonl.gz:413270", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29191" }
[ 0.0400390625, -0.0350341796875, 0.0132904052734375, -0.02203369140625, -0.0085296630859375, -0.0172271728515625, 0.040985107421875, -0.0015954971313476562, 0.024169921875, 0.01922607421875, -0.0268707275390625, -0.0035762786865234375, -0.01739501953125, -0.00571441650390625, -0.0222625732421875, -0.020172119140625, 0.025665283203125, -0.0214080810546875, 0.022613525390625, 0.002941131591796875, 0.0274200439453125, 0.007720947265625, 0.0111236572265625, 0.0249786376953125, -0.01068878173828125, -0.05743408203125, 0.03546142578125, -0.031951904296875, -0.0224609375, -0.048675537109375, -0.01316070556640625, 0.0833740234375, 0.0262603759765625, 0.00506591796875, -0.019561767578125, -0.0175933837890625, -0.04541015625, 0.017822265625, 0.001956939697265625, 0.00321197509765625, 0.00939178466796875, -0.0081024169921875, 0.02117919921875, 0.00868988037109375, -0.003749847412109375, -0.034332275390625, 0.012420654296875, -0.05096435546875, 0.003322601318359375, -0.0018339157104492188, 0.04608154296875, -0.0291290283203125, 0.052764892578125, 0.0023403167724609375, -0.039306640625, -0.0113677978515625, 0.009613037109375, -0.031829833984375, 0.0237579345703125, -0.04345703125, -0.033721923828125, -0.0224151611328125, 0.05169677734375, 0.006683349609375, -0.00359344482421875, -0.0227508544921875, -0.0355224609375, 0.036163330078125, -0.0176239013671875, -0.01422882080078125, 0.00579833984375, -0.02166748046875, 0.0007314682006835938, -0.02740478515625, -0.0307159423828125, 0.0163421630859375, 0.00876617431640625, -0.0179901123046875, 0.014434814453125, -0.01015472412109375, -0.06854248046875, 0.0019931793212890625, -0.046600341796875, -0.065673828125, 0.00514984130859375, -0.0287322998046875, -0.03179931640625, 0.0160675048828125, -0.027008056640625, -0.03643798828125, -0.028289794921875, 0.0155029296875, 0.00707244873046875, -0.031951904296875, -0.05426025390625, -0.013641357421875, 0.00881195068359375, -0.0077056884765625, 0.006015777587890625, -0.00675201416015625, 0.0377197265625, -0.042877197265625, 0.002758026123046875, -0.004337310791015625, 0.0384521484375, 0.05535888671875, -0.006717681884765625, 0.031005859375, 0.0670166015625, 0.00791168212890625, 0.0166015625, 0.087890625, 0.0022678375244140625, -0.068115234375, -0.01178741455078125, 0.002910614013671875, -0.0158233642578125, 0.03759765625, 0.053314208984375, -0.0014123916625976562, 0.0079193115234375, 0.027099609375, 0.050262451171875, -0.00592803955078125, -0.049163818359375, -0.0030078887939453125, 0.0049591064453125, -0.0931396484375, -0.030303955078125, 0.04669189453125, 0.007701873779296875, -0.0222015380859375, 0.0159759521484375, 0.033905029296875, -0.0186767578125, -0.0226593017578125, -0.0189208984375, 0.035552978515625, 0.01319122314453125, -0.00640106201171875, -0.0092010498046875, -0.04010009765625, -0.0006279945373535156, -0.00102996826171875, 0.00664520263671875, 0.0460205078125, 0.01058197021484375, -0.0088653564453125, 0.0202789306640625, -0.053436279296875, 0.017486572265625, -0.0352783203125, -0.0236053466796875, -0.0015277862548828125, 0.0938720703125, -0.041290283203125, -0.0081939697265625, -0.006748199462890625, 0.06451416015625, 0.04193115234375, 0.001300811767578125, -0.01471710205078125, 0.004364013671875, -0.04833984375, -0.0595703125, 0.029632568359375, -0.0298919677734375, -0.00597381591796875, 0.01264190673828125, -0.00865936279296875, -0.01690673828125, -0.0259857177734375, -0.01556396484375, -0.0022430419921875, 0.001735687255859375, 0.039947509765625, -0.0285186767578125, -0.01629638671875, 0.03460693359375, 0.032379150390625, -0.01096343994140625, -0.039459228515625, 0.0238800048828125, 0.01354217529296875, -0.06976318359375, 0.0175933837890625, -0.0028533935546875, 0.043914794921875, 0.035858154296875, 0.006244659423828125, 0.039306640625, 0.004276275634765625, -0.011871337890625, 0.0626220703125, 0.01666259765625, -0.03582763671875, -0.039154052734375, -0.0020923614501953125, -0.017364501953125, -0.050537109375, -0.027862548828125, -0.0007190704345703125, 0.01528167724609375, 0.0121612548828125, -0.007251739501953125, 0.0019683837890625, -0.02093505859375, 0.0274505615234375, -0.0155487060546875, -0.0066070556640625, 0.00789642333984375, -0.027252197265625, 0.01385498046875, -0.033416748046875, -0.0266876220703125, 0.01084136962890625, 0.00238037109375, -0.00868988037109375, 0.0318603515625, -0.0157470703125, 0.060760498046875, 0.014495849609375, 0.03509521484375, 0.03289794921875, 0.0313720703125, 0.0023651123046875, -0.04388427734375, -0.0197906494140625, -0.04815673828125, 0.01654052734375, -0.0975341796875, 0.07177734375, -0.005130767822265625, 0.03253173828125, -0.0207977294921875, -0.00023865699768066406, -0.020294189453125, -0.00836181640625, -0.0167694091796875, 0.0284271240234375, 0.03179931640625, 0.01509857177734375, 0.005443572998046875, 0.045501708984375, 0.0157318115234375, -0.01023101806640625, 0.019561767578125, 0.0079345703125, -0.0127105712890625, -0.00885772705078125, -0.0084686279296875, -0.01403045654296875, 0.036285400390625, -0.0406494140625, -0.0245819091796875, 0.035491943359375, -0.0192718505859375, 0.0002658367156982422, -0.039794921875, 0.022369384765625, -0.00021409988403320312, -0.014068603515625, -0.0029087066650390625, -0.00980377197265625, 0.014434814453125, -0.00777435302734375, 0.0164642333984375, 0.013580322265625, -0.015289306640625, -0.01141357421875, 0.0128173828125, 0.00846099853515625, 0.00748443603515625, 0.01508331298828125, -0.06793212890625, 0.064208984375, -0.024871826171875, -0.0026874542236328125, 0.0170135498046875, 0.0032939910888671875, -0.0128173828125, -0.0010833740234375, -0.01019287109375, -0.0197296142578125, 0.0195770263671875, -0.03106689453125, 0.0044403076171875, -0.024627685546875, 0.0511474609375, 0.01336669921875, 0.0272064208984375, 0.006732940673828125, -0.0210418701171875, 0.04718017578125, 0.00024068355560302734, -0.044158935546875, 0.057525634765625, 0.0171356201171875, 0.0006117820739746094, -0.005870819091796875, 0.0292816162109375, 0.0286865234375, -0.01174163818359375, -0.01593017578125, 0.01062774658203125, -0.0009570121765136719, 0.06243896484375, -0.031768798828125, -0.0203857421875, -0.0005927085876464844, -0.0268402099609375, -0.01084136962890625, 0.0167083740234375, 0.09619140625, -0.0045318603515625, -0.0546875, 0.0367431640625, 0.03839111328125, -0.0323486328125, -0.078857421875, 0.0033855438232421875, -0.0732421875, 0.00319671630859375, -0.0211639404296875, -0.035369873046875, -0.01384735107421875, -0.0001862049102783203, 0.0099639892578125, 0.04278564453125, -0.0157012939453125, -0.0843505859375, -0.0469970703125, -0.09442138671875, -0.03143310546875, -0.01004791259765625, 0.01434326171875, 0.0021953582763671875, 0.0638427734375, 0.01549530029296875, -0.0379638671875, -0.016845703125, -0.022308349609375, -0.032196044921875, -0.01548004150390625, 0.0019350051879882812, -0.01004791259765625, -0.053009033203125, 0.0247650146484375, -0.0731201171875, -0.0209197998046875, 0.0083770751953125, -0.020721435546875, -0.01654052734375, -0.007457733154296875, 0.0232696533203125, -0.0019683837890625, -0.0006527900695800781, 0.00913238525390625, 0.0338134765625, -0.020294189453125, -0.047332763671875, 0.0232086181640625, -0.046905517578125, -0.011810302734375, 0.01271820068359375, -0.0113983154296875, -0.009033203125, 0.003910064697265625, -0.01910400390625, -0.01190948486328125, -0.07330322265625, -0.041473388671875, 0.07891845703125, 0.0284271240234375, 0.03668212890625, 0.045806884765625, 0.0159454345703125, -0.037109375, -0.00015974044799804688, -0.013916015625, -0.0291290283203125, -0.0139617919921875, -0.01233673095703125, -0.01824951171875, -0.0222625732421875, 0.037109375, -0.0007076263427734375, 0.0241851806640625, -0.033111572265625, -0.0263671875, -0.006134033203125, 0.06646728515625, -0.03289794921875, -0.0285186767578125, 0.002239227294921875, 0.0152740478515625, -0.0244140625, -0.005859375, -0.02886962890625, -0.01058197021484375, -0.01184844970703125, 0.0232086181640625, -0.0129241943359375, 0.02130126953125, -0.047393798828125, 0.034332275390625, -0.03546142578125, -0.02056884765625, 0.00560760498046875, -0.046234130859375, 0.031646728515625, -0.01898193359375, 0.022552490234375, -0.0249786376953125, 0.0254364013671875, -0.08642578125, -0.040374755859375, -0.00933074951171875, -0.03338623046875, 0.056121826171875, 0.0242156982421875, -0.0046844482421875, -0.00298309326171875, 0.024505615234375, -0.0276336669921875, 0.0246429443359375, 0.00311279296875, 0.025177001953125, -0.0015439987182617188, 0.041290283203125, 0.01390838623046875, 0.0035877227783203125, -0.04925537109375, -0.06890869140625, -0.034149169921875, 0.0078125, -0.0012664794921875, 0.03350830078125, -0.013641357421875, 0.02459716796875, -0.033172607421875, -0.00823211669921875, 0.00977325439453125, 0.0183258056640625, 0.0012865066528320312, 0.00743865966796875, -0.01136016845703125, -0.04052734375, 0.07745361328125, 0.0611572265625, -0.025543212890625, -0.0014200210571289062, 0.0753173828125, 0.0017900466918945312, -0.06951904296875, -0.11688232421875, 0.0160675048828125, 0.032012939453125, -0.022308349609375, 0.06256103515625, 0.043670654296875, -0.0090179443359375, 0.04510498046875, 0.00675201416015625, -0.002674102783203125, 0.00218963623046875, 0.042388916015625, 0.002262115478515625, -0.00720977783203125, 0.005462646484375, 0.0007557868957519531, 0.006351470947265625, 0.028656005859375, -0.00043010711669921875, -0.015838623046875, 0.0247955322265625, 0.043914794921875, -0.012451171875, -0.00788116455078125, -0.041046142578125, -0.041259765625, -0.00635528564453125, -0.0011463165283203125, 0.057403564453125, 0.01328277587890625, 0.0222320556640625, 0.035614013671875, 0.041900634765625, -0.0037441253662109375, 0.00787353515625, 0.012664794921875, 0.0115509033203125, 0.020965576171875, 0.0191497802734375, 0.003231048583984375, -0.032012939453125, -0.01148223876953125, 0.0299835205078125, 0.02850341796875, -0.0269317626953125, -0.008148193359375, 0.0058441162109375, 0.0276641845703125, -0.018585205078125, 0.07861328125, 0.0377197265625, -0.037139892578125, -0.01311492919921875, -0.007228851318359375, 0.0091552734375, -0.024383544921875, -0.032073974609375, -0.019317626953125, 0.014739990234375, -0.027801513671875, 0.006366729736328125, 0.00859832763671875, -0.009613037109375, -0.01047515869140625, -0.00963592529296875, 0.054473876953125, 0.047607421875, -0.034332275390625, 0.015533447265625, 0.03265380859375, 0.003200531005859375, -0.07733154296875, 0.00665283203125, -0.0347900390625, -0.00841522216796875, -0.0210113525390625, 0.039794921875, -0.032135009765625, -0.0301666259765625, 0.05828857421875, -0.00975799560546875, 0.0028743743896484375, 0.0513916015625, 0.046112060546875, -0.0303802490234375, -0.006237030029296875, 0.026947021484375, 0.028839111328125, -0.01303863525390625, 0.005428314208984375, -0.0022411346435546875, -0.0088043212890625, 0.00618743896484375, -0.032257080078125, -0.016143798828125, -0.0089111328125, 0.0000027418136596679688, -0.004955291748046875, -0.00109100341796875, -0.0142364501953125, -0.059783935546875, -0.01568603515625, -0.01454925537109375, -0.01318359375, 0.0350341796875, -0.01340484619140625, 0.0252838134765625, -0.01197052001953125, -0.0249786376953125, 0.0158843994140625, 0.00324249267578125, 0.06439208984375, 0.035614013671875, -0.084716796875, 0.0269622802734375, -0.0640869140625, 0.0018053054809570312, -0.046051025390625, -0.05853271484375, -0.061737060546875, -0.006023406982421875, -0.0009388923645019531, -0.0009589195251464844, 0.018096923828125, 0.0203094482421875, -0.0027523040771484375, 0.03240966796875, 0.00377655029296875, 0.0286102294921875, -0.00942230224609375, 0.04730224609375, -0.0006651878356933594, 0.0145111083984375, 0.0166473388671875, 0.022247314453125, -0.0035419464111328125, -0.01477813720703125, 0.0167999267578125, -0.0190277099609375, -0.018646240234375, -0.048248291015625, 0.0260009765625, -0.0033550262451171875, 0.0298004150390625, -0.01085662841796875, -0.0034656524658203125, -0.032257080078125, -0.0016756057739257812, -0.003177642822265625, 0.0455322265625, -0.023468017578125, -0.0307769775390625, 0.014556884765625, 0.02117919921875, -0.042327880859375, -0.0050201416015625, -0.061004638671875, -0.0122833251953125, 0.07196044921875, -0.029052734375, -0.034454345703125, -0.02789306640625, 0.040557861328125, 0.022552490234375, -0.031585693359375, 0.0210418701171875, 0.006866455078125, 0.017578125, 0.0258636474609375, 0.02691650390625, -0.02252197265625, -0.022918701171875, 0.043212890625, 0.002288818359375, -0.02093505859375, 0.0270538330078125, -0.0304412841796875, 0.00818634033203125, 0.0750732421875, 0.08038330078125, -0.0771484375, -0.01085662841796875, 0.0302276611328125, -0.0276336669921875, -0.00937652587890625, -0.02880859375, 0.0017232894897460938, -0.038665771484375, 0.1014404296875, 0.0174713134765625, -0.0081939697265625, 0.038665771484375, -0.026336669921875, 0.0031337738037109375, -0.04168701171875, 0.05694580078125, 0.0257568359375, -0.05450439453125, 0.019317626953125, 0.037811279296875, 0.00794219970703125, -0.024658203125, 0.01324462890625, -0.0338134765625, -0.0162353515625, -0.01325225830078125, 0.0021724700927734375, -0.0328369140625, 0.021453857421875, 0.0204925537109375, 0.0256195068359375, 0.0217437744140625, 0.06640625, -0.01052093505859375, 0.0226287841796875, 0.017242431640625, 0.018768310546875, -0.033294677734375, 0.00021135807037353516, 0.01378631591796875, -0.00530242919921875, -0.04937744140625, 0.006687164306640625, -0.05548095703125, 0.005046844482421875, -0.02227783203125, -0.0421142578125, 0.0418701171875, -0.0240631103515625, -0.00738525390625, 0.015655517578125, 0.020751953125, 0.004425048828125, -0.0197296142578125, 0.0299224853515625, -0.0491943359375, -0.029632568359375, 0.016021728515625, -0.0280303955078125, -0.00921630859375, -0.019195556640625, -0.0181121826171875, 0.0703125, -0.00659942626953125, -0.0086669921875, 0.01666259765625, 0.038848876953125, -0.0104827880859375, 0.04296875, -0.02252197265625, 0.0004811286926269531, 0.00909423828125, 0.02923583984375, 0.01178741455078125, 0.01059722900390625, 0.0010976791381835938, -0.0007948875427246094, 0.0118255615234375, -0.00659942626953125, -0.0107421875, 0.0167999267578125, 0.06549072265625, 0.040435791015625, 0.0252685546875, 0.007740020751953125, 0.00955963134765625, 0.0271453857421875, 0.00861358642578125, -0.01187896728515625, 0.0283203125, -0.005092620849609375, -0.0168609619140625, 0.046875, 0.0286712646484375, 0.0146026611328125, -0.00731658935546875, 0.01666259765625, -0.0831298828125, 0.01560211181640625, 0.054351806640625, 0.04705810546875, -0.0279693603515625, 0.040008544921875, -0.053192138671875, 0.00446319580078125, -0.01259613037109375, -0.0226898193359375, 0.0188140869140625, -0.0307464599609375, 0.0185699462890625, 0.00624847412109375, -0.00461578369140625, 0.04290771484375, 0.001163482666015625, -0.00023567676544189453, 0.02825927734375, -0.0015125274658203125, -0.0193328857421875, 0.0094451904296875, 0.02313232421875, -0.00971221923828125, 0.0303497314453125, 0.006076812744140625, -0.026092529296875, -0.00838470458984375, -0.016693115234375, 0.0016450881958007812, -0.0011472702026367188, -0.00786590576171875, -0.036773681640625, -0.00908660888671875, 0.006946563720703125, 0.041473388671875, -0.042449951171875, -0.016143798828125, 0.026885986328125, -0.0009312629699707031, -0.0030002593994140625, -0.002285003662109375, 0.006023406982421875, -0.0191192626953125, -0.03125, 0.016845703125, 0.02392578125, 0.05859375, -0.001605987548828125, 0.04473876953125, -0.03973388671875, -0.0170440673828125, -0.01265716552734375, 0.0297088623046875, -0.0099334716796875, 0.0157318115234375, -0.0657958984375, -0.06011962890625, 0.0106658935546875, 0.062042236328125, 0.050201416015625, 0.036712646484375, 0.039642333984375, 0.0077667236328125, -0.00732421875, 0.0129241943359375, 0.0013799667358398438, -0.015777587890625, -0.0013828277587890625, -0.019775390625, -0.0262298583984375, 0.0028438568115234375, -0.0281219482421875, 0.009796142578125, -0.0095367431640625, 0.045989990234375, 0.0012636184692382812, 0.030670166015625, 0.0051116943359375, -0.025054931640625, 0.02716064453125, -0.0386962890625, 0.087158203125, 0.0303497314453125, -0.01071929931640625, 0.003559112548828125, 0.03753662109375, -0.05908203125, -0.01512908935546875, 0.037445068359375, -0.0140533447265625, 0.0085601806640625, 0.017242431640625, 0.028167724609375, 0.0068206787109375, -0.0221099853515625, -0.0019311904907226562, -0.0516357421875, 0.031951904296875, -0.00545501708984375, -0.07476806640625, -0.0421142578125, -0.0509033203125, 0.054962158203125, 0.0213623046875, 0.057525634765625, -0.00827789306640625, 0.046844482421875, 0.051544189453125, -0.009918212890625, 0.0174407958984375, 0.026275634765625, 0.026214599609375, -0.031280517578125, -0.0165863037109375, -0.017791748046875, -0.05621337890625, -0.00006592273712158203, 0.045135498046875, -0.0274810791015625, -0.00567626953125, 0.0179443359375, 0.0201873779296875, -0.0250244140625, 0.0399169921875, -0.00797271728515625, -0.045013427734375, 0.01174163818359375, 0.036468505859375, 0.011322021484375, 0.03741455078125, -0.019927978515625, 0.0071258544921875, -0.052886962890625, -0.030120849609375, -0.0114593505859375, 0.00077056884765625, -0.045654296875, 0.004383087158203125, -0.026519775390625, -0.03955078125, -0.0179443359375, -0.03692626953125, 0.012939453125, -0.0178375244140625, 0.04931640625, -0.006450653076171875, -0.0220947265625, 0.01471710205078125, 0.0280609130859375, 0.033966064453125, -0.0021152496337890625, -0.0013036727905273438, 0.0160369873046875, -0.01092529296875, 0.01499176025390625, 0.027740478515625, -0.0031909942626953125, -0.0049896240234375, -0.0084228515625, 0.01007843017578125, -0.0243377685546875, -0.01537322998046875, -0.051605224609375, -0.0478515625, 0.037078857421875, -0.01541900634765625, 0.036865234375, -0.048858642578125, -0.0310211181640625, -0.0180816650390625, -0.007511138916015625, -0.0017757415771484375, -0.005924224853515625, 0.0289764404296875, -0.0310516357421875, -0.0152130126953125, -0.0250091552734375, 0.0221710205078125, -0.00403594970703125, 0.024658203125, 0.0206451416015625, -0.0279693603515625, 0.032470703125, 0.0284576416015625, 0.0236053466796875, 0.0721435546875, 0.010101318359375, -0.0250091552734375, 0.024871826171875, -0.01409149169921875, -0.007389068603515625, -0.022003173828125, -0.007720947265625, -0.006992340087890625, 0.0029621124267578125, -0.0216064453125, 0.0261993408203125, 0.03155517578125, -0.039581298828125, -0.07049560546875, 0.0882568359375, -0.0380859375, -0.0301666259765625, -0.06927490234375, -0.0038318634033203125, 0.022491455078125, -0.034088134765625, -0.046142578125, -0.00518798828125, -0.037689208984375, 0.0518798828125, 0.036163330078125, 0.01702880859375, 0.046356201171875, 0.019073486328125, 0.011505126953125, 0.035125732421875, 0.02264404296875, -0.001102447509765625, -0.0110931396484375, -0.007709503173828125, 0.01580810546875, 0.0232086181640625, -0.047149658203125, -0.00972747802734375, 0.002544403076171875, 0.044647216796875, -0.01953125, 0.0021839141845703125, -0.049407958984375, 0.005962371826171875, 0.06182861328125, 0.08355712890625, 0.020111083984375, -0.0416259765625, 0.01422882080078125, -0.03875732421875, -0.02325439453125, 0.016876220703125, 0.01152801513671875, -0.03955078125, 0.0166168212890625, 0.030792236328125, -0.0181121826171875, -0.0012865066528320312, 0.005702972412109375, -0.0307159423828125, 0.00392913818359375, 0.004337310791015625, -0.023590087890625, -0.0364990234375, -0.010345458984375, 0.022705078125, -0.0150604248046875, 0.009979248046875, -0.01428985595703125, 0.0201263427734375, 0.005130767822265625, -0.000048279762268066406, 0.04180908203125, 0.04779052734375, -0.07257080078125, -0.019775390625, 0.0279541015625, 0.0279083251953125, -0.0183258056640625, -0.046722412109375, 0.00830078125, 0.0242767333984375, 0.008941650390625, 0.0250244140625, -0.054107666015625, 0.07763671875, 0.0026149749755859375, 0.0362548828125, -0.006420135498046875, 0.07635498046875, -0.0149078369140625, 0.057464599609375, -0.005474090576171875, -0.01361846923828125, 0.015167236328125, -0.00006347894668579102, -0.006671905517578125, -0.0008420944213867188, -0.0221710205078125, -0.040374755859375, 0.02294921875, -0.046630859375, -0.010101318359375, 0.0205230712890625 ]
10758b1a657b5d78ce91a090180ff57b0cc4e3a2
Wordpress Stackexchange Q: How to perform unit testing on proposed patches in Trac? I was looking for some insight and good resources on how to correctly perform unit testing on proposed WordPress patches in the Trac and how to accurately report the results from the testing. I'm new to this and have read through the resources located in this WPSE question. I myself would really like to learn how to do this and do so with a real-world bug, like this Trac ticket #5809. I guess after reading through the resources in the previously mentioned WPSE question my short coming is that I do not understand how I would setup the proposed testing for the proposed patch. Update: I'm still searching for resources and currently watching this video on WordPress unit-testing. A: I really found this presentation from WCSF to be extremely helpful. http://wordpress.tv/2011/08/20/nikolay-bachiyski-unit-testing-will-change-your-life/
Q: How to perform unit testing on proposed patches in Trac? I was looking for some insight and good resources on how to correctly perform unit testing on proposed WordPress patches in the Trac and how to accurately report the results from the testing. I'm new to this and have read through the resources located in this WPSE question. I myself would really like to learn how to do this and do so with a real-world bug, like this Trac ticket #5809. I guess after reading through the resources in the previously mentioned WPSE question my short coming is that I do not understand how I would setup the proposed testing for the proposed patch. Update: I'm still searching for resources and currently watching this video on WordPress unit-testing. A: I really found this presentation from WCSF to be extremely helpful. http://wordpress.tv/2011/08/20/nikolay-bachiyski-unit-testing-will-change-your-life/
wordpress
{ "language": "en", "length": 142, "provenance": "stackexchange_00019.jsonl.gz:413271", "question_score": "32", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29197" }
[ 0.01103973388671875, -0.0033092498779296875, -0.0260467529296875, -0.0236358642578125, -0.015411376953125, -0.031951904296875, -0.0083160400390625, -0.004360198974609375, -0.01361846923828125, -0.00939178466796875, -0.056854248046875, 0.032379150390625, -0.0360107421875, -0.01535797119140625, 0.0284423828125, -0.040252685546875, 0.0198211669921875, 0.003963470458984375, 0.0267181396484375, -0.005390167236328125, -0.005008697509765625, 0.004085540771484375, 0.03961181640625, 0.0203704833984375, -0.0045318603515625, -0.035797119140625, 0.079345703125, -0.00649261474609375, 0.0137176513671875, -0.010894775390625, 0.01348876953125, -0.0018129348754882812, 0.0256195068359375, 0.03253173828125, -0.06689453125, -0.0521240234375, -0.0040283203125, 0.00705718994140625, -0.035125732421875, 0.04656982421875, 0.01375579833984375, -0.0025157928466796875, 0.01959228515625, 0.00206756591796875, 0.0036716461181640625, -0.04931640625, 0.025421142578125, -0.044403076171875, 0.00894927978515625, -0.0192108154296875, -0.0112457275390625, 0.0382080078125, 0.019775390625, 0.0135650634765625, -0.00923919677734375, 0.002727508544921875, 0.0246429443359375, 0.004024505615234375, -0.0017900466918945312, 0.01494598388671875, -0.00927734375, 0.048553466796875, 0.0038909912109375, -0.00963592529296875, 0.011749267578125, -0.0296630859375, -0.0261077880859375, 0.014678955078125, -0.0090789794921875, 0.0009598731994628906, 0.0169677734375, 0.017333984375, -0.0550537109375, 0.015655517578125, -0.033538818359375, -0.036102294921875, 0.09600830078125, -0.035552978515625, -0.0526123046875, 0.06829833984375, 0.028167724609375, 0.0004949569702148438, -0.0267181396484375, -0.001705169677734375, 0.033905029296875, 0.041534423828125, -0.0021419525146484375, -0.024658203125, -0.0643310546875, -0.05718994140625, -0.0306854248046875, -0.056640625, -0.097900390625, 0.00952911376953125, -0.0051422119140625, -0.0156707763671875, 0.03656005859375, 0.0003464221954345703, 0.022552490234375, -0.0270538330078125, 0.06298828125, -0.07757568359375, 0.0132598876953125, 0.005458831787109375, 0.0161895751953125, 0.0038928985595703125, -0.005474090576171875, 0.032867431640625, 0.06951904296875, 0.010467529296875, -0.01152801513671875, 0.036468505859375, -0.00666046142578125, -0.054595947265625, -0.0010919570922851562, 0.0251007080078125, 0.001209259033203125, 0.0095367431640625, 0.007511138916015625, -0.024322509765625, 0.007038116455078125, -0.0179290771484375, 0.034393310546875, 0.0006084442138671875, 0.040863037109375, 0.01690673828125, -0.042327880859375, 0.004383087158203125, 0.0266571044921875, 0.0006084442138671875, -0.019195556640625, -0.0000426173210144043, 0.04412841796875, 0.0274810791015625, 0.008697509765625, -0.006175994873046875, 0.0198974609375, 0.0246429443359375, 0.006237030029296875, 0.012481689453125, -0.042144775390625, -0.0247039794921875, 0.01861572265625, -0.030426025390625, -0.029144287109375, 0.020538330078125, -0.00007796287536621094, 0.013397216796875, 0.0167083740234375, -0.0506591796875, 0.0040740966796875, -0.044189453125, -0.00013566017150878906, -0.012725830078125, 0.030548095703125, -0.0343017578125, -0.0259552001953125, -0.011016845703125, 0.042724609375, 0.0013017654418945312, -0.0014829635620117188, 0.004520416259765625, 0.0287322998046875, 0.005279541015625, 0.0011587142944335938, 0.004421234130859375, -0.00038361549377441406, 0.002544403076171875, 0.036895751953125, 0.050628662109375, -0.01727294921875, -0.0479736328125, 0.048187255859375, 0.03228759765625, -0.029632568359375, 0.0478515625, 0.0572509765625, 0.00667572021484375, 0.0178375244140625, -0.0014410018920898438, -0.0254058837890625, -0.023101806640625, 0.1141357421875, -0.07177734375, 0.02044677734375, -0.06146240234375, 0.043426513671875, 0.0252685546875, -0.00417327880859375, 0.0361328125, 0.0030689239501953125, 0.01226806640625, 0.00577545166015625, -0.00872039794921875, 0.0185089111328125, 0.011566162109375, -0.0675048828125, 0.00699615478515625, -0.0188446044921875, -0.0372314453125, -0.050140380859375, 0.030029296875, -0.0173187255859375, 0.0255279541015625, 0.015716552734375, 0.0157470703125, -0.00732421875, 0.0284576416015625, -0.0026798248291015625, 0.01708984375, 0.01335906982421875, -0.020416259765625, 0.01727294921875, -0.03143310546875, -0.01517486572265625, -0.01503753662109375, -0.0213775634765625, -0.0360107421875, -0.0211029052734375, -0.0160369873046875, -0.0185394287109375, 0.0141448974609375, -0.0211944580078125, 0.0309906005859375, -0.0045318603515625, 0.0113525390625, 0.007274627685546875, 0.0207366943359375, 0.035858154296875, 0.0300140380859375, 0.054962158203125, -0.055572509765625, 0.05914306640625, 0.0280303955078125, -0.007724761962890625, -0.004547119140625, 0.01068115234375, -0.11102294921875, 0.0035228729248046875, 0.062042236328125, 0.015777587890625, 0.03076171875, -0.0277557373046875, -0.01947021484375, 0.08489990234375, 0.003803253173828125, 0.00007271766662597656, -0.0167236328125, 0.0290679931640625, 0.060791015625, 0.005458831787109375, -0.0156707763671875, 0.00594329833984375, -0.0182647705078125, 0.010772705078125, 0.0200347900390625, -0.01386260986328125, -0.014984130859375, -0.0163421630859375, 0.00897979736328125, -0.00115203857421875, -0.05999755859375, -0.01155853271484375, -0.0307769775390625, 0.04547119140625, -0.0240020751953125, 0.02728271484375, 0.0200958251953125, -0.012603759765625, 0.004638671875, 0.0254974365234375, -0.036102294921875, 0.03228759765625, 0.06121826171875, 0.0015201568603515625, 0.0361328125, -0.0180816650390625, -0.04736328125, 0.07470703125, 0.0311737060546875, -0.004062652587890625, 0.05731201171875, 0.0006809234619140625, -0.02288818359375, -0.00722503662109375, -0.0171966552734375, -0.01036834716796875, -0.0413818359375, 0.01102447509765625, -0.0256500244140625, 0.0087890625, 0.035797119140625, -0.0089263916015625, 0.041748046875, 0.016021728515625, -0.0306854248046875, 0.0006413459777832031, 0.00980377197265625, 0.007488250732421875, -0.010345458984375, 0.003299713134765625, 0.04473876953125, 0.006114959716796875, -0.0181884765625, 0.002162933349609375, -0.0210113525390625, 0.00835418701171875, 0.004428863525390625, -0.01113128662109375, -0.009429931640625, -0.040802001953125, 0.011505126953125, 0.0248565673828125, 0.05914306640625, -0.015960693359375, -0.027557373046875, -0.01454925537109375, 0.0274200439453125, 0.00269317626953125, -0.006404876708984375, 0.0011997222900390625, -0.01360321044921875, -0.017425537109375, 0.0011568069458007812, -0.0164642333984375, -0.01261138916015625, 0.01447296142578125, -0.01324462890625, -0.0299835205078125, -0.0208587646484375, -0.032318115234375, -0.05792236328125, -0.046112060546875, -0.0027217864990234375, 0.003528594970703125, 0.010986328125, 0.00226593017578125, 0.0137481689453125, -0.0036830902099609375, -0.0257415771484375, 0.0196075439453125, 0.041900634765625, 0.0094451904296875, -0.013580322265625, 0.004364013671875, 0.038238525390625, -0.0264129638671875, 0.01348114013671875, -0.00974273681640625, 0.044219970703125, -0.056182861328125, -0.01503753662109375, 0.0210113525390625, -0.0185546875, 0.032623291015625, -0.005123138427734375, -0.045379638671875, -0.0209503173828125, 0.013092041015625, -0.068603515625, 0.0249176025390625, 0.04754638671875, 0.0257110595703125, -0.048309326171875, -0.03466796875, -0.035614013671875, 0.01953125, -0.0257415771484375, 0.0015077590942382812, 0.0154571533203125, 0.06268310546875, -0.007518768310546875, -0.0179443359375, -0.0305633544921875, -0.047515869140625, -0.04339599609375, 0.01369476318359375, 0.0014791488647460938, -0.031280517578125, -0.01629638671875, 0.026153564453125, -0.044525146484375, 0.053009033203125, -0.08563232421875, 0.00673675537109375, 0.0252838134765625, -0.0009794235229492188, 0.06866455078125, -0.047271728515625, -0.03472900390625, -0.041778564453125, 0.072509765625, -0.025543212890625, -0.03759765625, -0.0176239013671875, 0.01007843017578125, -0.055938720703125, -0.024932861328125, -0.0064544677734375, 0.0019273757934570312, -0.0287017822265625, -0.01617431640625, -0.04107666015625, -0.00824737548828125, 0.00004798173904418945, -0.041107177734375, -0.0013637542724609375, -0.058624267578125, 0.021148681640625, -0.04779052734375, 0.0210418701171875, -0.0149383544921875, -0.004268646240234375, -0.03302001953125, -0.00785064697265625, -0.049530029296875, -0.080810546875, -0.02508544921875, -0.0550537109375, 0.1004638671875, 0.0335693359375, -0.0084686279296875, -0.004795074462890625, 0.0679931640625, 0.0185546875, 0.01287078857421875, 0.006473541259765625, -0.018218994140625, 0.01302337646484375, 0.010009765625, 0.0096893310546875, -0.01136016845703125, 0.0172271728515625, -0.002933502197265625, -0.06903076171875, 0.02618408203125, -0.0140533447265625, 0.03955078125, 0.0245513916015625, -0.033935546875, 0.0025882720947265625, -0.039306640625, -0.02349853515625, 0.003936767578125, -0.03106689453125, 0.01776123046875, -0.031402587890625, 0.00727081298828125, 0.006206512451171875, 0.013885498046875, -0.0177001953125, 0.0103607177734375, 0.0036773681640625, 0.018585205078125, -0.024810791015625, -0.03973388671875, -0.0191650390625, 0.00933837890625, 0.00001424551010131836, -0.030120849609375, -0.061737060546875, -0.016815185546875, 0.025665283203125, -0.0399169921875, 0.01605224609375, -0.033477783203125, 0.0266265869140625, 0.02197265625, 0.0223388671875, -0.02203369140625, 0.01303863525390625, 0.0290374755859375, -0.0311431884765625, -0.004360198974609375, -0.0029201507568359375, 0.0291290283203125, -0.01044464111328125, -0.041656494140625, 0.06256103515625, 0.04827880859375, -0.023223876953125, -0.001041412353515625, -0.0290679931640625, 0.00322723388671875, 0.02716064453125, -0.00858306884765625, -0.0133514404296875, 0.007068634033203125, -0.01523590087890625, 0.01380157470703125, 0.0307464599609375, 0.0128326416015625, 0.01432037353515625, 0.02398681640625, -0.017120361328125, -0.0240936279296875, -0.007656097412109375, 0.025909423828125, -0.01568603515625, -0.0667724609375, 0.0238800048828125, -0.0155181884765625, 0.020416259765625, 0.042724609375, 0.0223846435546875, 0.040863037109375, -0.01983642578125, -0.03082275390625, -0.01397705078125, -0.01470947265625, -0.000789642333984375, -0.0533447265625, -0.0144500732421875, 0.00667572021484375, -0.01251220703125, 0.0709228515625, 0.008056640625, -0.03179931640625, 0.05023193359375, -0.0126800537109375, 0.047271728515625, 0.05865478515625, -0.002201080322265625, 0.02984619140625, 0.0018968582153320312, -0.0333251953125, -0.032989501953125, -0.017608642578125, -0.0206451416015625, -0.0191192626953125, 0.031890869140625, 0.0227508544921875, -0.01149749755859375, -0.01149749755859375, 0.0011882781982421875, -0.0025177001953125, 0.00775909423828125, -0.03424072265625, -0.052093505859375, -0.00921630859375, -0.005893707275390625, 0.044677734375, 0.028900146484375, -0.005695343017578125, 0.006053924560546875, 0.0159759521484375, -0.006103515625, 0.0285797119140625, 0.01253509521484375, 0.0010738372802734375, -0.021392822265625, -0.00797271728515625, -0.019989013671875, -0.05450439453125, -0.00698089599609375, 0.018310546875, 0.047119140625, -0.0277099609375, -0.032867431640625, 0.0126953125, -0.01206207275390625, -0.0260467529296875, 0.00025534629821777344, -0.01702880859375, -0.0291290283203125, -0.00437164306640625, 0.05352783203125, 0.034393310546875, -0.036834716796875, -0.01007843017578125, -0.0291900634765625, -0.0419921875, -0.0447998046875, -0.025848388671875, -0.0797119140625, 0.017364501953125, -0.007015228271484375, 0.023345947265625, -0.002323150634765625, -0.0181121826171875, -0.0243377685546875, -0.0216522216796875, -0.0029048919677734375, -0.02008056640625, 0.033538818359375, 0.054779052734375, -0.0648193359375, 0.08245849609375, 0.028228759765625, 0.040985107421875, -0.0150299072265625, -0.04815673828125, 0.0200042724609375, 0.031219482421875, -0.0386962890625, -0.03253173828125, -0.006580352783203125, -0.0059814453125, 0.0802001953125, -0.0240936279296875, -0.03619384765625, -0.00304412841796875, 0.014739990234375, -0.020111083984375, 0.0736083984375, 0.0126190185546875, -0.0421142578125, 0.019500732421875, 0.0033893585205078125, -0.024169921875, -0.0171661376953125, -0.018707275390625, -0.0374755859375, 0.0288543701171875, -0.05206298828125, 0.00559234619140625, -0.0214385986328125, 0.068359375, 0.0682373046875, -0.00974273681640625, 0.03546142578125, 0.0273284912109375, -0.0165557861328125, -0.0190887451171875, 0.0440673828125, 0.005157470703125, -0.0325927734375, 0.031097412109375, 0.00005537271499633789, -0.01432037353515625, -0.01377105712890625, -0.0120086669921875, -0.003917694091796875, -0.01433563232421875, 0.0182342529296875, -0.0218353271484375, 0.01326751708984375, -0.0092010498046875, 0.0044097900390625, 0.0181732177734375, 0.003772735595703125, -0.014312744140625, 0.01203155517578125, 0.006984710693359375, -0.02642822265625, -0.031829833984375, -0.0011510848999023438, -0.0004353523254394531, 0.0025482177734375, -0.00815582275390625, 0.04364013671875, 0.0230865478515625, -0.10809326171875, 0.0594482421875, 0.07135009765625, 0.015228271484375, 0.0218658447265625, 0.0227813720703125, 0.0017137527465820312, -0.0264434814453125, -0.0227203369140625, 0.0129852294921875, -0.026153564453125, -0.038482666015625, -0.0011758804321289062, -0.0142059326171875, 0.043914794921875, 0.03497314453125, -0.0023956298828125, -0.034637451171875, 0.01438140869140625, -0.01238250732421875, -0.034271240234375, -0.01129150390625, 0.03778076171875, 0.015655517578125, -0.046112060546875, 0.03753662109375, -0.047607421875, -0.0221099853515625, -0.0165863037109375, 0.01180267333984375, 0.0938720703125, -0.0211944580078125, -0.0275115966796875, 0.0195159912109375, 0.02398681640625, 0.0020160675048828125, -0.004608154296875, -0.00151824951171875, -0.030426025390625, -0.0181884765625, -0.0089263916015625, -0.028045654296875, 0.019073486328125, 0.002658843994140625, -0.04705810546875, 0.037628173828125, 0.01366424560546875, -0.005176544189453125, -0.0201568603515625, 0.0191192626953125, -0.007965087890625, -0.0131988525390625, -0.027984619140625, 0.06732177734375, -0.03228759765625, 0.03021240234375, -0.057464599609375, -0.002300262451171875, 0.0149993896484375, 0.01605224609375, -0.035400390625, -0.0071258544921875, -0.043304443359375, 0.00423431396484375, 0.048095703125, 0.00945281982421875, 0.03265380859375, 0.060699462890625, -0.01177215576171875, -0.02056884765625, 0.0240631103515625, 0.0219268798828125, 0.04498291015625, -0.0198822021484375, -0.04107666015625, 0.00626373291015625, 0.01456451416015625, 0.009033203125, 0.004039764404296875, 0.035888671875, 0.02947998046875, -0.0175933837890625, -0.01129150390625, 0.016845703125, -0.023162841796875, 0.033599853515625, -0.0252685546875, -0.018341064453125, 0.01531982421875, -0.034210205078125, 0.0240631103515625, -0.037933349609375, 0.043914794921875, 0.061187744140625, 0.04547119140625, -0.0382080078125, 0.0322265625, 0.039276123046875, 0.01007843017578125, -0.044647216796875, -0.036895751953125, 0.01311492919921875, 0.0003390312194824219, -0.0004930496215820312, 0.064208984375, 0.07550048828125, -0.027618408203125, -0.0212860107421875, -0.05377197265625, 0.00311279296875, 0.00783538818359375, 0.021453857421875, 0.005001068115234375, 0.01441192626953125, -0.062286376953125, 0.0035991668701171875, 0.0277099609375, -0.02435302734375, -0.0131988525390625, -0.022613525390625, 0.0219573974609375, 0.032135009765625, 0.0477294921875, 0.016143798828125, -0.006011962890625, -0.0212554931640625, 0.010345458984375, 0.056854248046875, 0.022125244140625, 0.04058837890625, -0.01450347900390625, -0.0241546630859375, 0.0306854248046875, -0.04840087890625, -0.0028667449951171875, -0.06463623046875, 0.017730712890625, -0.0284423828125, 0.019866943359375, 0.03961181640625, 0.0002791881561279297, -0.03375244140625, -0.0281829833984375, 0.00885009765625, -0.0224609375, -0.0146636962890625, 0.041656494140625, -0.007129669189453125, -0.0273895263671875, 0.0066070556640625, -0.0017099380493164062, 0.01617431640625, 0.000682830810546875, -0.02520751953125, 0.058349609375, 0.005218505859375, 0.00942230224609375, 0.04425048828125, 0.01019287109375, -0.00882720947265625, 0.0172576904296875, 0.010589599609375, 0.060882568359375, 0.03240966796875, -0.0174713134765625, -0.01678466796875, 0.0263671875, 0.00970458984375, -0.01311492919921875, 0.0234375, 0.021820068359375, 0.01548004150390625, -0.0171356201171875, -0.006908416748046875, 0.0243072509765625, -0.0279541015625, 0.02978515625, 0.035247802734375, -0.006069183349609375, 0.01380157470703125, -0.071533203125, -0.047027587890625, -0.0699462890625, 0.0621337890625, -0.0209808349609375, 0.1380615234375, -0.052703857421875, 0.03253173828125, -0.04766845703125, 0.01250457763671875, -0.0227813720703125, -0.03961181640625, -0.0004756450653076172, 0.0478515625, 0.0301666259765625, 0.004329681396484375, 0.0106353759765625, -0.0014009475708007812, 0.0202789306640625, -0.038360595703125, -0.012847900390625, -0.0149078369140625, 0.0230560302734375, -0.01201629638671875, -0.00792694091796875, -0.020782470703125, -0.00811767578125, 0.03143310546875, 0.02520751953125, 0.002765655517578125, 0.0119171142578125, -0.039306640625, -0.0169677734375, -0.0002741813659667969, -0.0165863037109375, 0.00829315185546875, 0.0286102294921875, 0.0262603759765625, 0.0204925537109375, -0.04498291015625, -0.004230499267578125, 0.0104827880859375, -0.0120697021484375, -0.013336181640625, 0.023651123046875, -0.0007572174072265625, 0.00667572021484375, -0.0255126953125, 0.04107666015625, 0.0254669189453125, 0.039215087890625, -0.01154327392578125, -0.01041412353515625, 0.028533935546875, -0.0105133056640625, -0.0239715576171875, 0.0016031265258789062, -0.0174560546875, -0.03753662109375, 0.00785064697265625, -0.006420135498046875, 0.00948333740234375, -0.0124359130859375, 0.0177459716796875, -0.00742340087890625, 0.01389312744140625, -0.01361083984375, -0.003086090087890625, -0.0016756057739257812, -0.029693603515625, 0.018096923828125, -0.0244293212890625, 0.01068115234375, -0.0042877197265625, -0.019622802734375, -0.0450439453125, 0.004505157470703125, -0.0243377685546875, 0.004940032958984375, 0.0180511474609375, 0.042236328125, 0.049224853515625, -0.047576904296875, -0.061859130859375, 0.037689208984375, 0.031402587890625, 0.0911865234375, 0.020751953125, -0.0298614501953125, 0.0269317626953125, 0.006561279296875, 0.002262115478515625, -0.05059814453125, 0.005889892578125, -0.042022705078125, 0.0125274658203125, -0.03521728515625, 0.00244140625, 0.006267547607421875, -0.041534423828125, -0.07989501953125, 0.03155517578125, -0.027740478515625, -0.031585693359375, -0.049774169921875, 0.0289154052734375, 0.0229644775390625, -0.0167999267578125, -0.01059722900390625, -0.0198974609375, -0.03411865234375, 0.00641632080078125, 0.0091400146484375, 0.04193115234375, -0.01372528076171875, 0.0146331787109375, -0.00775146484375, 0.040130615234375, 0.050537109375, 0.006816864013671875, 0.002941131591796875, 0.009521484375, 0.0018215179443359375, 0.0225067138671875, -0.0312042236328125, -0.04058837890625, -0.0169525146484375, -0.00286865234375, -0.01291656494140625, -0.0098876953125, -0.04730224609375, -0.0102691650390625, 0.08349609375, 0.06561279296875, 0.03424072265625, -0.0411376953125, 0.0030765533447265625, 0.0147247314453125, -0.0239105224609375, 0.01119232177734375, 0.025848388671875, -0.0711669921875, -0.022186279296875, 0.0266571044921875, 0.00893402099609375, -0.0408935546875, -0.04046630859375, -0.0592041015625, -0.03448486328125, -0.031463623046875, 0.019775390625, -0.007572174072265625, -0.026641845703125, 0.038726806640625, -0.033416748046875, -0.0037860870361328125, 0.00019419193267822266, 0.020599365234375, 0.0008635520935058594, 0.0046844482421875, 0.022674560546875, 0.0161895751953125, -0.053985595703125, 0.0171356201171875, -0.0045928955078125, 0.01513671875, -0.0445556640625, -0.0301513671875, -0.028533935546875, 0.00823211669921875, 0.0031147003173828125, 0.018157958984375, 0.01373291015625, 0.01068878173828125, -0.0025768280029296875, 0.047760009765625, -0.031707763671875, 0.05181884765625, -0.009979248046875, 0.032501220703125, 0.0255889892578125, -0.013214111328125, 0.07318115234375, -0.03497314453125, 0.0229644775390625, 0.0168304443359375, 0.068359375, 0.0226287841796875, 0.0243072509765625, 0.023193359375, -0.009185791015625, 0.006439208984375 ]
ce72eb56aaa57f70ef2c8c5dd72659c877e2b47c
Wordpress Stackexchange Q: Change admin bar to default:off While I quite like the admin bar I actually want it to be OFF by default instead of ON ( I don't want to disable it altogether because I want users to be able to turn it on if they want - but but I don't want to have to manually turn it off for every user ) Is there a way to implement this. A: function wpse29210_admin_bar_toogle() { add_filter( 'show_admin_bar', '__return_false' ); $user = get_userdata( $GLOBALS['current_user'] )->data->ID; if ( ! is_admin() && $user->show_admin_bar_front ) add_filter( 'show_admin_bar', '__return_true' ); if ( is_admin() && $user->show_admin_bar_admin ) add_filter( 'show_admin_bar', '__return_true' ); return; } add_action( 'init', 'wpse29210_admin_bar_toogle' );
Q: Change admin bar to default:off While I quite like the admin bar I actually want it to be OFF by default instead of ON ( I don't want to disable it altogether because I want users to be able to turn it on if they want - but but I don't want to have to manually turn it off for every user ) Is there a way to implement this. A: function wpse29210_admin_bar_toogle() { add_filter( 'show_admin_bar', '__return_false' ); $user = get_userdata( $GLOBALS['current_user'] )->data->ID; if ( ! is_admin() && $user->show_admin_bar_front ) add_filter( 'show_admin_bar', '__return_true' ); if ( is_admin() && $user->show_admin_bar_admin ) add_filter( 'show_admin_bar', '__return_true' ); return; } add_action( 'init', 'wpse29210_admin_bar_toogle' ); A: add_action("user_register", "set_user_admin_bar_false_by_default", 10, 1); function set_user_admin_bar_false_by_default($user_id) { update_user_meta( $user_id, 'show_admin_bar_front', 'false' ); update_user_meta( $user_id, 'show_admin_bar_admin', 'false' ); } Place in theme functions file or you can make into a plugin. Once user registers it will go and set the users admin bar prefs to false. The user can then, once logged in, set this to true. A: This finally works: wp_update_user( array ( 'ID' => $user_id, 'show_admin_bar_front' => 'false' ) ) ;
wordpress
{ "language": "en", "length": 184, "provenance": "stackexchange_00019.jsonl.gz:413275", "question_score": "6", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29210" }
[ 0.052886962890625, -0.0116729736328125, 0.030364990234375, -0.006381988525390625, 0.004253387451171875, -0.020538330078125, 0.050628662109375, -0.04766845703125, 0.0224761962890625, 0.017303466796875, -0.005496978759765625, -0.0460205078125, -0.0094451904296875, -0.0292205810546875, -0.04437255859375, -0.05841064453125, 0.0156402587890625, 0.02667236328125, 0.0199737548828125, -0.020599365234375, 0.0014286041259765625, -0.0084991455078125, -0.00959014892578125, 0.072265625, 0.01080322265625, -0.059844970703125, 0.05523681640625, 0.0010213851928710938, 0.00934600830078125, 0.0017957687377929688, 0.0228424072265625, -0.0157470703125, -0.0208892822265625, -0.00102996826171875, 0.05682373046875, 0.00215911865234375, -0.039703369140625, 0.044036865234375, 0.05535888671875, -0.033905029296875, 0.023590087890625, -0.00058746337890625, -0.023651123046875, 0.025726318359375, -0.031341552734375, -0.04425048828125, 0.034515380859375, -0.003017425537109375, 0.039886474609375, -0.05462646484375, -0.0017108917236328125, 0.0183868408203125, 0.023406982421875, -0.047943115234375, -0.0156402587890625, 0.01296234130859375, -0.004535675048828125, -0.038330078125, 0.06915283203125, 0.0203857421875, -0.040283203125, -0.0709228515625, 0.0203399658203125, -0.0794677734375, 0.0025730133056640625, -0.0277252197265625, -0.04803466796875, 0.0306549072265625, -0.042694091796875, 0.008514404296875, 0.0517578125, -0.0439453125, 0.025848388671875, 0.005168914794921875, -0.03521728515625, -0.0258636474609375, 0.0101776123046875, 0.0023059844970703125, 0.039306640625, -0.0289764404296875, 0.024078369140625, 0.027099609375, -0.0071563720703125, -0.0306854248046875, 0.0297393798828125, -0.00719451904296875, -0.016571044921875, -0.022064208984375, -0.00205230712890625, -0.03070068359375, -0.00658416748046875, -0.0004665851593017578, -0.032073974609375, 0.0113372802734375, -0.0211334228515625, -0.02197265625, 0.0224456787109375, 0.0002231597900390625, 0.0189666748046875, -0.04217529296875, 0.00002300739288330078, -0.01360321044921875, -0.09259033203125, 0.032989501953125, -0.0083160400390625, 0.0015172958374023438, -0.00833892822265625, -0.005340576171875, 0.01340484619140625, 0.0246734619140625, -0.0218048095703125, -0.00873565673828125, -0.022064208984375, -0.005168914794921875, -0.01178741455078125, 0.023468017578125, -0.0333251953125, 0.0014495849609375, -0.0161895751953125, 0.0225067138671875, -0.00534820556640625, -0.00943756103515625, 0.020294189453125, 0.01751708984375, 0.00875091552734375, -0.00251007080078125, -0.040313720703125, -0.004779815673828125, -0.035064697265625, -0.01506805419921875, -0.0386962890625, 0.0204925537109375, 0.10406494140625, 0.0638427734375, 0.036651611328125, -0.00751495361328125, 0.0026531219482421875, 0.00682830810546875, 0.0225067138671875, 0.01396942138671875, -0.00164794921875, -0.0242919921875, 0.0165252685546875, 0.00836944580078125, -0.0218048095703125, 0.02435302734375, 0.01145172119140625, 0.003124237060546875, -0.01483154296875, -0.04144287109375, -0.0033168792724609375, -0.01348876953125, 0.0197296142578125, 0.0264129638671875, 0.01163482666015625, 0.041656494140625, 0.04351806640625, 0.01837158203125, -0.0767822265625, 0.00701141357421875, -0.0010395050048828125, 0.0033817291259765625, 0.00794219970703125, 0.01087188720703125, -0.006649017333984375, 0.0081787109375, 0.0047607421875, 0.004180908203125, 0.0330810546875, -0.0126800537109375, 0.04364013671875, -0.013153076171875, 0.00797271728515625, 0.01027679443359375, 0.007755279541015625, 0.0045318603515625, 0.006595611572265625, 0.004791259765625, 0.002559661865234375, 0.0189056396484375, -0.0131072998046875, -0.037322998046875, 0.0010194778442382812, -0.0011339187622070312, -0.0306549072265625, 0.0227813720703125, -0.0238037109375, -0.00003993511199951172, 0.04229736328125, -0.0011768341064453125, -0.008544921875, -0.003986358642578125, 0.016754150390625, -0.0219879150390625, 0.01611328125, -0.03961181640625, -0.005390167236328125, -0.0194091796875, -0.00533294677734375, 0.01084136962890625, 0.04132080078125, -0.006744384765625, -0.01224517822265625, -0.029876708984375, -0.064453125, -0.040313720703125, -0.004230499267578125, 0.030731201171875, 0.0445556640625, -0.003955841064453125, -0.019073486328125, -0.043792724609375, 0.0096893310546875, -0.01367950439453125, -0.0517578125, -0.017333984375, -0.0146026611328125, 0.046142578125, 0.0098114013671875, 0.05804443359375, 0.0258636474609375, -0.0265350341796875, 0.03509521484375, -0.0028553009033203125, 0.043060302734375, 0.0010404586791992188, -0.02154541015625, -0.01375579833984375, 0.04534912109375, -0.0185394287109375, 0.006221771240234375, 0.06298828125, 0.037994384765625, 0.00551605224609375, -0.032806396484375, -0.0158538818359375, -0.00891876220703125, -0.07440185546875, -0.00510406494140625, 0.0684814453125, 0.0231781005859375, -0.00235748291015625, -0.01509857177734375, 0.043548583984375, 0.052215576171875, -0.01209259033203125, -0.00893402099609375, 0.03271484375, -0.01143646240234375, -0.0234527587890625, -0.022735595703125, -0.0145416259765625, 0.06182861328125, -0.040130615234375, 0.0008144378662109375, 0.0577392578125, -0.01424407958984375, -0.0196685791015625, 0.0223236083984375, -0.01105499267578125, 0.00555419921875, -0.00800323486328125, -0.00014543533325195312, -0.006381988525390625, -0.0009326934814453125, -0.00884246826171875, 0.002536773681640625, 0.01007843017578125, -0.019073486328125, -0.0125732421875, 0.02728271484375, 0.0197601318359375, -0.0138092041015625, -0.0057525634765625, 0.053436279296875, -0.07025146484375, -0.054931640625, 0.010467529296875, 0.0182952880859375, -0.037322998046875, -0.012603759765625, 0.01236724853515625, -0.01078033447265625, -0.00598907470703125, 0.0009622573852539062, -0.046478271484375, 0.01194000244140625, 0.01373291015625, -0.047637939453125, -0.050048828125, -0.017333984375, 0.034332275390625, -0.030853271484375, 0.016387939453125, 0.01288604736328125, 0.0010519027709960938, 0.00641632080078125, -0.047760009765625, 0.041900634765625, -0.053741455078125, 0.0650634765625, 0.0792236328125, -0.025909423828125, 0.04241943359375, 0.0008625984191894531, 0.005710601806640625, 0.0165863037109375, 0.0234832763671875, -0.003566741943359375, -0.0074615478515625, -0.027587890625, 0.0038299560546875, 0.0207366943359375, 0.0297698974609375, 0.007114410400390625, -0.0213623046875, -0.007427215576171875, 0.03411865234375, -0.01212310791015625, -0.0101318359375, -0.042022705078125, -0.05511474609375, -0.01702880859375, 0.01021575927734375, -0.01300048828125, 0.031463623046875, 0.0181121826171875, 0.01329803466796875, 0.005401611328125, -0.01528167724609375, -0.0207977294921875, -0.0225067138671875, -0.031036376953125, -0.028533935546875, -0.007778167724609375, -0.0037059783935546875, 0.000152587890625, 0.09002685546875, 0.0009222030639648438, -0.044403076171875, 0.0009708404541015625, -0.061859130859375, -0.005035400390625, 0.0316162109375, 0.01233673095703125, -0.0360107421875, 0.005828857421875, -0.002521514892578125, -0.0248565673828125, 0.011871337890625, 0.005687713623046875, -0.019805908203125, -0.0022029876708984375, -0.053741455078125, 0.0189208984375, -0.01323699951171875, -0.0257415771484375, -0.01629638671875, 0.005054473876953125, -0.054840087890625, -0.017913818359375, 0.0190277099609375, -0.029022216796875, 0.017181396484375, -0.007259368896484375, -0.0265655517578125, 0.0117340087890625, 0.0196685791015625, 0.006221771240234375, -0.00429534912109375, 0.0222015380859375, -0.03125, -0.0064849853515625, 0.0021839141845703125, 0.018951416015625, -0.00473785400390625, -0.0242919921875, -0.054046630859375, 0.006244659423828125, -0.0242919921875, -0.0110015869140625, 0.006618499755859375, 0.006031036376953125, 0.039306640625, -0.07452392578125, 0.051910400390625, -0.04132080078125, -0.0172271728515625, -0.04254150390625, -0.007175445556640625, 0.0038166046142578125, 0.08056640625, -0.011627197265625, -0.002086639404296875, 0.0087738037109375, -0.0009641647338867188, -0.032470703125, -0.01020050048828125, -0.0655517578125, 0.0016107559204101562, -0.091552734375, 0.0482177734375, -0.00567626953125, -0.0081787109375, -0.0281524658203125, 0.00258636474609375, -0.0260009765625, -0.05078125, 0.0177154541015625, -0.03515625, -0.0008563995361328125, -0.00762176513671875, -0.016387939453125, -0.0293731689453125, 0.01537322998046875, -0.043121337890625, -0.06536865234375, -0.0277099609375, 0.00496673583984375, 0.0452880859375, 0.0146026611328125, -0.0025959014892578125, -0.0287933349609375, 0.040679931640625, 0.01450347900390625, -0.050048828125, 0.026641845703125, 0.01044464111328125, -0.01013946533203125, -0.026275634765625, -0.01177215576171875, -0.040771484375, -0.01395416259765625, -0.0031299591064453125, -0.040191650390625, 0.0037746429443359375, -0.00868988037109375, -0.004695892333984375, 0.036102294921875, -0.04193115234375, -0.06402587890625, -0.062408447265625, -0.0458984375, -0.0205535888671875, -0.026641845703125, -0.0040283203125, -0.02032470703125, -0.0675048828125, 0.0160064697265625, -0.03106689453125, -0.0230712890625, 0.01519775390625, 0.022857666015625, 0.0151824951171875, -0.01511383056640625, 0.00582122802734375, 0.0152130126953125, 0.034759521484375, 0.01078033447265625, 0.0125274658203125, 0.007965087890625, -0.034149169921875, 0.05242919921875, 0.01172637939453125, -0.0207061767578125, -0.044342041015625, 0.0467529296875, 0.00405120849609375, -0.0217742919921875, 0.007419586181640625, -0.007495880126953125, 0.0168304443359375, -0.013763427734375, -0.021026611328125, 0.00838470458984375, -0.033111572265625, 0.0147857666015625, 0.03125, -0.01407623291015625, -0.043914794921875, 0.0191192626953125, -0.000896453857421875, -0.00905609130859375, 0.003086090087890625, 0.00832366943359375, 0.01299285888671875, -0.035003662109375, 0.00701904296875, 0.0242462158203125, -0.00782012939453125, 0.04278564453125, -0.042938232421875, 0.03314208984375, 0.0091705322265625, -0.0212554931640625, -0.0143585205078125, -0.013458251953125, 0.07269287109375, 0.014556884765625, -0.04736328125, 0.00742340087890625, -0.010040283203125, 0.018218994140625, 0.008514404296875, -0.0158843994140625, 0.04107666015625, 0.04193115234375, -0.019805908203125, -0.006622314453125, -0.040740966796875, 0.0096588134765625, -0.06341552734375, 0.0286407470703125, 0.03411865234375, -0.00321197509765625, -0.005710601806640625, 0.09478759765625, 0.01169586181640625, 0.042388916015625, -0.021240234375, 0.0115203857421875, -0.01404571533203125, 0.01438140869140625, 0.0004315376281738281, 0.021209716796875, 0.00812530517578125, -0.01558685302734375, 0.029998779296875, 0.0021114349365234375, -0.0011959075927734375, 0.01178741455078125, 0.0149078369140625, 0.05242919921875, 0.01415252685546875, -0.0216217041015625, -0.0165252685546875, 0.0110931396484375, 0.050018310546875, -0.012542724609375, -0.055023193359375, -0.0254058837890625, 0.01166534423828125, 0.043121337890625, -0.06829833984375, -0.0295257568359375, 0.024627685546875, -0.043121337890625, 0.00855255126953125, 0.00948333740234375, -0.0391845703125, 0.0146331787109375, 0.02032470703125, -0.021148681640625, -0.0214996337890625, 0.01148223876953125, -0.032867431640625, -0.004230499267578125, -0.0289459228515625, -0.01476287841796875, 0.060577392578125, -0.0276641845703125, 0.03790283203125, -0.01047515869140625, -0.0007457733154296875, 0.00769805908203125, 0.01361083984375, 0.0338134765625, 0.00786590576171875, -0.08612060546875, 0.02008056640625, -0.08831787109375, 0.00235748291015625, -0.0938720703125, -0.07666015625, -0.046630859375, 0.0082244873046875, 0.03448486328125, 0.0257110595703125, 0.02117919921875, -0.00814056396484375, -0.032196044921875, 0.017364501953125, 0.03265380859375, 0.08111572265625, -0.0213775634765625, 0.05035400390625, 0.00902557373046875, 0.01021575927734375, -0.01519012451171875, 0.00798797607421875, -0.0160675048828125, 0.00708770751953125, 0.0273895263671875, 0.010650634765625, -0.040802001953125, -0.0216217041015625, -0.032958984375, -0.0284271240234375, 0.060028076171875, -0.0287628173828125, 0.0163421630859375, -0.00902557373046875, 0.002208709716796875, -0.0301361083984375, -0.003082275390625, -0.048248291015625, 0.035919189453125, -0.08953857421875, 0.0277099609375, 0.0313720703125, -0.049102783203125, -0.036468505859375, 0.0203857421875, 0.0104522705078125, 0.0211029052734375, -0.0257110595703125, -0.056243896484375, 0.0814208984375, 0.0689697265625, -0.0202484130859375, 0.0213775634765625, 0.0182952880859375, -0.005847930908203125, -0.019287109375, 0.00466156005859375, 0.00934600830078125, 0.016510009765625, 0.0208892822265625, -0.01361846923828125, 0.0006165504455566406, 0.004474639892578125, -0.01849365234375, 0.03753662109375, 0.083984375, 0.08074951171875, -0.12103271484375, 0.0302276611328125, 0.01357269287109375, -0.01806640625, 0.054595947265625, -0.020050048828125, -0.038238525390625, -0.08331298828125, 0.0782470703125, -0.06024169921875, -0.0249481201171875, 0.001674652099609375, -0.0275115966796875, -0.023223876953125, 0.00018143653869628906, 0.0255279541015625, 0.0121307373046875, 0.0246124267578125, -0.0117034912109375, -0.03814697265625, 0.0088958740234375, 0.01271820068359375, 0.00432586669921875, -0.01456451416015625, -0.03375244140625, -0.07611083984375, -0.04437255859375, -0.030670166015625, -0.04888916015625, 0.0645751953125, -0.03277587890625, 0.048583984375, 0.0625, -0.02947998046875, 0.0521240234375, 0.01126861572265625, 0.01361846923828125, -0.01029205322265625, -0.03887939453125, 0.0262908935546875, 0.01334381103515625, -0.06695556640625, 0.028045654296875, -0.0145416259765625, -0.049530029296875, 0.002262115478515625, -0.0055999755859375, 0.09539794921875, -0.033111572265625, -0.0170440673828125, 0.00820159912109375, -0.0350341796875, 0.00455474853515625, -0.02996826171875, 0.0096588134765625, -0.0223541259765625, 0.0265655517578125, -0.03338623046875, -0.014739990234375, -0.010040283203125, -0.051025390625, -0.035675048828125, 0.0794677734375, -0.01065826416015625, 0.00713348388671875, 0.004871368408203125, 0.029571533203125, -0.0294647216796875, 0.016082763671875, -0.0220947265625, 0.043304443359375, 0.036224365234375, 0.014678955078125, -0.02752685546875, -0.014556884765625, -0.0027790069580078125, 0.0193023681640625, 0.0239105224609375, 0.0031871795654296875, -0.0032024383544921875, -0.004245758056640625, 0.022918701171875, 0.01528167724609375, -0.01056671142578125, 0.0347900390625, -0.0228271484375, 0.03424072265625, 0.0130767822265625, -0.058013916015625, -0.002655029296875, 0.014617919921875, -0.041412353515625, 0.0188140869140625, 0.0240325927734375, 0.036285400390625, 0.019622802734375, 0.0039520263671875, -0.02142333984375, -0.00565338134765625, 0.024200439453125, -0.08416748046875, -0.041748046875, 0.031707763671875, -0.0107269287109375, 0.0297698974609375, 0.046539306640625, -0.045989990234375, 0.046875, 0.01519775390625, -0.043487548828125, 0.0182342529296875, 0.01523590087890625, -0.0628662109375, -0.041259765625, -0.0265350341796875, 0.0132598876953125, -0.03460693359375, 0.03271484375, 0.0175933837890625, 0.0118865966796875, -0.05084228515625, -0.005512237548828125, 0.03302001953125, 0.045074462890625, -0.0261688232421875, -0.020751953125, 0.028961181640625, -0.004657745361328125, -0.006175994873046875, -0.01120758056640625, -0.0122222900390625, -0.044036865234375, -0.0027523040771484375, -0.0007872581481933594, 0.00421905517578125, -0.0013856887817382812, -0.0151824951171875, 0.008270263671875, 0.028472900390625, -0.0034275054931640625, 0.0217742919921875, -0.0014257431030273438, -0.0131378173828125, -0.01093292236328125, 0.015869140625, 0.03118896484375, -0.01251220703125, -0.03033447265625, -0.0012531280517578125, -0.00849151611328125, 0.0345458984375, -0.026275634765625, 0.00978851318359375, -0.048309326171875, -0.0657958984375, -0.033172607421875, 0.03594970703125, -0.0146484375, 0.007053375244140625, 0.041412353515625, 0.0064239501953125, -0.04412841796875, -0.0214996337890625, 0.020355224609375, -0.040191650390625, -0.0261993408203125, -0.0338134765625, 0.04473876953125, 0.033050537109375, 0.0295562744140625, 0.0104217529296875, 0.045257568359375, 0.0300445556640625, -0.003643035888671875, 0.0103912353515625, 0.007568359375, -0.04473876953125, 0.01422119140625, 0.0189208984375, 0.06268310546875, 0.0245208740234375, -0.0791015625, -0.04205322265625, 0.037384033203125, -0.0267486572265625, 0.0006299018859863281, 0.03363037109375, -0.027862548828125, 0.019744873046875, 0.0025577545166015625, 0.0278167724609375, -0.0142974853515625, -0.03125, -0.0104827880859375, -0.041595458984375, 0.03582763671875, -0.0172119140625, -0.0115203857421875, -0.0137481689453125, -0.01300048828125, 0.032989501953125, 0.0462646484375, -0.001708984375, 0.019989013671875, 0.034912109375, -0.0213623046875, -0.0015764236450195312, -0.023712158203125, -0.0204925537109375, 0.004150390625, 0.003814697265625, -0.005641937255859375, 0.005306243896484375, -0.0220794677734375, 0.04205322265625, 0.042236328125, -0.02783203125, 0.04010009765625, 0.00392913818359375, 0.0038928985595703125, -0.055938720703125, -0.0096435546875, -0.0292816162109375, -0.055267333984375, -0.0269622802734375, 0.02374267578125, -0.0045623779296875, 0.00353240966796875, -0.0212249755859375, 0.0087127685546875, -0.01291656494140625, -0.006008148193359375, 0.0096282958984375, 0.02008056640625, -0.01020050048828125, 0.0251007080078125, -0.049285888671875, 0.0057525634765625, -0.0250244140625, -0.019622802734375, 0.0002956390380859375, 0.00849151611328125, -0.01568603515625, -0.00308990478515625, 0.00991058349609375, -0.0269012451171875, -0.005962371826171875, 0.004302978515625, -0.02008056640625, -0.0001596212387084961, -0.0010900497436523438, -0.007213592529296875, -0.02960205078125, -0.0016927719116210938, -0.00698089599609375, -0.0297088623046875, -0.01287078857421875, 0.0245361328125, -0.0259246826171875, -0.06378173828125, -0.09539794921875, 0.044891357421875, 0.050628662109375, -0.006927490234375, -0.060302734375, 0.05059814453125, -0.06622314453125, 0.0771484375, 0.0003063678741455078, 0.01557159423828125, 0.00518798828125, 0.0184783935546875, -0.06292724609375, -0.01007080078125, -0.05609130859375, -0.026336669921875, -0.0460205078125, -0.0037746429443359375, 0.00913238525390625, 0.005268096923828125, 0.01898193359375, -0.023834228515625, -0.028350830078125, 0.0299072265625, -0.01366424560546875, -0.0230255126953125, -0.00936126708984375, 0.014434814453125, -0.0158538818359375, -0.0172576904296875, 0.0283355712890625, -0.029449462890625, -0.030792236328125, -0.0496826171875, 0.005893707275390625, 0.0390625, -0.034515380859375, -0.047515869140625, -0.00272369384765625, -0.01190948486328125, -0.031646728515625, 0.034637451171875, -0.0050506591796875, -0.0307159423828125, 0.0298919677734375, 0.01087188720703125, -0.021514892578125, 0.0036525726318359375, -0.005084991455078125, 0.0234527587890625, 0.00872039794921875, 0.0478515625, 0.017425537109375, -0.039306640625, -0.01001739501953125, -0.0313720703125, -0.0081329345703125, 0.0024166107177734375, -0.006053924560546875, 0.01445770263671875, 0.01462554931640625, -0.0277557373046875, -0.0092926025390625, -0.00830841064453125, 0.0018711090087890625, -0.01096343994140625, 0.00777435302734375, -0.0247955322265625, 0.006099700927734375, 0.07354736328125, 0.052886962890625, 0.024322509765625, -0.035552978515625, -0.071533203125, -0.06707763671875, 0.016937255859375, -0.0290985107421875, -0.00450897216796875, -0.075439453125, 0.0174102783203125, 0.017913818359375, -0.0312042236328125, -0.0177764892578125, 0.026824951171875, -0.03997802734375, 0.0172576904296875, 0.028289794921875, -0.0165252685546875, -0.03875732421875, -0.0212554931640625, 0.0292510986328125, -0.0253753662109375, -0.0307769775390625, -0.0116729736328125, 0.0223846435546875, -0.0047607421875, -0.0111846923828125, -0.01140594482421875, 0.00009083747863769531, -0.0323486328125, 0.0212860107421875, -0.0041351318359375, 0.009033203125, -0.0216217041015625, -0.0016307830810546875, -0.0081939697265625, 0.0218505859375, -0.006893157958984375, 0.044219970703125, -0.0015344619750976562, -0.0002982616424560547, 0.005535125732421875, 0.008544921875, 0.0006923675537109375, 0.022613525390625, -0.0248870849609375, 0.0482177734375, -0.0007424354553222656, -0.0189666748046875, 0.0202178955078125, -0.034423828125, 0.0060577392578125, 0.02490234375, 0.059295654296875, -0.02581787109375, 0.034912109375, -0.01458740234375, 0.03564453125, 0.0154266357421875 ]
157c5d401eb2a416af378ff33952dce8d4253c20
Wordpress Stackexchange Q: Category and tag with same name IN my blog, if I have a category and tag with the same name, it will make the tag have a number in the URI. Example: category/php tags/php-2 Is there anyway to make my tags with the same name as an existing category, to not append a number to the end of them for my links? A: Tags and Categories use the same system, So that is not possible. It will not hurt SEO in any way to use php-2, it is just visually displeasing.
Q: Category and tag with same name IN my blog, if I have a category and tag with the same name, it will make the tag have a number in the URI. Example: category/php tags/php-2 Is there anyway to make my tags with the same name as an existing category, to not append a number to the end of them for my links? A: Tags and Categories use the same system, So that is not possible. It will not hurt SEO in any way to use php-2, it is just visually displeasing.
wordpress
{ "language": "en", "length": 92, "provenance": "stackexchange_00019.jsonl.gz:413308", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29330" }
[ 0.04058837890625, 0.023773193359375, -0.0203704833984375, -0.040771484375, 0.032440185546875, -0.0134735107421875, 0.0236053466796875, -0.020111083984375, -0.01806640625, -0.0048675537109375, 0.010650634765625, -0.0023784637451171875, -0.00506591796875, -0.060577392578125, 0.055389404296875, -0.00904083251953125, 0.026214599609375, 0.00231170654296875, 0.0253448486328125, -0.00618743896484375, 0.0080718994140625, 0.023590087890625, 0.00030517578125, 0.00597381591796875, 0.043212890625, -0.048431396484375, 0.0284576416015625, 0.01027679443359375, 0.0013551712036132812, -0.027557373046875, 0.0233306884765625, 0.006542205810546875, 0.040557861328125, 0.0301055908203125, -0.0628662109375, -0.0175323486328125, -0.01267242431640625, 0.0085296630859375, -0.020782470703125, 0.028106689453125, 0.03326416015625, -0.032470703125, 0.0927734375, -0.01453399658203125, 0.0570068359375, -0.0311279296875, 0.059722900390625, -0.0809326171875, 0.0013093948364257812, -0.0214691162109375, 0.028076171875, 0.01154327392578125, 0.042633056640625, -0.040435791015625, -0.03338623046875, -0.017242431640625, -0.01384735107421875, -0.00339508056640625, 0.020843505859375, -0.0099334716796875, -0.0302276611328125, -0.019622802734375, 0.034759521484375, 0.006626129150390625, -0.0141448974609375, -0.0009322166442871094, 0.06610107421875, -0.0029754638671875, -0.02630615234375, -0.014404296875, 0.038299560546875, -0.0101318359375, 0.0018472671508789062, 0.0040740966796875, -0.005847930908203125, -0.0288543701171875, 0.015716552734375, -0.0237274169921875, 0.006866455078125, 0.017333984375, 0.0271453857421875, 0.0145416259765625, -0.004016876220703125, -0.026611328125, 0.03143310546875, 0.0163421630859375, -0.0109100341796875, -0.0244598388671875, -0.00250244140625, -0.055877685546875, -0.01099395751953125, -0.00444793701171875, -0.050933837890625, 0.00556182861328125, -0.0096893310546875, -0.04119873046875, -0.004852294921875, 0.043731689453125, -0.0146331787109375, 0.0338134765625, -0.034820556640625, -0.019256591796875, 0.0136871337890625, -0.048858642578125, 0.01904296875, 0.07659912109375, 0.025054931640625, 0.052032470703125, 0.0643310546875, -0.019012451171875, 0.0162200927734375, 0.0682373046875, -0.004405975341796875, 0.0005555152893066406, -0.0128936767578125, 0.015960693359375, -0.035247802734375, 0.031402587890625, -0.013885498046875, 0.033233642578125, -0.0100860595703125, 0.0309600830078125, 0.004245758056640625, 0.0288543701171875, -0.0012235641479492188, 0.024688720703125, 0.02294921875, -0.051055908203125, 0.016845703125, -0.0217132568359375, -0.01432037353515625, 0.0362548828125, 0.005832672119140625, -0.016387939453125, -0.0294189453125, 0.007602691650390625, 0.005523681640625, -0.021728515625, -0.0245513916015625, 0.0204010009765625, -0.020965576171875, -0.0117034912109375, 0.047119140625, -0.0521240234375, 0.04205322265625, 0.034423828125, 0.0078582763671875, 0.01110076904296875, 0.01515960693359375, -0.0208587646484375, 0.05047607421875, -0.0655517578125, 0.037811279296875, -0.007663726806640625, -0.0247039794921875, -0.020477294921875, -0.01313018798828125, -0.0157012939453125, 0.0025634765625, -0.0236358642578125, 0.036468505859375, -0.01009368896484375, 0.016510009765625, -0.033203125, -0.060272216796875, 0.0080108642578125, -0.0687255859375, -0.0219268798828125, 0.003875732421875, -0.026641845703125, -0.0218505859375, 0.0263671875, -0.0281829833984375, -0.015838623046875, 0.01885986328125, -0.01146697998046875, -0.01386260986328125, -0.0209197998046875, 0.036895751953125, 0.03173828125, 0.0026111602783203125, -0.0195159912109375, 0.01378631591796875, -0.0015697479248046875, -0.0992431640625, 0.057830810546875, -0.01190948486328125, 0.05908203125, 0.040924072265625, -0.011993408203125, 0.07489013671875, 0.01678466796875, -0.03887939453125, 0.0153350830078125, 0.0036334991455078125, -0.01274871826171875, -0.0137481689453125, -0.0019550323486328125, 0.0033359527587890625, -0.0026187896728515625, -0.0000064373016357421875, 0.019744873046875, -0.058349609375, 0.024688720703125, -0.038238525390625, -0.01251220703125, -0.001918792724609375, 0.02362060546875, -0.01393890380859375, 0.037078857421875, 0.0035991668701171875, -0.0130615234375, 0.0006289482116699219, -0.038177490234375, 0.01265716552734375, 0.0017919540405273438, -0.006610870361328125, -0.0286102294921875, 0.012939453125, -0.02996826171875, -0.0082855224609375, 0.0648193359375, -0.024993896484375, -0.0140838623046875, -0.0034046173095703125, 0.00984954833984375, -0.0457763671875, -0.01055908203125, -0.044219970703125, 0.0295257568359375, -0.061798095703125, 0.03070068359375, 0.0650634765625, 0.09600830078125, -0.004161834716796875, -0.0042266845703125, 0.0203704833984375, -0.028350830078125, 0.00669097900390625, 0.0222320556640625, 0.0233917236328125, -0.030548095703125, -0.0130462646484375, 0.0096588134765625, -0.004726409912109375, -0.0159454345703125, 0.024322509765625, -0.0155487060546875, 0.0024585723876953125, 0.041412353515625, 0.0263214111328125, -0.00007706880569458008, 0.005809783935546875, -0.0130615234375, -0.019866943359375, 0.0243988037109375, -0.004451751708984375, -0.0084686279296875, 0.0028324127197265625, 0.00445556640625, 0.008209228515625, 0.0243377685546875, -0.0281982421875, 0.015655517578125, 0.0218048095703125, 0.041107177734375, 0.041015625, 0.04571533203125, -0.046630859375, 0.030792236328125, 0.01215362548828125, 0.0301055908203125, -0.00009953975677490234, 0.051849365234375, 0.0004382133483886719, -0.035369873046875, -0.01007843017578125, -0.0058135986328125, -0.0122833251953125, 0.00823974609375, -0.01413726806640625, 0.04144287109375, -0.0303192138671875, -0.0155487060546875, -0.0229949951171875, -0.05792236328125, -0.01535797119140625, 0.0004284381866455078, -0.04071044921875, -0.0243988037109375, -0.00792694091796875, 0.041900634765625, -0.025299072265625, 0.037200927734375, -0.00897216796875, -0.004085540771484375, -0.005413055419921875, -0.0242767333984375, 0.0241851806640625, -0.01392364501953125, 0.0341796875, 0.062744140625, 0.00794219970703125, 0.006458282470703125, 0.0046844482421875, 0.0128021240234375, 0.032318115234375, -0.01215362548828125, -0.01476287841796875, 0.0246734619140625, -0.06317138671875, -0.006832122802734375, 0.034332275390625, 0.0260772705078125, 0.014617919921875, -0.0238494873046875, -0.003215789794921875, 0.022003173828125, -0.07000732421875, -0.11602783203125, 0.01323699951171875, 0.0306549072265625, 0.02996826171875, 0.0299224853515625, 0.032196044921875, -0.060455322265625, 0.043548583984375, -0.0048980712890625, 0.03155517578125, -0.043792724609375, -0.08154296875, -0.0791015625, -0.0860595703125, -0.0044403076171875, -0.0081787109375, -0.005855560302734375, 0.010955810546875, 0.01276397705078125, 0.01403045654296875, -0.01206207275390625, 0.042327880859375, 0.0244140625, 0.00638580322265625, 0.0224151611328125, 0.0190277099609375, -0.032958984375, 0.036376953125, -0.01003265380859375, 0.06390380859375, 0.051239013671875, -0.0372314453125, -0.001331329345703125, 0.00803375244140625, -0.0078277587890625, 0.029937744140625, 0.01439666748046875, -0.024322509765625, 0.056884765625, 0.06689453125, -0.0026149749755859375, -0.0265655517578125, -0.0171661376953125, -0.038299560546875, -0.0260467529296875, 0.034637451171875, -0.0040130615234375, -0.051055908203125, 0.01204681396484375, -0.0297698974609375, 0.0004334449768066406, -0.016845703125, -0.0496826171875, 0.0374755859375, -0.0029315948486328125, 0.0156097412109375, 0.0166473388671875, -0.024444580078125, -0.03338623046875, 0.0245361328125, -0.03155517578125, -0.00788116455078125, -0.039306640625, 0.04119873046875, -0.038330078125, -0.028045654296875, 0.0272216796875, -0.0340576171875, 0.004268646240234375, -0.04449462890625, -0.0187225341796875, -0.0251007080078125, 0.055572509765625, -0.074462890625, -0.03070068359375, -0.01316070556640625, 0.01311492919921875, -0.0159454345703125, -0.0152740478515625, -0.0274658203125, -0.0233306884765625, -0.05810546875, 0.007595062255859375, 0.018157958984375, -0.024383544921875, -0.023712158203125, 0.013641357421875, -0.044708251953125, -0.0167388916015625, 0.047698974609375, -0.022247314453125, 0.044891357421875, -0.00749969482421875, 0.05218505859375, -0.01413726806640625, -0.0400390625, -0.00492095947265625, -0.0237579345703125, -0.010986328125, 6.556510925292969e-7, 0.021697998046875, 0.00008487701416015625, -0.004505157470703125, -0.01910400390625, 0.024810791015625, -0.0118560791015625, 0.00585174560546875, 0.008270263671875, 0.01355743408203125, 0.0181427001953125, 0.030914306640625, -0.01471710205078125, -0.00301361083984375, -0.0101470947265625, -0.02679443359375, 0.00037980079650878906, 0.0157623291015625, -0.0205841064453125, 0.00719451904296875, -0.0200653076171875, -0.0179901123046875, -0.06427001953125, -0.0299530029296875, 0.016815185546875, 0.0005736351013183594, 0.0040130615234375, -0.0036468505859375, 0.003055572509765625, -0.049163818359375, 0.02789306640625, -0.00923919677734375, -0.0229339599609375, 0.00594329833984375, 0.0556640625, 0.0024471282958984375, -0.0098876953125, -0.0740966796875, 0.038970947265625, 0.039276123046875, 0.00897216796875, 0.06683349609375, 0.0164947509765625, -0.0240631103515625, 0.06683349609375, 0.0115966796875, 0.0174102783203125, -0.0081787109375, 0.033050537109375, -0.007190704345703125, -0.0188751220703125, 0.0191650390625, -0.003162384033203125, 0.006591796875, 0.02325439453125, -0.005054473876953125, -0.0080108642578125, -0.0309600830078125, 0.0070037841796875, -0.0002390146255493164, 0.01629638671875, -0.006954193115234375, -0.0198211669921875, 0.0156707763671875, -0.01038360595703125, -0.0055999755859375, 0.0045623779296875, 0.0005464553833007812, -0.03643798828125, -0.0181732177734375, -0.00861358642578125, -0.0137786865234375, 0.006656646728515625, -0.01080322265625, 0.0163116455078125, -0.0310821533203125, -0.013580322265625, -0.0283660888671875, -0.00939178466796875, 0.0218658447265625, 0.05023193359375, -0.0003228187561035156, -0.0166473388671875, 0.0200347900390625, -0.005443572998046875, -0.027862548828125, 0.006923675537109375, -0.0091094970703125, -0.047271728515625, -0.0024566650390625, 0.03216552734375, -0.01441192626953125, -0.050933837890625, -0.0082855224609375, -0.0308074951171875, 0.01065826416015625, -0.0276641845703125, 0.017120361328125, 0.004779815673828125, 0.0005450248718261719, 0.0106658935546875, -0.010345458984375, 0.004772186279296875, 0.0081787109375, 0.01190185546875, 0.043212890625, -0.01485443115234375, -0.004913330078125, -0.022430419921875, 0.00691986083984375, -0.032989501953125, 0.0129241943359375, 0.027862548828125, 0.019866943359375, 0.048126220703125, -0.014068603515625, -0.0007038116455078125, -0.0154266357421875, -0.01151275634765625, -0.01543426513671875, -0.0234527587890625, 0.0278778076171875, -0.0302581787109375, -0.043548583984375, 0.0111083984375, 0.01910400390625, -0.0110321044921875, -0.03924560546875, -0.0078277587890625, 0.02825927734375, 0.016021728515625, -0.00560760498046875, 0.0247650146484375, 0.00487518310546875, -0.0157623291015625, 0.0091400146484375, 0.010223388671875, 0.01244354248046875, -0.01123809814453125, -0.0297698974609375, -0.0435791015625, 0.06903076171875, -0.02435302734375, 0.0665283203125, -0.01090240478515625, -0.053558349609375, 0.0207672119140625, 0.014434814453125, 0.060943603515625, 0.053924560546875, -0.07672119140625, 0.0292205810546875, -0.0379638671875, -0.00487518310546875, 0.020233154296875, -0.041656494140625, -0.049041748046875, -0.034149169921875, 0.0212249755859375, 0.031585693359375, -0.02191162109375, -0.039215087890625, -0.0047454833984375, -0.0194244384765625, 0.0186309814453125, 0.0204010009765625, -0.046112060546875, -0.021881103515625, 0.0457763671875, 0.0058441162109375, -0.032012939453125, -0.038360595703125, 0.02972412109375, -0.0136871337890625, 0.00135040283203125, -0.06622314453125, -0.044189453125, 0.0263671875, -0.06671142578125, 0.0101318359375, 0.00980377197265625, -0.003505706787109375, 0.01548004150390625, -0.0094146728515625, 0.010528564453125, 0.0007882118225097656, -0.0269775390625, -0.01024627685546875, -0.01483917236328125, 0.066650390625, 0.0114898681640625, 0.0186767578125, -0.0128173828125, 0.033416748046875, -0.034759521484375, -0.0214385986328125, -0.00787353515625, -0.005565643310546875, -0.0165252685546875, 0.009521484375, 0.02398681640625, 0.0196380615234375, 0.0285797119140625, 0.0121307373046875, 0.027618408203125, -0.006481170654296875, -0.0275726318359375, 0.019927978515625, -0.0160369873046875, 0.0218048095703125, -0.00998687744140625, 0.0019521713256835938, 0.02520751953125, -0.032867431640625, -0.02886962890625, 0.030181884765625, 0.0361328125, -0.0265960693359375, -0.0141754150390625, 0.01279449462890625, 0.0009908676147460938, -0.0191650390625, 0.0197601318359375, 0.00438690185546875, -0.0160064697265625, 0.0022144317626953125, 0.0017671585083007812, -0.004627227783203125, 0.0083465576171875, -0.0112152099609375, -0.01509857177734375, -0.00220489501953125, 0.055267333984375, 0.032318115234375, -0.007411956787109375, -0.01438140869140625, 0.0104522705078125, 0.00910186767578125, -0.036865234375, -0.016387939453125, 0.04925537109375, -0.048828125, -0.05859375, 0.044189453125, 0.00492095947265625, 0.0077972412109375, -0.025177001953125, -0.0019292831420898438, 0.045623779296875, 0.0299072265625, 0.00397491455078125, -0.02630615234375, -0.001354217529296875, 0.0034275054931640625, 0.02508544921875, 0.006927490234375, -0.005615234375, -0.014862060546875, 0.02606201171875, -0.0162811279296875, -0.02032470703125, 0.0014009475708007812, -0.022308349609375, -0.02435302734375, 0.11004638671875, -0.050201416015625, -0.0184326171875, 0.004741668701171875, 0.01461029052734375, 0.00574493408203125, 0.0305328369140625, -0.0169830322265625, -0.0333251953125, -0.02764892578125, 0.0167083740234375, -0.04925537109375, 0.0248565673828125, 0.0301055908203125, -0.08160400390625, 0.056976318359375, 0.04443359375, 0.050689697265625, 0.002323150634765625, 0.01393890380859375, -0.0005178451538085938, -0.0102081298828125, -0.02447509765625, 0.0306243896484375, 0.02166748046875, 0.01541900634765625, -0.0234375, 0.0015401840209960938, 0.006439208984375, 0.0231475830078125, 0.04949951171875, 0.009521484375, -0.006359100341796875, -0.01198577880859375, 0.005809783935546875, 0.004146575927734375, -0.035858154296875, 0.03643798828125, 0.0281829833984375, -0.0010528564453125, 0.0266265869140625, 0.0148468017578125, 0.050262451171875, -0.0254974365234375, -0.0063629150390625, 0.034515380859375, 0.0167388916015625, 0.018310546875, -0.042724609375, 0.018585205078125, -0.0146484375, -0.0156402587890625, 0.00433349609375, 0.0302886962890625, 0.00959014892578125, 0.048858642578125, 0.07403564453125, -0.0626220703125, -0.03741455078125, -0.02496337890625, 0.067626953125, 0.0208282470703125, 0.050323486328125, 0.01137542724609375, 0.0236358642578125, 0.07073974609375, -0.0157318115234375, 0.0219879150390625, 0.016265869140625, -0.044097900390625, 0.054046630859375, 0.006687164306640625, 0.0338134765625, -0.04229736328125, -0.039947509765625, 0.0295562744140625, 0.07464599609375, -0.0318603515625, -0.0256805419921875, 0.004695892333984375, 0.0012845993041992188, 0.021820068359375, -0.01079559326171875, 0.0219879150390625, -0.033599853515625, -0.0084228515625, -0.0227813720703125, 0.00286865234375, 0.03314208984375, 0.01328277587890625, 0.03045654296875, 0.03680419921875, -0.049957275390625, -0.00916290283203125, -0.07373046875, 0.07684326171875, 0.0189208984375, 0.07220458984375, -0.01482391357421875, 0.0631103515625, -0.0301666259765625, -0.03173828125, -0.016387939453125, 0.06689453125, 0.01032257080078125, 0.0155487060546875, -0.07049560546875, -0.059478759765625, 0.05133056640625, 0.062347412109375, 0.03607177734375, 0.02886962890625, 0.049530029296875, 0.0423583984375, 0.0309906005859375, 0.00855255126953125, -0.00467681884765625, -0.0095367431640625, 0.038604736328125, -0.0546875, 0.04595947265625, -0.0014209747314453125, 0.00013637542724609375, 0.00708770751953125, -0.00859832763671875, 0.0484619140625, 0.003612518310546875, -0.0106048583984375, 0.00821685791015625, -0.055145263671875, 0.006381988525390625, -0.027008056640625, 0.056854248046875, 0.024566650390625, -0.0611572265625, 0.011322021484375, -0.0660400390625, -0.073974609375, 0.03778076171875, 0.04364013671875, -0.0071563720703125, -0.0080108642578125, 0.0146636962890625, -0.028900146484375, -0.01019287109375, 0.0164031982421875, 0.0218658447265625, 0.053070068359375, -0.0001665353775024414, 0.0357666015625, -0.0311279296875, -0.0016202926635742188, 0.00787353515625, 0.00458526611328125, -0.01395416259765625, 0.06353759765625, 0.003299713134765625, -0.0030803680419921875, -0.007740020751953125, 0.08251953125, -0.083984375, -0.04620361328125, 0.05792236328125, -0.028045654296875, 0.01020050048828125, 0.0020751953125, -0.00762176513671875, -0.001415252685546875, 0.037200927734375, -0.028106689453125, 0.00508880615234375, -0.0301361083984375, 0.009033203125, -0.003173828125, 0.038665771484375, -0.00638580322265625, -0.041351318359375, -0.0256195068359375, 0.003932952880859375, 0.023529052734375, 0.080078125, -0.00021779537200927734, 0.032806396484375, -0.0130462646484375, 0.00832366943359375, -0.01168060302734375, 0.0014400482177734375, -0.041900634765625, 0.01953125, 0.0128936767578125, -0.03997802734375, -0.01157379150390625, -0.016815185546875, 0.0008153915405273438, 0.001766204833984375, 0.013153076171875, 0.001934051513671875, -0.035858154296875, 0.00882720947265625, 0.054229736328125, 0.068359375, 0.0149688720703125, 0.045257568359375, -0.0005412101745605469, -0.004734039306640625, 0.0158233642578125, 0.006473541259765625, -0.0266571044921875, -0.0177154541015625, -0.007320404052734375, 0.0103302001953125, -0.01364898681640625, -0.021087646484375, -0.0452880859375, -0.0242919921875, 0.03631591796875, -0.00270843505859375, 0.01073455810546875, -0.00154876708984375, -0.02984619140625, -0.024749755859375, 0.0209503173828125, -0.03424072265625, -0.002117156982421875, 0.0166778564453125, -0.0506591796875, -0.037506103515625, -0.037567138671875, 0.0231170654296875, -0.047271728515625, 0.03082275390625, 0.02862548828125, -0.0501708984375, -0.00959014892578125, 0.015655517578125, 0.04522705078125, 0.0638427734375, 0.057586669921875, -0.0113677978515625, -0.0003955364227294922, 0.0015354156494140625, -0.032135009765625, -0.022796630859375, 0.033111572265625, -0.03387451171875, -0.056182861328125, 0.01036834716796875, -0.035858154296875, -0.0204620361328125, -0.042266845703125, -0.07147216796875, 0.07861328125, 0.00659942626953125, -0.04248046875, 0.004970550537109375, -0.0400390625, -0.024139404296875, 0.04766845703125, -0.013214111328125, 0.018646240234375, -0.00768280029296875, 0.05450439453125, -0.0021839141845703125, 0.047393798828125, -0.0235748291015625, 0.0050201416015625, 0.0021381378173828125, 0.041015625, 0.043487548828125, -0.01444244384765625, 0.026947021484375, -0.005138397216796875, 0.02264404296875, 0.054901123046875, -0.050323486328125, 0.021759033203125, -0.0179443359375, -0.017120361328125, 0.01149749755859375, -0.040283203125, -0.026214599609375, -0.0251007080078125, 0.0252532958984375, 0.01091766357421875, 0.00911712646484375, -0.012542724609375, -0.0780029296875, -0.044677734375, 0.0197296142578125, -0.0275115966796875, 0.00995635986328125, -0.08050537109375, 0.025909423828125, 0.01555633544921875, -0.0175323486328125, 0.0173187255859375, 0.025543212890625, -0.041412353515625, 0.0023097991943359375, -0.005565643310546875, -0.01428985595703125, -0.060028076171875, -0.0229949951171875, -0.020263671875, -0.002887725830078125, -0.0126190185546875, -0.022064208984375, 0.0294952392578125, -0.040802001953125, 0.0010042190551757812, 0.007122039794921875, -0.0218505859375, 0.0189361572265625, 0.020721435546875, 0.034088134765625, -0.051849365234375, 0.031280517578125, -0.00942230224609375, -0.0295562744140625, 0.03118896484375, 0.023895263671875, 0.0258636474609375, -0.037567138671875, 0.04180908203125, 0.03326416015625, 0.030517578125, 0.016387939453125, -0.047393798828125, -0.002964019775390625, 0.053558349609375, -0.0328369140625, -0.032012939453125, -0.01641845703125, -0.05633544921875, 0.00014650821685791016, -0.0177459716796875, 0.004512786865234375, -0.04107666015625, 0.0138092041015625, -0.038055419921875, -0.0081634521484375, 0.03509521484375 ]
49bd10dbcefe64fb179ff721f99eab1b5f8d88af
Wordpress Stackexchange Q: How can I get the Month Name from Archive? I have created an archive page.. where i wanted to display which archive month is displaying.. how can I display the month name? A: If you want to get the month of the current archive page you'll have to use single_month_title. The following code will output " August 2014" (notice the space before the month) <?php single_month_title(' ') ?> Without a space before the month: <?php echo trim(single_month_title(' ',false)) ?> Read more: http://codex.wordpress.org/Function_Reference/single_month_title
Q: How can I get the Month Name from Archive? I have created an archive page.. where i wanted to display which archive month is displaying.. how can I display the month name? A: If you want to get the month of the current archive page you'll have to use single_month_title. The following code will output " August 2014" (notice the space before the month) <?php single_month_title(' ') ?> Without a space before the month: <?php echo trim(single_month_title(' ',false)) ?> Read more: http://codex.wordpress.org/Function_Reference/single_month_title A: To display the Month, place this in your template where you want the date to show: <?php the_date('F m'); ?> That will show the full month name and the day. If you just want an abbreviation of the month like Aug. you would use: <?php the_date('M.'); ?> Place in front of <?php the_the_permalink(); ?> Here's a complete example using it with the title: <h2><?php the_date('M.'); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
wordpress
{ "language": "en", "length": 163, "provenance": "stackexchange_00019.jsonl.gz:413312", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29339" }
[ -0.01800537109375, -0.0296630859375, -0.0400390625, 0.0011577606201171875, -0.0295867919921875, -0.0245819091796875, 0.026092529296875, 0.0255279541015625, 0.0295257568359375, 0.026641845703125, 0.0472412109375, -0.03717041015625, 0.01520538330078125, -0.058929443359375, -0.034027099609375, 0.00748443603515625, 0.06268310546875, -0.0667724609375, 0.00036025047302246094, 0.0003571510314941406, 0.0029621124267578125, 0.05419921875, -0.006275177001953125, 0.00746917724609375, 0.02081298828125, -0.0131683349609375, 0.0960693359375, -0.00634765625, 0.0465087890625, -0.000988006591796875, 0.03839111328125, -0.06787109375, 0.023284912109375, -0.0291595458984375, 0.075927734375, 0.06964111328125, 0.0127410888671875, 0.003513336181640625, 0.041473388671875, -0.0043792724609375, 0.0167388916015625, -0.01288604736328125, 0.0091094970703125, -0.037384033203125, 0.0163421630859375, -0.0309906005859375, 0.0194854736328125, -0.045623779296875, -0.0078125, 0.0223236083984375, 0.045074462890625, 0.0286865234375, 0.05126953125, 0.0130767822265625, -0.0232696533203125, -0.01313018798828125, 0.03173828125, 0.0035457611083984375, 0.014862060546875, -0.03729248046875, -0.050933837890625, 0.0284881591796875, 0.02386474609375, 0.0019350051879882812, 0.0270538330078125, 0.0016679763793945312, 0.03533935546875, 0.0109405517578125, -0.045318603515625, 0.014404296875, 0.0195159912109375, -0.031585693359375, 0.022796630859375, -0.0218963623046875, -0.032562255859375, 0.007564544677734375, -0.031768798828125, -0.028411865234375, 0.03729248046875, -0.0277252197265625, 0.0261383056640625, 0.01042938232421875, -0.0643310546875, 0.021087646484375, 0.0224151611328125, 0.029693603515625, -0.007213592529296875, -0.03436279296875, -0.0185089111328125, -0.01247406005859375, -0.00849151611328125, -0.0196075439453125, -0.027679443359375, 0.009429931640625, -0.00829315185546875, -0.031768798828125, 0.0197906494140625, 0.072509765625, -0.01198577880859375, -0.005458831787109375, -0.022796630859375, -0.013153076171875, -0.0305023193359375, -0.0340576171875, -0.0168609619140625, 0.005901336669921875, 0.0293121337890625, 0.0115814208984375, 0.0216827392578125, 0.006099700927734375, -0.045257568359375, 0.032867431640625, -0.04925537109375, -0.0621337890625, 0.0035877227783203125, 0.09075927734375, -0.020111083984375, 0.00702667236328125, 0.0189666748046875, 0.038360595703125, 0.02947998046875, 0.041961669921875, 0.006511688232421875, -0.03125, -0.02215576171875, -0.01462554931640625, -0.0220947265625, -0.039306640625, 0.005268096923828125, 0.024444580078125, 0.01538848876953125, 0.00047206878662109375, -0.05181884765625, 0.002506256103515625, -0.01898193359375, -0.007366180419921875, 0.04345703125, -0.0087890625, -0.006900787353515625, 0.0208892822265625, -0.005992889404296875, -0.00024771690368652344, 0.02252197265625, -0.01435089111328125, -0.024139404296875, 0.01509857177734375, 0.006134033203125, 0.0136871337890625, -0.0106048583984375, -0.039398193359375, -0.0303802490234375, 0.0131378173828125, -0.01282501220703125, 0.030609130859375, -0.00677490234375, -0.031463623046875, 0.00418853759765625, -0.03271484375, 0.043304443359375, -0.033538818359375, 0.033660888671875, -0.006893157958984375, -0.0267486572265625, 0.012420654296875, -0.033660888671875, 0.0094451904296875, -0.0015392303466796875, -0.01244354248046875, 0.0169677734375, -0.0267486572265625, 0.008087158203125, 0.0130615234375, 0.040618896484375, -0.00301361083984375, -0.0175323486328125, 0.002780914306640625, -0.0205078125, -0.00376129150390625, 0.0048675537109375, 0.039398193359375, 0.01364898681640625, -0.00733184814453125, 0.0035858154296875, 0.01000213623046875, -0.0226287841796875, -0.047271728515625, 0.033905029296875, -0.01479339599609375, -0.0011587142944335938, 0.030120849609375, 0.0298919677734375, 0.043853759765625, -0.045196533203125, 0.005035400390625, 0.0233154296875, 0.003021240234375, 0.01396942138671875, -0.004383087158203125, 0.0106048583984375, -0.0156402587890625, 0.024261474609375, 0.023651123046875, -0.00865936279296875, 0.0045318603515625, -0.0147552490234375, 0.0089569091796875, 0.005367279052734375, 0.01329803466796875, -0.031829833984375, 0.0113525390625, 0.0243072509765625, -0.02630615234375, 0.0190277099609375, -0.033935546875, -0.0032176971435546875, 0.016754150390625, -0.01528167724609375, -0.041107177734375, -0.02685546875, -0.0201568603515625, 0.006572723388671875, 0.013763427734375, -0.008575439453125, 0.05645751953125, 0.0511474609375, -0.0428466796875, -0.0142059326171875, -0.053558349609375, 0.007610321044921875, -0.0113983154296875, -0.05438232421875, 0.044281005859375, -0.0082550048828125, 0.050750732421875, -0.009521484375, -0.018157958984375, -0.02679443359375, -0.031341552734375, 0.0330810546875, 0.048370361328125, 0.0175018310546875, 0.0335693359375, 0.0286865234375, 0.050567626953125, 0.05450439453125, -0.01532745361328125, 0.0186767578125, 0.006084442138671875, 0.024322509765625, 0.042816162109375, 0.0018634796142578125, -0.0150299072265625, 0.0019817352294921875, -0.0208587646484375, -0.0017185211181640625, 0.032928466796875, -0.00800323486328125, -0.00623321533203125, -0.0241241455078125, 0.041046142578125, 0.000335693359375, 0.01007843017578125, 0.01125335693359375, -0.0174102783203125, 0.0209808349609375, 0.05242919921875, 0.032806396484375, 0.03759765625, -0.0194091796875, 0.0367431640625, -0.0040740966796875, -0.01812744140625, 0.0130767822265625, 0.0248870849609375, -0.01111602783203125, -0.0006022453308105469, -0.0127410888671875, -0.01561737060546875, 0.0189208984375, 0.01505279541015625, -0.00689697265625, 0.022430419921875, 0.03955078125, -0.002742767333984375, -0.00799560546875, -0.0258331298828125, 0.041748046875, -0.0168304443359375, -0.030181884765625, 0.0081634521484375, 0.0198211669921875, 0.042724609375, -0.0244293212890625, 0.0159454345703125, 0.011138916015625, 0.006549835205078125, 0.040802001953125, 0.001766204833984375, 0.0012388229370117188, -0.00933074951171875, 0.061859130859375, 0.03839111328125, -0.0216827392578125, 0.020782470703125, 0.00284576416015625, -0.06353759765625, 0.0181884765625, 0.00931549072265625, -0.0080718994140625, 0.0160980224609375, -0.0789794921875, 0.01739501953125, -0.0003426074981689453, 0.034210205078125, -0.0218048095703125, -0.0230865478515625, -0.0111236572265625, -0.0024318695068359375, -0.0648193359375, -0.06634521484375, 0.0298614501953125, -0.0994873046875, 0.04559326171875, 0.0247344970703125, -0.04400634765625, -0.052947998046875, 0.09051513671875, 0.0029430389404296875, 0.038726806640625, -0.0164947509765625, -0.0190277099609375, -0.021087646484375, -0.06671142578125, -0.0484619140625, 0.007244110107421875, -0.00853729248046875, -0.0128631591796875, 0.053497314453125, -0.0173797607421875, -0.089599609375, -0.0692138671875, -0.001544952392578125, -0.015411376953125, -0.0185699462890625, 0.04248046875, 0.01358795166015625, -0.0299835205078125, 0.0202789306640625, -0.01349639892578125, 0.0299835205078125, -0.0472412109375, -0.017852783203125, -0.0185394287109375, -0.0006761550903320312, 0.012481689453125, 0.043182373046875, 0.0181884765625, 0.031829833984375, 0.0574951171875, -0.00560760498046875, -0.044830322265625, -0.029632568359375, -0.07073974609375, 0.00010704994201660156, 0.04473876953125, 0.024932861328125, -0.032379150390625, 0.00577545166015625, -0.038299560546875, -0.025909423828125, 0.02777099609375, -0.040618896484375, 0.0452880859375, -0.00443267822265625, -0.02935791015625, 0.0052642822265625, 0.0487060546875, -0.016265869140625, 0.0304412841796875, 0.038818359375, 0.0201568603515625, 0.0247039794921875, -0.049163818359375, -0.0062255859375, -0.022369384765625, 0.03826904296875, -0.03240966796875, 0.026275634765625, -0.038848876953125, -0.0181732177734375, 0.0006918907165527344, 0.06951904296875, -0.052398681640625, -0.047332763671875, 0.0340576171875, 0.0204620361328125, 0.01369476318359375, -0.0036144256591796875, -0.00360107421875, -0.047637939453125, -0.09710693359375, 0.0083465576171875, -0.020843505859375, -0.018585205078125, 0.004146575927734375, -0.0263214111328125, -0.0302276611328125, -0.06243896484375, 0.01398468017578125, -0.0303802490234375, -0.00978851318359375, -0.00966644287109375, -0.032501220703125, -0.01250457763671875, -0.01084136962890625, -0.029022216796875, -0.0740966796875, -0.023529052734375, -0.01082611083984375, 0.070068359375, 0.0177764892578125, -0.03680419921875, -0.01532745361328125, 0.055938720703125, 0.01491546630859375, 0.0227508544921875, 0.030303955078125, -0.004001617431640625, 0.04052734375, 0.0162506103515625, 0.0166168212890625, -0.0254364013671875, 0.0027980804443359375, -0.017974853515625, -0.0390625, 0.0027618408203125, -0.0175628662109375, 0.0236663818359375, -0.00628662109375, -0.016357421875, -0.0258636474609375, -0.004673004150390625, 0.039581298828125, 0.0063629150390625, 0.00250244140625, 0.0197601318359375, 0.012908935546875, -0.002471923828125, 0.0084228515625, 0.0614013671875, -0.034423828125, 0.0090179443359375, 0.027740478515625, 0.028594970703125, -0.03900146484375, -0.05535888671875, 0.06646728515625, 0.03619384765625, -0.040283203125, 0.08319091796875, 0.020172119140625, -0.0271453857421875, 0.086669921875, -0.02142333984375, -0.0103607177734375, -0.006458282470703125, 0.02130126953125, 0.0032100677490234375, -0.044891357421875, 0.03179931640625, -0.01348114013671875, 0.0205078125, 0.039520263671875, -0.0208282470703125, -0.00250244140625, -0.0087127685546875, 0.0177459716796875, -0.037841796875, 0.0263214111328125, -0.008453369140625, -0.033935546875, -0.0018510818481445312, -0.0290985107421875, 0.0142974853515625, 0.0306549072265625, -0.01543426513671875, -0.00017499923706054688, 0.0245361328125, -0.00003981590270996094, -0.046783447265625, -0.0243377685546875, -0.008392333984375, 0.0311431884765625, -0.061248779296875, -0.0009112358093261719, -0.0149993896484375, -0.00574493408203125, 0.011932373046875, 0.016143798828125, -0.0247650146484375, 0.003978729248046875, -0.016021728515625, 0.0175323486328125, 0.01357269287109375, -0.03961181640625, 0.019744873046875, 0.0379638671875, 0.00843048095703125, 0.0396728515625, -0.0467529296875, 0.0018358230590820312, -0.015625, 0.01415252685546875, 0.0199127197265625, 0.00399017333984375, 0.01197052001953125, 0.07635498046875, -0.003910064697265625, 0.034942626953125, -0.0111083984375, -0.028594970703125, -0.0109100341796875, 0.090087890625, 0.039581298828125, -0.0887451171875, -0.012298583984375, 0.075439453125, -0.003482818603515625, -0.00769805908203125, 0.0162811279296875, 0.005039215087890625, 0.0096435546875, -0.01837158203125, -0.0166473388671875, 0.043182373046875, -0.0179595947265625, -0.00672149658203125, 0.0282135009765625, 0.00859832763671875, -0.01364898681640625, -0.0369873046875, -0.02630615234375, 0.035308837890625, 0.0063323974609375, -0.0228729248046875, 0.0177764892578125, -0.037322998046875, 0.0267791748046875, 0.0283660888671875, -0.01898193359375, 0.0169219970703125, 0.00939178466796875, 0.03143310546875, -0.0202789306640625, -0.017913818359375, -0.00360107421875, 0.011260986328125, -0.034210205078125, -0.020172119140625, 0.07171630859375, -0.031646728515625, 0.0241546630859375, -0.05157470703125, 0.0304412841796875, -0.0587158203125, -0.0005884170532226562, 0.057769775390625, 0.034698486328125, -0.0711669921875, -0.0037384033203125, -0.08599853515625, -0.0202789306640625, -0.018310546875, -0.022979736328125, -0.037353515625, 0.00313568115234375, 0.02264404296875, 0.0340576171875, 0.0055084228515625, -0.013916015625, 0.0116119384765625, 0.04168701171875, 0.0213165283203125, 0.08880615234375, -0.0119476318359375, 0.0511474609375, 0.03857421875, 0.0716552734375, 0.013519287109375, 0.00774383544921875, -0.04486083984375, -0.01534271240234375, 0.0408935546875, 0.0006489753723144531, -0.036041259765625, -0.0294952392578125, -0.00994873046875, -0.0615234375, -0.004558563232421875, -0.01165008544921875, -0.0430908203125, -0.0131072998046875, -0.007152557373046875, -0.01617431640625, 0.0638427734375, 0.006320953369140625, -0.044158935546875, -0.0164794921875, -0.044189453125, 0.01947021484375, 0.003871917724609375, -0.00402069091796875, 0.042327880859375, -0.030364990234375, 0.0292816162109375, 0.0567626953125, -0.04522705078125, 0.0828857421875, 0.0665283203125, 0.00908660888671875, 0.0384521484375, 0.0151214599609375, 0.01318359375, -0.0038661956787109375, -0.0238494873046875, -0.01312255859375, 0.026214599609375, 0.045989990234375, -0.0118408203125, 0.022552490234375, 0.0386962890625, -0.009552001953125, -0.00406646728515625, 0.0263824462890625, 0.049224853515625, -0.034515380859375, 0.0176239013671875, 0.036834716796875, -0.0006899833679199219, 0.0235595703125, -0.00408172607421875, -0.04193115234375, -0.060882568359375, 0.05242919921875, -0.02935791015625, -0.021026611328125, 0.004596710205078125, 0.0009169578552246094, 0.00028133392333984375, -0.004787445068359375, 0.07550048828125, 0.0439453125, -0.035675048828125, -0.0194854736328125, 0.0266265869140625, 0.0105133056640625, -0.04412841796875, -0.0135040283203125, -0.006320953369140625, -0.01465606689453125, -0.04949951171875, 0.0017671585083007812, -0.038299560546875, 0.0300140380859375, -0.01436614990234375, 0.0244903564453125, 0.009429931640625, 0.0452880859375, -0.011749267578125, -0.0193939208984375, 0.025390625, -0.0176544189453125, -0.05645751953125, -0.0252838134765625, -0.004726409912109375, -0.02191162109375, -0.0200958251953125, 0.0236053466796875, -0.03564453125, -0.0215911865234375, -0.00212860107421875, -0.0309295654296875, 0.034088134765625, 0.01445770263671875, -0.046844482421875, 0.01380157470703125, -0.044525146484375, 0.0022640228271484375, 0.0298309326171875, 0.04315185546875, -0.0155181884765625, 0.01093292236328125, 0.035919189453125, 0.0012273788452148438, 0.01092529296875, 0.042633056640625, -0.0389404296875, 0.08074951171875, -0.01374053955078125, -0.0146636962890625, 0.0066680908203125, 0.04498291015625, -0.0237274169921875, 0.024383544921875, -0.0310821533203125, 0.034912109375, -0.005889892578125, 0.0090179443359375, -0.042510986328125, -0.007434844970703125, -0.0165252685546875, 0.01187896728515625, 0.028167724609375, -0.0106201171875, -0.006244659423828125, 0.0032100677490234375, 0.08990478515625, 0.0755615234375, 0.0171356201171875, 0.008514404296875, 0.0193328857421875, 0.0165863037109375, 0.0439453125, -0.002841949462890625, 0.0391845703125, -0.0160369873046875, -0.0032291412353515625, 0.053680419921875, 0.00994110107421875, 0.007396697998046875, -0.00356292724609375, -0.0474853515625, -0.03759765625, 0.00482940673828125, 0.0202789306640625, -0.0012006759643554688, -0.00007665157318115234, 0.0697021484375, 0.06390380859375, -0.0511474609375, -0.01390838623046875, -0.042572021484375, 0.06756591796875, 0.01024627685546875, 0.00904083251953125, 0.040679931640625, 0.0173492431640625, -0.0311126708984375, -0.0032176971435546875, 0.00577545166015625, -0.0234527587890625, 0.004314422607421875, 0.0247344970703125, 0.003414154052734375, 0.01053619384765625, -0.05010986328125, -0.06396484375, 0.03985595703125, 0.054351806640625, -0.0048828125, -0.004154205322265625, 0.0241851806640625, 0.016571044921875, -0.024017333984375, 0.0117340087890625, 0.00957489013671875, 0.044830322265625, 0.039947509765625, -0.026214599609375, -0.00981903076171875, 0.022430419921875, 0.037078857421875, 0.005519866943359375, -0.0037174224853515625, -0.039825439453125, -0.039337158203125, -0.0253143310546875, 0.0282135009765625, 0.033294677734375, 0.01151275634765625, -0.01136016845703125, 0.02093505859375, 0.0129547119140625, 0.006679534912109375, -0.0008764266967773438, 0.0260467529296875, 0.0119781494140625, -0.00620269775390625, 0.015625, 0.0027008056640625, 0.0043487548828125, 0.01537322998046875, 0.0391845703125, 0.00914764404296875, 0.0277099609375, -0.00980377197265625, -0.034149169921875, -0.00814056396484375, -0.0222625732421875, -0.023773193359375, -0.0015354156494140625, -0.03106689453125, 0.014251708984375, 0.0279083251953125, -0.00555419921875, -0.0108642578125, -0.015960693359375, 0.07232666015625, -0.043121337890625, 0.0274505615234375, -0.0166473388671875, -0.0069580078125, 0.0184326171875, -0.03302001953125, 0.0021343231201171875, -0.0399169921875, -0.054840087890625, -0.0189361572265625, -0.0164031982421875, 0.0005507469177246094, 0.0204620361328125, 0.038177490234375, 0.0188140869140625, -0.004241943359375, 0.0276641845703125, -0.00756072998046875, 0.01377105712890625, -0.0233306884765625, 0.03753662109375, 0.04827880859375, 0.01268768310546875, 0.0521240234375, -0.028778076171875, -0.018524169921875, 0.01020050048828125, 0.022491455078125, 0.0200042724609375, -0.0167694091796875, 0.031982421875, 0.021942138671875, -0.004749298095703125, 0.023834228515625, -0.06439208984375, -0.0513916015625, 0.058197021484375, -0.0478515625, -0.004241943359375, 0.01137542724609375, -0.0292510986328125, 0.0501708984375, 0.043487548828125, -0.0003266334533691406, 0.0102996826171875, 0.002368927001953125, 0.007556915283203125, -0.006702423095703125, 0.044891357421875, -0.0211181640625, -0.0271453857421875, 0.0264434814453125, 0.003696441650390625, 0.0003676414489746094, 0.0169525146484375, 0.017547607421875, 0.011627197265625, 0.00440216064453125, -0.01404571533203125, 0.01068115234375, -0.00959014892578125, 0.003940582275390625, 0.01157379150390625, 0.016510009765625, 0.0135650634765625, -0.01412200927734375, -0.031494140625, 0.0438232421875, -0.017486572265625, 0.04266357421875, -0.01477813720703125, 0.048614501953125, 0.02484130859375, -0.033111572265625, 0.007965087890625, 0.000278472900390625, -0.00746917724609375, -0.007022857666015625, 0.007110595703125, -0.0261383056640625, -0.02886962890625, -0.0206298828125, -0.035308837890625, -0.0055389404296875, 0.0218505859375, -0.0254974365234375, -0.0250701904296875, -0.01739501953125, -0.032318115234375, 0.0026454925537109375, -0.01184844970703125, 0.0103607177734375, -0.0096893310546875, -0.01666259765625, -0.0298004150390625, -0.0274505615234375, -0.0152130126953125, 0.00934600830078125, 0.0028438568115234375, -0.0295562744140625, -0.004848480224609375, -0.033935546875, 0.00528717041015625, -0.0026702880859375, -0.021270751953125, 0.00302886962890625, 0.01120758056640625, -0.004001617431640625, 0.00008815526962280273, -0.00814056396484375, 0.035614013671875, -0.04998779296875, -0.005435943603515625, 0.00478363037109375, -0.007503509521484375, -0.00439453125, -0.07501220703125, 0.01059722900390625, -0.0645751953125, -0.0222015380859375, 0.000058650970458984375, -0.03759765625, -0.033599853515625, -0.05718994140625, -0.056304931640625, 0.03955078125, 0.006626129150390625, -0.0310821533203125, -0.0160064697265625, 0.024932861328125, 0.01113128662109375, -0.04083251953125, -0.0188751220703125, 0.0176239013671875, 0.00299072265625, -0.005523681640625, 0.0202178955078125, 0.072265625, -0.034912109375, 0.034881591796875, -0.042083740234375, 0.03619384765625, -0.00928497314453125, 0.0290985107421875, -0.00685882568359375, -0.00724029541015625, 0.016937255859375, 0.03326416015625, -0.055755615234375, -0.03875732421875, -0.017822265625, 0.053375244140625, -0.01335906982421875, -0.0174407958984375, -0.06781005859375, -0.030609130859375, 0.0701904296875, 0.08599853515625, 0.01297760009765625, -0.0367431640625, 0.0279541015625, 0.007213592529296875, -0.027801513671875, -0.0025119781494140625, 0.0219268798828125, -0.06195068359375, -0.01959228515625, 0.025299072265625, -0.0248870849609375, -0.00806427001953125, -0.0311279296875, -0.05145263671875, -0.0020198822021484375, -0.036468505859375, 0.00139617919921875, -0.0287628173828125, 0.0032215118408203125, 0.047454833984375, -0.050537109375, -0.039642333984375, -0.0269622802734375, 0.0318603515625, -0.01195526123046875, -0.0626220703125, -0.021514892578125, 0.0211181640625, -0.0101165771484375, -0.0152130126953125, 0.016021728515625, 0.02471923828125, 0.0167694091796875, 0.00928497314453125, 0.04248046875, -0.0079803466796875, -0.01361083984375, -0.0259246826171875, -0.0039043426513671875, -0.0059356689453125, -0.051849365234375, 0.01800537109375, -0.0120849609375, 0.04852294921875, -0.006343841552734375, 0.0426025390625, -0.0460205078125, -0.0048065185546875, -0.025726318359375, -0.038543701171875, 0.0079498291015625, -0.0024967193603515625, -0.006626129150390625, -0.033721923828125, 0.0247955322265625, -0.05316162109375, -0.006191253662109375, 0.022064208984375 ]
11b32dcf16729393d06e9819fc4e06aefa739d01
Wordpress Stackexchange Q: How to disable page delete My client is not a computer person. I created a website for him. There is some important pages. My client is always delete this page. Then i want to reconfigure the code (the page id). How do i disable delete options for particular pages. PS: He may able to EDIT these page. Not Delete. A: Brian Fegter's answer is almost perfect. In my testing his answer will only work if you change the actions to "wp_trash_post" and "before_delete_post" function restrict_post_deletion($post_ID){ $user = get_current_user_id(); $restricted_users = array(21,25,54,2,19); $restricted_pages = array(2,21,52,64); if(in_array($user, $restricted_users) && in_array($post_ID, $restricted_pages)){ echo "You are not authorized to delete this page."; exit; } } add_action('wp_trash_post', 'restrict_post_deletion', 10, 1); add_action('before_delete_post', 'restrict_post_deletion', 10, 1);
Q: How to disable page delete My client is not a computer person. I created a website for him. There is some important pages. My client is always delete this page. Then i want to reconfigure the code (the page id). How do i disable delete options for particular pages. PS: He may able to EDIT these page. Not Delete. A: Brian Fegter's answer is almost perfect. In my testing his answer will only work if you change the actions to "wp_trash_post" and "before_delete_post" function restrict_post_deletion($post_ID){ $user = get_current_user_id(); $restricted_users = array(21,25,54,2,19); $restricted_pages = array(2,21,52,64); if(in_array($user, $restricted_users) && in_array($post_ID, $restricted_pages)){ echo "You are not authorized to delete this page."; exit; } } add_action('wp_trash_post', 'restrict_post_deletion', 10, 1); add_action('before_delete_post', 'restrict_post_deletion', 10, 1); A: You can create an action to restrict users from trashing or deleting posts as follows. It's not the prettiest, but it works. You will have to manually populate the user and page ID's. function restrict_post_deletion($post_ID){ $user = get_current_user_id(); $restricted_users = array(21,25,54,2,19); $restricted_pages = array(2,21,52,64); if(in_array($user, $restricted_users) && in_array($post_ID, $restricted_pages)){ echo "You are not authorized to delete this page."; exit; } } add_action('trash_post', 'restrict_post_deletion', 10, 1); add_action('delete_post', 'restrict_post_deletion', 10, 1); A: You can remove the capabilites delete_pages, delete_others_pages and delete_published_pages from the role which the user is assigned to. This will prevent the complete user role from deleting pages. To restrict this behavior only to one user, you have to create and assign a dedicated, new role to the user. Look at the Members plugin from Justin Tadlock for more information. Example: Remove the ability to delete pages from admin role $role = get_role('administrator'); $role->remove_cap('delete_pages'); $role->remove_cap('delete_others_pages'); $role->remove_cap('delete_published_pages'); More resources * *Codex: Roles & Capabilities *Codex: get_role() A: Here's an example that I tested and found working of how to prevent deletion of a specific post or page by its' ID. It should work for all wordpress users: add_action('wp_trash_post', 'prevent_post_deletion'); function prevent_post_deletion($postid){ $protected_post_id = 67586; if ($postid == $protected_post_id) { exit('The page you were trying to delete is protected.'); } } A: You could very easily hide the trash links from both the quick edit and the meta box. DO one using styles and the other using post_row_actions filter (you may be able to do both sith the filter - dunno) https://developer.wordpress.org/reference/hooks/post_row_actions/ //hide meta with styles function hide_publishing_actions() { global $post; if ($post_id == 21) { if (!current_user_can('administrator')) { // stuff here for non-admins echo '<style type="text/css">#delete-action</style>'; } } } add_action('admin_head-post.php', 'hide_publishing_actions'); add_action('admin_head-post-new.php', 'hide_publishing_actions'); //for quick edit add_filter('post_row_actions', 'remove_row_actions', 10, 1); function remove_row_actions($actions) { if (!current_user_can('administrator')) { if ($post_id == 21) unset($actions['edit']); unset($actions['view']); unset($actions['trash']); unset($actions['inline hide-if-no-js']); } return $actions; } A: You could also use the filter page_row_actions (see https://developer.wordpress.org/reference/hooks/page_row_actions/) which is called for every page in the page list table. You have to check the id of the post you don't want to be edited or delete you can modify the action array for these pages. If your return an empty array, the page will still be listed in the page list table, but there are not links for edit,delete,... Therefore the page could not be edited or deleted. Your function should like this (Note: In my example code only the site admin has the right to modify the special page): function custom_filter_page_row_actions($actions,$post){ $page_to_exclude = get_page_by_path(Slug of the page you want to exclude); $site_admin_email = get_option('admin_email'); // Get the email of the site admin $site_admin = get_user_by('email',$site_admin_email); // Get WP_User-instance of the site admin if(($post == $page_to_exclude) && ($site_admin != wp_get_current_user())){ $actions = array(); //remove all actions } return $actions; } add_filter('page_row_actions','custom_filter_page_row_actions',999999,2); //Use a high number for this filter so that it is called after all plugins e.g. WPBakery Pagebuilder has add there actions
wordpress
{ "language": "en", "length": 604, "provenance": "stackexchange_00019.jsonl.gz:413319", "question_score": "7", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29357" }
[ 0.046661376953125, 0.0225982666015625, -0.01103973388671875, 0.01413726806640625, 0.01904296875, -0.04730224609375, 0.048095703125, -0.042938232421875, 0.0596923828125, -0.022705078125, -0.0289306640625, -0.04327392578125, 0.0297088623046875, -0.047943115234375, 0.026336669921875, -0.0200958251953125, 0.0258941650390625, 0.0192413330078125, 0.0577392578125, -0.007625579833984375, 0.0163726806640625, 0.0030345916748046875, 0.05255126953125, 0.038299560546875, 0.0019550323486328125, -0.00424957275390625, 0.043426513671875, -0.0209197998046875, -0.010711669921875, -0.0265960693359375, 0.01219940185546875, 0.0218353271484375, -0.0131378173828125, 0.032958984375, -0.0016374588012695312, -0.0086669921875, -0.0205841064453125, 0.0242156982421875, 0.0269927978515625, 0.007541656494140625, 0.055877685546875, -0.0362548828125, -0.016632080078125, -0.019989013671875, -0.01390838623046875, -0.00849151611328125, 0.0338134765625, -0.017669677734375, 0.01544952392578125, -0.00022268295288085938, 0.00933074951171875, 0.0165252685546875, 0.03515625, -0.0105743408203125, -0.03289794921875, -0.030303955078125, 0.016510009765625, 0.0121002197265625, 0.048248291015625, -0.012664794921875, -0.05078125, -0.000335693359375, 0.005527496337890625, -0.051483154296875, 0.022674560546875, -0.0169525146484375, -0.01080322265625, 0.034149169921875, -0.06561279296875, -0.00923919677734375, 0.0482177734375, -0.047027587890625, 0.02606201171875, -0.02935791015625, 0.0171051025390625, -0.002063751220703125, 0.01139068603515625, 0.027801513671875, -0.005077362060546875, 0.0022983551025390625, 0.006809234619140625, 0.0207061767578125, -0.06280517578125, -0.0126800537109375, -0.006549835205078125, 0.007595062255859375, -0.010009765625, -0.0121917724609375, -0.0250091552734375, 0.0236968994140625, -0.032196044921875, 0.0079498291015625, 0.05865478515625, -0.0262908935546875, -0.05133056640625, 0.005313873291015625, 0.023406982421875, 0.0278778076171875, 0.00595855712890625, -0.01166534423828125, 0.0292816162109375, -0.055084228515625, 0.0187530517578125, -0.0288848876953125, -0.009490966796875, 0.02264404296875, 0.00019156932830810547, -0.0101165771484375, 0.00872802734375, 0.03497314453125, 0.0045166015625, -0.0200042724609375, -0.0081024169921875, -0.029327392578125, -0.027618408203125, -0.0014667510986328125, -0.042694091796875, 0.0121612548828125, 0.01033782958984375, -0.0086822509765625, -0.0073394775390625, 0.019256591796875, -0.0282440185546875, -0.0157012939453125, 0.003940582275390625, -0.0098114013671875, 0.002536773681640625, -0.01136016845703125, 0.045257568359375, -0.01430511474609375, -0.054901123046875, 0.0255584716796875, 0.08837890625, 0.011932373046875, 0.025970458984375, -0.00945281982421875, -0.0035648345947265625, -0.02325439453125, 0.00998687744140625, 0.0023250579833984375, 0.01340484619140625, -0.032745361328125, 0.01311492919921875, 0.0164947509765625, 0.010711669921875, 0.033203125, 0.022613525390625, 0.006755828857421875, -0.0194854736328125, -0.0362548828125, -0.001277923583984375, -0.01348114013671875, 0.031585693359375, 0.003917694091796875, -0.006317138671875, -0.061065673828125, 0.050140380859375, -0.052520751953125, 0.0008282661437988281, -0.061981201171875, 0.0312347412109375, 0.0167083740234375, 0.03704833984375, -0.016632080078125, -0.05450439453125, -0.0222320556640625, -0.06085205078125, -0.0294189453125, 0.0159912109375, 0.01397705078125, 0.0272674560546875, -0.0594482421875, -0.03961181640625, -0.008758544921875, -0.006786346435546875, 0.047576904296875, 0.003631591796875, -0.03106689453125, 0.0265655517578125, 0.007030487060546875, -0.031524658203125, -0.021209716796875, 0.0157928466796875, -0.007293701171875, -0.059326171875, 0.036590576171875, 0.0209197998046875, 0.061737060546875, -0.018463134765625, 0.0188446044921875, 0.0572509765625, 0.03179931640625, 0.0081939697265625, 0.003856658935546875, 0.05047607421875, -0.0667724609375, -0.0172576904296875, -0.06158447265625, 0.01251983642578125, 0.0170135498046875, 0.022308349609375, -0.022979736328125, 0.0179595947265625, -0.0479736328125, -0.095458984375, -0.007526397705078125, -0.03582763671875, 0.045745849609375, -0.01232147216796875, 0.01268768310546875, 0.036865234375, 0.0028400421142578125, -0.03924560546875, 0.00450897216796875, -0.0167236328125, 0.017486572265625, -0.00688934326171875, 0.0253143310546875, -0.00403594970703125, 0.0297393798828125, 0.008270263671875, -0.039794921875, 0.006443023681640625, 0.002323150634765625, 0.06988525390625, -0.035736083984375, 0.005764007568359375, -0.04095458984375, 0.051849365234375, -0.01366424560546875, -0.007694244384765625, 0.036285400390625, 0.0289459228515625, 0.041015625, 0.00807952880859375, 0.006504058837890625, -0.01047515869140625, -0.0928955078125, -0.007335662841796875, 0.0443115234375, 0.0377197265625, 0.0455322265625, 0.01424407958984375, 0.032196044921875, 0.0340576171875, -0.060028076171875, 0.005718231201171875, 0.01314544677734375, 0.0159149169921875, 0.045135498046875, 0.021331787109375, 0.01165771484375, 0.01080322265625, -0.01171875, 0.016571044921875, 0.033172607421875, -0.041961669921875, 0.0016069412231445312, 0.035186767578125, -0.032745361328125, 0.00162506103515625, -0.0102386474609375, 0.024017333984375, -0.031707763671875, 0.0238189697265625, -0.010009765625, 0.0247802734375, 0.01476287841796875, 0.00328826904296875, 0.0009503364562988281, 0.00389862060546875, -0.085205078125, -0.01451873779296875, -0.00685882568359375, 0.0310211181640625, -0.0204620361328125, -0.03143310546875, 0.0190582275390625, 0.00156402587890625, -0.00765228271484375, -0.0174713134765625, -0.003559112548828125, 0.01335906982421875, -0.008270263671875, 0.0010509490966796875, -0.0276947021484375, 0.033111572265625, 0.0111083984375, -0.03948974609375, -0.0166473388671875, -0.0007796287536621094, 0.024932861328125, -0.025848388671875, 0.00789642333984375, 0.0255889892578125, -0.003925323486328125, 0.0254364013671875, -0.047210693359375, 0.0275115966796875, -0.03607177734375, 0.038970947265625, 0.06402587890625, -0.01145172119140625, -0.003620147705078125, 0.03607177734375, -0.01366424560546875, 0.051025390625, 0.01251983642578125, 0.0118560791015625, 0.026336669921875, -0.061614990234375, 0.00959014892578125, -0.0009427070617675781, -0.00749969482421875, 0.00406646728515625, -0.0198516845703125, 0.004245758056640625, -0.012603759765625, -0.045745849609375, -0.015472412109375, 0.0171966552734375, -0.02288818359375, 0.0221099853515625, -0.0012979507446289062, 0.0143585205078125, -0.0345458984375, 0.032745361328125, 0.006435394287109375, -0.06298828125, 0.006465911865234375, 0.0321044921875, -0.0149688720703125, 0.0192413330078125, -0.0105438232421875, -0.0102996826171875, -0.0121307373046875, -0.0028057098388671875, 0.111572265625, -0.0049591064453125, -0.089599609375, -0.0494384765625, -0.030609130859375, -0.0394287109375, -0.01263427734375, 0.01361846923828125, 0.006435394287109375, 0.017578125, 0.0134429931640625, 0.008056640625, 0.0152130126953125, -0.015106201171875, -0.026611328125, -0.0294342041015625, -0.003719329833984375, 0.0037841796875, -0.00931549072265625, 0.0202178955078125, 0.021759033203125, -0.0043792724609375, -0.034332275390625, -0.03533935546875, -0.0445556640625, -0.0704345703125, 0.017059326171875, 0.049468994140625, 0.026214599609375, -0.024169921875, 0.01458740234375, 0.046600341796875, 0.012298583984375, 0.004047393798828125, 0.028411865234375, 0.014190673828125, -0.003932952880859375, 0.0310821533203125, -0.037811279296875, 0.043182373046875, 0.0025196075439453125, 0.00860595703125, 0.0150604248046875, 0.01348876953125, -0.0228271484375, 0.0163421630859375, -0.0625, -0.02581787109375, 0.0374755859375, -0.03204345703125, -0.01033782958984375, -0.00096893310546875, -0.00838470458984375, 0.0189056396484375, 0.0634765625, -0.0274200439453125, -0.051971435546875, -0.0526123046875, 0.0010747909545898438, 0.032623291015625, -0.02252197265625, 0.06158447265625, -0.0311737060546875, -0.0889892578125, 0.0160064697265625, -0.004978179931640625, -0.0273895263671875, -0.029693603515625, 0.0113067626953125, -0.047943115234375, -0.034454345703125, 0.0269775390625, -0.08599853515625, -0.01032257080078125, 0.004779815673828125, -0.04412841796875, -0.0272216796875, -0.0318603515625, -0.03753662109375, -0.0697021484375, 0.005878448486328125, -0.01207733154296875, 0.0262908935546875, 0.019622802734375, -0.0191192626953125, 0.00775909423828125, 0.04144287109375, 0.02471923828125, 0.007785797119140625, 0.00897216796875, -0.01454925537109375, 0.005641937255859375, -0.00247955322265625, 0.01342010498046875, -0.0289154052734375, 0.029205322265625, 0.02880859375, 0.004913330078125, 0.00009083747863769531, -0.05267333984375, -0.03082275390625, 0.0077056884765625, -0.05633544921875, -0.061309814453125, -0.04425048828125, -0.050506591796875, -0.0023441314697265625, -0.034423828125, -0.01303863525390625, -0.046356201171875, -0.09381103515625, 0.0560302734375, -0.01446533203125, 0.0168914794921875, -0.00214385986328125, 0.07196044921875, -0.0083160400390625, -0.0197601318359375, -0.004245758056640625, 0.01078033447265625, -0.0018320083618164062, -0.0241851806640625, 0.074462890625, 0.0198516845703125, 0.0147705078125, 0.04510498046875, -0.026031494140625, -0.01522064208984375, -0.0298614501953125, 0.051055908203125, -0.032958984375, -0.034271240234375, 0.016357421875, -0.0714111328125, 0.064208984375, 0.055328369140625, 0.005977630615234375, -0.00479888916015625, 0.029144287109375, 0.0166473388671875, -0.0220184326171875, -0.039398193359375, -0.02508544921875, 0.0019102096557617188, -0.01306915283203125, 0.023101806640625, 0.034454345703125, 0.037933349609375, -0.0029926300048828125, 0.01070404052734375, 0.041778564453125, 0.00803375244140625, -0.0009918212890625, 0.033660888671875, -0.0081939697265625, 0.055816650390625, -0.0254058837890625, 0.0052642822265625, -0.023468017578125, -0.0092010498046875, 0.0738525390625, -0.0060272216796875, -0.04425048828125, -0.031341552734375, -0.02032470703125, 0.027679443359375, 0.01267242431640625, 0.00859832763671875, 0.031707763671875, 0.010528564453125, -0.0007028579711914062, 0.0006794929504394531, -0.00702667236328125, 0.0057373046875, -0.0499267578125, 0.004791259765625, 0.0012607574462890625, -0.0079345703125, 0.0224761962890625, 0.047882080078125, -0.0030307769775390625, 0.03985595703125, -0.016387939453125, 0.05926513671875, 0.055816650390625, 0.00982666015625, 0.0011701583862304688, 0.0325927734375, -0.01045989990234375, -0.0051116943359375, -0.0185089111328125, -0.0201416015625, -0.0254669189453125, 0.0299835205078125, 0.0231475830078125, -0.0172576904296875, -0.00882720947265625, 0.005756378173828125, -0.006664276123046875, -0.00637054443359375, 0.033843994140625, 0.011566162109375, -0.06622314453125, -0.0017948150634765625, 0.0241851806640625, 0.0020236968994140625, -0.02685546875, -0.00740814208984375, 0.001705169677734375, -0.031524658203125, -0.008056640625, 0.01316070556640625, -0.030914306640625, -0.0159149169921875, 0.0032329559326171875, 0.0159149169921875, -0.02581787109375, -0.007617950439453125, -0.0127105712890625, 0.01442718505859375, -0.01654052734375, -0.00560760498046875, 0.01064300537109375, -0.00563812255859375, 0.041351318359375, -0.002899169921875, -0.0241546630859375, 0.05157470703125, 0.00894927978515625, 0.052490234375, 0.0025177001953125, -0.0283966064453125, -0.026397705078125, -0.061248779296875, -0.0330810546875, -0.050537109375, -0.03564453125, -0.047576904296875, 0.012115478515625, 0.00890350341796875, 0.0024356842041015625, -0.00537109375, 0.00511932373046875, -0.00042819976806640625, 0.048492431640625, 0.0149993896484375, 0.045257568359375, -0.01464080810546875, 0.0645751953125, 0.0022125244140625, 0.047393798828125, 0.027252197265625, 0.0419921875, -0.00881195068359375, -0.0229949951171875, 0.002391815185546875, -0.0196990966796875, -0.01003265380859375, -0.0129852294921875, -0.031646728515625, 0.0189208984375, 0.05908203125, -0.007354736328125, -0.007160186767578125, -0.03582763671875, -0.008453369140625, -0.05230712890625, 0.07220458984375, -0.034332275390625, 0.0193634033203125, -0.040740966796875, -0.047576904296875, -0.01496124267578125, 0.0135498046875, -0.005214691162109375, 0.0204620361328125, -0.01097869873046875, 0.01375579833984375, 0.017059326171875, -0.0233154296875, 0.0193939208984375, 0.056549072265625, 0.00382232666015625, 0.05206298828125, -0.006221771240234375, 0.0156707763671875, 0.045654296875, 0.01214599609375, -0.00836944580078125, -0.00921630859375, 0.0428466796875, 0.003940582275390625, -0.01517486572265625, 0.018798828125, -0.0190887451171875, 0.0302276611328125, 0.07720947265625, 0.07110595703125, -0.11907958984375, 0.007293701171875, 0.0072479248046875, -0.02093505859375, 0.050140380859375, -0.019287109375, 0.03167724609375, 0.01068878173828125, 0.050628662109375, -0.008209228515625, -0.0171661376953125, 0.01497650146484375, -0.02496337890625, -0.00865936279296875, -0.003818511962890625, 0.003025054931640625, 0.005336761474609375, -0.038177490234375, 0.03057861328125, 0.0216217041015625, 0.0263671875, -0.027313232421875, 0.014617919921875, 0.00395965576171875, -0.016876220703125, -0.06427001953125, 0.0229034423828125, -0.01140594482421875, -0.01299285888671875, 0.0322265625, -0.0183868408203125, -0.01093292236328125, 0.04736328125, -0.024444580078125, 0.0187225341796875, 0.00850677490234375, -0.054840087890625, -0.03302001953125, -0.039215087890625, 0.03106689453125, -0.024139404296875, -0.039886474609375, 0.0270233154296875, -0.01425933837890625, -0.08172607421875, -0.014312744140625, 0.0215911865234375, 0.08819580078125, -0.035614013671875, -0.01494598388671875, 0.0408935546875, 0.0153350830078125, -0.044097900390625, -0.0244293212890625, -0.02880859375, -0.0202789306640625, 0.0018091201782226562, -0.035736083984375, -0.018646240234375, 0.006687164306640625, -0.0305938720703125, -0.050537109375, 0.0823974609375, -0.034515380859375, 0.0229034423828125, 0.0234222412109375, 0.03448486328125, -0.035736083984375, 0.01337432861328125, -0.031585693359375, 0.027099609375, 0.00115966796875, 0.033843994140625, -0.008819580078125, 0.005916595458984375, 0.014404296875, 0.01495361328125, 0.07562255859375, 0.010162353515625, 0.00605010986328125, -0.024810791015625, 0.0355224609375, 0.03997802734375, -0.0141754150390625, 0.0014181137084960938, -0.027679443359375, 0.036376953125, -0.006748199462890625, -0.08203125, 0.0101318359375, -0.054412841796875, -0.026702880859375, -0.0023593902587890625, 0.000026345252990722656, -0.0202484130859375, -0.01959228515625, 0.016845703125, -0.031707763671875, -0.01242828369140625, 0.001674652099609375, -0.0211944580078125, -0.0009760856628417969, 0.0380859375, 0.06268310546875, -0.054718017578125, -0.033050537109375, -0.024444580078125, 0.053680419921875, 0.041595458984375, 0.0289459228515625, 0.049560546875, 0.0248260498046875, 0.0038585662841796875, -0.01470184326171875, 0.01514434814453125, -0.010223388671875, -0.0181427001953125, 0.039947509765625, 0.0333251953125, 0.0078125, -0.0236053466796875, 0.0305328369140625, 0.032073974609375, 0.037628173828125, -0.043731689453125, -0.03167724609375, 0.0028133392333984375, -0.00933074951171875, 0.016387939453125, -0.003124237060546875, 0.0272674560546875, 0.0019063949584960938, 0.036163330078125, -0.01087188720703125, 0.00566864013671875, -0.00016987323760986328, 0.0191650390625, -0.0126953125, 0.0201873779296875, -0.035980224609375, -0.01006317138671875, -0.012969970703125, 0.0032444000244140625, 0.0035457611083984375, -0.01268768310546875, -0.0024585723876953125, 0.002838134765625, 0.0323486328125, 0.024139404296875, -0.014373779296875, 0.035186767578125, -0.00914764404296875, 0.02099609375, -0.06365966796875, -0.07293701171875, 0.01395416259765625, 0.056304931640625, -0.0186920166015625, 0.0016355514526367188, 0.043853759765625, 0.038360595703125, -0.0501708984375, -0.0266265869140625, 0.052764892578125, -0.0328369140625, -0.0150146484375, -0.0179901123046875, -0.02996826171875, -0.004451751708984375, -0.019256591796875, -0.00232696533203125, 0.01328277587890625, -0.00815582275390625, -0.0149688720703125, 0.00447845458984375, 0.00019061565399169922, -0.003986358642578125, 0.052886962890625, 0.0217132568359375, -0.003826141357421875, 0.01181793212890625, -0.03143310546875, 0.0155487060546875, -0.089599609375, -0.05352783203125, 0.0211639404296875, 0.023162841796875, -0.0031223297119140625, 0.0214691162109375, 0.0217742919921875, -0.0011816024780273438, 0.0197601318359375, -0.00244140625, -0.0013780593872070312, 0.0062103271484375, 0.02685546875, 0.005207061767578125, -0.024627685546875, -0.0094451904296875, 0.010833740234375, 0.035430908203125, -0.0038623809814453125, 0.06695556640625, -0.0196685791015625, -0.00246429443359375, -0.01309967041015625, 0.0416259765625, -0.01316070556640625, -0.0292510986328125, 0.050048828125, 0.019500732421875, 0.006298065185546875, -0.00727081298828125, -0.039215087890625, 0.05523681640625, 0.0016584396362304688, -0.0072479248046875, 0.0275421142578125, -0.0195770263671875, 0.0006122589111328125, 0.012481689453125, 0.0018472671508789062, -0.0204315185546875, -0.01070404052734375, -0.00794219970703125, -0.017852783203125, 0.011138916015625, 0.021575927734375, 0.01396942138671875, -0.00705718994140625, -0.00982666015625, -0.02508544921875, 0.015655517578125, 0.0067901611328125, 0.004772186279296875, 0.01788330078125, -0.0133056640625, -0.0362548828125, 0.0038604736328125, -0.00835418701171875, -0.01763916015625, 0.0250701904296875, -0.0026226043701171875, 0.017852783203125, -0.018646240234375, -0.050262451171875, -0.038726806640625, 0.0160369873046875, 0.00894927978515625, -0.012939453125, -0.049407958984375, 0.00818634033203125, -0.0211944580078125, -0.01235198974609375, -0.0276641845703125, -0.0205535888671875, 0.0022411346435546875, 0.0256195068359375, -0.007549285888671875, -0.026275634765625, -0.055328369140625, 0.004573822021484375, 0.04010009765625, 0.0396728515625, -0.11346435546875, 0.07647705078125, -0.009765625, 0.005176544189453125, 0.00006031990051269531, 0.031036376953125, -0.035675048828125, -0.048309326171875, -0.05963134765625, -0.0030269622802734375, -0.05035400390625, 0.0309906005859375, -0.00472259521484375, 0.0149688720703125, 0.0345458984375, -0.01139068603515625, -0.013336181640625, 0.031524658203125, 0.0202789306640625, 0.07757568359375, -0.01430511474609375, -0.0316162109375, 0.005889892578125, 0.0024127960205078125, 0.015869140625, -0.0280609130859375, -0.0103607177734375, -0.0287628173828125, 0.00012385845184326172, -0.0002262592315673828, -0.00725555419921875, 0.0158233642578125, -0.0275726318359375, -0.05035400390625, 0.057037353515625, 0.0015125274658203125, -0.029296875, 0.02288818359375, -0.01311492919921875, -0.0286102294921875, -0.0083160400390625, 0.02191162109375, -0.029998779296875, -0.0007319450378417969, -0.0005626678466796875, 0.02447509765625, 0.0665283203125, -0.0087432861328125, 0.047393798828125, -0.012451171875, 0.05181884765625, 0.01861572265625, 0.034027099609375, 0.01448822021484375, -0.01087188720703125, 0.03814697265625, 0.0478515625, -0.0296630859375, 0.0277862548828125, -0.01172637939453125, -0.01445770263671875, -0.020538330078125, -0.0377197265625, -0.037567138671875, -0.03369140625, 0.06201171875, 0.07147216796875, 0.018463134765625, -0.017791748046875, -0.003204345703125, -0.044708251953125, 0.0014944076538085938, -0.00437164306640625, 0.00926971435546875, -0.061187744140625, -0.007350921630859375, 0.0300445556640625, -0.0015287399291992188, 0.0093231201171875, -0.01302337646484375, -0.0087432861328125, -0.018707275390625, 0.0197296142578125, 0.007598876953125, -0.0302581787109375, 0.0548095703125, 0.01580810546875, -0.028106689453125, 0.00632476806640625, -0.04034423828125, 0.003147125244140625, -0.01050567626953125, -0.06048583984375, -0.035888671875, 0.0174560546875, -0.05096435546875, 0.00910186767578125, -0.038665771484375, 0.047943115234375, -0.054473876953125, 0.034149169921875, 0.0064849853515625, 0.024932861328125, 0.0031604766845703125, 0.03790283203125, -0.034698486328125, 0.050445556640625, 0.0092010498046875, -0.007476806640625, 0.005298614501953125, 0.0311431884765625, -0.00537872314453125, 0.034149169921875, 0.01279449462890625, -0.0250091552734375, 0.052520751953125, -0.051971435546875, -0.007732391357421875, -0.0010004043579101562, 0.0017499923706054688, -0.0660400390625, 0.0726318359375, 0.046661376953125, 0.01500701904296875, 0.042999267578125 ]
707545b35801f1887c8c37bbddde873dd68e4040
Wordpress Stackexchange Q: Redirect blog page to latest post? How can I make it so when the blog link in the nav bar is clicked it redirects to the most recent post? I know how to display just the latest post on the blog page, but I want it to actually redirect to the post page itself as I'm displaying a full screen background image called in via a custom metabox on each post page. Is there perhaps a PHP query and redirect function I can apply to the blog page template, or is there a better way? UPDATE: the following redirect script works great but I just need a way to get the URL of the latest post: $URL = "http://www.google.com"; wp_redirect( $URL, 301 ); exit; A: You can use the get_posts() function: <?php /* Template Name: Redirect */ $args = array( 'posts_per_page' => '1', 'post_type' => 'post' ); $post = get_posts($args); if($post){ $url = get_permalink($post[0]->ID); wp_redirect( $url, 301 ); exit; }
Q: Redirect blog page to latest post? How can I make it so when the blog link in the nav bar is clicked it redirects to the most recent post? I know how to display just the latest post on the blog page, but I want it to actually redirect to the post page itself as I'm displaying a full screen background image called in via a custom metabox on each post page. Is there perhaps a PHP query and redirect function I can apply to the blog page template, or is there a better way? UPDATE: the following redirect script works great but I just need a way to get the URL of the latest post: $URL = "http://www.google.com"; wp_redirect( $URL, 301 ); exit; A: You can use the get_posts() function: <?php /* Template Name: Redirect */ $args = array( 'posts_per_page' => '1', 'post_type' => 'post' ); $post = get_posts($args); if($post){ $url = get_permalink($post[0]->ID); wp_redirect( $url, 301 ); exit; }
wordpress
{ "language": "en", "length": 161, "provenance": "stackexchange_00019.jsonl.gz:413327", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29378" }
[ 0.06890869140625, -0.015869140625, 0.04962158203125, 0.00992584228515625, -0.008636474609375, -0.0059814453125, 0.04876708984375, -0.0706787109375, -0.00007420778274536133, 0.015777587890625, -0.00830078125, 0.01073455810546875, -0.063232421875, -0.0283966064453125, 0.0013856887817382812, -0.0390625, 0.057830810546875, -0.0634765625, 0.047088623046875, 0.006778717041015625, 0.00106048583984375, 0.033294677734375, 0.09765625, 0.02911376953125, -0.0232696533203125, 0.03753662109375, 0.09930419921875, -0.05328369140625, -0.017303466796875, -0.035247802734375, 0.0078277587890625, 0.00201416015625, 0.006954193115234375, 0.037689208984375, -0.0311279296875, -0.036773681640625, -0.0201416015625, 0.0197296142578125, 0.01214599609375, 0.0031757354736328125, 0.00411224365234375, -0.003818511962890625, -0.00284576416015625, 0.03240966796875, -0.036773681640625, -0.029541015625, -0.008697509765625, -0.0195159912109375, 0.013641357421875, -0.007404327392578125, 0.0089569091796875, 0.01824951171875, 0.02447509765625, -0.0033626556396484375, -0.027313232421875, -0.01544189453125, -0.00557708740234375, -0.0102691650390625, 0.04937744140625, -0.02142333984375, -0.034332275390625, -0.034332275390625, 0.029876708984375, -0.01605224609375, -0.0200347900390625, 0.018402099609375, 0.035552978515625, 0.0211639404296875, -0.0675048828125, -0.0543212890625, 0.0088348388671875, -0.036590576171875, -0.028533935546875, -0.041290283203125, 0.01166534423828125, -0.002872467041015625, 0.004245758056640625, -0.0279388427734375, -0.01546478271484375, 0.0290985107421875, -0.0170440673828125, 0.03179931640625, 0.0103302001953125, -0.06842041015625, 0.018035888671875, -0.03094482421875, -0.0275726318359375, -0.011871337890625, -0.026702880859375, -0.060272216796875, -0.02728271484375, 0.00611114501953125, -0.047210693359375, -0.0247802734375, -0.032501220703125, -0.0233306884765625, 0.024658203125, 0.04339599609375, 0.002410888671875, 0.00829315185546875, -0.0390625, -0.0204925537109375, -0.00690460205078125, -0.031097412109375, -0.0157623291015625, 0.048736572265625, 0.017181396484375, 0.0272064208984375, 0.026092529296875, 0.0226287841796875, 0.0193023681640625, -0.01410675048828125, -0.027099609375, -0.0308074951171875, -0.0241241455078125, 0.01396942138671875, -0.06158447265625, -0.001544952392578125, 0.00836944580078125, -0.004810333251953125, -0.016082763671875, 0.004192352294921875, 0.00940704345703125, 0.006092071533203125, 0.00566864013671875, -0.0014982223510742188, -0.006916046142578125, -0.040496826171875, -0.00803375244140625, 0.0283050537109375, -0.0341796875, 0.0003790855407714844, 0.03912353515625, 0.0202484130859375, 0.0080413818359375, -0.0308685302734375, 0.011322021484375, -0.02191162109375, -0.021728515625, -0.0023174285888671875, -0.0194091796875, 0.007427215576171875, 0.0198974609375, -0.04107666015625, 0.025848388671875, 0.036529541015625, 0.00968170166015625, -0.00008147954940795898, -0.0020122528076171875, -0.0267486572265625, -0.0159149169921875, -0.0054168701171875, 0.052520751953125, -0.0280303955078125, 0.0166015625, -0.064697265625, 0.024932861328125, -0.032745361328125, 0.01352691650390625, -0.037689208984375, 0.0703125, 0.01338958740234375, -0.000009953975677490234, -0.005260467529296875, -0.048553466796875, -0.0232696533203125, -0.0743408203125, -0.0345458984375, 0.029571533203125, 0.0213470458984375, -0.01099395751953125, -0.016632080078125, 0.0217437744140625, 0.0214996337890625, -0.01137542724609375, 0.0237884521484375, 0.01235198974609375, -0.004940032958984375, 0.00893402099609375, 0.0562744140625, -0.008026123046875, -0.0304718017578125, -0.0036487579345703125, -0.0074462890625, -0.006175994873046875, 0.039031982421875, 0.022918701171875, 0.054351806640625, -0.0292510986328125, 0.03302001953125, 0.00795745849609375, 0.035491943359375, -0.03765869140625, 0.042938232421875, -0.026763916015625, -0.00922393798828125, -0.029754638671875, 0.01220703125, -0.02972412109375, -0.00494384765625, 0.0014333724975585938, 0.03460693359375, -0.043060302734375, 0.0335693359375, -0.00939178466796875, 0.0042877197265625, -0.0024929046630859375, 0.0192108154296875, 0.00853729248046875, 0.007152557373046875, 0.00727081298828125, -0.027862548828125, -0.006740570068359375, -0.025848388671875, -0.016204833984375, 0.050079345703125, -0.036712646484375, 0.0149078369140625, -0.0204925537109375, 0.035491943359375, -0.036895751953125, -0.037628173828125, -0.04595947265625, -0.03131103515625, 0.06878662109375, -0.034881591796875, -0.004116058349609375, -0.044464111328125, 0.0023860931396484375, 0.027313232421875, -0.11639404296875, 0.0299072265625, -0.0007810592651367188, -0.019256591796875, -0.061676025390625, -0.00665283203125, -0.01282501220703125, 0.0063629150390625, 0.004215240478515625, 0.05084228515625, 0.0175933837890625, 0.00672149658203125, -0.01206207275390625, 0.0316162109375, -0.0274200439453125, -0.04559326171875, 0.0190887451171875, 0.01149749755859375, 0.025604248046875, 0.047119140625, 0.0095062255859375, -0.021881103515625, 0.005184173583984375, -0.035064697265625, 0.0142822265625, 0.01497650146484375, 0.020294189453125, 0.005428314208984375, -0.035552978515625, 0.0108642578125, 0.003238677978515625, -0.0148773193359375, -0.044342041015625, 0.0084991455078125, 0.0133819580078125, 0.01355743408203125, 0.01287841796875, 0.01451873779296875, -0.043975830078125, -0.0119171142578125, 0.01971435546875, 0.0310821533203125, 0.013702392578125, 0.031463623046875, 0.0092620849609375, -0.0261688232421875, -0.0163421630859375, -0.01538848876953125, 0.041473388671875, -0.0026149749755859375, -0.0240478515625, 0.03277587890625, 0.016021728515625, -0.023406982421875, -0.0131683349609375, -0.024322509765625, -0.001399993896484375, -0.031341552734375, 0.01381683349609375, 0.0113067626953125, 0.03802490234375, -0.003879547119140625, -0.035675048828125, 0.038055419921875, -0.0057525634765625, -0.035369873046875, 0.0281219482421875, -0.050140380859375, 0.042755126953125, -0.02740478515625, 0.055877685546875, 0.06439208984375, -0.0179290771484375, 0.0452880859375, 0.0009765625, 0.041961669921875, 0.0149078369140625, -0.006031036376953125, -0.0140838623046875, 0.0029315948486328125, -0.049285888671875, -0.025604248046875, 0.020599365234375, 0.003124237060546875, 0.0007266998291015625, -0.024444580078125, -0.006221771240234375, -0.004913330078125, -0.1109619140625, -0.08367919921875, -0.018310546875, -0.06732177734375, -0.00629425048828125, 0.01096343994140625, -0.0279998779296875, -0.0022125244140625, 0.060638427734375, 0.0089111328125, 0.006626129150390625, -0.01352691650390625, -0.06976318359375, -0.035614013671875, -0.0736083984375, 0.01348876953125, -0.01224517822265625, 0.0009369850158691406, 0.0005426406860351562, 0.0157623291015625, -0.0184783935546875, -0.058380126953125, -0.0185394287109375, 0.04437255859375, -0.0030803680419921875, -0.01885986328125, -0.02227783203125, 0.00839996337890625, -0.040374755859375, 0.01201629638671875, 0.038360595703125, -0.0013360977172851562, -0.016357421875, 0.0024871826171875, -0.0562744140625, 0.002071380615234375, -0.01535797119140625, -0.00252532958984375, 0.051849365234375, 0.0167083740234375, -0.009185791015625, -0.0206146240234375, -0.0037822723388671875, -0.036529541015625, -0.058013916015625, -0.0276336669921875, 0.019744873046875, 0.025909423828125, -0.0211029052734375, -0.0171661376953125, -0.004825592041015625, -0.01251220703125, 0.03070068359375, -0.017852783203125, 0.035003662109375, -0.01181793212890625, 0.00044727325439453125, -0.037109375, 0.026092529296875, -0.00628662109375, 0.01155853271484375, 0.00855255126953125, 0.009979248046875, -0.006244659423828125, 0.0012979507446289062, -0.05584716796875, -0.0243988037109375, 0.03692626953125, -0.0185546875, 0.01529693603515625, -0.0193939208984375, -0.0230712890625, 0.0016851425170898438, 0.0848388671875, -0.0238037109375, -0.021087646484375, -0.0075531005859375, -0.0017719268798828125, 0.0117340087890625, -0.0003523826599121094, -0.03106689453125, -0.0242919921875, -0.10540771484375, -0.0008230209350585938, -0.0095367431640625, -0.0203704833984375, -0.038330078125, 0.052764892578125, -0.0772705078125, -0.036407470703125, 0.047882080078125, 0.0022029876708984375, -0.024322509765625, 0.0440673828125, -0.022857666015625, 0.0130157470703125, -0.045074462890625, 0.02569580078125, -0.0309295654296875, -0.01447296142578125, 0.033355712890625, 0.015716552734375, -0.00037789344787597656, -0.0211639404296875, -0.0016307830810546875, 0.050140380859375, 0.022613525390625, 0.0006003379821777344, 0.018951416015625, -0.01446533203125, 0.01259613037109375, -0.007488250732421875, -0.0029544830322265625, -0.023162841796875, 0.020660400390625, 0.006664276123046875, -0.03466796875, 0.01085662841796875, -0.036590576171875, -0.0213623046875, 0.0223541259765625, -0.04437255859375, -0.051116943359375, -0.03790283203125, 0.032135009765625, 0.062469482421875, 0.0013790130615234375, 0.0206451416015625, -0.055908203125, -0.06890869140625, 0.0204010009765625, -0.0240325927734375, -0.0269927978515625, 0.01125335693359375, 0.073974609375, 0.0235443115234375, 0.0014753341674804688, -0.0019969940185546875, 0.0244903564453125, 0.038604736328125, -0.01049041748046875, 0.0404052734375, 0.006938934326171875, -0.026336669921875, 0.0887451171875, -0.0073699951171875, -0.01354217529296875, 0.0039005279541015625, 0.04461669921875, 0.0161895751953125, -0.0225982666015625, 0.018035888671875, 0.00372314453125, -0.0224761962890625, 0.042449951171875, -0.0147552490234375, -0.0255126953125, -0.0457763671875, 0.054840087890625, 0.0041351318359375, 0.01422119140625, -0.055572509765625, -0.021636962890625, 0.0025997161865234375, 0.0216827392578125, 0.025726318359375, 0.049163818359375, -0.0003535747528076172, 0.034820556640625, 0.05255126953125, -0.0208740234375, -0.0272674560546875, -0.007495880126953125, 0.0001245737075805664, 0.01186370849609375, -0.0128326416015625, -0.03375244140625, -0.006488800048828125, 0.002849578857421875, 0.04364013671875, 0.02923583984375, -0.01387786865234375, -0.0023822784423828125, -0.0134124755859375, -0.017181396484375, -0.0140228271484375, -0.0248870849609375, 0.0584716796875, 0.039794921875, -0.020843505859375, -0.0270843505859375, -0.0540771484375, -0.021514892578125, -0.0679931640625, 0.01233673095703125, 0.016387939453125, 0.00745391845703125, 0.004070281982421875, 0.10894775390625, 0.004062652587890625, 0.064697265625, -0.034027099609375, 0.0001461505889892578, -0.0117340087890625, 0.0172119140625, 0.026397705078125, 0.030242919921875, -0.01221466064453125, -0.00934600830078125, 0.0122528076171875, -0.042266845703125, -0.01194000244140625, 0.003711700439453125, 0.04974365234375, -0.0018157958984375, -0.0196380615234375, 0.02728271484375, -0.02459716796875, -0.01541900634765625, 0.02569580078125, 0.033111572265625, -0.03533935546875, -0.0023040771484375, -0.011871337890625, 0.0007343292236328125, 0.005970001220703125, -0.01505279541015625, 0.0175628662109375, -0.016937255859375, 0.036834716796875, -0.028839111328125, 0.041046142578125, -0.00885772705078125, -0.032135009765625, -0.025970458984375, -0.0465087890625, 0.0218048095703125, 0.004154205322265625, 0.0135345458984375, -0.036407470703125, -0.0194549560546875, 0.0445556640625, -0.00824737548828125, 0.048370361328125, -0.0297088623046875, -0.0210723876953125, 0.020294189453125, 0.00534820556640625, 0.04901123046875, 0.01132965087890625, -0.02252197265625, 0.0076751708984375, -0.035919189453125, -0.0021953582763671875, 0.0154571533203125, -0.0234832763671875, -0.00975799560546875, -0.039825439453125, 0.035064697265625, 0.055877685546875, -0.0024566650390625, -0.038818359375, -0.01313018798828125, -0.044921875, -0.00844573974609375, 0.0419921875, 0.00841522216796875, 0.060821533203125, -0.0174102783203125, 0.047637939453125, 0.01474761962890625, 0.0413818359375, -0.042266845703125, -0.017974853515625, 0.01983642578125, -0.02081298828125, -0.03106689453125, 0.01422882080078125, -0.042236328125, -0.02490234375, 0.020538330078125, -0.00946807861328125, -0.001983642578125, 0.003063201904296875, 0.021484375, -0.015869140625, -0.0291595458984375, 0.0038089752197265625, -0.017242431640625, 0.02789306640625, 0.01035308837890625, 0.004428863525390625, -0.00481414794921875, 0.0172576904296875, -0.061370849609375, 0.019561767578125, -0.037811279296875, -0.0189666748046875, -0.0628662109375, 0.046539306640625, 0.0709228515625, 0.03411865234375, 0.051422119140625, 0.0226287841796875, 0.02398681640625, 0.0224761962890625, 0.005344390869140625, 0.006610870361328125, -0.0116424560546875, 0.029052734375, -0.0037689208984375, 0.0006356239318847656, 0.01416015625, -0.0158843994140625, -0.0054473876953125, 0.05474853515625, 0.032012939453125, -0.061126708984375, -0.0034427642822265625, -0.0108795166015625, -0.00933074951171875, 0.05645751953125, -0.010009765625, 0.0020275115966796875, 0.0041351318359375, 0.0307159423828125, -0.0474853515625, -0.032470703125, -0.0006508827209472656, -0.0115814208984375, 0.0038928985595703125, -0.01515960693359375, 0.0311431884765625, -0.007350921630859375, -0.10577392578125, 0.0049591064453125, 0.06640625, -0.0433349609375, -0.016082763671875, 0.0026416778564453125, 0.0007715225219726562, -0.018768310546875, -0.039337158203125, 0.02081298828125, -0.0208587646484375, 0.0115203857421875, -0.0038394927978515625, -0.034210205078125, 0.0201568603515625, 0.057525634765625, -0.042266845703125, 0.034759521484375, 0.043243408203125, -0.042327880859375, 0.004360198974609375, -0.014312744140625, 0.01548004150390625, -0.01708984375, -0.00475311279296875, 0.00543975830078125, -0.015777587890625, -0.04583740234375, -0.02459716796875, -0.004184722900390625, 0.11163330078125, -0.0207366943359375, -0.034088134765625, 0.01192474365234375, 0.0015459060668945312, -0.0261077880859375, 0.0017757415771484375, 0.0156097412109375, -0.04840087890625, -0.005573272705078125, -0.0075531005859375, -0.004302978515625, 0.010498046875, -0.0210418701171875, -0.036651611328125, 0.0885009765625, 0.01324462890625, 0.016876220703125, 0.0285491943359375, 0.040496826171875, -0.0285186767578125, 0.0250701904296875, -0.01092529296875, 0.07061767578125, 0.00782012939453125, 0.031707763671875, -0.040802001953125, -0.00030231475830078125, 0.0081787109375, 0.034332275390625, 0.031219482421875, 0.0222930908203125, -0.06988525390625, 0.004547119140625, 0.0531005859375, 0.044952392578125, 0.023651123046875, 0.052490234375, -0.00714111328125, 0.01534271240234375, 0.0214996337890625, -0.04473876953125, 0.024932861328125, -0.01312255859375, -0.0122222900390625, -0.0012998580932617188, 0.0243682861328125, 0.0120849609375, -0.008087158203125, -0.01148223876953125, -0.0692138671875, 0.00890350341796875, 0.052825927734375, -0.0282135009765625, 0.0213470458984375, 0.0264434814453125, 0.068115234375, -0.11297607421875, 0.0130767822265625, -0.03936767578125, 0.060211181640625, 0.0003170967102050781, -0.002544403076171875, 0.0220947265625, 0.0224761962890625, 0.0333251953125, -0.0244903564453125, 0.0015125274658203125, 0.026123046875, -0.02630615234375, 0.10821533203125, 0.0584716796875, 0.035675048828125, -0.02606201171875, -0.0304718017578125, 0.05889892578125, 0.1168212890625, -0.05853271484375, 0.01409149169921875, 0.00940704345703125, 0.00792694091796875, 0.0294189453125, -0.036590576171875, 0.034393310546875, -0.03338623046875, -0.048309326171875, -0.0147247314453125, -0.01332855224609375, 0.031219482421875, 0.030181884765625, 0.0035190582275390625, -0.0172576904296875, -0.022979736328125, -0.01129913330078125, -0.0118865966796875, -0.0228729248046875, 0.01019287109375, 0.054473876953125, -0.0057220458984375, 0.049835205078125, -0.051727294921875, -0.0027561187744140625, -0.007022857666015625, 0.04302978515625, -0.0086669921875, 0.0186614990234375, -0.043426513671875, -0.033355712890625, -0.00713348388671875, 0.044097900390625, 0.01995849609375, -0.023956298828125, 0.0266876220703125, 0.0265045166015625, -0.01354217529296875, -0.02044677734375, 0.0221099853515625, -0.00702667236328125, 0.019256591796875, -0.044647216796875, -0.0007700920104980469, -0.022216796875, -0.0280609130859375, 0.0225067138671875, -0.00905609130859375, 0.0130462646484375, -0.033355712890625, 0.07147216796875, -0.002269744873046875, 0.0160369873046875, 0.034332275390625, 0.01364898681640625, 0.039215087890625, 0.0133819580078125, -0.0311279296875, 0.0004954338073730469, -0.01200103759765625, -0.04364013671875, 0.00972747802734375, 0.0274658203125, -0.018768310546875, 0.0254364013671875, -0.0287933349609375, 0.00493621826171875, 0.06317138671875, -0.054473876953125, -0.01263427734375, 0.05206298828125, 0.02294921875, -0.00013935565948486328, -0.0462646484375, -0.0207977294921875, -0.00945281982421875, 0.00881195068359375, 0.0287017822265625, 0.00391387939453125, 0.03656005859375, 0.02862548828125, -0.0195770263671875, 0.0103912353515625, -0.036346435546875, -0.01422882080078125, 0.00945281982421875, 0.00028967857360839844, -0.01049041748046875, 0.0010862350463867188, -0.0814208984375, -0.00007539987564086914, 0.036956787109375, -0.00016415119171142578, 0.017242431640625, -0.01035308837890625, 0.01204681396484375, -0.0229034423828125, -0.0364990234375, -0.049896240234375, -0.0188446044921875, -0.05145263671875, -0.034637451171875, 0.0255584716796875, -0.015777587890625, -0.0299835205078125, 0.035491943359375, 0.0118865966796875, -0.037078857421875, 0.0233612060546875, -0.058135986328125, 0.04571533203125, 0.0433349609375, 0.00733184814453125, -0.006183624267578125, 0.0287017822265625, -0.002758026123046875, 0.0010557174682617188, 0.0205535888671875, 0.00217437744140625, 0.00528717041015625, -0.01593017578125, -0.00905609130859375, -0.031585693359375, 0.0322265625, -0.00212860107421875, 0.002964019775390625, -0.0161895751953125, 0.00983428955078125, -0.054595947265625, -0.0111541748046875, -0.011566162109375, -0.0306854248046875, -0.02642822265625, 0.0162200927734375, -0.0182342529296875, -0.034454345703125, -0.026885986328125, 0.0151519775390625, -0.0007977485656738281, -0.0271453857421875, -0.0063934326171875, -0.0000445246696472168, -0.03656005859375, 0.05902099609375, -0.0548095703125, -0.01373291015625, 0.002559661865234375, 0.0201873779296875, -0.018768310546875, 0.001861572265625, -0.03076171875, 0.004650115966796875, -0.0266571044921875, 0.0010881423950195312, 0.0169677734375, -0.01219940185546875, 0.0026111602783203125, -0.033111572265625, -0.0121917724609375, 0.0338134765625, 0.001613616943359375, -0.0184326171875, 0.016571044921875, 0.01629638671875, -0.00727081298828125, -0.0278167724609375, 0.0053863525390625, 0.0029392242431640625, -0.000507354736328125, 0.00989532470703125, -0.024139404296875, -0.0010786056518554688, -0.016448974609375, -0.004230499267578125, 0.03790283203125, 0.0093536376953125, -0.0201263427734375, -0.021575927734375, 0.04217529296875, 0.023223876953125, -0.00923919677734375, 0.0084686279296875, -0.01120758056640625, -0.01149749755859375, -0.025177001953125, -0.004558563232421875, 0.078857421875, -0.016937255859375, -0.0008068084716796875, 0.043121337890625, 0.02874755859375, 0.026092529296875, -0.0010061264038085938, -0.002300262451171875, -0.022674560546875, 0.0254058837890625, 0.03729248046875, -0.0278167724609375, 0.002918243408203125, 0.0198822021484375, 0.01078033447265625, -0.0009317398071289062, -0.050079345703125, -0.042999267578125, -0.034149169921875, 0.0489501953125, 0.039825439453125, 0.017974853515625, -0.020904541015625, -0.020233154296875, -0.0176849365234375, -0.0303802490234375, -0.0094451904296875, 0.0198516845703125, -0.048828125, 0.006847381591796875, 0.00229644775390625, -0.0298614501953125, -0.020263671875, -0.01161956787109375, -0.046234130859375, 0.0184478759765625, 0.01047515869140625, 0.001079559326171875, 0.0113372802734375, 0.0014925003051757812, 0.0899658203125, -0.04962158203125, 0.0210418701171875, 0.00029349327087402344, 0.01473236083984375, 0.049835205078125, -0.013916015625, 0.028045654296875, 0.0307769775390625, -0.028564453125, -0.0127716064453125, 0.0310211181640625, -0.004222869873046875, -0.0038280487060546875, -0.024749755859375, -0.00843048095703125, 0.0264739990234375, 0.0008320808410644531, 0.010040283203125, 0.007015228271484375, 0.0218353271484375, -0.002254486083984375, 0.0635986328125, -0.00421905517578125, 0.041168212890625, -0.0023975372314453125, 0.045928955078125, -0.006435394287109375, -0.0216217041015625, 0.033355712890625, -0.036407470703125, 0.0006275177001953125, 0.0256500244140625, 0.04156494140625, -0.0105133056640625, 0.02850341796875, 0.0236358642578125, 0.0192718505859375, 0.0042572021484375 ]
50d3ead4a7e148959961e9b558a34c28f24b967a
Wordpress Stackexchange Q: Get menu object from theme_location I'd like to get a menu object from its theme location argument. My goal is to output separately the menu name and its items name, url and description. Example of what I'm looking for : $menu = get_menu('nav-menu'); //get menu from its theme location echo $menu->name; //displays the menu name foreach($menu->items as $item){ echo '<a href="'.$item->link'">'.$item->name.'</a>'; //displays a link to the item destination echo $item->description; //displays the item description } A: Or if you need it in one line, just copy that and replace "change-this-location-slug" by our own. $string = get_term(get_nav_menu_locations()['change-this-location-slug'], 'nav_menu')->name;
Q: Get menu object from theme_location I'd like to get a menu object from its theme location argument. My goal is to output separately the menu name and its items name, url and description. Example of what I'm looking for : $menu = get_menu('nav-menu'); //get menu from its theme location echo $menu->name; //displays the menu name foreach($menu->items as $item){ echo '<a href="'.$item->link'">'.$item->name.'</a>'; //displays a link to the item destination echo $item->description; //displays the item description } A: Or if you need it in one line, just copy that and replace "change-this-location-slug" by our own. $string = get_term(get_nav_menu_locations()['change-this-location-slug'], 'nav_menu')->name; A: This method looks like what you're looking for, using get_nav_menu_locations() and get_term(): $theme_locations = get_nav_menu_locations(); $menu_obj = get_term( $theme_locations[$theme_location], 'nav_menu' ); $menu_name = $menu_obj->name; (See the link for the whole thing wrapped up in a custom function; the above code just highlights the relevant WP functions for getting what you're after.) A: As of WordPress 3.0.0 you may use the wp_get_nav_menu_object function to retrieve the corresponding WP_Term to retrieve it's name. Retrieving the id of the menu to pass to wp_get_nav_menu_object may be done via get_nav_menu_locations. Expanding your example: $menu_id = get_nav_menu_locations()[ 'nav-menu' ]; $menu = wp_get_nav_menu_object( $menu_id ); $items = wp_get_nav_menu_items( $menu_id ); echo $menu->name; // Displays the menu name. foreach($items as $item){ echo '<a href="'. esc_url( $item->url )'">'. esc_html( $item->title ).'</a>'; // Displays a link to the item destination. echo $item->description; // Displays the item description. }
wordpress
{ "language": "en", "length": 238, "provenance": "stackexchange_00019.jsonl.gz:413335", "question_score": "10", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29430" }
[ 0.049713134765625, -0.011962890625, 0.040618896484375, 0.005619049072265625, 0.00872802734375, -0.0191497802734375, 0.0804443359375, -0.04217529296875, -0.00614166259765625, 0.030517578125, -0.01507568359375, 0.0175628662109375, -0.0005421638488769531, -0.0238189697265625, 0.0121002197265625, -0.0210418701171875, 0.033050537109375, -0.0009756088256835938, 0.034027099609375, 0.0031719207763671875, 0.0181427001953125, 0.0302886962890625, 0.006011962890625, 0.058074951171875, 0.05084228515625, -0.06427001953125, 0.0037899017333984375, 0.0227813720703125, 0.00959014892578125, -0.007778167724609375, 0.0260772705078125, 0.006397247314453125, 0.0254669189453125, -0.0016536712646484375, 0.0170440673828125, -0.005588531494140625, 0.0056610107421875, 0.00434112548828125, 0.0105133056640625, 0.0174713134765625, 0.032379150390625, -0.0120391845703125, -0.0261688232421875, 0.035308837890625, -0.0306854248046875, -0.049468994140625, 0.03131103515625, -0.0253448486328125, -0.03192138671875, -0.0008864402770996094, 0.032684326171875, 0.0172271728515625, 0.03900146484375, 0.00461578369140625, -0.01093292236328125, -0.007045745849609375, -0.0012006759643554688, -0.02398681640625, 0.01239013671875, -0.00022542476654052734, -0.0251312255859375, -0.0104217529296875, 0.02630615234375, -0.01241302490234375, -0.01248931884765625, 0.03533935546875, 0.0143585205078125, 0.00653076171875, -0.083984375, -0.0242462158203125, 0.042694091796875, -0.0687255859375, -0.0038700103759765625, 0.01407623291015625, -0.009002685546875, -0.054779052734375, -0.0096588134765625, -0.060699462890625, 0.032257080078125, 0.0267181396484375, 0.004718780517578125, 0.004955291748046875, -0.059814453125, 0.01241302490234375, 0.024749755859375, 0.054473876953125, -0.00835418701171875, -0.0379638671875, -0.03057861328125, -0.030670166015625, -0.0184173583984375, -0.01270294189453125, -0.05499267578125, 0.0018835067749023438, -0.007030487060546875, -0.0232086181640625, 0.01506805419921875, 0.0452880859375, -0.024566650390625, 0.0284881591796875, -0.022308349609375, -0.0303497314453125, 0.050628662109375, -0.045806884765625, -0.007801055908203125, 0.04571533203125, 0.040924072265625, 0.0238800048828125, 0.02313232421875, 0.000339508056640625, -0.003948211669921875, 0.0162200927734375, -0.0292205810546875, -0.0257568359375, 0.007053375244140625, 0.034423828125, -0.04052734375, 0.0311431884765625, 0.004894256591796875, 0.014129638671875, -0.01076507568359375, 0.0169525146484375, 0.0162506103515625, 0.01800537109375, -0.009368896484375, 0.0201416015625, 0.002864837646484375, -0.04412841796875, -0.03570556640625, 0.05279541015625, -0.0311431884765625, -0.0267181396484375, 0.038055419921875, 0.04644775390625, 0.0124359130859375, -0.04193115234375, -0.0081024169921875, -0.01061248779296875, -0.0016736984252929688, -0.006076812744140625, 0.046905517578125, 0.00934600830078125, 0.0204925537109375, -0.007022857666015625, -0.0380859375, -0.0120849609375, 0.01666259765625, 0.025390625, -0.01541900634765625, -0.0408935546875, 0.0008153915405273438, -0.0160675048828125, 0.0297088623046875, 0.0183258056640625, -0.013427734375, -0.020355224609375, 0.031707763671875, -0.0396728515625, 0.0034656524658203125, -0.046051025390625, -0.02508544921875, -0.016998291015625, 0.00818634033203125, -0.04180908203125, -0.0413818359375, 0.0170745849609375, -0.00620269775390625, -0.00295257568359375, 0.003078460693359375, 0.0364990234375, -0.02734375, -0.0134735107421875, -0.025177001953125, 0.003757476806640625, -0.0009493827819824219, 0.0278778076171875, -0.0021457672119140625, -0.00836944580078125, 0.015655517578125, 0.0140228271484375, -0.028167724609375, -0.064453125, -0.0192413330078125, -0.00829315185546875, -0.05877685546875, 0.08648681640625, -0.0214080810546875, 0.052764892578125, 0.03460693359375, -0.0208740234375, 0.0186004638671875, 0.0183868408203125, -0.043426513671875, 0.0217437744140625, -0.01062774658203125, 0.01100921630859375, 0.01629638671875, 0.0258331298828125, -0.01025390625, -0.040618896484375, 0.0309600830078125, 0.0068359375, 0.01380157470703125, -0.0182647705078125, -0.012420654296875, -0.005542755126953125, 0.0015211105346679688, 0.03131103515625, 0.0043792724609375, 0.01438140869140625, -0.00021338462829589844, 0.01470947265625, 0.00704193115234375, -0.07183837890625, -0.0279693603515625, 0.029388427734375, -0.0151214599609375, 0.00977325439453125, -0.01593017578125, 0.0196075439453125, -0.01165008544921875, 0.0006437301635742188, -0.016754150390625, 0.011474609375, 0.023529052734375, 0.005458831787109375, -0.00241851806640625, -0.01087188720703125, 0.0233612060546875, 0.03326416015625, -0.0166778564453125, -0.0119781494140625, 0.03717041015625, 0.0228118896484375, -0.0008597373962402344, 0.017913818359375, 0.056182861328125, -0.06170654296875, 0.007266998291015625, 0.020904541015625, 0.033416748046875, 0.0325927734375, -0.0240325927734375, -0.04156494140625, 0.06268310546875, -0.052825927734375, -0.0177154541015625, -0.01513671875, -0.005092620849609375, 0.0018224716186523438, 0.045196533203125, -0.00006371736526489258, 0.014373779296875, 0.00466156005859375, -0.0106658935546875, 0.03240966796875, -0.0267791748046875, 0.00991058349609375, -0.0141448974609375, 0.026031494140625, -0.01155853271484375, 0.022857666015625, 0.02618408203125, -0.0099029541015625, 0.0018262863159179688, 0.024017333984375, -0.00794219970703125, 0.004169464111328125, -0.05645751953125, 0.018646240234375, 0.0310211181640625, 0.0263671875, -0.0017242431640625, 0.0035381317138671875, -0.024078369140625, -0.035064697265625, 0.004940032958984375, 0.0079193115234375, -0.0298004150390625, -0.035675048828125, -0.0152130126953125, 0.04046630859375, 0.044189453125, -0.0148468017578125, -0.035858154296875, -0.0546875, 0.028839111328125, -0.003322601318359375, -0.00809478759765625, 0.043487548828125, 0.0255584716796875, 0.040191650390625, -0.01552581787109375, 0.0257720947265625, -0.0367431640625, 0.02093505859375, 0.08489990234375, 0.03582763671875, -0.01328277587890625, 0.0227203369140625, 0.054534912109375, 0.0213470458984375, -0.0227813720703125, -0.004337310791015625, 0.0031147003173828125, -0.0270843505859375, -0.005931854248046875, 0.01084136962890625, -0.00814056396484375, -0.0156402587890625, -0.0347900390625, 0.032958984375, 0.00595855712890625, -0.027252197265625, -0.00855255126953125, -0.04473876953125, -0.04119873046875, -0.0235748291015625, -0.1158447265625, -0.039886474609375, 0.036346435546875, 0.001644134521484375, 0.02874755859375, 0.025360107421875, 0.00548553466796875, -0.051788330078125, 0.05328369140625, 0.0021228790283203125, 0.0479736328125, -0.00817108154296875, -0.076416015625, 0.0016422271728515625, -0.0836181640625, 0.00582122802734375, -0.016082763671875, 0.01020050048828125, 0.0062408447265625, 0.00852203369140625, 0.0002741813659667969, -0.0139923095703125, 0.03472900390625, 0.042572021484375, -0.0038604736328125, 0.0062713623046875, 0.0262908935546875, -0.01218414306640625, -0.039520263671875, 0.01267242431640625, 0.03631591796875, 0.01139068603515625, -0.028839111328125, -0.01239013671875, -0.019622802734375, 0.0137939453125, 0.0274810791015625, -0.0063018798828125, 0.0013113021850585938, 0.0418701171875, 0.0300140380859375, -0.024078369140625, -0.05926513671875, -0.0269012451171875, -0.05615234375, 0.060455322265625, 0.0290985107421875, 0.0289459228515625, -0.01508331298828125, 0.0450439453125, -0.00908660888671875, -0.01678466796875, 0.007781982421875, -0.0229644775390625, 0.0240020751953125, -0.01678466796875, -0.00902557373046875, 0.006847381591796875, 0.050201416015625, -0.0232696533203125, 0.005825042724609375, 0.00957489013671875, -0.006175994873046875, -0.01068878173828125, -0.0215301513671875, -0.024658203125, -0.055877685546875, 0.050018310546875, -0.02886962890625, 0.022918701171875, -0.0259246826171875, -0.0301055908203125, 0.003940582275390625, 0.1097412109375, 0.006687164306640625, -0.02447509765625, -0.01097869873046875, -0.006072998046875, 0.0027141571044921875, -0.02398681640625, -0.00997161865234375, -0.02978515625, -0.1505126953125, 0.0256195068359375, -0.0093994140625, -0.02691650390625, -0.0173187255859375, 0.01100921630859375, -0.070556640625, -0.0621337890625, 0.0465087890625, -0.04290771484375, 0.034393310546875, 0.0104522705078125, 0.0210418701171875, -0.025238037109375, -0.039520263671875, -0.0035858154296875, -0.0058135986328125, -0.0142974853515625, 0.00662994384765625, 0.0147857666015625, 0.01538848876953125, -0.0247039794921875, 0.0218505859375, 0.04119873046875, 0.037353515625, 0.03619384765625, 0.0240325927734375, 0.007106781005859375, 0.0177001953125, -0.029815673828125, 0.0193634033203125, -0.04852294921875, 0.0128173828125, -0.0052490234375, -0.055877685546875, 0.0260162353515625, -0.01259613037109375, 0.04608154296875, 0.024383544921875, -0.04864501953125, -0.0135040283203125, -0.012237548828125, 0.017913818359375, 0.0155029296875, 0.0146636962890625, -0.004611968994140625, 0.0025768280029296875, -0.0064544677734375, 0.043670654296875, -0.0141448974609375, -0.03155517578125, 0.0099029541015625, 0.05316162109375, 0.0219573974609375, -0.02838134765625, -0.0184783935546875, 0.01464080810546875, 0.0222320556640625, -0.01467132568359375, 0.02130126953125, 0.003322601318359375, -0.0304718017578125, 0.0313720703125, -0.004177093505859375, 0.032135009765625, -0.004268646240234375, -0.004238128662109375, 0.019989013671875, 0.00408935546875, -0.012298583984375, 0.0302276611328125, -0.0212860107421875, 0.0212249755859375, -0.0151214599609375, -0.05316162109375, -0.07110595703125, 0.077392578125, 0.0030117034912109375, 0.05120849609375, -0.057342529296875, -0.034088134765625, -0.0045013427734375, 0.0002911090850830078, 0.04693603515625, 0.04705810546875, -0.0123443603515625, 0.038848876953125, 0.0416259765625, 0.0166778564453125, 0.0243072509765625, 0.0027294158935546875, -0.0201263427734375, 0.034027099609375, -0.0296630859375, -0.005321502685546875, 0.037384033203125, 0.0048065185546875, 0.0404052734375, 0.01222991943359375, -0.016265869140625, -0.0626220703125, 0.0036869049072265625, 0.0273590087890625, -0.005802154541015625, -0.04119873046875, 0.01314544677734375, 0.02947998046875, -0.0063323974609375, 0.00008153915405273438, -0.028045654296875, -0.005382537841796875, -0.01096343994140625, -0.0033550262451171875, -0.006103515625, -0.0123748779296875, 0.03253173828125, 0.05670166015625, -0.033721923828125, 0.0543212890625, -0.0135040283203125, -0.01519012451171875, -0.029083251953125, 0.043670654296875, 0.0165863037109375, 0.007038116455078125, 0.013946533203125, 0.0017948150634765625, 0.029571533203125, 0.019195556640625, -0.02142333984375, -0.0247344970703125, 0.0133056640625, -0.033111572265625, 0.011260986328125, 0.03179931640625, -0.0225372314453125, -0.004302978515625, 0.050567626953125, -0.016082763671875, -0.07537841796875, -0.0318603515625, -0.0016412734985351562, 0.039276123046875, -0.0443115234375, 0.01026153564453125, 0.001384735107421875, 0.041351318359375, 0.01491546630859375, -0.007091522216796875, -0.041168212890625, 0.019439697265625, 0.0469970703125, -0.07598876953125, -0.00266265869140625, 0.046661376953125, -0.08758544921875, -0.051177978515625, -0.0147857666015625, -0.0310211181640625, 0.045379638671875, -0.039581298828125, 0.035552978515625, -0.03131103515625, 0.00911712646484375, -0.053680419921875, -0.00565338134765625, 0.050079345703125, 0.047943115234375, -0.060546875, 0.0333251953125, -0.047454833984375, 0.017822265625, 0.0290069580078125, -0.042266845703125, -0.0220489501953125, -0.048675537109375, -0.020263671875, 0.00531005859375, 0.0269317626953125, 0.059814453125, 0.003154754638671875, 0.012298583984375, -0.02691650390625, -0.005565643310546875, -0.00795745849609375, 0.048919677734375, 0.01180267333984375, 0.0079803466796875, 0.006069183349609375, 0.02410888671875, -0.0262298583984375, -0.007965087890625, 0.0176544189453125, -0.0175323486328125, -0.003398895263671875, -0.028961181640625, -0.003231048583984375, -0.0179290771484375, 0.0361328125, 0.0031909942626953125, 0.0333251953125, -0.036834716796875, 0.00646209716796875, -0.0240936279296875, 0.01343536376953125, -0.07720947265625, -0.00228118896484375, 0.0108184814453125, -0.0294342041015625, -0.004398345947265625, -0.00751495361328125, 0.032806396484375, 0.00753021240234375, -0.026824951171875, -0.003475189208984375, 0.021881103515625, -0.07354736328125, 0.09051513671875, 0.11700439453125, 0.016998291015625, 0.0574951171875, 0.02099609375, 0.01149749755859375, 0.01094818115234375, -0.006542205810546875, 0.0233306884765625, 0.02471923828125, 0.047882080078125, -0.007587432861328125, 0.0072479248046875, 0.0200042724609375, -0.032745361328125, 0.0199432373046875, 0.00626373291015625, 0.06121826171875, -0.03448486328125, 0.0223388671875, 0.052398681640625, 0.0007977485656738281, 0.0325927734375, 0.0269012451171875, -0.01446533203125, -0.026458740234375, -0.04974365234375, -0.039459228515625, -0.0268096923828125, -0.019500732421875, -0.0008349418640136719, -0.0100250244140625, -0.0131072998046875, 0.0235595703125, 0.0052642822265625, -0.027557373046875, -0.0089111328125, 0.0277557373046875, 0.00765228271484375, -0.045745849609375, 0.0029239654541015625, -0.0035800933837890625, -0.00556182861328125, -0.0304412841796875, 0.054779052734375, -0.03265380859375, 0.05291748046875, -0.01511383056640625, 0.016448974609375, 0.01763916015625, 0.05377197265625, -0.0273284912109375, 0.01019287109375, 0.0299835205078125, 0.004375457763671875, 0.004802703857421875, 0.004589080810546875, -0.00222015380859375, 0.006450653076171875, -0.03466796875, 0.0003733634948730469, -0.036773681640625, 0.032623291015625, -0.021148681640625, -0.0256195068359375, 0.08477783203125, -0.006252288818359375, -0.037139892578125, 0.0048675537109375, 0.007122039794921875, -0.005889892578125, 0.00928497314453125, 0.09283447265625, -0.037353515625, 0.00893402099609375, 0.0447998046875, 0.0428466796875, -0.038055419921875, 0.009002685546875, -0.02349853515625, 0.0523681640625, -0.0087432861328125, -0.02532958984375, 0.0134124755859375, 0.027801513671875, -0.00960540771484375, 0.03515625, -0.0635986328125, 0.074462890625, 0.039093017578125, 0.0584716796875, -0.06781005859375, -0.0120697021484375, 0.001995086669921875, 0.0207061767578125, -0.0176849365234375, 0.004505157470703125, -0.01428985595703125, 0.0020771026611328125, 0.021881103515625, 0.03741455078125, 0.023345947265625, 0.0156707763671875, -0.0033016204833984375, 0.00769805908203125, 0.054534912109375, -0.04339599609375, 0.0201416015625, -0.01425933837890625, 0.0076141357421875, -0.0016956329345703125, 0.01126861572265625, 0.005512237548828125, 0.00461578369140625, -0.0297393798828125, -0.0185546875, 0.00336456298828125, -0.0006546974182128906, 0.0118560791015625, 0.0012044906616210938, 0.0380859375, 0.040618896484375, -0.00904083251953125, 0.044586181640625, -0.042022705078125, 0.050994873046875, 0.01180267333984375, -0.027679443359375, -0.01247406005859375, 0.01296234130859375, 0.0192108154296875, -0.0308380126953125, -0.030731201171875, 0.0230255126953125, -0.004978179931640625, 0.06817626953125, 0.032623291015625, 0.03839111328125, -0.035125732421875, -0.0404052734375, 0.056060791015625, 0.0924072265625, -0.037567138671875, -0.031890869140625, 0.0102081298828125, -0.010009765625, 0.01220703125, 0.01103973388671875, 0.035797119140625, 0.0305328369140625, 0.036865234375, -0.024322509765625, -0.003360748291015625, 0.042724609375, 0.04559326171875, 0.0059814453125, 0.0156097412109375, -0.05816650390625, -0.0113677978515625, -0.052154541015625, 0.04498291015625, 0.0279083251953125, 0.031951904296875, -0.01172637939453125, 0.049407958984375, -0.0183868408203125, -0.006275177001953125, 0.01397705078125, 0.040771484375, 0.006053924560546875, -0.0222625732421875, 0.01922607421875, -0.0219268798828125, -0.0186004638671875, 0.01165008544921875, 0.012908935546875, -0.0022335052490234375, 0.043060302734375, 0.007228851318359375, -0.031097412109375, -0.002513885498046875, 0.03955078125, -0.018341064453125, -0.0157470703125, -0.0301971435546875, -0.006137847900390625, 0.006805419921875, -0.0007748603820800781, -0.0013017654418945312, -0.01490020751953125, 0.0352783203125, -0.018768310546875, 0.039581298828125, -0.002643585205078125, 0.008758544921875, -0.0026302337646484375, -0.0262298583984375, -0.0005474090576171875, 0.0006632804870605469, -0.1109619140625, -0.031402587890625, -0.028533935546875, -0.030364990234375, 0.0290679931640625, 0.045623779296875, 0.01041412353515625, 0.005550384521484375, -0.0036869049072265625, -0.0207366943359375, 0.0220489501953125, -0.0008978843688964844, 0.0028858184814453125, 0.0253143310546875, 0.01271820068359375, 0.007564544677734375, -0.0276031494140625, -0.0225067138671875, 0.0007762908935546875, 0.022857666015625, 0.0173187255859375, -0.021240234375, 0.02569580078125, 0.01459503173828125, -0.04461669921875, 0.032989501953125, -0.061859130859375, -0.041046142578125, 0.003704071044921875, -0.0161590576171875, -0.004459381103515625, 0.002376556396484375, -0.047698974609375, 0.01177978515625, 0.07281494140625, -0.026947021484375, 0.0299530029296875, 0.026702880859375, 0.0004978179931640625, -0.0726318359375, 0.019439697265625, -0.0180206298828125, -0.0281829833984375, -0.006427764892578125, -0.00360870361328125, 0.010894775390625, 0.061279296875, 0.0224456787109375, 0.0174713134765625, 0.01158905029296875, -0.0338134765625, 0.015777587890625, -0.0260467529296875, 0.0233154296875, 0.04449462890625, 0.00772857666015625, 0.002902984619140625, 0.007595062255859375, -0.0118560791015625, 0.0270538330078125, 0.012908935546875, 0.022247314453125, -0.00010991096496582031, 0.039093017578125, 0.053802490234375, -0.0252227783203125, 0.0162353515625, -0.0283660888671875, -0.012786865234375, 0.0173187255859375, 0.03759765625, -0.030914306640625, -0.060302734375, -0.043121337890625, -0.068359375, 0.00975799560546875, 0.03631591796875, -0.0278167724609375, -0.0110015869140625, -0.03973388671875, -0.0173797607421875, 0.0182342529296875, -0.01346588134765625, -0.003360748291015625, -0.007171630859375, -0.00815582275390625, 0.0253448486328125, -0.03375244140625, -0.017120361328125, 0.00403594970703125, -0.01065826416015625, -0.01302337646484375, 0.002590179443359375, -0.01541900634765625, 0.0282440185546875, 0.01898193359375, -0.0003211498260498047, 0.03521728515625, -0.011444091796875, -0.0261077880859375, -0.00970458984375, 0.01549530029296875, 0.0443115234375, -0.01389312744140625, -0.040313720703125, -0.0282440185546875, 0.01428985595703125, 0.0079193115234375, -0.01520538330078125, 0.0098419189453125, -0.02069091796875, -0.0115509033203125, 0.03131103515625, -0.024017333984375, 0.001583099365234375, -0.021148681640625, -0.046783447265625, 0.0614013671875, 0.014251708984375, -0.032623291015625, -0.01049041748046875, -0.0049285888671875, 0.00858306884765625, 0.007785797119140625, -0.005268096923828125, 0.0001531839370727539, -0.035552978515625, 0.0088348388671875, 0.01055145263671875, 0.03955078125, -0.0095062255859375, 0.0014629364013671875, -0.081298828125, 0.022308349609375, -0.01175689697265625, 0.01499176025390625, -0.0226898193359375, 0.0060577392578125, 0.0019445419311523438, 0.041229248046875, -0.020416259765625, -0.046417236328125, -0.0022792816162109375, -0.0008668899536132812, -0.035736083984375, 0.027313232421875, -0.02337646484375, 0.0139007568359375, 0.08258056640625, 0.07928466796875, 0.023468017578125, -0.0526123046875, -0.00528717041015625, -0.0028018951416015625, -0.04180908203125, -0.00904083251953125, 0.043121337890625, -0.0892333984375, -0.023284912109375, 0.027923583984375, -0.0187225341796875, -0.0167694091796875, 0.006740570068359375, -0.0504150390625, 0.003597259521484375, 0.0007252693176269531, 0.00745391845703125, -0.038848876953125, -0.053863525390625, 0.0704345703125, -0.03643798828125, 0.00971221923828125, -0.01425933837890625, 0.043975830078125, 0.0372314453125, -0.0028228759765625, -0.0167083740234375, -0.009063720703125, -0.02569580078125, 0.0054168701171875, -0.006908416748046875, 0.0411376953125, -0.00855255126953125, -0.0167388916015625, -0.01111602783203125, 0.0160064697265625, 0.0202178955078125, 0.00879669189453125, -0.038970947265625, 0.044586181640625, 0.0219879150390625, 0.02655029296875, 0.00498199462890625, 0.047210693359375, 0.009429931640625, 0.07659912109375, -0.01904296875, -0.053924560546875, 0.01267242431640625, -0.0782470703125, -0.0050811767578125, 0.0201568603515625, -0.005245208740234375, -0.03826904296875, 0.0352783203125, 0.0130462646484375, 0.0170745849609375, 0.035736083984375 ]
780ae8767ceb119a5ed27dff948e74de7d4af7a0
Wordpress Stackexchange Q: Remove before_widget / after_widget content from Wp_Widget_Text I want to take the text widget and remove the preceding / trailing markup from the text output currently showing as <div class="textwidget">Test</div> The before_widget / after_widget that is assigned with each widget area is under my control but the widget content itself is beyond me. // Area 4, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'First Footer Widget Area', 'lakeshoreautoclinic' ), 'id' => 'first-footer-widget-area', 'description' => __( 'The first footer widget area', 'lakeshoreautoclinic' ), 'before_widget' => ' <p>', 'after_widget' => '</p>', 'before_title' => '<strong>', 'after_title' => '</strong>', ) ); which outputs this for the surrounding / widget <p><strong>Test</strong><div class="textwidget">Test</div></p> A: You have a couple options as I see it: There's a the_widget() template tag that lets you control the before_widget and after_widget properties. However, it divorces the widget from the Widgets UI. Alternately, you can try to accomplish whatever you're trying to do via CSS. If you change your before_widget line to this: 'before_widget' => '<p id="%1$s" class="widget %2$s">', you'll get some classes and IDs that will make each widget style-able.
Q: Remove before_widget / after_widget content from Wp_Widget_Text I want to take the text widget and remove the preceding / trailing markup from the text output currently showing as <div class="textwidget">Test</div> The before_widget / after_widget that is assigned with each widget area is under my control but the widget content itself is beyond me. // Area 4, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'First Footer Widget Area', 'lakeshoreautoclinic' ), 'id' => 'first-footer-widget-area', 'description' => __( 'The first footer widget area', 'lakeshoreautoclinic' ), 'before_widget' => ' <p>', 'after_widget' => '</p>', 'before_title' => '<strong>', 'after_title' => '</strong>', ) ); which outputs this for the surrounding / widget <p><strong>Test</strong><div class="textwidget">Test</div></p> A: You have a couple options as I see it: There's a the_widget() template tag that lets you control the before_widget and after_widget properties. However, it divorces the widget from the Widgets UI. Alternately, you can try to accomplish whatever you're trying to do via CSS. If you change your before_widget line to this: 'before_widget' => '<p id="%1$s" class="widget %2$s">', you'll get some classes and IDs that will make each widget style-able. A: Text widgets formating can be found in '/wp-includes/default-widgets.php' starting from line 368. In order to remove that formating you would have to change line 382. <div class="textwidget"><?php echo !empty( $instance['filter'] ) ? wpautop( $text ) : $text; ?></div> Just remove divs so you would have <?php echo !empty( $instance['filter'] ) ? wpautop( $text ) : $text; ?> However, that way you are changing wordpress core files, which means it might get changed in next updates, so better way to do it is copying the text widget class, renaming it (and the constructor), and adding it to your themes functions.php file (or a Plugin if you wish). This is also a way to change position of widget name and so on...
wordpress
{ "language": "en", "length": 306, "provenance": "stackexchange_00019.jsonl.gz:413336", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29433" }
[ 0.0200347900390625, -0.02313232421875, -0.0283660888671875, -0.034515380859375, 0.0006513595581054688, -0.041839599609375, 0.0158538818359375, -0.0014934539794921875, 0.0027332305908203125, 0.022216796875, -0.031494140625, 0.006011962890625, -0.0279998779296875, -0.00534820556640625, -0.0159912109375, -0.0286102294921875, 0.0330810546875, 0.010528564453125, 0.040985107421875, -0.007404327392578125, -0.01493072509765625, 0.01236724853515625, 0.038330078125, 0.08587646484375, -0.01398468017578125, -0.038726806640625, 0.1273193359375, -0.00385284423828125, -0.01461029052734375, -0.040069580078125, 0.02398681640625, -0.006443023681640625, 0.0033893585205078125, 0.047882080078125, -0.020050048828125, 0.00421142578125, -0.027923583984375, 0.03155517578125, 0.0194549560546875, 0.004638671875, 0.032257080078125, -0.04473876953125, -0.048980712890625, -0.007465362548828125, -0.024810791015625, -0.0016756057739257812, 0.0196685791015625, -0.0173797607421875, 0.041259765625, -0.01372528076171875, -0.0102691650390625, -0.0033702850341796875, 0.006496429443359375, -0.033721923828125, -0.038848876953125, -0.01068878173828125, -0.0280914306640625, -0.0284271240234375, 0.022705078125, 0.037445068359375, 0.0205230712890625, -0.017120361328125, 0.006855010986328125, -0.0246734619140625, -0.0228271484375, -0.0188751220703125, -0.019805908203125, 0.01519012451171875, -0.0149688720703125, -0.0058135986328125, 0.024139404296875, -0.01019287109375, 0.0007238388061523438, -0.046844482421875, 0.0182037353515625, 0.04461669921875, -0.028594970703125, 0.007770538330078125, 0.0186767578125, -0.0037841796875, 0.04541015625, 0.041748046875, -0.0295562744140625, 0.01009368896484375, 0.012115478515625, 0.01202392578125, -0.0020847320556640625, -0.03399658203125, -0.0212249755859375, 0.009185791015625, -0.01306915283203125, -0.04473876953125, 0.037689208984375, -0.01476287841796875, -0.0263824462890625, -0.0338134765625, 0.021514892578125, 0.035308837890625, -0.0107574462890625, 0.020904541015625, 0.0197906494140625, -0.031585693359375, 0.032989501953125, -0.0372314453125, 0.00881195068359375, 0.031494140625, -0.05133056640625, 0.042755126953125, 0.06842041015625, 0.050048828125, 0.03436279296875, -0.0280303955078125, -0.01080322265625, -0.02899169921875, -0.0290985107421875, 0.05950927734375, 0.016876220703125, -0.01141357421875, 0.00801849365234375, 0.0204925537109375, -0.0068511962890625, 0.0006093978881835938, 0.03857421875, -0.0014934539794921875, 0.035919189453125, 0.027313232421875, -0.00951385498046875, -0.03656005859375, 0.01345062255859375, -0.001674652099609375, -0.031097412109375, 0.0025539398193359375, 0.03350830078125, 0.04681396484375, 0.028106689453125, -0.0120391845703125, 0.050506591796875, -0.020751953125, -0.0023040771484375, 0.041778564453125, -0.0309906005859375, -0.057403564453125, -0.02508544921875, -0.0175628662109375, 0.007549285888671875, 0.02716064453125, 0.01450347900390625, -0.0159149169921875, -0.008056640625, -0.06494140625, 0.032867431640625, -0.09405517578125, 0.051239013671875, -0.0009975433349609375, -0.028350830078125, -0.04229736328125, 0.03375244140625, -0.04443359375, -0.0341796875, -0.06317138671875, -0.01380157470703125, -0.0103912353515625, 0.005901336669921875, -0.0518798828125, -0.0305938720703125, 0.00632476806640625, -0.01415252685546875, 0.020751953125, 0.031890869140625, 0.06121826171875, 0.01404571533203125, -0.044830322265625, -0.0004444122314453125, 0.027679443359375, -0.01100921630859375, 0.046173095703125, -0.0149688720703125, -0.02239990234375, 0.0196533203125, -0.01128387451171875, -0.053619384765625, -0.051025390625, 0.01641845703125, -0.0160064697265625, -0.06475830078125, -0.019073486328125, 0.03448486328125, 0.08087158203125, -0.002765655517578125, 0.047943115234375, 0.041778564453125, -0.0274658203125, -0.08221435546875, 0.0172576904296875, 0.02044677734375, 0.018402099609375, -0.0280609130859375, -0.0164947509765625, 0.0166473388671875, -0.01184844970703125, 0.03936767578125, 0.0251922607421875, -0.006847381591796875, -0.0265960693359375, -0.04534912109375, 0.002658843994140625, -0.01540374755859375, 0.046173095703125, -0.027679443359375, 0.01018524169921875, 0.03143310546875, 0.0297088623046875, -0.034515380859375, -0.01983642578125, -0.0190582275390625, -0.0169677734375, 0.045135498046875, 0.06439208984375, 0.028350830078125, 0.00312042236328125, 0.0249786376953125, -0.0232696533203125, 0.038116455078125, 0.052490234375, 0.03228759765625, -0.004604339599609375, -0.01229095458984375, -0.01593017578125, 0.0005025863647460938, -0.0089874267578125, -0.036895751953125, 0.055908203125, 0.0169677734375, -0.00566864013671875, -0.0302581787109375, 0.0092010498046875, 0.0159454345703125, -0.05267333984375, -0.0097503662109375, 0.0308837890625, 0.0162200927734375, 0.07135009765625, -0.033172607421875, -0.01313018798828125, 0.0270843505859375, -0.054779052734375, 0.009368896484375, -0.0236358642578125, 0.024871826171875, 0.0501708984375, -0.0045318603515625, -0.009918212890625, 0.022247314453125, -0.01546478271484375, 0.034393310546875, 0.007328033447265625, -0.0293731689453125, -0.027191162109375, -0.0106353759765625, 0.0290985107421875, 0.005374908447265625, -0.009124755859375, -0.0163116455078125, -0.0111846923828125, 0.01898193359375, 0.007572174072265625, 0.01806640625, 0.00008970499038696289, -0.05023193359375, -0.00604248046875, 0.052276611328125, 0.04046630859375, -0.022613525390625, -0.003997802734375, 0.038970947265625, -0.0208740234375, -0.03857421875, 0.0064544677734375, -0.00714874267578125, -0.0182952880859375, 0.01026153564453125, 0.0352783203125, 0.02056884765625, -0.00714874267578125, 0.0008807182312011719, -0.055450439453125, 0.01415252685546875, 0.0207672119140625, 0.002895355224609375, 0.004085540771484375, 0.004589080810546875, 0.001956939697265625, -0.03546142578125, 0.038360595703125, 0.00839996337890625, -0.0283660888671875, 0.02728271484375, 0.01499176025390625, 0.0014438629150390625, 0.0078887939453125, 0.03594970703125, 0.04534912109375, -0.00933074951171875, -0.0084381103515625, 0.0189361572265625, -0.003509521484375, 0.026092529296875, -0.0018186569213867188, 0.004856109619140625, 0.01629638671875, -0.05401611328125, 0.005191802978515625, 0.01898193359375, 0.0732421875, 0.0007729530334472656, -0.0423583984375, 0.031524658203125, 0.030914306640625, 0.006206512451171875, -0.0187835693359375, 0.025115966796875, -0.03045654296875, -0.053680419921875, 0.0308074951171875, -0.045074462890625, 0.01464080810546875, 0.044921875, -0.01068115234375, -0.04193115234375, -0.027069091796875, -0.050140380859375, -0.051544189453125, -0.0445556640625, 0.0241241455078125, -0.01282501220703125, 0.0171661376953125, 0.005214691162109375, 0.0306396484375, 0.002288818359375, -0.027557373046875, 0.0193328857421875, 0.021209716796875, -0.0004520416259765625, 0.0152435302734375, -0.02606201171875, -0.02392578125, -0.0183868408203125, 0.00695037841796875, -0.00907135009765625, -0.018402099609375, 0.01265716552734375, -0.00022351741790771484, 0.00438690185546875, -0.00518035888671875, 0.01332855224609375, -0.0128173828125, 0.004665374755859375, -0.00824737548828125, -0.01468658447265625, -0.034637451171875, -0.017913818359375, 0.0047760009765625, -0.033294677734375, 0.05120849609375, 0.00392913818359375, -0.0188751220703125, 0.00876617431640625, 0.024505615234375, 0.01033782958984375, -0.020355224609375, 0.007843017578125, -0.0521240234375, 0.06201171875, 0.0208892822265625, 0.042724609375, -0.0200042724609375, -0.004604339599609375, -0.03167724609375, 0.0187530517578125, 0.00042176246643066406, 0.02264404296875, 0.0209197998046875, 0.0147247314453125, 0.031829833984375, -0.004817962646484375, 0.02734375, -0.040069580078125, 0.016357421875, -0.014495849609375, -0.0024547576904296875, 0.00402069091796875, 0.047882080078125, -0.09063720703125, -0.0096435546875, 0.010040283203125, 0.01383209228515625, 0.005947113037109375, -0.0273590087890625, -0.051177978515625, -0.030731201171875, -0.1427001953125, 0.04510498046875, 0.01480865478515625, -0.02069091796875, -0.0220184326171875, -0.0005831718444824219, -0.076416015625, -0.045196533203125, 0.027435302734375, -0.006458282470703125, 0.0159149169921875, 0.0119171142578125, -0.017364501953125, 0.0207977294921875, -0.0173797607421875, -0.040985107421875, -0.021209716796875, 0.007282257080078125, -0.050048828125, 0.0277099609375, 0.0286712646484375, 0.00252532958984375, -0.016754150390625, 0.010223388671875, 0.01265716552734375, -0.04217529296875, 0.03155517578125, 0.01380157470703125, -0.0170745849609375, 0.01265716552734375, 0.011962890625, -0.0242462158203125, -0.0005559921264648438, -0.01084136962890625, -0.039093017578125, -0.0023212432861328125, -0.03863525390625, -0.0168304443359375, 0.01221466064453125, -0.036956787109375, -0.039154052734375, -0.01092529296875, -0.007598876953125, 0.0159759521484375, -0.035064697265625, 0.03131103515625, -0.010711669921875, -0.0305328369140625, 0.007602691650390625, 0.00428009033203125, -0.0223388671875, 0.010406494140625, 0.0105133056640625, 0.034637451171875, -0.02972412109375, 0.04058837890625, -0.01474761962890625, 0.05908203125, 0.03369140625, -0.029052734375, 0.006786346435546875, -0.0489501953125, 0.03887939453125, 0.037994384765625, -0.01441192626953125, 0.024871826171875, 0.07550048828125, 0.01824951171875, -0.0228424072265625, 0.0044097900390625, 0.003047943115234375, -0.05230712890625, 0.0016260147094726562, 0.0013132095336914062, 0.0063629150390625, 0.040130615234375, -0.002475738525390625, 0.003753662109375, -0.0318603515625, -0.01421356201171875, 0.0241546630859375, -0.01102447509765625, 0.04638671875, 0.010284423828125, 0.01171875, 0.0128173828125, -0.05377197265625, -0.005390167236328125, -0.0246124267578125, -0.0236053466796875, -0.0452880859375, -0.029937744140625, -0.0073699951171875, -0.0246734619140625, -0.026153564453125, 0.02264404296875, 0.0020751953125, 0.06634521484375, 0.020538330078125, -0.021026611328125, -0.0156402587890625, 0.005092620849609375, 0.04949951171875, -0.022735595703125, 0.040069580078125, 0.033966064453125, -0.01000213623046875, -0.016510009765625, -0.0208892822265625, 0.00518798828125, -0.0089263916015625, -0.0418701171875, -0.03619384765625, -0.0021152496337890625, -0.018890380859375, 0.018341064453125, -0.0081939697265625, -0.0150604248046875, -0.004169464111328125, -0.01482391357421875, 0.0212860107421875, -0.01445770263671875, 0.032623291015625, 0.0182647705078125, -0.01025390625, 0.0274658203125, -0.005401611328125, 0.021728515625, -0.012451171875, -0.00531005859375, 0.033660888671875, 0.0294036865234375, -0.003879547119140625, -0.01314544677734375, 0.0029087066650390625, -0.02435302734375, -0.003475189208984375, 0.045654296875, 0.0171051025390625, -0.041229248046875, -0.01141357421875, 0.01593017578125, 0.033843994140625, -0.026275634765625, 0.00019991397857666016, 0.020904541015625, -0.031585693359375, 0.00024020671844482422, 0.0181732177734375, -0.0086517333984375, -0.0301055908203125, -0.0162506103515625, -0.006134033203125, 0.00972747802734375, -0.03717041015625, -0.0655517578125, -0.07080078125, 0.0289154052734375, 0.00678253173828125, 0.0241851806640625, -0.0390625, 0.0311431884765625, -0.045501708984375, 0.026031494140625, -0.10809326171875, 0.0253143310546875, 0.0009713172912597656, 0.015777587890625, -0.03619384765625, 0.00917816162109375, -0.044769287109375, -0.037994384765625, -0.07073974609375, -0.04925537109375, -0.048492431640625, 0.0037994384765625, 0.0163116455078125, 0.004703521728515625, 0.007678985595703125, -0.02520751953125, 0.003231048583984375, 0.0308074951171875, 0.030364990234375, 0.033050537109375, -0.0219879150390625, 0.06658935546875, 0.010986328125, 0.07965087890625, 0.01078033447265625, 0.0113525390625, -0.0169525146484375, -0.0245513916015625, 0.042724609375, -0.047943115234375, -0.0406494140625, -0.042877197265625, -0.0287017822265625, -0.01922607421875, -0.0011911392211914062, -0.0173492431640625, 0.0240478515625, -0.008575439453125, -0.0033092498779296875, -0.018524169921875, 0.004024505615234375, -0.01387786865234375, 0.00860595703125, 0.011871337890625, -0.0260467529296875, 0.006313323974609375, 0.005619049072265625, 0.0172576904296875, -0.00879669189453125, -0.022064208984375, 0.0003788471221923828, 0.0185699462890625, -0.0202178955078125, 0.0275726318359375, 0.02972412109375, -0.0014429092407226562, 0.0372314453125, 0.011871337890625, 0.0302734375, 0.04925537109375, -0.03125, 0.00710296630859375, 0.0041046142578125, 0.06427001953125, -0.005397796630859375, -0.007061004638671875, 0.0755615234375, -0.0214996337890625, 0.01239776611328125, 0.05267333984375, 0.05181884765625, -0.09600830078125, 0.00604248046875, -0.00827789306640625, 0.0038585662841796875, 0.044769287109375, -0.004817962646484375, 0.007083892822265625, -0.03277587890625, 0.047882080078125, 0.033172607421875, 0.00856781005859375, 0.0288848876953125, 0.006832122802734375, -0.004810333251953125, -0.004962921142578125, 0.01491546630859375, 0.032989501953125, -0.0200042724609375, -0.0006551742553710938, 0.0248565673828125, 0.00983428955078125, -0.045867919921875, -0.003849029541015625, -0.002872467041015625, -0.027618408203125, -0.0660400390625, -0.005107879638671875, 0.01065826416015625, -0.010833740234375, 0.0095977783203125, -0.043304443359375, 0.02996826171875, 0.00711822509765625, -0.031219482421875, 0.034881591796875, -0.05975341796875, 0.041229248046875, -0.0156707763671875, -0.005474090576171875, -0.0004420280456542969, -0.0164337158203125, -0.0089874267578125, 0.026092529296875, -0.0360107421875, -0.0177459716796875, -0.0273590087890625, 0.03289794921875, 0.1170654296875, -0.029541015625, -0.024139404296875, 0.0372314453125, 0.04644775390625, -0.0305328369140625, -0.04547119140625, 0.027099609375, -0.04095458984375, 0.0003452301025390625, -0.034912109375, -0.0240020751953125, -0.0111236572265625, -0.08880615234375, -0.07452392578125, 0.10089111328125, 0.0159454345703125, 0.046478271484375, -0.00286865234375, 0.0254974365234375, -0.01256561279296875, 0.0228118896484375, -0.01265716552734375, 0.00783538818359375, -0.019744873046875, 0.00690460205078125, 0.0129241943359375, 0.004764556884765625, 0.0032253265380859375, 0.0163116455078125, 0.03546142578125, 0.003753662109375, 0.038360595703125, 0.00978851318359375, 0.05096435546875, 0.04949951171875, -0.0264129638671875, -0.030548095703125, 0.01439666748046875, 0.0289306640625, -0.038665771484375, -0.028411865234375, 0.040557861328125, -0.095947265625, -0.02191162109375, 0.035675048828125, 0.0299072265625, 0.05389404296875, -0.0004062652587890625, 0.05682373046875, 0.0223541259765625, -0.0163116455078125, 0.01183319091796875, -0.054168701171875, -0.01299285888671875, 0.06732177734375, 0.03472900390625, -0.0137786865234375, 0.01085662841796875, -0.045867919921875, 0.05609130859375, -0.005340576171875, 0.046722412109375, 0.0211334228515625, 0.024169921875, 0.011871337890625, 0.034332275390625, 0.045074462890625, 0.0633544921875, -0.031890869140625, -0.0082550048828125, 0.0240936279296875, 0.0264892578125, 0.01275634765625, 0.04351806640625, -0.010894775390625, -0.010955810546875, -0.0202178955078125, 0.005130767822265625, 0.006397247314453125, -0.007526397705078125, -0.0117645263671875, -0.0288238525390625, -0.0005135536193847656, -0.06353759765625, -0.061767578125, -0.0268096923828125, -0.0159149169921875, -0.00443267822265625, 0.0330810546875, -0.02337646484375, -0.00811767578125, 0.002044677734375, -0.02691650390625, -0.044921875, -0.0005664825439453125, 0.0291290283203125, 0.06304931640625, 0.0273590087890625, 0.021759033203125, 0.0028476715087890625, -0.02978515625, -0.01654052734375, -0.0338134765625, -0.011138916015625, 0.0250701904296875, -0.0187225341796875, 0.046875, -0.021087646484375, 0.0241241455078125, 0.0202484130859375, 0.0249176025390625, 0.054901123046875, 0.049896240234375, -0.006259918212890625, -0.002490997314453125, -0.00789642333984375, -0.0191802978515625, 0.02264404296875, -0.044158935546875, 0.01397705078125, -0.0119781494140625, -0.008270263671875, -0.038238525390625, 0.0305633544921875, 0.001979827880859375, -0.0164794921875, 0.02423095703125, 0.004634857177734375, 0.0002682209014892578, 0.004283905029296875, -0.007762908935546875, -0.01114654541015625, -0.0010023117065429688, -0.033416748046875, -0.0013713836669921875, -0.006740570068359375, -0.044830322265625, 0.00655364990234375, 0.03326416015625, -0.036865234375, 0.021759033203125, 0.0357666015625, -0.011444091796875, -0.00943756103515625, -0.02203369140625, 0.06036376953125, -0.0098419189453125, -0.020751953125, 0.0263671875, -0.030242919921875, -0.0235443115234375, 0.0266265869140625, 0.044677734375, 0.01454925537109375, 0.0018405914306640625, 0.005474090576171875, 0.023284912109375, -0.00917816162109375, 0.02215576171875, -0.0189666748046875, -0.0384521484375, 0.039459228515625, 0.009002685546875, 0.0201263427734375, -0.01177978515625, -0.03948974609375, -0.0035419464111328125, 0.0263671875, -0.043212890625, 0.02069091796875, -0.038848876953125, 0.0015668869018554688, -0.029205322265625, -0.0210723876953125, -0.0171966552734375, -0.00940704345703125, 0.0158843994140625, 0.00859832763671875, 0.022491455078125, 0.0012311935424804688, -0.03814697265625, -0.001987457275390625, 0.03375244140625, 0.0021762847900390625, 0.027862548828125, 0.0364990234375, 0.039154052734375, 0.0230712890625, -0.019622802734375, -0.01543426513671875, 0.047332763671875, -0.00449371337890625, 0.0133514404296875, 0.0241851806640625, 0.03985595703125, 0.027801513671875, -0.00325775146484375, 0.00022363662719726562, -0.01898193359375, 0.005687713623046875, -0.038665771484375, 0.0013675689697265625, 0.01422882080078125, -0.006839752197265625, -0.02899169921875, -0.023406982421875, -0.0240020751953125, -0.04229736328125, -0.0157470703125, 0.04400634765625, -0.043182373046875, -0.004474639892578125, -0.09320068359375, -0.01073455810546875, 0.0079498291015625, 0.035614013671875, -0.063232421875, 0.049346923828125, 0.010894775390625, -0.0281524658203125, 0.0005173683166503906, 0.0069732666015625, -0.0243072509765625, -0.029083251953125, -0.0247650146484375, -0.0306243896484375, -0.06109619140625, 0.0364990234375, -0.0362548828125, -0.00827789306640625, -0.0181732177734375, -0.013427734375, 0.0051422119140625, 0.0006804466247558594, 0.0239410400390625, 0.046844482421875, 0.037445068359375, 0.005352020263671875, 0.00464630126953125, 0.022216796875, -0.019012451171875, -0.056884765625, -0.003925323486328125, -0.0018339157104492188, -0.0261993408203125, 0.030914306640625, -0.04791259765625, -0.054656982421875, -0.0601806640625, -0.08599853515625, 0.039794921875, 0.01380157470703125, -0.0360107421875, 0.017486572265625, 0.0006380081176757812, -0.0294952392578125, -0.0000820159912109375, 0.0163421630859375, -0.0215606689453125, 0.01099395751953125, 0.0254669189453125, 0.01654052734375, 0.062744140625, 0.0172576904296875, -0.0084686279296875, -0.07666015625, -0.0116424560546875, -0.050506591796875, 0.07232666015625, -0.03936767578125, -0.0029144287109375, -0.00916290283203125, -0.0019550323486328125, -0.033905029296875, -0.01415252685546875, 0.0243377685546875, 0.04656982421875, 0.0015087127685546875, -0.0152435302734375, -0.0217437744140625, -0.01026153564453125, 0.03704833984375, 0.03350830078125, 0.011016845703125, -0.008148193359375, -0.0193634033203125, 0.0181121826171875, -0.0160369873046875, -0.0270843505859375, 0.0189208984375, -0.09051513671875, -0.0650634765625, -0.0018405914306640625, -0.0236663818359375, 0.03607177734375, -0.0199127197265625, -0.03448486328125, 0.0162200927734375, 0.00975799560546875, 0.0230560302734375, -0.0792236328125, -0.00635528564453125, 0.061676025390625, -0.017242431640625, 0.03570556640625, -0.0323486328125, 0.03240966796875, 0.046173095703125, -0.01233673095703125, -0.035125732421875, -0.00946044921875, -0.025146484375, 0.0290069580078125, -0.0226898193359375, 0.030181884765625, -0.05377197265625, 0.0189056396484375, -0.032989501953125, -0.0202484130859375, 0.0060272216796875, -0.0166473388671875, 0.0182342529296875, -0.04705810546875, 0.006046295166015625, 0.0230865478515625, -0.008392333984375, 0.061004638671875, -0.01409149169921875, 0.047027587890625, 0.003940582275390625, -0.0149993896484375, 0.027496337890625, -0.001155853271484375, -0.003635406494140625, -0.0269927978515625, -0.0183258056640625, -0.0904541015625, 0.03668212890625, -0.0009746551513671875, 0.00234222412109375, 0.03338623046875 ]
b521a618cdd695cc63b3b9474b96bf7bde181fd2
Wordpress Stackexchange Q: jQuery AJAX form validation I am trying to create a custom login page for my site, namely http://localhost/site/login, the problem I am running into now is that when the user tries to log in and enters the wrong username or password, they are redirected to the wp-login.php page, which is problematic, as you can imagine, so I would like to add AJAX form validation to my custom form, but the problem is that I am unsure of how to go about this the best way. How can I validate a user using jQuery AJAX? This is what I have thus far: jQuery: $('#selector').live('click', function(){ $.post('http://localhost/site/wp-login.php', { action: 'login' }, function(data){ console.log(data); }); }); I do know that this is not the proper way of going about it, it is just to give you guys an idea of what I am trying to do. What would be the best way to achieve the desired effect? Thanks in advance! A: jquery Validation plugin should do what you want.
Q: jQuery AJAX form validation I am trying to create a custom login page for my site, namely http://localhost/site/login, the problem I am running into now is that when the user tries to log in and enters the wrong username or password, they are redirected to the wp-login.php page, which is problematic, as you can imagine, so I would like to add AJAX form validation to my custom form, but the problem is that I am unsure of how to go about this the best way. How can I validate a user using jQuery AJAX? This is what I have thus far: jQuery: $('#selector').live('click', function(){ $.post('http://localhost/site/wp-login.php', { action: 'login' }, function(data){ console.log(data); }); }); I do know that this is not the proper way of going about it, it is just to give you guys an idea of what I am trying to do. What would be the best way to achieve the desired effect? Thanks in advance! A: jquery Validation plugin should do what you want. A: If you like to hand code the solution in your theme, instead of using a plugin, you should try this. $('#signin-form input[type="image"]').click(function(q){ q.preventDefault(); var inputData = $('#signin-form form').serialize(); var loginUrl = $('#signin-form form').attr('action'); var homeUrl = $('#signin-form input[name="redirect_to"]').attr('value'); $.ajax({ type: "POST", url: loginUrl, data: inputData, success: function(msg){ testData = $('#login-status',msg).html(); if(testData == 'success'){ window.location = homeUrl; } else { $('#signin-form .error').show(); // show error notification here } } }); }); First the function prevent the original login form submission (non ajax login) and replace it with an ajax request. If the provided username and password match, then we are supposed be redirected to a certain 'logged-in page'. Else, we are redirected to the wp-admin/login.php On success, the function check whether we have the "#login-status" div with the content "success" on the 'logged-in page' or not. If we do, all we have to do is redirect current location. If we don't, just show the error notification. Hope this help. A: Try using an AJAX login plugin. http://wordpress.org/extend/plugins/login-with-ajax/ If you don't like a feature, all of the code is at your fingertips. That's the beauty of open source, you can take what someone has built and make it even better and give it back to the community. My position is that if it's already out there, why reinvent the wheel? Use what is given to propel your project further, faster (giving original authors credit where credit is due obviously).
wordpress
{ "language": "en", "length": 405, "provenance": "stackexchange_00019.jsonl.gz:413356", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29501" }
[ 0.07794189453125, 0.0222015380859375, -0.053070068359375, -0.074951171875, 0.060760498046875, -0.0478515625, 0.037445068359375, 0.0164642333984375, -0.048004150390625, 0.0122222900390625, 0.002956390380859375, 0.0100250244140625, -0.035125732421875, -0.031707763671875, 0.0219268798828125, -0.036590576171875, -0.0008778572082519531, 0.005977630615234375, 0.009735107421875, -0.04107666015625, 0.021270751953125, -0.05328369140625, 0.0157318115234375, 0.0163726806640625, 0.0009670257568359375, 0.021484375, 0.09637451171875, -0.01059722900390625, 0.03765869140625, 0.0067596435546875, 0.02471923828125, -0.083740234375, 0.0208587646484375, 0.0174102783203125, -0.0169830322265625, -0.007556915283203125, 0.0218658447265625, -0.0023975372314453125, -0.003566741943359375, 0.04498291015625, 0.05938720703125, -0.04217529296875, 0.0089263916015625, 0.0212554931640625, 0.0129241943359375, -0.03460693359375, 0.07281494140625, -0.04083251953125, 0.018218994140625, -0.0027217864990234375, 0.0050201416015625, -0.01549530029296875, 0.02117919921875, -0.002025604248046875, -0.03131103515625, -0.005855560302734375, -0.068115234375, 0.00626373291015625, 0.052398681640625, 0.07318115234375, 0.007686614990234375, -0.060302734375, -0.0034885406494140625, -0.06695556640625, 0.0007476806640625, -0.0022907257080078125, -0.0240020751953125, 0.033843994140625, 0.01110076904296875, -0.006725311279296875, -0.0246429443359375, -0.0199432373046875, -0.017852783203125, -0.003376007080078125, -0.0246429443359375, -0.00913238525390625, 0.00991058349609375, -0.0202178955078125, 0.006168365478515625, 0.0213165283203125, -0.0247802734375, 0.006679534912109375, -0.02459716796875, -0.007427215576171875, -0.00121307373046875, 0.02587890625, -0.0316162109375, -0.01511383056640625, -0.045501708984375, -0.049713134765625, -0.012115478515625, -0.06939697265625, -0.08294677734375, 0.030120849609375, 0.00865936279296875, -0.0024166107177734375, 0.01227569580078125, -0.0006260871887207031, 0.01507568359375, 0.00118255615234375, 0.017913818359375, -0.04180908203125, 0.020782470703125, -0.01413726806640625, -0.0210723876953125, 0.0210418701171875, 0.029296875, 0.01141357421875, -0.0096282958984375, 0.005992889404296875, -0.0220947265625, -0.0165557861328125, -0.016876220703125, -0.0218505859375, -0.00957489013671875, 0.025054931640625, -0.0181884765625, -0.017181396484375, -0.001667022705078125, -0.0123291015625, -0.037506103515625, -0.0170135498046875, 0.0048980712890625, -0.0311279296875, 0.0276947021484375, -0.021942138671875, -0.024505615234375, 0.00977325439453125, -0.01178741455078125, -0.013580322265625, -0.024139404296875, 0.044677734375, 0.06378173828125, 0.01253509521484375, -0.01496124267578125, -0.01244354248046875, 0.054901123046875, -0.0021724700927734375, 0.00778961181640625, 0.004932403564453125, 0.00823211669921875, -0.019256591796875, -0.0010671615600585938, -0.010498046875, -0.0128021240234375, 0.0190277099609375, 0.01557159423828125, 0.01593017578125, -0.0182342529296875, -0.0426025390625, 0.010772705078125, -0.033721923828125, 0.0217742919921875, 0.00942230224609375, 0.0209808349609375, 0.01617431640625, 0.055816650390625, -0.031982421875, -0.03839111328125, -0.01538848876953125, 0.050537109375, 0.01666259765625, -0.0034923553466796875, -0.0101165771484375, -0.00661468505859375, -0.053863525390625, -0.0518798828125, 0.012115478515625, 0.02667236328125, 0.028167724609375, 0.017791748046875, -0.01202392578125, 0.0158843994140625, 0.002262115478515625, -0.00885009765625, 0.0150146484375, -0.02001953125, 0.059051513671875, 0.029327392578125, 0.0036754608154296875, 0.010284423828125, -0.03057861328125, 0.08734130859375, -0.001369476318359375, -0.027801513671875, 0.0186920166015625, 0.0328369140625, 0.06317138671875, -0.018218994140625, 0.032562255859375, 0.0062255859375, 0.030059814453125, 0.007381439208984375, -0.00197601318359375, -0.0312042236328125, -0.044921875, 0.00841522216796875, -0.00717926025390625, -0.027099609375, 0.05584716796875, 0.006046295166015625, -0.007686614990234375, -0.01519775390625, -0.007343292236328125, -0.0300750732421875, -0.025665283203125, -0.0070343017578125, 0.03704833984375, -0.0255584716796875, -0.0036830902099609375, 0.0223541259765625, 0.01174163818359375, -0.02392578125, -0.0280303955078125, -0.01849365234375, -0.00777435302734375, -0.04229736328125, 0.02001953125, -0.0293426513671875, 0.061431884765625, -0.04071044921875, -0.047607421875, -0.040924072265625, -0.0380859375, 0.00031948089599609375, -0.0017614364624023438, -0.0217132568359375, -0.0123291015625, -0.01239776611328125, 0.00907135009765625, 0.0011625289916992188, 0.0322265625, 0.047882080078125, 0.049530029296875, -0.045684814453125, -0.035675048828125, -0.0645751953125, -0.052947998046875, -0.0047454833984375, 0.070068359375, 0.01215362548828125, 0.0323486328125, -0.00832366943359375, 0.054290771484375, 0.00946044921875, -0.06488037109375, -0.01142120361328125, 0.052703857421875, 0.01471710205078125, 0.019683837890625, -0.0140533447265625, -0.028228759765625, 0.0220489501953125, -0.037750244140625, 0.01617431640625, 0.0293731689453125, -0.023773193359375, 0.0259246826171875, -0.040924072265625, 0.01027679443359375, -0.0137786865234375, -0.01342010498046875, -0.00873565673828125, -0.0325927734375, 0.05950927734375, -0.039154052734375, 0.0190582275390625, 0.0018491744995117188, 0.0028839111328125, -0.033599853515625, 0.004985809326171875, -0.08685302734375, 0.0013332366943359375, 0.01532745361328125, 0.0295257568359375, 0.0548095703125, -0.0474853515625, -0.01346588134765625, 0.042877197265625, 0.036224365234375, -0.020233154296875, 0.0049896240234375, -0.0006885528564453125, -0.01119232177734375, 0.00044846534729003906, -0.04693603515625, 0.0278472900390625, 0.0016956329345703125, 0.04437255859375, 0.023101806640625, 0.05084228515625, -0.01416778564453125, -0.015777587890625, 0.0230255126953125, 0.018402099609375, -0.048858642578125, 0.01212310791015625, -0.00701904296875, 0.041595458984375, -0.050018310546875, -0.00836181640625, 0.038604736328125, -0.007411956787109375, -0.01099395751953125, -0.0030612945556640625, -0.016326904296875, 0.0004858970642089844, 0.0015554428100585938, -0.004547119140625, -0.021575927734375, -0.005191802978515625, 0.03143310546875, 0.051025390625, 0.05230712890625, 0.054412841796875, -0.005657196044921875, 0.0285797119140625, 0.069580078125, -0.0137481689453125, -0.0799560546875, -0.09130859375, -0.060760498046875, 0.04815673828125, 0.01233673095703125, 0.00887298583984375, 0.0017805099487304688, 0.03485107421875, 0.039947509765625, -0.029998779296875, -0.005512237548828125, -0.037567138671875, -0.0274505615234375, -0.0389404296875, 0.004016876220703125, -0.00701141357421875, 0.003147125244140625, -0.0017843246459960938, 0.0304718017578125, -0.00637054443359375, -0.060302734375, -0.03839111328125, 0.01303863525390625, 0.003307342529296875, -0.01012420654296875, -0.0243072509765625, 0.01180267333984375, 0.00620269775390625, 0.0025634765625, 0.0050506591796875, -0.0029277801513671875, 0.006725311279296875, -0.031280517578125, -0.0086212158203125, 0.006317138671875, 0.001857757568359375, 0.0292510986328125, 0.013946533203125, 0.0087127685546875, 0.032012939453125, -0.044769287109375, -0.00432586669921875, 0.01279449462890625, -0.028076171875, -0.00518798828125, -0.005931854248046875, -0.0219573974609375, 0.03106689453125, 0.0030517578125, 0.024078369140625, -0.0045013427734375, 0.0292816162109375, -0.005828857421875, 0.0347900390625, -0.00896453857421875, -0.0035686492919921875, -0.04449462890625, 0.0243988037109375, -0.04046630859375, -0.0164031982421875, -0.0096435546875, -0.0253753662109375, -0.00933074951171875, -0.0239410400390625, -0.00006020069122314453, -0.07330322265625, 0.044677734375, 0.006076812744140625, 0.0011644363403320312, -0.0165557861328125, -0.0287017822265625, 0.01499176025390625, 0.0867919921875, 0.0139923095703125, -0.017303466796875, 0.004390716552734375, -0.0006003379821777344, -0.0400390625, -0.002979278564453125, -0.047027587890625, 0.003932952880859375, -0.061279296875, 0.00789642333984375, -0.01025390625, -0.01476287841796875, 0.0065765380859375, -0.039459228515625, -0.00803375244140625, -0.0433349609375, 0.034088134765625, -0.055023193359375, 0.030242919921875, -0.0084075927734375, 0.03350830078125, -0.05438232421875, 0.0017538070678710938, -0.0303497314453125, -0.03863525390625, -0.0028820037841796875, -0.04290771484375, 0.04010009765625, 0.037078857421875, -0.0428466796875, 0.0018129348754882812, 0.01265716552734375, 0.0175933837890625, -0.01374053955078125, 0.006103515625, -0.015838623046875, 0.02264404296875, -0.00014281272888183594, -0.01218414306640625, -0.00937652587890625, -0.002620697021484375, -0.0012350082397460938, -0.041656494140625, -0.01837158203125, -0.030120849609375, -0.04437255859375, 0.01092529296875, -0.0308990478515625, -0.04071044921875, -0.05291748046875, -0.031005859375, 0.0160980224609375, -0.0192108154296875, -0.004550933837890625, -0.039886474609375, -0.031524658203125, 0.040130615234375, -0.0007195472717285156, -0.02703857421875, -0.00141143798828125, 0.056182861328125, 0.006671905517578125, -0.007808685302734375, -0.025054931640625, 0.0399169921875, 0.0399169921875, -0.007366180419921875, 0.0180511474609375, -0.041656494140625, -0.037506103515625, 0.1170654296875, -0.01678466796875, 0.0223236083984375, -0.007587432861328125, 0.02825927734375, -0.009002685546875, -0.0360107421875, 0.0277862548828125, 0.01308441162109375, -0.03619384765625, 0.0034809112548828125, 0.011383056640625, 0.025543212890625, 0.060638427734375, -0.04248046875, -0.05633544921875, 0.00925445556640625, 0.061279296875, -0.0292205810546875, 0.017303466796875, -0.03729248046875, 0.007633209228515625, 0.0028553009033203125, -0.0006060600280761719, -0.01499176025390625, -0.0201263427734375, -0.00384521484375, 0.0033359527587890625, -0.007480621337890625, 0.0182647705078125, 0.0100250244140625, 0.023651123046875, 0.008544921875, -0.01483154296875, -0.016937255859375, 0.078857421875, 0.004711151123046875, -0.0343017578125, -0.0023136138916015625, -0.035888671875, 0.00905609130859375, -0.01442718505859375, 0.0189666748046875, 0.0293731689453125, -0.021453857421875, -0.0245513916015625, 0.0009570121765136719, 0.016021728515625, -0.06719970703125, -0.048736572265625, 0.0119476318359375, 0.02044677734375, -0.0170135498046875, -0.0125885009765625, 0.0272064208984375, 0.03314208984375, -0.007030487060546875, -0.0183563232421875, 0.05352783203125, 0.046142578125, 0.034271240234375, 0.0198974609375, -0.0030040740966796875, -0.0160369873046875, -0.0018825531005859375, -0.021697998046875, -0.040557861328125, -0.048370361328125, 0.01294708251953125, 0.0350341796875, -0.01361846923828125, 0.02081298828125, 0.0118408203125, 0.0221099853515625, -0.01312255859375, 0.01611328125, -0.0219573974609375, -0.06396484375, -0.01177215576171875, 0.0150604248046875, 0.01122283935546875, -0.0254364013671875, -0.00676727294921875, -0.01873779296875, -0.01421356201171875, 0.0068511962890625, 0.01433563232421875, -0.0010290145874023438, -0.0156402587890625, -0.0175933837890625, -0.03192138671875, -0.01678466796875, -0.01251983642578125, -0.03692626953125, -0.025909423828125, 0.0020694732666015625, 0.00014328956604003906, -0.01776123046875, -0.018646240234375, 0.0159149169921875, -0.029693603515625, 0.009063720703125, -0.005218505859375, 0.019195556640625, -0.00431060791015625, -0.029205322265625, -0.01558685302734375, -0.0150299072265625, -0.03302001953125, -0.017730712890625, -0.0009336471557617188, 0.00487518310546875, -0.023101806640625, 0.004474639892578125, 0.0221405029296875, 0.0033168792724609375, -0.0005636215209960938, -0.0019207000732421875, -0.031646728515625, 0.007381439208984375, 0.0193328857421875, -0.0093231201171875, -0.00489044189453125, 0.06793212890625, -0.0176849365234375, 0.0413818359375, 0.0160064697265625, 0.036102294921875, -0.0162811279296875, -0.022857666015625, -0.0052490234375, -0.036529541015625, 0.002593994140625, -0.0130615234375, 0.010101318359375, 0.0278167724609375, 0.060211181640625, 0.01043701171875, -0.00098419189453125, -0.0157928466796875, -0.003692626953125, -0.0249481201171875, 0.04449462890625, 0.01392364501953125, -0.01068115234375, 0.032623291015625, -0.00040912628173828125, 0.0277099609375, 0.002765655517578125, -0.017730712890625, 0.0152587890625, 0.0047149658203125, 0.020751953125, -0.0054931640625, -0.023345947265625, 0.02490234375, 0.0347900390625, 0.003170013427734375, 0.026458740234375, 0.019561767578125, 0.0238189697265625, 0.0015535354614257812, 0.0011167526245117188, -0.048614501953125, -0.022552490234375, 0.0679931640625, 0.0282745361328125, -0.0259246826171875, 0.0743408203125, -0.0269927978515625, 0.0151519775390625, 0.084228515625, 0.06207275390625, -0.125732421875, 0.0214385986328125, -0.01287841796875, 0.0116424560546875, 0.06982421875, -0.007328033447265625, 0.0197601318359375, 0.0482177734375, 0.030670166015625, 0.0075836181640625, -0.01360321044921875, 0.0304107666015625, 0.00818634033203125, -0.004398345947265625, -0.0022144317626953125, 0.0450439453125, 0.006671905517578125, -0.035430908203125, -0.0025882720947265625, 0.027313232421875, 0.01023101806640625, 0.0010137557983398438, -0.0035839080810546875, 0.0030155181884765625, -0.0163116455078125, -0.034271240234375, 0.00428009033203125, -0.036041259765625, -0.0240631103515625, 0.005702972412109375, -0.00949859619140625, 0.0750732421875, 0.03863525390625, 0.00971221923828125, -0.0260162353515625, -0.02069091796875, 0.037994384765625, 0.0247344970703125, -0.03448486328125, -0.03076171875, -0.003063201904296875, -0.031646728515625, 0.0024127960205078125, -0.0015516281127929688, -0.012176513671875, -0.0028209686279296875, -0.035186767578125, 0.03900146484375, 0.004665374755859375, -0.0266876220703125, 0.021575927734375, -0.0196990966796875, -0.00325775146484375, -0.0214691162109375, -0.0170745849609375, -0.06463623046875, -0.0189971923828125, -0.0211334228515625, -0.0380859375, 0.01374053955078125, -0.0333251953125, -0.04840087890625, 0.0791015625, 0.010711669921875, 0.0243377685546875, 0.0136871337890625, 0.02386474609375, -0.04827880859375, 0.01177978515625, -0.033447265625, 0.034027099609375, -0.03631591796875, 0.031951904296875, -0.0252532958984375, 0.0178070068359375, 0.0003063678741455078, -0.01111602783203125, 0.0011949539184570312, 0.0005373954772949219, 0.007465362548828125, -0.037139892578125, -0.0190887451171875, 0.029754638671875, -0.004779815673828125, -0.0033588409423828125, 0.0282745361328125, 0.011688232421875, 0.051971435546875, -0.0140533447265625, 0.044769287109375, -0.0228271484375, 0.01318359375, 0.04669189453125, 0.0266876220703125, 0.00286865234375, 0.006256103515625, 0.052825927734375, -0.08734130859375, 0.0242767333984375, 0.0582275390625, 0.01348114013671875, 0.00738525390625, 0.040252685546875, 0.04681396484375, 0.016998291015625, -0.0026798248291015625, -0.0259552001953125, 0.03533935546875, 0.00653839111328125, 0.026885986328125, 0.03045654296875, 0.023468017578125, 0.024078369140625, 0.00293731689453125, 0.01047515869140625, 0.01433563232421875, -0.0010404586791992188, 0.043182373046875, 0.0262451171875, 0.027435302734375, -0.057830810546875, -0.057861328125, 0.0391845703125, 0.07513427734375, -0.037384033203125, -0.04296875, 0.0017442703247070312, 0.01340484619140625, 0.0733642578125, 0.005802154541015625, 0.09820556640625, -0.0140228271484375, 0.0116729736328125, -0.014617919921875, -0.004444122314453125, -0.00200653076171875, -0.0022258758544921875, -0.011993408203125, 0.007434844970703125, 0.025665283203125, 0.0164031982421875, 0.02252197265625, -0.0272369384765625, 0.0113372802734375, -0.00580596923828125, -0.000644683837890625, 0.006977081298828125, -0.01605224609375, 0.01220703125, 0.0240325927734375, 0.00579833984375, 0.01081085205078125, -0.0209197998046875, 0.007221221923828125, -0.0007462501525878906, 0.0074615478515625, 0.00893402099609375, -0.0257568359375, 0.005336761474609375, 0.0229034423828125, 0.0198516845703125, -0.016265869140625, -0.0307159423828125, -0.02618408203125, -0.0275115966796875, -0.0265045166015625, -0.014892578125, 0.0163726806640625, 0.042236328125, 0.0038509368896484375, 0.015716552734375, 0.01275634765625, 0.040771484375, -0.022613525390625, 0.0623779296875, -0.0084991455078125, -0.0214691162109375, 0.018157958984375, -0.02447509765625, 0.1021728515625, 0.005100250244140625, -0.04473876953125, -0.01486968994140625, 0.0084991455078125, -0.05096435546875, 0.0145263671875, 0.040924072265625, 0.0011682510375976562, -0.009735107421875, 0.01837158203125, -0.040435791015625, 0.057373046875, -0.018341064453125, 0.00737762451171875, -0.0217132568359375, -0.006191253662109375, -0.0220947265625, -0.01580810546875, 0.0229644775390625, 0.01415252685546875, -0.01898193359375, -0.032318115234375, 0.0517578125, -0.0011548995971679688, -0.01410675048828125, -0.01220703125, 0.024688720703125, -0.0211639404296875, -0.01099395751953125, 0.0298309326171875, -0.0025787353515625, -0.0017366409301757812, 0.00020599365234375, -0.0595703125, 0.08984375, -0.055755615234375, 0.036590576171875, 0.0677490234375, -0.059356689453125, -0.00821685791015625, 0.046783447265625, 0.04058837890625, -0.03533935546875, -0.0926513671875, -0.052276611328125, 0.02117919921875, -0.002105712890625, 0.07098388671875, 0.01751708984375, 0.016998291015625, -0.074951171875, -0.0321044921875, 0.00470733642578125, -0.049591064453125, -0.0079193115234375, 0.0282745361328125, -0.04974365234375, -0.01198577880859375, -0.01255035400390625, -0.01361083984375, -0.019378662109375, 0.0164642333984375, -0.027587890625, 0.0127716064453125, -0.030426025390625, 0.00128173828125, 0.05078125, 0.05126953125, 0.017852783203125, 0.010040283203125, 0.01316070556640625, -0.037078857421875, 0.0037670135498046875, -0.03948974609375, -0.0249786376953125, -0.032440185546875, 0.004535675048828125, 0.03717041015625, 0.0024776458740234375, 0.00616455078125, -0.050079345703125, 0.0215911865234375, -0.02996826171875, -0.036407470703125, -0.02252197265625, -0.0003008842468261719, -0.043487548828125, 0.06951904296875, -0.07696533203125, -0.005550384521484375, -0.0135650634765625, 0.0029754638671875, -0.01177215576171875, 0.0043182373046875, -0.044158935546875, -0.001293182373046875, -0.0145263671875, 0.00394439697265625, 0.041412353515625, -0.007465362548828125, -0.00556182861328125, -0.034088134765625, -0.00748443603515625, 0.0306243896484375, -0.0088348388671875, -0.01384735107421875, 0.033447265625, 0.0031948089599609375, -0.030914306640625, -0.044647216796875, 0.0017328262329101562, -0.031341552734375, 0.0063629150390625, -0.009124755859375, -0.006488800048828125, -0.0041961669921875, -0.041595458984375, -0.07989501953125, 0.09088134765625, -0.00388336181640625, -0.013458251953125, -0.0017843246459960938, 0.0149078369140625, 0.024017333984375, -0.033233642578125, -0.01268768310546875, -0.0352783203125, -0.0279541015625, -0.013336181640625, 0.0289154052734375, -0.00962066650390625, 0.0489501953125, 0.0302276611328125, -0.022003173828125, 0.0209503173828125, 0.01081085205078125, 0.00011056661605834961, -0.0257110595703125, 0.0026721954345703125, 0.018218994140625, 0.04315185546875, -0.01209259033203125, 0.0077362060546875, 0.017425537109375, -0.00968170166015625, 0.01151275634765625, -0.04180908203125, -0.016387939453125, -0.0243682861328125, 0.0307769775390625, 0.028900146484375, 0.006591796875, -0.01277923583984375, -0.0192413330078125, -0.0517578125, 0.012939453125, -0.0231475830078125, -0.02496337890625, -0.0242919921875, 0.0102996826171875, -0.03179931640625, -0.0027027130126953125, -0.0294342041015625, 0.0205230712890625, -0.026275634765625, -0.0049591064453125, 0.04168701171875, -0.0020313262939453125, 0.006103515625, -0.023529052734375, 0.07562255859375, -0.0416259765625, 0.0115509033203125, 0.0273895263671875, 0.024566650390625, 0.04693603515625, 0.045501708984375, 0.0521240234375, 0.06341552734375, -0.076416015625, -0.0308074951171875, 0.01678466796875, 0.0234527587890625, -0.0364990234375, -0.0460205078125, -0.007381439208984375, 0.030120849609375, -0.010406494140625, 0.03802490234375, 0.019134521484375, -0.0050506591796875, 0.016876220703125, -0.02569580078125, -0.033172607421875, -0.08758544921875, -0.04864501953125, -0.0019092559814453125, 0.0457763671875, -0.006195068359375, 0.08953857421875, -0.01052093505859375, -0.006855010986328125, 0.03533935546875, 0.0004851818084716797, -0.022186279296875, 0.0122222900390625, 0.03045654296875, 0.036834716796875, 0.00400543212890625 ]
f59aee5bdc71e3cd4057c8acc699a8bc26df79d0
Wordpress Stackexchange Q: How to set posts per page using WP_Query() I'm trying to set the number of posts_per_page dynamically using my own variable. This code works fine: query_posts( $query_string . "&posts_per_page=" . $myvar ) // then display the loop using get_template_part( 'loop' ); That works fine, but I would like to know how to do it using $wp_query instead of query_posts. However, this does not work: $wp_query->set('posts_per_page', $myvar) // then display the loop using get_template_part( 'loop' ); That has no effect on the number of posts displayed. Am I using the set method incorrectly, or is there something I'm missing? A: when you call query_posts with a modified query in your template, you're actually running another query and discarding the original. trying to set a query var in your template doesn't work because the original query has already happened. to use $wp_query->set() you have to hook in before the database is queried, for example on pre_get_posts.
Q: How to set posts per page using WP_Query() I'm trying to set the number of posts_per_page dynamically using my own variable. This code works fine: query_posts( $query_string . "&posts_per_page=" . $myvar ) // then display the loop using get_template_part( 'loop' ); That works fine, but I would like to know how to do it using $wp_query instead of query_posts. However, this does not work: $wp_query->set('posts_per_page', $myvar) // then display the loop using get_template_part( 'loop' ); That has no effect on the number of posts displayed. Am I using the set method incorrectly, or is there something I'm missing? A: when you call query_posts with a modified query in your template, you're actually running another query and discarding the original. trying to set a query var in your template doesn't work because the original query has already happened. to use $wp_query->set() you have to hook in before the database is queried, for example on pre_get_posts. A: query_posts will do the query again (destroy current wp_query and create a new one and then doing the query with the parameters you pass to it) To get the same behaviour after setting the new parameter with set_var you need to query the database again using something like this $wp_query->set('posts_per_page', 1); $wp_query->query($wp_query->query_vars); A: Why do you need to use $wp_query->set() at all? Can't you just use: <?php $my_custom_query_args = array( 'posts_per_page' => $myvar ); $my_custom_query = new WP_Query( $my_custom_query_args ); ?> A: You may use $wp_query->query_vars['posts_per_page'] = 25
wordpress
{ "language": "en", "length": 244, "provenance": "stackexchange_00019.jsonl.gz:413366", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29525" }
[ 0.04656982421875, -0.005084991455078125, 0.01435089111328125, 0.0216827392578125, 0.01556396484375, -0.031768798828125, 0.072265625, -0.04339599609375, -0.0009703636169433594, 0.004489898681640625, -0.05218505859375, 0.0013065338134765625, -0.034698486328125, -0.00787353515625, 0.005218505859375, -0.041717529296875, 0.049102783203125, -0.045013427734375, -0.0045166015625, -0.01296234130859375, 0.0106658935546875, 0.0094451904296875, 0.027618408203125, 0.0914306640625, 0.01468658447265625, 0.013916015625, 0.041290283203125, -0.017059326171875, -0.007293701171875, -0.030548095703125, 0.017333984375, -0.001422882080078125, 0.0234527587890625, 0.00510406494140625, -0.01178741455078125, -0.0140228271484375, 0.02032470703125, -0.022552490234375, -0.006317138671875, 0.0265960693359375, 0.038421630859375, -0.02227783203125, 0.020965576171875, 0.015228271484375, -0.005401611328125, -0.01546478271484375, 0.03143310546875, -0.045379638671875, 0.03466796875, -0.024749755859375, -0.0243377685546875, 0.030120849609375, 0.00136566162109375, -0.0184326171875, -0.019866943359375, -0.01407623291015625, 0.0413818359375, -0.04168701171875, 0.045806884765625, -0.0533447265625, -0.046630859375, -0.032012939453125, 0.056884765625, -0.00576019287109375, -0.0074615478515625, -0.005176544189453125, 0.006443023681640625, 0.02447509765625, -0.028656005859375, -0.0254058837890625, 0.0219268798828125, -0.0175628662109375, -0.0222320556640625, -0.007709503173828125, -0.007450103759765625, -0.004077911376953125, 0.021514892578125, -0.0099029541015625, 0.0044097900390625, 0.0234222412109375, 0.0220947265625, 0.01558685302734375, -0.04705810546875, 0.00931549072265625, -0.00803375244140625, -0.0025272369384765625, -0.011810302734375, -0.0186614990234375, -0.0301513671875, -0.045440673828125, -0.0198822021484375, 0.0014705657958984375, -0.041229248046875, -0.0404052734375, -0.01068878173828125, -0.043548583984375, -0.007137298583984375, 0.051025390625, -0.0148468017578125, 0.01012420654296875, -0.0382080078125, -0.007568359375, -0.01372528076171875, -0.037506103515625, 0.009765625, 0.003265380859375, -0.001979827880859375, 0.05267333984375, 0.0634765625, 0.043853759765625, 0.01169586181640625, 0.032684326171875, -0.01529693603515625, 0.041168212890625, -0.06756591796875, -0.02105712890625, -0.053070068359375, -0.0322265625, -0.01084136962890625, -0.006488800048828125, 0.002513885498046875, 0.04046630859375, -0.0275726318359375, -0.00803375244140625, 0.0021419525146484375, 0.0012445449829101562, 0.016082763671875, -0.0333251953125, -0.00981903076171875, 0.04443359375, -0.04315185546875, -0.0163726806640625, 0.05322265625, 0.056060791015625, 0.033233642578125, -0.0227203369140625, 0.03173828125, -0.046051025390625, -0.01308441162109375, 0.0240325927734375, -0.00724029541015625, -0.04150390625, -0.00989532470703125, -0.015472412109375, -0.0081024169921875, 0.0260162353515625, 0.03558349609375, 0.01557159423828125, -0.01190948486328125, -0.034698486328125, -0.008575439453125, 0.01471710205078125, -0.006717681884765625, 0.00911712646484375, -0.0007867813110351562, -0.0183258056640625, -0.01554107666015625, -0.01560211181640625, 0.0302276611328125, 0.0024261474609375, 0.01458740234375, 0.011627197265625, 0.035888671875, -0.00853729248046875, -0.023651123046875, -0.0273590087890625, -0.04522705078125, -0.01232147216796875, 0.0199432373046875, 0.037689208984375, 0.022979736328125, -0.0266265869140625, -0.01532745361328125, -0.0011301040649414062, -0.0099029541015625, 0.00537872314453125, -0.0189208984375, 0.00705718994140625, 0.039825439453125, 0.00637054443359375, -0.0172119140625, -0.0281524658203125, 0.0440673828125, -0.0008497238159179688, -0.03594970703125, 0.006206512451171875, 0.0179443359375, 0.01148223876953125, -0.01129913330078125, 0.0170135498046875, 0.036956787109375, 0.042510986328125, -0.04443359375, 0.01111602783203125, 0.034271240234375, -0.0027751922607421875, -0.0538330078125, -0.0214691162109375, 0.0006375312805175781, -0.01219940185546875, 0.0011234283447265625, 0.00939178466796875, -0.0178680419921875, 0.02777099609375, -0.0321044921875, -0.0009927749633789062, -0.0023708343505859375, 0.01146697998046875, 0.00577545166015625, 0.018096923828125, 0.01812744140625, -0.01142120361328125, -0.0109405517578125, -0.0157318115234375, -0.04034423828125, -0.0108795166015625, -0.0065765380859375, 0.013641357421875, -0.0148468017578125, -0.00986480712890625, 0.0249176025390625, -0.037384033203125, 0.005405426025390625, 0.058013916015625, 0.07861328125, -0.043212890625, -0.0089111328125, -0.064697265625, 0.0223388671875, -0.017486572265625, -0.0718994140625, 0.06817626953125, 0.0008673667907714844, 0.038116455078125, -0.0185699462890625, -0.01255035400390625, -0.0007605552673339844, -0.0382080078125, 0.0196990966796875, 0.041778564453125, 0.040802001953125, 0.01273345947265625, -0.0012121200561523438, -0.0235748291015625, 0.0164031982421875, -0.0300140380859375, 0.025909423828125, -0.0284576416015625, 0.012115478515625, 0.0293426513671875, 0.00963592529296875, -0.0204315185546875, 0.009674072265625, -0.053558349609375, -0.00110626220703125, 0.039825439453125, 0.0293121337890625, 0.042572021484375, -0.0361328125, 0.02935791015625, -0.0181884765625, 0.0217437744140625, -0.00431060791015625, -0.0037517547607421875, 0.03253173828125, 0.00827789306640625, 0.0178985595703125, 0.012664794921875, -0.016448974609375, 0.01352691650390625, -0.001445770263671875, -0.057159423828125, 0.006526947021484375, -0.027374267578125, -0.0902099609375, -0.0253753662109375, -0.0328369140625, 0.04864501953125, 0.0023479461669921875, -0.041717529296875, -0.01042938232421875, 0.03375244140625, -0.05084228515625, -0.0189666748046875, -0.01113128662109375, -0.0523681640625, -0.0300445556640625, 0.015869140625, 0.00441741943359375, -0.002048492431640625, 0.0248565673828125, 0.021453857421875, -0.044464111328125, 0.0679931640625, -0.06182861328125, -0.0025081634521484375, 0.0173797607421875, -0.07763671875, 0.06390380859375, -0.052947998046875, 0.0810546875, 0.07672119140625, -0.0286407470703125, 0.043426513671875, -0.01364898681640625, 0.03265380859375, 0.00799560546875, 0.012664794921875, -0.00579071044921875, -0.037261962890625, -0.00868988037109375, -0.005702972412109375, 0.02923583984375, 0.0294342041015625, 0.0226898193359375, -0.0175018310546875, 0.01427459716796875, 0.0310516357421875, -0.043670654296875, -0.080322265625, 0.052520751953125, -0.062347412109375, -0.01247406005859375, -0.01131439208984375, -0.030303955078125, -0.0208740234375, 0.00078582763671875, -0.01326751708984375, 0.0128936767578125, -0.019866943359375, -0.0301361083984375, -0.006725311279296875, -0.049560546875, 0.03326416015625, 0.01953125, 0.010589599609375, -0.007633209228515625, 0.09832763671875, 0.0003361701965332031, -0.07183837890625, -0.03436279296875, 0.006069183349609375, -0.0239715576171875, 0.002529144287109375, 0.0251922607421875, 0.0141143798828125, 0.0132904052734375, -0.004642486572265625, -0.00576019287109375, 0.0562744140625, -0.03729248046875, -0.0040740966796875, -0.0018901824951171875, 0.018218994140625, 0.0199737548828125, -0.0079498291015625, 0.005847930908203125, 0.03704833984375, 0.00775146484375, -0.024810791015625, -0.03472900390625, -0.0256195068359375, -0.061370849609375, 0.0204620361328125, 0.026641845703125, 0.0222320556640625, -0.006816864013671875, 0.0177764892578125, -0.0009565353393554688, -0.0277557373046875, 0.0302276611328125, -0.0638427734375, 0.0400390625, 0.017242431640625, 0.017822265625, -0.01372528076171875, 0.00600433349609375, -0.01345062255859375, 0.036834716796875, 0.01486968994140625, -0.006847381591796875, -0.02374267578125, 0.033233642578125, -0.0190277099609375, -0.044677734375, 0.049560546875, 0.0253753662109375, 0.01995849609375, -0.03607177734375, -0.051544189453125, -0.0113372802734375, 0.09344482421875, -0.0239410400390625, -0.023101806640625, -0.028533935546875, 0.0172119140625, -0.058685302734375, -0.0836181640625, 0.011566162109375, 0.00576019287109375, -0.0274658203125, -0.0213623046875, -0.0225830078125, -0.01511383056640625, -0.0166015625, 0.04351806640625, -0.032928466796875, -0.017669677734375, 0.031280517578125, -0.041168212890625, -0.0236663818359375, 0.01183319091796875, -0.04437255859375, -0.01352691650390625, -0.0283355712890625, -0.018218994140625, -0.071044921875, -0.02178955078125, 0.028778076171875, 0.048858642578125, 0.00665283203125, -0.0679931640625, -0.023651123046875, 0.03216552734375, 0.040252685546875, 0.03759765625, 0.0166778564453125, -0.0040283203125, -0.01174163818359375, -0.0252227783203125, 0.025146484375, -0.036407470703125, -0.016510009765625, -0.034881591796875, 0.027099609375, 0.023284912109375, -0.046661376953125, 0.0019817352294921875, -0.057159423828125, 0.0211944580078125, -0.05535888671875, -0.00858306884765625, 0.021331787109375, 0.044097900390625, -0.01120758056640625, 0.00799560546875, -0.0235443115234375, -0.051971435546875, 0.0684814453125, 0.0077362060546875, -0.0101165771484375, -0.00888824462890625, 0.1151123046875, 0.0105743408203125, -0.0271759033203125, -0.04937744140625, 0.0020503997802734375, 0.0160064697265625, 0.017578125, 0.0194091796875, -0.01018524169921875, -0.016326904296875, 0.0167236328125, 0.0116119384765625, -0.0196533203125, -0.01702880859375, 0.0304107666015625, 0.0028781890869140625, -0.022979736328125, 0.0215606689453125, -0.0161285400390625, 0.03753662109375, 0.044708251953125, -0.007549285888671875, -0.01488494873046875, 0.0249481201171875, 0.04998779296875, -0.020172119140625, -0.0031642913818359375, -0.0283050537109375, -0.0265350341796875, 0.02215576171875, 0.0092010498046875, 0.008636474609375, 0.0007448196411132812, 0.0195465087890625, -0.0175628662109375, -0.022491455078125, 0.0023288726806640625, 0.0433349609375, 0.048980712890625, 0.0104522705078125, 0.04608154296875, 0.0037860870361328125, -0.004093170166015625, -0.0024280548095703125, 0.00046181678771972656, 0.0309906005859375, -0.0229949951171875, -0.05364990234375, -0.01654052734375, -0.0032901763916015625, 0.032928466796875, 0.0275726318359375, -0.0018749237060546875, 0.017303466796875, 0.0255126953125, -0.01134490966796875, -0.00664520263671875, 0.0222015380859375, -0.0347900390625, -0.02642822265625, 0.039947509765625, 0.037811279296875, -0.005283355712890625, 0.03076171875, 0.06390380859375, 0.0017576217651367188, 0.040802001953125, -0.0089874267578125, 0.015594482421875, 0.0223541259765625, 0.020538330078125, 0.0283966064453125, -0.01160430908203125, 0.005123138427734375, -0.0150146484375, -0.01235198974609375, -0.0231170654296875, -0.00443267822265625, 0.01464080810546875, 0.03179931640625, -0.0013685226440429688, -0.004215240478515625, 0.006984710693359375, -0.0166015625, -0.01528167724609375, 0.0017881393432617188, -0.009674072265625, -0.003734588623046875, -0.033660888671875, -0.01287078857421875, 0.047027587890625, 0.00933837890625, 0.0180206298828125, -0.037841796875, -0.00762939453125, 0.0421142578125, -0.032562255859375, 0.053253173828125, -0.0088348388671875, -0.0286407470703125, -0.031646728515625, -0.02435302734375, -0.01067352294921875, -0.0202178955078125, -0.01153564453125, -0.00897979736328125, -0.0245208740234375, 0.0243988037109375, -0.0234222412109375, 0.05316162109375, -0.030120849609375, -0.0302276611328125, -0.01342010498046875, 0.002605438232421875, 0.05487060546875, 0.045654296875, -0.040435791015625, 0.00238800048828125, -0.06732177734375, -0.0164337158203125, 0.003082275390625, -0.018463134765625, -0.05303955078125, -0.00322723388671875, 0.044921875, 0.0272674560546875, 0.0129241943359375, -0.056060791015625, -0.0462646484375, -0.038116455078125, 0.039520263671875, 0.0081787109375, -0.0131683349609375, 0.03704833984375, -0.015472412109375, 0.01473236083984375, -0.0054473876953125, 0.010162353515625, 0.0305633544921875, -0.01953125, 0.0247650146484375, -0.0253753662109375, -0.0380859375, -0.01006317138671875, -0.03936767578125, -0.03399658203125, 0.006656646728515625, -0.01348876953125, 0.0260009765625, -0.04486083984375, -0.0016832351684570312, -0.0177459716796875, 0.01226043701171875, -0.0526123046875, -0.002197265625, 0.0518798828125, -0.0007505416870117188, 0.0005397796630859375, -0.0132293701171875, -0.0174102783203125, 0.01401519775390625, 0.0030765533447265625, 0.0092315673828125, -0.032470703125, -0.05242919921875, 0.05096435546875, 0.0723876953125, 0.0171966552734375, 0.05419921875, -0.004180908203125, 0.01064300537109375, 0.0264129638671875, -0.006977081298828125, 0.0028171539306640625, -0.0014190673828125, 0.048736572265625, 0.0028591156005859375, 0.0144500732421875, 0.043426513671875, -0.01788330078125, -0.002681732177734375, 0.040771484375, 0.019989013671875, -0.0640869140625, 0.000400543212890625, -0.0089874267578125, -0.0002758502960205078, 0.011688232421875, 0.0100555419921875, 0.0147247314453125, 0.00420379638671875, 0.047088623046875, 0.0039215087890625, 0.0234375, 0.0290374755859375, -0.0196685791015625, -0.007694244384765625, -0.02813720703125, 0.0172271728515625, 0.024505615234375, -0.00556182861328125, 0.03912353515625, 0.019805908203125, 0.0291595458984375, -0.005889892578125, -0.0053253173828125, 0.0226898193359375, -0.006839752197265625, -0.046722412109375, 0.033203125, -0.0670166015625, 0.008636474609375, 0.0286865234375, 0.0306549072265625, 0.0111236572265625, 0.056732177734375, 0.006809234619140625, -0.0019550323486328125, 0.046112060546875, -0.060638427734375, -0.037200927734375, -0.01061248779296875, 0.04229736328125, 0.032073974609375, -0.050872802734375, 0.0272064208984375, -0.03564453125, -0.0125274658203125, -0.007320404052734375, -0.00142669677734375, 0.04498291015625, -0.01058197021484375, -0.01413726806640625, 0.030303955078125, 0.030792236328125, -0.01374053955078125, -0.00875091552734375, -0.0196685791015625, -0.05755615234375, -0.0198516845703125, -0.006439208984375, -0.021453857421875, -0.01270294189453125, -0.0119476318359375, -0.0423583984375, 0.11724853515625, -0.01519012451171875, 0.017913818359375, 0.045928955078125, 0.048309326171875, -0.04425048828125, 0.0273284912109375, -0.06024169921875, 0.03326416015625, 0.007617950439453125, 0.0775146484375, -0.06854248046875, -0.005077362060546875, 0.0175628662109375, 0.0343017578125, 0.056884765625, 0.0052490234375, -0.002353668212890625, 0.00494384765625, 0.06494140625, 0.039093017578125, -0.0017309188842773438, 0.01041412353515625, 0.0031280517578125, 0.05029296875, 0.051422119140625, -0.068359375, 0.0107269287109375, -0.007781982421875, -0.009735107421875, 0.03143310546875, 0.01092529296875, 0.004741668701171875, 0.00008785724639892578, 0.002506256103515625, -0.048980712890625, 0.007160186767578125, 0.038726806640625, -0.0053863525390625, 0.0285491943359375, 0.03912353515625, 0.06304931640625, -0.048980712890625, -0.041351318359375, -0.017181396484375, 0.043212890625, 0.00673675537109375, -0.009063720703125, 0.020111083984375, -0.005191802978515625, 0.08233642578125, -0.007534027099609375, -0.01299285888671875, 0.01163482666015625, 0.032379150390625, 0.06976318359375, 0.0171051025390625, 0.035919189453125, -0.03570556640625, 0.00913238525390625, 0.0166168212890625, 0.07269287109375, -0.048431396484375, -0.033172607421875, 0.01038360595703125, 0.004215240478515625, -0.01071929931640625, -0.00606536865234375, -0.006633758544921875, 0.046356201171875, 0.06182861328125, -0.01187896728515625, -0.0228118896484375, -0.0022144317626953125, 0.0265045166015625, -0.00885009765625, 0.0194244384765625, -0.00766754150390625, -0.037841796875, -0.01558685302734375, -0.0270233154296875, 0.01076507568359375, 0.0447998046875, 0.01041412353515625, 0.0194091796875, -0.046539306640625, -0.01348114013671875, 0.007171630859375, 0.0184783935546875, -0.01239776611328125, 0.010467529296875, -0.0102081298828125, -0.0286712646484375, -0.0031414031982421875, 0.0258026123046875, 0.0494384765625, -0.01416015625, 0.042205810546875, 0.0308837890625, -0.005908966064453125, 0.004364013671875, 0.0020503997802734375, 0.0017719268798828125, 0.00263214111328125, 0.0015869140625, -0.0238037109375, -0.0204620361328125, -0.0219573974609375, -0.0192108154296875, 0.06353759765625, -0.018463134765625, 0.01406097412109375, -0.0023136138916015625, 0.00034332275390625, -0.0244140625, 0.048858642578125, 0.01473236083984375, 0.0546875, 0.0289306640625, -0.0380859375, 0.00943756103515625, -0.04425048828125, -0.08367919921875, 0.035400390625, 0.045654296875, -0.029022216796875, 0.00415802001953125, -0.0012569427490234375, -0.008056640625, 0.036529541015625, -0.0180511474609375, 0.005069732666015625, 0.00510406494140625, 0.01751708984375, -0.0035915374755859375, -0.05389404296875, -0.03692626953125, -0.01338958740234375, 0.0237579345703125, -0.0053558349609375, 0.048095703125, 0.005645751953125, 0.00902557373046875, 0.01168060302734375, 0.0169830322265625, 0.00838470458984375, -0.00019049644470214844, 0.065185546875, 0.01849365234375, 0.0024967193603515625, -0.03985595703125, -0.0209197998046875, 0.01666259765625, 0.040374755859375, -0.0269622802734375, 0.0159149169921875, -0.0283355712890625, 0.00800323486328125, -0.0202178955078125, 0.008331298828125, -0.020721435546875, 0.0204010009765625, -0.00586700439453125, -0.0250244140625, 0.03717041015625, -0.00499725341796875, -0.0203857421875, 0.0560302734375, -0.01386260986328125, -0.0091552734375, 0.0318603515625, -0.05157470703125, 0.047698974609375, 0.03997802734375, -0.035003662109375, 0.0015840530395507812, 0.0086669921875, -0.02813720703125, -0.00975799560546875, 0.0201873779296875, 0.00150299072265625, -0.0027790069580078125, -0.01328277587890625, -0.0258331298828125, -0.0225677490234375, 0.01311492919921875, -0.0253448486328125, 0.006320953369140625, -0.027801513671875, 0.00231170654296875, 0.0049285888671875, 0.043914794921875, -0.041656494140625, -0.0301513671875, 0.0119781494140625, -0.006504058837890625, -0.0036258697509765625, -0.032928466796875, -0.05340576171875, 0.0011396408081054688, 0.0243072509765625, 0.004241943359375, -0.06317138671875, 0.045654296875, -0.040557861328125, 0.0200958251953125, -0.039031982421875, -0.0738525390625, 0.041717529296875, 0.06134033203125, -0.01111602783203125, 0.0216217041015625, -0.041168212890625, -0.07391357421875, -0.0289306640625, 0.007556915283203125, 0.03265380859375, -0.0157318115234375, -0.036529541015625, 0.013946533203125, -0.006793975830078125, 0.047882080078125, -0.01143646240234375, 0.006389617919921875, 0.0418701171875, 0.01131439208984375, -0.041961669921875, -0.1123046875, 0.0022869110107421875, -0.06402587890625, 0.043975830078125, -0.023651123046875, 0.00977325439453125, 0.0250244140625, -0.0220947265625, -0.064697265625, 0.045989990234375, -0.026580810546875, -0.0152587890625, -0.04644775390625, -0.0008559226989746094, -0.0113525390625, 0.00626373291015625, 0.0038127899169921875, -0.036712646484375, -0.047393798828125, 0.01381683349609375, 0.028106689453125, 0.03472900390625, 0.041412353515625, 0.0117340087890625, -0.057861328125, -0.00785064697265625, -0.036407470703125, 0.041290283203125, 0.0010833740234375, 0.001430511474609375, 0.0313720703125, 0.031158447265625, -0.031707763671875, 0.004360198974609375, -0.000896453857421875, 0.003002166748046875, -0.0179595947265625, 0.02099609375, -0.025054931640625, -0.0009622573852539062, 0.0889892578125, 0.052886962890625, 0.034027099609375, -0.04180908203125, -0.00830841064453125, -0.01409912109375, -0.027313232421875, -0.0050201416015625, 0.01268768310546875, -0.0386962890625, 0.009857177734375, -0.00801849365234375, -0.0189056396484375, 0.009735107421875, -0.045074462890625, -0.0426025390625, -0.0109710693359375, -0.06365966796875, 0.003467559814453125, -0.0455322265625, 0.005458831787109375, 0.0108795166015625, -0.0229034423828125, -0.035369873046875, -0.0054931640625, 0.0052032470703125, -0.03668212890625, 0.00344085693359375, 0.00762939453125, 0.059722900390625, -0.0552978515625, -0.01082611083984375, 0.00846099853515625, -0.0162353515625, -0.02490234375, 0.0112457275390625, -0.0226287841796875, 0.0206756591796875, 0.0046539306640625, 0.0023136138916015625, -0.0088653564453125, 0.06866455078125, 0.0199737548828125, 0.0712890625, 0.01250457763671875, 0.055084228515625, 0.01690673828125, 0.041259765625, -0.01229095458984375, -0.0201416015625, -0.014678955078125, -0.0404052734375, -0.006824493408203125, -0.008636474609375, -0.0238037109375, -0.0498046875, 0.0123291015625, 0.0038089752197265625, -0.01345062255859375, 0.025787353515625 ]
d97807d5660bc69383bec155993507be019d7d12
Wordpress Stackexchange Q: Possible to search by author name with default WordPress search function? I realize improving WordPress's search function is a huge can of worms, but the ONLY additional thing I need it to do is to show results when I search for an author's name. For example, if we have an author named Katie Johnson, and I search for Katie, I get results where her name is listed in the CONTENT, but not results that she POSTED. This seems like a simple problem, and yet I haven't yet found a solution to it. Thanks. A: Maybe you can try adding your condition directly in the query string, using something like this function wpse_29570_where_filter($where){ global $wpdb; if( is_search() ) { $search= get_query_var('s'); $query=$wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE ( meta_key='first_name' AND meta_value LIKE '%%%s%%' ) or ( meta_key='last_name' AND meta_value LIKE '%%%s%%' )", $search ,$search); $authorID= $wpdb->get_var( $query ); if($authorID){ $where = " AND ( wp_posts.post_author = {$authorID} ) "; } } return $where; } add_filter('posts_where','wpse_29570_where_filter');
Q: Possible to search by author name with default WordPress search function? I realize improving WordPress's search function is a huge can of worms, but the ONLY additional thing I need it to do is to show results when I search for an author's name. For example, if we have an author named Katie Johnson, and I search for Katie, I get results where her name is listed in the CONTENT, but not results that she POSTED. This seems like a simple problem, and yet I haven't yet found a solution to it. Thanks. A: Maybe you can try adding your condition directly in the query string, using something like this function wpse_29570_where_filter($where){ global $wpdb; if( is_search() ) { $search= get_query_var('s'); $query=$wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE ( meta_key='first_name' AND meta_value LIKE '%%%s%%' ) or ( meta_key='last_name' AND meta_value LIKE '%%%s%%' )", $search ,$search); $authorID= $wpdb->get_var( $query ); if($authorID){ $where = " AND ( wp_posts.post_author = {$authorID} ) "; } } return $where; } add_filter('posts_where','wpse_29570_where_filter'); A: I couldn't get either of those answers to work for me, but I found this: https://danielbachhuber.com/2012/02/07/include-posts-by-matching-authors-in-your-search-results/ Worked without any edits. Here's the code incase the link is ever out of date: /** * Include posts from authors in the search results where * either their display name or user login matches the query string * * @author danielbachhuber */ add_filter( 'posts_search', 'db_filter_authors_search' ); function db_filter_authors_search( $posts_search ) { // Don't modify the query at all if we're not on the search template // or if the LIKE is empty if ( !is_search() || empty( $posts_search ) ) return $posts_search; global $wpdb; // Get all of the users of the blog and see if the search query matches either // the display name or the user login add_filter( 'pre_user_query', 'db_filter_user_query' ); $search = sanitize_text_field( get_query_var( 's' ) ); $args = array( 'count_total' => false, 'search' => sprintf( '*%s*', $search ), 'search_fields' => array( 'display_name', 'user_login', ), 'fields' => 'ID', ); $matching_users = get_users( $args ); remove_filter( 'pre_user_query', 'db_filter_user_query' ); // Don't modify the query if there aren't any matching users if ( empty( $matching_users ) ) return $posts_search; // Take a slightly different approach than core where we want all of the posts from these authors $posts_search = str_replace( ')))', ")) OR ( {$wpdb->posts}.post_author IN (" . implode( ',', array_map( 'absint', $matching_users ) ) . ")))", $posts_search ); return $posts_search; } /** * Modify get_users() to search display_name instead of user_nicename */ function db_filter_user_query( &$user_query ) { if ( is_object( $user_query ) ) $user_query->query_where = str_replace( "user_nicename LIKE", "display_name LIKE", $user_query->query_where ); return $user_query; } A: Improving on @hacksy's answer, I have used the same block of code but changing it to successfully search company name using the WP Job Manager plugin. function add_author_to_search($where) { global $wpdb; if( is_search() ) { // Check if a search is made $search = get_query_var('s'); $like = '%' . $wpdb->esc_like( $search ) . '%'; $query = $wpdb->prepare( "SELECT user_id FROM $wpdb->usermeta WHERE ( meta_key='first_name' AND lower(meta_value) LIKE '%%%s%%' ) OR ( meta_key='last_name' AND lower(meta_value) LIKE '%%%s%%' ) OR ( meta_key='_company_name' AND lower(meta_value) LIKE '%%%s%%' )", $search, $search, $search); $authorID = $wpdb->get_var( $query ); if ($authorID) { // If a user_id matches a user $where .= " OR " .$wpdb->posts. ".post_author = {$authorID} AND " .$wpdb->posts. ".post_name LIKE '" .$like. "'"; // Add to query of function: $GLOBALS[$WP_QUERY_VAR]->request } } return $where; } add_filter('posts_where','add_author_to_search'); What it does is search the meta_key column of the first_name, last_name, and _company_name values then check for a value under the meta_value to see if it matches the search query. If a user_id is found, the SQL search query is appended to search for the post_author ID and if the slug of the company is found under the post_name column.
wordpress
{ "language": "en", "length": 624, "provenance": "stackexchange_00019.jsonl.gz:413375", "question_score": "7", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29561" }
[ 0.041656494140625, 0.034576416015625, 0.033538818359375, -0.005970001220703125, 0.021820068359375, 0.004108428955078125, 0.031524658203125, -0.055908203125, 0.05108642578125, 0.026824951171875, -0.04766845703125, -0.01128387451171875, 0.012847900390625, -0.00627899169921875, -0.0487060546875, -0.0266571044921875, 0.00928497314453125, 0.0027179718017578125, 0.01369476318359375, -0.006946563720703125, 0.0055694580078125, -0.00009876489639282227, 0.01885986328125, -0.0233306884765625, 0.02777099609375, -0.059478759765625, 0.11639404296875, -0.03143310546875, 0.04266357421875, -0.0177154541015625, 0.036407470703125, -0.0296173095703125, 0.00045418739318847656, 0.0017957687377929688, 0.017791748046875, 0.030059814453125, -0.01541900634765625, 0.032928466796875, 0.0166015625, 0.0203094482421875, 0.0231781005859375, -0.01085662841796875, -0.0960693359375, 0.034088134765625, -0.04949951171875, -0.08868408203125, 0.041015625, -0.0095367431640625, 0.0215301513671875, 0.0251922607421875, -0.006389617919921875, 0.03802490234375, -0.004451751708984375, -0.026092529296875, -0.00023674964904785156, 0.005558013916015625, 0.03125, -0.00319671630859375, 0.023956298828125, -0.063232421875, -0.038330078125, 0.0225372314453125, 0.0308380126953125, 0.032379150390625, 0.031097412109375, 0.0194244384765625, 0.0460205078125, 0.01551055908203125, -0.000865936279296875, 0.0212860107421875, -0.0013055801391601562, -0.0257110595703125, -0.0161285400390625, 0.042755126953125, -0.05364990234375, -0.039031982421875, 0.011810302734375, -0.0216064453125, 0.032867431640625, 0.036346435546875, -0.044403076171875, -0.026123046875, -0.04046630859375, -0.0435791015625, 0.0178680419921875, -0.0047149658203125, -0.0279998779296875, 0.01373291015625, -0.06500244140625, -0.00921630859375, -0.0235748291015625, -0.07464599609375, -0.056732177734375, 0.01666259765625, 0.01806640625, -0.0225982666015625, 0.01300811767578125, 0.058135986328125, -0.0101470947265625, 0.01442718505859375, 0.0084075927734375, -0.0340576171875, 0.0048675537109375, -0.0435791015625, 0.0195465087890625, 0.07427978515625, 0.010955810546875, 0.047027587890625, 0.034210205078125, 0.016265869140625, 0.032379150390625, -0.04901123046875, -0.0255279541015625, -0.02752685546875, -0.0289764404296875, 0.0206756591796875, -0.03228759765625, -0.019195556640625, 0.006671905517578125, -0.026641845703125, 0.01129150390625, -0.00701141357421875, 0.00287628173828125, -0.014984130859375, 0.00263214111328125, -0.034637451171875, -0.0509033203125, 0.0306854248046875, -0.02349853515625, 0.005001068115234375, -0.042266845703125, 0.029052734375, 0.0604248046875, 0.003780364990234375, -0.0119476318359375, -0.0243682861328125, 0.0198974609375, -0.0107574462890625, -0.00943756103515625, 0.0114898681640625, -0.01320648193359375, -0.0269012451171875, -0.00972747802734375, 0.003376007080078125, -0.004680633544921875, -0.016021728515625, 0.0279998779296875, 0.03680419921875, -0.021697998046875, -0.02838134765625, -0.009918212890625, 0.049591064453125, 0.043548583984375, -0.01065826416015625, -0.031097412109375, -0.022674560546875, 0.011749267578125, -0.028533935546875, -0.0426025390625, -0.04571533203125, 0.05255126953125, 0.001983642578125, -0.0167694091796875, -0.026397705078125, -0.05126953125, -0.0178070068359375, -0.0390625, -0.015777587890625, 0.0067291259765625, -0.0021991729736328125, -0.003597259521484375, 0.007602691650390625, 0.0030117034912109375, 0.0190277099609375, 0.0033721923828125, 0.017425537109375, 0.00507354736328125, 0.007495880126953125, 0.0095977783203125, 0.0258941650390625, -0.007656097412109375, -0.0207061767578125, 0.0521240234375, -0.0274658203125, -0.0628662109375, 0.05706787109375, 0.02777099609375, 0.08514404296875, -0.0008997917175292969, -0.007755279541015625, 0.049835205078125, 0.0184478759765625, -0.041046142578125, -0.0272064208984375, -0.00811767578125, -0.0223236083984375, 0.0117645263671875, -0.021759033203125, 0.01116180419921875, 0.054229736328125, 0.03375244140625, -0.00833892822265625, 0.049468994140625, -0.0125274658203125, -0.04754638671875, 0.045379638671875, -0.0277099609375, 0.0252532958984375, 0.0017156600952148438, 0.0039215087890625, 0.0217742919921875, -0.0010385513305664062, -0.0355224609375, -0.01314544677734375, -0.0396728515625, 0.01120758056640625, 0.01934814453125, 0.002445220947265625, 0.0211639404296875, 0.00653076171875, 0.0154571533203125, -0.0340576171875, 0.00420379638671875, 0.0288238525390625, 0.05401611328125, -0.01593017578125, -0.013946533203125, -0.030914306640625, 0.05780029296875, -0.00579071044921875, -0.0268096923828125, 0.0343017578125, 0.056365966796875, 0.06256103515625, -0.005413055419921875, 0.01276397705078125, 0.02642822265625, -0.03759765625, 0.01302337646484375, 0.02398681640625, 0.0362548828125, 0.005096435546875, -0.006389617919921875, -0.004299163818359375, 0.053070068359375, -0.004711151123046875, 0.0166778564453125, -0.023284912109375, 0.045318603515625, 0.066650390625, -0.03985595703125, -0.024749755859375, 0.01468658447265625, -0.088134765625, 0.024566650390625, 0.041961669921875, -0.010040283203125, 0.04412841796875, -0.0237884521484375, 0.002384185791015625, -0.0244903564453125, -0.0076446533203125, 0.0226593017578125, -0.01174163818359375, 0.00984954833984375, 0.0010843276977539062, 0.02294921875, 0.01422882080078125, -0.03411865234375, -0.017669677734375, 0.0133514404296875, 0.0157318115234375, 0.0091094970703125, 0.00911712646484375, -0.0205078125, 0.0059051513671875, -0.0212249755859375, 0.0218048095703125, 0.0021953582763671875, -0.0015344619750976562, -0.0217437744140625, -0.011688232421875, -0.0114593505859375, -0.01190185546875, 0.002635955810546875, -0.03204345703125, 0.0186767578125, -0.0219268798828125, 0.00778961181640625, -0.002349853515625, 0.025146484375, 0.021636962890625, -0.01168060302734375, 0.05560302734375, -0.0433349609375, -0.01354217529296875, 0.0258636474609375, -0.0195159912109375, 0.040191650390625, -0.032501220703125, 0.03668212890625, 0.045074462890625, -0.03570556640625, 0.03814697265625, -0.0036449432373046875, -0.004245758056640625, -0.030975341796875, 0.02252197265625, -0.007659912109375, -0.024658203125, -0.03497314453125, 0.0135040283203125, 0.01436614990234375, 0.06475830078125, -0.002201080322265625, -0.034271240234375, 0.01105499267578125, 0.02215576171875, -0.0660400390625, -0.08984375, -0.007049560546875, -0.052001953125, -0.04541015625, 0.005214691162109375, -0.03314208984375, 0.0226593017578125, 0.01336669921875, -0.01318359375, 0.042938232421875, -0.0259552001953125, -0.11334228515625, -0.03619384765625, -0.10052490234375, 0.0130767822265625, -0.0136260986328125, 0.023956298828125, 0.00629425048828125, 0.0234832763671875, 0.0009241104125976562, -0.041656494140625, 0.00469207763671875, 0.03857421875, -0.00916290283203125, -0.0066070556640625, 0.003932952880859375, -0.0268096923828125, 0.00433349609375, -0.0207366943359375, 0.05902099609375, 0.033599853515625, -0.025970458984375, 0.0214691162109375, 0.0008325576782226562, 0.024017333984375, 0.0496826171875, 0.00909423828125, -0.0186309814453125, 0.01983642578125, 0.06396484375, -0.025726318359375, 0.01251220703125, -0.01763916015625, -0.0262603759765625, 0.0021877288818359375, -0.01218414306640625, -0.0028533935546875, -0.002574920654296875, 0.0020656585693359375, 0.045989990234375, 0.0408935546875, -0.022216796875, -0.0260162353515625, 0.0174560546875, 0.03607177734375, 0.07696533203125, -0.01157379150390625, -0.0307769775390625, -0.050018310546875, -0.007320404052734375, -0.0298309326171875, 0.030670166015625, 0.0269775390625, -0.039276123046875, -0.0184478759765625, -0.006740570068359375, 0.0396728515625, 0.0033416748046875, -0.00598907470703125, -0.023681640625, -0.0250701904296875, -0.03436279296875, 0.034637451171875, 0.017608642578125, 0.002758026123046875, 0.01442718505859375, -0.0031585693359375, -0.036895751953125, -0.0182952880859375, -0.054901123046875, -0.0044708251953125, -0.055938720703125, 0.00506591796875, -0.0211181640625, -0.0117950439453125, -0.00611114501953125, 0.00426483154296875, 0.01004791259765625, -0.0386962890625, 0.006900787353515625, -0.044036865234375, 0.006534576416015625, 0.0210418701171875, -0.037841796875, 0.0190277099609375, 0.00975799560546875, -0.061431884765625, -0.1141357421875, -0.0281524658203125, -0.01056671142578125, 0.0819091796875, -0.03070068359375, 0.027191162109375, -0.0280914306640625, 0.059661865234375, -0.0063934326171875, 0.0159759521484375, 0.00865936279296875, -0.0005946159362792969, 0.0435791015625, -0.024261474609375, -0.004604339599609375, -0.024444580078125, -0.021148681640625, -0.00463104248046875, -0.0002799034118652344, 0.01171875, -0.0262603759765625, -0.0172271728515625, -0.0052490234375, -0.0223846435546875, -0.0177764892578125, -0.03338623046875, -0.002948760986328125, 0.05816650390625, -0.033721923828125, 0.0306854248046875, -0.03985595703125, -0.052978515625, 0.07049560546875, -0.0163116455078125, 0.00010585784912109375, -0.01010894775390625, 0.082275390625, 0.00975799560546875, -0.0423583984375, 0.0262908935546875, -0.058990478515625, 0.018218994140625, -0.00241851806640625, 0.0022335052490234375, -0.0036907196044921875, -0.026641845703125, 0.0161590576171875, -0.0201568603515625, -0.00884246826171875, -0.0341796875, 0.05364990234375, 0.00026035308837890625, -0.0151214599609375, 0.0350341796875, -0.0143890380859375, 0.0121612548828125, 0.0079345703125, -0.017608642578125, -0.005023956298828125, 0.037841796875, 0.03863525390625, -0.043914794921875, 0.046112060546875, -0.0185394287109375, -0.0023403167724609375, 0.0005922317504882812, -0.040252685546875, 0.042327880859375, -0.0021343231201171875, 0.0107879638671875, -0.0199432373046875, 0.0176544189453125, 0.010650634765625, -0.0198974609375, -0.0165863037109375, -0.0176849365234375, 0.035980224609375, -0.039154052734375, -0.005077362060546875, -0.0035247802734375, -0.01611328125, 0.08270263671875, 0.00844573974609375, -0.04400634765625, 0.07806396484375, -0.038330078125, -0.00855255126953125, 0.0284881591796875, -0.0052032470703125, 0.02508544921875, 0.039215087890625, 0.00496673583984375, 0.005390167236328125, -0.033447265625, 0.0247344970703125, -0.0423583984375, 0.01543426513671875, -0.0203857421875, 0.02691650390625, -0.01230621337890625, 0.1151123046875, -0.052490234375, 0.0782470703125, -0.017364501953125, 0.0206451416015625, -0.0175628662109375, 0.046234130859375, 0.005466461181640625, 0.0007333755493164062, 0.0166015625, 0.0190582275390625, 0.0167999267578125, -0.007411956787109375, 0.0031585693359375, -0.028350830078125, 0.00014090538024902344, 0.01708984375, 0.006317138671875, 0.052032470703125, -0.0036334991455078125, -0.00992584228515625, -0.00580596923828125, 0.0287933349609375, 0.017547607421875, -0.0264129638671875, -0.007282257080078125, 0.0094757080078125, 0.01378631591796875, -0.01153564453125, -0.031402587890625, -0.02630615234375, 0.006763458251953125, -0.017181396484375, 0.0080718994140625, -0.00804901123046875, -0.010955810546875, -0.0028095245361328125, -0.0179443359375, 0.002445220947265625, 0.0027942657470703125, 0.0018243789672851562, -0.0340576171875, -0.0259246826171875, 0.08660888671875, -0.0236968994140625, 0.0253143310546875, -0.00653839111328125, -0.0114288330078125, 0.007030487060546875, 0.021636962890625, 0.019287109375, -0.001468658447265625, -0.04083251953125, 0.0218505859375, -0.04248046875, -0.005619049072265625, 0.0159912109375, 0.01385498046875, -0.051788330078125, -0.0240325927734375, 0.00024056434631347656, 0.005218505859375, -0.005733489990234375, -0.0203399658203125, -0.0229034423828125, 0.00681304931640625, 0.01009368896484375, -0.01558685302734375, -0.038970947265625, 0.06451416015625, 0.01096343994140625, 0.022796630859375, 0.002765655517578125, 0.0255279541015625, -0.0063018798828125, -0.00823211669921875, -0.007354736328125, -0.04864501953125, -0.0258331298828125, 0.01227569580078125, -0.043212890625, 0.02923583984375, 0.0360107421875, 0.003631591796875, 0.00431060791015625, -0.0023212432861328125, -0.01458740234375, -0.0027446746826171875, -0.0093536376953125, 0.045379638671875, 0.0152587890625, 0.025390625, 0.0080413818359375, 0.03302001953125, -0.0709228515625, -0.018768310546875, -0.0009527206420898438, -0.01012420654296875, -0.01168060302734375, 0.03814697265625, -0.039154052734375, 0.044647216796875, 0.0333251953125, 0.021148681640625, 0.0404052734375, 0.0142059326171875, 0.029876708984375, -0.00882720947265625, -0.05712890625, -0.039794921875, 0.0618896484375, 0.040496826171875, -0.00988006591796875, 0.006053924560546875, 0.04754638671875, -0.01451873779296875, -0.033447265625, 0.00812530517578125, 0.0088043212890625, -0.0146484375, -0.0197601318359375, 0.02093505859375, -0.0011386871337890625, -0.0345458984375, 0.0268707275390625, -0.017791748046875, -0.025726318359375, 0.0284423828125, -0.0196990966796875, 0.02740478515625, 0.03985595703125, 0.006839752197265625, 0.0139312744140625, -0.050506591796875, 0.053863525390625, 0.00826263427734375, -0.0222015380859375, 0.029571533203125, 0.01084136962890625, 0.01100921630859375, -0.0311279296875, 0.0018663406372070312, 0.01641845703125, -0.0018863677978515625, -0.0584716796875, 0.036285400390625, -0.05126953125, 0.0234527587890625, -0.01403045654296875, 0.0262603759765625, 0.048797607421875, 0.0302581787109375, 0.0200958251953125, -0.0281219482421875, 0.0220489501953125, -0.004322052001953125, 0.0199737548828125, -0.0277099609375, -0.0135955810546875, 0.068359375, -0.0270538330078125, 0.03424072265625, 0.0185546875, -0.01274871826171875, -0.00852203369140625, -0.0288238525390625, 0.05816650390625, -0.025299072265625, -0.0185394287109375, -0.0006785392761230469, 0.0225982666015625, 0.015838623046875, 0.040374755859375, 0.02301025390625, -0.045318603515625, -0.05010986328125, 0.025115966796875, -0.06536865234375, 0.00959014892578125, 0.03167724609375, -0.040618896484375, 0.0024318695068359375, 0.01702880859375, -0.0020008087158203125, -0.01898193359375, 0.009124755859375, 0.027252197265625, 0.01090240478515625, -0.041412353515625, 0.051116943359375, 0.01284027099609375, 0.054595947265625, -0.0374755859375, -0.0213165283203125, 0.026123046875, 0.040252685546875, 0.06982421875, 0.00577545166015625, -0.021759033203125, 0.000843048095703125, 0.03350830078125, -0.0005865097045898438, -0.048980712890625, 0.040679931640625, 0.0166473388671875, 0.013580322265625, 0.048614501953125, -0.00316619873046875, 0.040557861328125, -0.03619384765625, -0.002899169921875, 0.0171051025390625, 0.0205230712890625, 0.041412353515625, -0.04376220703125, -0.00882720947265625, -0.001781463623046875, -0.053436279296875, 0.008514404296875, -0.049407958984375, 0.0077056884765625, 0.046722412109375, 0.09808349609375, -0.07281494140625, -0.044158935546875, -0.026092529296875, 0.07183837890625, 0.05718994140625, 0.03143310546875, 0.021881103515625, 0.019561767578125, 0.0306549072265625, -0.0202178955078125, 0.026031494140625, -0.00250244140625, -0.01354217529296875, 0.057525634765625, -0.012786865234375, -0.00836181640625, -0.057952880859375, 0.045684814453125, 0.044342041015625, 0.066650390625, -0.06640625, -0.04022216796875, 0.0019073486328125, -0.0170745849609375, -0.01153564453125, -0.0186920166015625, -0.043212890625, 0.05450439453125, 0.06494140625, -0.052398681640625, 0.0060882568359375, 0.0264129638671875, 0.002582550048828125, -0.0235595703125, -0.0302734375, -0.00438690185546875, 0.0125579833984375, -0.0200042724609375, -0.027099609375, 0.0132293701171875, 0.05511474609375, 0.036041259765625, 0.018035888671875, 0.0008306503295898438, -0.0289306640625, -0.0369873046875, 0.020355224609375, 0.00034165382385253906, 0.045196533203125, -0.061126708984375, -0.006366729736328125, 0.003986358642578125, 0.047943115234375, 0.030670166015625, 0.027374267578125, 0.024505615234375, -0.02032470703125, -0.035858154296875, 0.00788116455078125, 0.0209503173828125, -0.04437255859375, -0.006534576416015625, -0.01947021484375, 0.0174560546875, 0.03338623046875, 0.0045013427734375, -0.01251220703125, 0.013885498046875, 0.03546142578125, 0.018157958984375, -0.0250396728515625, 0.0189666748046875, -0.05401611328125, 0.008026123046875, 0.02508544921875, 0.042327880859375, 0.0321044921875, -0.1009521484375, -0.006366729736328125, -0.02386474609375, -0.06683349609375, 0.0147705078125, 0.042144775390625, -0.0195159912109375, 0.001575469970703125, -0.0046844482421875, -0.031829833984375, 0.00273895263671875, 0.01203155517578125, 0.00962066650390625, 0.04095458984375, 0.01401519775390625, 0.007190704345703125, -0.0208892822265625, 0.0041351318359375, 0.041015625, -0.01141357421875, 0.00209808349609375, 0.0357666015625, 0.005588531494140625, -0.025726318359375, -0.0341796875, 0.028228759765625, -0.047943115234375, -0.0487060546875, 0.060943603515625, -0.0259246826171875, -0.027069091796875, 0.0018796920776367188, -0.0032444000244140625, 0.043701171875, 0.01374053955078125, 0.0037517547607421875, 0.0418701171875, -0.0335693359375, 0.0157623291015625, -0.0018854141235351562, -0.01055145263671875, -0.042510986328125, -0.024200439453125, -0.0208892822265625, -0.01776123046875, 0.0401611328125, 0.0019817352294921875, -0.0034313201904296875, 0.0026035308837890625, 0.025421142578125, -0.026885986328125, 0.01611328125, 0.01097869873046875, 0.0305328369140625, 0.0252685546875, 0.01111602783203125, -0.01302337646484375, -0.0114593505859375, -0.021331787109375, 0.003391265869140625, 0.0007729530334472656, 0.01151275634765625, -0.00823974609375, -0.024505615234375, -0.0196380615234375, -0.03515625, 0.0211639404296875, 0.004833221435546875, -0.0026035308837890625, -0.032623291015625, 0.01403045654296875, -0.0584716796875, 0.032562255859375, -0.0177001953125, 0.0211944580078125, -0.0157623291015625, -0.0107879638671875, 0.032562255859375, -0.055633544921875, -0.03704833984375, -0.00449371337890625, 0.0172882080078125, -0.00879669189453125, -0.01413726806640625, 0.01123046875, -0.0288848876953125, 0.0016584396362304688, -0.00604248046875, -0.045623779296875, 0.00714874267578125, 0.03759765625, -0.00933074951171875, 0.0257568359375, -0.042755126953125, -0.046417236328125, -0.0110931396484375, -0.00498199462890625, 0.0158538818359375, 0.01035308837890625, -0.026397705078125, -0.0011739730834960938, -0.0211639404296875, 0.049041748046875, -0.0474853515625, -0.0199127197265625, 0.037994384765625, -0.0141448974609375, -0.022796630859375, -0.08587646484375, 0.0100555419921875, -0.056884765625, -0.0275421142578125, 0.028472900390625, 0.0229339599609375, 0.05303955078125, -0.00743865966796875, -0.08148193359375, 0.04339599609375, -0.01485443115234375, -0.039794921875, -0.0252685546875, -0.007709503173828125, -0.01788330078125, 0.0111083984375, 0.0159912109375, -0.045257568359375, -0.02264404296875, 0.0347900390625, -0.0038394927978515625, 0.0010814666748046875, 0.025909423828125, -0.015411376953125, -0.03961181640625, -0.016510009765625, -0.01003265380859375, -0.0182952880859375, 0.0214385986328125, -0.0077056884765625, 0.0163116455078125, 0.0263519287109375, -0.0281524658203125, 0.0130157470703125, -0.01117706298828125, -0.0312042236328125, -0.021942138671875, -0.0212554931640625, -0.019744873046875, 0.0125579833984375, 0.05169677734375, 0.0501708984375, 0.01543426513671875, -0.054931640625, 0.004871368408203125, -0.01456451416015625, 0.001338958740234375, -0.01678466796875, -0.01129150390625, -0.006443023681640625, -0.00942230224609375, -0.027435302734375, -0.01189422607421875, 0.00750732421875, -0.0135498046875, -0.0251922607421875, 0.004428863525390625, 0.0265655517578125, 0.0168609619140625, -0.02593994140625, -0.00223541259765625, 0.005710601806640625, -0.022979736328125, -0.0352783203125, 0.014617919921875, 0.0033550262451171875, -0.028900146484375, -0.0034008026123046875, -0.006381988525390625, 0.0015411376953125, 0.02471923828125, -0.0265350341796875, 0.0290679931640625, -0.038604736328125, 0.0592041015625, -0.0006918907165527344, -0.06085205078125, 0.028472900390625, 0.020599365234375, 0.0265350341796875, -0.0184326171875, 0.0167083740234375, 0.0286865234375, 0.03106689453125, -0.0250396728515625, 0.0196990966796875, -0.01629638671875, 0.040313720703125, 0.0006475448608398438, -0.0125579833984375, 0.043609619140625, -0.029510498046875, -0.00006139278411865234, 0.0216064453125, 0.0024852752685546875, -0.039886474609375, 0.01560211181640625, -0.0232696533203125, 0.0043182373046875, 0.01373291015625 ]
90bec12f30bfefe081d9afc708877771213af523
Wordpress Stackexchange Q: Upload multiple images via theme options Is there a simple script out there that would allow multiple images to be uploaded via my theme options page (Which is based on this script - http://buildinternet.com/2010/01/create-custom-option-panels-with-wordpress-2-9/ )? I need to be able to upload 6 images which will feature in a site-wide slideshow. A: http://www.advancedcustomfields.com/add-ons/options-page/ and also repeater fields addon and gallery addon. If you combined all, then you can make this slider functions and other usefull options inputs for your options pages.
Q: Upload multiple images via theme options Is there a simple script out there that would allow multiple images to be uploaded via my theme options page (Which is based on this script - http://buildinternet.com/2010/01/create-custom-option-panels-with-wordpress-2-9/ )? I need to be able to upload 6 images which will feature in a site-wide slideshow. A: http://www.advancedcustomfields.com/add-ons/options-page/ and also repeater fields addon and gallery addon. If you combined all, then you can make this slider functions and other usefull options inputs for your options pages.
wordpress
{ "language": "en", "length": 82, "provenance": "stackexchange_00019.jsonl.gz:413419", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29724" }
[ 0.06365966796875, -0.019866943359375, 0.034881591796875, -0.0294189453125, 0.0191802978515625, -0.0269775390625, 0.0826416015625, -0.01334381103515625, 0.0115203857421875, -0.013763427734375, -0.0279693603515625, -0.0033168792724609375, -0.051727294921875, -0.0301055908203125, -0.0146026611328125, -0.05560302734375, 0.0322265625, -0.0274658203125, 0.01038360595703125, 0.0051727294921875, -0.00876617431640625, 0.028778076171875, 0.003757476806640625, 0.060302734375, -0.00079345703125, 0.02923583984375, 0.004917144775390625, -0.00518035888671875, -0.006389617919921875, -0.0168609619140625, -0.001964569091796875, 0.0283966064453125, 0.01580810546875, -0.00988006591796875, 0.02166748046875, 0.033782958984375, 0.0204620361328125, -0.0010042190551757812, 0.0201568603515625, 0.0140380859375, 0.006595611572265625, 0.01180267333984375, 0.0511474609375, 0.0208740234375, 0.0131378173828125, -0.039581298828125, 0.0135498046875, -0.06561279296875, -0.00121307373046875, -0.0131683349609375, 0.028411865234375, -0.00904083251953125, 0.045745849609375, -0.0109100341796875, -0.00859832763671875, -0.005115509033203125, 0.01209259033203125, 0.022064208984375, 0.05108642578125, -0.045654296875, -0.06396484375, -0.0182952880859375, 0.0335693359375, -0.0125579833984375, 0.0011081695556640625, 0.0013256072998046875, -0.032379150390625, 0.019256591796875, -0.026092529296875, -0.0234375, 0.018798828125, -0.0284576416015625, 0.0279693603515625, -0.05682373046875, 0.0170135498046875, 0.031524658203125, -0.042572021484375, -0.032470703125, 0.039520263671875, -0.034515380859375, -0.00782012939453125, -0.034912109375, -0.0020503997802734375, 0.001953125, 0.0071563720703125, 0.0300140380859375, -0.00702667236328125, -0.001346588134765625, -0.03271484375, 0.0151519775390625, -0.0263519287109375, -0.035858154296875, -0.0268096923828125, 0.0452880859375, -0.0050048828125, 0.009735107421875, 0.025970458984375, 0.01399993896484375, 0.031951904296875, 0.0250701904296875, 0.0096435546875, -0.06640625, 0.051910400390625, -0.0160369873046875, -0.0010385513305664062, 0.0021190643310546875, 0.025238037109375, 0.021820068359375, 0.0219573974609375, 0.025970458984375, -0.0239715576171875, 0.0379638671875, 0.0200958251953125, 0.00441741943359375, 0.005367279052734375, -0.03173828125, -0.02392578125, 0.039459228515625, -0.01268768310546875, 0.007762908935546875, -0.007625579833984375, 0.0322265625, -0.022216796875, -0.0310211181640625, -0.01384735107421875, -0.0267486572265625, -0.007415771484375, -0.020263671875, 0.0014495849609375, 0.01122283935546875, -0.031036376953125, 0.02978515625, 0.045440673828125, -0.01042938232421875, -0.01346588134765625, -0.0173797607421875, 0.00844573974609375, -0.03668212890625, -0.00975799560546875, 0.03302001953125, 0.01314544677734375, -0.0750732421875, -0.030181884765625, 0.00858306884765625, 0.0080413818359375, 0.008514404296875, 0.0096588134765625, 0.02569580078125, 0.01036834716796875, -0.043792724609375, 0.0238494873046875, 0.01024627685546875, 0.00911712646484375, 0.00931549072265625, 0.00775909423828125, -0.0311431884765625, -0.01195526123046875, -0.013214111328125, 0.051055908203125, -0.0203094482421875, 0.00020432472229003906, 0.006046295166015625, 0.0518798828125, 0.0020465850830078125, -0.0028896331787109375, -0.007755279541015625, -0.05706787109375, -0.01849365234375, 0.02587890625, -0.0216827392578125, -0.01549530029296875, -0.044525146484375, 0.04052734375, 0.01381683349609375, -0.0128936767578125, 0.059051513671875, 0.0226593017578125, 0.0115814208984375, -0.00969696044921875, 0.032073974609375, 0.005138397216796875, -0.045806884765625, 0.0282440185546875, -0.00958251953125, -0.060394287109375, 0.00577545166015625, 0.0009288787841796875, 0.0706787109375, 0.04046630859375, 0.0162353515625, 0.037872314453125, -0.035186767578125, 0.0018787384033203125, -0.00328826904296875, -0.0313720703125, -0.0086212158203125, -0.0277557373046875, 0.026611328125, -0.031463623046875, -0.0182342529296875, 0.0159759521484375, -0.0223541259765625, 0.018341064453125, -0.01885986328125, 0.01160430908203125, -0.0252532958984375, 0.005214691162109375, 0.00788116455078125, -0.02679443359375, 0.01053619384765625, 0.0224456787109375, 0.0084686279296875, -0.01788330078125, -0.0313720703125, -0.006618499755859375, 0.01367950439453125, -0.015899658203125, 0.059356689453125, -0.003902435302734375, 0.051788330078125, -0.0215301513671875, -0.038330078125, -0.0153350830078125, 0.0098876953125, 0.0389404296875, 0.0181884765625, -0.04412841796875, -0.014007568359375, -0.01068878173828125, 0.0222930908203125, -0.0709228515625, 0.048553466796875, -0.01543426513671875, 0.01294708251953125, -0.0188446044921875, -0.035919189453125, -0.0113983154296875, -0.0625, 0.03790283203125, 0.0469970703125, 0.036285400390625, 0.023468017578125, 0.0158538818359375, 0.0174102783203125, 0.050537109375, -0.01493072509765625, 0.0229034423828125, -0.007465362548828125, -0.0238494873046875, -0.015411376953125, 0.029754638671875, -0.00943756103515625, 0.0203094482421875, -0.04937744140625, 0.0048065185546875, 0.03729248046875, -0.0288238525390625, -0.024993896484375, -0.01534271240234375, 0.019775390625, 0.007659912109375, -0.033843994140625, -0.0276947021484375, -0.019744873046875, 0.03466796875, 0.00444793701171875, 0.023681640625, 0.0023403167724609375, -0.0230560302734375, 0.03399658203125, 0.0030002593994140625, -0.08734130859375, 0.0035152435302734375, -0.0018014907836914062, -0.0122528076171875, -0.001094818115234375, -0.0061492919921875, 0.003849029541015625, -0.0035686492919921875, -0.0099639892578125, -0.033233642578125, -0.0262908935546875, -0.03436279296875, -0.0200958251953125, 0.0031871795654296875, -0.0406494140625, 0.0285797119140625, -0.005706787109375, -0.0174713134765625, -0.035888671875, -0.0011358261108398438, 0.0194244384765625, -0.006916046142578125, 0.0111236572265625, 0.0188751220703125, -0.0247955322265625, 0.01177978515625, -0.065185546875, 0.06915283203125, -0.05450439453125, 0.04833984375, 0.0673828125, -0.049346923828125, 0.036895751953125, 0.0015735626220703125, 0.01837158203125, 0.00635528564453125, 0.0215606689453125, 0.01041412353515625, -0.00186920166015625, -0.033355712890625, 0.0100250244140625, 0.0276336669921875, -0.01055145263671875, 0.0245819091796875, -0.014923095703125, -0.008209228515625, 0.01302337646484375, -0.0528564453125, -0.04022216796875, 0.01678466796875, -0.07366943359375, -0.00374603271484375, -0.0100555419921875, -0.041412353515625, -0.01806640625, 0.02215576171875, -0.0010442733764648438, -0.01910400390625, -0.0012979507446289062, -0.01107025146484375, -0.0016040802001953125, -0.02752685546875, 0.0162811279296875, -0.000553131103515625, 0.0194549560546875, 0.00231170654296875, 0.06182861328125, -0.007038116455078125, -0.060272216796875, 0.00963592529296875, -0.0208587646484375, -0.0005083084106445312, 0.0179443359375, 0.04901123046875, -0.0249176025390625, -0.035491943359375, 0.004116058349609375, 0.00397491455078125, 0.0399169921875, -0.0489501953125, 0.006381988525390625, -0.053253173828125, -0.0014247894287109375, -0.041259765625, 0.01995849609375, 0.071533203125, -0.0224609375, -0.031768798828125, -0.04998779296875, 0.004329681396484375, -0.0173187255859375, -0.0193328857421875, -0.03729248046875, 0.0084228515625, -0.0017118453979492188, -0.029327392578125, 0.005153656005859375, 0.003932952880859375, -0.00855255126953125, -0.024505615234375, -0.05120849609375, 0.045654296875, 0.01265716552734375, 0.0309295654296875, 0.00860595703125, -0.0160980224609375, -0.0266265869140625, 0.027130126953125, -0.0242767333984375, 0.0101318359375, -0.03729248046875, 0.053436279296875, -0.03912353515625, -0.08502197265625, 0.0268707275390625, -0.044464111328125, -0.00385284423828125, -0.045379638671875, -0.0083770751953125, -0.007720947265625, 0.08209228515625, -0.03680419921875, -0.004703521728515625, -0.0029010772705078125, 0.0238189697265625, -0.0253143310546875, -0.033203125, -0.03326416015625, -0.015777587890625, -0.06585693359375, -0.00901031494140625, 0.003681182861328125, -0.049591064453125, 0.0201416015625, -0.06219482421875, -0.02130126953125, -0.04241943359375, 0.026336669921875, -0.01611328125, 0.0066986083984375, -0.0197906494140625, 0.003490447998046875, -0.046966552734375, 0.003978729248046875, -0.00907135009765625, -0.096435546875, -0.032379150390625, -0.0022602081298828125, 0.07403564453125, -0.00991058349609375, -0.01140594482421875, -0.0221099853515625, 0.07196044921875, -0.0113525390625, 0.0325927734375, -0.006412506103515625, 0.020233154296875, 0.016143798828125, -0.05029296875, -0.00774383544921875, -0.040252685546875, -0.01366424560546875, -0.052703857421875, -0.0162200927734375, -0.034149169921875, -0.04071044921875, -0.026153564453125, -0.033905029296875, 0.0026569366455078125, -0.01399993896484375, -0.0051422119140625, -0.01125335693359375, -0.0064239501953125, 0.003459930419921875, -0.031707763671875, -0.00762939453125, -0.0099639892578125, 0.01157379150390625, -0.037689208984375, 0.021209716796875, 0.0384521484375, 0.10479736328125, 0.005962371826171875, 0.022369384765625, -0.1336669921875, -0.01004791259765625, 0.02069091796875, 0.026397705078125, 0.023895263671875, -0.004314422607421875, -0.005218505859375, 0.011383056640625, -0.001430511474609375, 0.00457000732421875, -0.03326416015625, 0.027069091796875, -0.00433349609375, -0.012451171875, -0.00522613525390625, -0.0164794921875, 0.06573486328125, -0.00562286376953125, -0.03192138671875, 0.0003514289855957031, -0.058135986328125, 0.033477783203125, 0.01227569580078125, 0.01145172119140625, -0.058319091796875, -0.0380859375, -0.0033435821533203125, -0.02557373046875, 0.07623291015625, 0.0050048828125, 0.0077667236328125, 0.0458984375, 0.06304931640625, 0.0271759033203125, 0.0136260986328125, 0.0233306884765625, -0.009735107421875, 0.061004638671875, 0.00823974609375, 0.017364501953125, -0.0007610321044921875, 0.00502777099609375, -0.0281524658203125, 0.0026721954345703125, -0.01959228515625, -0.06707763671875, 0.0180816650390625, 0.0162353515625, -0.011322021484375, -0.01441192626953125, 0.0230255126953125, 0.0291595458984375, -0.010894775390625, -0.0024871826171875, -0.01064300537109375, -0.003864288330078125, -0.03912353515625, 0.031280517578125, 0.0182342529296875, -0.0205078125, 0.0269317626953125, -0.0192413330078125, -0.0186920166015625, 0.0008459091186523438, 0.00853729248046875, 0.0150299072265625, 0.059783935546875, -0.004306793212890625, 0.027587890625, 0.0079193115234375, -0.0008263587951660156, -0.022491455078125, 0.0292816162109375, -0.0303802490234375, 0.0252685546875, 0.035003662109375, 0.04412841796875, 0.0090789794921875, -0.03143310546875, -0.005329132080078125, -0.0160980224609375, -0.0285186767578125, 0.0015172958374023438, -0.01136016845703125, -0.037872314453125, -0.0186920166015625, -0.0068511962890625, -0.00010710954666137695, 0.01352691650390625, -0.0034236907958984375, -0.0254364013671875, -0.013885498046875, -0.01502227783203125, 0.0012006759643554688, -0.046051025390625, 0.01045989990234375, 0.0198822021484375, -0.0244903564453125, 0.01004791259765625, -0.0011262893676757812, -0.0831298828125, -0.07208251953125, 0.0011615753173828125, 0.003795623779296875, 0.045318603515625, -0.004619598388671875, -0.0208740234375, -0.01200103759765625, -0.004878997802734375, 0.0063323974609375, 0.0063629150390625, 0.04669189453125, -0.006839752197265625, -0.020904541015625, -0.009002685546875, -0.045654296875, -0.005031585693359375, 0.017669677734375, -0.006923675537109375, -0.0173492431640625, -0.03375244140625, 0.0233306884765625, 0.039947509765625, 0.00655364990234375, -0.015777587890625, 0.01528167724609375, -0.003299713134765625, -0.01236724853515625, 0.03875732421875, -0.01201629638671875, -0.0037784576416015625, 0.00923919677734375, -0.00527191162109375, -0.00751495361328125, 0.0007596015930175781, 0.032196044921875, -0.024261474609375, -0.0225830078125, -0.0721435546875, 0.0188446044921875, 0.0369873046875, -0.002208709716796875, 0.03857421875, 0.016387939453125, 0.029266357421875, 0.006168365478515625, -0.027923583984375, 0.007534027099609375, -0.0278778076171875, 0.0187835693359375, -0.042877197265625, -0.045654296875, 0.04443359375, 0.0084075927734375, 0.04376220703125, -0.0009851455688476562, -0.01131439208984375, 0.00650787353515625, 0.017333984375, -0.002468109130859375, 0.007549285888671875, -0.048675537109375, 0.052398681640625, 0.076904296875, -0.017120361328125, 0.04901123046875, -0.0002887248992919922, -0.00447845458984375, 0.05279541015625, 0.0310516357421875, -0.0164794921875, -0.02410888671875, 0.00841522216796875, -0.01251220703125, 0.0030059814453125, -0.0245513916015625, -0.0083465576171875, 0.0169525146484375, -0.0031948089599609375, 0.05419921875, -0.02490234375, 0.0268707275390625, 0.008941650390625, 0.003871917724609375, 0.050628662109375, -0.0206298828125, 0.0188446044921875, 0.0185089111328125, 0.036834716796875, 0.0194091796875, -0.0235748291015625, 0.00875091552734375, -0.0007495880126953125, -0.0113067626953125, 0.013885498046875, -0.01323699951171875, -0.00479888916015625, -0.06988525390625, -0.0042572021484375, 0.06439208984375, -0.0288543701171875, -0.0071258544921875, 0.01288604736328125, -0.03863525390625, 0.0020904541015625, -0.0249481201171875, -0.004444122314453125, -0.031341552734375, 0.026763916015625, -0.021453857421875, -0.016357421875, 0.032989501953125, 0.030609130859375, -0.0038356781005859375, -0.0206451416015625, 0.0242919921875, -0.020294189453125, 0.0150146484375, -0.0179595947265625, 0.031768798828125, -0.01114654541015625, -0.0601806640625, 0.0017843246459960938, -0.03692626953125, 0.0013551712036132812, -0.0218048095703125, -0.028717041015625, 0.06817626953125, -0.00817108154296875, -0.01526641845703125, 0.0361328125, 0.037200927734375, -0.032135009765625, 0.0482177734375, 0.0088043212890625, -0.044036865234375, -0.06451416015625, 0.016754150390625, -0.08929443359375, 0.01403045654296875, 0.03277587890625, -0.06964111328125, 0.15087890625, -0.0091552734375, 0.03375244140625, 0.0116729736328125, 0.06707763671875, -0.0206146240234375, 0.034027099609375, -0.00457000732421875, 0.010986328125, -0.00925445556640625, -0.00969696044921875, -0.042266845703125, 0.01200103759765625, -0.028472900390625, 0.038238525390625, 0.016876220703125, -0.0082244873046875, -0.01483154296875, 0.01177215576171875, 0.0870361328125, 0.0692138671875, 0.04290771484375, 0.016510009765625, 0.0096588134765625, -0.01020050048828125, 0.028533935546875, 0.0183868408203125, 0.01261138916015625, 0.03350830078125, -0.006481170654296875, 0.0452880859375, 0.0007128715515136719, 0.00112152099609375, -0.0009984970092773438, -0.01763916015625, -0.0311431884765625, 0.0019683837890625, 0.01428985595703125, -0.0111846923828125, 0.005767822265625, 0.025421142578125, -0.0249481201171875, 0.036834716796875, 0.03228759765625, -0.005344390869140625, 0.018585205078125, -0.03216552734375, 0.00594329833984375, 0.0290679931640625, 0.0111236572265625, 0.00576019287109375, 0.0257415771484375, 0.01343536376953125, 0.0229339599609375, 0.000957489013671875, 0.0165863037109375, -0.0206451416015625, 0.0089569091796875, -0.062286376953125, 0.00901031494140625, 0.0204925537109375, 0.033905029296875, -0.0256805419921875, -0.0305023193359375, 0.006397247314453125, 0.006381988525390625, -0.0094757080078125, -0.022735595703125, -0.004337310791015625, -0.037353515625, 0.00727081298828125, -0.0247344970703125, -0.0010595321655273438, 0.04150390625, 0.0241851806640625, 0.00399017333984375, 0.0207672119140625, -0.04693603515625, -0.0180511474609375, -0.028472900390625, -0.0011873245239257812, -0.00171661376953125, 0.055206298828125, 0.00024044513702392578, 0.05291748046875, -0.0411376953125, -0.014251708984375, -0.01666259765625, 0.07598876953125, -0.01058197021484375, 0.0221099853515625, -0.060089111328125, -0.08074951171875, -0.016357421875, 0.05682373046875, 0.006389617919921875, 0.022216796875, 0.039398193359375, 0.089111328125, 0.0035228729248046875, -0.0173187255859375, 0.042449951171875, 0.00797271728515625, 0.006542205810546875, 0.0035610198974609375, -0.0023097991943359375, 0.0496826171875, -0.0289154052734375, 0.01346588134765625, -0.03375244140625, 0.08123779296875, -0.015899658203125, -0.004299163818359375, 0.006412506103515625, -0.047576904296875, -0.00350189208984375, 0.004726409912109375, 0.05999755859375, 0.00449371337890625, -0.09405517578125, -0.027008056640625, -0.0191802978515625, -0.036041259765625, 0.034912109375, 0.051055908203125, -0.0299835205078125, 0.006191253662109375, -0.01007080078125, -0.0374755859375, -0.005039215087890625, 0.00032138824462890625, 0.02337646484375, 0.004840850830078125, -0.01151275634765625, -0.00909423828125, -0.060546875, -0.027587890625, -0.013397216796875, 0.0211181640625, 0.008026123046875, 0.03338623046875, 0.00844573974609375, 0.0281982421875, 0.07086181640625, 0.015228271484375, 0.0242462158203125, 0.047943115234375, 0.03704833984375, -0.005859375, 0.0037670135498046875, -0.044342041015625, 0.004535675048828125, 0.026123046875, 0.02032470703125, -0.01947021484375, -0.019256591796875, -0.00568389892578125, 0.0226287841796875, 0.049041748046875, 0.05108642578125, -0.0224761962890625, -0.023468017578125, -0.07122802734375, -0.0233306884765625, 0.042236328125, 0.02984619140625, -0.008941650390625, -0.01354217529296875, 0.0090789794921875, 0.01171112060546875, 0.0192108154296875, 0.0234222412109375, 0.01276397705078125, 0.0289459228515625, -0.03656005859375, -0.04803466796875, -0.004497528076171875, -0.00594329833984375, -0.0247039794921875, 0.007801055908203125, 0.041107177734375, -0.01227569580078125, -0.0175018310546875, 0.019012451171875, 0.0223846435546875, 0.011627197265625, -0.0301513671875, -0.016571044921875, 0.059722900390625, -0.02105712890625, -0.01068115234375, -0.00923919677734375, -0.004383087158203125, -0.03240966796875, -0.0034332275390625, 0.0244140625, -0.0115966796875, 0.0164794921875, -0.026214599609375, 0.009979248046875, 0.0181121826171875, 0.007411956787109375, -0.0394287109375, 0.029449462890625, -0.0164337158203125, -0.007266998291015625, -0.017547607421875, -0.01177215576171875, 0.022247314453125, 0.0361328125, -0.045440673828125, -0.04010009765625, -0.01556396484375, 0.01491546630859375, -0.033050537109375, 0.030517578125, 0.0188751220703125, -0.034820556640625, 0.0172882080078125, 0.056640625, 0.026611328125, 0.10504150390625, 0.0009593963623046875, -0.009765625, 0.037445068359375, -0.0004668235778808594, -0.0416259765625, -0.038726806640625, 0.0177459716796875, -0.022125244140625, -0.006175994873046875, -0.063232421875, 0.010406494140625, -0.00982666015625, -0.068603515625, -0.11224365234375, 0.054931640625, -0.04803466796875, -0.034912109375, -0.01910400390625, 0.01690673828125, -0.0094146728515625, 0.0125732421875, 0.00409698486328125, -0.02374267578125, 0.0114593505859375, 0.0269622802734375, -0.0059356689453125, 0.02069091796875, 0.0082855224609375, 0.005176544189453125, -0.0226287841796875, -0.0018243789672851562, -0.01389312744140625, -0.017181396484375, 0.04937744140625, -0.03515625, 0.04925537109375, 0.0628662109375, -0.03369140625, -0.0206146240234375, -0.0341796875, -0.050872802734375, -0.0228118896484375, -0.01898193359375, -0.043731689453125, -0.0164642333984375, 0.05487060546875, 0.09722900390625, 0.029388427734375, -0.0294952392578125, 0.01375579833984375, -0.0272216796875, -0.0174407958984375, -0.023834228515625, 0.0124664306640625, -0.057159423828125, -0.01137542724609375, 0.00626373291015625, -0.0090484619140625, 0.01148223876953125, 0.00824737548828125, -0.0180206298828125, -0.01800537109375, 0.021881103515625, -0.00508880615234375, -0.0673828125, 0.040985107421875, 0.064208984375, -0.03582763671875, 0.030059814453125, -0.036468505859375, -0.00872802734375, 0.045074462890625, -0.0310211181640625, -0.02325439453125, -0.0127105712890625, -0.0205535888671875, 0.03765869140625, -0.018646240234375, 0.06158447265625, -0.0428466796875, 0.004817962646484375, 0.013671875, 0.01076507568359375, 0.0007214546203613281, 0.0008831024169921875, -0.036224365234375, 0.041656494140625, -0.0276947021484375, 0.03912353515625, -0.05255126953125, 0.01666259765625, -0.034271240234375, 0.0163116455078125, -0.03179931640625, 0.02520751953125, 0.036285400390625, -0.03369140625, 0.01184844970703125, 0.01119232177734375, -0.017059326171875, -0.0010652542114257812, -0.0199737548828125, 0.0286407470703125, -0.00400543212890625, -0.0015916824340820312 ]
7425d516619b638316dffaa9f3ad9feb980526d3
Wordpress Stackexchange Q: How to link to the image editor's Edit Image function? How do I link to the image editor's Edit Image function from the front end? I know that I can open the lightbox with a simple link, such as <a href="wp-admin/media-upload.php?post_id=719&amp;type=image" id="content-add_image" class="thickbox add_image" title="Add an Image">Upload photos</a> However unlike opening the image edit lightbox, Edit Image is an input... example: <input type="button" id="imgedit-open-btn-766" onclick="imageEdit.open( 766, &quot;83bc6c7af5&quot; )" class="button" value="Edit Image"> Any thoughts or direction would be appreciated. The screenshot below is from v3.3 nightly. EDIT: The direct url to the editor in the backend is wp-admin/media.php?attachment_id=772&action=edit. My goal is to get this edit form to popout in the lightbox without the other wp-admin stuff. A: You may add the following scripts: wp_enqueue_script( 'wp-ajax-response' ); wp_enqueue_script('image-edit'); wp_enqueue_style('imgareaselect'); Maybe this already helps? I think the html in the front-end should be similar to the html in /wp-admin/media.php?attachment_id=...&action=edit
Q: How to link to the image editor's Edit Image function? How do I link to the image editor's Edit Image function from the front end? I know that I can open the lightbox with a simple link, such as <a href="wp-admin/media-upload.php?post_id=719&amp;type=image" id="content-add_image" class="thickbox add_image" title="Add an Image">Upload photos</a> However unlike opening the image edit lightbox, Edit Image is an input... example: <input type="button" id="imgedit-open-btn-766" onclick="imageEdit.open( 766, &quot;83bc6c7af5&quot; )" class="button" value="Edit Image"> Any thoughts or direction would be appreciated. The screenshot below is from v3.3 nightly. EDIT: The direct url to the editor in the backend is wp-admin/media.php?attachment_id=772&action=edit. My goal is to get this edit form to popout in the lightbox without the other wp-admin stuff. A: You may add the following scripts: wp_enqueue_script( 'wp-ajax-response' ); wp_enqueue_script('image-edit'); wp_enqueue_style('imgareaselect'); Maybe this already helps? I think the html in the front-end should be similar to the html in /wp-admin/media.php?attachment_id=...&action=edit A: Adding to xaedes answer: the correct URL to get to the edit media page is similar to: [your site url]/wp-admin/upload.php?item=633 If the sub-site on a multisite install, the URL is similar to [your site url]/subsite/wp-admin/upload.php?item=633 ...changing the item number parameter as needed. Note that you can get an array of attachment details with the wp_prepare_attachment_for_js function You should test if the user has proper privileges to edit the picture. And note that when you 'x' out of the edit screen, you are returned to the media page, not your custom page. (There might be a way to change the 'x' to get back to your page.)
wordpress
{ "language": "en", "length": 254, "provenance": "stackexchange_00019.jsonl.gz:413423", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29735" }
[ 0.035552978515625, -0.025421142578125, 0.0179595947265625, -0.0224456787109375, 0.004779815673828125, -0.024658203125, 0.06591796875, -0.01280975341796875, 0.030120849609375, 0.003047943115234375, -0.0212860107421875, -0.023773193359375, -0.00234222412109375, -0.01442718505859375, -0.0226593017578125, -0.0190887451171875, 0.042449951171875, -0.06854248046875, -0.006580352783203125, -0.0013790130615234375, 0.0171356201171875, 0.033843994140625, 0.00270843505859375, 0.0009255409240722656, -0.014984130859375, 0.04290771484375, 0.06707763671875, -0.022003173828125, 0.00873565673828125, -0.0033054351806640625, 0.00914764404296875, -0.038299560546875, 0.048065185546875, -0.002532958984375, -0.032745361328125, 0.025787353515625, 0.0216827392578125, -0.01654052734375, -0.01557159423828125, 0.028961181640625, 0.0228424072265625, -0.0016622543334960938, -0.00087738037109375, 0.05963134765625, -0.02392578125, -0.047454833984375, 0.014373779296875, -0.042236328125, -0.0019207000732421875, 0.0038909912109375, 0.025970458984375, 0.02032470703125, 0.044891357421875, -0.01091766357421875, -0.0062713623046875, 0.0085906982421875, -0.01354217529296875, -0.0248565673828125, 0.011016845703125, 0.055877685546875, 0.01342010498046875, -0.00472259521484375, -0.006137847900390625, -0.041168212890625, -0.00824737548828125, -0.0221099853515625, 0.002323150634765625, 0.0214385986328125, -0.035614013671875, -0.0245513916015625, 0.01641845703125, -0.0168914794921875, 0.0224456787109375, -0.041961669921875, 0.010162353515625, 0.051025390625, -0.0003490447998046875, 0.0310516357421875, 0.0142822265625, -0.018951416015625, 0.041534423828125, -0.0080108642578125, -0.00556182861328125, 0.0145721435546875, 0.0086822509765625, 0.034332275390625, 0.0017309188842773438, -0.023284912109375, -0.0311431884765625, -0.01136016845703125, -0.018585205078125, -0.046905517578125, 0.003482818603515625, -0.01261138916015625, -0.01558685302734375, -0.03790283203125, 0.028778076171875, -0.03924560546875, 0.057891845703125, 0.01187896728515625, 0.030487060546875, -0.078369140625, 0.041107177734375, -0.0098114013671875, -0.00681304931640625, 0.031158447265625, 0.01425933837890625, -0.03521728515625, 0.0006504058837890625, 0.007541656494140625, -0.00809478759765625, 0.019439697265625, 0.005573272705078125, 0.0186920166015625, -0.002960205078125, -0.018951416015625, -0.032501220703125, 0.056365966796875, -0.01763916015625, 0.04608154296875, -0.0240325927734375, -0.00524139404296875, 0.0008840560913085938, -0.0028209686279296875, 0.026580810546875, 0.0033702850341796875, -0.00861358642578125, -0.00543212890625, 0.06304931640625, -0.003009796142578125, -0.052825927734375, 0.0308990478515625, 0.1080322265625, 0.01047515869140625, 0.044586181640625, -0.025360107421875, -0.00971221923828125, -0.023345947265625, 0.00933837890625, -0.01641845703125, 0.046417236328125, -0.01776123046875, 0.01361846923828125, 0.024688720703125, -0.0179290771484375, 0.0621337890625, 0.005184173583984375, -0.02362060546875, -0.0153961181640625, -0.06658935546875, -0.0263671875, -0.045135498046875, 0.031890869140625, 0.0297698974609375, 0.025909423828125, -0.001728057861328125, 0.10284423828125, -0.04583740234375, -0.0201873779296875, -0.06103515625, -0.00868988037109375, 0.032562255859375, 0.06732177734375, -0.0021228790283203125, 0.0018596649169921875, -0.039031982421875, -0.034912109375, -0.00988006591796875, 0.022308349609375, 0.037078857421875, 0.0225372314453125, -0.025970458984375, -0.004642486572265625, 0.0186920166015625, -0.002964019775390625, 0.0126800537109375, 0.0062255859375, 0.0294342041015625, 0.0066986083984375, 0.0654296875, 0.0338134765625, -0.0259857177734375, 0.054473876953125, -0.0114288330078125, -0.0191650390625, -0.00777435302734375, 0.0099029541015625, 0.04815673828125, 0.0179901123046875, 0.033447265625, -0.00859832763671875, -0.0091400146484375, 0.0215911865234375, -0.020263671875, -0.00368499755859375, -0.0199432373046875, -0.022674560546875, -0.0011510848999023438, -0.025390625, 0.0111236572265625, 0.0203704833984375, 0.018310546875, 0.01163482666015625, 0.0127410888671875, -0.044952392578125, 0.036529541015625, -0.027587890625, 0.03192138671875, -0.0328369140625, -0.001171112060546875, 0.0256195068359375, -0.000736236572265625, -0.00862884521484375, -0.039031982421875, 0.0010128021240234375, 0.0287933349609375, -0.03570556640625, 0.0528564453125, -0.0102081298828125, 0.06866455078125, -0.039093017578125, -0.045623779296875, -0.02227783203125, -0.018035888671875, 0.0008511543273925781, 0.0257415771484375, -0.03875732421875, 0.00978851318359375, -0.015655517578125, 0.02099609375, -0.022003173828125, 0.01558685302734375, 0.050872802734375, 0.0252685546875, -0.031158447265625, -0.01898193359375, -0.0256805419921875, -0.0714111328125, 0.0017366409301757812, 0.059783935546875, 0.0239410400390625, -0.005092620849609375, -0.01519775390625, 0.01139068603515625, 0.06671142578125, 0.01146697998046875, 0.0068817138671875, -0.01023101806640625, -0.00006175041198730469, 0.00928497314453125, -0.03857421875, -0.01383209228515625, 0.023193359375, -0.06793212890625, 0.0035037994384765625, 0.04644775390625, -0.0004532337188720703, 0.00455474853515625, 0.0178985595703125, -0.01064300537109375, -0.002826690673828125, -0.0282440185546875, -0.0266876220703125, -0.0186920166015625, 0.0068511962890625, 0.00360107421875, 0.0255279541015625, 0.006031036376953125, -0.047088623046875, -0.01206207275390625, 0.044769287109375, 0.02947998046875, -0.003719329833984375, 0.026153564453125, 0.02740478515625, -0.02899169921875, -0.0143890380859375, -0.005237579345703125, -0.000881195068359375, -0.0003483295440673828, -0.02886962890625, -0.006801605224609375, -0.01006317138671875, -0.01239776611328125, -0.02386474609375, -0.06671142578125, 0.040740966796875, 0.0023975372314453125, 0.01021575927734375, 0.00717926025390625, 0.038177490234375, -0.00023877620697021484, -0.019561767578125, 0.036346435546875, -0.03265380859375, -0.0316162109375, 0.046966552734375, -0.0220794677734375, 0.043182373046875, -0.029510498046875, 0.08349609375, 0.056427001953125, -0.06829833984375, 0.05224609375, -0.0095672607421875, -0.01296234130859375, -0.0185699462890625, 0.01971435546875, 0.0020313262939453125, -0.0252227783203125, -0.038330078125, 0.0008220672607421875, 0.0147247314453125, 0.0024509429931640625, -0.028350830078125, -0.03448486328125, -0.0193023681640625, -0.0008544921875, -0.08807373046875, -0.04925537109375, -0.02008056640625, -0.0635986328125, 0.018463134765625, -0.0054779052734375, -0.0284881591796875, -0.0129852294921875, 0.04058837890625, 0.0095672607421875, -0.00458526611328125, 0.0076446533203125, 0.002197265625, -0.0223388671875, -0.05364990234375, -0.057861328125, 0.0009350776672363281, 0.0129852294921875, 0.00868988037109375, -0.009918212890625, -0.01419830322265625, -0.043426513671875, 0.0244598388671875, 0.00011116266250610352, -0.0017976760864257812, -0.004756927490234375, 0.03656005859375, -0.036834716796875, -0.004730224609375, 0.0044097900390625, -0.0011463165283203125, 0.0220947265625, -0.033905029296875, -0.00238800048828125, -0.03521728515625, -0.054656982421875, -0.00128936767578125, 0.0176544189453125, 0.0285797119140625, 0.0076446533203125, 0.051910400390625, -0.033355712890625, 0.02606201171875, -0.0135498046875, -0.00519561767578125, -0.0024776458740234375, 0.006053924560546875, -0.0188140869140625, 0.005901336669921875, 0.005340576171875, 0.032989501953125, 0.0144805908203125, 0.0004253387451171875, 0.009307861328125, 0.003475189208984375, -0.01393890380859375, 0.016510009765625, -0.040374755859375, 0.038482666015625, -0.0095062255859375, 0.050048828125, 0.0250396728515625, 0.00659942626953125, -0.0111083984375, -0.01751708984375, -0.042144775390625, -0.024505615234375, 0.0411376953125, -0.0178375244140625, 0.03155517578125, -0.033599853515625, -0.021759033203125, -0.018646240234375, 0.06103515625, -0.011260986328125, -0.0235137939453125, 0.004291534423828125, 0.0182037353515625, -0.0298919677734375, -0.02874755859375, 0.005832672119140625, -0.00763702392578125, -0.07391357421875, 0.04266357421875, 0.025848388671875, -0.031951904296875, -0.007129669189453125, 0.0013942718505859375, -0.054229736328125, -0.03369140625, 0.058990478515625, -0.027801513671875, -0.00881195068359375, 0.078125, -0.0212554931640625, 0.0225372314453125, -0.049560546875, 0.0012636184692382812, -0.1212158203125, -0.024749755859375, -0.0037899017333984375, 0.0926513671875, -0.0127410888671875, 0.0027008056640625, -0.04498291015625, 0.04931640625, 0.0248565673828125, -0.00038313865661621094, 0.0181427001953125, 0.01508331298828125, -0.0238189697265625, -0.04718017578125, 0.0163116455078125, -0.062255859375, -0.01532745361328125, -0.04425048828125, -0.044219970703125, -0.031524658203125, -0.0241851806640625, -0.0020084381103515625, -0.0042572021484375, -0.005615234375, -0.05767822265625, -0.01861572265625, -0.01204681396484375, 0.0009403228759765625, -0.0005550384521484375, -0.03192138671875, -0.032501220703125, -0.06719970703125, 0.0230865478515625, -0.016326904296875, 0.002559661865234375, 0.013397216796875, 0.045257568359375, 0.020751953125, -0.0084381103515625, -0.0423583984375, 0.01114654541015625, 0.0401611328125, 0.047698974609375, 0.0185546875, 0.00122833251953125, -0.0169677734375, 0.0249481201171875, 0.04559326171875, 0.03582763671875, -0.05377197265625, 0.05511474609375, 0.035675048828125, 0.0203857421875, -0.0016345977783203125, 0.04107666015625, -0.0149078369140625, -0.01088714599609375, -0.050384521484375, 0.023406982421875, -0.03753662109375, 0.00933074951171875, -0.0303192138671875, 0.05255126953125, -0.005695343017578125, -0.02056884765625, -0.0123748779296875, -0.001827239990234375, 0.069091796875, 0.0182037353515625, 0.002071380615234375, 0.0258636474609375, 0.0772705078125, -0.0089569091796875, 0.0229644775390625, 0.01407623291015625, -0.0009055137634277344, 0.036956787109375, -0.01081085205078125, -0.00986480712890625, 0.0015497207641601562, -0.00798797607421875, 0.00612640380859375, 0.004669189453125, -0.0225067138671875, -0.04730224609375, 0.0156402587890625, 0.048828125, -0.006458282470703125, -0.01236724853515625, 0.0081939697265625, 0.038604736328125, -0.006763458251953125, -0.0228118896484375, 0.03656005859375, 0.0019588470458984375, -0.0305328369140625, 0.017852783203125, -0.0064697265625, 0.000659942626953125, 0.039215087890625, 0.018096923828125, -0.031463623046875, 0.02117919921875, 0.0048370361328125, 0.008636474609375, 0.0037784576416015625, 0.0413818359375, 0.045379638671875, -0.01244354248046875, -0.00820159912109375, 0.005039215087890625, -0.018035888671875, -0.016845703125, -0.0034198760986328125, 0.01387786865234375, 0.01526641845703125, 0.027435302734375, 0.0093994140625, 0.0024547576904296875, -0.0130767822265625, -0.040313720703125, 0.0599365234375, 0.050262451171875, -0.053924560546875, -0.0231475830078125, 0.0009374618530273438, 0.0078582763671875, 0.006816864013671875, 0.0006241798400878906, 0.0093536376953125, 0.017852783203125, 0.035186767578125, -0.03765869140625, -0.032470703125, 0.024627685546875, 0.023345947265625, 0.01416778564453125, 0.0010881423950195312, -0.0157623291015625, 0.0072174072265625, -0.005443572998046875, -0.02587890625, -0.007266998291015625, 0.06414794921875, 0.0007367134094238281, -0.0266571044921875, -0.0212249755859375, 0.0174407958984375, -0.049072265625, -0.00714111328125, 0.031982421875, -0.0133819580078125, -0.0012836456298828125, -0.03759765625, -0.032562255859375, -0.01221466064453125, 0.027496337890625, -0.017425537109375, 0.0167388916015625, -0.0081024169921875, -0.01287841796875, 0.024810791015625, -0.0242767333984375, -0.0220489501953125, 0.01168060302734375, -0.00627899169921875, -0.003997802734375, 0.04510498046875, 0.021759033203125, 0.0209197998046875, -0.006465911865234375, 0.067626953125, 0.003566741943359375, -0.0223236083984375, -0.0565185546875, -0.027099609375, -0.0159454345703125, -0.0465087890625, 0.03466796875, -0.0019817352294921875, 0.0277557373046875, 0.00568389892578125, -0.0015659332275390625, 0.02685546875, 0.00506591796875, -0.0174560546875, -0.004467010498046875, -0.0263519287109375, 0.044952392578125, -0.0010480880737304688, 0.010040283203125, 0.0111236572265625, -0.043060302734375, 0.026092529296875, -0.006988525390625, 0.044097900390625, 0.01018524169921875, -0.049224853515625, -0.0003991127014160156, 0.023712158203125, -0.0201873779296875, 0.0252838134765625, 0.08624267578125, 0.01306915283203125, 0.05364990234375, 0.026336669921875, 0.00032973289489746094, 0.03424072265625, 0.01401519775390625, -0.0115814208984375, -0.01141357421875, 0.041107177734375, 0.0012254714965820312, -0.013641357421875, 0.0274658203125, -0.0147857666015625, 0.0193328857421875, 0.0098724365234375, 0.0504150390625, -0.0418701171875, 0.028839111328125, 0.0242156982421875, 0.0008726119995117188, 0.033050537109375, -0.035003662109375, 0.0102081298828125, -0.00009250640869140625, 0.060333251953125, -0.08209228515625, -0.0335693359375, 0.00015997886657714844, -0.044189453125, 0.0078582763671875, -0.0025005340576171875, 0.0350341796875, 0.006420135498046875, -0.065185546875, -0.00716400146484375, 0.036956787109375, -0.0102996826171875, 0.0033397674560546875, 0.018035888671875, -0.0086822509765625, -0.036712646484375, -0.04766845703125, 0.001895904541015625, 0.01332855224609375, -0.033782958984375, 0.0148468017578125, -0.021942138671875, 0.02288818359375, 0.029876708984375, -0.0118560791015625, 0.0017690658569335938, -0.00852203369140625, 0.00189208984375, 0.06640625, -0.0295867919921875, -0.009979248046875, -0.01508331298828125, -0.09283447265625, -0.01210784912109375, -0.046875, 0.03271484375, -0.01389312744140625, 0.0207672119140625, 0.06488037109375, -0.029052734375, -0.0202178955078125, 0.0372314453125, 0.0153656005859375, -0.0306396484375, -0.00815582275390625, -0.0117950439453125, -0.057098388671875, -0.05767822265625, -0.0254364013671875, -0.09320068359375, 0.01410675048828125, -0.038299560546875, -0.039459228515625, 0.06573486328125, -0.027984619140625, 0.0086517333984375, 0.0287322998046875, 0.0240478515625, -0.0214691162109375, -0.0133819580078125, 0.007289886474609375, -0.024505615234375, -0.051422119140625, -0.0068206787109375, -0.034210205078125, 0.0018968582153320312, -0.01548004150390625, 0.0426025390625, 0.04962158203125, 0.01189422607421875, -0.021484375, -0.03936767578125, -0.00945281982421875, 0.032135009765625, -0.01476287841796875, 0.032958984375, 0.0211944580078125, -0.033843994140625, 0.033447265625, -0.007686614990234375, 0.0163116455078125, -0.02545166015625, 0.02850341796875, 0.039398193359375, -0.0009503364562988281, 0.0197601318359375, 0.041259765625, 0.0128936767578125, -0.0099639892578125, 0.00908660888671875, 0.0269012451171875, -0.0655517578125, -0.04541015625, 0.04766845703125, 0.01041412353515625, -0.00348663330078125, -0.022003173828125, -0.025482177734375, 0.01605224609375, 0.0044708251953125, -0.0019817352294921875, -0.01233673095703125, 0.006649017333984375, -0.01554107666015625, -0.0050506591796875, -0.00348663330078125, 0.0249786376953125, 0.0028476715087890625, 0.0291595458984375, 0.0163726806640625, 0.0218048095703125, -0.06280517578125, -0.07513427734375, 0.0625, 0.0662841796875, -0.01226806640625, 0.0086669921875, -0.00018644332885742188, 0.01384735107421875, 0.018218994140625, -0.0149383544921875, 0.060943603515625, -0.02447509765625, -0.0150299072265625, -0.0091705322265625, 0.0050811767578125, 0.038665771484375, 0.01328277587890625, 0.007602691650390625, -0.006130218505859375, -0.02911376953125, 0.014617919921875, -0.0325927734375, 0.049652099609375, -0.0027008056640625, 0.003414154052734375, -0.0161895751953125, 0.036712646484375, 0.0184478759765625, 0.014404296875, -0.026031494140625, 0.035797119140625, -0.02044677734375, 0.05462646484375, -0.01163482666015625, -0.0014896392822265625, -0.028564453125, 0.0192108154296875, 0.032318115234375, 0.06805419921875, 0.04461669921875, 0.0050048828125, -0.00005549192428588867, 0.0191650390625, 0.01690673828125, -0.03485107421875, 0.032501220703125, 0.0031642913818359375, 0.047943115234375, 0.059326171875, -0.0030002593994140625, -0.018096923828125, 0.0311279296875, 0.079833984375, -0.08245849609375, 0.0587158203125, -0.0269317626953125, -0.01776123046875, 0.03900146484375, -0.0426025390625, 0.06719970703125, -0.05401611328125, -0.08502197265625, -0.0236053466796875, 0.0240478515625, -0.0290374755859375, 0.007053375244140625, 0.029754638671875, -0.06048583984375, 0.061187744140625, -0.036773681640625, 0.01044464111328125, -0.0216522216796875, 0.01953125, -0.004955291748046875, 0.018646240234375, 0.033782958984375, 0.0078277587890625, -0.0029506683349609375, 0.0009584426879882812, 0.0038509368896484375, 0.033172607421875, 0.0092620849609375, 0.0433349609375, -0.02691650390625, 0.022369384765625, 0.0047607421875, 0.0194549560546875, -0.033599853515625, 0.00803375244140625, -0.00865936279296875, -0.0338134765625, 0.00612640380859375, 0.0024051666259765625, -0.00823974609375, 0.05010986328125, -0.0094146728515625, 0.0005707740783691406, -0.0019025802612304688, -0.007610321044921875, 0.00902557373046875, 0.068115234375, 0.0264434814453125, -0.0191497802734375, -0.0272216796875, -0.046905517578125, -0.0167694091796875, 0.026153564453125, 0.02099609375, 0.01261138916015625, 0.00447845458984375, 0.0225677490234375, 0.006031036376953125, 0.0074462890625, 0.0040130615234375, 0.0309600830078125, 0.03424072265625, -0.04547119140625, -0.0006728172302246094, 0.0201416015625, -0.005542755126953125, 0.007068634033203125, 0.0213775634765625, 0.01297760009765625, 0.01406097412109375, -0.0223541259765625, 0.0164337158203125, 0.032745361328125, 0.0159759521484375, -0.01873779296875, 0.002468109130859375, 0.044830322265625, -0.031158447265625, -0.0193023681640625, -0.00949859619140625, -0.0142974853515625, -0.061614990234375, -0.005077362060546875, 0.0213623046875, -0.0187835693359375, -0.0104217529296875, -0.033935546875, 0.0045013427734375, 0.041259765625, 0.0226898193359375, -0.08319091796875, 0.0252227783203125, -0.0182037353515625, 0.07305908203125, 0.0001156926155090332, 0.003948211669921875, -0.0117034912109375, 0.0194091796875, -0.040069580078125, -0.055450439453125, -0.050140380859375, 0.02532958984375, -0.056427001953125, 0.031585693359375, 0.05548095703125, -0.0384521484375, -0.010772705078125, 0.0290374755859375, 0.036895751953125, 0.08831787109375, -0.02490234375, -0.032257080078125, -0.03485107421875, 0.0237884521484375, 0.0265350341796875, -0.020782470703125, -0.00885009765625, -0.01506805419921875, 0.003520965576171875, 0.0173187255859375, -0.01495361328125, 0.0037708282470703125, -0.05230712890625, -0.126708984375, -0.00823974609375, 0.0015611648559570312, -0.056488037109375, -0.03509521484375, -0.0016345977783203125, -0.0009756088256835938, 0.033294677734375, -0.006755828857421875, -0.02532958984375, -0.02764892578125, 0.019073486328125, -0.01215362548828125, 0.0450439453125, 0.0034027099609375, -0.0205535888671875, -0.029632568359375, -0.01161956787109375, -0.0233612060546875, 0.002338409423828125, 0.0016851425170898438, -0.0157928466796875, 0.0384521484375, 0.044830322265625, -0.011993408203125, -0.0264129638671875, -0.008575439453125, -0.03814697265625, -0.00652313232421875, -0.004673004150390625, -0.04791259765625, -0.028228759765625, 0.061248779296875, 0.0297088623046875, 0.0218505859375, -0.0113677978515625, 0.04144287109375, -0.01568603515625, -0.041351318359375, -0.02398681640625, 0.0158538818359375, -0.04345703125, -0.0210418701171875, 0.0014190673828125, -0.014495849609375, -0.02569580078125, 0.005077362060546875, -0.04339599609375, -0.01340484619140625, 0.0014362335205078125, -0.00450897216796875, -0.02459716796875, -0.0022411346435546875, 0.121337890625, -0.060791015625, 0.03143310546875, -0.00014925003051757812, 0.017791748046875, 0.0714111328125, -0.04241943359375, -0.01380157470703125, -0.00165557861328125, -0.028594970703125, 0.030792236328125, -0.019683837890625, -0.0177154541015625, -0.0433349609375, -0.00106048583984375, -0.004283905029296875, 0.018951416015625, -0.01078033447265625, 0.0022430419921875, -0.006221771240234375, 0.02880859375, 0.0018663406372070312, 0.061676025390625, -0.041900634765625, -0.0035381317138671875, -0.01161956787109375, -0.01971435546875, -0.0311737060546875, 0.0311126708984375, 0.0287322998046875, -0.0188751220703125, 0.017913818359375, -0.01561737060546875, -0.0017757415771484375, -0.0110321044921875, -0.020965576171875, -0.0115966796875, -0.024200439453125, 0.00324249267578125 ]
74ae2cbb9861ce82dfa7a53da1b43eb8a9eaf7ab
Wordpress Stackexchange Q: Custom post type's get_permalink returns wrong url Currently my permalink setting is /paper/%postname%/. I am developing a plugin, so the following is done during the activation. I am programatically adding a new custom-post-type called 'meta', like this (at 'init'): register_post_type( POST_TYPE, array( 'labels' => array('menu_name' => 'meta'), 'public' => true, 'rewrite' => array('with_front'=>false,'slug'=>'meta','pages'=>false) ) ); Then in the activation I programatically added a meta post, and use get_permalink(). But I get the following url: http://localhost/wordpress/paper/faq/ This url leads to the 'not found' page. The correct url should be: http://localhost/wordpress/meta/faq/ In the admin meta post edit page, the displayed permalink is the correct http://localhost/wordpress/meta/faq I also tried to flush_rewrite_rules(); before I call get_permalink(). But it didn't work. Does anyone have any idea? A: At what stage are you registering your post type? If it's going right in the admin I'm thinking that you might be registering your post type too late. It has to be done on init to work... Also, removing the 'pages'=>false might just fix it.
Q: Custom post type's get_permalink returns wrong url Currently my permalink setting is /paper/%postname%/. I am developing a plugin, so the following is done during the activation. I am programatically adding a new custom-post-type called 'meta', like this (at 'init'): register_post_type( POST_TYPE, array( 'labels' => array('menu_name' => 'meta'), 'public' => true, 'rewrite' => array('with_front'=>false,'slug'=>'meta','pages'=>false) ) ); Then in the activation I programatically added a meta post, and use get_permalink(). But I get the following url: http://localhost/wordpress/paper/faq/ This url leads to the 'not found' page. The correct url should be: http://localhost/wordpress/meta/faq/ In the admin meta post edit page, the displayed permalink is the correct http://localhost/wordpress/meta/faq I also tried to flush_rewrite_rules(); before I call get_permalink(). But it didn't work. Does anyone have any idea? A: At what stage are you registering your post type? If it's going right in the admin I'm thinking that you might be registering your post type too late. It has to be done on init to work... Also, removing the 'pages'=>false might just fix it.
wordpress
{ "language": "en", "length": 168, "provenance": "stackexchange_00019.jsonl.gz:413437", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29784" }
[ 0.033599853515625, 0.0006194114685058594, 0.01239013671875, 0.0207061767578125, -0.0189056396484375, -0.018035888671875, 0.039154052734375, -0.0494384765625, -0.047882080078125, 0.006839752197265625, 0.021942138671875, -0.0070037841796875, -0.027923583984375, -0.05352783203125, 0.03936767578125, -0.024627685546875, 0.017974853515625, 0.0228271484375, 0.0457763671875, -0.020965576171875, 0.023223876953125, -0.0074920654296875, 0.061614990234375, 0.0147857666015625, 0.045989990234375, -0.054443359375, 0.045867919921875, -0.0228424072265625, 0.02099609375, -0.024993896484375, 0.0343017578125, 0.0135955810546875, -0.01212310791015625, 0.020751953125, 0.032135009765625, -0.023468017578125, 0.0280303955078125, 0.0157928466796875, 0.038726806640625, -0.0016727447509765625, 0.0009088516235351562, 0.01373291015625, 0.037445068359375, 0.04541015625, -0.0016794204711914062, -0.036224365234375, -0.004817962646484375, -0.0513916015625, 0.0175018310546875, -0.022064208984375, -0.01361846923828125, -0.0092010498046875, 0.001766204833984375, -0.01480865478515625, -0.0227508544921875, -0.02593994140625, 0.027496337890625, -0.036102294921875, 0.0157623291015625, 0.0109405517578125, -0.0229949951171875, 0.005741119384765625, 0.01593017578125, -0.0210113525390625, -0.0335693359375, -0.01175689697265625, -0.01555633544921875, 0.0250396728515625, -0.042388916015625, -0.0270233154296875, 0.02685546875, -0.0160369873046875, 0.0016536712646484375, -0.007965087890625, -0.0276947021484375, -0.0230712890625, -0.0009717941284179688, -0.049713134765625, 0.0010766983032226562, 0.003780364990234375, 0.01100921630859375, -0.0033512115478515625, -0.024658203125, -0.005161285400390625, 0.0035190582275390625, 0.00876617431640625, -0.015533447265625, -0.00930023193359375, -0.033966064453125, -0.036163330078125, -0.0308990478515625, -0.0343017578125, -0.01296234130859375, 0.00002586841583251953, -0.0196685791015625, -0.01348876953125, 0.0638427734375, 0.05267333984375, 0.004108428955078125, 0.007427215576171875, 0.01142120361328125, -0.06585693359375, 0.06414794921875, -0.045166015625, 0.0203399658203125, 0.0119171142578125, -0.0186004638671875, 0.01284027099609375, 0.07586669921875, 0.0272216796875, 0.0181427001953125, 0.065673828125, -0.02130126953125, -0.0226287841796875, -0.007537841796875, 0.015655517578125, -0.05108642578125, 0.00787353515625, -0.0035991668701171875, 0.01361846923828125, 0.0062103271484375, 0.043975830078125, 0.027801513671875, -0.0256195068359375, 0.0009016990661621094, 0.01103973388671875, 0.0032501220703125, -0.076904296875, 0.01031494140625, 0.05645751953125, -0.0263671875, 0.00432586669921875, 0.038787841796875, -0.0042572021484375, -0.01210784912109375, -0.0350341796875, 0.01509857177734375, -0.019622802734375, -0.0220794677734375, 0.035980224609375, -0.0244293212890625, -0.0467529296875, 0.01690673828125, -0.01593017578125, -0.0138092041015625, 0.047760009765625, 0.01690673828125, -0.0169525146484375, -0.0203857421875, -0.0216217041015625, -0.05902099609375, -0.044891357421875, 0.05511474609375, -0.01493072509765625, -0.030120849609375, -0.0322265625, 0.0253753662109375, -0.023895263671875, -0.036712646484375, -0.037872314453125, 0.05615234375, 0.005443572998046875, 0.01526641845703125, 0.01184844970703125, -0.0195770263671875, 0.007190704345703125, -0.08221435546875, -0.017425537109375, 0.019134521484375, 0.03692626953125, 0.018798828125, 0.005939483642578125, -0.059051513671875, -0.045684814453125, -0.01453399658203125, -0.051177978515625, -0.00022614002227783203, 0.0151214599609375, 0.004730224609375, 0.05023193359375, 0.0043792724609375, -0.0174560546875, 0.03717041015625, -0.01099395751953125, -0.0623779296875, 0.045623779296875, 0.03131103515625, 0.06256103515625, -0.02960205078125, 0.012054443359375, 0.0650634765625, 0.0418701171875, -0.0214691162109375, 0.01085662841796875, -0.03717041015625, -0.0180206298828125, 0.016754150390625, 0.017578125, -0.023162841796875, 0.0276947021484375, -0.044586181640625, -0.00527191162109375, 0.01241302490234375, 0.0194549560546875, -0.0279998779296875, 0.043243408203125, -0.034820556640625, 0.04461669921875, 0.03741455078125, 0.025543212890625, -0.00030350685119628906, -0.002197265625, -0.0253143310546875, -0.017120361328125, -0.0311279296875, 0.033355712890625, -0.0009765625, 0.0120391845703125, -0.036102294921875, 0.004405975341796875, -0.033599853515625, -0.0153961181640625, -0.04364013671875, 0.0108642578125, 0.050384521484375, 0.0108489990234375, -0.0153656005859375, -0.0163726806640625, 0.00910186767578125, 0.0291748046875, -0.07476806640625, 0.04388427734375, -0.019744873046875, -0.023101806640625, -0.04095458984375, -0.004352569580078125, 0.0009102821350097656, -0.0252838134765625, 0.0185089111328125, 0.035186767578125, 0.0126495361328125, 0.0148773193359375, -0.01739501953125, 0.008026123046875, 0.0313720703125, -0.023223876953125, 0.0137176513671875, -0.00002092123031616211, -0.01024627685546875, 0.0198211669921875, 0.002376556396484375, 0.032623291015625, 0.0200042724609375, 0.0007815361022949219, 0.0259857177734375, 0.0264129638671875, -0.0177154541015625, -0.027587890625, 0.034027099609375, -0.010498046875, 0.01377105712890625, -0.005764007568359375, -0.0292816162109375, -0.00823974609375, 0.022430419921875, 0.003543853759765625, 0.04058837890625, 0.0276336669921875, -0.0111846923828125, -0.0072784423828125, -0.0024890899658203125, 0.0128326416015625, -0.0183868408203125, -0.0035991668701171875, 0.077880859375, -0.0274505615234375, -0.05194091796875, 0.018463134765625, 0.0128936767578125, 0.003261566162109375, -0.03363037109375, -0.00502777099609375, -0.0394287109375, -0.0065460205078125, -0.00848388671875, -0.06341552734375, 0.0026073455810546875, 0.01934814453125, 0.00768280029296875, -0.0261688232421875, 0.00047898292541503906, 0.0010290145874023438, -0.045379638671875, 0.0183563232421875, 0.049407958984375, -0.05560302734375, 0.06915283203125, -0.06292724609375, 0.0511474609375, -0.050262451171875, 0.061737060546875, 0.045684814453125, -0.03668212890625, 0.00510406494140625, 0.0106964111328125, -0.007236480712890625, -0.0093841552734375, 0.0260467529296875, 0.0005521774291992188, -0.05084228515625, -0.0217437744140625, -0.00029277801513671875, 0.023651123046875, 0.029327392578125, 0.01401519775390625, -0.032440185546875, 0.01366424560546875, 0.042755126953125, -0.06927490234375, -0.056671142578125, -0.0310821533203125, -0.05023193359375, -0.0005202293395996094, -0.016448974609375, -0.01322174072265625, 0.007740020751953125, -0.014678955078125, 0.01287078857421875, 0.02545166015625, -0.0290069580078125, -0.0684814453125, -0.05889892578125, -0.09912109375, -0.01148223876953125, 0.00888824462890625, 0.014251708984375, 0.0150909423828125, 0.027557373046875, 0.01409912109375, -0.036834716796875, 0.050262451171875, 0.004962921142578125, -0.008514404296875, 0.032379150390625, 0.0186767578125, -0.0206298828125, 0.02734375, -0.002597808837890625, 0.06884765625, 0.04644775390625, -0.041412353515625, -0.005908966064453125, -0.007045745849609375, -0.027130126953125, 0.0104827880859375, -0.01073455810546875, 0.0036773681640625, 0.00408935546875, 0.0114288330078125, -0.048858642578125, -0.032257080078125, -0.005092620849609375, -0.0293121337890625, 0.0013484954833984375, -0.0165863037109375, 0.020111083984375, 0.0049285888671875, 0.031646728515625, -0.005977630615234375, 0.0180511474609375, 0.07672119140625, -0.042724609375, 0.0282135009765625, -0.0207366943359375, -0.0262298583984375, -0.071533203125, 0.00940704345703125, -0.0225982666015625, 0.0211029052734375, 0.0057373046875, 0.004955291748046875, 0.01331329345703125, -0.0204315185546875, -0.0245361328125, -0.074951171875, 0.05462646484375, -0.0714111328125, -0.033355712890625, -0.04779052734375, -0.0266571044921875, 0.0042266845703125, 0.10064697265625, 0.0034809112548828125, -0.013580322265625, -0.0104522705078125, 0.005229949951171875, -0.0306854248046875, -0.038543701171875, -0.021392822265625, 0.00910186767578125, -0.05645751953125, -0.023956298828125, -0.00576019287109375, -0.049957275390625, 0.00679779052734375, -0.00021517276763916016, -0.040130615234375, -0.0304718017578125, 0.035888671875, -0.00958251953125, -0.01122283935546875, 0.0294036865234375, 0.0004291534423828125, -0.02978515625, -0.03631591796875, 0.00901031494140625, -0.11541748046875, -0.0212554931640625, 0.0016040802001953125, 0.077392578125, 0.00420379638671875, -0.0277557373046875, -0.01409912109375, 0.064453125, 0.0272064208984375, 0.007518768310546875, 0.0251922607421875, -0.0128936767578125, -0.017822265625, -0.0009646415710449219, 0.01433563232421875, -0.0257568359375, 0.0057220458984375, 0.01995849609375, -0.05328369140625, 0.006591796875, -0.01512908935546875, -0.02972412109375, 0.037506103515625, -0.05615234375, -0.01425933837890625, 0.0091705322265625, -0.051025390625, 0.0225982666015625, 0.003452301025390625, -0.043853759765625, -0.021026611328125, -0.053741455078125, 0.01062774658203125, -0.048126220703125, 0.015777587890625, 0.004558563232421875, 0.050811767578125, 0.0140533447265625, 0.0020160675048828125, 0.00946044921875, 0.0260009765625, 0.0244903564453125, 0.006206512451171875, 0.03717041015625, 0.02618408203125, 0.01366424560546875, -0.009490966796875, -0.01132965087890625, -0.00548553466796875, -0.022857666015625, 0.0482177734375, -0.012603759765625, -0.023284912109375, 0.024658203125, -0.05810546875, 0.047821044921875, 0.0284576416015625, 0.0009160041809082031, -0.0186309814453125, -0.00336456298828125, 0.04534912109375, -0.0173797607421875, 0.0146636962890625, -0.046356201171875, -0.0225067138671875, 0.02935791015625, -0.0022602081298828125, 0.0367431640625, 0.004512786865234375, -0.012725830078125, 0.01213836669921875, -0.03515625, 0.0018892288208007812, 0.016693115234375, 0.0241241455078125, -0.0213470458984375, 0.013153076171875, 0.0188751220703125, -0.0288543701171875, -0.01371002197265625, 0.0029850006103515625, 0.0196685791015625, -0.0131378173828125, -0.020751953125, -0.036712646484375, -0.01282501220703125, 0.023223876953125, 0.0194244384765625, 0.0104217529296875, 0.041107177734375, 0.02093505859375, -0.0135345458984375, -0.00991058349609375, 0.01015472412109375, -0.0033969879150390625, -0.04083251953125, -0.0022106170654296875, -0.00426483154296875, 0.00547027587890625, -0.02978515625, 0.10089111328125, 0.022125244140625, 0.0282745361328125, -0.0249176025390625, 0.00572967529296875, 0.0228271484375, 0.05157470703125, 0.0237884521484375, -0.0234375, -0.006191253662109375, 0.01491546630859375, 0.0014238357543945312, -0.03472900390625, -0.04144287109375, 0.03424072265625, 0.07379150390625, -0.0234527587890625, 0.0020008087158203125, 0.00032782554626464844, -0.0242156982421875, -0.032318115234375, 0.031768798828125, -0.00980377197265625, -0.0760498046875, -0.0182952880859375, 0.032867431640625, 0.0172119140625, -0.0258941650390625, -0.01380157470703125, 0.034942626953125, -0.0005459785461425781, 0.04168701171875, -0.033050537109375, -0.01538848876953125, 0.0281219482421875, 0.029266357421875, 0.0173797607421875, -0.016326904296875, -0.006725311279296875, 0.02374267578125, 0.01654052734375, -0.017974853515625, -0.02923583984375, 0.037109375, -0.01494598388671875, 0.054168701171875, -0.0295562744140625, -0.00835418701171875, -0.009063720703125, 0.011688232421875, 0.01506805419921875, -0.00817108154296875, -0.0156402587890625, 0.004375457763671875, -0.0176544189453125, -0.00008082389831542969, 0.0175323486328125, -0.027069091796875, -0.0160064697265625, -0.0285797119140625, 0.01078033447265625, 0.01824951171875, -0.018646240234375, -0.0347900390625, -0.02032470703125, 0.0175933837890625, 0.0265960693359375, 0.054168701171875, -0.00919342041015625, 0.0535888671875, 0.0177001953125, 0.04150390625, 0.029327392578125, 0.0156707763671875, -0.03729248046875, -0.011688232421875, -0.01373291015625, -0.05364990234375, -0.0132904052734375, 0.0274505615234375, -0.031341552734375, 0.04803466796875, 0.047210693359375, 0.006500244140625, -0.015838623046875, 0.0231170654296875, -0.00418853759765625, -0.0186614990234375, -0.0163116455078125, 0.04669189453125, 0.0148162841796875, -0.010955810546875, -0.013824462890625, 0.0032749176025390625, 0.0209808349609375, 0.005687713623046875, -0.0128021240234375, -0.00472259521484375, -0.010345458984375, 0.0132598876953125, -0.06854248046875, 0.035980224609375, 0.07000732421875, 0.04876708984375, 0.059051513671875, -0.019927978515625, 0.025604248046875, 0.0435791015625, 0.0096435546875, -0.021728515625, 0.0027866363525390625, 0.04193115234375, -0.0006566047668457031, 0.007572174072265625, 0.044769287109375, 0.003650665283203125, -0.00868988037109375, 0.07171630859375, 0.0556640625, -0.104248046875, 0.00975799560546875, 0.006694793701171875, 0.0267333984375, 0.037872314453125, -0.000004112720489501953, -0.0160369873046875, 0.02093505859375, -0.0005826950073242188, -0.043487548828125, -0.046966552734375, -0.009246826171875, 0.00760650634765625, -0.0018939971923828125, -0.0097808837890625, 0.0288543701171875, 0.003978729248046875, 0.01352691650390625, -0.0284881591796875, -0.005748748779296875, -0.01195526123046875, 0.00846099853515625, 0.0145111083984375, -0.028900146484375, -0.0037994384765625, -0.00811004638671875, 0.00799560546875, -0.0401611328125, 0.007232666015625, 0.0467529296875, 0.0015010833740234375, 0.04608154296875, 0.016632080078125, 0.006832122802734375, 0.00372314453125, -0.037689208984375, -0.0255584716796875, -0.038238525390625, -0.04638671875, -0.00460052490234375, 0.0016345977783203125, -0.00457000732421875, 0.0214691162109375, -0.009674072265625, -0.062469482421875, -0.007808685302734375, -0.04486083984375, 0.0831298828125, -0.060333251953125, -0.002979278564453125, 0.011444091796875, -0.02166748046875, -0.004955291748046875, 0.00957489013671875, -0.009521484375, -0.012420654296875, 0.0174102783203125, -0.01654052734375, -0.0205078125, 0.0015153884887695312, -0.00565338134765625, -0.025604248046875, 0.07574462890625, 0.0015306472778320312, 0.002826690673828125, 0.03656005859375, 0.032867431640625, -0.0227508544921875, 0.0174713134765625, -0.0306396484375, 0.05206298828125, -0.029876708984375, 0.04339599609375, -0.0601806640625, -0.0035495758056640625, 0.003383636474609375, 0.02874755859375, 0.06671142578125, 0.0165863037109375, -0.046539306640625, 0.01096343994140625, 0.055328369140625, 0.01702880859375, -0.00960540771484375, 0.025848388671875, 0.016021728515625, 0.039764404296875, 0.053070068359375, -0.0021228790283203125, 0.045654296875, -0.01018524169921875, -0.039337158203125, 0.018798828125, 0.01081085205078125, 0.006855010986328125, -0.0157470703125, -0.04388427734375, -0.05517578125, -0.0008730888366699219, 0.04736328125, -0.047027587890625, -0.0011272430419921875, 0.0006690025329589844, 0.026947021484375, -0.055511474609375, -0.01020050048828125, -0.0189056396484375, 0.035858154296875, 0.0033969879150390625, -0.01264190673828125, 0.0078582763671875, 0.0094757080078125, 0.033782958984375, -0.05072021484375, -0.02313232421875, -0.00244903564453125, -0.008026123046875, 0.06298828125, 0.037261962890625, 0.0226898193359375, -0.0175323486328125, -0.00032138824462890625, 0.056365966796875, 0.0775146484375, -0.04901123046875, -0.06854248046875, 0.0047454833984375, 0.0005483627319335938, 0.00975799560546875, 0.0214080810546875, 0.01210784912109375, -0.01377105712890625, 0.0218658447265625, -0.02197265625, -0.0089263916015625, 0.018310546875, 0.039276123046875, -0.0113067626953125, -0.04339599609375, -0.0299224853515625, -0.0036163330078125, -0.06591796875, 0.0377197265625, 0.025299072265625, 0.0684814453125, 0.0170135498046875, 0.047119140625, -0.0167083740234375, -0.0206146240234375, -0.0215911865234375, 0.00513458251953125, -0.012451171875, 0.0271148681640625, -0.073974609375, -0.04998779296875, 0.06298828125, 0.0621337890625, 0.0286712646484375, 0.0102691650390625, 0.025634765625, 0.00873565673828125, 0.00942230224609375, 0.006496429443359375, 0.0306243896484375, -0.01413726806640625, 0.00443267822265625, -0.051788330078125, 0.01232147216796875, -0.03314208984375, 0.00336456298828125, 0.0010089874267578125, 0.03173828125, -0.0404052734375, -0.0020694732666015625, 0.050201416015625, 0.00409698486328125, 0.01007843017578125, 0.0606689453125, -0.00615692138671875, 0.053375244140625, 0.029388427734375, -0.06903076171875, -0.033416748046875, -0.0007123947143554688, -0.0657958984375, 0.0462646484375, 0.062225341796875, 0.013336181640625, -0.045562744140625, -0.003307342529296875, 0.00128936767578125, 0.017608642578125, -0.01122283935546875, 0.01117706298828125, 0.034881591796875, 0.00830078125, 0.023681640625, -0.0187530517578125, -0.014251708984375, 0.01413726806640625, 0.031341552734375, -0.019989013671875, 0.11907958984375, -0.050750732421875, -0.002536773681640625, -0.04071044921875, 0.018798828125, -0.053863525390625, -0.013336181640625, -0.0292205810546875, -0.008697509765625, -0.000591278076171875, 0.0157012939453125, -0.025665283203125, 0.0079193115234375, 0.044189453125, -0.04638671875, 0.002872467041015625, 0.001255035400390625, 0.01702880859375, -0.030303955078125, 0.0162200927734375, -0.026702880859375, -0.055908203125, -0.0736083984375, 0.0033397674560546875, 0.0263519287109375, 0.032562255859375, -0.039703369140625, 0.0136566162109375, 0.0033740997314453125, -0.043975830078125, 0.021697998046875, -0.04864501953125, 0.05206298828125, 0.043304443359375, -0.0021877288818359375, -0.00695037841796875, 0.0153961181640625, -0.0186004638671875, 0.033843994140625, 0.0083770751953125, 0.0261077880859375, 0.0127105712890625, -0.0279693603515625, 0.00574493408203125, -0.0169677734375, -0.0202789306640625, -0.043670654296875, -0.0235595703125, 0.0294189453125, -0.01806640625, 0.0010328292846679688, -0.0149078369140625, -0.00659942626953125, -0.03912353515625, -0.0098876953125, 0.01123809814453125, -0.0144195556640625, 0.01020050048828125, -0.007358551025390625, 0.01143646240234375, 0.04119873046875, 0.004177093505859375, -0.05987548828125, 0.0243377685546875, -0.042724609375, 0.057861328125, -0.01424407958984375, -0.0391845703125, 0.01522064208984375, 0.052032470703125, -0.01546478271484375, 0.00797271728515625, -0.0214385986328125, -0.0343017578125, -0.0299072265625, 0.01319122314453125, 0.0391845703125, -0.016754150390625, -0.066162109375, -0.00957489013671875, -0.0149688720703125, 0.042633056640625, 0.0258331298828125, -0.00261688232421875, 0.00022852420806884766, 0.0238037109375, -0.036407470703125, -0.0809326171875, 0.005779266357421875, -0.050567626953125, 0.003337860107421875, -0.0126190185546875, 0.019989013671875, 0.0384521484375, -0.0243377685546875, -0.055572509765625, -0.004291534423828125, 0.00011485815048217773, -0.0283355712890625, -0.0623779296875, -0.01439666748046875, 0.00919342041015625, 0.047332763671875, -0.0037479400634765625, -0.0306549072265625, -0.05938720703125, 0.0211029052734375, 0.01507568359375, 0.046173095703125, 0.006649017333984375, 0.01378631591796875, 0.002162933349609375, 0.01401519775390625, 0.018218994140625, -0.0020904541015625, -0.00420379638671875, 0.0178680419921875, 0.002956390380859375, 0.048309326171875, -0.02886962890625, -0.01617431640625, -0.0220184326171875, -0.000244140625, 0.0026264190673828125, -0.08221435546875, -0.032684326171875, -0.04998779296875, 0.062103271484375, -0.00855255126953125, 0.0204925537109375, -0.0033111572265625, 0.0128173828125, -0.029693603515625, -0.039764404296875, -0.0035190582275390625, 0.037933349609375, -0.07244873046875, -0.0067138671875, 0.0158538818359375, 0.0157928466796875, -0.0247344970703125, 0.0148773193359375, -0.0015583038330078125, -0.01137542724609375, 0.040435791015625, -0.0140228271484375, -0.01288604736328125, 0.00579071044921875, 0.046173095703125, -0.0292816162109375, -0.01337432861328125, -0.0035228729248046875, 0.01062774658203125, 0.000014662742614746094, -0.0164642333984375, 0.0122528076171875, 0.0178985595703125, 0.002811431884765625, 0.0021457672119140625, 0.0310211181640625, 0.0096588134765625, 0.00582122802734375, -0.021575927734375, 0.0153961181640625, 0.02313232421875, -0.0171661376953125, 0.0169677734375, 0.0061492919921875, 0.039703369140625, -0.0023956298828125, 0.037811279296875, 0.017242431640625, 0.01287078857421875, 0.005733489990234375, 0.026702880859375, 0.0013790130615234375, -0.007328033447265625, -0.0052490234375, -0.007354736328125, 0.0111236572265625, -0.024261474609375, -0.01904296875, -0.016204833984375, -0.007663726806640625, -0.032196044921875, -0.03790283203125, 0.020660400390625 ]
364bab5ee0d95c74e9794105a81c92529dc6f258
Wordpress Stackexchange Q: Stop wordpress from hardcoding img width and height attributes I'm wondering if there's a simple way top stop WordPress automatically hardcoding featured image height and width attributes, other than using regex... As I'm using a flexible grid for my project (who isn't!) this is causing some funky image issues. A: You can get featured image URL and add it to your content manually, eg: <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' ); if ($image) : ?> <img src="<?php echo $image[0]; ?>" alt="" /> <?php endif; ?>
Q: Stop wordpress from hardcoding img width and height attributes I'm wondering if there's a simple way top stop WordPress automatically hardcoding featured image height and width attributes, other than using regex... As I'm using a flexible grid for my project (who isn't!) this is causing some funky image issues. A: You can get featured image URL and add it to your content manually, eg: <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' ); if ($image) : ?> <img src="<?php echo $image[0]; ?>" alt="" /> <?php endif; ?> A: You can overrule inline styles/attributes with !important: .wp-post-image { width: auto !important; /* or probably 100% in case of a grid */ height: auto !important; } It's not the cleanest solution, but it solves your problem. A: Best solution is to place jquery in footer jQuery(document).ready(function ($) { jQuery('img').removeAttr('width').removeAttr('height'); }); A: CSS solution: img[class*="align"], img[class*="wp-image-"] { width: auto; height: auto; } This allows responsive images to work as they should, meanwhile you maintain the width and height attributes in the img element, which is probably better for older browsers, performance and/or to pass HTML validators. PHP solution: This will prevent the addition of width/height attributes on any newly-added media in the WP editor (via 'Add Media'). FYI, it may affect your image captions too! function remove_widthHeight_attribute( $html ) { $html = preg_replace( '/(width|height)="\d*"\s/', "", $html ); return $html; } add_filter( 'post_thumbnail_html', 'remove_widthHeight_attribute', 10 ); add_filter( 'image_send_to_editor', 'remove_widthHeight_attribute', 10 ); A: You can remove the width and height attributes by filtering the output of image_downsize function found at wp-includes/media.php. To do this, you write your own function and execute it via your theme's functions.php file or as a plugin. Example: Remove the width and height attributes. /** * This is a modification of image_downsize() function in wp-includes/media.php * we will remove all the width and height references, therefore the img tag * will not add width and height attributes to the image sent to the editor. * * @param bool false No height and width references. * @param int $id Attachment ID for image. * @param array|string $size Optional, default is 'medium'. Size of image, either array or string. * @return bool|array False on failure, array on success. */ function myprefix_image_downsize( $value = false, $id, $size ) { if ( !wp_attachment_is_image($id) ) return false; $img_url = wp_get_attachment_url($id); $is_intermediate = false; $img_url_basename = wp_basename($img_url); // try for a new style intermediate size if ( $intermediate = image_get_intermediate_size($id, $size) ) { $img_url = str_replace($img_url_basename, $intermediate['file'], $img_url); $is_intermediate = true; } elseif ( $size == 'thumbnail' ) { // Fall back to the old thumbnail if ( ($thumb_file = wp_get_attachment_thumb_file($id)) && $info = getimagesize($thumb_file) ) { $img_url = str_replace($img_url_basename, wp_basename($thumb_file), $img_url); $is_intermediate = true; } } // We have the actual image size, but might need to further constrain it if content_width is narrower if ( $img_url) { return array( $img_url, 0, 0, $is_intermediate ); } return false; } Attach the new function to the image_downsize hook: /* Remove the height and width refernces from the image_downsize function. * We have added a new param, so the priority is 1, as always, and the new * params are 3. */ add_filter( 'image_downsize', 'myprefix_image_downsize', 1, 3 ); Also don't forget to scale the images correctly in your CSS: /* Image sizes and alignments */ .entry-content img, .comment-content img, .widget img { max-width: 97.5%; /* Fluid images for posts, comments, and widgets */ } img[class*="align"], img[class*="wp-image-"] { height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ } img.size-full { max-width: 97.5%; width: auto; /* Prevent stretching of full-size images with height and width attributes in IE8 */ } Hope this helps you. Cheers, A: You can use the post_thumbnail_html filter to remove the attribute: function remove_img_attr ($html) { return preg_replace('/(width|height)="\d+"\s/', "", $html); } add_filter( 'post_thumbnail_html', 'remove_img_attr' ); Place this in your functions.php file A: Here is a simple Javascript solution: <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function($){ $('img').each(function(){ $(this).removeAttr('width') $(this).removeAttr('height'); }); }); </script> This can be used to target specific images instead of all images by using a CSS selector, like so: $('.myspecificclass img').each(function() A: Add this piece of code: (Applies to new Gutenberg editor too) function disable_add_img_width_height( $value, $image, $context, $attachment_id ) { if ($context === 'the_content' || $context === 'the_excerpt' || $context === 'widget_text_content') return false; return $value; } add_filter( 'wp_img_tag_add_width_and_height_attr', 'disable_add_img_width_height', 10, 4 );
wordpress
{ "language": "en", "length": 724, "provenance": "stackexchange_00019.jsonl.gz:413469", "question_score": "17", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29881" }
[ 0.007904052734375, -0.0528564453125, 0.0150604248046875, -0.0055084228515625, -0.037322998046875, -0.01459503173828125, 0.0228424072265625, -0.004085540771484375, 0.019073486328125, 0.024169921875, -0.0038547515869140625, -0.0014009475708007812, -0.0122528076171875, -0.0198974609375, -0.01380157470703125, -0.0104522705078125, 0.043182373046875, -0.01490020751953125, 0.036376953125, 0.01090240478515625, 0.00823974609375, 0.0310211181640625, 0.00795745849609375, 0.09405517578125, -0.0185089111328125, 0.0009140968322753906, 0.08892822265625, -0.03973388671875, -0.0063018798828125, -0.023284912109375, 0.00970458984375, 0.0205841064453125, 0.018310546875, 0.029449462890625, -0.03961181640625, -0.015716552734375, -0.013427734375, 0.00827789306640625, -0.0168304443359375, 0.01061248779296875, 0.01273345947265625, -0.00022470951080322266, 0.0556640625, -0.0167999267578125, -0.00405120849609375, -0.01123809814453125, 0.02392578125, -0.02935791015625, 0.02008056640625, 0.0196380615234375, 0.01462554931640625, 0.059356689453125, 0.020294189453125, -0.005859375, -0.0083770751953125, 0.0014085769653320312, 0.00119781494140625, 0.0423583984375, 0.0350341796875, -0.025726318359375, -0.046966552734375, 0.01215362548828125, 0.023193359375, -0.025360107421875, -0.005077362060546875, -0.0338134765625, -0.025421142578125, 0.01387786865234375, -0.0215301513671875, -0.0208587646484375, 0.0457763671875, -0.003795623779296875, -0.0005593299865722656, -0.049896240234375, 0.0281829833984375, 0.0194549560546875, -0.0504150390625, -0.036224365234375, 0.021209716796875, 0.00565338134765625, 0.0266876220703125, -0.0197906494140625, 0.0254669189453125, -0.0189666748046875, 0.026458740234375, 0.0085601806640625, 0.005847930908203125, -0.0021762847900390625, -0.0016756057739257812, -0.01493072509765625, -0.00981903076171875, 0.0027027130126953125, -0.040130615234375, 0.031524658203125, -0.01715087890625, -0.003986358642578125, 0.0248870849609375, 0.0013275146484375, -0.0018548965454101562, 0.01134490966796875, -0.01004791259765625, -0.04449462890625, 0.04437255859375, -0.0240020751953125, 0.0280609130859375, 0.019744873046875, -0.03131103515625, 0.023193359375, 0.056243896484375, 0.0274505615234375, 0.00872802734375, 0.007259368896484375, -0.01316070556640625, -0.0134124755859375, 0.00506591796875, 0.038360595703125, -0.0210113525390625, 0.0260162353515625, 0.0017871856689453125, 0.0147247314453125, -0.007541656494140625, -0.00743865966796875, 0.06146240234375, -0.01288604736328125, 0.0579833984375, 0.0477294921875, -0.04229736328125, -0.047882080078125, -0.02520751953125, 0.017547607421875, -0.0170135498046875, 0.01221466064453125, 0.05926513671875, 0.01490020751953125, -0.00762176513671875, -0.00970458984375, 0.0014505386352539062, -0.01018524169921875, -0.01319122314453125, 0.01983642578125, -0.027587890625, -0.0230712890625, 0.04150390625, -0.02899169921875, 0.0032901763916015625, 0.0024890899658203125, 0.017333984375, 0.034576416015625, -0.0300750732421875, -0.044464111328125, 0.052459716796875, -0.0214691162109375, 0.0285186767578125, 0.00943756103515625, 0.04144287109375, -0.0179901123046875, 0.08294677734375, -0.0435791015625, -0.0119171142578125, -0.0457763671875, -0.028350830078125, -0.00946044921875, 0.006816864013671875, -0.023101806640625, -0.0260009765625, 0.004856109619140625, -0.007476806640625, 0.00946807861328125, 0.0282135009765625, -0.00489044189453125, 0.0183563232421875, 0.002201080322265625, 0.016998291015625, 0.01312255859375, 0.00408172607421875, 0.01081085205078125, 0.01097869873046875, 0.025482177734375, -0.00800323486328125, 0.03594970703125, 0.01493072509765625, -0.037017822265625, 0.039703369140625, -0.0091705322265625, -0.021728515625, -0.01715087890625, -0.0075225830078125, 0.01168060302734375, 0.0214996337890625, 0.019195556640625, 0.01015472412109375, -0.0179443359375, -0.037567138671875, 0.059600830078125, -0.00830841064453125, -0.0211181640625, -0.0002651214599609375, 0.0147552490234375, -0.0178070068359375, -0.033355712890625, 0.046783447265625, 0.0238800048828125, 0.0069427490234375, -0.040374755859375, -0.0012645721435546875, 0.0155181884765625, 0.00604248046875, 0.0262298583984375, -0.052886962890625, -0.003276824951171875, 0.031494140625, -0.0007643699645996094, -0.03179931640625, 0.0094146728515625, 0.00887298583984375, 0.004833221435546875, -0.01020050048828125, 0.0289154052734375, -0.0064239501953125, 0.0203094482421875, -0.0087432861328125, -0.02655029296875, -0.004150390625, 0.02557373046875, 0.01206207275390625, 0.027252197265625, -0.045745849609375, 0.000659942626953125, -0.01293182373046875, 0.0037364959716796875, -0.00782012939453125, 0.051849365234375, 0.0031032562255859375, -0.01323699951171875, -0.023193359375, 0.0008502006530761719, -0.0173797607421875, -0.09259033203125, -0.004428863525390625, 0.0701904296875, 0.036773681640625, 0.042388916015625, -0.004001617431640625, -0.0177459716796875, 0.027435302734375, -0.01016998291015625, 0.035430908203125, -0.045928955078125, -0.034088134765625, -0.0281829833984375, -0.0126495361328125, -0.0037250518798828125, 0.020355224609375, -0.09906005859375, -0.01103973388671875, 0.056549072265625, -0.0151519775390625, 0.001224517822265625, -0.0127716064453125, 0.035736083984375, -0.001117706298828125, 0.06787109375, 0.0183258056640625, 0.00275421142578125, 0.030364990234375, -0.0091094970703125, 0.011627197265625, -0.004604339599609375, -0.023345947265625, 0.0215301513671875, 0.026702880859375, -0.034210205078125, -0.00917816162109375, 0.01100921630859375, 0.0283050537109375, -0.0014810562133789062, -0.028839111328125, 0.0178985595703125, -0.00045371055603027344, 0.004497528076171875, 0.0057373046875, 0.0276031494140625, -0.00986480712890625, -0.01073455810546875, -0.0188140869140625, -0.07208251953125, 0.0092010498046875, 0.0279083251953125, 0.0184173583984375, 0.01220703125, 0.0100555419921875, 0.0660400390625, 0.03765869140625, 0.004222869873046875, 0.030426025390625, 0.0178070068359375, -0.046478271484375, -0.02587890625, 0.0186004638671875, -0.0007443428039550781, 0.078369140625, 0.0948486328125, 0.02020263671875, 0.01824951171875, -0.023956298828125, 0.0250091552734375, -0.034454345703125, -0.01284027099609375, -0.033355712890625, -0.004856109619140625, -0.07977294921875, -0.00537872314453125, 0.036865234375, 0.042572021484375, -0.0020732879638671875, -0.00902557373046875, -0.00533294677734375, 0.034332275390625, -0.050079345703125, -0.039520263671875, 0.030670166015625, -0.0462646484375, -0.055511474609375, 0.022979736328125, -0.042510986328125, 0.0027980804443359375, 0.05072021484375, -0.0182037353515625, -0.03961181640625, 0.005306243896484375, -0.0386962890625, -0.05609130859375, -0.04144287109375, -0.0084075927734375, -0.0218048095703125, 0.01116180419921875, 0.01763916015625, -0.00731658935546875, -0.005828857421875, -0.04345703125, 0.0229949951171875, 0.00594329833984375, -0.0011425018310546875, 0.015869140625, 0.0230255126953125, -0.0169830322265625, -0.0244598388671875, 0.000030934810638427734, -0.01727294921875, 0.0301666259765625, -0.02392578125, -0.0080108642578125, -0.015777587890625, -0.058197021484375, -0.00786590576171875, 0.06744384765625, 0.01056671142578125, -0.036407470703125, 0.0635986328125, -0.059326171875, -0.043365478515625, 0.0010929107666015625, -0.051483154296875, -0.0011129379272460938, 0.04998779296875, -0.01287078857421875, -0.04962158203125, 0.0183563232421875, 0.021575927734375, 0.0064544677734375, 0.006916046142578125, -0.0189208984375, 0.033050537109375, -0.006908416748046875, -0.00487518310546875, -0.04510498046875, -0.0186920166015625, -0.011138916015625, 0.03045654296875, -0.006519317626953125, 0.0304107666015625, 0.0022106170654296875, 0.00331878662109375, -0.025360107421875, -0.009552001953125, 0.0321044921875, 0.012054443359375, 0.059783935546875, -0.01201629638671875, -0.041168212890625, 0.007781982421875, 0.0909423828125, -0.047088623046875, -0.0029144287109375, -0.0298004150390625, 0.01241302490234375, -0.0528564453125, -0.038604736328125, -0.07183837890625, 0.01096343994140625, -0.05072021484375, 0.0038394927978515625, 0.006649017333984375, -0.024383544921875, -0.032745361328125, 0.052032470703125, -0.04302978515625, -0.0161590576171875, 0.01666259765625, 0.03173828125, -0.00539398193359375, 0.0233001708984375, -0.0305633544921875, 0.031036376953125, 0.00428009033203125, -0.022674560546875, -0.126220703125, -0.023345947265625, -0.033355712890625, 0.10028076171875, -0.0333251953125, 0.04498291015625, -0.07318115234375, 0.04766845703125, -0.02813720703125, -0.0038509368896484375, 0.0023555755615234375, 0.038970947265625, -0.01055908203125, 0.0112457275390625, 0.006195068359375, -0.03424072265625, -0.029205322265625, -0.04180908203125, -0.01061248779296875, -0.003612518310546875, -0.018310546875, -0.01123046875, 0.00855255126953125, 0.0065460205078125, -0.0218963623046875, -0.01654052734375, 0.005100250244140625, 0.0225830078125, -0.007358551025390625, -0.00803375244140625, -0.040771484375, -0.0152130126953125, 0.05072021484375, 0.04229736328125, -0.00016295909881591797, 0.005619049072265625, 0.080322265625, 0.019683837890625, -0.03192138671875, -0.07861328125, 0.00624847412109375, 0.0662841796875, 0.0149993896484375, 0.058380126953125, 0.044525146484375, -0.024658203125, 0.03515625, 0.0557861328125, 0.0029277801513671875, 0.00022161006927490234, 0.0089111328125, 0.0028858184814453125, -0.01116943359375, 0.00933074951171875, 0.00443267822265625, 0.0038547515869140625, 0.0126190185546875, 0.007801055908203125, 0.0022640228271484375, 0.0278778076171875, -0.005664825439453125, 0.0204315185546875, -0.046173095703125, 0.00458526611328125, -0.007640838623046875, -0.005939483642578125, 0.0212554931640625, 0.0157470703125, 0.00818634033203125, -0.0005350112915039062, -0.0251312255859375, 0.01617431640625, -0.00559234619140625, 0.00034427642822265625, -0.030487060546875, -0.00333404541015625, 0.045135498046875, -0.03936767578125, 0.016204833984375, 0.0226287841796875, 0.01062774658203125, 0.006046295166015625, -0.0240478515625, -0.041961669921875, -0.0213470458984375, -0.00261688232421875, -0.0367431640625, 0.02880859375, 0.0191192626953125, 0.05194091796875, 0.00940704345703125, 0.00792694091796875, -0.0357666015625, -0.036590576171875, 0.00690460205078125, -0.05389404296875, 0.0167236328125, -0.00516510009765625, -0.007198333740234375, 0.033660888671875, -0.004611968994140625, 0.01326751708984375, 0.0038814544677734375, -0.00005561113357543945, -0.0015659332275390625, 0.00284576416015625, 0.01218414306640625, 0.00522613525390625, 0.0292816162109375, -0.010986328125, 0.0106048583984375, 0.037353515625, -0.042572021484375, 0.0209808349609375, 0.0187835693359375, 0.05804443359375, -0.011138916015625, -0.051361083984375, 0.019317626953125, -0.051300048828125, -0.0079498291015625, 0.00203704833984375, -0.0531005859375, -0.058502197265625, 0.004505157470703125, 0.03515625, 0.026153564453125, -0.02496337890625, -0.044647216796875, 0.0157470703125, -0.0299072265625, -0.002925872802734375, 0.038726806640625, -0.0673828125, 0.03460693359375, 0.024169921875, -0.0478515625, -0.0218963623046875, -0.0289764404296875, 0.01849365234375, 0.004589080810546875, -0.0230255126953125, -0.029693603515625, 0.042755126953125, -0.03253173828125, 0.000055730342864990234, -0.00913238525390625, 0.0047454833984375, -0.0286865234375, 0.02490234375, 0.01318359375, -0.000751495361328125, -0.043609619140625, -0.0287628173828125, -0.04437255859375, -0.0103302001953125, 0.0292205810546875, -0.0271759033203125, -0.0041656494140625, -0.0008921623229980469, -0.0162811279296875, 0.01203155517578125, -0.0251922607421875, -0.0029811859130859375, -0.0159149169921875, 0.04638671875, 0.00482940673828125, 0.05169677734375, -0.039398193359375, -0.02386474609375, 0.016326904296875, 0.024810791015625, -0.030548095703125, -0.04705810546875, 0.0289154052734375, -0.01505279541015625, -0.002826690673828125, -0.02484130859375, 0.00228118896484375, 0.01617431640625, 0.01031494140625, -0.0239105224609375, -0.0216217041015625, 0.005558013916015625, 0.004192352294921875, -0.04290771484375, 0.00983428955078125, -0.050445556640625, 0.0631103515625, -0.0911865234375, -0.0083770751953125, -0.02532958984375, -0.0150604248046875, 0.0240631103515625, -0.004604339599609375, -0.032379150390625, 0.0297088623046875, 0.005096435546875, 0.0037517547607421875, 0.035491943359375, 0.032470703125, -0.0333251953125, 0.05584716796875, 0.005340576171875, 0.052978515625, 0.047393798828125, 0.0247955322265625, 0.015655517578125, 0.043914794921875, -0.0313720703125, -0.0452880859375, 0.059814453125, 0.035888671875, -0.002971649169921875, 0.0665283203125, -0.0176849365234375, 0.06817626953125, 0.03277587890625, 0.09521484375, -0.0283660888671875, 0.026275634765625, 0.0273590087890625, -0.0682373046875, 0.069091796875, -0.00261688232421875, 0.0187530517578125, 0.02740478515625, -0.004032135009765625, 0.00394439697265625, -0.032196044921875, -0.0207672119140625, 0.01343536376953125, -0.00531005859375, -0.000514984130859375, 0.0265655517578125, 0.00896453857421875, -0.0750732421875, -0.0003998279571533203, 0.061859130859375, -0.018707275390625, 0.0032176971435546875, 0.034698486328125, -0.0259857177734375, -0.0109405517578125, -0.0307769775390625, -0.00714111328125, 0.01458740234375, -0.037017822265625, 0.02264404296875, 0.0261383056640625, 0.0399169921875, 0.050537109375, 0.0258331298828125, 0.005340576171875, 0.01171875, -0.00814056396484375, 0.055206298828125, -0.032867431640625, -0.016632080078125, 0.00759124755859375, -0.0445556640625, -0.0158843994140625, -0.01232147216796875, 0.009979248046875, -0.005008697509765625, -0.00949859619140625, 0.06988525390625, -0.019317626953125, -0.0203857421875, 0.0295257568359375, 0.004306793212890625, -0.0197601318359375, -0.0196990966796875, 0.043121337890625, -0.034637451171875, 0.0099639892578125, -0.01096343994140625, -0.004062652587890625, 0.003662109375, -0.050750732421875, -0.042694091796875, 0.0303802490234375, -0.02532958984375, -0.007442474365234375, -0.022796630859375, 0.0240631103515625, 0.0316162109375, 0.0150146484375, -0.0126190185546875, 0.03173828125, -0.036407470703125, -0.00490570068359375, -0.0119476318359375, 0.02838134765625, -0.01084136962890625, -0.00687408447265625, -0.01216888427734375, 0.0029582977294921875, -0.027313232421875, 0.0091552734375, 0.03839111328125, 0.0265045166015625, 0.0153045654296875, 0.0223846435546875, -0.01593017578125, 0.006439208984375, 0.00949859619140625, -0.07080078125, -0.00787353515625, -0.01824951171875, -0.011474609375, 0.00891876220703125, 0.023223876953125, 0.0238800048828125, -0.019012451171875, 0.03729248046875, -0.068115234375, 0.004077911376953125, 0.07000732421875, -0.0277252197265625, 0.005413055419921875, -0.010467529296875, 0.0156707763671875, -0.05389404296875, 0.005962371826171875, -0.01959228515625, 0.044952392578125, 0.01678466796875, 0.040496826171875, 0.0149993896484375, 0.00547027587890625, 0.0357666015625, -0.0206146240234375, 0.0032329559326171875, 0.0189971923828125, -0.01385498046875, -0.010894775390625, -0.005615234375, 0.033172607421875, -0.039642333984375, -0.0033588409423828125, 0.0241851806640625, 0.002536773681640625, -0.0084075927734375, -0.00675201416015625, 0.0167388916015625, 0.0159759521484375, -0.016265869140625, -0.020233154296875, 0.00756072998046875, -0.07177734375, -0.017333984375, -0.04095458984375, -0.0021953582763671875, 0.05975341796875, 0.038787841796875, -0.0012416839599609375, -0.021484375, -0.055084228515625, -0.02978515625, -0.018829345703125, -0.050079345703125, 0.02923583984375, 0.0582275390625, 0.03564453125, 0.024383544921875, 0.0013713836669921875, -0.021820068359375, -0.03192138671875, 0.02996826171875, -0.0161590576171875, 0.0531005859375, -0.052459716796875, -0.0177001953125, -0.0099639892578125, 0.050384521484375, -0.050933837890625, -0.003314971923828125, 0.033233642578125, 0.0178985595703125, -0.10107421875, -0.0323486328125, 0.057342529296875, -0.051361083984375, -0.01119232177734375, -0.048553466796875, 0.0210723876953125, 0.05572509765625, 0.01152801513671875, -0.0007061958312988281, 0.0038051605224609375, 0.05487060546875, -0.02520751953125, 0.03631591796875, -0.0175323486328125, -0.005039215087890625, 0.0005083084106445312, -0.046966552734375, -0.00323486328125, -0.01544952392578125, -0.07476806640625, 0.005039215087890625, -0.02313232421875, -0.0546875, 0.0271453857421875, 0.030426025390625, -0.043121337890625, 0.0467529296875, 0.004459381103515625, -0.0225830078125, -0.0221710205078125, 0.018157958984375, 0.0232086181640625, -0.0211181640625, 0.004375457763671875, -0.0065765380859375, -0.008026123046875, 0.0032100677490234375, -0.0209808349609375, 0.033721923828125, -0.00623321533203125, 0.0887451171875, -0.027679443359375, 0.0241851806640625, -0.018646240234375, -0.0246734619140625, -0.0025310516357421875, -0.01404571533203125, 0.00899505615234375, -0.0270538330078125, -0.0181732177734375, -0.00931549072265625, -0.0241546630859375, 0.01018524169921875, 0.002468109130859375, -0.0257110595703125, -0.0080718994140625, -0.00677490234375, 0.010009765625, 0.013214111328125, 0.046661376953125, -0.037261962890625, -0.044525146484375, -0.0521240234375, -0.005657196044921875, -0.007720947265625, -0.0452880859375, -0.0054779052734375, 0.0232391357421875, 0.040130615234375, -0.00482940673828125, 0.059051513671875, -0.0269012451171875, 0.070068359375, 0.036163330078125, -0.008270263671875, -0.0202178955078125, 0.0187225341796875, -0.00908660888671875, -0.01059722900390625, 0.0128173828125, 0.03448486328125, 0.0121307373046875, -0.043182373046875, 0.02252197265625, 0.01666259765625, 0.07000732421875, 0.010101318359375, 0.0145263671875, -0.0168914794921875, 0.0096435546875, -0.021453857421875, 0.0273895263671875, 0.01092529296875, -0.0271453857421875, -0.03497314453125, -0.00019276142120361328, -0.0193328857421875, 0.01099395751953125, 0.02862548828125, -0.04473876953125, 0.037567138671875, 0.01739501953125, -0.048187255859375, -0.00594329833984375, 0.0169219970703125, 0.03082275390625, -0.00908660888671875, -0.0265960693359375, -0.004638671875, 0.046783447265625, -0.02032470703125, -0.040130615234375, -0.043731689453125, 0.01345062255859375, -0.053924560546875, 0.057220458984375, 0.06658935546875, -0.0305938720703125, 0.0005364418029785156, 0.026092529296875, 0.033843994140625, 0.078369140625, -0.04156494140625, -0.01873779296875, -0.0025196075439453125, -0.003131866455078125, -0.00289154052734375, -0.0347900390625, 0.01277923583984375, -0.047088623046875, -0.004955291748046875, -0.046661376953125, -0.007099151611328125, -0.0266876220703125, -0.04840087890625, -0.06170654296875, 0.06671142578125, -0.01317596435546875, -0.022308349609375, -0.01358795166015625, -0.0286102294921875, -0.032012939453125, 0.04241943359375, 0.004451751708984375, -0.004573822021484375, -0.0023956298828125, 0.050262451171875, 0.0135040283203125, -0.06268310546875, 0.06658935546875, -0.0235443115234375, -0.023223876953125, 0.04437255859375, 0.0706787109375, -0.0271759033203125, 0.01348876953125, -0.0081634521484375, 0.042022705078125, 0.0259857177734375, -0.014892578125, -0.00211334228515625, 0.006832122802734375, -0.0310516357421875, -0.00856781005859375, 0.020660400390625, 0.01226806640625, -0.0006341934204101562, 0.045562744140625, 0.0266571044921875, 0.004253387451171875, -0.0157928466796875, 0.0245208740234375, 0.027923583984375, 0.00635528564453125, -0.0026111602783203125, 0.0096893310546875, -0.076171875, -0.059356689453125, 0.0258636474609375, -0.0147552490234375, -0.01837158203125, -0.0361328125, -0.06817626953125, 0.0147247314453125, -0.0247344970703125, 0.04827880859375, -0.05865478515625, 0.09149169921875, -0.0148468017578125, -0.015228271484375, 0.010955810546875, -0.05010986328125, -0.01079559326171875, 0.004917144775390625, -0.06072998046875, -0.028961181640625, 0.029388427734375, -0.0079803466796875, -0.006458282470703125, 0.007564544677734375, -0.01568603515625, 0.007724761962890625, 0.02862548828125, -0.0213623046875, 0.0133819580078125, 0.0160369873046875, 0.0252685546875, -0.01030731201171875, -0.01141357421875, 0.0192108154296875, -0.041839599609375, -0.0144500732421875, 0.0191802978515625, -0.036651611328125, 0.02508544921875, 0.006313323974609375, -0.01593017578125, 0.039093017578125, -0.01445770263671875, 0.0271759033203125, 0.00469207763671875, 0.01544952392578125, 0.0088348388671875, -0.049835205078125, -0.002777099609375, -0.023468017578125, -0.01294708251953125 ]
695ddd0dccbc9f0bf0140b2fce3043d4a8011411
Wordpress Stackexchange Q: How to display only top level posts in loop via WP_Query? How do I set my custom loop to only show top-level posts? I have a hierarchical custom post type and the archive page shows both the parent and child posts. A: Elaborating from @Ryan's post, the key is setting post_parent=0 and post_type='page'. You can always view the SQL request of the WP_Query Object to see what arguments you need to add to get your desired results. This code works for me: <?php $args=array('post_parent' => 0, // required 'post_type' => 'page', // required 'orderby' => 'menu_order', // to display according to hierarchy 'order' => 'ASC', // to display according to hierarchy 'posts_per_page' => -1, // to display all because default is 10 ); $query = new \WP_Query( $args ); /* Uncomment to see the resulting SQL to debug echo $query->request; die(); //*/ if ( $query->have_posts() ) { while($query->have_posts()) { $query->the_post(); $post_id=get_the_ID(); $post=get_post($post_id,'ARRAY_A'); echo $post['ID'].': '.$post['post_title'].'<br>'; } }
Q: How to display only top level posts in loop via WP_Query? How do I set my custom loop to only show top-level posts? I have a hierarchical custom post type and the archive page shows both the parent and child posts. A: Elaborating from @Ryan's post, the key is setting post_parent=0 and post_type='page'. You can always view the SQL request of the WP_Query Object to see what arguments you need to add to get your desired results. This code works for me: <?php $args=array('post_parent' => 0, // required 'post_type' => 'page', // required 'orderby' => 'menu_order', // to display according to hierarchy 'order' => 'ASC', // to display according to hierarchy 'posts_per_page' => -1, // to display all because default is 10 ); $query = new \WP_Query( $args ); /* Uncomment to see the resulting SQL to debug echo $query->request; die(); //*/ if ( $query->have_posts() ) { while($query->have_posts()) { $query->the_post(); $post_id=get_the_ID(); $post=get_post($post_id,'ARRAY_A'); echo $post['ID'].': '.$post['post_title'].'<br>'; } } A: This solution is based on some code by Justin Tadlock. pre_get_posts is called before WordPress gets the posts of the main loop. Basically, you test to see if the page is the archive of the post type and make sure post_parent hasn't been set. Then you set post_parent to 0, which is the default parent of top level posts. Easy as pie. <?php //pre_get_posts filter is called before WordPress gets posts add_filter( 'pre_get_posts', 'my_get_posts' ); function my_get_posts( $query ) { //If the user is viewing the frontend, the page is an archive and post_parent is not set and post_type is the post type in question if ( ! is_admin() && is_archive() && false == $query->query_vars['post_parent'] && $query->query_vars['post_type'] === 'my_post_type') //set post_parent to 0, which is the default post_parent for top level posts $query->set( 'post_parent', 0 ); return $query; } ?> A: You can just add post_parent=0 to your query
wordpress
{ "language": "en", "length": 308, "provenance": "stackexchange_00019.jsonl.gz:413471", "question_score": "8", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29897" }
[ 0.06903076171875, 0.0033779144287109375, 0.01788330078125, -0.016448974609375, 0.0162200927734375, -0.0235137939453125, 0.0531005859375, -0.04180908203125, 0.005252838134765625, 0.028900146484375, -0.012054443359375, -0.01421356201171875, -0.014068603515625, -0.0268402099609375, -0.024322509765625, -0.028533935546875, 0.044891357421875, -0.046173095703125, 0.00763702392578125, -0.0170745849609375, -0.00415802001953125, 0.00396728515625, 0.0477294921875, 0.054443359375, 0.0162506103515625, -0.00911712646484375, 0.039398193359375, -0.0202178955078125, 0.0030231475830078125, -0.02178955078125, -0.0005192756652832031, 0.0095062255859375, 0.005931854248046875, -0.025299072265625, 0.06109619140625, 0.0018072128295898438, 0.0222015380859375, -0.006565093994140625, 0.0310211181640625, 0.006565093994140625, 0.0031528472900390625, 0.01476287841796875, -0.007801055908203125, 0.0021820068359375, -0.0435791015625, -0.00545501708984375, -0.023529052734375, 0.0010156631469726562, 0.0271453857421875, -0.0455322265625, 0.011444091796875, 0.02294921875, 0.03076171875, -0.031524658203125, -0.0101470947265625, 0.027435302734375, 0.03167724609375, -0.041961669921875, 0.0377197265625, -0.0419921875, -0.045318603515625, -0.0164031982421875, 0.05072021484375, -0.005218505859375, -0.00667572021484375, 0.01345062255859375, 0.0003006458282470703, -0.001491546630859375, -0.0265350341796875, -0.01277923583984375, 0.03607177734375, -0.0263214111328125, 0.014678955078125, 0.00024068355560302734, -0.04803466796875, -0.035675048828125, 0.02093505859375, -0.036529541015625, 0.02435302734375, -0.0249176025390625, -0.038116455078125, -0.006244659423828125, -0.070068359375, 0.002864837646484375, -0.0014753341674804688, 0.032745361328125, -0.03448486328125, -0.01088714599609375, -0.01035308837890625, 0.0066070556640625, -0.0076141357421875, 0.013763427734375, -0.0208892822265625, 0.01056671142578125, 0.00524139404296875, -0.031402587890625, 0.01442718505859375, 0.039337158203125, -0.0279541015625, 0.00275421142578125, -0.032684326171875, -0.01314544677734375, 0.005115509033203125, -0.03778076171875, 0.0380859375, 0.03485107421875, -0.00559234619140625, -0.00200653076171875, 0.0740966796875, 0.02386474609375, 0.026763916015625, 0.0897216796875, -0.028900146484375, -0.0031280517578125, -0.0302581787109375, 0.0143585205078125, -0.06756591796875, -0.005229949951171875, -0.0160369873046875, 0.01421356201171875, 0.00853729248046875, 0.032958984375, -0.006130218505859375, -0.019134521484375, 0.0095367431640625, 0.0159149169921875, -0.01323699951171875, -0.038970947265625, 0.0054168701171875, 0.0272064208984375, -0.040283203125, -0.01018524169921875, 0.08160400390625, 0.06195068359375, 0.042724609375, -0.0216827392578125, -0.0159912109375, -0.028717041015625, -0.0118408203125, -0.005268096923828125, 0.0241241455078125, -0.0280303955078125, 0.009033203125, 0.00902557373046875, -0.0361328125, 0.048980712890625, 0.02459716796875, -0.007350921630859375, -0.0240631103515625, -0.0982666015625, -0.0122833251953125, -0.03521728515625, 0.02630615234375, 0.002864837646484375, -0.0088958740234375, -0.049560546875, 0.018707275390625, -0.040191650390625, 0.018402099609375, -0.033905029296875, 0.0005011558532714844, 0.0162353515625, 0.02532958984375, -0.0167083740234375, -0.0283203125, -0.0170745849609375, -0.031890869140625, -0.00848388671875, 0.022613525390625, -0.016571044921875, 0.08074951171875, -0.029541015625, 0.0416259765625, -0.01229095458984375, -0.01442718505859375, -0.0099945068359375, -0.02825927734375, -0.01019287109375, 0.0256500244140625, -0.007049560546875, -0.0178680419921875, -0.039947509765625, -0.01259613037109375, 0.02386474609375, -0.01849365234375, 0.0285797119140625, 0.00968170166015625, 0.023895263671875, -0.0237884521484375, 0.0172576904296875, 0.0394287109375, 0.053680419921875, -0.0662841796875, 0.03778076171875, 0.0253753662109375, -0.00785064697265625, -0.045135498046875, -0.0180206298828125, -0.0108795166015625, -0.0151824951171875, -0.03955078125, 0.0091094970703125, -0.0087127685546875, 0.01251983642578125, -0.035430908203125, 0.002063751220703125, -0.019073486328125, 0.031829833984375, 0.05078125, 0.0240631103515625, -0.0006098747253417969, 0.01528167724609375, -0.014495849609375, -0.050628662109375, -0.057037353515625, 0.027374267578125, -0.0235443115234375, 0.001636505126953125, -0.0261993408203125, 0.00850677490234375, -0.0266265869140625, -0.0227203369140625, -0.02825927734375, 0.02301025390625, 0.10589599609375, -0.005413055419921875, 0.005580902099609375, -0.03265380859375, 0.09661865234375, 0.027679443359375, -0.061126708984375, -0.004093170166015625, 0.048797607421875, 0.018646240234375, -0.061187744140625, -0.01094818115234375, -0.0211639404296875, -0.033538818359375, -0.004848480224609375, 0.0653076171875, 0.01128387451171875, 0.035003662109375, -0.0141143798828125, 0.01430511474609375, 0.0364990234375, -0.04681396484375, -0.00858306884765625, 0.00992584228515625, -0.01073455810546875, 0.0248260498046875, -0.0161285400390625, 0.008270263671875, 0.0273590087890625, -0.00917816162109375, 0.0097198486328125, 0.037078857421875, 0.00833892822265625, 0.024505615234375, -0.018310546875, 0.0186309814453125, 0.005859375, -0.00034332275390625, -0.01418304443359375, -0.0004341602325439453, 0.0082855224609375, 0.04052734375, 0.035858154296875, 0.02740478515625, -0.0589599609375, 0.028564453125, 0.0160675048828125, 0.0389404296875, 0.008392333984375, -0.01275634765625, -0.0197906494140625, -0.0128631591796875, -0.01103973388671875, 0.01198577880859375, 0.00969696044921875, -0.0264129638671875, 0.006847381591796875, 0.0526123046875, 0.0249481201171875, -0.01119232177734375, -0.03009033203125, -0.040771484375, 0.00728607177734375, 0.033294677734375, -0.021240234375, -0.016510009765625, 0.0149993896484375, 0.03509521484375, -0.02587890625, 0.0268402099609375, -0.0203399658203125, -0.004405975341796875, 0.01102447509765625, -0.0623779296875, 0.0509033203125, -0.0333251953125, 0.057586669921875, 0.0626220703125, -0.0115966796875, 0.0241546630859375, -0.02398681640625, 0.01416778564453125, -0.0313720703125, 0.003757476806640625, -0.02862548828125, -0.02679443359375, -0.038543701171875, 0.00298309326171875, 0.0300140380859375, 0.07757568359375, 0.0002390146255493164, -0.027191162109375, -0.0022258758544921875, 0.0347900390625, -0.06671142578125, -0.1077880859375, 0.05706787109375, -0.08935546875, -0.0191192626953125, -0.0270843505859375, -0.05792236328125, -0.004978179931640625, -0.0020751953125, -0.013946533203125, 0.0166778564453125, -0.0208282470703125, -0.043548583984375, -0.02374267578125, -0.05999755859375, 0.004241943359375, 0.007122039794921875, 0.0059814453125, 0.0144500732421875, 0.050384521484375, 0.0210113525390625, -0.07177734375, 0.00629425048828125, 0.05352783203125, -0.037506103515625, 0.018157958984375, -0.00021505355834960938, -0.01206207275390625, -0.0106048583984375, 0.01461029052734375, -0.039947509765625, -0.01143646240234375, 0.0188446044921875, -0.0213775634765625, -0.009796142578125, 0.00635528564453125, 0.020965576171875, -0.00077056884765625, 0.006229400634765625, 0.04705810546875, 0.032928466796875, -0.0018644332885742188, -0.045623779296875, -0.059417724609375, -0.0711669921875, 0.016632080078125, 0.050537109375, 0.050872802734375, -0.05145263671875, 0.0284881591796875, 0.0066680908203125, -0.005405426025390625, 0.0119781494140625, -0.033905029296875, 0.051544189453125, 0.01528167724609375, 0.021331787109375, -0.01172637939453125, 0.045196533203125, -0.01270294189453125, -0.0178680419921875, 0.01296234130859375, 0.0086212158203125, 0.00762176513671875, -0.030364990234375, -0.006557464599609375, -0.020416259765625, 0.0357666015625, 0.01181793212890625, 0.04119873046875, -0.0087738037109375, -0.03643798828125, -0.0008955001831054688, 0.07177734375, -0.05194091796875, 0.0025234222412109375, -0.0418701171875, -0.018280029296875, 0.0111846923828125, -0.034912109375, -0.059356689453125, -0.0035991668701171875, -0.049072265625, 0.0086212158203125, -0.0098876953125, -0.0013418197631835938, -0.006847381591796875, 0.0073699951171875, -0.031097412109375, -0.03094482421875, 0.033172607421875, -0.034149169921875, 0.002899169921875, 0.02691650390625, -0.0180816650390625, 0.0081939697265625, -0.0312347412109375, -0.01332855224609375, -0.11669921875, -0.03070068359375, 0.01477813720703125, 0.050048828125, -0.0240631103515625, -0.01470947265625, -0.022735595703125, 0.06304931640625, 0.0025615692138671875, 0.01678466796875, -0.00890350341796875, 0.01433563232421875, -0.0260162353515625, -0.0310821533203125, -0.0227813720703125, -0.03167724609375, -0.043914794921875, -0.039215087890625, 0.0174407958984375, 0.000888824462890625, -0.0281982421875, -0.0289306640625, -0.027740478515625, 0.024993896484375, -0.08489990234375, -0.04071044921875, -0.0440673828125, -0.002399444580078125, -0.0230865478515625, -0.007602691650390625, -0.0594482421875, -0.0982666015625, 0.03179931640625, 0.027984619140625, -0.03350830078125, 0.0008878707885742188, 0.055084228515625, 0.016448974609375, -0.032562255859375, -0.07843017578125, -0.02886962890625, -0.006778717041015625, -0.03875732421875, 0.06597900390625, 0.003978729248046875, 0.01117706298828125, 0.06378173828125, -0.0379638671875, 0.0264129638671875, 0.0081329345703125, 0.034515380859375, 0.0014286041259765625, -0.0259246826171875, 0.03997802734375, -0.00936126708984375, -0.04254150390625, 0.0196380615234375, -0.01062774658203125, -0.02569580078125, -0.006038665771484375, 0.049224853515625, -0.00966644287109375, 0.0219879150390625, -0.04986572265625, -0.042999267578125, 0.0181427001953125, -0.0008358955383300781, 0.0159149169921875, 0.0135040283203125, 0.0142059326171875, 0.01336669921875, 0.00418853759765625, 0.013031005859375, 0.03228759765625, 0.06549072265625, 0.003627777099609375, 0.043426513671875, 0.020263671875, -0.000827789306640625, -0.02471923828125, -0.00848388671875, 0.06561279296875, -0.0038661956787109375, -0.06072998046875, 0.0199737548828125, -0.006252288818359375, 0.040252685546875, 0.026824951171875, 0.01953125, 0.0306396484375, 0.0034732818603515625, -0.01544952392578125, -0.02978515625, -0.01096343994140625, 0.004070281982421875, -0.0340576171875, 0.020050048828125, 0.0289459228515625, -0.010772705078125, -0.0186920166015625, 0.0709228515625, 0.046661376953125, 0.007843017578125, -0.041900634765625, -0.018646240234375, 0.0150909423828125, 0.01245880126953125, 0.01546478271484375, 0.0230712890625, 0.005767822265625, 0.00284576416015625, 0.060516357421875, -0.049896240234375, -0.01715087890625, 0.032073974609375, 0.0557861328125, 0.0228729248046875, -0.01519775390625, -0.0124053955078125, -0.026214599609375, -0.01534271240234375, 0.04339599609375, 0.006710052490234375, -0.0211181640625, -0.041015625, -0.031036376953125, 0.038330078125, 0.0031681060791015625, -0.0146331787109375, 0.0241851806640625, -0.0278167724609375, 0.0192718505859375, -0.006252288818359375, -0.0311279296875, 0.0303497314453125, 0.034271240234375, -0.03955078125, -0.0223388671875, 0.00783538818359375, -0.0236968994140625, -0.01395416259765625, -0.0256500244140625, -0.023406982421875, 0.02642822265625, -0.0002923011779785156, 0.059478759765625, -0.036590576171875, -0.0533447265625, 0.0023899078369140625, -0.0018520355224609375, 0.080078125, 0.051727294921875, -0.07177734375, 0.0223541259765625, -0.055877685546875, -0.00006377696990966797, -0.0006732940673828125, -0.037750244140625, -0.0555419921875, -0.0185699462890625, -0.0001404285430908203, 0.0198822021484375, -0.0017766952514648438, 0.00347137451171875, -0.030059814453125, 0.01097869873046875, -0.0015344619750976562, 0.0396728515625, -0.01479339599609375, 0.102783203125, -0.050140380859375, 0.03619384765625, -0.0027256011962890625, 0.037445068359375, -0.0222625732421875, 0.00785064697265625, 0.0207366943359375, -0.0178070068359375, -0.0294342041015625, 0.002101898193359375, -0.0224456787109375, -0.048736572265625, -0.011444091796875, -0.01053619384765625, 0.03582763671875, -0.004032135009765625, 0.0177459716796875, -0.013671875, -0.037506103515625, -0.033477783203125, -0.005588531494140625, 0.0298004150390625, -0.022003173828125, -0.00948333740234375, 0.027191162109375, -0.023773193359375, 0.01079559326171875, 0.0129241943359375, 0.0172576904296875, -0.00997161865234375, -0.047210693359375, 0.04638671875, 0.057098388671875, 0.01375579833984375, 0.045257568359375, 0.006771087646484375, 0.0207672119140625, 0.0085906982421875, 0.0004467964172363281, 0.0091552734375, -0.00775909423828125, 0.057159423828125, -0.004116058349609375, -0.007381439208984375, 0.0275421142578125, -0.0308990478515625, -0.021240234375, -0.0120697021484375, 0.0198974609375, -0.0093994140625, 0.0019969940185546875, 0.0179443359375, -0.0179901123046875, -0.032440185546875, 0.007747650146484375, 0.022552490234375, -0.005626678466796875, -0.0032444000244140625, 0.0174560546875, -0.01538848876953125, 0.00183868408203125, -0.01003265380859375, 0.011810302734375, -0.027679443359375, 0.07763671875, 0.0203857421875, 0.007755279541015625, -0.0101776123046875, 0.00011283159255981445, 0.011444091796875, -0.0190887451171875, 0.006465911865234375, -0.038848876953125, 0.0015783309936523438, -0.07061767578125, -0.01007080078125, -0.0284881591796875, 0.0008993148803710938, 0.053497314453125, 0.0269622802734375, -0.01458740234375, 0.060821533203125, -0.0056610107421875, 0.0377197265625, 0.0204315185546875, -0.0399169921875, -0.050872802734375, -0.031524658203125, -0.01053619384765625, 0.032196044921875, -0.057464599609375, 0.027740478515625, -0.0159759521484375, -0.002933502197265625, -0.01126861572265625, -0.00817108154296875, 0.0653076171875, -0.0325927734375, -0.0258331298828125, 0.0177764892578125, 0.0250396728515625, -0.01543426513671875, -0.0194244384765625, 0.0556640625, -0.044097900390625, -0.00875091552734375, 0.0195159912109375, 0.0180816650390625, -0.044647216796875, -0.0126800537109375, -0.0264892578125, 0.036285400390625, -0.0265350341796875, -0.003986358642578125, 0.022613525390625, 0.0174560546875, -0.0039825439453125, 0.0159759521484375, -0.0272979736328125, 0.06298828125, 0.0380859375, 0.0295867919921875, -0.0552978515625, -0.0217132568359375, 0.00260162353515625, 0.0457763671875, 0.0253753662109375, 0.0002694129943847656, -0.032440185546875, -0.0141143798828125, 0.032806396484375, 0.042877197265625, 0.0120849609375, 0.0309906005859375, -0.0125274658203125, 0.050872802734375, 0.05084228515625, -0.041748046875, 0.03173828125, 0.0078582763671875, -0.0258331298828125, 0.0272674560546875, 0.0253448486328125, 0.02325439453125, 0.028228759765625, 0.0034389495849609375, -0.061981201171875, 0.018402099609375, 0.04443359375, -0.0110321044921875, 0.0021495819091796875, 0.045379638671875, 0.0457763671875, -0.0740966796875, -0.06365966796875, -0.022125244140625, 0.029876708984375, 0.0146331787109375, 0.00244140625, 0.0164794921875, 0.021331787109375, 0.0160064697265625, -0.0079498291015625, 0.016082763671875, 0.023895263671875, -0.03369140625, 0.0216522216796875, 0.03582763671875, 0.03253173828125, -0.039703369140625, 0.00598907470703125, 0.03466796875, 0.047271728515625, -0.0386962890625, -0.053863525390625, 0.0169830322265625, -0.0032367706298828125, -0.01236724853515625, 0.0145263671875, 0.01245880126953125, 0.041900634765625, 0.070068359375, -0.05462646484375, -0.013427734375, 0.0286102294921875, 0.0259552001953125, -0.005107879638671875, -0.035003662109375, -0.0059356689453125, -0.031768798828125, 0.0017070770263671875, -0.046173095703125, 0.024810791015625, 0.0322265625, 0.018829345703125, 0.0218353271484375, -0.0428466796875, -0.01134490966796875, -0.00656890869140625, -0.0046234130859375, -0.0330810546875, 0.0219268798828125, -0.0340576171875, -0.0175628662109375, -0.02252197265625, 0.044830322265625, 0.0303497314453125, -0.0026645660400390625, 0.0416259765625, 0.0182342529296875, -0.0338134765625, 0.00362396240234375, 0.054840087890625, -0.01168060302734375, -0.0180511474609375, 0.0063934326171875, -0.019134521484375, 0.0208740234375, -0.0153656005859375, 0.0158233642578125, 0.0364990234375, 0.0211029052734375, 0.0019989013671875, 0.037506103515625, 0.004608154296875, -0.0020198822021484375, 0.0286407470703125, 0.01462554931640625, 0.044708251953125, 0.0285186767578125, -0.0701904296875, -0.0212554931640625, -0.00930023193359375, -0.022613525390625, 0.0294189453125, 0.031646728515625, 0.00980377197265625, -0.00960540771484375, 0.0119171142578125, -0.0160980224609375, 0.0108489990234375, 0.011474609375, 0.00772857666015625, 0.0296630859375, 0.014984130859375, 0.014434814453125, -0.021728515625, -0.0010480880737304688, -0.0034351348876953125, 0.0025272369384765625, 0.0233154296875, 0.007472991943359375, 0.03271484375, 0.01363372802734375, -0.02264404296875, 0.05926513671875, -0.06378173828125, -0.0186004638671875, 0.047210693359375, -0.027587890625, 0.00812530517578125, -0.0010242462158203125, -0.051300048828125, 0.00872802734375, 0.0408935546875, -0.01861572265625, 0.0247039794921875, -0.0274810791015625, 0.02008056640625, -0.047515869140625, 0.0096435546875, 0.0011835098266601562, 0.0093536376953125, -0.02374267578125, -0.0242767333984375, 0.0775146484375, 0.07098388671875, -0.01317596435546875, 0.0350341796875, -0.0212860107421875, -0.04534912109375, 0.046142578125, -0.063232421875, 0.051177978515625, 0.03912353515625, -0.0135955810546875, 0.004150390625, -0.0002092123031616211, -0.020294189453125, 0.032257080078125, 0.00911712646484375, -0.0016460418701171875, 0.0076446533203125, -0.0307464599609375, -0.0259552001953125, 0.01477813720703125, 0.031280517578125, -0.0098724365234375, 0.002593994140625, 0.0098724365234375, -0.031768798828125, -0.02557373046875, -0.002231597900390625, -0.0251312255859375, -0.0243072509765625, 0.0006084442138671875, 0.01013946533203125, 0.004528045654296875, -0.0227203369140625, -0.0253448486328125, 0.01042938232421875, 0.01507568359375, 0.011505126953125, -0.054229736328125, 0.033294677734375, -0.0179290771484375, 0.0260467529296875, -0.0309906005859375, 0.020751953125, -0.0164031982421875, 0.0013799667358398438, -0.0421142578125, 0.01190185546875, -0.037994384765625, 0.00531768798828125, -0.01016998291015625, 0.00684356689453125, 0.01259613037109375, -0.009735107421875, -0.00984954833984375, 0.0022525787353515625, -0.0042877197265625, 0.0477294921875, 0.029388427734375, -0.006771087646484375, -0.0106353759765625, 0.01194000244140625, -0.0239410400390625, -0.04058837890625, 0.042694091796875, -0.075439453125, -0.050384521484375, -0.00545501708984375, 0.0195159912109375, 0.04229736328125, -0.0081634521484375, -0.006977081298828125, 0.0792236328125, -0.0144805908203125, -0.006420135498046875, 0.00907135009765625, 0.0297393798828125, -0.01073455810546875, 0.00881195068359375, 0.027923583984375, -0.038299560546875, 0.0159912109375, -0.00420379638671875, 0.00745391845703125, 0.0082855224609375, 0.020965576171875, 0.0142669677734375, -0.045867919921875, 0.01027679443359375, -0.0003743171691894531, -0.005279541015625, 0.0112152099609375, 0.007595062255859375, 0.0157928466796875, 0.0181884765625, -0.047454833984375, 0.048583984375, -0.01245880126953125, 0.027252197265625, 0.01812744140625, -0.0026645660400390625, -0.050384521484375, -0.036590576171875, 0.0273284912109375, 0.038665771484375, 0.0225067138671875, -0.008514404296875, -0.038818359375, -0.038726806640625, -0.04193115234375, 0.015655517578125, 0.033172607421875, -0.06048583984375, 0.0205841064453125, 0.02587890625, -0.01335906982421875, -0.0025081634521484375, -0.0192413330078125, -0.03851318359375, -0.030548095703125, -0.043853759765625, -0.0008788108825683594, -0.031829833984375, 0.0301361083984375, -0.018707275390625, -0.00637054443359375, -0.0295257568359375, -0.0257568359375, 0.003986358642578125, -0.037445068359375, -0.0264892578125, -0.0283050537109375, 0.0211639404296875, -0.01549530029296875, -0.000823974609375, 0.00251007080078125, 0.01030731201171875, 0.009796142578125, 0.01239776611328125, -0.040740966796875, 0.0093536376953125, 0.023040771484375, -0.01123809814453125, -0.0268402099609375, 0.032318115234375, 0.0267333984375, 0.0513916015625, 0.0112152099609375, 0.10137939453125, 0.01421356201171875, 0.045562744140625, -0.01216888427734375, -0.01523590087890625, -0.009521484375, -0.032623291015625, 0.0025768280029296875, -0.015777587890625, -0.0202178955078125, -0.022491455078125, 0.005687713623046875, 0.0204010009765625, -0.031402587890625, 0.011627197265625 ]
16154bda3b49302a68dc5454570d79e01258e081
Wordpress Stackexchange Q: Page template query with WP_Query I would like to query only pages with a certain page template with WP_Query or a function that would return the post object, but I can't find any information about that on the official codex. A: UPDATE: This is now a decade old answer, meant for a very old version of WordPress. I can see the comments informing me that this might not work for newer WP versions, please do refer to the other answers below if mine is not working for your version of WP. For WP 2.*, this will work. Try this... Assuming the template name is 'my_template.php', $query = new WP_Query( array( 'post_type' => 'page', 'meta_key' => '_wp_page_template', 'meta_value' => 'my_template.php' ) ); //Down goes the loop... You can also use get_posts, or modify query posts to get the job done. Both these functions use the same parameters as WP_Query.
Q: Page template query with WP_Query I would like to query only pages with a certain page template with WP_Query or a function that would return the post object, but I can't find any information about that on the official codex. A: UPDATE: This is now a decade old answer, meant for a very old version of WordPress. I can see the comments informing me that this might not work for newer WP versions, please do refer to the other answers below if mine is not working for your version of WP. For WP 2.*, this will work. Try this... Assuming the template name is 'my_template.php', $query = new WP_Query( array( 'post_type' => 'page', 'meta_key' => '_wp_page_template', 'meta_value' => 'my_template.php' ) ); //Down goes the loop... You can also use get_posts, or modify query posts to get the job done. Both these functions use the same parameters as WP_Query. A: Incorrect: as of wordpress 3 you need something akin to: $args = array( 'post_type' => 'page', 'meta_query' => array( array( 'key' => '_wp_page_template', 'value' => 'my_template.php' ) ) ); A: The page template is stored as a meta value with key "_wp_page_template". So all you need is to use that key in a meta query parameter. For examples See http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query#Query_based_on_Custom_Field_and_Sorted_by_Value and http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters A: If you have the template inside another folder: $args = array( 'post_type' => 'page', //it is a Page right? 'post_status' => 'publish', 'meta_query' => array( array( 'key' => '_wp_page_template', 'value' => 'page-templates/template-name.php', // folder + template name as stored in the dB ) ) ); A: If anyone's attempt incorrectly results in zero posts, probably the template name is wrong. I tried the php file name and my template name and they didn't work. Then I decided to inspect the templates select box where we select the template on the page editor. I found this: <option value="templates-map/component-tutorial-1.php" selected="selected">Tutorial -1</option> I used templates-map/component-tutorial-1.php and it worked.
wordpress
{ "language": "en", "length": 318, "provenance": "stackexchange_00019.jsonl.gz:413478", "question_score": "20", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29918" }
[ -0.0016336441040039062, 0.000629425048828125, 0.0042724609375, 0.017791748046875, -0.00513458251953125, -0.01947021484375, 0.03387451171875, -0.03631591796875, 0.01629638671875, 0.007335662841796875, -0.0413818359375, -0.006122589111328125, -0.01467132568359375, -0.0173492431640625, 0.0078277587890625, -0.03167724609375, 0.031341552734375, -0.043182373046875, 0.01047515869140625, -0.0257415771484375, 0.041717529296875, -0.0024356842041015625, 0.020111083984375, 0.0489501953125, 0.0303802490234375, -0.024505615234375, 0.045806884765625, 0.0023326873779296875, 0.02520751953125, -0.0022411346435546875, 0.0258941650390625, -0.01459503173828125, 0.012664794921875, 0.0164337158203125, -0.0232391357421875, -0.0298309326171875, -0.01287841796875, 0.00971221923828125, 0.0034389495849609375, 0.00859832763671875, 0.00669097900390625, 0.00457000732421875, -0.0289764404296875, 0.009674072265625, -0.0197906494140625, -0.024200439453125, 0.007320404052734375, -0.04852294921875, 0.01617431640625, 0.011322021484375, -0.007564544677734375, 0.002002716064453125, -0.00399017333984375, 0.00467681884765625, -0.005558013916015625, -0.00202178955078125, 0.0179595947265625, -0.0164642333984375, 0.024261474609375, -0.050018310546875, -0.036376953125, -0.003299713134765625, 0.0221099853515625, 0.015533447265625, -0.01629638671875, 0.0033016204833984375, 0.018218994140625, 0.0268707275390625, -0.0233612060546875, -0.0256195068359375, 0.02105712890625, 0.00592803955078125, -0.0140533447265625, -0.016021728515625, 0.00585174560546875, -0.02001953125, 0.0148468017578125, -0.018890380859375, 0.0006470680236816406, 0.03839111328125, -0.003185272216796875, -0.0299835205078125, -0.07598876953125, -0.0081787109375, 0.026580810546875, 0.02606201171875, -0.0038471221923828125, -0.0111541748046875, -0.044158935546875, -0.019073486328125, -0.0261993408203125, -0.004909515380859375, -0.0233612060546875, -0.043212890625, -0.03363037109375, -0.021759033203125, -0.0016040802001953125, 0.032684326171875, -0.0134735107421875, 0.037872314453125, -0.038177490234375, -0.022552490234375, 0.034332275390625, -0.0401611328125, 0.03741455078125, 0.04632568359375, 0.0018434524536132812, 0.0241546630859375, 0.066650390625, 0.0189056396484375, 0.025390625, 0.04327392578125, -0.027801513671875, 0.0037288665771484375, -0.046783447265625, 0.033416748046875, -0.0295867919921875, -0.057342529296875, -0.002643585205078125, -0.023468017578125, 0.025482177734375, 0.035003662109375, 0.059814453125, -0.056671142578125, -0.005344390869140625, 0.003551483154296875, -0.0258941650390625, -0.0933837890625, 0.0286102294921875, 0.01373291015625, -0.0236358642578125, 0.0008797645568847656, 0.02740478515625, 0.00986480712890625, -0.01107025146484375, -0.0166778564453125, 0.0002397298812866211, -0.01497650146484375, 0.017181396484375, -0.0219879150390625, 0.02130126953125, -0.0174560546875, -0.005542755126953125, 0.01221466064453125, -0.006252288818359375, -0.0024929046630859375, 0.0196075439453125, 0.045013427734375, -0.0133209228515625, -0.0178375244140625, 0.006137847900390625, 0.0173797607421875, -0.0032787322998046875, 0.0246429443359375, 0.00018644332885742188, -0.0220489501953125, 0.0081024169921875, -0.034423828125, 0.024444580078125, -0.0235137939453125, 0.007312774658203125, 0.0185546875, 0.031280517578125, -0.01497650146484375, -0.012969970703125, -0.029388427734375, -0.02349853515625, -0.0131683349609375, 0.00861358642578125, 0.037017822265625, 0.0084991455078125, -0.035980224609375, 0.033599853515625, 0.01004791259765625, -0.026763916015625, 0.0008287429809570312, 0.0184173583984375, 0.01129913330078125, -0.015045166015625, 0.02886962890625, -0.0107269287109375, -0.03271484375, 0.0146026611328125, -0.002716064453125, -0.06036376953125, 0.0264434814453125, 0.0283966064453125, 0.0272216796875, -0.0210723876953125, 0.02215576171875, 0.08941650390625, 0.052490234375, -0.050262451171875, 0.061492919921875, 0.001125335693359375, -0.033660888671875, -0.0078277587890625, 0.007015228271484375, -0.0154876708984375, -0.0399169921875, 0.037994384765625, 0.010894775390625, -0.006656646728515625, 0.01363372802734375, -0.05908203125, -0.0017080307006835938, -0.00865936279296875, 0.00870513916015625, 0.006885528564453125, 0.02197265625, 0.0160064697265625, -0.01453399658203125, -0.035308837890625, -0.0009493827819824219, -0.04498291015625, -0.0087432861328125, 0.00543212890625, -0.00800323486328125, -0.0058441162109375, 0.0007123947143554688, 0.00394439697265625, -0.03924560546875, -0.0188446044921875, 0.04779052734375, 0.044647216796875, -0.005191802978515625, -0.0242156982421875, -0.0087432861328125, 0.00897216796875, 0.0240325927734375, -0.0814208984375, 0.034942626953125, -0.0155792236328125, 0.0285797119140625, -0.0141143798828125, 0.019287109375, 0.021697998046875, 0.0286865234375, 0.009124755859375, 0.0014944076538085938, 0.0263671875, 0.0244140625, -0.004405975341796875, -0.0014791488647460938, 0.0364990234375, -0.042236328125, 0.0006318092346191406, -0.0014448165893554688, 0.016326904296875, 0.02972412109375, 0.028350830078125, -0.0174407958984375, 0.01305389404296875, -0.0222625732421875, 0.012786865234375, 0.01263427734375, 0.01505279541015625, 0.0782470703125, -0.032196044921875, 0.0256500244140625, -0.041839599609375, 0.024505615234375, 0.03753662109375, -0.020843505859375, 0.037506103515625, 0.0084381103515625, 0.03778076171875, 0.012481689453125, -0.00717926025390625, 0.0010557174682617188, -0.0011224746704101562, -0.02996826171875, 0.01259613037109375, 0.038543701171875, -0.031463623046875, 0.045501708984375, -0.0251617431640625, -0.0107269287109375, 0.019012451171875, 0.02447509765625, 0.0143585205078125, 0.0667724609375, -0.0262603759765625, -0.00927734375, -0.039459228515625, -0.042572021484375, -0.00675201416015625, 0.058197021484375, 0.0163116455078125, 0.006084442138671875, 0.022430419921875, 0.046630859375, -0.0281829833984375, 0.064453125, -0.0132293701171875, -0.01043701171875, 0.035064697265625, -0.073486328125, 0.0489501953125, -0.05078125, 0.0452880859375, 0.062103271484375, -0.0172882080078125, 0.00856781005859375, -0.00263214111328125, -0.002811431884765625, 0.0147857666015625, 0.01401519775390625, -0.006587982177734375, -0.023193359375, -0.0278778076171875, 0.01020050048828125, 0.0265960693359375, 0.05029296875, -0.0025348663330078125, -0.03509521484375, -0.007175445556640625, 0.0227203369140625, -0.08624267578125, -0.09521484375, 0.0179290771484375, -0.0360107421875, -0.03515625, -0.0208282470703125, -0.01934814453125, 0.021575927734375, -0.037994384765625, -0.0171661376953125, 0.0117645263671875, -0.034332275390625, -0.09771728515625, -0.056121826171875, -0.08544921875, 0.0129241943359375, -0.01177978515625, 0.002452850341796875, 0.00518798828125, 0.07080078125, 0.0125732421875, -0.065673828125, 0.012298583984375, 0.0394287109375, -0.0330810546875, 0.0004968643188476562, 0.01715087890625, -0.0177459716796875, -0.005519866943359375, -0.0025157928466796875, 0.0028171539306640625, 0.0161590576171875, -0.00852203369140625, -0.006748199462890625, -0.0008158683776855469, -0.01061248779296875, 0.0243377685546875, -0.0047149658203125, -0.0123291015625, -0.016357421875, 0.0025043487548828125, -0.04656982421875, -0.07855224609375, -0.026519775390625, -0.078125, 0.08953857421875, 0.051483154296875, 0.019012451171875, -0.005466461181640625, 0.0377197265625, 0.0274810791015625, 0.00029158592224121094, -0.01465606689453125, -0.023712158203125, 0.048309326171875, 0.0252227783203125, 0.05450439453125, -0.0020656585693359375, 0.003265380859375, -0.0278778076171875, 0.016998291015625, 0.00543975830078125, 0.0033855438232421875, 0.0055389404296875, -0.01324462890625, -0.019012451171875, -0.045440673828125, 0.06915283203125, 0.022613525390625, 0.01580810546875, -0.038726806640625, -0.047393798828125, -0.0265350341796875, 0.09722900390625, 0.01056671142578125, -0.048309326171875, -0.03851318359375, -0.0006279945373535156, 0.0020160675048828125, -0.0369873046875, 0.044586181640625, -0.0096435546875, -0.04083251953125, -0.01473236083984375, -0.0271453857421875, -0.0283355712890625, -0.020721435546875, -0.01666259765625, -0.033721923828125, -0.0283355712890625, 0.030517578125, -0.00782012939453125, 0.002471923828125, 0.0521240234375, -0.027099609375, 0.0251312255859375, -0.019927978515625, -0.016265869140625, -0.0631103515625, -0.0156097412109375, 0.0223388671875, 0.0423583984375, -0.0012407302856445312, -0.041168212890625, -0.016632080078125, 0.025726318359375, 0.017852783203125, 0.05010986328125, -0.01654052734375, -0.0005888938903808594, -0.014129638671875, -0.01471710205078125, 0.017181396484375, -0.034759521484375, 0.004138946533203125, -0.0006051063537597656, -0.00554656982421875, 0.0114898681640625, -0.052459716796875, -0.01262664794921875, -0.034576416015625, -0.01995849609375, -0.027557373046875, -0.0084075927734375, 0.0164642333984375, 0.0323486328125, 0.0006422996520996094, 0.00005310773849487305, -0.029632568359375, -0.02435302734375, 0.058837890625, 0.064453125, -0.0290985107421875, -0.003650665283203125, 0.050933837890625, 0.018524169921875, -0.063720703125, -0.07354736328125, 0.0028018951416015625, 0.0182342529296875, 0.00376129150390625, 0.04168701171875, -0.00036215782165527344, -0.01806640625, 0.056488037109375, -0.00921630859375, -0.01983642578125, -0.0303802490234375, 0.06329345703125, -0.0135345458984375, -0.042327880859375, 0.032806396484375, -0.05670166015625, 0.0226898193359375, 0.06524658203125, -0.00019347667694091797, -0.0718994140625, 0.0016450881958007812, 0.0711669921875, -0.014068603515625, 0.0217742919921875, -0.0526123046875, -0.0266571044921875, -0.00843048095703125, 0.0296630859375, 0.0061798095703125, 0.0305328369140625, -0.013641357421875, 0.00421142578125, -0.00023698806762695312, 0.0100250244140625, 0.04388427734375, 0.07806396484375, -0.02606201171875, 0.03704833984375, 0.02044677734375, -0.021240234375, -0.0145416259765625, 0.009490966796875, 0.01325225830078125, -0.02117919921875, -0.050079345703125, 0.0000699758529663086, -0.012969970703125, -0.00428009033203125, 0.03564453125, 0.0190887451171875, 0.060272216796875, 0.0191192626953125, -0.0218048095703125, -0.032073974609375, 0.00553131103515625, -0.03436279296875, -0.0582275390625, -0.00823211669921875, 0.017364501953125, -0.01788330078125, 0.003955841064453125, 0.049530029296875, -0.0330810546875, 0.0325927734375, 0.0014781951904296875, 0.002910614013671875, -0.0172271728515625, 0.0338134765625, 0.00714111328125, 0.0005125999450683594, 0.0126953125, -0.0003840923309326172, 0.021026611328125, -0.01551055908203125, -0.013397216796875, 0.00885772705078125, 0.0108642578125, -0.029937744140625, -0.0134124755859375, 0.023681640625, -0.004596710205078125, 0.0121612548828125, 0.0015707015991210938, -0.007457733154296875, 0.002628326416015625, -0.0232391357421875, -0.00557708740234375, 0.03167724609375, -0.00820159912109375, -0.00794219970703125, 0.02838134765625, -0.0224609375, 0.023590087890625, 0.015472412109375, -0.00804901123046875, -0.0072174072265625, -0.0179595947265625, -0.033599853515625, -0.0175323486328125, -0.01184844970703125, -0.0203857421875, -0.021392822265625, -0.004680633544921875, -0.008453369140625, 0.01171112060546875, -0.0255584716796875, 0.0428466796875, -0.032958984375, -0.00984954833984375, 0.00574493408203125, 0.00496673583984375, 0.042572021484375, 0.021575927734375, -0.0204010009765625, -0.00885009765625, -0.056671142578125, -0.03082275390625, -0.0096588134765625, -0.03680419921875, -0.0269927978515625, -0.007427215576171875, -0.0227508544921875, 0.030731201171875, -0.0072784423828125, 0.0009260177612304688, -0.0147857666015625, 0.0028171539306640625, -0.0010652542114257812, 0.0264434814453125, -0.0220489501953125, 0.110107421875, -0.03216552734375, 0.0601806640625, -0.008575439453125, 0.023345947265625, -0.034271240234375, 0.01161956787109375, 0.014312744140625, -0.044586181640625, -0.0252532958984375, -0.0153350830078125, -0.0421142578125, 0.014373779296875, 0.036590576171875, 0.00199127197265625, 0.0187835693359375, -0.0439453125, -0.0082244873046875, -0.0242767333984375, 0.07415771484375, -0.06878662109375, -0.01715087890625, 0.0499267578125, 0.00307464599609375, 0.019256591796875, -0.009429931640625, 0.0014438629150390625, -0.004642486572265625, 0.004856109619140625, -0.000888824462890625, -0.01250457763671875, -0.0246429443359375, 0.047882080078125, 0.03094482421875, 0.00948333740234375, 0.02447509765625, -0.02093505859375, 0.0130767822265625, -0.01056671142578125, 0.0169830322265625, -0.03778076171875, -0.01041412353515625, 0.0496826171875, 0.00585174560546875, -0.0230712890625, 0.040435791015625, -0.03125, 0.0237884521484375, 0.04736328125, 0.0450439453125, -0.061065673828125, -0.00240325927734375, 0.029449462890625, -0.010406494140625, -0.004314422607421875, -0.009918212890625, 0.006427764892578125, -0.033843994140625, 0.038665771484375, 0.0288848876953125, 0.0020160675048828125, 0.0186920166015625, -0.00235748291015625, -0.0306243896484375, -0.01241302490234375, 0.05523681640625, 0.03375244140625, 0.0142364501953125, 0.0242919921875, -0.00054168701171875, 0.019775390625, -0.0247039794921875, 0.028106689453125, -0.0187225341796875, 0.0086822509765625, -0.038238525390625, 0.0268096923828125, -0.0316162109375, 0.00798797607421875, 0.0185699462890625, 0.05462646484375, 0.0181884765625, 0.07916259765625, 0.00499725341796875, 0.013214111328125, 0.051849365234375, -0.0206756591796875, -0.04840087890625, -0.0245513916015625, 0.01514434814453125, 0.017608642578125, -0.040191650390625, 0.031219482421875, -0.032501220703125, -0.01971435546875, -0.0026149749755859375, -0.00382232666015625, 0.06964111328125, -0.042022705078125, -0.00769805908203125, 0.0182037353515625, 0.023681640625, -0.0038394927978515625, 0.0153045654296875, 0.00220489501953125, -0.0044097900390625, 0.00836944580078125, 0.0088958740234375, -0.00389862060546875, -0.0087890625, 0.01367950439453125, -0.07000732421875, 0.06231689453125, 0.051025390625, 0.038482666015625, 0.01641845703125, 0.009765625, -0.0521240234375, -0.005245208740234375, -0.039703369140625, 0.0611572265625, 0.06500244140625, 0.07293701171875, -0.033233642578125, -0.01507568359375, 0.027069091796875, 0.05462646484375, 0.05352783203125, 0.0051727294921875, 0.0004172325134277344, -0.0104827880859375, 0.0491943359375, 0.0545654296875, -0.00019443035125732422, 0.0161285400390625, 0.0034160614013671875, 0.0406494140625, 0.044464111328125, -0.0660400390625, 0.01450347900390625, -0.0252838134765625, 0.003505706787109375, 0.0227203369140625, 0.00363922119140625, 0.01263427734375, 0.0027904510498046875, 0.00952911376953125, -0.03118896484375, -0.01038360595703125, 0.0291900634765625, -0.038482666015625, 0.022918701171875, 0.016571044921875, 0.042236328125, -0.06927490234375, -0.044830322265625, -0.019073486328125, 0.0318603515625, 0.029571533203125, 0.0017108917236328125, 0.0030956268310546875, 0.016571044921875, 0.056488037109375, -0.045135498046875, -0.0107879638671875, 0.01300811767578125, -0.0215911865234375, 0.06536865234375, -0.001918792724609375, 0.0252838134765625, -0.0772705078125, 0.020355224609375, 0.0255126953125, 0.06988525390625, -0.0540771484375, -0.033355712890625, 0.0182647705078125, -0.0005617141723632812, -0.0195159912109375, 0.008148193359375, 0.0031719207763671875, 0.05120849609375, 0.053466796875, -0.026702880859375, -0.006267547607421875, 0.0080108642578125, -0.01470947265625, -0.026763916015625, -0.02099609375, 0.029937744140625, 0.020721435546875, -0.033233642578125, 0.00749969482421875, 0.0394287109375, 0.054046630859375, -0.0026569366455078125, 0.037200927734375, -0.035400390625, -0.020599365234375, -0.0188140869140625, 0.02117919921875, -0.0350341796875, 0.0227508544921875, -0.0287322998046875, -0.0305633544921875, -0.0195159912109375, 0.0313720703125, 0.022613525390625, 0.0009469985961914062, 0.0209197998046875, 0.00798797607421875, -0.0160369873046875, 0.0015649795532226562, 0.0203857421875, -0.03118896484375, 0.026824951171875, -0.0243988037109375, -0.007659912109375, -0.00797271728515625, -0.032501220703125, 0.002521514892578125, 0.01155853271484375, 0.016754150390625, 0.00521087646484375, 0.0151519775390625, 0.006381988525390625, 0.0036678314208984375, 0.055999755859375, 0.0175628662109375, 0.02056884765625, 0.039825439453125, -0.08270263671875, -0.0181884765625, -0.03594970703125, -0.055633544921875, 0.0469970703125, 0.056915283203125, -0.01800537109375, 0.0024394989013671875, 0.03271484375, 0.017425537109375, -0.003910064697265625, -0.019927978515625, 0.0235595703125, -0.0221405029296875, 0.017425537109375, 0.0220184326171875, -0.04815673828125, -0.032958984375, -0.00887298583984375, 0.029998779296875, -0.0036830902099609375, 0.073486328125, -0.0040283203125, 0.00634002685546875, 0.007190704345703125, 0.0259246826171875, -0.0026226043701171875, -0.01409912109375, 0.06744384765625, 0.004405975341796875, 0.00313568115234375, -0.026519775390625, -0.027740478515625, 0.0264739990234375, 0.046356201171875, 0.0065155029296875, 0.01169586181640625, -0.011749267578125, 0.0017957687377929688, -0.01690673828125, 0.0158233642578125, -0.0218658447265625, 0.0189666748046875, 0.0146331787109375, -0.0225982666015625, 0.03094482421875, 0.00804901123046875, 0.01273345947265625, 0.04766845703125, -0.029998779296875, -0.05157470703125, 0.03216552734375, -0.07525634765625, 0.035736083984375, 0.042694091796875, 0.01204681396484375, 0.00247955322265625, 0.006633758544921875, -0.02349853515625, 0.0115814208984375, 0.0031795501708984375, -0.00498199462890625, 0.0071258544921875, -0.02362060546875, -0.0308837890625, -0.06121826171875, -0.0127105712890625, -0.02423095703125, -0.03045654296875, -0.015411376953125, -0.0061187744140625, -0.0225677490234375, -0.017791748046875, -0.03369140625, -0.0201873779296875, -0.0019426345825195312, 0.01275634765625, 0.01617431640625, -0.037445068359375, -0.0260467529296875, -0.024200439453125, -0.0085906982421875, 0.0007843971252441406, -0.0212249755859375, 0.0206146240234375, -0.0158843994140625, -0.007965087890625, -0.030670166015625, -0.0435791015625, 0.030426025390625, 0.048858642578125, -0.01922607421875, 0.041839599609375, -0.0208282470703125, -0.06536865234375, 0.0247039794921875, 0.012725830078125, 0.06268310546875, -0.0260467529296875, -0.041473388671875, 0.041046142578125, -0.004398345947265625, 0.09259033203125, -0.0217132568359375, 0.0013895034790039062, 0.059906005859375, -0.0268402099609375, -0.023284912109375, -0.04437255859375, -0.006961822509765625, -0.0362548828125, 0.0294189453125, 0.044952392578125, -0.005435943603515625, 0.0301971435546875, -0.034698486328125, -0.10577392578125, 0.0338134765625, -0.01203155517578125, -0.049468994140625, -0.040924072265625, 0.019927978515625, 0.0228424072265625, -0.04791259765625, -0.0270538330078125, 0.00818634033203125, -0.043914794921875, -0.011932373046875, 0.03985595703125, 0.0038318634033203125, 0.0450439453125, 0.0274505615234375, -0.09326171875, 0.012451171875, -0.039306640625, 0.031768798828125, -0.01454925537109375, -0.01263427734375, 0.00948333740234375, 0.02703857421875, -0.048431396484375, -0.0257568359375, -0.00007826089859008789, 0.02294921875, 0.00984954833984375, 0.040771484375, -0.039947509765625, 0.00746917724609375, 0.04803466796875, 0.0679931640625, 0.0305633544921875, -0.038421630859375, -0.00206756591796875, -0.01776123046875, -0.03765869140625, -0.02471923828125, 0.0364990234375, -0.06085205078125, -0.007282257080078125, 0.00734710693359375, -0.0307464599609375, -0.00106048583984375, -0.0238037109375, -0.041290283203125, 0.0009450912475585938, -0.02978515625, 0.01311492919921875, -0.029815673828125, 0.0062103271484375, 0.0355224609375, -0.03369140625, -0.00351715087890625, -0.0260772705078125, 0.0369873046875, -0.01343536376953125, -0.0625, 0.01470947265625, 0.06085205078125, -0.036163330078125, -0.0247039794921875, 0.0266876220703125, -0.032684326171875, 0.00913238525390625, 0.004741668701171875, -0.0216217041015625, 0.036285400390625, 0.01462554931640625, 0.0268096923828125, -0.045013427734375, 0.0716552734375, 0.028411865234375, 0.036712646484375, 0.01177215576171875, 0.0321044921875, -0.002834320068359375, 0.045318603515625, 0.01129913330078125, -0.038238525390625, 0.01495361328125, -0.03570556640625, -0.0155792236328125, 0.0205535888671875, -0.04034423828125, -0.04168701171875, 0.02850341796875, -0.041473388671875, -0.0112762451171875, 0.00832366943359375 ]
73783aab676c66fd32c878b2cc2b0774db1bfe1d
Wordpress Stackexchange Q: How to display comments and comment form on custom post type? Is it possible in wordpress to display comments and comment form on custom post type, and how to do that? Thanks in advance. A: 1) add "comments" to the supports array when registering the post type. 2) add the comments_template() function inside the loop of the single.php template and you are good to go.
Q: How to display comments and comment form on custom post type? Is it possible in wordpress to display comments and comment form on custom post type, and how to do that? Thanks in advance. A: 1) add "comments" to the supports array when registering the post type. 2) add the comments_template() function inside the loop of the single.php template and you are good to go.
wordpress
{ "language": "en", "length": 66, "provenance": "stackexchange_00019.jsonl.gz:413500", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/29982" }
[ 0.07281494140625, -0.01873779296875, 0.0026187896728515625, -0.060089111328125, 0.00527191162109375, -0.0277862548828125, 0.0254974365234375, 0.0160064697265625, -0.0147857666015625, 0.021148681640625, -0.033843994140625, -0.0163726806640625, -0.0283050537109375, -0.0170440673828125, -0.01522064208984375, -0.058807373046875, 0.0306854248046875, 0.0290374755859375, 0.04986572265625, -0.022216796875, 0.045623779296875, -0.0011453628540039062, -0.01018524169921875, 0.0762939453125, 0.0209808349609375, -0.034515380859375, 0.1263427734375, -0.0129852294921875, 0.0177154541015625, -0.005321502685546875, 0.0278778076171875, -0.029754638671875, 0.0200042724609375, 0.021728515625, -0.0168609619140625, 0.01531982421875, 0.01050567626953125, 0.006938934326171875, 0.006572723388671875, 0.043212890625, 0.02288818359375, -0.00824737548828125, 0.028228759765625, -0.0225830078125, 0.0103607177734375, -0.017242431640625, 0.01090240478515625, -0.0587158203125, 0.0226593017578125, -0.0134124755859375, 0.01210784912109375, 0.00862884521484375, 0.0501708984375, -0.04510498046875, -0.0238494873046875, -0.01763916015625, -0.042449951171875, -0.000640869140625, 0.034576416015625, -0.01480865478515625, -0.0030155181884765625, -0.02642822265625, 0.02789306640625, 0.0243072509765625, 0.0037136077880859375, 0.00946807861328125, 0.0423583984375, 0.021270751953125, -0.01058197021484375, -0.0195465087890625, 0.002777099609375, -0.00539398193359375, 0.0225830078125, -0.025146484375, 0.02764892578125, -0.0259857177734375, -0.01226043701171875, 0.0014867782592773438, 0.0214385986328125, 0.007610321044921875, -0.001007080078125, 0.013916015625, -0.0203094482421875, -0.044342041015625, 0.00701141357421875, -0.01544189453125, -0.01551055908203125, -0.01280975341796875, -0.00879669189453125, -0.035369873046875, -0.0077667236328125, -0.065185546875, -0.0237274169921875, 0.0306549072265625, 0.0032863616943359375, -0.03533935546875, 0.016632080078125, 0.0126190185546875, 0.00679779052734375, 0.01221466064453125, 0.016021728515625, -0.0355224609375, 0.0372314453125, -0.0286865234375, 0.00879669189453125, -0.0046234130859375, -0.037628173828125, -0.0277862548828125, 0.04315185546875, 0.043060302734375, -0.0087738037109375, 0.0008873939514160156, -0.0242919921875, -0.0244598388671875, -0.0243072509765625, 0.030242919921875, -0.04052734375, 0.011505126953125, -0.0023479461669921875, 0.034759521484375, 0.0125274658203125, 0.036529541015625, 0.02740478515625, -0.0211944580078125, 0.005279541015625, 0.00823211669921875, -0.0029735565185546875, -0.05316162109375, 0.00511932373046875, 0.00975799560546875, -0.0311431884765625, 0.0140380859375, 0.04962158203125, 0.025482177734375, 0.006500244140625, -0.018585205078125, 0.01279449462890625, -0.0089111328125, -0.0220947265625, 0.031494140625, 0.0014123916625976562, -0.022430419921875, -0.0013132095336914062, -0.005859375, -0.004730224609375, 0.02593994140625, 0.026123046875, 0.00986480712890625, -0.01090240478515625, -0.0545654296875, -0.020751953125, 0.02362060546875, 0.00650787353515625, 0.01348876953125, 0.037506103515625, -0.0301361083984375, 0.031524658203125, -0.032806396484375, 0.02642822265625, -0.0202789306640625, 0.0192108154296875, 0.00934600830078125, 0.01148223876953125, -0.031646728515625, -0.036346435546875, -0.01532745361328125, -0.042510986328125, 0.0033969879150390625, 0.0207366943359375, -0.0135955810546875, -0.0272369384765625, -0.029205322265625, 0.0252532958984375, -0.005046844482421875, -0.0159912109375, 0.036224365234375, -0.02252197265625, 0.019256591796875, 0.002811431884765625, 0.031005859375, 0.006435394287109375, -0.0462646484375, 0.00457000732421875, 0.00913238525390625, -0.03558349609375, 0.0238800048828125, 0.03192138671875, 0.044708251953125, -0.0229339599609375, 0.020172119140625, 0.02392578125, 0.051513671875, -0.0003254413604736328, -0.005039215087890625, -0.004425048828125, -0.023681640625, -0.016357421875, -0.007183074951171875, -0.015899658203125, 0.02764892578125, -0.06292724609375, -0.01800537109375, -0.01361846923828125, 0.0281219482421875, -0.033111572265625, 0.009063720703125, -0.0222625732421875, 0.0245361328125, 0.0149078369140625, 0.0095062255859375, 0.00922393798828125, -0.01024627685546875, -0.0269317626953125, 0.0089111328125, -0.03875732421875, 0.005550384521484375, -0.010162353515625, 0.0261383056640625, -0.0047760009765625, 0.034027099609375, -0.018096923828125, -0.022064208984375, -0.039337158203125, -0.0146942138671875, 0.03045654296875, -0.00980377197265625, -0.018035888671875, -0.0167694091796875, 0.0098876953125, 0.01248931884765625, -0.03472900390625, 0.02117919921875, -0.01183319091796875, -0.040557861328125, -0.036773681640625, 0.0026111602783203125, -0.003177642822265625, -0.04632568359375, -0.00177001953125, 0.0650634765625, 0.0029659271240234375, 0.0093994140625, 0.0316162109375, 0.09185791015625, 0.044708251953125, 0.05303955078125, 0.0447998046875, 0.01308441162109375, 0.027923583984375, 0.02166748046875, 0.0044097900390625, -0.01611328125, 0.03936767578125, -0.035400390625, 0.033935546875, 0.0218505859375, -0.0037059783935546875, 0.00719451904296875, 0.012939453125, -0.00598907470703125, 0.004756927490234375, -0.00510406494140625, -0.00982666015625, -0.01216888427734375, 0.01546478271484375, 0.00896453857421875, 0.040863037109375, 0.0257415771484375, -0.0208740234375, -0.0026607513427734375, -0.00023472309112548828, 0.0135650634765625, 0.00004559755325317383, 0.025726318359375, -0.0087738037109375, 0.030731201171875, -0.0151824951171875, -0.01142120361328125, 0.0008769035339355469, 0.0128173828125, -0.010498046875, 0.019134521484375, -0.037445068359375, -0.0096893310546875, -0.0010347366333007812, -0.072998046875, -0.015869140625, 0.0108489990234375, -0.0226593017578125, -0.0269927978515625, 0.00032830238342285156, 0.0438232421875, -0.00738525390625, 0.0008454322814941406, 0.023590087890625, -0.0135345458984375, 0.01471710205078125, -0.0865478515625, 0.0667724609375, -0.049591064453125, 0.044586181640625, 0.07574462890625, -0.01447296142578125, 0.01319122314453125, 0.0053558349609375, 0.0172271728515625, 0.0399169921875, 0.0025844573974609375, -0.0161590576171875, -0.037200927734375, -0.0001919269561767578, -0.00690460205078125, 0.01099395751953125, 0.0352783203125, 0.01485443115234375, -0.0291595458984375, 0.03125, 0.04730224609375, 0.0104522705078125, 0.00452423095703125, 0.0040740966796875, -0.03082275390625, -0.0364990234375, -0.038543701171875, -0.026275634765625, 0.0207672119140625, -0.058746337890625, -0.00847625732421875, 0.0032825469970703125, -0.0162811279296875, -0.07373046875, -0.032318115234375, -0.07940673828125, 0.0013647079467773438, -0.00928497314453125, 0.01399993896484375, 0.0175018310546875, 0.069580078125, 0.0231170654296875, -0.0546875, 0.03668212890625, 0.007442474365234375, -0.0259857177734375, 0.03582763671875, 0.0404052734375, -0.053619384765625, 0.059814453125, 0.00829315185546875, -0.05078125, 0.037445068359375, -0.007564544677734375, -0.0364990234375, -0.01104736328125, 0.0013399124145507812, 0.0139923095703125, -0.0002968311309814453, 0.00920867919921875, 0.0030498504638671875, 0.0213165283203125, -0.034088134765625, -0.02545166015625, 0.005229949951171875, -0.03466796875, -0.0794677734375, 0.01050567626953125, -0.0098114013671875, -0.057586669921875, 0.03765869140625, 0.01535797119140625, 0.0212554931640625, 0.0212249755859375, -0.0187530517578125, 0.038726806640625, 0.003505706787109375, 0.0206298828125, -0.0233917236328125, -0.0231170654296875, -0.024017333984375, 0.04425048828125, -0.014678955078125, 0.01540374755859375, -0.008575439453125, 0.033416748046875, -0.048248291015625, -0.09112548828125, 0.0687255859375, -0.032684326171875, -0.01192474365234375, -0.032745361328125, -0.0212860107421875, 0.01422119140625, 0.121337890625, -0.039581298828125, -0.0038356781005859375, 0.00392913818359375, -0.0036334991455078125, -0.02081298828125, -0.01387786865234375, -0.0631103515625, -0.0026111602783203125, -0.055908203125, 0.042205810546875, 0.015838623046875, -0.02093505859375, -0.045166015625, 0.0189056396484375, -0.054443359375, -0.0207061767578125, 0.0170440673828125, -0.0340576171875, 0.006977081298828125, 0.02642822265625, -0.0120849609375, 0.005725860595703125, 0.009613037109375, -0.059539794921875, -0.05865478515625, -0.0084075927734375, -0.008056640625, 0.04345703125, 0.014801025390625, -0.016204833984375, 0.00605010986328125, 0.0443115234375, 0.0159912109375, 0.01702880859375, -0.002468109130859375, 0.00556182861328125, -0.0202484130859375, -0.007198333740234375, -0.002826690673828125, -0.0228424072265625, -0.00487518310546875, 0.01134490966796875, -0.0020275115966796875, 0.07244873046875, -0.029693603515625, -0.006847381591796875, -0.01055145263671875, -0.009796142578125, 0.019195556640625, -0.014984130859375, -0.031280517578125, 0.052825927734375, -0.0244293212890625, 0.008544921875, -0.035797119140625, -0.00868988037109375, 0.0007295608520507812, -0.03240966796875, 0.0018663406372070312, 0.0214385986328125, 0.047027587890625, 0.0191802978515625, 0.00144195556640625, -0.051361083984375, -0.006412506103515625, 0.045257568359375, 0.0263214111328125, 0.0179290771484375, 0.0174407958984375, -0.02996826171875, 0.03887939453125, 0.030426025390625, -0.00772857666015625, 0.010223388671875, 0.050384521484375, -0.0016164779663085938, -0.0157623291015625, 0.0297698974609375, -0.0302581787109375, 0.0034236907958984375, 0.0017566680908203125, -0.0174407958984375, -0.01023101806640625, -0.0241546630859375, 0.04547119140625, -0.01067352294921875, 0.028594970703125, -0.032684326171875, -0.033599853515625, 0.00902557373046875, -0.03253173828125, 0.038299560546875, 0.0302581787109375, -0.0007414817810058594, 0.0457763671875, 0.005199432373046875, 0.0136871337890625, 0.0182037353515625, -0.011962890625, -0.006305694580078125, 0.01363372802734375, 0.046966552734375, 0.0191192626953125, 0.022552490234375, 0.00119781494140625, 0.05096435546875, 0.008331298828125, -0.0555419921875, -0.006435394287109375, -0.0086669921875, 0.0335693359375, 0.01358795166015625, 0.0276641845703125, 0.005725860595703125, 0.0027256011962890625, -0.004322052001953125, 0.022979736328125, 0.025054931640625, 0.002788543701171875, -0.0167999267578125, 0.012237548828125, 0.011383056640625, -0.0105133056640625, 0.0199127197265625, 0.0364990234375, 0.00841522216796875, 0.034027099609375, -0.0251922607421875, 0.04718017578125, 0.04791259765625, 0.0207061767578125, 0.01358795166015625, 0.001880645751953125, -0.00887298583984375, 0.0019445419311523438, -0.0180816650390625, -0.02130126953125, -0.0321044921875, 0.00765228271484375, 0.011199951171875, 0.0005135536193847656, 0.0275115966796875, 0.003658294677734375, 0.01727294921875, -0.007160186767578125, -0.01177978515625, 0.00708770751953125, -0.03509521484375, 0.019683837890625, 0.03350830078125, -0.004474639892578125, 0.004718780517578125, -0.0316162109375, 0.01519775390625, -0.0443115234375, 0.0194549560546875, -0.01157379150390625, -0.00974273681640625, 0.0173187255859375, 0.009765625, -0.027313232421875, -0.0201263427734375, -0.0012254714965820312, -0.052337646484375, -0.01788330078125, 0.0021514892578125, -0.0093231201171875, -0.00583648681640625, -0.001499176025390625, -0.007038116455078125, -0.0400390625, 0.021514892578125, -0.0205535888671875, -0.005702972412109375, 0.06689453125, 0.0013628005981445312, -0.0213165283203125, -0.006603240966796875, -0.043426513671875, -0.0225830078125, -0.05908203125, -0.0606689453125, -0.033538818359375, 0.01224517822265625, 0.013336181640625, 0.0277099609375, -0.01053619384765625, -0.039154052734375, -0.03314208984375, 0.0182342529296875, 0.027008056640625, 0.047119140625, 0.01739501953125, 0.06646728515625, -0.0027790069580078125, 0.067138671875, 0.04248046875, 0.053619384765625, -0.024658203125, -0.037139892578125, 0.004852294921875, -0.03143310546875, -0.0245513916015625, -0.01104736328125, -0.0219879150390625, 0.03533935546875, 0.0506591796875, -0.003856658935546875, 0.001552581787109375, -0.0167999267578125, -0.0007467269897460938, -0.0469970703125, 0.041107177734375, -0.0236663818359375, 0.0167388916015625, -0.032684326171875, 0.00952911376953125, 0.0252838134765625, 0.006793975830078125, -0.0274658203125, -0.0011730194091796875, 0.0169830322265625, 0.0127105712890625, -0.002704620361328125, -0.06158447265625, 0.06689453125, 0.0665283203125, 0.01396942138671875, 0.034210205078125, 0.01445770263671875, 0.00858306884765625, 0.001621246337890625, 0.035919189453125, -0.056121826171875, -0.0552978515625, 0.037384033203125, 0.025726318359375, -0.0474853515625, 0.0277557373046875, -0.0209808349609375, 0.035400390625, 0.03497314453125, 0.06787109375, -0.1092529296875, 0.0285491943359375, -0.0037822723388671875, 0.0018472671508789062, 0.083984375, -0.0311279296875, 0.0256500244140625, -0.00933837890625, 0.031585693359375, 0.03857421875, -0.0239715576171875, -0.002063751220703125, -0.0222930908203125, 0.007457733154296875, -0.01192474365234375, 0.071044921875, -0.00618743896484375, -0.042144775390625, -0.0281829833984375, 0.043975830078125, -0.033538818359375, -0.050140380859375, -0.0097503662109375, 0.0075531005859375, -0.022003173828125, -0.0692138671875, 0.0175628662109375, -0.043365478515625, 0.0257720947265625, 0.07501220703125, 0.0262298583984375, 0.01300811767578125, 0.048309326171875, 0.0005307197570800781, 0.0192413330078125, 0.011199951171875, -0.037078857421875, -0.05029296875, -0.03472900390625, 0.018157958984375, 0.035552978515625, -0.015411376953125, 0.03948974609375, -0.0100860595703125, -0.04400634765625, -0.006717681884765625, 0.01561737060546875, 0.06817626953125, -0.02703857421875, -0.021209716796875, 0.0223541259765625, 0.00965118408203125, 0.01412200927734375, -0.0138397216796875, -0.0216827392578125, -0.0131683349609375, 0.0262451171875, -0.0248260498046875, -0.0306243896484375, 0.00030422210693359375, -0.0416259765625, -0.0626220703125, 0.045989990234375, 0.032501220703125, 0.004489898681640625, -0.006916046142578125, 0.0177001953125, -0.022857666015625, 0.006927490234375, -0.00414276123046875, 0.044403076171875, -0.017364501953125, 0.050445556640625, -0.049468994140625, -0.027130126953125, 0.025482177734375, 0.0770263671875, 0.05108642578125, 0.01149749755859375, -0.0046539306640625, 0.0155487060546875, 0.077392578125, 0.05218505859375, 0.0028438568115234375, 0.00624847412109375, -0.006561279296875, 0.00466156005859375, 0.021728515625, -0.00827789306640625, 0.03265380859375, -0.01514434814453125, -0.029449462890625, 0.0191802978515625, 0.01336669921875, 0.0031032562255859375, -0.0010280609130859375, -0.00547027587890625, -0.031036376953125, 0.005146026611328125, 0.0188140869140625, 0.01393890380859375, -0.032073974609375, 0.052581787109375, 0.036773681640625, -0.037109375, 0.00981903076171875, -0.049285888671875, 0.056976318359375, 0.01528167724609375, 0.0248565673828125, 0.022491455078125, 0.0223846435546875, 0.0129547119140625, -0.047210693359375, 0.00909423828125, -0.005207061767578125, -0.03045654296875, 0.02520751953125, -0.0030574798583984375, 0.0439453125, -0.038116455078125, -0.0193634033203125, -0.0088348388671875, 0.031097412109375, -0.0228271484375, -0.0227813720703125, 0.0170745849609375, 0.00734710693359375, 0.0087738037109375, -0.01197052001953125, 0.0285797119140625, 0.006870269775390625, 0.0184478759765625, -0.042633056640625, -0.041595458984375, -0.004131317138671875, 0.037933349609375, -0.0087738037109375, -0.0053558349609375, 0.022857666015625, -0.05084228515625, -0.038421630859375, 0.00762939453125, 0.016876220703125, 0.039276123046875, 0.0108489990234375, 0.0570068359375, 0.00252532958984375, -0.0017461776733398438, 0.01531219482421875, 0.008941650390625, 0.0011281967163085938, -0.02728271484375, 0.0127410888671875, -0.026153564453125, -0.00760650634765625, 0.0173187255859375, 0.0380859375, 0.0025348663330078125, -0.0032196044921875, -0.020233154296875, 0.01079559326171875, 0.0033473968505859375, 0.039794921875, -0.0167236328125, 0.0095672607421875, -0.048126220703125, 0.004215240478515625, 0.023956298828125, -0.007904052734375, 0.035736083984375, -0.060394287109375, 0.07196044921875, 0.00391387939453125, 0.0272216796875, -0.000030219554901123047, -0.0036296844482421875, 0.063720703125, -0.00408935546875, 0.0321044921875, 0.031982421875, -0.06781005859375, -0.0164337158203125, -0.014495849609375, -0.071533203125, 0.043731689453125, 0.0584716796875, -0.020172119140625, -0.00702667236328125, 0.015716552734375, -0.0026111602783203125, 0.017578125, -0.0212554931640625, 0.0185699462890625, -0.01006317138671875, 0.006221771240234375, 0.006317138671875, -0.1021728515625, -0.07061767578125, -0.049407958984375, 0.0216217041015625, 0.0017375946044921875, 0.0821533203125, 0.004535675048828125, 0.02264404296875, -0.061492919921875, 0.052093505859375, -0.052337646484375, -0.052032470703125, 0.070556640625, 0.05340576171875, -0.004913330078125, -0.027984619140625, -0.0021190643310546875, 0.05780029296875, -0.001735687255859375, -0.0181121826171875, 0.0251007080078125, -0.002002716064453125, 0.0004730224609375, -0.0181427001953125, 0.01470947265625, -0.0240325927734375, -0.0058746337890625, 0.00733184814453125, -0.00008946657180786133, 0.017333984375, -0.0038890838623046875, -0.0213470458984375, 0.049468994140625, -0.01493072509765625, -0.004085540771484375, 0.01123046875, -0.0458984375, 0.0168609619140625, 0.032745361328125, -0.0206451416015625, 0.0006198883056640625, 0.01221466064453125, -0.013275146484375, 0.0155181884765625, 0.01462554931640625, 0.00844573974609375, 0.01160430908203125, -0.005352020263671875, 0.031005859375, -0.0295257568359375, 0.042572021484375, -0.0357666015625, -0.0091400146484375, -0.0229949951171875, 0.0252227783203125, 0.028533935546875, 0.009033203125, -0.042938232421875, -0.058349609375, 0.0175018310546875, 0.01171875, -0.026519775390625, -0.0162506103515625, -0.058685302734375, -0.0180816650390625, 0.0265655517578125, -0.00838470458984375, -0.023284912109375, -0.01947021484375, -0.01103973388671875, 0.033233642578125, -0.00913238525390625, -0.01904296875, 0.03350830078125, 0.048980712890625, -0.040557861328125, 0.003345489501953125, -0.01052093505859375, -0.0216217041015625, -0.00478363037109375, 0.0609130859375, 0.06878662109375, -0.065673828125, -0.002948760986328125, 0.0924072265625, 0.0772705078125, 0.1341552734375, 0.042755126953125, 0.0033588409423828125, 0.032135009765625, 0.0025424957275390625, -0.038299560546875, -0.05474853515625, 0.0215606689453125, -0.058563232421875, -0.02301025390625, -0.02935791015625, 0.0396728515625, 0.0452880859375, -0.0288543701171875, -0.10400390625, 0.07025146484375, -0.048675537109375, -0.03387451171875, -0.0439453125, -0.0108184814453125, 0.01473236083984375, 0.0168914794921875, -0.01026153564453125, -0.018096923828125, -0.035247802734375, 0.0305633544921875, -0.01290130615234375, 0.0008945465087890625, 0.043792724609375, -0.0165557861328125, -0.00714111328125, 0.0001856088638305664, 0.0305023193359375, -0.0302581787109375, 0.0206146240234375, -0.023590087890625, 0.00977325439453125, 0.0249176025390625, -0.062744140625, -0.06256103515625, -0.0245208740234375, 0.03302001953125, 0.0191497802734375, -0.0330810546875, -0.00693511962890625, -0.0152587890625, -0.0218048095703125, 0.028594970703125, -0.005786895751953125, -0.0166778564453125, 0.058624267578125, -0.025360107421875, -0.08148193359375, -0.0225830078125, 0.0188140869140625, -0.045684814453125, -0.0241241455078125, 0.0253143310546875, -0.00565338134765625, -0.0082550048828125, -0.0347900390625, -0.0220947265625, -0.00738525390625, -0.0224761962890625, -0.01428985595703125, 0.0058441162109375, 0.0177764892578125, 0.04400634765625, -0.028839111328125, 0.01383209228515625, -0.00640869140625, -0.0007309913635253906, 0.032989501953125, -0.0081634521484375, -0.01361083984375, -0.01654052734375, 0.0227203369140625, 0.026519775390625, 0.01666259765625, 0.03717041015625, 0.005802154541015625, -0.004497528076171875, -0.0014791488647460938, 0.0298614501953125, 0.00811767578125, 0.027801513671875, -0.053436279296875, 0.049163818359375, -0.00836944580078125, 0.0372314453125, -0.0155029296875, 0.0157012939453125, -0.007129669189453125, 0.025787353515625, -0.0284576416015625, 0.004955291748046875, -0.004657745361328125, -0.0166473388671875, 0.0023288726806640625, -0.0156707763671875, -0.022979736328125, -0.039642333984375, 0.0357666015625, 0.04937744140625, -0.010009765625, 0.039794921875 ]
2eb69cb73b54c2f1abefaf7076b2f457fdcad143
Wordpress Stackexchange Q: How to display related posts from same category? Is it possible to display related posts from same category as the current post? A: One possibility: $related = get_posts( array( 'category__in' => wp_get_post_categories( $post->ID ), 'numberposts' => 5, 'post__not_in' => array( $post->ID ) ) ); if( $related ) { foreach( $related as $post ) { setup_postdata($post); /*whatever you want to output*/ } wp_reset_postdata(); } Reference: * *get_posts *wp_reset_postdata *wp_get_post_categories Answer re-written based on WP_Query(): $related = new WP_Query( array( 'category__in' => wp_get_post_categories( $post->ID ), 'posts_per_page' => 5, 'post__not_in' => array( $post->ID ) ) ); if( $related->have_posts() ) { while( $related->have_posts() ) { $related->the_post(); /*whatever you want to output*/ } wp_reset_postdata(); }
Q: How to display related posts from same category? Is it possible to display related posts from same category as the current post? A: One possibility: $related = get_posts( array( 'category__in' => wp_get_post_categories( $post->ID ), 'numberposts' => 5, 'post__not_in' => array( $post->ID ) ) ); if( $related ) { foreach( $related as $post ) { setup_postdata($post); /*whatever you want to output*/ } wp_reset_postdata(); } Reference: * *get_posts *wp_reset_postdata *wp_get_post_categories Answer re-written based on WP_Query(): $related = new WP_Query( array( 'category__in' => wp_get_post_categories( $post->ID ), 'posts_per_page' => 5, 'post__not_in' => array( $post->ID ) ) ); if( $related->have_posts() ) { while( $related->have_posts() ) { $related->the_post(); /*whatever you want to output*/ } wp_reset_postdata(); } A: Here another clean and very flexible option: Put this code in your functions.php file function example_cats_related_post() { $post_id = get_the_ID(); $cat_ids = array(); $categories = get_the_category( $post_id ); if(!empty($categories) && is_wp_error($categories)): foreach ($categories as $category): array_push($cat_ids, $category->term_id); endforeach; endif; $current_post_type = get_post_type($post_id); $query_args = array( 'category__in' => $cat_ids, 'post_type' => $current_post_type, 'post__not_in' => array($post_id), 'posts_per_page' => '3' ); $related_cats_post = new WP_Query( $query_args ); if($related_cats_post->have_posts()): while($related_cats_post->have_posts()): $related_cats_post->the_post(); ?> <ul> <li> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> <?php the_content(); ?> </li> </ul> <?php endwhile; // Restore original Post Data wp_reset_postdata(); endif; } Now you can simply call the function anywhere in your site using: <?php example_cats_related_post() ?> You may want to remove the list elements or style them as per your need. *Edit - you to change this: post_not_in to this post__not_in in your query A: you can use this code to get related posts from the same category $args = array( 'category__in' => wp_get_post_categories( get_queried_object_id() ), 'posts_per_page' => 5, 'orderby' => 'rand', 'post__not_in' => array( get_queried_object_id() ) ); $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) : ?> <ul class=""> <!-- the loop --> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <li> <h6> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_title(); ?> </a> </h6> </li> <?php endwhile; ?> <!-- end of the loop --> </ul> <?php wp_reset_postdata(); ?> <?php endif; ?> and use this code to get related posts from the same tags $tags = wp_get_post_terms( get_queried_object_id(), 'post_tag', ['fields' => 'ids'] ); $args = [ 'post__not_in' => array( get_queried_object_id() ), 'posts_per_page' => 5, 'orderby' => 'rand', 'tax_query' => [ [ 'taxonomy' => 'post_tag', 'terms' => $tags ] ] ]; $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) : ?> <ul class=""> <!-- the loop --> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <li> <h6> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_title(); ?> </a> </h6> </li> <?php endwhile; ?> <!-- end of the loop --> </ul> <?php wp_reset_postdata(); ?> <?php endif; ?> A: This answer makes sure that related posts are ordered by how many tags match. For example if an article has 3 tags and there is another article that has the exact same 3 tags it should appear at the top of the list. Secondary sorting should be by post date so newer content is favored. /** * Select content with common tags. * Sort so content with multiple matching tags are at the top. * Secondary sort on most recent content first. * * @param $post_id * @param int $limit * @return array */ function related_posts($post_id, $limit = 5) { global $wpdb; $query = "SELECT TOP %d x.object_id as ID FROM ( SELECT TOP 10 tr1.object_id, COUNT(tr1.term_taxonomy_id) AS common_tag_count FROM {$wpdb->term_relationships} AS tr1 INNER JOIN {$wpdb->term_relationships} AS tr2 ON tr1.term_taxonomy_id = tr2.term_taxonomy_id WHERE tr2.object_id = %d GROUP BY tr1.object_id HAVING tr1.object_id != %d ORDER BY COUNT(tr1.term_taxonomy_id) DESC ) x INNER JOIN {$wpdb->posts} p ON p.ID = x.object_id ORDER BY common_tag_count DESC, p.post_date DESC;"; $query = $wpdb->prepare($query, $limit, $post_id, $post_id); $ids = $wpdb->get_col($query); $posts = []; foreach($ids as $id) { $posts[] = get_post($id); } return $posts; } The inner query here is to select the content with the most matching tags, and then the outer query is just used to to apply secondary sorting by post date. Note this query is written for SQL Server so some syntax may need updating (e.g. TOP vs LIMIT).
wordpress
{ "language": "en", "length": 679, "provenance": "stackexchange_00019.jsonl.gz:413518", "question_score": "17", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30039" }
[ 0.077392578125, 0.0177764892578125, -0.0309295654296875, -0.082275390625, 0.0595703125, -0.03680419921875, 0.0108489990234375, -0.0039520263671875, 0.0042724609375, 0.0194854736328125, -0.05279541015625, -0.00444793701171875, 0.003902435302734375, -0.0222320556640625, 0.0152740478515625, -0.030548095703125, 0.04632568359375, -0.01035308837890625, 0.05950927734375, 0.0210418701171875, -0.000774383544921875, 0.04461669921875, 0.044403076171875, 0.01947021484375, -0.0045013427734375, 0.006702423095703125, 0.07916259765625, -0.0301361083984375, 0.00439453125, -0.0280914306640625, 0.0164642333984375, -0.00563812255859375, -0.007083892822265625, 0.0226287841796875, -0.00284576416015625, -0.036590576171875, 0.0237274169921875, -0.0097198486328125, -0.0090789794921875, 0.056854248046875, 0.01279449462890625, 0.0004911422729492188, 0.037384033203125, -0.0231170654296875, 0.0200042724609375, -0.0328369140625, 0.039093017578125, -0.0372314453125, 0.032958984375, -0.0002675056457519531, 0.0170440673828125, 0.015716552734375, 0.0196685791015625, -0.004802703857421875, -0.025360107421875, -0.011016845703125, -0.0240478515625, -0.00765228271484375, 0.052490234375, -0.00537872314453125, -0.0263824462890625, -0.038970947265625, 0.029022216796875, -0.0200958251953125, -0.0020656585693359375, 0.0158538818359375, 0.06878662109375, 0.008880615234375, -0.03125, -0.0033855438232421875, 0.0271453857421875, -0.01186370849609375, -0.0155792236328125, 0.0186614990234375, -0.01117706298828125, -0.031219482421875, 0.011138916015625, -0.034698486328125, 0.0024394989013671875, 0.0377197265625, -0.0145111083984375, -0.01377105712890625, -0.0440673828125, -0.0105133056640625, -0.0174407958984375, 0.0084991455078125, -0.01068878173828125, 0.003864288330078125, -0.048858642578125, -0.03497314453125, -0.032440185546875, -0.0565185546875, -0.07159423828125, 0.01751708984375, 0.0010805130004882812, -0.01392364501953125, 0.050872802734375, 0.06988525390625, -0.035369873046875, -0.02642822265625, -0.0072021484375, -0.022003173828125, -0.026641845703125, -0.00930023193359375, 0.038970947265625, 0.0025043487548828125, -0.00567626953125, -0.007720947265625, 0.077392578125, 0.033599853515625, -0.0165557861328125, 0.06854248046875, 0.008209228515625, -0.02783203125, -0.042572021484375, 0.06488037109375, 0.0164337158203125, 0.000858306884765625, 0.00942230224609375, 0.046234130859375, -0.0052642822265625, 0.0238189697265625, 0.01477813720703125, 0.0111236572265625, 0.03240966796875, 0.04815673828125, -0.004299163818359375, -0.0489501953125, 0.0565185546875, -0.032501220703125, -0.039520263671875, 0.034088134765625, 0.0736083984375, 0.00585174560546875, 0.007778167724609375, -0.0011882781982421875, 0.0012989044189453125, 0.0006074905395507812, -0.00765228271484375, 0.0235443115234375, 0.006458282470703125, -0.0296478271484375, 0.0187225341796875, -0.005435943603515625, 0.033599853515625, 0.0133056640625, 0.017913818359375, 0.0175018310546875, 0.007305145263671875, -0.0178375244140625, 0.0310516357421875, 0.004119873046875, 0.00859832763671875, 0.0118255615234375, 0.01012420654296875, -0.01439666748046875, 0.0281219482421875, -0.0263671875, -0.0035686492919921875, -0.034912109375, 0.0924072265625, 0.0099029541015625, 0.0031871795654296875, 0.0036563873291015625, -0.047515869140625, -0.0003533363342285156, -0.08856201171875, -0.0188446044921875, 0.015167236328125, 0.030670166015625, 0.0283203125, 0.01143646240234375, 0.0008630752563476562, -0.0109100341796875, -0.004451751708984375, -0.027557373046875, -0.0092926025390625, -0.0283355712890625, 0.0115814208984375, 0.033538818359375, -0.0127716064453125, -0.032623291015625, -0.041290283203125, 0.0193328857421875, -0.054840087890625, 0.0753173828125, -0.023468017578125, 0.031005859375, 0.03118896484375, 0.00012350082397460938, 0.029205322265625, 0.0243072509765625, -0.056976318359375, -0.00823974609375, 0.001216888427734375, 0.01242828369140625, 0.001224517822265625, -0.008758544921875, 0.006359100341796875, 0.01271820068359375, -0.004703521728515625, 0.00754547119140625, -0.03302001953125, 0.0161590576171875, -0.10113525390625, 0.020599365234375, -0.036529541015625, 0.052947998046875, -0.00556182861328125, 0.0123291015625, 0.0264434814453125, 0.034515380859375, -0.03729248046875, -0.04486083984375, -0.046112060546875, 0.02392578125, 0.0019893646240234375, -0.0225372314453125, 0.00023877620697021484, -0.0173797607421875, 0.00010412931442260742, 0.005535125732421875, -0.032012939453125, 0.02728271484375, 0.047027587890625, -0.0126953125, -0.0178070068359375, -0.036529541015625, -0.0034427642822265625, 0.01096343994140625, -0.08648681640625, 0.038665771484375, 0.009735107421875, 0.0423583984375, 0.0026702880859375, 0.01543426513671875, 0.061279296875, -0.0092620849609375, 0.0125732421875, 0.00392913818359375, 0.0252685546875, -0.0102081298828125, -0.027923583984375, 0.00383758544921875, 0.035675048828125, -0.049407958984375, -0.0009164810180664062, 0.01068115234375, 0.0285186767578125, 0.02655029296875, 0.00841522216796875, -0.024322509765625, 0.03277587890625, 0.021881103515625, 0.0221710205078125, 0.013275146484375, 0.0046539306640625, 0.056976318359375, -0.054107666015625, 0.021148681640625, -0.0105743408203125, -0.01221466064453125, -0.0002834796905517578, -0.0188140869140625, 0.0254058837890625, -0.004932403564453125, 0.021636962890625, 0.0035114288330078125, -0.01181793212890625, 0.003276824951171875, 0.0061492919921875, -0.0302734375, 0.006008148193359375, 0.01291656494140625, -0.03973388671875, 0.01039886474609375, -0.03680419921875, 0.0006399154663085938, 0.0011692047119140625, -0.008209228515625, 0.0090789794921875, 0.02679443359375, 0.01268768310546875, -0.007556915283203125, -0.00260162353515625, -0.05389404296875, 0.01146697998046875, 0.035491943359375, -0.038970947265625, 0.0180206298828125, 0.042449951171875, 0.039703369140625, -0.021759033203125, 0.00624847412109375, -0.01239013671875, 0.0264739990234375, -0.0251007080078125, -0.077880859375, 0.057830810546875, -0.048614501953125, 0.0325927734375, 0.0714111328125, 0.0141448974609375, 0.0148468017578125, -0.00809478759765625, 0.020263671875, 0.0218048095703125, 0.002071380615234375, -0.0136260986328125, 0.004852294921875, -0.06134033203125, 0.01038360595703125, 0.0452880859375, 0.075439453125, 0.0262603759765625, -0.047119140625, 0.0374755859375, 0.047821044921875, -0.06524658203125, -0.12255859375, 0.050018310546875, -0.018524169921875, 0.037445068359375, -0.00045180320739746094, -0.004322052001953125, -0.0601806640625, 0.02044677734375, 0.006977081298828125, 0.0272979736328125, -0.026702880859375, -0.042510986328125, -0.04302978515625, -0.07012939453125, -0.03826904296875, 0.0007925033569335938, 0.00019562244415283203, 0.01058197021484375, 0.04742431640625, 0.0185699462890625, -0.01666259765625, 0.0360107421875, 0.03778076171875, -0.0289764404296875, 0.002498626708984375, 0.0095672607421875, 0.0158233642578125, -0.01105499267578125, 0.0218963623046875, 0.0004973411560058594, 0.022674560546875, -0.0297393798828125, -0.027984619140625, -0.01287841796875, 0.0218658447265625, 0.039093017578125, -0.01348114013671875, -0.00555419921875, 0.06817626953125, 0.04388427734375, 0.0095367431640625, -0.044586181640625, -0.012664794921875, -0.0643310546875, -0.029449462890625, 0.03643798828125, 0.004791259765625, -0.04693603515625, 0.0034542083740234375, -0.0167236328125, -0.0435791015625, 0.00449371337890625, -0.0655517578125, 0.059356689453125, 0.028717041015625, 0.036529541015625, 0.006397247314453125, -0.0372314453125, -0.024505615234375, -0.000007510185241699219, -0.032623291015625, 0.0164031982421875, -0.037017822265625, 0.041290283203125, -0.041717529296875, -0.038482666015625, 0.02838134765625, -0.004116058349609375, 0.019287109375, -0.01329803466796875, -0.022857666015625, -0.00010156631469726562, 0.08355712890625, -0.04803466796875, -0.0294952392578125, -0.007171630859375, 0.0136566162109375, -0.0276031494140625, -0.05377197265625, -0.037811279296875, -0.0071258544921875, -0.044464111328125, 0.0184326171875, -0.0013980865478515625, -0.0179595947265625, -0.03009033203125, 0.0616455078125, -0.050018310546875, -0.0024738311767578125, 0.043243408203125, 0.004039764404296875, 0.0075225830078125, -0.002674102783203125, 0.00907135009765625, 0.0014734268188476562, -0.03265380859375, 0.001728057861328125, -0.05133056640625, -0.0268402099609375, -0.00138092041015625, 0.0484619140625, 0.01019287109375, -0.00222015380859375, 0.004611968994140625, 0.049285888671875, 0.05010986328125, 0.0361328125, 0.00699615478515625, -0.0256805419921875, 0.0193023681640625, -0.0194091796875, 0.0204315185546875, -0.03533935546875, -0.019073486328125, -0.04803466796875, 0.033355712890625, -0.01503753662109375, -0.052001953125, -0.0174102783203125, -0.0513916015625, 0.0024852752685546875, -0.0548095703125, 0.0037326812744140625, -0.0178375244140625, -0.0142669677734375, -0.007289886474609375, -0.024444580078125, 0.0174102783203125, -0.05584716796875, 0.004413604736328125, 0.05218505859375, -0.03253173828125, 0.016754150390625, 0.0204620361328125, 0.0101165771484375, -0.031829833984375, -0.07550048828125, -0.0202178955078125, 0.0224609375, -0.017547607421875, 0.042022705078125, 0.026275634765625, -0.014190673828125, 0.06884765625, -0.0024204254150390625, 0.0022335052490234375, 0.0048828125, 0.00951385498046875, 0.0185089111328125, 0.016143798828125, -0.0213775634765625, 0.01139068603515625, 0.0220184326171875, 0.046905517578125, -0.003902435302734375, -0.0076141357421875, -0.004215240478515625, 0.03656005859375, -0.018157958984375, -0.0174407958984375, -0.04193115234375, -0.0007295608520507812, -0.01470947265625, 0.0670166015625, 0.0292510986328125, 0.05206298828125, -0.00681304931640625, 0.0048828125, 0.0162200927734375, -0.01763916015625, 0.0162506103515625, 0.0699462890625, -0.01361846923828125, 0.0186004638671875, 0.01355743408203125, -0.041015625, -0.022064208984375, 0.0124969482421875, -0.0091705322265625, 0.0216064453125, -0.04010009765625, 0.0170135498046875, 0.0140380859375, 0.0140228271484375, -0.00444793701171875, -0.0018978118896484375, 0.059173583984375, 0.028778076171875, 0.006732940673828125, -0.00765228271484375, -0.0302581787109375, -0.002445220947265625, -0.03912353515625, 0.003856658935546875, -0.01094818115234375, 0.0058441162109375, 0.0203399658203125, 0.067138671875, -0.033843994140625, 0.0684814453125, -0.018524169921875, 0.029693603515625, 0.01190948486328125, 0.0241851806640625, 0.0174102783203125, -0.0055389404296875, -0.007144927978515625, -0.0012559890747070312, -0.00177001953125, -0.04608154296875, 0.0025386810302734375, 0.0073394775390625, 0.04315185546875, 0.00959014892578125, -0.0369873046875, 0.028228759765625, -0.01430511474609375, -0.001232147216796875, 0.030487060546875, 0.0155792236328125, -0.0037326812744140625, -0.0261688232421875, -0.004528045654296875, 0.034332275390625, 0.01352691650390625, -0.00856781005859375, -0.00995635986328125, -0.043487548828125, 0.00884246826171875, -0.0018873214721679688, 0.0017061233520507812, -0.00826263427734375, -0.0167999267578125, -0.026519775390625, -0.040313720703125, 0.00746917724609375, -0.006748199462890625, 0.02783203125, -0.0102386474609375, -0.027313232421875, -0.0095367431640625, -0.00860595703125, 0.05865478515625, -0.059722900390625, -0.011932373046875, -0.038970947265625, -0.01641845703125, 0.070068359375, 0.0546875, -0.041351318359375, 0.007221221923828125, -0.042205810546875, -0.021636962890625, 0.0192718505859375, -0.01861572265625, -0.053131103515625, -0.0122833251953125, 0.00630950927734375, 0.0233154296875, 0.005733489990234375, -0.01375579833984375, -0.02813720703125, -0.0095367431640625, 0.0140533447265625, 0.0252227783203125, 0.00408935546875, 0.0374755859375, -0.00748443603515625, 0.06768798828125, 0.00867462158203125, 0.004688262939453125, -0.04840087890625, -0.0238189697265625, -0.003200531005859375, -0.0826416015625, -0.003055572509765625, 0.010467529296875, -0.026611328125, 0.01386260986328125, 0.01023101806640625, 0.00921630859375, -0.005126953125, -0.027618408203125, 0.01206207275390625, -0.01800537109375, 0.016265869140625, -0.03277587890625, -0.0261077880859375, 0.03643798828125, -0.022186279296875, -0.0250244140625, -0.0132904052734375, -0.022186279296875, 0.004650115966796875, -0.002109527587890625, -0.0215606689453125, 0.0171051025390625, -0.041839599609375, 0.048980712890625, 0.044403076171875, 0.0377197265625, 0.038421630859375, 0.0286865234375, 0.042327880859375, -0.0086212158203125, 0.0167999267578125, 0.09075927734375, 0.0255584716796875, 0.057586669921875, -0.0270843505859375, -0.01806640625, -0.0126953125, -0.06317138671875, -0.035736083984375, -0.00876617431640625, -0.005950927734375, -0.0121002197265625, -0.006618499755859375, 0.01039886474609375, -0.0023326873779296875, -0.0333251953125, 0.0164031982421875, -0.0142669677734375, -0.0140380859375, 0.027008056640625, -0.008758544921875, -0.0228271484375, 0.0157623291015625, 0.006160736083984375, -0.0121307373046875, -0.021453857421875, 0.057342529296875, 0.0305938720703125, 0.00556182861328125, -0.01751708984375, 0.0281219482421875, -0.03106689453125, -0.052001953125, -0.028076171875, 0.028717041015625, -0.0423583984375, -0.10546875, 0.002460479736328125, 0.00963592529296875, -0.0013408660888671875, 0.0012998580932617188, 0.005157470703125, 0.01024627685546875, 0.0555419921875, -0.0184326171875, 0.0245208740234375, 0.0242767333984375, -0.01021575927734375, -0.0088043212890625, -0.0032711029052734375, 0.0037441253662109375, 0.0300750732421875, -0.0340576171875, 0.0035457611083984375, -0.01055908203125, -0.0018053054809570312, -0.01459503173828125, -0.005443572998046875, 0.0849609375, -0.055145263671875, -0.00311279296875, 0.024444580078125, 0.05267333984375, -0.01056671142578125, 0.0114593505859375, 0.0303497314453125, -0.003597259521484375, 0.001682281494140625, 0.01611328125, -0.00962066650390625, -0.008880615234375, 0.0016689300537109375, -0.05010986328125, 0.037322998046875, -0.002880096435546875, 0.045318603515625, 0.0306243896484375, -0.005023956298828125, -0.00962066650390625, -0.00910186767578125, -0.05023193359375, 0.039642333984375, 0.0239715576171875, 0.041595458984375, -0.06256103515625, -0.0181121826171875, -0.00505828857421875, 0.061126708984375, 0.0672607421875, 0.005901336669921875, -0.0228118896484375, -0.0087890625, 0.041412353515625, 0.03271484375, -0.007427215576171875, 0.03704833984375, -0.0140380859375, 0.0202484130859375, 0.0684814453125, -0.018218994140625, 0.04974365234375, 0.0273590087890625, -0.0267486572265625, 0.0006308555603027344, 0.0159759521484375, 0.0194854736328125, -0.03179931640625, 0.034393310546875, -0.04132080078125, -0.01141357421875, 0.0285797119140625, -0.0125732421875, 0.00909423828125, 0.052398681640625, 0.054443359375, -0.04864501953125, -0.0026340484619140625, -0.036834716796875, 0.051239013671875, 0.006740570068359375, 0.034759521484375, 0.002330780029296875, 0.0202484130859375, 0.071044921875, 0.0143890380859375, 0.024932861328125, 0.0153656005859375, -0.0176239013671875, 0.06365966796875, 0.0341796875, 0.0274200439453125, -0.039093017578125, 0.005512237548828125, 0.01690673828125, 0.0645751953125, -0.054656982421875, -0.057708740234375, 0.0247650146484375, -0.004863739013671875, -0.007434844970703125, -0.0009007453918457031, -0.019378662109375, -0.0229339599609375, 0.03857421875, -0.049163818359375, -0.0280609130859375, 0.02740478515625, 0.028350830078125, 0.00505828857421875, -0.01953125, -0.015869140625, -0.043243408203125, -0.04534912109375, 0.043212890625, 0.044342041015625, 0.0550537109375, -0.017333984375, 0.05718994140625, -0.0509033203125, -0.02490234375, 0.0303802490234375, -0.0149383544921875, -0.00505828857421875, -0.034027099609375, 0.007740020751953125, -0.0266876220703125, -0.00421142578125, 0.030914306640625, 0.0321044921875, -0.0012464523315429688, 0.07220458984375, 0.06396484375, -0.0310211181640625, -0.00911712646484375, 0.009246826171875, -0.004913330078125, 0.01438140869140625, -0.0082244873046875, 0.004161834716796875, 0.0002949237823486328, -0.01493072509765625, -0.0203094482421875, 0.0341796875, 0.01361846923828125, 0.01335906982421875, 0.0177764892578125, 0.01335906982421875, -0.0101318359375, 0.025543212890625, 0.0062255859375, 0.05059814453125, 0.025543212890625, -0.071044921875, -0.0035762786865234375, -0.036346435546875, -0.04034423828125, 0.0150299072265625, 0.0308074951171875, -0.0205841064453125, 0.034454345703125, 0.042327880859375, -0.0379638671875, 0.00759124755859375, 0.0222930908203125, 0.0297393798828125, 0.016632080078125, 0.005916595458984375, 0.017303466796875, -0.00867462158203125, -0.00347900390625, 0.0210418701171875, 0.0230255126953125, 0.0294647216796875, -0.0050048828125, 0.0338134765625, 0.0231475830078125, -0.0518798828125, 0.06939697265625, -0.0953369140625, -0.056732177734375, 0.07330322265625, -0.008270263671875, -0.0174407958984375, 0.01490020751953125, -0.002368927001953125, -0.0120697021484375, 0.05157470703125, -0.0248565673828125, -0.00473785400390625, -0.0312042236328125, 0.02508544921875, -0.043426513671875, 0.00946807861328125, -0.006183624267578125, 0.04510498046875, -0.00878143310546875, -0.04302978515625, 0.0604248046875, -0.0024471282958984375, -0.0118865966796875, 0.0031833648681640625, 0.0042266845703125, -0.0275726318359375, 0.01153564453125, 0.0259857177734375, -0.00843048095703125, 0.0228424072265625, -0.01184844970703125, -0.0113067626953125, 0.0103912353515625, 0.0016374588012695312, 0.004268646240234375, 0.01409149169921875, 0.0138397216796875, 0.016326904296875, -0.052490234375, 0.01226043701171875, 0.0335693359375, 0.044586181640625, -0.022674560546875, 0.01345062255859375, 0.0056304931640625, -0.010162353515625, 0.031280517578125, -0.00843048095703125, -0.0171356201171875, -0.0072479248046875, -0.032257080078125, 0.0041656494140625, -0.016815185546875, -0.046295166015625, -0.0294189453125, -0.0037097930908203125, 0.042999267578125, 0.01297760009765625, -0.019744873046875, 0.027130126953125, -0.0069427490234375, -0.0091552734375, 0.0211944580078125, -0.064697265625, 0.015411376953125, 0.014373779296875, -0.0278778076171875, -0.006671905517578125, -0.049835205078125, -0.029693603515625, -0.0251007080078125, 0.012725830078125, -0.0018301010131835938, -0.0299530029296875, -0.0198516845703125, 0.051971435546875, 0.034149169921875, 0.07745361328125, 0.03265380859375, 0.0141143798828125, 0.0106964111328125, 0.0249176025390625, -0.053131103515625, -0.0214691162109375, 0.03369140625, -0.0031280517578125, -0.039306640625, -0.0009655952453613281, 0.021575927734375, 0.04693603515625, -0.02154541015625, -0.0684814453125, 0.0352783203125, -0.0235748291015625, -0.041595458984375, -0.025543212890625, 0.007350921630859375, 0.01537322998046875, -0.0211334228515625, -0.01061248779296875, -0.026947021484375, -0.0311126708984375, 0.01119232177734375, -0.00511932373046875, 0.05535888671875, 0.0093994140625, -0.01369476318359375, -0.0179443359375, 0.005229949951171875, -0.01222991943359375, 0.0030918121337890625, -0.0174560546875, 0.02667236328125, -0.0063629150390625, 0.03369140625, -0.0322265625, 0.02508544921875, -0.0204620361328125, -0.003093719482421875, 0.032928466796875, -0.0197296142578125, -0.03265380859375, -0.031494140625, -0.00701904296875, 0.00823211669921875, -0.0021266937255859375, 0.005283355712890625, -0.0347900390625, -0.005825042724609375, -0.01395416259765625, -0.0158538818359375, 0.021331787109375, -0.068603515625, 0.002216339111328125, -0.008087158203125, -0.00006562471389770508, -0.0120391845703125, -0.0097503662109375, -0.0305938720703125, -0.0250396728515625, -0.0295867919921875, -0.0030879974365234375, -0.046417236328125, 0.04315185546875, -0.04071044921875, 0.0014867782592773438, -0.0203857421875, -0.0174713134765625, -0.01678466796875, -0.041778564453125, 0.0203704833984375, 0.007678985595703125, 0.0033435821533203125, 0.004520416259765625, 0.01073455810546875, 0.0235595703125, -0.0213165283203125, 0.00942230224609375, -0.01085662841796875, -0.024566650390625, -0.0196075439453125, 0.0045013427734375, -0.03985595703125, 0.01467132568359375, 0.006984710693359375, 0.0197601318359375, 0.003444671630859375, 0.038360595703125, 0.01041412353515625, 0.0030765533447265625, 0.06201171875, 0.0009365081787109375, -0.06036376953125, 0.00968170166015625, -0.0643310546875, -0.0169677734375, 0.0248565673828125, -0.0013380050659179688, -0.050689697265625, 0.040679931640625, 0.026702880859375, 0.035980224609375, 0.017425537109375 ]
008ae285ed7144182ae61607f4a297585bfa3976
Wordpress Stackexchange Q: How to load Widget javascript + css files only if used? I'd like to keep the javascript and css styles used by my widget inside their own files (and not add them to the theme). But i can't seem to get wordpress to add them when the widget is actually used on a sidebar. I've tried this: inside the Class declaration, i've added 2 functions class EssentielleRubriquesPosts extends WP_Widget { function addFrontendCss(){ wp_enqueue_style('erw-frontend-css', ESSENTIELLE_RUBRIQUE_WIDGET_PLUGIN_PATH . 'css/EssentielleRubriqueWidget-frontend.css'); } function addFrontendJavascript(){ wp_register_script('jq-hoverintent', PLUGIN_PATH . 'js/jquery.hoverintent.js', array('jquery'), '1.0',true); wp_enqueue_script('jq-hoverintent'); wp_enqueue_script('jq-tools', PLUGIN_PATH . 'js/jquery.tools.js', array('jquery'),'1.0',true); wp_enqueue_script('erw-frontend-js', PLUGIN_PATH . 'js/widget-frontend.js', array('jquery', 'jq-hoverintent', 'jq-tools'),'1.0',true); } and inside the widget() function: function widget($args, $instance) { add_action( 'wp_print_scripts', 'addFrontendJavascript' ); add_action( 'wp_print_styles', 'addFrontendCss' ); } But that doesn't do anything... A: wp_print_scripts and wp_print_styles hooks are fired way before your widget function so that is way it's not working. A solution to that would be to include the scripts in the footer using wp_print_footer_scripts hook, take a look at Jan's answer to a similar question Or a much nicer solution take a look at Sorich's answer to another similar question
Q: How to load Widget javascript + css files only if used? I'd like to keep the javascript and css styles used by my widget inside their own files (and not add them to the theme). But i can't seem to get wordpress to add them when the widget is actually used on a sidebar. I've tried this: inside the Class declaration, i've added 2 functions class EssentielleRubriquesPosts extends WP_Widget { function addFrontendCss(){ wp_enqueue_style('erw-frontend-css', ESSENTIELLE_RUBRIQUE_WIDGET_PLUGIN_PATH . 'css/EssentielleRubriqueWidget-frontend.css'); } function addFrontendJavascript(){ wp_register_script('jq-hoverintent', PLUGIN_PATH . 'js/jquery.hoverintent.js', array('jquery'), '1.0',true); wp_enqueue_script('jq-hoverintent'); wp_enqueue_script('jq-tools', PLUGIN_PATH . 'js/jquery.tools.js', array('jquery'),'1.0',true); wp_enqueue_script('erw-frontend-js', PLUGIN_PATH . 'js/widget-frontend.js', array('jquery', 'jq-hoverintent', 'jq-tools'),'1.0',true); } and inside the widget() function: function widget($args, $instance) { add_action( 'wp_print_scripts', 'addFrontendJavascript' ); add_action( 'wp_print_styles', 'addFrontendCss' ); } But that doesn't do anything... A: wp_print_scripts and wp_print_styles hooks are fired way before your widget function so that is way it's not working. A solution to that would be to include the scripts in the footer using wp_print_footer_scripts hook, take a look at Jan's answer to a similar question Or a much nicer solution take a look at Sorich's answer to another similar question A: Best solution is to register your assets first and then enqueue the CSS and JS inside the widget() function of your WP_Widget (directly enqueue, not by adding new hooks). I have tested this solution and it does work in current WordPress version (4.5.3) - both the JS and the CSS are added in the page footer. <?php // Register your assets during `wp_enqueue_scripts` hook. function custom_register_scripts() { wp_register_style('erw-frontend-css', '...frontend.css'); wp_register_script('jq-hoverintent', '...hoverintent.js', ...); wp_register_script('jq-tools', '...tools.js', ...); } // Use wp_enqueue_scripts hook add_action('wp_enqueue_scripts', 'custom_register_scripts'); class YourWidget extends WP_Widget { public function __construct() { } public function widget( $args, $instance ) { // Enqueue needed assets inside the `widget` function. wp_enqueue_style('erw-frontend-css'); wp_enqueue_script('jq-hoverintent'); wp_enqueue_script('jq-tools'); // Output widget contents. } public function form( $instance ) { } public function update( $new_instance, $old_instance ) { } }
wordpress
{ "language": "en", "length": 315, "provenance": "stackexchange_00019.jsonl.gz:413544", "question_score": "14", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30117" }
[ 0.04937744140625, -0.03277587890625, -0.0226898193359375, -0.052459716796875, -0.0016431808471679688, -0.0570068359375, 0.031005859375, 0.0266571044921875, -0.039154052734375, 0.01751708984375, -0.034912109375, 0.019256591796875, -0.01493072509765625, -0.00765228271484375, 0.0256195068359375, -0.04962158203125, 0.06134033203125, -0.02960205078125, 0.04742431640625, 0.0008759498596191406, 0.0226287841796875, 0.0258941650390625, 0.03955078125, 0.08331298828125, 0.00577545166015625, 0.020843505859375, 0.11883544921875, -0.029449462890625, 0.01800537109375, -0.0214996337890625, 0.032440185546875, -0.0294036865234375, 0.0257720947265625, 0.002201080322265625, -0.0194854736328125, -0.01800537109375, 0.01177215576171875, 0.00070953369140625, -0.0105743408203125, 0.032684326171875, 0.0281829833984375, -0.01421356201171875, -0.025634765625, 0.02239990234375, -0.0338134765625, -0.0231781005859375, 0.0178680419921875, -0.021759033203125, 0.0045623779296875, 0.005161285400390625, 0.011749267578125, -0.0239715576171875, 0.0184478759765625, -0.0206146240234375, -0.01068115234375, 0.00905609130859375, -0.0217742919921875, -0.029327392578125, 0.0268402099609375, 0.057159423828125, -0.0006794929504394531, -0.025787353515625, 0.00568389892578125, -0.043792724609375, 0.0025310516357421875, 0.0009007453918457031, -0.0111846923828125, 0.003124237060546875, -0.045501708984375, -0.0030841827392578125, 0.0260162353515625, -0.053436279296875, -0.00052642822265625, 0.0015048980712890625, -0.04327392578125, -0.0061187744140625, 0.0296173095703125, 0.0028629302978515625, 0.0115509033203125, -0.0188751220703125, -0.00730133056640625, 0.0090179443359375, -0.038726806640625, 0.016143798828125, -0.0014667510986328125, 0.032470703125, -0.0212554931640625, -0.026092529296875, -0.0091094970703125, -0.0037059783935546875, -0.00406646728515625, -0.043243408203125, 0.00933074951171875, -0.0029125213623046875, 0.00865936279296875, -0.05242919921875, 0.0040740966796875, 0.043243408203125, -0.01262664794921875, 0.05169677734375, -0.0175628662109375, -0.0283203125, 0.04034423828125, -0.04638671875, 0.012054443359375, 0.05841064453125, -0.00983428955078125, 0.0269317626953125, 0.03387451171875, 0.0277557373046875, 0.0323486328125, -0.020172119140625, 0.0038166046142578125, -0.0118560791015625, -0.01206207275390625, -0.00984954833984375, -0.02679443359375, 0.030364990234375, 0.01666259765625, 0.0165252685546875, 0.01073455810546875, 0.040802001953125, -0.003528594970703125, 0.004611968994140625, 0.0233306884765625, 0.041717529296875, 0.0248870849609375, -0.07598876953125, 0.01493072509765625, -0.01288604736328125, -0.0258026123046875, 0.0201263427734375, 0.0721435546875, 0.032073974609375, 0.0088653564453125, -0.00893402099609375, 0.06842041015625, -0.0096588134765625, -0.00551605224609375, -0.01413726806640625, 0.03875732421875, -0.0251007080078125, -0.0173797607421875, 0.00616455078125, -0.00958251953125, -0.01364898681640625, 0.01354217529296875, 0.030487060546875, 0.0019245147705078125, -0.01654052734375, 0.0341796875, -0.036224365234375, 0.03533935546875, 0.0027942657470703125, 0.01380157470703125, -0.04345703125, 0.050689697265625, -0.0455322265625, 0.01236724853515625, -0.04962158203125, -0.052825927734375, 0.004596710205078125, 0.0200347900390625, -0.07568359375, -0.051910400390625, -0.0160675048828125, 0.017913818359375, 0.01090240478515625, 0.0258331298828125, 0.039947509765625, -0.02532958984375, -0.055816650390625, 0.003810882568359375, 0.034820556640625, -0.00041413307189941406, 0.06768798828125, -0.0005598068237304688, 0.01346588134765625, 0.0450439453125, -0.023406982421875, -0.047027587890625, -0.047943115234375, 0.0919189453125, -0.058380126953125, -0.040557861328125, -0.024200439453125, 0.018096923828125, 0.050933837890625, 0.0213623046875, 0.02764892578125, 0.031646728515625, -0.0241241455078125, -0.0386962890625, 0.0023593902587890625, -0.0059661865234375, -0.036224365234375, 0.0070343017578125, -0.01047515869140625, -0.0032176971435546875, 0.01241302490234375, 0.0310211181640625, -0.023223876953125, 0.042633056640625, -0.038177490234375, -0.057861328125, 0.016693115234375, -0.043731689453125, 0.039154052734375, -0.0006136894226074219, 0.0007262229919433594, -0.000018537044525146484, -0.0020198822021484375, -0.021942138671875, 0.0095672607421875, -0.033477783203125, -0.00433349609375, 0.0022830963134765625, 0.08465576171875, 0.037689208984375, 0.0211029052734375, 0.04547119140625, -0.0406494140625, 0.04742431640625, 0.01143646240234375, 0.0019779205322265625, 0.010162353515625, -0.033416748046875, -0.01268768310546875, 0.0020751953125, 0.0006494522094726562, -0.00536346435546875, 0.05657958984375, 0.00186920166015625, 0.06317138671875, -0.01397705078125, -0.032470703125, 0.005664825439453125, 0.006450653076171875, 0.0400390625, 0.005130767822265625, 0.036651611328125, 0.0251617431640625, 0.006328582763671875, 0.0201263427734375, 0.0225830078125, -0.049224853515625, 0.01288604736328125, -0.01465606689453125, 0.00461578369140625, 0.01617431640625, -0.00969696044921875, 0.007122039794921875, 0.0175933837890625, -0.044189453125, 0.0223236083984375, 0.033294677734375, -0.00982666015625, -0.01160430908203125, -0.0135040283203125, 0.002117156982421875, 0.023193359375, 0.0098724365234375, -0.0311126708984375, 0.022125244140625, 0.01953125, 0.006069183349609375, 0.030120849609375, 0.0188751220703125, -0.01149749755859375, -0.00567626953125, 0.015869140625, -0.01617431640625, -0.002044677734375, 0.050445556640625, 0.037933349609375, -0.01493072509765625, -0.0255279541015625, -0.0223541259765625, -0.002140045166015625, 0.0304412841796875, 0.03662109375, 0.0257110595703125, 0.0201263427734375, 0.00780487060546875, 0.009185791015625, -0.0421142578125, 0.0233917236328125, 0.050018310546875, 0.0357666015625, 0.040374755859375, 0.038330078125, 0.037078857421875, 0.0283660888671875, 0.00958251953125, 0.033721923828125, -0.0030384063720703125, 0.0478515625, 0.012115478515625, 0.0111541748046875, -0.00862884521484375, 0.03955078125, 0.0294952392578125, -0.0070037841796875, 0.001617431640625, -0.013336181640625, 0.015167236328125, 0.0282135009765625, -0.02264404296875, -0.0245513916015625, -0.0257415771484375, -0.01491546630859375, 0.0130615234375, 0.0350341796875, 0.029571533203125, -0.0089874267578125, -0.04351806640625, -0.0005936622619628906, 0.0018033981323242188, -0.0870361328125, -0.0889892578125, -0.01611328125, -0.088623046875, 0.012420654296875, -0.0013027191162109375, -0.029296875, -0.012908935546875, 0.0300750732421875, 0.02447509765625, -0.024871826171875, -0.01352691650390625, -0.002964019775390625, -0.04254150390625, -0.04632568359375, -0.01142120361328125, 0.002323150634765625, -0.0015850067138671875, 0.0019073486328125, 0.0309600830078125, 0.00441741943359375, -0.0628662109375, -0.005123138427734375, 0.0367431640625, -0.01470947265625, -0.0027313232421875, 0.02642822265625, -0.030426025390625, -0.02984619140625, 0.017852783203125, 0.007701873779296875, 0.01358795166015625, -0.0290679931640625, -0.0082550048828125, -0.0185089111328125, -0.030426025390625, -0.00737762451171875, 0.07159423828125, 0.01605224609375, -0.0207672119140625, 0.034515380859375, -0.028656005859375, -0.0092926025390625, 0.01366424560546875, -0.0101318359375, 0.027862548828125, -0.0004303455352783203, -0.035003662109375, 0.01128387451171875, 0.028350830078125, 0.04302978515625, -0.003849029541015625, 0.026153564453125, -0.01116180419921875, 0.033355712890625, -0.0082244873046875, 0.01139068603515625, -0.04681396484375, 0.01800537109375, -0.0294189453125, -0.0018930435180664062, -0.0242919921875, -0.0036163330078125, -0.01361083984375, -0.00003331899642944336, -0.019256591796875, -0.0210723876953125, 0.0014257431030273438, -0.0311279296875, 0.0233612060546875, 0.0030498504638671875, 0.0164794921875, 0.010101318359375, 0.049957275390625, -0.03997802734375, -0.0094146728515625, 0.0101165771484375, 0.03466796875, -0.10162353515625, -0.0751953125, -0.034698486328125, 0.01551055908203125, -0.11077880859375, 0.0009365081787109375, -0.0198211669921875, -0.034271240234375, 0.01490020751953125, -0.015289306640625, -0.045745849609375, -0.07501220703125, 0.036865234375, -0.0259246826171875, 0.016143798828125, 0.01366424560546875, -0.01690673828125, -0.006336212158203125, -0.01256561279296875, -0.03704833984375, -0.10699462890625, 0.012969970703125, -0.09710693359375, 0.06884765625, 0.038299560546875, 0.00981903076171875, 0.003467559814453125, 0.055328369140625, -0.0003104209899902344, -0.041961669921875, 0.0343017578125, 0.0266876220703125, -0.04083251953125, -0.002079010009765625, 0.01364898681640625, -0.04296875, -0.0168609619140625, 0.019927978515625, -0.04058837890625, 0.00403594970703125, 0.0025482177734375, -0.04052734375, 0.05999755859375, -0.0484619140625, -0.039886474609375, -0.007511138916015625, 0.032470703125, 0.03619384765625, 0.0042724609375, 0.0021266937255859375, -0.03289794921875, -0.0120849609375, 0.0005431175231933594, -0.0345458984375, -0.01511383056640625, 0.0024242401123046875, 0.01922607421875, 0.02850341796875, -0.00460052490234375, 0.03021240234375, -0.01568603515625, 0.02716064453125, 0.005985260009765625, 0.0181427001953125, 0.0110931396484375, -0.03143310546875, 0.0623779296875, 0.0193939208984375, -0.008819580078125, -0.0005993843078613281, 0.09063720703125, 0.0102386474609375, 0.00873565673828125, -0.011260986328125, 0.0013284683227539062, -0.0439453125, -0.01904296875, -0.0052337646484375, 0.01476287841796875, 0.03662109375, 0.00908660888671875, -0.018280029296875, 0.0035495758056640625, -0.007152557373046875, 0.00707244873046875, -0.022369384765625, 0.0109100341796875, 0.09442138671875, 0.046844482421875, -0.00814056396484375, 0.0206298828125, 0.06463623046875, -0.0157318115234375, 0.07244873046875, 0.039520263671875, 0.0233612060546875, 0.004608154296875, 0.0836181640625, -0.00015747547149658203, 0.00743865966796875, -0.005153656005859375, 0.03521728515625, 0.0123748779296875, -0.01445770263671875, -0.023834228515625, -0.00479888916015625, 0.0174560546875, -0.01568603515625, 0.03704833984375, 0.041900634765625, 0.0176544189453125, -0.06591796875, -0.03778076171875, 0.0357666015625, -0.021209716796875, -0.061279296875, 0.01554107666015625, 0.0004019737243652344, -0.0153350830078125, -0.020050048828125, 0.0306396484375, 0.030364990234375, -0.0222320556640625, -0.0169219970703125, 0.0249481201171875, -0.033203125, 0.037139892578125, -0.0193634033203125, 0.0286865234375, 0.0194091796875, 0.0204315185546875, 0.0372314453125, -0.034881591796875, 0.004791259765625, 0.0156707763671875, 0.00968170166015625, -0.01085662841796875, -0.0091552734375, 0.02642822265625, -0.006900787353515625, -0.04058837890625, -0.01329803466796875, -0.00429534912109375, -0.0099334716796875, -0.01873779296875, -0.025421142578125, 0.0025920867919921875, 0.0406494140625, 0.00733184814453125, 0.038299560546875, 0.0034542083740234375, 0.02874755859375, 0.019134521484375, -0.007755279541015625, 0.00319671630859375, 0.00373077392578125, -0.007389068603515625, -0.005283355712890625, 0.0077972412109375, -0.0911865234375, -0.04052734375, -0.00550079345703125, 0.00785064697265625, 0.0008044242858886719, -0.019378662109375, 0.03546142578125, -0.042724609375, 0.0028705596923828125, -0.03411865234375, 0.0138397216796875, 0.045013427734375, 0.032257080078125, -0.0132293701171875, -0.0295562744140625, -0.040374755859375, -0.037872314453125, -0.044708251953125, -0.055450439453125, -0.0270538330078125, 0.0209503173828125, -0.0005502700805664062, 0.0243377685546875, -0.02984619140625, -0.032440185546875, -0.020965576171875, 0.04254150390625, 0.05120849609375, 0.0911865234375, -0.023590087890625, 0.07781982421875, -0.0380859375, 0.0269927978515625, -0.0178985595703125, 0.005809783935546875, -0.0284576416015625, 0.01316070556640625, -0.023193359375, -0.050750732421875, 0.00048804283142089844, 0.00257110595703125, -0.007221221923828125, 0.0386962890625, 0.0570068359375, 0.015838623046875, 0.042877197265625, 0.0005288124084472656, -0.00844573974609375, 0.0003380775451660156, 0.0019121170043945312, 0.026519775390625, 0.046966552734375, 0.04254150390625, 0.006389617919921875, 0.032257080078125, -0.00881195068359375, -0.026031494140625, 0.03558349609375, -0.006450653076171875, 0.04638671875, -0.0293426513671875, -0.0269622802734375, 0.01270294189453125, -0.00817108154296875, 0.0242156982421875, 0.021331787109375, -0.0247802734375, 0.034759521484375, 0.001605987548828125, -0.0034542083740234375, 0.01186370849609375, -0.01959228515625, 0.036102294921875, -0.0220489501953125, 0.01751708984375, 0.0311126708984375, -0.01097869873046875, 0.0006937980651855469, 0.0394287109375, 0.019439697265625, -0.0626220703125, 0.00800323486328125, -0.025177001953125, -0.001064300537109375, 0.048004150390625, 0.02484130859375, -0.0023651123046875, 0.010986328125, 0.040283203125, 0.0273895263671875, 0.007663726806640625, 0.0472412109375, 0.027252197265625, 0.01317596435546875, 0.006809234619140625, -0.0076141357421875, -0.0152435302734375, -0.0654296875, -0.0291900634765625, 0.0626220703125, -0.0338134765625, 0.0030651092529296875, 0.0039043426513671875, 0.01300048828125, -0.0236358642578125, -0.046173095703125, 0.016326904296875, -0.0123443603515625, -0.03790283203125, 0.045257568359375, -0.0276031494140625, 0.06976318359375, 0.034454345703125, 0.0174407958984375, 0.0107421875, -0.0156097412109375, 0.07476806640625, 0.0206756591796875, -0.0220184326171875, 0.0288543701171875, 0.0091705322265625, -0.0565185546875, 0.019683837890625, 0.0027370452880859375, -0.0281524658203125, -0.016357421875, 0.005245208740234375, 0.07415771484375, -0.01113128662109375, -0.032257080078125, 0.025360107421875, 0.043792724609375, -0.02197265625, -0.0170440673828125, 0.0063629150390625, -0.085693359375, -0.03814697265625, -0.003421783447265625, -0.04437255859375, -0.02252197265625, -0.03460693359375, -0.056060791015625, 0.093994140625, -0.027923583984375, 0.0248870849609375, 0.014129638671875, 0.0299072265625, -0.01483154296875, 0.0162353515625, -0.02264404296875, 0.037139892578125, -0.0309295654296875, 0.005222320556640625, -0.0101470947265625, 0.02716064453125, -0.0037059783935546875, -0.005054473876953125, 0.011322021484375, -0.00218963623046875, -0.0006327629089355469, -0.0025482177734375, 0.043670654296875, 0.07391357421875, 0.02581787109375, -0.0166168212890625, 0.0013217926025390625, -0.0233154296875, 0.00621795654296875, 0.003971099853515625, 0.0207977294921875, -0.01103973388671875, -0.02923583984375, 0.0305023193359375, -0.002162933349609375, 0.00424957275390625, -0.0236053466796875, 0.0188751220703125, -0.0114898681640625, -0.00643157958984375, 0.004276275634765625, 0.01540374755859375, -0.0082244873046875, 0.041229248046875, 0.012420654296875, 0.014923095703125, -0.07147216796875, -0.0034084320068359375, 0.0122222900390625, -0.0080718994140625, -0.013580322265625, -0.01058197021484375, 0.0105133056640625, -0.005084991455078125, 0.01152801513671875, -0.011199951171875, 0.043914794921875, -0.01148223876953125, 0.0316162109375, 0.025238037109375, 0.06231689453125, 0.004520416259765625, -0.005321502685546875, -0.028045654296875, 0.00438690185546875, -0.0076751708984375, -0.025848388671875, 0.00711822509765625, -0.00933837890625, -0.017730712890625, 0.0145263671875, 0.00864410400390625, -0.01739501953125, 0.01039886474609375, -0.025909423828125, -0.01953125, 0.0199127197265625, 0.0009160041809082031, 0.00005543231964111328, 0.01152801513671875, 0.0113677978515625, -0.005779266357421875, -0.0439453125, -0.0108184814453125, 0.0197296142578125, 0.07647705078125, 0.0192413330078125, 0.049346923828125, -0.01132965087890625, -0.034912109375, -0.018646240234375, -0.00794219970703125, 0.001369476318359375, 0.0171661376953125, 0.003376007080078125, 0.042510986328125, -0.031890869140625, 0.0231475830078125, 0.024169921875, 0.0312347412109375, 0.042205810546875, -0.0020236968994140625, -0.04119873046875, 0.0062713623046875, 0.01033782958984375, -0.020477294921875, 0.018341064453125, -0.0196075439453125, 0.05828857421875, -0.00290679931640625, 0.00766754150390625, -0.01245880126953125, 0.09442138671875, -0.0158538818359375, -0.07110595703125, 0.058624267578125, -0.01800537109375, -0.009674072265625, 0.07861328125, 0.0024127960205078125, 0.06048583984375, -0.025787353515625, -0.0557861328125, 0.0042724609375, -0.038238525390625, -0.02313232421875, 0.006015777587890625, 0.026458740234375, -0.039398193359375, 0.05706787109375, 0.039581298828125, -0.0145111083984375, 0.0164947509765625, -0.007358551025390625, 0.033477783203125, 0.002197265625, 0.01534271240234375, 0.0268707275390625, -0.01285552978515625, 0.0101776123046875, -0.005687713623046875, 0.018768310546875, 0.04779052734375, 0.0262298583984375, -0.002880096435546875, 0.02734375, 0.046295166015625, 0.0212554931640625, 0.0150604248046875, -0.005870819091796875, 0.0377197265625, -0.0191802978515625, 0.0195465087890625, -0.019195556640625, -0.017669677734375, 0.0009388923645019531, 0.03192138671875, -0.020416259765625, 0.003948211669921875, -0.025360107421875, 0.0211639404296875, -0.01110076904296875, 0.01511383056640625, -0.035614013671875, -0.0262908935546875, -0.0278472900390625, -0.013824462890625, 0.0051727294921875, -0.0253143310546875, -0.008697509765625, 0.014892578125, 0.046295166015625, -0.023895263671875, 0.0305938720703125, -0.01485443115234375, 0.034454345703125, 0.0183563232421875, 0.022735595703125, -0.006805419921875, 0.01953125, -0.006824493408203125, 0.0117645263671875, 0.02294921875, 0.01678466796875, 0.002315521240234375, 0.006916046142578125, 0.021484375, 0.049774169921875, 0.046234130859375, -0.0249176025390625, 0.01666259765625, 0.0635986328125, -0.0252685546875, -0.041351318359375, -0.02825927734375, -0.02825927734375, -0.06689453125, 0.003993988037109375, 0.0267333984375, -0.02215576171875, -0.020050048828125, -0.02557373046875, 0.0191802978515625, 0.0187835693359375, 0.01434326171875, -0.0648193359375, 0.048736572265625, -0.028900146484375, 0.0286102294921875, -0.020233154296875, 0.047454833984375, -0.0364990234375, -0.036163330078125, -0.03997802734375, -0.0230865478515625, -0.023468017578125, 0.06353759765625, 0.0103759765625, 0.01038360595703125, 0.020904541015625, -0.01117706298828125, 0.03515625, 0.0011577606201171875, 0.02099609375, 0.06121826171875, -0.0139007568359375, -0.0012769699096679688, 0.007236480712890625, 0.0261993408203125, -0.012115478515625, -0.0714111328125, -0.025543212890625, -0.0034275054931640625, 0.008392333984375, -0.0133209228515625, 0.00609588623046875, -0.005828857421875, -0.04058837890625, -0.08099365234375, 0.0592041015625, -0.01082611083984375, -0.0267181396484375, -0.0264892578125, -0.00234222412109375, 0.0041656494140625, -0.0157318115234375, -0.0153350830078125, -0.02813720703125, -0.03155517578125, 0.0287017822265625, 0.00897979736328125, 0.008575439453125, 0.020416259765625, -0.0172119140625, -0.053619384765625, 0.0059967041015625, 0.0026569366455078125, 0.0203094482421875, -0.044525146484375, 0.0092315673828125, -0.007526397705078125, 0.00411224365234375, -0.0186920166015625, -0.00862884521484375, 0.030242919921875, 0.019683837890625, -0.003231048583984375, 0.0009927749633789062, -0.02606201171875, 0.0020751953125, 0.1058349609375, -0.00801849365234375, 0.0239715576171875, -0.01373291015625, -0.041595458984375, -0.0294342041015625, -0.00823211669921875, 0.010894775390625, 0.020782470703125, -0.0416259765625, 0.036285400390625, 0.01358795166015625, 0.00791168212890625, -0.007038116455078125, -0.01401519775390625, -0.0244903564453125, -0.0139007568359375, 0.018096923828125, 0.025604248046875, -0.040496826171875, 0.01187896728515625, 0.0838623046875, -0.0303955078125, 0.050933837890625, 0.0165252685546875, -0.01267242431640625, 0.08758544921875, 0.05810546875, -0.019744873046875, 0.0199737548828125, -0.0313720703125, 0.004108428955078125, -0.0006632804870605469, -0.007404327392578125, -0.0175018310546875, 0.023468017578125, -0.0026683807373046875, -0.0007038116455078125, -0.00077056884765625, -0.02447509765625, 0.0099639892578125, -0.00839996337890625, -0.020904541015625, 0.040313720703125, -0.050079345703125, 0.033111572265625, -0.007511138916015625, -0.006343841552734375, 0.00943756103515625, 0.018798828125, 0.077392578125, -0.007610321044921875, 0.0032482147216796875, -0.019805908203125, -0.0289459228515625, -0.053009033203125, 0.0116119384765625, 0.00627899169921875, -0.01103973388671875, 0.0196380615234375 ]
c731935365f2d037ed10bb026192f74d2eefb051
Wordpress Stackexchange Q: Downloading Wordpress: Nightly Build vs. Stable Download Whats the difference between a nightly build and the latest stable download, and what is the ideal use case for each? On the Nightly Build Page it says: Development of WordPress moves fairly quickly and day-to-day things break as often as they are fixed. This high churn is part of our development process that aims to produce the most stable releases possible. Should this be interpreted to mean that the Nightly is a version with less bugs? I've been on support threads where an issue is brought up and it's suggested to download the nightly build (on WordPress forums and elsewhere) and I'm wondering if this is a best practice? Thanks very much. A: Stable release of WP is the one meant for production. Any serious issues (such as security) are addressed via minor releases. Some of the fixes for not that serious issues can be received ahead of schedule with Hotfix plugin. Non-stable versions are usually run by WordPress developers for the sake of experimentation and early access to new features. That is not meant to be general practice.
Q: Downloading Wordpress: Nightly Build vs. Stable Download Whats the difference between a nightly build and the latest stable download, and what is the ideal use case for each? On the Nightly Build Page it says: Development of WordPress moves fairly quickly and day-to-day things break as often as they are fixed. This high churn is part of our development process that aims to produce the most stable releases possible. Should this be interpreted to mean that the Nightly is a version with less bugs? I've been on support threads where an issue is brought up and it's suggested to download the nightly build (on WordPress forums and elsewhere) and I'm wondering if this is a best practice? Thanks very much. A: Stable release of WP is the one meant for production. Any serious issues (such as security) are addressed via minor releases. Some of the fixes for not that serious issues can be received ahead of schedule with Hotfix plugin. Non-stable versions are usually run by WordPress developers for the sake of experimentation and early access to new features. That is not meant to be general practice.
wordpress
{ "language": "en", "length": 188, "provenance": "stackexchange_00019.jsonl.gz:413554", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30145" }
[ 0.0205230712890625, -0.0233306884765625, -0.0035190582275390625, -0.07012939453125, -0.021820068359375, -0.00830841064453125, -0.041534423828125, -0.0047149658203125, -0.013519287109375, 0.0032901763916015625, 0.003021240234375, 0.022735595703125, -0.07110595703125, -0.0255584716796875, 0.00952911376953125, -0.04827880859375, 0.055450439453125, -0.053741455078125, -0.01357269287109375, -0.01837158203125, 0.0075531005859375, 0.01081085205078125, 0.00699615478515625, 0.094482421875, 0.03350830078125, -0.06500244140625, 0.0137939453125, -0.0221710205078125, 0.0117340087890625, -0.03839111328125, 0.01174163818359375, 0.03326416015625, 0.0204620361328125, -0.0096588134765625, 0.00904083251953125, -0.00966644287109375, 0.022674560546875, 0.0117340087890625, 0.027099609375, -0.003997802734375, 0.004795074462890625, -0.0009560585021972656, 0.0163116455078125, -0.0478515625, -0.007659912109375, 0.005313873291015625, 0.0016145706176757812, -0.0242767333984375, 0.01383209228515625, -0.0045318603515625, 0.00038886070251464844, -0.012908935546875, 0.025970458984375, -0.0236053466796875, -0.01947021484375, -0.03509521484375, -0.000010311603546142578, 0.0518798828125, 0.0180206298828125, -0.0078582763671875, -0.0175933837890625, 0.053680419921875, 0.0008153915405273438, -0.0181732177734375, 0.005496978759765625, -0.005985260009765625, 0.0011749267578125, 0.0190277099609375, -0.02850341796875, 0.0086212158203125, 0.021759033203125, -0.0268096923828125, -0.02630615234375, -0.04608154296875, -0.0166168212890625, 0.0506591796875, -0.0181427001953125, -0.03790283203125, 0.013427734375, 0.003582000732421875, 0.003833770751953125, 0.01268768310546875, -0.0298004150390625, -0.017425537109375, 0.029754638671875, 0.00920867919921875, -0.002918243408203125, -0.017059326171875, -0.0193939208984375, -0.005126953125, -0.02227783203125, 0.0181427001953125, -0.01380157470703125, 0.01434326171875, -0.03179931640625, -0.013519287109375, -0.00724029541015625, 0.0087890625, 0.004306793212890625, 0.0239410400390625, -0.02716064453125, -0.01482391357421875, 0.0164794921875, -0.0225677490234375, -0.0088958740234375, 0.03277587890625, 0.013427734375, 0.030609130859375, 0.0287628173828125, 0.0200653076171875, -0.005340576171875, 0.0023193359375, 0.01258087158203125, -0.09979248046875, 0.03851318359375, 0.045440673828125, 0.003692626953125, 0.06903076171875, 0.064208984375, 0.001064300537109375, 0.00887298583984375, 0.0304412841796875, -0.00580596923828125, -0.0033206939697265625, 0.0098724365234375, 0.006134033203125, 0.0023345947265625, -0.0297698974609375, -0.0792236328125, 0.0418701171875, -0.01361846923828125, -0.008209228515625, 0.052978515625, 0.0416259765625, -0.017822265625, -0.0193023681640625, -0.039886474609375, 0.012725830078125, -0.01540374755859375, 0.033416748046875, -0.0450439453125, -0.0577392578125, 0.005706787109375, -0.034912109375, 0.008026123046875, 0.007801055908203125, 0.029815673828125, 0.017425537109375, -0.00737762451171875, 0.0113067626953125, -0.00640106201171875, 0.0064544677734375, -0.004329681396484375, 0.0205230712890625, 0.051239013671875, -0.061492919921875, 0.0592041015625, -0.06927490234375, 0.07220458984375, -0.046630859375, -0.00847625732421875, -0.0124359130859375, 0.0092315673828125, -0.008819580078125, -0.005466461181640625, 0.002094268798828125, 0.0069732666015625, 0.00908660888671875, 0.0177764892578125, -0.01328277587890625, -0.008575439453125, -0.06036376953125, 0.04632568359375, -0.0134429931640625, -0.022186279296875, 0.042694091796875, 0.004802703857421875, 0.0273895263671875, 0.035125732421875, -0.042938232421875, -0.038482666015625, -0.042205810546875, 0.08306884765625, -0.0362548828125, -0.03985595703125, -0.040313720703125, 0.01326751708984375, 0.02117919921875, 0.05157470703125, 0.02093505859375, 0.0184173583984375, -0.0413818359375, 0.025054931640625, 0.0276336669921875, -0.014984130859375, -0.0526123046875, -0.00988006591796875, -0.003021240234375, -0.01522064208984375, -0.01995849609375, 0.003185272216796875, 0.05181884765625, -0.004596710205078125, 0.013641357421875, -0.019134521484375, 0.0229034423828125, -0.01064300537109375, 0.0269622802734375, -0.014068603515625, -0.003917694091796875, 0.01029205322265625, -0.0234832763671875, -0.000030994415283203125, -0.0081024169921875, -0.028717041015625, 0.0030918121337890625, -0.0565185546875, -0.0089263916015625, -0.02105712890625, 0.0478515625, -0.0221710205078125, 0.00217437744140625, -0.031341552734375, -0.03570556640625, 0.042083740234375, -0.017578125, 0.0130767822265625, -0.0213623046875, 0.07147216796875, 0.0093231201171875, -0.005847930908203125, -0.01041412353515625, 0.0009016990661621094, -0.002750396728515625, -0.0120391845703125, -0.0024776458740234375, 0.0025920867919921875, -0.08709716796875, 0.017425537109375, 0.05560302734375, 0.0250701904296875, 0.0163726806640625, -0.039154052734375, -0.02587890625, 0.0540771484375, -0.026580810546875, 0.0018367767333984375, -0.0061798095703125, -0.036956787109375, 0.016937255859375, 0.044097900390625, 0.0194244384765625, -0.00896453857421875, -0.0108642578125, -0.01479339599609375, 0.019775390625, 0.00847625732421875, 0.0019512176513671875, -0.0299835205078125, 0.039093017578125, -0.019256591796875, -0.006809234619140625, -0.01180267333984375, -0.00411224365234375, -0.0177001953125, -0.01203155517578125, 0.01177215576171875, 0.01027679443359375, 0.007053375244140625, -0.04119873046875, 0.0164642333984375, 0.0284576416015625, 0.02581787109375, 0.06976318359375, -0.0160675048828125, -0.006378173828125, -0.00490570068359375, -0.0248870849609375, -0.00020253658294677734, 0.006587982177734375, -0.036163330078125, 0.016754150390625, 0.023590087890625, -0.007648468017578125, -0.028900146484375, 0.0287017822265625, 0.046142578125, -0.0174407958984375, 0.0008645057678222656, 0.0016546249389648438, 0.0457763671875, -0.003475189208984375, -0.01168060302734375, -0.005374908447265625, 0.0263519287109375, -0.0175323486328125, 0.04681396484375, 0.0020465850830078125, 0.0007343292236328125, 0.0006184577941894531, 0.0601806640625, 0.04583740234375, -0.00914764404296875, 0.0088043212890625, -0.00335693359375, 0.01247406005859375, 0.0621337890625, -0.0673828125, -0.06170654296875, 0.06500244140625, -0.155517578125, -0.0430908203125, 0.0184478759765625, 0.051025390625, -0.031463623046875, -0.051666259765625, -0.0177764892578125, 0.00885009765625, -0.048095703125, -0.04168701171875, -0.138916015625, -0.024871826171875, 0.04913330078125, 0.021026611328125, 0.029022216796875, -0.004146575927734375, 0.032958984375, 0.05401611328125, -0.02496337890625, -0.0131378173828125, 0.0113372802734375, -0.0174560546875, -0.015655517578125, 0.015899658203125, 0.006290435791015625, 0.0084991455078125, -0.00023496150970458984, 0.0423583984375, 0.0015316009521484375, -0.042999267578125, 0.0021800994873046875, 0.0537109375, -0.01605224609375, -0.0161590576171875, 0.005817413330078125, 0.015960693359375, -0.0211639404296875, 0.002056121826171875, -0.033721923828125, 0.0196685791015625, -0.004764556884765625, -0.01131439208984375, -0.0009860992431640625, -0.001373291015625, 0.0020046234130859375, 0.027740478515625, 0.00025916099548339844, 0.0011444091796875, -0.0312042236328125, -0.047027587890625, -0.03424072265625, -0.006824493408203125, -0.0472412109375, 0.044830322265625, 0.02984619140625, -0.0093536376953125, 0.01541900634765625, 0.0160675048828125, -0.061248779296875, -0.0275115966796875, 0.0845947265625, -0.048583984375, 0.003307342529296875, -0.046234130859375, -0.09814453125, -0.048370361328125, 0.0262603759765625, -0.03717041015625, 0.06610107421875, 0.00933837890625, -0.0204010009765625, -0.02117919921875, -0.006011962890625, -0.032958984375, -0.00485992431640625, 0.00794219970703125, -0.0390625, 0.00893402099609375, -0.0095367431640625, 0.0056304931640625, -0.0186004638671875, 0.0311279296875, -0.0274200439453125, -0.0019168853759765625, 0.00865936279296875, 0.003955841064453125, -0.04541015625, -0.0009007453918457031, -0.0706787109375, 0.015533447265625, 0.01245880126953125, 0.0008349418640136719, -0.005725860595703125, -0.0014467239379882812, -0.009063720703125, -0.005062103271484375, 0.0183258056640625, -0.0224609375, 0.0042877197265625, -0.0080108642578125, -0.002513885498046875, -0.0195159912109375, -0.0196990966796875, -0.0208282470703125, 0.0061798095703125, -0.0413818359375, 0.01287841796875, -0.006359100341796875, -0.026641845703125, 0.015869140625, 0.04205322265625, -0.00852203369140625, 0.020843505859375, 0.026214599609375, 0.00383758544921875, 0.0135650634765625, -0.0024623870849609375, -0.0257720947265625, 0.0225067138671875, 0.045440673828125, 0.0245361328125, 0.0017995834350585938, 0.00849151611328125, -0.0550537109375, -0.080078125, -0.032501220703125, -0.0188751220703125, 0.08099365234375, -0.0082550048828125, -0.021728515625, 0.0223236083984375, 0.006862640380859375, 0.0021419525146484375, 0.04327392578125, -0.01251983642578125, 0.005916595458984375, -0.013671875, -0.00536346435546875, 0.03607177734375, 0.053466796875, -0.019134521484375, -0.0161285400390625, 0.05523681640625, 0.0266265869140625, -0.043182373046875, 0.015869140625, 0.0112762451171875, 0.0275115966796875, -0.021270751953125, 0.07696533203125, 0.049835205078125, 0.0121612548828125, 0.02227783203125, 0.0019893646240234375, -0.0162506103515625, 0.0303955078125, -0.032379150390625, 0.038421630859375, 0.0133514404296875, -0.0361328125, 0.034454345703125, 0.0220794677734375, 0.0024318695068359375, -0.01024627685546875, 0.0202484130859375, -0.038116455078125, -0.0055084228515625, 0.019500732421875, -0.0270538330078125, -0.020111083984375, 0.0025386810302734375, -0.0107574462890625, -0.0309295654296875, 0.02557373046875, 0.0198516845703125, -0.0133209228515625, -0.0206146240234375, 0.0110015869140625, -0.00580596923828125, 0.00838470458984375, 0.000751495361328125, 0.008758544921875, -0.0018520355224609375, 0.02294921875, -0.0166778564453125, -0.00891876220703125, -0.0124969482421875, 0.08984375, 0.01454925537109375, -0.03277587890625, -0.00838470458984375, -0.02142333984375, 0.0228271484375, 0.04052734375, 0.0400390625, 0.05609130859375, -0.0177459716796875, -0.034088134765625, -0.029754638671875, -0.0112152099609375, -0.015625, -0.06475830078125, -0.0426025390625, -0.025238037109375, -0.0186767578125, 0.021209716796875, 0.0279083251953125, -0.06976318359375, 0.050750732421875, 0.005756378173828125, 0.07196044921875, 0.050567626953125, -0.0670166015625, 0.003841400146484375, 0.10302734375, 0.01194000244140625, -0.10284423828125, 0.005199432373046875, 0.0036029815673828125, 0.016448974609375, -0.0213775634765625, -0.01019287109375, -0.0249786376953125, -0.01641845703125, 0.062744140625, -0.0195770263671875, -0.02105712890625, 0.05206298828125, 0.0614013671875, -0.04302978515625, -0.018890380859375, -0.0124969482421875, -0.00606536865234375, 0.005313873291015625, 0.01378631591796875, -0.0176849365234375, 0.016937255859375, -0.0098114013671875, 0.0308074951171875, -0.04034423828125, -0.00656890869140625, 0.0145263671875, -0.020294189453125, -0.053985595703125, -0.013916015625, 0.00025272369384765625, 0.04534912109375, -0.034698486328125, -0.0241546630859375, 0.035614013671875, -0.0033702850341796875, 0.02752685546875, -0.025848388671875, -0.0303955078125, -0.0396728515625, 0.00545501708984375, 0.022064208984375, -0.006969451904296875, -0.01506805419921875, -0.031585693359375, -0.0126495361328125, -0.033843994140625, -0.0110931396484375, -0.025238037109375, -0.04315185546875, 0.00543975830078125, 0.038299560546875, 0.029632568359375, -0.0009217262268066406, -0.03912353515625, -0.01445770263671875, -0.003200531005859375, 0.0248565673828125, 0.01476287841796875, 0.0034999847412109375, -0.00525665283203125, 0.014617919921875, 0.053131103515625, 0.00603485107421875, -0.0112762451171875, -0.0309906005859375, -0.03314208984375, 0.0251312255859375, 0.04022216796875, -0.004573822021484375, -0.041839599609375, 0.03692626953125, -0.07098388671875, 0.017730712890625, -0.0175628662109375, -0.01287078857421875, -0.00270843505859375, 0.013885498046875, -0.01012420654296875, 0.0009741783142089844, 0.03802490234375, -0.01284027099609375, 0.028594970703125, -0.03045654296875, -0.0021572113037109375, 0.0162506103515625, -0.0142669677734375, -0.0186004638671875, 0.01163482666015625, -0.01317596435546875, 0.0361328125, 0.0005974769592285156, 0.031951904296875, 0.09002685546875, -0.0257568359375, 0.0496826171875, 0.043701171875, 0.01091766357421875, 0.054168701171875, 0.0250091552734375, 0.012664794921875, -0.0294342041015625, 0.048309326171875, 0.0164947509765625, -0.0014801025390625, 0.031341552734375, -0.01493072509765625, 0.01169586181640625, 0.051910400390625, 0.08245849609375, -0.03118896484375, -0.0220794677734375, 0.02191162109375, -0.055877685546875, -0.01058197021484375, 0.001132965087890625, 0.0166778564453125, -0.049530029296875, 0.05377197265625, -0.0176849365234375, 0.0123138427734375, 0.026763916015625, -0.03118896484375, -0.01331329345703125, -0.003398895263671875, -0.00017774105072021484, 0.00473785400390625, -0.034393310546875, -0.00212860107421875, 0.0249481201171875, -0.0263519287109375, 0.021820068359375, -0.00627899169921875, -0.0115203857421875, -0.044281005859375, -0.055450439453125, -0.048492431640625, -0.015167236328125, -0.034515380859375, 0.0594482421875, 0.0012063980102539062, 0.03173828125, 0.036865234375, 0.00525665283203125, 0.01303863525390625, 0.0030517578125, 0.01358795166015625, 0.022064208984375, 0.01116180419921875, 0.01378631591796875, 0.0177154541015625, -0.0030307769775390625, 0.00009113550186157227, -0.02508544921875, -0.006008148193359375, -0.0008153915405273438, -0.02410888671875, 0.046600341796875, -0.0169830322265625, -0.017608642578125, 0.0256195068359375, 0.0198822021484375, -0.00266265869140625, -0.00807952880859375, 0.03497314453125, -0.061859130859375, -0.0284576416015625, 0.005611419677734375, -0.02227783203125, -0.0041656494140625, -0.0015096664428710938, -0.01323699951171875, 0.0292205810546875, -0.023681640625, -0.0026092529296875, 0.0273284912109375, 0.01041412353515625, -0.0173797607421875, -0.0087127685546875, -0.03741455078125, 0.01849365234375, -0.00769805908203125, 0.044281005859375, -0.0292816162109375, 0.0142974853515625, 0.0051727294921875, 0.01348876953125, -0.01372528076171875, -0.0011272430419921875, -0.0222320556640625, 0.0034084320068359375, 0.065673828125, 0.0399169921875, 0.03350830078125, 0.0228729248046875, -0.0006103515625, 0.0201568603515625, -0.0009927749633789062, -0.0229949951171875, 0.0189361572265625, -0.01515960693359375, -0.04986572265625, 0.0273895263671875, 0.02447509765625, 0.00920867919921875, 0.0020961761474609375, 0.03607177734375, -0.0472412109375, 0.0173797607421875, 0.036712646484375, 0.038238525390625, 0.045501708984375, -0.0023593902587890625, -0.0029621124267578125, 0.03570556640625, -0.00844573974609375, -0.0006804466247558594, 0.0209197998046875, -0.01306915283203125, -0.005542755126953125, 0.054351806640625, 0.03619384765625, -0.017364501953125, 0.016265869140625, 0.02178955078125, 0.00894927978515625, -0.0133514404296875, 0.010284423828125, -0.01038360595703125, 0.0212249755859375, -0.0220947265625, 0.00982666015625, -0.0036792755126953125, 0.0154571533203125, -0.0165863037109375, -0.03240966796875, 0.00336456298828125, -0.0165863037109375, 0.007709503173828125, -0.022125244140625, 0.0014543533325195312, -0.00458526611328125, 0.01348114013671875, -0.0268707275390625, 0.0143890380859375, 0.022613525390625, -0.0270233154296875, -0.0011463165283203125, 0.01509857177734375, -0.004230499267578125, 0.051849365234375, -0.024932861328125, 0.026397705078125, 0.038970947265625, 0.0249786376953125, -0.046234130859375, 0.08721923828125, -0.005619049072265625, -0.0024890899658203125, 0.0011463165283203125, 0.047607421875, 0.024017333984375, 0.00384521484375, -0.03070068359375, -0.0533447265625, 0.047882080078125, 0.03759765625, 0.048858642578125, -0.033935546875, 0.0207672119140625, 0.0260772705078125, -0.018096923828125, -0.006862640380859375, 0.02642822265625, 0.0025787353515625, -0.0799560546875, -0.0286712646484375, 0.022491455078125, 0.06317138671875, 0.0255126953125, 0.031494140625, 0.0269622802734375, 0.0304107666015625, -0.0100860595703125, 0.0205078125, 0.004383087158203125, 0.00506591796875, 0.0298309326171875, -0.0204925537109375, 0.017242431640625, 0.0033359527587890625, -0.003398895263671875, -0.00982666015625, -0.0125274658203125, 0.05718994140625, -0.0265045166015625, -0.0034027099609375, 0.02276611328125, 0.03277587890625, 0.0091400146484375, 0.01282501220703125, -0.004291534423828125, 0.02166748046875, -0.025115966796875, 0.021026611328125, 0.06298828125, 0.00894927978515625, -0.0574951171875, -0.036651611328125, -0.053802490234375, 0.036285400390625, 0.0254974365234375, 0.11737060546875, -0.0303497314453125, 0.036376953125, -0.00629425048828125, 0.04486083984375, -0.04541015625, -0.0164642333984375, -0.00988006591796875, -0.005474090576171875, 0.0179595947265625, 0.003997802734375, -0.052734375, -0.027313232421875, 0.04620361328125, -0.0538330078125, -0.026611328125, -0.0098114013671875, 0.0292816162109375, -0.01396942138671875, -0.052825927734375, -0.059234619140625, -0.043121337890625, 0.031341552734375, 0.0299072265625, -0.04547119140625, -0.064697265625, -0.0246734619140625, 0.0069732666015625, -0.007633209228515625, -0.01055145263671875, -0.0008916854858398438, 0.00846099853515625, -0.0219879150390625, 0.027069091796875, 0.0186309814453125, -0.018798828125, 0.01203155517578125, -0.01541900634765625, -0.032012939453125, 0.01251983642578125, 0.027862548828125, -0.01776123046875, 0.0231475830078125, 0.000007569789886474609, 0.00255584716796875, -0.0005927085876464844, -0.050811767578125, -0.00981903076171875, 0.04150390625, -0.0026702880859375, -0.0011873245239257812, 0.0016956329345703125, 0.006591796875, 0.01220703125, -0.038482666015625, -0.0139923095703125, 0.004566192626953125, -0.03753662109375, 0.025848388671875, -0.01271820068359375, 0.0133514404296875, 0.01515960693359375, -0.04132080078125, 0.0247802734375, 0.005828857421875, 0.0012378692626953125, -0.0083160400390625, -0.00681304931640625, -0.016143798828125, 0.00087738037109375, 0.0020694732666015625, -0.0711669921875, -0.054718017578125, 0.07769775390625, -0.04241943359375, 0.005832672119140625, 0.020477294921875, -0.0061798095703125, 0.040496826171875, -0.00846099853515625, -0.001010894775390625, 0.047149658203125, -0.0230255126953125, -0.033721923828125, 0.002216339111328125, 0.0091094970703125, 0.007091522216796875, -0.025177001953125, -0.016265869140625, -0.0007634162902832031, 0.0163116455078125, -0.0401611328125, -0.00012010335922241211, -0.00629425048828125, -0.047943115234375, -0.06683349609375, 0.045196533203125, -0.02734375, -0.027618408203125, -0.016387939453125, -0.001071929931640625, 0.0046844482421875, -0.043548583984375, -0.02484130859375, -0.0016222000122070312, -0.01043701171875, -0.00047779083251953125, 0.0251617431640625, 0.03436279296875, 0.0199737548828125, 0.02838134765625, 0.0267333984375, 0.058319091796875, 0.0555419921875, -0.00176239013671875, -0.00595855712890625, 0.01096343994140625, 0.026336669921875, 0.04974365234375, 0.0036182403564453125, 0.01544189453125, 0.00994873046875, -0.046661376953125, -0.007442474365234375, 0.007709503173828125, -0.0270843505859375, -0.008941650390625, 0.0191650390625, 0.049072265625, 0.0037593841552734375, -0.019195556640625, 0.02490234375, 0.0009126663208007812, -0.03564453125, -0.032135009765625, 0.0074462890625, -0.048980712890625, -0.0399169921875, -0.016204833984375, -0.003520965576171875, 0.0212554931640625, -0.04901123046875, -0.02294921875, -0.005748748779296875, -0.0263671875, 0.00951385498046875, -0.0032215118408203125, -0.0736083984375, 0.0721435546875, -0.0212249755859375, 0.0255279541015625, 0.04681396484375, 0.0178680419921875, 0.044464111328125, 0.10565185546875, 0.0204010009765625, 0.07421875, -0.056549072265625, -0.0095367431640625, 0.0211181640625, -0.0020885467529296875, -0.018951416015625, 0.0038585662841796875, 0.033111572265625, 0.00131988525390625, 0.0007219314575195312, 0.014404296875, 0.007785797119140625, -0.0070037841796875, -0.029998779296875, -0.01267242431640625, 0.00962066650390625, -0.007232666015625, -0.03533935546875, 0.07110595703125, -0.03009033203125, -0.0308380126953125, -0.00458526611328125, -0.035308837890625, 0.007007598876953125, -0.035675048828125, 0.00482940673828125, -0.01171112060546875, -0.0133819580078125, -0.038604736328125, -0.03839111328125, 0.003753662109375 ]
d9dbfcf48181985df8ad0dc2f30e5212a058e12d
Wordpress Stackexchange Q: WP_Query - Order results by meta value I've checked around and haven't seen an answer which works as of yet. I have a WP_Query with the following arguments: $args = array( 'post_status' => 'publish', 'post_type' => 'listing', 'meta_key' => 'client_feedback_score', 'orderby' => 'client_feedback_score', 'order' => 'DESC' ); $query = new WP_Query($args); I want to order the results by the custom post field client_feedback_score, lowest to highest. But this doesn't seem to work... can anyone point me in the right direction? EDIT (SOLVED): Thanks to Milo's response, here's the working code for ordering by a numerical meta value: $args = array( 'post_status' => 'publish', 'post_type' => 'listing', 'meta_key' => 'client_feedback_score', 'orderby' => 'meta_value_num', 'order' => 'DESC' ); A: orderby should be meta_value_num, or meta_value, not the name of the key. See WP_Query orderby parameters.
Q: WP_Query - Order results by meta value I've checked around and haven't seen an answer which works as of yet. I have a WP_Query with the following arguments: $args = array( 'post_status' => 'publish', 'post_type' => 'listing', 'meta_key' => 'client_feedback_score', 'orderby' => 'client_feedback_score', 'order' => 'DESC' ); $query = new WP_Query($args); I want to order the results by the custom post field client_feedback_score, lowest to highest. But this doesn't seem to work... can anyone point me in the right direction? EDIT (SOLVED): Thanks to Milo's response, here's the working code for ordering by a numerical meta value: $args = array( 'post_status' => 'publish', 'post_type' => 'listing', 'meta_key' => 'client_feedback_score', 'orderby' => 'meta_value_num', 'order' => 'DESC' ); A: orderby should be meta_value_num, or meta_value, not the name of the key. See WP_Query orderby parameters. A: if your meta value is not numeric for example if it is a date value; than you can add parameter meta_type => DATE. Possible values are; 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED'. Query with meta type will be like that: $args = array( 'post_status' => 'publish', 'post_type' => 'listing', 'meta_key' => 'client_feedback_score', 'orderby' => 'meta_value_num', 'meta_type' => 'DATE', 'order' => 'DESC' );
wordpress
{ "language": "en", "length": 200, "provenance": "stackexchange_00019.jsonl.gz:413584", "question_score": "74", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30241" }
[ 0.032684326171875, -0.0023345947265625, 0.052154541015625, 0.015869140625, -0.010223388671875, -0.01284027099609375, 0.0299072265625, -0.053192138671875, 0.054290771484375, 0.027679443359375, -0.0029163360595703125, -0.06304931640625, -0.01113128662109375, -0.0400390625, -0.0543212890625, -0.048492431640625, 0.03717041015625, 0.00946044921875, 0.034210205078125, 0.00661468505859375, 0.0247802734375, 0.03240966796875, 0.01751708984375, -0.0099639892578125, 0.024139404296875, -0.0149993896484375, 0.05010986328125, -0.06512451171875, 0.04888916015625, -0.005825042724609375, 0.0175628662109375, -0.0285491943359375, 0.01053619384765625, -0.022186279296875, 0.050323486328125, 0.000335693359375, 0.048858642578125, -0.020965576171875, 0.0094146728515625, 0.0244598388671875, 0.0390625, -0.017608642578125, -0.0239105224609375, 0.00150299072265625, -0.0135040283203125, -0.0380859375, 0.044525146484375, -0.0147247314453125, 0.04998779296875, -0.01666259765625, -0.00026607513427734375, 0.035614013671875, 0.02215576171875, -0.03076171875, -0.0275726318359375, -0.01690673828125, -0.004665374755859375, -0.004878997802734375, 0.0211944580078125, -0.003498077392578125, 0.0008082389831542969, 0.0159454345703125, 0.006072998046875, -0.006244659423828125, -0.00962066650390625, 0.0220794677734375, 0.030517578125, 0.001979827880859375, 0.01088714599609375, -0.026763916015625, -0.01488494873046875, 0.00279998779296875, 0.00968170166015625, -0.034454345703125, 0.005084991455078125, -0.0416259765625, -0.0011224746704101562, -0.044952392578125, -0.001224517822265625, 0.0284576416015625, 0.037322998046875, 0.018280029296875, -0.0168304443359375, 0.0177459716796875, -0.00206756591796875, 0.0180511474609375, -0.021636962890625, -0.02606201171875, -0.0160980224609375, -0.02984619140625, -0.00981903076171875, -0.0218658447265625, -0.02105712890625, 0.0069732666015625, -0.01318359375, -0.0254669189453125, 0.004852294921875, 0.018280029296875, -0.0204010009765625, -0.01519012451171875, -0.0268402099609375, -0.02587890625, -0.007785797119140625, -0.016082763671875, -0.00555419921875, -0.0033550262451171875, 0.0019330978393554688, 0.0034961700439453125, 0.033294677734375, 0.056549072265625, -0.0018224716186523438, 0.0116424560546875, -0.0197601318359375, -0.00315093994140625, -0.033905029296875, 0.0036563873291015625, -0.0587158203125, 0.012908935546875, 0.0019474029541015625, 0.009368896484375, 0.04473876953125, 0.04632568359375, 0.030731201171875, -0.05108642578125, 0.0197601318359375, 0.032623291015625, -0.03826904296875, -0.0682373046875, -0.05096435546875, 0.053680419921875, -0.0279083251953125, 0.01103973388671875, 0.04498291015625, 0.0204925537109375, -0.020904541015625, -0.0259552001953125, -0.018798828125, -0.02886962890625, 0.006744384765625, 0.01413726806640625, -0.01213836669921875, -0.042388916015625, 0.0445556640625, -0.0007910728454589844, -0.01442718505859375, 0.011383056640625, 0.00965118408203125, 0.00908660888671875, 0.004634857177734375, -0.0193328857421875, -0.01259613037109375, -0.00826263427734375, 0.0257720947265625, -0.00469970703125, -0.04852294921875, 0.002140045166015625, 0.0128631591796875, -0.0272674560546875, -0.028533935546875, -0.031707763671875, 0.0174102783203125, -0.0018148422241210938, 0.00821685791015625, -0.033294677734375, -0.0426025390625, -0.00337982177734375, -0.057861328125, -0.0206298828125, 0.01654052734375, 0.05718994140625, 0.00243377685546875, -0.005306243896484375, 0.0250244140625, 0.0095977783203125, -0.018646240234375, -0.012847900390625, 0.04217529296875, -0.01318359375, 0.00739288330078125, 0.00885009765625, -0.03717041015625, -0.0328369140625, 0.02764892578125, -0.0266265869140625, -0.0537109375, 0.051666259765625, 0.01055908203125, 0.050445556640625, -0.00829315185546875, 0.0009312629699707031, 0.058197021484375, 0.037017822265625, -0.06591796875, 0.051422119140625, 0.016143798828125, -0.019866943359375, -0.009307861328125, -0.0146636962890625, 0.0165252685546875, -0.028594970703125, -0.03240966796875, 0.031646728515625, -0.0299072265625, 0.006755828857421875, -0.062744140625, -0.0001577138900756836, -0.01302337646484375, 0.04644775390625, -0.023834228515625, 0.0008296966552734375, 0.0244293212890625, -0.035858154296875, -0.02276611328125, 0.034942626953125, -0.0233612060546875, -0.0268096923828125, -0.0135955810546875, 0.012054443359375, -0.023651123046875, 0.0251617431640625, -0.060699462890625, -0.0306854248046875, -0.058349609375, 0.0133819580078125, 0.0596923828125, -0.0179290771484375, 0.00685882568359375, -0.016204833984375, 0.0955810546875, -0.0182647705078125, 0.04205322265625, 0.003421783447265625, 0.038848876953125, 0.0521240234375, -0.004596710205078125, 0.0293121337890625, 0.02691650390625, -0.039794921875, -0.007633209228515625, 0.0238800048828125, 0.03271484375, 0.032806396484375, 0.043914794921875, 0.07501220703125, 0.039947509765625, -0.023193359375, 0.01837158203125, 0.0151519775390625, 0.048492431640625, 0.07720947265625, -0.0160064697265625, 0.003696441650390625, 0.0196380615234375, -0.045562744140625, 0.01491546630859375, 0.0306854248046875, -0.006465911865234375, 0.004337310791015625, -0.019744873046875, 0.0174407958984375, -0.005786895751953125, -0.00725555419921875, -0.01245880126953125, 0.0025730133056640625, 0.02899169921875, 0.01934814453125, 0.036834716796875, 0.030853271484375, -0.0238189697265625, 0.006084442138671875, 0.00919342041015625, 0.025421142578125, 0.01088714599609375, -0.0024318695068359375, -0.048126220703125, -0.01018524169921875, -0.0243988037109375, 0.019195556640625, 0.0168914794921875, -0.0273895263671875, 0.0165557861328125, 0.0445556640625, 0.004238128662109375, -0.0013427734375, -0.036224365234375, -0.0165252685546875, 0.025634765625, 0.06097412109375, -0.0282440185546875, -0.01190948486328125, 0.0164794921875, 0.03533935546875, -0.012298583984375, 0.0102386474609375, 0.0108795166015625, 0.00010782480239868164, -0.006206512451171875, -0.062408447265625, 0.033233642578125, -0.05535888671875, 0.04486083984375, 0.06396484375, -0.0010471343994140625, -0.018096923828125, -0.0187225341796875, 0.01450347900390625, -0.051055908203125, 0.03582763671875, 0.0017633438110351562, -0.05615234375, -0.0144500732421875, 0.0210723876953125, 0.04534912109375, 0.042449951171875, 0.0439453125, 0.004474639892578125, 0.0239105224609375, 0.039581298828125, -0.08380126953125, -0.1636962890625, 0.045074462890625, 0.002872467041015625, 0.0023250579833984375, -0.00724029541015625, -0.00260162353515625, -0.0113983154296875, -0.0295257568359375, -0.0150909423828125, 0.01105499267578125, 0.0017881393432617188, -0.07305908203125, -0.004596710205078125, -0.04266357421875, 0.01142120361328125, -0.012237548828125, 0.003978729248046875, 0.025146484375, 0.074462890625, 0.0234222412109375, -0.062164306640625, 0.0163726806640625, 0.0301971435546875, -0.033477783203125, 0.01477813720703125, 0.029296875, -0.0345458984375, -0.003662109375, -0.0023784637451171875, 0.054901123046875, 0.02166748046875, -0.03582763671875, 0.01490020751953125, -0.022216796875, 0.01457977294921875, 0.0231475830078125, -0.00443267822265625, 0.0016117095947265625, 0.0185546875, 0.0207672119140625, -0.02679443359375, -0.020599365234375, -0.005771636962890625, -0.024505615234375, 0.005847930908203125, 0.01094818115234375, 0.007411956787109375, -0.015472412109375, 0.01861572265625, 0.0198974609375, -0.0128631591796875, 0.06280517578125, -0.0170440673828125, 0.0086517333984375, -0.01462554931640625, -0.0016345977783203125, -0.061553955078125, 0.036407470703125, -0.01125335693359375, 0.01248931884765625, 0.0250701904296875, 0.0091552734375, -0.0161590576171875, 0.00453948974609375, -0.049560546875, -0.032470703125, 0.061553955078125, 0.007503509521484375, 0.0223846435546875, -0.05218505859375, -0.042755126953125, -0.037933349609375, 0.08001708984375, 0.017364501953125, -0.059356689453125, 0.0009608268737792969, 0.018707275390625, -0.057525634765625, 0.03924560546875, 0.0189056396484375, 0.0011997222900390625, -0.041778564453125, 0.0260772705078125, 0.0202178955078125, -0.03643798828125, -0.03765869140625, -0.01512908935546875, -0.05889892578125, -0.004302978515625, 0.038970947265625, -0.0236968994140625, 0.01129150390625, 0.0052947998046875, -0.013641357421875, -0.00582122802734375, -0.0299224853515625, -0.012481689453125, -0.026641845703125, -0.012359619140625, 0.0118560791015625, 0.025299072265625, -0.0030879974365234375, 0.00021588802337646484, -0.0085296630859375, 0.0271759033203125, -0.033599853515625, 0.015106201171875, 0.01052093505859375, 0.038787841796875, 0.0016040802001953125, 0.0087738037109375, 0.01544189453125, -0.040679931640625, -0.0203704833984375, -0.019561767578125, 0.00008434057235717773, 0.0004825592041015625, -0.031982421875, -0.0019445419311523438, -0.014984130859375, -0.01255035400390625, -0.03558349609375, -0.007358551025390625, -0.0276336669921875, 0.0108795166015625, -0.0252227783203125, -0.003993988037109375, -0.0103912353515625, -0.051422119140625, 0.034698486328125, 0.00226593017578125, -0.0293731689453125, -0.001262664794921875, 0.08746337890625, 0.017425537109375, -0.0192718505859375, -0.04290771484375, -0.030609130859375, 0.0159454345703125, -0.01114654541015625, -0.0196685791015625, -0.033355712890625, -0.0282440185546875, 0.05841064453125, -0.02960205078125, -0.00296783447265625, 0.029937744140625, 0.0187225341796875, -0.0128173828125, -0.056884765625, 0.037811279296875, -0.0169677734375, -0.0261688232421875, 0.0255279541015625, -0.0018358230590820312, -0.0225677490234375, -0.004833221435546875, 0.032989501953125, -0.016021728515625, 0.02264404296875, -0.00800323486328125, -0.043304443359375, 0.0190887451171875, -0.0232086181640625, -0.02313232421875, -0.0206298828125, 0.00475311279296875, -0.010162353515625, 0.002468109130859375, 0.004444122314453125, 0.0006976127624511719, 0.01055908203125, -0.007965087890625, 0.01568603515625, 0.01117706298828125, -0.007083892822265625, -0.01314544677734375, -0.01375579833984375, 0.1165771484375, 0.0013799667358398438, -0.038421630859375, -0.0322265625, -0.0197906494140625, 0.0302581787109375, -0.0025920867919921875, -0.0017414093017578125, 0.03448486328125, 0.06744384765625, -0.01076507568359375, -0.01006317138671875, -0.002162933349609375, 0.0247955322265625, -0.042572021484375, 0.0362548828125, 0.00312042236328125, -0.004535675048828125, -0.039581298828125, 0.099365234375, -0.028839111328125, 0.04193115234375, -0.016357421875, -0.0017862319946289062, 0.00945281982421875, -0.005825042724609375, 0.046875, -0.01519775390625, -0.0010728836059570312, -0.0233917236328125, 0.0125732421875, 0.023651123046875, 0.019561767578125, -0.0199432373046875, -0.03643798828125, 0.01282501220703125, 0.028289794921875, 0.05242919921875, 0.0168609619140625, -0.02813720703125, 0.0033779144287109375, 0.002399444580078125, -0.0182342529296875, -0.033721923828125, -0.06561279296875, -0.0272064208984375, 0.00534820556640625, 0.006626129150390625, -0.00948333740234375, -0.0263671875, 0.01324462890625, -0.047454833984375, 0.0230865478515625, -0.01311492919921875, -0.0223388671875, -0.01267242431640625, -0.005344390869140625, -0.004764556884765625, -0.05029296875, -0.0321044921875, 0.009552001953125, 0.0004298686981201172, 0.041168212890625, -0.02960205078125, 0.041412353515625, -0.051177978515625, 0.039276123046875, -0.047576904296875, 0.0161285400390625, 0.0269775390625, 0.0184173583984375, 0.014617919921875, -0.031402587890625, -0.0296173095703125, -0.017913818359375, 0.062347412109375, -0.0278472900390625, 0.024322509765625, -0.03204345703125, 0.0087738037109375, 0.021026611328125, -0.0022144317626953125, -0.051971435546875, -0.0350341796875, -0.01605224609375, 0.02215576171875, -0.01776123046875, -0.017608642578125, 0.06060791015625, -0.0236663818359375, 0.059295654296875, 0.0194244384765625, 0.033355712890625, -0.019805908203125, -0.01526641845703125, 0.0028018951416015625, -0.0288238525390625, -0.0278778076171875, -0.006595611572265625, -0.039031982421875, -0.0293121337890625, 0.022308349609375, -0.0188446044921875, 0.054656982421875, -0.01168060302734375, 0.00850677490234375, 0.0015869140625, -0.0423583984375, -0.0114593505859375, 0.023956298828125, 0.045013427734375, -0.01428985595703125, -0.01383209228515625, 0.0020503997802734375, -0.004413604736328125, 0.0005526542663574219, 0.01275634765625, 0.005126953125, -0.0117340087890625, -0.032196044921875, 0.0055694580078125, 0.032958984375, 0.0268402099609375, 0.022705078125, -0.021728515625, 0.01422882080078125, 0.0234222412109375, 0.00833892822265625, 0.056610107421875, 0.0008311271667480469, 0.0760498046875, -0.0095367431640625, -0.00811004638671875, 0.04046630859375, -0.0465087890625, 0.014923095703125, 0.01265716552734375, 0.034393310546875, -0.06365966796875, 0.0361328125, 0.005474090576171875, 0.01514434814453125, 0.03759765625, 0.0089874267578125, -0.0171661376953125, -0.0194244384765625, 0.0232086181640625, -0.0216217041015625, -0.015716552734375, 0.01450347900390625, -0.00980377197265625, -0.00032591819763183594, -0.01251983642578125, -0.010986328125, -0.0166168212890625, -0.02935791015625, -0.01500701904296875, 0.0141754150390625, -0.022552490234375, 0.0008244514465332031, 0.0015478134155273438, -0.00435638427734375, -0.0276641845703125, -0.081298828125, -0.032135009765625, -0.0290069580078125, -0.037750244140625, 0.0247955322265625, -0.01090240478515625, 0.036590576171875, 0.04461669921875, 0.0087738037109375, -0.0288543701171875, 0.0164642333984375, -0.0172882080078125, -0.0251922607421875, -0.031951904296875, 0.0033359527587890625, 0.0031642913818359375, -0.01239013671875, 0.02001953125, -0.0089111328125, -0.050689697265625, -0.0081634521484375, -0.002140045166015625, 0.04632568359375, -0.037445068359375, 0.0002982616424560547, 0.036865234375, 0.043609619140625, -0.0182952880859375, 0.00264739990234375, 0.037445068359375, -0.055633544921875, -0.0165863037109375, 0.023590087890625, 0.007724761962890625, -0.033905029296875, -0.00966644287109375, -0.04461669921875, 0.066650390625, -0.005252838134765625, 0.00226593017578125, 0.0011968612670898438, 0.0269775390625, -0.022308349609375, 0.01282501220703125, -0.0545654296875, 0.061798095703125, -0.0017995834350585938, 0.07421875, -0.08203125, -0.013885498046875, 0.0093994140625, 0.05792236328125, 0.06280517578125, 0.00989532470703125, -0.0699462890625, 0.0078277587890625, 0.07537841796875, 0.04156494140625, 0.0141143798828125, 0.057708740234375, 0.01580810546875, 0.0687255859375, 0.06744384765625, -0.027618408203125, 0.04388427734375, -0.006381988525390625, -0.03192138671875, 0.033172607421875, 0.0227813720703125, 0.034637451171875, -0.05084228515625, 0.0267486572265625, -0.055084228515625, -0.0133819580078125, 0.05419921875, -0.00786590576171875, 0.01189422607421875, 0.02435302734375, 0.0232391357421875, -0.03912353515625, -0.0638427734375, -0.01079559326171875, 0.0276336669921875, 0.0268402099609375, 0.02410888671875, 0.0445556640625, 0.0224456787109375, 0.034423828125, -0.00740814208984375, 0.01050567626953125, 0.00040650367736816406, -0.021636962890625, 0.053436279296875, -0.003505706787109375, -0.0009679794311523438, -0.0589599609375, 0.037933349609375, 0.018890380859375, 0.055908203125, -0.057861328125, -0.01250457763671875, 0.0186920166015625, -0.01116943359375, -0.005687713623046875, -0.0290679931640625, -0.01348114013671875, 0.0222320556640625, 0.01277923583984375, -0.047393798828125, -0.025787353515625, 0.0070343017578125, 0.0250396728515625, -0.015167236328125, -0.020263671875, 0.00200653076171875, -0.040130615234375, -0.0279693603515625, 0.0362548828125, 0.029266357421875, 0.0276031494140625, -0.02056884765625, 0.05657958984375, -0.021514892578125, -0.00450897216796875, -0.040985107421875, 0.024169921875, 0.0033206939697265625, 0.040557861328125, -0.044097900390625, -0.0112152099609375, 0.00800323486328125, 0.0360107421875, 0.0019292831420898438, 0.024169921875, 0.041412353515625, 0.060394287109375, 0.0040283203125, -0.0079193115234375, 0.058746337890625, -0.01201629638671875, -0.0556640625, -0.03094482421875, 0.033294677734375, 0.047943115234375, 0.03564453125, 0.0084228515625, 0.05267333984375, 0.0224456787109375, 0.01055145263671875, 0.01110076904296875, 0.00801849365234375, -0.0155487060546875, 0.04296875, 0.018035888671875, 0.0256500244140625, 0.023101806640625, -0.0173797607421875, -0.0005612373352050781, -0.0333251953125, -0.01904296875, 0.0130462646484375, 0.03948974609375, 0.019195556640625, 0.00440216064453125, -0.012420654296875, -0.04327392578125, 0.019073486328125, -0.00202178955078125, 0.024658203125, 0.0185394287109375, -0.022430419921875, -0.006122589111328125, -0.058013916015625, -0.0252685546875, 0.00179290771484375, 0.0229034423828125, -0.005123138427734375, 0.0316162109375, 0.00933837890625, 0.0158538818359375, -0.022216796875, -0.0190887451171875, 0.0167083740234375, -0.019927978515625, 0.0574951171875, 0.0174560546875, -0.04022216796875, -0.0123443603515625, 0.051025390625, -0.046112060546875, 0.0733642578125, -0.051513671875, -0.082763671875, 0.005496978759765625, 0.044921875, 0.0010747909545898438, 0.01172637939453125, -0.035491943359375, 0.0163726806640625, -0.0087432861328125, -0.031463623046875, 0.034698486328125, -0.0060882568359375, 0.007076263427734375, 0.0201873779296875, 0.03778076171875, -0.020355224609375, 0.05401611328125, -0.00708770751953125, 0.09442138671875, 0.0301971435546875, -0.0144195556640625, 0.032501220703125, -0.0011987686157226562, -0.03082275390625, 0.038604736328125, 0.0075531005859375, -0.0181121826171875, 0.0147552490234375, -0.002685546875, -0.0287933349609375, 0.008148193359375, 0.0279998779296875, 0.0172271728515625, -0.00914764404296875, -0.0127105712890625, -0.038177490234375, -0.01517486572265625, 0.0153350830078125, -0.04364013671875, -0.0215606689453125, 0.0287933349609375, 0.007717132568359375, 0.0283660888671875, -0.01434326171875, -0.0011959075927734375, 0.01126861572265625, 0.01364898681640625, -0.00751495361328125, 0.0086517333984375, 0.015106201171875, -0.044647216796875, -0.040191650390625, 0.019927978515625, -0.050201416015625, 0.002262115478515625, -0.0007348060607910156, -0.00836944580078125, 0.0126800537109375, -0.038604736328125, 0.0014448165893554688, -0.004596710205078125, 0.00450897216796875, 0.0031986236572265625, -0.00951385498046875, -0.0008187294006347656, 0.0170745849609375, -0.0006122589111328125, 0.043365478515625, 0.004100799560546875, 0.00798797607421875, 0.019134521484375, 0.034149169921875, -0.04498291015625, -0.08905029296875, 0.019256591796875, -0.0384521484375, 0.0231170654296875, -0.011627197265625, 0.04931640625, 0.07830810546875, 0.00390625, -0.045928955078125, 0.058929443359375, -0.016571044921875, -0.0290069580078125, -0.0245208740234375, -0.0226287841796875, 0.0110321044921875, 0.009307861328125, 0.00484466552734375, -0.01776123046875, -0.051513671875, -0.00835418701171875, 0.01080322265625, -0.0037250518798828125, 0.019378662109375, 0.03912353515625, -0.10284423828125, 0.007236480712890625, -0.03277587890625, -0.007633209228515625, -0.040191650390625, 0.0046844482421875, 0.0014505386352539062, -0.005474090576171875, -0.04046630859375, -0.002105712890625, 0.03863525390625, 0.06292724609375, 0.022216796875, -0.0286102294921875, -0.045654296875, -0.021209716796875, 0.05377197265625, 0.00913238525390625, 0.02593994140625, -0.016265869140625, 0.0090484619140625, -0.04022216796875, 0.0015878677368164062, -0.053802490234375, 0.00626373291015625, -0.0841064453125, -0.062255859375, 0.0240325927734375, 0.007110595703125, 0.01512908935546875, -0.00655364990234375, 0.007717132568359375, -0.01522064208984375, 0.035369873046875, 0.004627227783203125, -0.0277557373046875, -0.037384033203125, 0.05682373046875, -0.0400390625, 0.0011053085327148438, -0.0036640167236328125, 0.0288238525390625, 0.01448822021484375, 0.00173187255859375, -0.0028839111328125, 0.01035308837890625, 0.0203094482421875, 0.006175994873046875, 0.0268707275390625, -0.0282745361328125, 0.034454345703125, -0.00519561767578125, -0.0064697265625, 0.0145111083984375, 0.007717132568359375, -0.00771331787109375, -0.0207977294921875, 0.023468017578125, 0.007686614990234375, 0.057281494140625, -0.00926971435546875, 0.0499267578125, 0.0176239013671875, 0.0191650390625, 0.01971435546875, -0.02606201171875, 0.07708740234375, -0.0298614501953125, 0.026824951171875, -0.01076507568359375, 0.034912109375, 0.01248931884765625, -0.006946563720703125, 0.057220458984375, -0.035614013671875, 0.01190185546875 ]
bde7e7e7ba4453f8dee8ab898b7eee38a8847e61
Wordpress Stackexchange Q: How do I remove the admin bar (styling) from frontend only? When logged in, the admin bar adds the following to my page <head> section: <style media="screen" type="text/css"> html { margin-top: 28px !important; } * html body { margin-top: 28px !important; } </style> Now, I can remove this by disabling the admin bar /* Disable the Admin Bar. */ add_filter( 'show_admin_bar', '__return_false' ); or removing it completely /* Remove admin bar */ remove_action('init', 'wp_admin_bar_init'); I would like to keep the admin bar in the admin interface and only remove the CSS from front end. I already use CSS reset where I set margin: 0px, but the admin-bar styling overrides this. So how can I remove the styling from front end? PS. I know I can disable the admin bar per user, but that's not what I want. A: f you want to remove the admin bar (toolbar) AND the bump CSS from your page, use this: function wpse_99333_hide_admin_bar_from_front_end(){ if ( is_blog_admin() ) { return true; } remove_action( 'wp_head', '_admin_bar_bump_cb' ); return false; } add_filter( 'show_admin_bar', 'wpse_99333_hide_admin_bar_from_front_end' ); The _admin_bar_bump_cb function is the one that inserts the CSS (located in wp-includes/admin-bar.php)
Q: How do I remove the admin bar (styling) from frontend only? When logged in, the admin bar adds the following to my page <head> section: <style media="screen" type="text/css"> html { margin-top: 28px !important; } * html body { margin-top: 28px !important; } </style> Now, I can remove this by disabling the admin bar /* Disable the Admin Bar. */ add_filter( 'show_admin_bar', '__return_false' ); or removing it completely /* Remove admin bar */ remove_action('init', 'wp_admin_bar_init'); I would like to keep the admin bar in the admin interface and only remove the CSS from front end. I already use CSS reset where I set margin: 0px, but the admin-bar styling overrides this. So how can I remove the styling from front end? PS. I know I can disable the admin bar per user, but that's not what I want. A: f you want to remove the admin bar (toolbar) AND the bump CSS from your page, use this: function wpse_99333_hide_admin_bar_from_front_end(){ if ( is_blog_admin() ) { return true; } remove_action( 'wp_head', '_admin_bar_bump_cb' ); return false; } add_filter( 'show_admin_bar', 'wpse_99333_hide_admin_bar_from_front_end' ); The _admin_bar_bump_cb function is the one that inserts the CSS (located in wp-includes/admin-bar.php) A: function hide_admin_bar_from_front_end(){ if (is_blog_admin()) { return true; } return false; } add_filter( 'show_admin_bar', 'hide_admin_bar_from_front_end' ); Edit: As @Walf suggested in the comments, this could be writen as: add_filter('show_admin_bar', 'is_blog_admin'); A: I would do something like this : Remove admin bar / CSS in head / body class show_admin_bar(false); or if you just want to : Remove html margin-top CSS in <head> function remove_admin_bar_bump() { remove_action('wp_head', '_admin_bar_bump_cb'); } add_action('get_header', 'remove_admin_bar_bump'); Tested : Version 4.7.3 A: I recently had to do this, I just wanted wordpress's default inline css styles (for the admin bar) removed, but I did want the admin bar to remain. I was displaying the admin bar at the bottom of the page, not the top. Here is what got rid of injecting the styles from the _admin_bar_bump_cb function for me. I added the following to my functions.php // remove wordpress trying to style the admin bar with inline css function hide_admin_bar_from_front_end(){ remove_action( 'wp_head', '_admin_bar_bump_cb' ); return true; } add_filter( 'show_admin_bar', 'hide_admin_bar_from_front_end' );
wordpress
{ "language": "en", "length": 356, "provenance": "stackexchange_00019.jsonl.gz:413604", "question_score": "12", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30309" }
[ 0.024688720703125, -0.0010232925415039062, -0.0215301513671875, -0.00678253173828125, 0.01154327392578125, -0.04547119140625, 0.01116943359375, -0.0285186767578125, -0.00972747802734375, 0.00913238525390625, 0.0030841827392578125, -0.020599365234375, 0.00650787353515625, -0.043975830078125, 0.0071258544921875, -0.013153076171875, 0.03131103515625, 0.020965576171875, 0.04656982421875, 0.0067596435546875, 0.02130126953125, 0.0252227783203125, -0.00901031494140625, 0.0614013671875, -0.00885009765625, -0.0673828125, 0.1268310546875, -0.00554656982421875, 0.01297760009765625, -0.015838623046875, 0.02056884765625, -0.0171356201171875, -0.0127716064453125, 0.04669189453125, -0.021087646484375, 0.0279998779296875, -0.03814697265625, 0.049407958984375, 0.031829833984375, -0.02203369140625, 0.008941650390625, 0.0118560791015625, -0.0227203369140625, 0.02685546875, -0.0247955322265625, -0.0443115234375, 0.00023663043975830078, -0.0260009765625, 0.010772705078125, -0.057891845703125, 0.004856109619140625, -0.005649566650390625, 0.04107666015625, -0.03106689453125, -0.0171966552734375, 0.0162811279296875, -0.020751953125, -0.039825439453125, 0.0283203125, 0.0684814453125, 0.00919342041015625, -0.0192108154296875, -0.007526397705078125, -0.07379150390625, -0.012481689453125, 0.027557373046875, 0.0211944580078125, -0.0029010772705078125, -0.073486328125, -0.00374603271484375, 0.0242156982421875, -0.05230712890625, -0.00572967529296875, -0.007694244384765625, -0.049041748046875, -0.0053253173828125, -0.0192413330078125, -0.0244140625, 0.040374755859375, -0.023223876953125, 0.0247650146484375, 0.04327392578125, -0.042877197265625, -0.0195159912109375, 0.02960205078125, 0.0205078125, -0.00969696044921875, -0.0377197265625, -0.004962921142578125, -0.0169219970703125, -0.00905609130859375, -0.0419921875, -0.0298919677734375, 0.0305633544921875, 0.00669097900390625, -0.032806396484375, 0.048919677734375, 0.048736572265625, 0.01253509521484375, -0.037567138671875, 0.009918212890625, -0.033782958984375, -0.061309814453125, 0.0023136138916015625, -0.00032329559326171875, 0.05438232421875, -0.01824951171875, -0.0101318359375, 0.033721923828125, 0.017242431640625, 0.0273284912109375, -0.0016260147094726562, -0.0297698974609375, -0.02386474609375, -0.01045989990234375, 0.045074462890625, -0.0296630859375, 0.00536346435546875, -0.00890350341796875, 0.0280609130859375, -0.0236358642578125, -0.0125579833984375, 0.010009765625, -0.02044677734375, 0.02838134765625, 0.0083465576171875, -0.0390625, 0.0180511474609375, -0.023529052734375, -0.006195068359375, -0.035247802734375, 0.007053375244140625, 0.0711669921875, 0.06866455078125, 0.040771484375, -0.0211181640625, 0.02557373046875, 0.033355712890625, 0.0079193115234375, 0.014862060546875, 0.00803375244140625, -0.041961669921875, -0.0183563232421875, 0.0201873779296875, 0.00952911376953125, -0.006683349609375, 0.00742340087890625, 0.01531219482421875, 0.007549285888671875, -0.023101806640625, 0.0193634033203125, -0.04864501953125, 0.034210205078125, 0.0433349609375, -0.0165557861328125, 0.051666259765625, 0.06719970703125, -0.0007410049438476562, -0.0877685546875, -0.036285400390625, 0.00492095947265625, 0.018890380859375, 0.04498291015625, -0.00934600830078125, -0.0258636474609375, -0.0157470703125, -0.022552490234375, -0.0067901611328125, 0.034698486328125, 0.01654052734375, 0.0046539306640625, -0.0435791015625, 0.0250701904296875, 0.0367431640625, -0.005428314208984375, 0.0518798828125, 0.023193359375, 0.004573822021484375, 0.01320648193359375, 0.0189208984375, -0.0267486572265625, -0.03173828125, 0.057861328125, -0.041717529296875, -0.056976318359375, -0.00739288330078125, 0.01058197021484375, 0.032989501953125, 0.02655029296875, 0.00780487060546875, 0.048858642578125, -0.00145721435546875, 0.0130767822265625, -0.034423828125, -0.0160675048828125, -0.0021495819091796875, -0.027679443359375, 0.005878448486328125, -0.020538330078125, 0.034942626953125, -0.011749267578125, 0.0011310577392578125, 0.01538848876953125, 0.0109710693359375, -0.032562255859375, 0.00576019287109375, -0.018951416015625, 0.03375244140625, -0.002349853515625, 0.0291595458984375, 0.00754547119140625, -0.007396697998046875, -0.0241546630859375, -0.011566162109375, -0.00542449951171875, -0.005252838134765625, 0.0028438568115234375, 0.06243896484375, -0.005855560302734375, 0.05072021484375, 0.0001176595687866211, -0.0482177734375, -0.0018758773803710938, -0.0166778564453125, 0.058868408203125, 0.003143310546875, -0.0217437744140625, -0.01062774658203125, 0.0550537109375, -0.006305694580078125, -0.01473236083984375, 0.048370361328125, 0.00039505958557128906, 0.0224609375, -0.0188751220703125, -0.029937744140625, 0.00469207763671875, -0.09075927734375, 0.0230255126953125, 0.05596923828125, 0.0300445556640625, 0.018829345703125, -0.00762176513671875, 0.00667572021484375, 0.04248046875, -0.045654296875, -0.0008897781372070312, 0.01001739501953125, -0.0109405517578125, -0.00830841064453125, -0.029510498046875, 0.00530242919921875, 0.04656982421875, -0.035125732421875, 0.02325439453125, 0.0467529296875, -0.0158538818359375, -0.045440673828125, 0.001056671142578125, 0.025115966796875, 0.011138916015625, -0.002376556396484375, -0.0201263427734375, -0.0032901763916015625, 0.00586700439453125, -0.0107879638671875, 0.0197296142578125, 0.0164794921875, -0.017669677734375, -0.026885986328125, 0.041229248046875, 0.064453125, -0.007640838623046875, -0.0012416839599609375, 0.032196044921875, -0.0771484375, -0.038360595703125, 0.0107269287109375, 0.01508331298828125, -0.04229736328125, -0.0026607513427734375, 0.026580810546875, 0.0202484130859375, -0.0007729530334472656, 0.00878143310546875, -0.01806640625, 0.02032470703125, 0.002048492431640625, 0.005035400390625, -0.01480865478515625, -0.0044708251953125, 0.02459716796875, -0.024169921875, 0.052215576171875, -0.01360321044921875, -0.01511383056640625, 0.004730224609375, 0.0013647079467773438, 0.021881103515625, -0.007198333740234375, 0.06976318359375, 0.06427001953125, -0.01898193359375, 0.0307159423828125, 0.006076812744140625, -0.01451873779296875, 0.017669677734375, 0.0167083740234375, 0.0031986236572265625, -0.0284576416015625, 0.006435394287109375, 0.052154541015625, 0.03765869140625, -0.01165771484375, 0.032684326171875, -0.0188446044921875, -0.003429412841796875, 0.03216552734375, -0.0263214111328125, 0.01190185546875, -0.04962158203125, -0.0557861328125, -0.0251617431640625, 0.0083770751953125, -0.0279083251953125, 0.033538818359375, 0.020263671875, 0.012451171875, 0.047149658203125, -0.0143585205078125, -0.00875091552734375, 0.02325439453125, -0.0211181640625, -0.03887939453125, -0.0011463165283203125, -0.0306854248046875, 0.00432586669921875, 0.08251953125, 0.002765655517578125, -0.056640625, 0.0120849609375, -0.039947509765625, -0.007686614990234375, 0.037872314453125, 0.001865386962890625, -0.0213623046875, -0.0082244873046875, 0.01074981689453125, -0.057586669921875, -0.0252227783203125, 0.02734375, -0.029388427734375, -0.032470703125, -0.043243408203125, -0.013031005859375, 0.027008056640625, 0.034149169921875, -0.05511474609375, 0.0014181137084960938, -0.06414794921875, -0.051727294921875, 0.0275726318359375, -0.042449951171875, 0.0023250579833984375, 0.01873779296875, -0.0207366943359375, 0.0141754150390625, 0.0103607177734375, 0.055999755859375, 0.0198822021484375, 0.01242828369140625, 0.00864410400390625, 0.001667022705078125, 0.00794219970703125, 0.040496826171875, -0.046630859375, 0.00675201416015625, -0.037078857421875, 0.0311279296875, 0.01213836669921875, -0.016510009765625, 0.02410888671875, -0.0261077880859375, 0.048828125, -0.0102996826171875, 0.052825927734375, 0.02691650390625, 0.0098419189453125, 0.002655029296875, -0.0272064208984375, 0.022247314453125, 0.0748291015625, -0.05413818359375, -0.007366180419921875, 0.0164337158203125, 0.01158905029296875, -0.03338623046875, 0.01027679443359375, -0.06597900390625, -0.001728057861328125, -0.129150390625, 0.0016336441040039062, -0.0313720703125, -0.038421630859375, -0.0234222412109375, 0.017974853515625, -0.07562255859375, -0.058929443359375, 0.03106689453125, 0.0088958740234375, 0.005939483642578125, -0.002407073974609375, -0.0078277587890625, -0.0291595458984375, -0.0110626220703125, -0.005756378173828125, -0.0283355712890625, -0.01222991943359375, 0.004604339599609375, 0.018829345703125, -0.0148468017578125, 0.01751708984375, -0.0229339599609375, 0.0162200927734375, -0.0086822509765625, -0.052642822265625, 0.0170135498046875, 0.031707763671875, -0.0241546630859375, -0.0171966552734375, -0.021331787109375, -0.0299224853515625, -0.0215606689453125, 0.00201416015625, -0.04327392578125, -0.004215240478515625, -0.006710052490234375, -0.0263519287109375, 0.057952880859375, -0.0303497314453125, -0.0672607421875, -0.036468505859375, -0.01280975341796875, -0.01296234130859375, -0.00399017333984375, 0.0026702880859375, -0.0194091796875, -0.04632568359375, -0.004970550537109375, -0.017669677734375, -0.02490234375, 0.0242767333984375, 0.017333984375, 0.0235595703125, -0.00315093994140625, -0.0024261474609375, 0.010162353515625, 0.063232421875, 0.01593017578125, 0.0280303955078125, 0.02105712890625, -0.0479736328125, 0.06146240234375, 0.042327880859375, 0.0240020751953125, -0.02490234375, 0.028045654296875, -0.00652313232421875, -0.0276641845703125, 0.031280517578125, -0.0019741058349609375, 0.003536224365234375, -0.031585693359375, 0.007556915283203125, -0.01104736328125, -0.00820159912109375, -0.0042572021484375, 0.05902099609375, -0.03167724609375, -0.01224517822265625, -0.01390838623046875, -0.0021076202392578125, 0.00449371337890625, 0.01064300537109375, 0.01416015625, -0.00528717041015625, -0.010101318359375, 0.0037441253662109375, -0.01392364501953125, 0.01532745361328125, -0.00893402099609375, -0.0240631103515625, 0.01251220703125, -0.01334381103515625, -0.05255126953125, 0.024169921875, -0.008880615234375, 0.03387451171875, 0.0006480216979980469, -0.03546142578125, -0.01348114013671875, 0.00634002685546875, 0.06072998046875, 0.002872467041015625, 0.018707275390625, 0.0567626953125, -0.018890380859375, -0.0172882080078125, -0.01070404052734375, 0.0098114013671875, -0.06689453125, -0.048065185546875, 0.035797119140625, 0.006801605224609375, -0.0033016204833984375, 0.02459716796875, 0.03125, 0.01329803466796875, 0.0180511474609375, -0.0106201171875, 0.046844482421875, 0.002532958984375, 0.019927978515625, -0.019989013671875, 0.006877899169921875, 0.0418701171875, -0.0186004638671875, 0.031402587890625, -0.05377197265625, -0.009857177734375, 0.03155517578125, 0.0623779296875, 0.040283203125, -0.00215911865234375, -0.026947021484375, -0.0210113525390625, -0.0191650390625, 0.0594482421875, 0.0009679794311523438, -0.036346435546875, -0.024322509765625, 0.0157623291015625, 0.0255889892578125, -0.0276336669921875, -0.0092926025390625, 0.00617218017578125, -0.0168609619140625, 0.0120086669921875, 0.0187530517578125, -0.038970947265625, 0.00682830810546875, 0.0078277587890625, -0.00917816162109375, -0.0107574462890625, -0.0187530517578125, -0.03411865234375, -0.022247314453125, 0.00048422813415527344, -0.0009822845458984375, 0.0275115966796875, -0.0361328125, 0.0217742919921875, -0.031463623046875, 0.01861572265625, -0.03070068359375, -0.0005888938903808594, 0.057647705078125, 0.04412841796875, -0.0606689453125, 0.007808685302734375, -0.07049560546875, -0.0171356201171875, -0.0928955078125, -0.03399658203125, -0.0333251953125, 0.0193023681640625, 0.00852203369140625, 0.0129241943359375, 0.004047393798828125, 0.0115966796875, -0.0157928466796875, 0.057769775390625, 0.0293731689453125, 0.10711669921875, -0.026092529296875, 0.046417236328125, -0.0088653564453125, -0.00031948089599609375, -0.00428009033203125, 0.01003265380859375, -0.0006852149963378906, 0.0017719268798828125, 0.0312347412109375, 0.00296783447265625, -0.035858154296875, -0.02777099609375, -0.01507568359375, -0.01885986328125, 0.043212890625, -0.0199432373046875, 0.0184326171875, 0.006748199462890625, 0.005764007568359375, -0.046051025390625, -0.034515380859375, -0.03271484375, 0.0195159912109375, -0.06695556640625, 0.03466796875, 0.07476806640625, -0.03875732421875, -0.023223876953125, -0.01751708984375, 0.0049285888671875, 0.027252197265625, -0.0164947509765625, -0.03277587890625, 0.043304443359375, 0.09686279296875, 0.0276947021484375, 0.043060302734375, 0.037200927734375, 0.008575439453125, -0.017242431640625, -0.006992340087890625, 0.0164947509765625, -0.0004916191101074219, 0.031982421875, 0.007415771484375, 0.03350830078125, 0.0570068359375, -0.006282806396484375, 0.00749969482421875, 0.07794189453125, 0.058685302734375, -0.10101318359375, -0.00379180908203125, -0.00005519390106201172, 0.0107879638671875, 0.0697021484375, 0.0102996826171875, -0.049957275390625, -0.07086181640625, 0.040740966796875, -0.01464080810546875, -0.006793975830078125, 0.0184173583984375, 0.006710052490234375, -0.024871826171875, -0.021087646484375, 0.0108795166015625, 0.00777435302734375, 0.0008249282836914062, -0.0160675048828125, -0.002410888671875, -0.0242462158203125, -0.002101898193359375, 0.0243377685546875, -0.0244140625, -0.024078369140625, -0.043426513671875, -0.0122528076171875, 0.01166534423828125, -0.0328369140625, 0.048095703125, 0.0163116455078125, 0.004932403564453125, 0.051788330078125, -0.0229339599609375, 0.04901123046875, -0.0186614990234375, 0.019927978515625, -0.01654052734375, -0.02069091796875, 0.0091094970703125, -0.01398468017578125, -0.03216552734375, 0.026458740234375, -0.028961181640625, -0.038848876953125, -0.004924774169921875, -0.007354736328125, 0.07177734375, -0.0197296142578125, -0.027740478515625, 0.0168914794921875, 0.0014467239379882812, 0.00649261474609375, -0.03350830078125, 0.059173583984375, -0.038330078125, 0.01271820068359375, -0.00856781005859375, 0.01519775390625, -0.0110321044921875, -0.030548095703125, -0.043487548828125, 0.056121826171875, -0.025787353515625, 0.042694091796875, 0.055572509765625, -0.0004887580871582031, -0.031005859375, -0.0260467529296875, 0.0023822784423828125, 0.0231781005859375, 0.03155517578125, -0.04388427734375, -0.0234222412109375, -0.021209716796875, -0.040374755859375, 0.037322998046875, 0.03692626953125, 0.0105438232421875, -0.0028324127197265625, -0.0085296630859375, 0.044464111328125, 0.0161895751953125, -0.0176239013671875, 0.02581787109375, -0.0175628662109375, 0.0286712646484375, -0.009735107421875, -0.048797607421875, 0.0238189697265625, -0.057586669921875, -0.053253173828125, 0.0106201171875, 0.0195159912109375, 0.038055419921875, 0.02459716796875, 0.004886627197265625, -0.0005097389221191406, 0.00301361083984375, 0.023284912109375, -0.06512451171875, -0.02923583984375, 0.0218353271484375, -0.01465606689453125, -0.00968170166015625, 0.0224761962890625, -0.03192138671875, 0.03955078125, 0.00421142578125, -0.005977630615234375, -0.022369384765625, 0.017852783203125, -0.038665771484375, -0.0164642333984375, -0.007808685302734375, 0.038818359375, -0.052093505859375, 0.022247314453125, 0.0051422119140625, 0.0240325927734375, -0.036834716796875, 0.01036834716796875, -0.0030956268310546875, 0.0180511474609375, -0.02044677734375, -0.0263214111328125, 0.0160675048828125, -0.016082763671875, -0.017913818359375, -0.0226287841796875, -0.035003662109375, -0.0472412109375, -0.0079345703125, -0.00875091552734375, -0.0084991455078125, -0.01039886474609375, -0.01458740234375, 0.00632476806640625, 0.03936767578125, 0.0166015625, 0.017852783203125, -0.0038928985595703125, -0.043182373046875, 0.01235198974609375, 0.0372314453125, 0.050994873046875, -0.01239013671875, -0.0171051025390625, -0.029998779296875, -0.046295166015625, 0.041778564453125, 0.00848388671875, 0.0309295654296875, -0.048309326171875, 0.0032024383544921875, -0.03900146484375, 0.036590576171875, -0.0184478759765625, 0.0052032470703125, 0.00475311279296875, 0.006649017333984375, -0.0161285400390625, -0.0151519775390625, -0.00449371337890625, -0.022308349609375, 0.0084075927734375, -0.0262451171875, 0.0184478759765625, -0.007373809814453125, -0.0010499954223632812, 0.0035762786865234375, 0.0323486328125, -0.007663726806640625, 0.00913238525390625, -0.0225372314453125, 0.0197906494140625, -0.0085296630859375, 0.0157928466796875, 0.033660888671875, -0.0247802734375, 0.047332763671875, -0.041229248046875, -0.032440185546875, 0.0112152099609375, 0.0024356842041015625, 0.0111083984375, 0.0270843505859375, -0.02276611328125, 0.03778076171875, -0.008453369140625, -0.002010345458984375, -0.0105133056640625, -0.0175323486328125, 0.0225067138671875, -0.023956298828125, 0.0013570785522460938, -0.00228118896484375, -0.039947509765625, -0.036590576171875, -0.0286102294921875, 0.04217529296875, 0.018280029296875, 0.0281524658203125, 0.00865936279296875, 0.033966064453125, -0.037109375, 0.019439697265625, -0.0208740234375, -0.006374359130859375, -0.022857666015625, 0.023895263671875, 0.00910186767578125, -0.00366973876953125, -0.0509033203125, 0.006610870361328125, 0.0518798828125, -0.035400390625, 0.0199127197265625, 0.022796630859375, -0.0046844482421875, -0.06719970703125, -0.00034236907958984375, -0.0118408203125, -0.00685882568359375, 0.00978851318359375, 0.016815185546875, 0.0261077880859375, 0.0242919921875, -0.040313720703125, 0.01441192626953125, 0.0232086181640625, -0.01332855224609375, 0.035858154296875, -0.0081329345703125, 0.07720947265625, 0.045928955078125, -0.029693603515625, 0.0169525146484375, -0.0008063316345214844, -0.012725830078125, 0.0242156982421875, 0.02178955078125, -0.0172271728515625, 0.0147705078125, -0.00012540817260742188, 0.0036106109619140625, 0.01654052734375, 0.033538818359375, -0.015716552734375, 0.00960540771484375, 0.0232086181640625, -0.0160980224609375, -0.04241943359375, 0.0248260498046875, -0.030731201171875, -0.01641845703125, -0.0235443115234375, 0.0254974365234375, -0.029632568359375, -0.0635986328125, -0.10882568359375, 0.050872802734375, 0.041473388671875, -0.00479888916015625, -0.06658935546875, 0.049835205078125, -0.056793212890625, 0.073974609375, 0.001018524169921875, 0.05169677734375, -0.0254974365234375, 0.007144927978515625, -0.03680419921875, -0.0289154052734375, -0.03643798828125, 0.041534423828125, -0.04302978515625, -0.03741455078125, -0.00409698486328125, 0.018890380859375, 0.0323486328125, -0.059173583984375, -0.047454833984375, -0.01004791259765625, -0.053436279296875, -0.01412200927734375, 0.00902557373046875, 0.027984619140625, 0.001949310302734375, -0.043701171875, -0.0281219482421875, -0.000209808349609375, 0.005344390869140625, -0.04730224609375, 0.0045623779296875, 0.0024356842041015625, -0.036895751953125, -0.044158935546875, -0.03533935546875, 0.0052947998046875, -0.0254669189453125, -0.00039458274841308594, 0.00835418701171875, -0.0101776123046875, 0.037078857421875, 0.0036716461181640625, -0.03289794921875, -0.001331329345703125, 0.00730133056640625, 0.0255584716796875, 0.0138397216796875, 0.03436279296875, -0.0009059906005859375, -0.019073486328125, 0.01335906982421875, 0.0096893310546875, 0.01242828369140625, -0.0294647216796875, 0.0221405029296875, 0.018524169921875, 0.042144775390625, 0.0013885498046875, 0.01971435546875, 0.01111602783203125, -0.02972412109375, -0.01556396484375, 0.0074005126953125, -0.0236358642578125, 0.01219940185546875, 0.059051513671875, 0.0723876953125, 0.0194549560546875, -0.03173828125, -0.0546875, -0.0272979736328125, -0.0101318359375, -0.04095458984375, 0.030731201171875, -0.11663818359375, -0.0291900634765625, 0.02386474609375, -0.0020599365234375, 0.017852783203125, -0.010009765625, -0.006862640380859375, -0.00423431396484375, 0.0238800048828125, 0.0061492919921875, -0.0423583984375, -0.0237274169921875, 0.03143310546875, -0.0288543701171875, -0.032684326171875, -0.00882720947265625, 0.021026611328125, -0.00447845458984375, -0.006015777587890625, -0.00545501708984375, -0.0219573974609375, -0.031707763671875, 0.0374755859375, -0.0204925537109375, 0.02801513671875, -0.056549072265625, -0.0100860595703125, 0.00417327880859375, -0.01313018798828125, 0.0012235641479492188, -0.02349853515625, -0.0147247314453125, 0.0291900634765625, -0.0115509033203125, 0.0073089599609375, 0.0022449493408203125, 0.052642822265625, -0.0097808837890625, 0.034576416015625, 0.029876708984375, -0.018524169921875, 0.06201171875, -0.0250701904296875, -0.0174560546875, 0.01556396484375, 0.0213165283203125, -0.1058349609375, 0.06134033203125, -0.0118255615234375, 0.07562255859375, 0.050750732421875 ]
1f820bde65a1bcded4bf9f334769fc3621eeab29
Wordpress Stackexchange Q: Conditional for single-{post-type}.php Please help with this code for custom post type "video": If is single-video.php page { list custom-taxonomy of video. Example actors } Else { do nothing } I´m tried with is_single, is_singular, is_page_template but imposible. A: According to the WordPress conditional docs it should be: if ( is_singular( 'video' ) ) { // do conditional stuff } else { //do other stuff } Also if you want a blank page or no content to show when the CPT is not video you don't really need the else so you could omit it. You could ALSO do something like: if ( ! is_singular( 'video' ) ) { // do nothing } else { //do conditional stuff }
Q: Conditional for single-{post-type}.php Please help with this code for custom post type "video": If is single-video.php page { list custom-taxonomy of video. Example actors } Else { do nothing } I´m tried with is_single, is_singular, is_page_template but imposible. A: According to the WordPress conditional docs it should be: if ( is_singular( 'video' ) ) { // do conditional stuff } else { //do other stuff } Also if you want a blank page or no content to show when the CPT is not video you don't really need the else so you could omit it. You could ALSO do something like: if ( ! is_singular( 'video' ) ) { // do nothing } else { //do conditional stuff }
wordpress
{ "language": "en", "length": 120, "provenance": "stackexchange_00019.jsonl.gz:413613", "question_score": "12", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30341" }
[ 0.052825927734375, 0.006778717041015625, -0.0028705596923828125, -0.0604248046875, 0.0175628662109375, 0.016571044921875, 0.00748443603515625, -0.023193359375, 0.00627899169921875, -0.005268096923828125, -0.052764892578125, 0.0037670135498046875, -0.037506103515625, -0.0270538330078125, 0.01019287109375, -0.0540771484375, 0.0032825469970703125, 0.03216552734375, 0.038421630859375, -0.0179901123046875, 0.00952911376953125, -0.01380157470703125, 0.0094451904296875, -0.0291900634765625, -0.00377655029296875, -0.01922607421875, 0.058990478515625, -0.040802001953125, 0.0008225440979003906, -0.03125, 0.01186370849609375, 0.035675048828125, -0.0017337799072265625, 0.0169219970703125, 0.0032196044921875, 0.035736083984375, -0.0120849609375, 0.017730712890625, 0.035675048828125, -0.004413604736328125, -0.01018524169921875, 0.0253143310546875, 0.0018625259399414062, -0.00948333740234375, -0.0004229545593261719, -0.044464111328125, -0.01386260986328125, -0.05029296875, 0.042510986328125, -0.0222930908203125, -0.0007839202880859375, -0.033843994140625, 0.0009207725524902344, -0.002407073974609375, -0.03350830078125, -0.004207611083984375, -0.0252838134765625, -0.0261993408203125, 0.0146942138671875, 0.0191192626953125, 0.0015239715576171875, -0.009185791015625, 0.01505279541015625, -0.0013484954833984375, -0.01250457763671875, 0.00872802734375, -0.0278778076171875, 0.01129913330078125, -0.02325439453125, -0.04620361328125, 0.010101318359375, -0.0009393692016601562, 0.009368896484375, -0.00865936279296875, -0.01076507568359375, -0.0173492431640625, 0.02496337890625, -0.017730712890625, 0.0076141357421875, 0.0016326904296875, 0.02764892578125, 0.01641845703125, 0.0190887451171875, -0.048004150390625, 0.03887939453125, -0.006702423095703125, -0.00585174560546875, -0.0255584716796875, -0.035308837890625, -0.02264404296875, -0.0257110595703125, -0.0146331787109375, -0.029296875, -0.03216552734375, -0.01126861572265625, -0.03826904296875, 0.037506103515625, 0.04522705078125, -0.0093994140625, -0.018585205078125, 0.03021240234375, -0.0654296875, 0.01418304443359375, -0.03753662109375, 0.0303192138671875, 0.018798828125, 0.00461578369140625, -0.054443359375, 0.0382080078125, 0.0049591064453125, -0.0208892822265625, 0.08453369140625, -0.0212860107421875, -0.002422332763671875, -0.041839599609375, 0.007415771484375, -0.03912353515625, -0.0022220611572265625, -0.0173492431640625, 0.03765869140625, 0.0179443359375, 0.0416259765625, 0.075439453125, -0.0718994140625, -0.006866455078125, -0.003383636474609375, -0.044677734375, -0.0750732421875, 0.0291595458984375, 0.0369873046875, -0.041229248046875, 0.00832366943359375, 0.05975341796875, 0.004619598388671875, -0.00391387939453125, -0.03106689453125, 0.00994110107421875, 0.050506591796875, -0.01105499267578125, 0.0299835205078125, -0.01776123046875, -0.020751953125, 0.0153350830078125, -0.0226287841796875, 0.02691650390625, 0.022369384765625, 0.027191162109375, 0.01410675048828125, -0.0118408203125, -0.066162109375, 0.06341552734375, -0.022308349609375, 0.0341796875, 0.0124664306640625, 0.0088043212890625, 0.003002166748046875, 0.0222930908203125, -0.020294189453125, -0.0179290771484375, -0.03448486328125, 0.04736328125, -0.00626373291015625, -0.01262664794921875, -0.02191162109375, -0.0350341796875, 0.01146697998046875, -0.0693359375, -0.0041046142578125, 0.01261138916015625, 0.01235198974609375, -0.06085205078125, 0.002593994140625, 0.040191650390625, 0.020843505859375, -0.0067138671875, 0.03936767578125, -0.02606201171875, -0.0322265625, 0.03155517578125, 0.0240936279296875, -0.01371002197265625, -0.024200439453125, 0.0189666748046875, 0.006610870361328125, -0.0770263671875, 0.0631103515625, 0.0097198486328125, 0.0352783203125, 0.0179901123046875, -0.0010404586791992188, 0.060394287109375, 0.040069580078125, -0.04339599609375, 0.0103607177734375, 0.02557373046875, -0.0195465087890625, -0.012298583984375, -0.02484130859375, -0.0003371238708496094, -0.00772857666015625, 0.007175445556640625, 0.00872802734375, -0.0201416015625, -0.01499176025390625, -0.0225677490234375, -0.0238189697265625, -0.0010976791381835938, 0.0157470703125, -0.04290771484375, 0.0211029052734375, 0.02618408203125, -0.00506591796875, -0.01898193359375, -0.01016998291015625, 0.00901031494140625, -0.00664520263671875, 0.012786865234375, -0.0014886856079101562, -0.01462554931640625, -0.020172119140625, -0.015533447265625, -0.009796142578125, -0.0194244384765625, 0.04986572265625, 0.042022705078125, 0.0201416015625, -0.0213165283203125, 0.0019741058349609375, 0.036407470703125, 0.03411865234375, -0.013336181640625, -0.00030612945556640625, 0.027374267578125, -0.0137786865234375, -0.06048583984375, 0.006145477294921875, -0.01763916015625, -0.0126190185546875, -0.01229095458984375, 0.0595703125, 0.0188751220703125, -0.006839752197265625, -0.019989013671875, 0.01222991943359375, 0.051116943359375, 0.0014820098876953125, -0.00579071044921875, 0.01102447509765625, 0.00023746490478515625, 0.0235595703125, 0.0019121170043945312, -0.0097503662109375, 0.02154541015625, -0.0579833984375, 0.00792694091796875, 0.028472900390625, -0.017303466796875, 0.01268768310546875, 0.006122589111328125, 0.005031585693359375, -0.02618408203125, 0.042449951171875, 0.051483154296875, -0.0084991455078125, 0.048370361328125, -0.017822265625, 0.024200439453125, -0.0004799365997314453, -0.0198516845703125, 0.00980377197265625, 0.008056640625, -0.0250091552734375, -0.0013895034790039062, 0.038970947265625, 0.06671142578125, 0.04248046875, -0.022979736328125, -0.04888916015625, 0.03558349609375, 0.0306243896484375, -0.0244598388671875, 0.02447509765625, -0.041259765625, -0.0168304443359375, 0.004169464111328125, -0.01233673095703125, -0.01323699951171875, -0.0273895263671875, -0.028228759765625, -0.032012939453125, 0.0174713134765625, 0.02716064453125, -0.01430511474609375, 0.01107025146484375, -0.0219268798828125, -0.02484130859375, 0.0248260498046875, -0.031890869140625, 0.0557861328125, -0.050567626953125, 0.046600341796875, 0.05535888671875, -0.0521240234375, 0.04962158203125, -0.00739288330078125, -0.0051116943359375, -0.027923583984375, 0.03521728515625, -0.01105499267578125, -0.04345703125, -0.0112457275390625, 0.0207061767578125, 0.01352691650390625, 0.053466796875, 0.01219940185546875, -0.0340576171875, 0.027099609375, 0.03564453125, -0.002086639404296875, -0.03778076171875, 0.0447998046875, -0.076171875, 0.05108642578125, -0.0238189697265625, -0.0201873779296875, -0.043548583984375, 0.01206207275390625, 0.01397705078125, -0.0243988037109375, 0.0108489990234375, -0.03973388671875, -0.036163330078125, -0.048492431640625, 0.01422882080078125, -0.014923095703125, 0.017822265625, 0.0175933837890625, 0.054290771484375, 0.031951904296875, -0.048309326171875, 0.0258026123046875, -0.0038127899169921875, -0.022857666015625, 0.0155792236328125, -0.0016107559204101562, -0.016876220703125, -0.01073455810546875, 0.016326904296875, -0.035003662109375, -0.02032470703125, 0.0233001708984375, -0.02886962890625, 0.004474639892578125, -0.044586181640625, 0.026641845703125, 0.00569915771484375, -0.018035888671875, 0.01436614990234375, 0.059906005859375, -0.0355224609375, -0.023956298828125, 0.006069183349609375, -0.036590576171875, 0.049285888671875, 0.0323486328125, -0.020294189453125, -0.005496978759765625, 0.027191162109375, -0.0220489501953125, -0.0023326873779296875, -0.04571533203125, -0.0003719329833984375, 0.0113677978515625, 0.006336212158203125, 0.0023784637451171875, 0.047088623046875, -0.01690673828125, -0.035675048828125, -0.0208740234375, -0.04144287109375, 0.00342559814453125, -0.01486968994140625, 0.00539398193359375, -0.050079345703125, -0.0183868408203125, 0.03082275390625, -0.026763916015625, 0.012298583984375, -0.047576904296875, -0.0220184326171875, -0.0176849365234375, 0.056182861328125, -0.039581298828125, -0.01267242431640625, -0.0184478759765625, -0.00012767314910888672, 0.0185394287109375, -0.0406494140625, -0.00994873046875, -0.02777099609375, -0.0164794921875, 0.01384735107421875, 0.0121612548828125, -0.0171356201171875, -0.044830322265625, 0.001995086669921875, -0.05902099609375, -0.006496429443359375, 0.037261962890625, -0.033660888671875, 0.0298004150390625, 0.0254669189453125, 0.009796142578125, 0.0137481689453125, -0.0030269622802734375, -0.046844482421875, -0.047515869140625, -0.01318359375, 0.04400634765625, 0.003200531005859375, -0.0294342041015625, 0.0083160400390625, -0.0361328125, 0.0122528076171875, 0.0227813720703125, -0.0482177734375, -0.00034117698669433594, -0.03350830078125, 0.011749267578125, 0.05999755859375, -0.008209228515625, 0.01885986328125, -0.024932861328125, -0.0238494873046875, 0.00939178466796875, 0.042449951171875, -0.0245819091796875, -0.0104217529296875, -0.01418304443359375, 0.0015039443969726562, -0.039276123046875, -0.00626373291015625, 0.00042700767517089844, 0.037689208984375, -0.0089263916015625, 0.01305389404296875, -0.029693603515625, -0.0576171875, 0.019073486328125, -0.014801025390625, -0.02520751953125, 0.019195556640625, 0.0122222900390625, 0.016998291015625, -0.0250244140625, -0.053192138671875, 0.015777587890625, 0.044342041015625, -0.011322021484375, 0.05255126953125, 0.03802490234375, -0.0232086181640625, 0.04791259765625, 0.021575927734375, -0.00247955322265625, 0.00949859619140625, 0.049560546875, 0.01073455810546875, -0.011322021484375, 0.02020263671875, -0.00811004638671875, -0.013916015625, 0.0153961181640625, -0.0186767578125, -0.0243072509765625, 0.0119476318359375, 0.0428466796875, -0.020965576171875, 0.01922607421875, -0.033843994140625, -0.05487060546875, 0.0186614990234375, 0.0201416015625, 0.0214691162109375, 0.01422882080078125, 0.008056640625, 0.04876708984375, 0.003192901611328125, -0.00016486644744873047, -0.0005812644958496094, 0.058197021484375, -0.0207061767578125, 0.0221710205078125, 0.034576416015625, -0.01515960693359375, -0.035736083984375, 0.0116424560546875, -0.0457763671875, -0.00044465065002441406, -0.028594970703125, -0.034027099609375, 0.024932861328125, 0.00830078125, 0.00016188621520996094, 0.0640869140625, 0.062286376953125, 0.01025390625, -0.019561767578125, -0.008697509765625, 0.005863189697265625, 0.0159454345703125, -0.045318603515625, -0.0235137939453125, 0.0254669189453125, -0.032012939453125, -0.022613525390625, 0.030914306640625, 0.0303955078125, -0.0222930908203125, -0.023223876953125, 0.03466796875, 0.058746337890625, 0.01324462890625, 0.0267791748046875, -0.02484130859375, -0.039215087890625, 0.0151214599609375, -0.0265655517578125, -0.0285186767578125, -0.0367431640625, -0.01174163818359375, 0.0323486328125, -0.020355224609375, 0.011077880859375, 0.034637451171875, 0.0223388671875, -0.02191162109375, 0.00138092041015625, 0.01336669921875, -0.014404296875, -0.0014095306396484375, 0.024658203125, 0.0185546875, 0.01458740234375, -0.044097900390625, 0.0175628662109375, -0.053070068359375, 0.0240936279296875, 0.04119873046875, -0.043975830078125, 0.044769287109375, 0.04364013671875, -0.01105499267578125, -0.035797119140625, -0.002147674560546875, -0.0087738037109375, 0.023834228515625, -0.0194854736328125, -0.0340576171875, 0.0011920928955078125, -0.0107269287109375, 0.006381988525390625, -0.00815582275390625, -0.02783203125, 0.042327880859375, 0.006610870361328125, 0.045501708984375, -0.002941131591796875, -0.0616455078125, 0.031585693359375, -0.0506591796875, -0.00496673583984375, -0.0289764404296875, -0.054046630859375, -0.0526123046875, -0.0259857177734375, -0.019195556640625, -0.0084228515625, -0.0085296630859375, 0.01959228515625, 0.01690673828125, 0.06085205078125, -0.0013704299926757812, 0.01526641845703125, -0.0092315673828125, 0.0599365234375, 0.035614013671875, 0.037841796875, 0.0245513916015625, 0.0318603515625, -0.01271820068359375, -0.0209808349609375, -0.0192413330078125, -0.037322998046875, 0.018707275390625, 0.0016279220581054688, 0.036376953125, 0.0308074951171875, 0.0300140380859375, 0.01568603515625, 0.0238037109375, 0.0166778564453125, 0.0008134841918945312, 0.00110626220703125, -0.043792724609375, 0.037384033203125, 0.035888671875, 0.00921630859375, -0.0164642333984375, 0.01033782958984375, 0.002574920654296875, -0.07403564453125, 0.039794921875, 0.023345947265625, 0.023040771484375, 0.035675048828125, -0.0155487060546875, 0.0330810546875, 0.015960693359375, -0.001064300537109375, 0.032257080078125, -0.00701141357421875, 0.01421356201171875, 0.0131988525390625, -0.04718017578125, 0.0058135986328125, 0.03863525390625, 0.04107666015625, -0.0236053466796875, -0.005489349365234375, 0.0160980224609375, -0.028778076171875, 0.027374267578125, 0.052642822265625, 0.06439208984375, -0.0860595703125, 0.01056671142578125, 0.027008056640625, -0.01326751708984375, -0.0011415481567382812, -0.044464111328125, 0.016998291015625, -0.0016946792602539062, 0.005527496337890625, 0.043701171875, -0.04400634765625, -0.0214385986328125, -0.01183319091796875, -0.006175994873046875, -0.0119476318359375, 0.02569580078125, 0.00997161865234375, -0.06585693359375, 0.01361846923828125, 0.01904296875, -0.031097412109375, -0.0236663818359375, 0.0227203369140625, -0.0065765380859375, -0.0159912109375, -0.040313720703125, 0.018035888671875, -0.0012102127075195312, 0.0003993511199951172, 0.0168304443359375, 0.0049896240234375, 0.0017795562744140625, 0.045318603515625, -0.0335693359375, 0.007354736328125, 0.0189666748046875, -0.030120849609375, -0.06683349609375, -0.0209503173828125, 0.0149383544921875, 0.0399169921875, -0.053466796875, 0.037841796875, -0.033966064453125, -0.0155029296875, -0.00003170967102050781, -0.043914794921875, 0.00919342041015625, -0.01477813720703125, -0.0057525634765625, 0.012786865234375, 0.01265716552734375, 0.016357421875, 0.0118560791015625, 0.04217529296875, -0.0789794921875, -0.08721923828125, 0.036376953125, -0.08740234375, -0.025543212890625, 0.0097808837890625, -0.056610107421875, 0.05279541015625, 0.022308349609375, 0.027801513671875, -0.00023114681243896484, 0.0197296142578125, -0.0096282958984375, 0.01255035400390625, -0.026336669921875, 0.05157470703125, 0.006378173828125, 0.03173828125, -0.025299072265625, 0.00848388671875, 0.00946044921875, 0.00908660888671875, 0.017547607421875, -0.00855255126953125, -0.0038394927978515625, 0.057952880859375, 0.11749267578125, 0.049591064453125, 0.021484375, 0.00890350341796875, -0.035369873046875, -0.0138702392578125, -0.0213470458984375, 0.006954193115234375, 0.032928466796875, -0.0291595458984375, -0.0733642578125, -0.020355224609375, 0.031768798828125, 0.036865234375, 0.0001461505889892578, -0.0028705596923828125, -0.005092620849609375, -0.0063934326171875, 0.0146636962890625, 0.0264739990234375, -0.0086669921875, 0.0615234375, 0.047119140625, -0.04547119140625, 0.051177978515625, -0.056884765625, 0.0714111328125, -0.0156097412109375, -0.0164031982421875, 0.02825927734375, -0.0006313323974609375, -0.0176239013671875, -0.02703857421875, -0.0236663818359375, -0.0243377685546875, 0.02166748046875, 0.0230712890625, 0.0194091796875, 0.0011911392211914062, -0.0033397674560546875, 0.05877685546875, -0.003383636474609375, 0.0149078369140625, -0.03802490234375, -0.04083251953125, 0.01403045654296875, 0.001750946044921875, -0.019622802734375, 0.0020427703857421875, -0.01546478271484375, 0.033233642578125, 0.05780029296875, -0.0711669921875, 0.02001953125, 0.040313720703125, 0.0171966552734375, -0.0216522216796875, -0.016357421875, -0.045257568359375, 0.003753662109375, -0.07080078125, 0.00783538818359375, 0.0458984375, 0.11529541015625, 0.03338623046875, 0.0526123046875, -0.01141357421875, -0.06817626953125, 0.00617218017578125, -0.0038547515869140625, -0.02685546875, -0.01001739501953125, -0.0276641845703125, -0.062286376953125, 0.01255035400390625, 0.035888671875, 0.018707275390625, 0.052093505859375, 0.0273895263671875, 0.0161895751953125, 0.033355712890625, 0.00824737548828125, 0.065185546875, -0.0087127685546875, -0.035247802734375, -0.04425048828125, 0.0008096694946289062, 0.041961669921875, 0.010162353515625, 0.022247314453125, -0.0006103515625, 0.049713134765625, -0.016815185546875, 0.01399993896484375, 0.00591278076171875, -0.0218505859375, 0.0604248046875, 0.027862548828125, 0.07574462890625, 0.0276031494140625, -0.004150390625, 0.001983642578125, 0.006793975830078125, -0.088134765625, 0.0089263916015625, 0.042205810546875, -0.009307861328125, -0.0186309814453125, 0.03436279296875, 0.022674560546875, -0.0196685791015625, -0.01482391357421875, 0.01480865478515625, -0.0277252197265625, 0.034515380859375, 0.0171661376953125, -0.09033203125, -0.04522705078125, -0.060211181640625, 0.027618408203125, 0.01248931884765625, 0.0733642578125, 0.0006103515625, 0.033355712890625, -0.02215576171875, 0.037933349609375, -0.057373046875, -0.0460205078125, 0.050201416015625, -0.0251007080078125, 0.007076263427734375, 0.001743316650390625, -0.003021240234375, 0.03515625, 0.0226287841796875, -0.0240020751953125, 0.033233642578125, -0.033721923828125, 0.0008378028869628906, -0.01078033447265625, 0.0428466796875, -0.0223541259765625, -0.048309326171875, -0.0135498046875, 0.032989501953125, 0.00617218017578125, 0.00406646728515625, -0.042083740234375, 0.039703369140625, -0.062042236328125, -0.06219482421875, 0.00653839111328125, -0.07666015625, -0.018157958984375, 0.0187530517578125, 0.0082855224609375, -0.01141357421875, 0.0056304931640625, -0.0216827392578125, 0.011077880859375, 0.01312255859375, 0.0052490234375, 0.00772857666015625, -0.035430908203125, 0.0010280609130859375, -0.01374053955078125, -0.0117340087890625, -0.045684814453125, -0.027557373046875, 0.0467529296875, -0.01934814453125, 0.0005850791931152344, 0.0027065277099609375, -0.036865234375, -0.0188751220703125, 0.0051116943359375, 0.0009074211120605469, -0.00275421142578125, -0.0306854248046875, -0.03350830078125, -0.0277252197265625, 0.043304443359375, -0.031951904296875, 0.03802490234375, -0.045928955078125, -0.051788330078125, -0.0023174285888671875, -0.00420379638671875, -0.0052642822265625, 0.0095672607421875, 0.02825927734375, -0.03515625, 0.00893402099609375, -0.0189971923828125, -0.0270538330078125, -0.0016260147094726562, 0.036163330078125, 0.0711669921875, -0.0474853515625, -0.06634521484375, 0.0257568359375, 0.027252197265625, 0.05364990234375, 0.01666259765625, -0.004871368408203125, 0.00247955322265625, 0.0076904296875, -0.02752685546875, -0.053741455078125, 0.0172119140625, -0.05401611328125, -0.022491455078125, 0.022369384765625, -0.0167236328125, 0.0197296142578125, -0.03338623046875, -0.07891845703125, 0.09271240234375, -0.013763427734375, -0.0245361328125, -0.0216064453125, 0.019989013671875, -0.0281524658203125, 0.0248260498046875, 0.0016107559204101562, -0.0073699951171875, 0.026885986328125, 0.032379150390625, 0.00769805908203125, 0.009765625, 0.0714111328125, 0.01149749755859375, -0.034393310546875, -0.037017822265625, -0.046142578125, -0.0174560546875, 0.0218048095703125, -0.0072784423828125, -0.0107574462890625, -0.00850677490234375, -0.06689453125, -0.048370361328125, -0.028900146484375, 0.048065185546875, 0.0279083251953125, -0.043212890625, -0.059906005859375, -0.04998779296875, 0.049285888671875, 0.030029296875, 0.01953125, -0.0050201416015625, -0.0369873046875, -0.034332275390625, -0.0562744140625, 0.0004067420959472656, 0.02880859375, -0.0633544921875, 0.0136566162109375, 0.00885009765625, -0.011993408203125, 0.011444091796875, 0.0270538330078125, -0.04168701171875, -0.0017900466918945312, -0.0198516845703125, -0.022674560546875, -0.05853271484375, 0.0245208740234375, -0.0139923095703125, -0.002777099609375, -0.0002884864807128906, -0.01291656494140625, -0.004085540771484375, -0.01424407958984375, 0.0191192626953125, 0.038970947265625, -0.007495880126953125, -0.00997161865234375, -0.00823974609375, 0.0362548828125, 0.0289154052734375, 0.01314544677734375, -0.056304931640625, -0.02337646484375, 0.0100555419921875, 0.004756927490234375, 0.00884246826171875, -0.0286102294921875, 0.023223876953125, 0.004581451416015625, 0.013519287109375, -0.01528167724609375, 0.050537109375, 0.00316619873046875, -0.0023193359375, 0.01041412353515625, 0.0200653076171875, 0.0321044921875, -0.0010576248168945312, 0.00322723388671875, -0.0000013113021850585938, -0.0258331298828125, -0.0455322265625, 0.0222930908203125, -0.032318115234375, -0.01190948486328125, 0.0209197998046875 ]
b6da5a896a92c23e242f3e8e6adc07323d46b203
Wordpress Stackexchange Q: Remove Comments Metabox but still allow comments I already know how to remove a metabox from my custom post type edit page. However I want to remove the comments metabox but still allow commenting for the post. Because I notice when I do remove it, it disables comments. Any function I can use? A: Don't remove this via CSS. The _POST part is also active and WP save the data! Use the hooks to remove meta boxes; code by scratch. function fb_remove_comments_meta_boxes() { remove_meta_box( 'commentstatusdiv', 'post', 'normal' ); remove_meta_box( 'commentstatusdiv', 'page', 'normal' ); // remove trackbacks remove_meta_box( 'trackbacksdiv', 'post', 'normal' ); remove_meta_box( 'trackbacksdiv', 'page', 'normal' ); } add_action( 'admin_init', 'fb_remove_comments_meta_boxes' ); see more on a plugin to remove all UI-elements and function for comments: https://github.com/bueltge/Remove-Comments-Absolutely
Q: Remove Comments Metabox but still allow comments I already know how to remove a metabox from my custom post type edit page. However I want to remove the comments metabox but still allow commenting for the post. Because I notice when I do remove it, it disables comments. Any function I can use? A: Don't remove this via CSS. The _POST part is also active and WP save the data! Use the hooks to remove meta boxes; code by scratch. function fb_remove_comments_meta_boxes() { remove_meta_box( 'commentstatusdiv', 'post', 'normal' ); remove_meta_box( 'commentstatusdiv', 'page', 'normal' ); // remove trackbacks remove_meta_box( 'trackbacksdiv', 'post', 'normal' ); remove_meta_box( 'trackbacksdiv', 'page', 'normal' ); } add_action( 'admin_init', 'fb_remove_comments_meta_boxes' ); see more on a plugin to remove all UI-elements and function for comments: https://github.com/bueltge/Remove-Comments-Absolutely A: You can use the UI to remove it: Click on the "Screen Options" at the top right side of the edit screen and uncheck the Discussion check box or if you want to do it by code simply hide the container div by style="display:none;" function hide_comments_div() { global $pagenow; if ($pagenow=='post-new.php' OR $pagenow=='post.php') echo '<style>#commentstatusdiv{ display:none; }</style>'; } add_action('admin_head', 'hide_comments_div'); A: There is problem in file /wp-includes/post.php function wp_insert_post() if ( empty($comment_status) ) { if ( $update ) $comment_status = 'closed'; else $comment_status = get_option('default_comment_status'); } Your comments will be close after update. The solution is change callback of commentstatusdiv insted: add_action( 'add_meta_boxes', function () { global $wp_meta_boxes, $current_screen; $wp_meta_boxes[$current_screen->id]['normal']['core']['commentstatusdiv']['callback'] = function () { global $post; echo '<input type="hidden" value="' . $post->comment_status . '" name="comment_status"/>'; echo '<input type="hidden" value="' . $post->ping_status . '" name="ping_status"/>'; echo '<style type="text/css">#commentstatusdiv {display: none;}</style>'; }; } ); A: Add this in functions.php of your theme function tune_admin_area() { echo '<style>#commentstatusdiv{ display:none; }</style>'; } add_action('admin_head', 'tune_admin_area'); A: This is what I used to hide some of the meta boxes, including the comment status box: if (is_admin()) : function my_remove_meta_boxes() { if( !current_user_can('manage_options') ) { remove_meta_box('postcustom', 'post', 'normal'); remove_meta_box('trackbacksdiv', 'post', 'normal'); remove_meta_box('commentstatusdiv', 'post', 'normal'); remove_meta_box('slugdiv', 'post', 'normal'); } } add_action( 'admin_menu', 'my_remove_meta_boxes' ); function handle_comments_setting( $data ) { if( !current_user_can('manage_options') ) { $data['comment_status'] = "open"; } return $data; } add_filter( 'wp_insert_post_data', 'handle_comments_setting' ); endif; This way the meta boxes will be hidden for all the contributors, but not the administrators. In the second function comment_status is set to "open" only when the same conditions are met that caused the comments to be disabled in the first place.
wordpress
{ "language": "en", "length": 397, "provenance": "stackexchange_00019.jsonl.gz:413616", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30349" }
[ 0.06793212890625, -0.01401519775390625, 0.02227783203125, -0.026397705078125, 0.0014257431030273438, -0.0184326171875, 0.042724609375, -0.027252197265625, 0.0137939453125, 0.046783447265625, -0.00771331787109375, -0.024627685546875, -0.01302337646484375, -0.016143798828125, -0.05426025390625, -0.03125, 0.035186767578125, 0.01039886474609375, 0.0469970703125, -0.01519012451171875, 0.01300048828125, 0.0017786026000976562, 0.0294647216796875, 0.0634765625, 0.0116119384765625, -0.0567626953125, 0.09613037109375, 0.0064544677734375, 0.0189361572265625, -0.00533294677734375, 0.02105712890625, -0.0167999267578125, -0.01019287109375, 0.06585693359375, -0.039459228515625, 0.003803253173828125, -0.0255126953125, 0.041839599609375, 0.0201873779296875, 0.0167236328125, 0.029571533203125, -0.020355224609375, -0.0297088623046875, 0.0177764892578125, -0.0166473388671875, -0.0325927734375, 0.015960693359375, -0.04443359375, 0.0458984375, -0.001094818115234375, 0.0034046173095703125, 0.01049041748046875, 0.033172607421875, -0.0562744140625, -0.0289154052734375, -0.046295166015625, -0.048309326171875, -0.01355743408203125, 0.01412200927734375, 0.042694091796875, 0.0223541259765625, -0.00363922119140625, -0.007598876953125, -0.01226043701171875, 0.01025390625, -0.00960540771484375, -0.0233306884765625, 0.02606201171875, -0.04608154296875, 0.01309967041015625, 0.04376220703125, -0.048828125, 0.0018682479858398438, -0.0257568359375, 0.00897216796875, 0.0033397674560546875, -0.01474761962890625, -0.011810302734375, 0.0172882080078125, 0.0027523040771484375, 0.031280517578125, 0.0255126953125, -0.032989501953125, 0.023040771484375, -0.01123809814453125, 0.0242767333984375, -0.01285552978515625, -0.034332275390625, -0.042205810546875, -0.032684326171875, -0.0278167724609375, -0.11993408203125, -0.0165863037109375, 0.007843017578125, 0.0037860870361328125, -0.017578125, 0.03094482421875, 0.04150390625, -0.0228424072265625, -0.040771484375, -0.01088714599609375, -0.0204925537109375, -0.043304443359375, 0.0028591156005859375, 0.007904052734375, 0.01410675048828125, -0.04248046875, -0.07763671875, 0.026824951171875, 0.0567626953125, 0.0012073516845703125, -0.04315185546875, -0.0225372314453125, -0.01239776611328125, -0.011962890625, 0.01995849609375, -0.032257080078125, -0.002811431884765625, -0.0174102783203125, -0.00616455078125, 0.0183868408203125, 0.018829345703125, -0.00337982177734375, -0.00942230224609375, 0.033660888671875, 0.00839996337890625, -0.047454833984375, -0.005168914794921875, -0.0190887451171875, 0.01270294189453125, -0.043304443359375, 0.0010652542114257812, 0.07525634765625, 0.0584716796875, 0.0310211181640625, -0.025604248046875, 0.0143890380859375, -0.01483917236328125, -0.0010747909545898438, 0.01312255859375, 0.0136260986328125, -0.05975341796875, -0.01517486572265625, 0.013641357421875, -0.0220794677734375, 0.04534912109375, 0.0162353515625, -0.007617950439453125, -0.0021820068359375, -0.06585693359375, -0.017333984375, -0.0254974365234375, 0.0523681640625, -0.0006513595581054688, 0.0260162353515625, -0.048095703125, 0.08331298828125, -0.07525634765625, -0.00673675537109375, -0.065673828125, 0.023529052734375, 0.00695037841796875, 0.002201080322265625, -0.00557708740234375, -0.025604248046875, -0.0111541748046875, -0.0162200927734375, -0.00560760498046875, 0.006549835205078125, 0.0192108154296875, -0.01105499267578125, -0.004154205322265625, -0.0233917236328125, -0.0136871337890625, -0.005695343017578125, 0.0080413818359375, 0.040496826171875, 0.03289794921875, -0.0198211669921875, 0.00910186767578125, -0.0199432373046875, -0.05780029296875, 0.01177215576171875, -0.023468017578125, -0.051727294921875, 0.03741455078125, 0.0294647216796875, 0.034576416015625, -0.010833740234375, 0.01202392578125, 0.08160400390625, 0.03631591796875, -0.01212310791015625, -0.005496978759765625, 0.0176239013671875, -0.0197296142578125, -0.0086212158203125, -0.022857666015625, 0.003688812255859375, 0.016326904296875, 0.03106689453125, -0.0160369873046875, -0.01678466796875, 0.005725860595703125, -0.11480712890625, 0.0018358230590820312, -0.048553466796875, 0.039825439453125, -0.0296783447265625, 0.0228118896484375, 0.030548095703125, -0.0232086181640625, -0.0355224609375, 0.04180908203125, -0.002288818359375, -0.025970458984375, -0.0136260986328125, 0.043914794921875, -0.002056121826171875, 0.022552490234375, -0.0083770751953125, -0.021728515625, 0.0040740966796875, 0.003330230712890625, 0.06292724609375, 0.00008630752563476562, -0.01279449462890625, -0.019500732421875, 0.05810546875, -0.0013151168823242188, -0.0144805908203125, 0.035003662109375, -0.0009784698486328125, -0.00959014892578125, -0.006740570068359375, 0.0036773681640625, 0.01190948486328125, -0.07843017578125, -0.0003333091735839844, 0.044830322265625, 0.031829833984375, 0.0316162109375, 0.018585205078125, 0.04736328125, 0.0235595703125, -0.0399169921875, 0.01226806640625, 0.0013895034790039062, -0.0015707015991210938, 0.014923095703125, -0.007598876953125, 0.008697509765625, 0.032073974609375, 0.0092315673828125, 0.01045989990234375, 0.0244598388671875, -0.032440185546875, -0.0191192626953125, 0.03076171875, -0.01306915283203125, 0.0017480850219726562, -0.03558349609375, -0.00604248046875, -0.02301025390625, 0.001979827880859375, -0.040283203125, 0.014495849609375, 0.00510406494140625, 0.017333984375, -0.040252685546875, 0.022735595703125, -0.0173187255859375, -0.0021114349365234375, 0.060943603515625, 0.02935791015625, 0.03863525390625, -0.031341552734375, -0.020477294921875, 0.02520751953125, 0.05731201171875, 0.0082550048828125, 0.049346923828125, 0.007289886474609375, -0.00860595703125, -0.005565643310546875, -0.0374755859375, 0.0016841888427734375, 0.005706787109375, -0.00909423828125, -0.031219482421875, 0.0002865791320800781, 0.0162200927734375, -0.01055145263671875, 0.015838623046875, 0.033416748046875, -0.0182952880859375, 0.0235595703125, -0.054595947265625, 0.058197021484375, -0.0452880859375, 0.056884765625, 0.062408447265625, -0.046295166015625, 0.036407470703125, 0.008575439453125, 0.002197265625, 0.0019006729125976562, 0.0203094482421875, 0.0022792816162109375, -0.0171356201171875, -0.0261993408203125, -0.0062103271484375, 0.0188446044921875, 0.0050048828125, 0.0107879638671875, -0.0243988037109375, 0.007801055908203125, 0.0164642333984375, -0.0103302001953125, 0.006130218505859375, 0.048614501953125, -0.0235748291015625, -0.0213623046875, -0.0118255615234375, -0.0220489501953125, -0.0007481575012207031, -0.017974853515625, -0.0152435302734375, -0.0107879638671875, -0.00785064697265625, -0.04266357421875, -0.00833892822265625, -0.039459228515625, -0.002597808837890625, 0.002346038818359375, -0.001132965087890625, 0.0006680488586425781, 0.078369140625, 0.00855255126953125, -0.055145263671875, 0.0041656494140625, -0.005939483642578125, -0.007518768310546875, 0.018890380859375, 0.0220947265625, -0.00832366943359375, 0.020751953125, 0.00605010986328125, -0.0125579833984375, 0.0133209228515625, -0.0167236328125, -0.042449951171875, -0.0231781005859375, 0.02459716796875, 0.00974273681640625, 0.0016498565673828125, 0.016082763671875, 0.016845703125, 0.016387939453125, -0.0297088623046875, -0.025115966796875, 0.01010894775390625, -0.021270751953125, -0.01397705078125, -0.0241851806640625, 0.01129150390625, -0.01418304443359375, 0.06256103515625, 0.05975341796875, 0.031494140625, 0.0643310546875, 0.0108489990234375, 0.00484466552734375, 0.006649017333984375, 0.035675048828125, -0.07275390625, -0.00537109375, -0.0282745361328125, 0.0299835205078125, -0.00992584228515625, 0.0081787109375, -0.033203125, 0.00855255126953125, -0.063232421875, -0.017791748046875, 0.055572509765625, -0.0176544189453125, -0.003322601318359375, -0.00589752197265625, -0.01508331298828125, -0.0032444000244140625, 0.061981201171875, -0.04962158203125, -0.022430419921875, -0.0028705596923828125, 0.002925872802734375, 0.0210723876953125, 0.005603790283203125, -0.01136016845703125, -0.035247802734375, -0.09326171875, 0.01300048828125, 0.01218414306640625, -0.045074462890625, -0.021026611328125, 0.017120361328125, -0.07806396484375, -0.029052734375, 0.0238800048828125, -0.032073974609375, -0.003917694091796875, 0.0221405029296875, -0.007663726806640625, -0.028900146484375, -0.00943756103515625, -0.0224151611328125, -0.0384521484375, -0.005062103271484375, -0.0191192626953125, 0.041290283203125, -0.0063934326171875, 0.0301361083984375, -0.0277099609375, 0.0211181640625, 0.01129913330078125, 0.0009593963623046875, -0.0013599395751953125, 0.0025882720947265625, 0.00527191162109375, 0.004085540771484375, 0.01275634765625, -0.01120758056640625, 0.0023250579833984375, 0.04742431640625, 0.0285186767578125, 0.08502197265625, -0.024932861328125, -0.0158843994140625, 0.007358551025390625, -0.03753662109375, 0.016845703125, -0.048583984375, -0.06719970703125, -0.0021991729736328125, -0.0182342529296875, -0.01528167724609375, -0.046112060546875, -0.0215606689453125, -0.026611328125, 0.0025920867919921875, -0.02642822265625, 0.024505615234375, -0.00826263427734375, 0.03387451171875, -0.0111541748046875, -0.0226898193359375, -0.01666259765625, 0.0247955322265625, -0.01493072509765625, 0.033050537109375, 0.01128387451171875, -0.0174407958984375, 0.05389404296875, -0.01479339599609375, 0.0294342041015625, -0.059783935546875, 0.065185546875, -0.0229339599609375, -0.0231781005859375, 0.042816162109375, -0.04290771484375, 0.03900146484375, 0.009521484375, 0.0099945068359375, -0.011688232421875, -0.01253509521484375, 0.0091552734375, 0.044158935546875, -0.0533447265625, -0.0430908203125, -0.0177001953125, 0.005321502685546875, -0.05584716796875, 0.05767822265625, 0.03314208984375, -0.0069122314453125, 0.036163330078125, 0.023284912109375, 0.0097503662109375, -0.034393310546875, -0.0095672607421875, -0.05426025390625, 0.01026153564453125, 0.00717926025390625, -0.020263671875, -0.00588226318359375, 0.0031719207763671875, 0.047576904296875, 0.00513458251953125, -0.030731201171875, -0.047637939453125, 0.00608062744140625, 0.0648193359375, 0.0243377685546875, 0.039398193359375, 0.03497314453125, -0.0208740234375, -0.007030487060546875, -0.0213775634765625, 0.003894805908203125, -0.029998779296875, -0.052459716796875, 0.0141754150390625, 0.0224761962890625, -0.0194549560546875, 0.004611968994140625, 0.0340576171875, -0.007556915283203125, 0.0301361083984375, -0.01372528076171875, 0.038360595703125, -0.00672149658203125, 0.03790283203125, 0.009521484375, -0.0221099853515625, 0.01361846923828125, -0.0002760887145996094, -0.01922607421875, 0.01025390625, -0.01490020751953125, 0.03912353515625, -0.0007128715515136719, 0.014373779296875, 0.0259246826171875, -0.0251312255859375, -0.004116058349609375, -0.01493072509765625, 0.02410888671875, 0.0452880859375, -0.033721923828125, 0.01324462890625, -0.00739288330078125, -0.0284576416015625, -0.0035552978515625, 0.000789642333984375, -0.011444091796875, -0.0220489501953125, -0.005615234375, -0.0038909912109375, -0.01727294921875, -0.015380859375, -0.0032978057861328125, -0.042388916015625, -0.006618499755859375, 0.00986480712890625, -0.04864501953125, -0.044921875, 0.0106964111328125, -0.0221710205078125, 0.00030875205993652344, 0.007476806640625, 0.0246124267578125, -0.031005859375, -0.003826141357421875, -0.0222015380859375, -0.0028667449951171875, 0.032806396484375, -0.0013074874877929688, 0.00640869140625, -0.0131072998046875, -0.050689697265625, -0.024261474609375, -0.043121337890625, -0.0587158203125, -0.0258941650390625, -0.0052032470703125, 0.0111236572265625, 0.03167724609375, -0.0234527587890625, -0.01215362548828125, 0.026824951171875, 0.020843505859375, -0.0037899017333984375, 0.09759521484375, -0.030303955078125, 0.036041259765625, 0.032012939453125, 0.041748046875, 0.0102081298828125, 0.0238189697265625, 0.01222991943359375, -0.0318603515625, 0.021209716796875, -0.036376953125, -0.0271453857421875, -0.046630859375, -0.01218414306640625, 0.0212860107421875, 0.056640625, -0.0079193115234375, -0.030242919921875, -0.02789306640625, -0.0044708251953125, -0.049835205078125, 0.0618896484375, -0.021331787109375, 0.0105133056640625, -0.060699462890625, 0.0003998279571533203, 0.033447265625, -0.03851318359375, -0.01523590087890625, 0.0289764404296875, -0.0115814208984375, 0.0261383056640625, 0.01123809814453125, -0.0489501953125, 0.047149658203125, 0.0592041015625, 0.0199127197265625, 0.0618896484375, -0.0023021697998046875, 0.0305633544921875, 0.03680419921875, -0.0023059844970703125, -0.01496124267578125, -0.0024566650390625, 0.04461669921875, 0.017333984375, -0.006870269775390625, 0.05181884765625, -0.0139923095703125, 0.053009033203125, 0.0241851806640625, 0.0675048828125, -0.07232666015625, 0.036712646484375, 0.0234222412109375, 0.0037841796875, 0.09466552734375, -0.037200927734375, 0.014617919921875, -0.0269317626953125, 0.0266571044921875, 0.0380859375, -0.03546142578125, 0.00934600830078125, -0.00862884521484375, -0.006378173828125, -0.01751708984375, -0.00960540771484375, -0.0165252685546875, -0.03961181640625, 0.0036602020263671875, 0.029022216796875, -0.019317626953125, -0.01395416259765625, -0.0438232421875, 0.035400390625, -0.0692138671875, -0.10748291015625, -0.024139404296875, -0.044464111328125, -0.01210784912109375, 0.049957275390625, 0.0081634521484375, 0.0178375244140625, 0.043548583984375, -0.01739501953125, 0.032318115234375, -0.0038318634033203125, -0.031280517578125, -0.089111328125, -0.0279998779296875, 0.0294647216796875, -0.0093231201171875, 0.0109100341796875, 0.045166015625, -0.0146484375, -0.07611083984375, 0.002964019775390625, 0.0187530517578125, 0.04180908203125, -0.0258026123046875, -0.018402099609375, 0.0163726806640625, 0.016510009765625, 0.003139495849609375, 0.0257415771484375, 0.006397247314453125, 0.00439453125, 0.0299072265625, -0.0009517669677734375, -0.018218994140625, -0.00811004638671875, 0.0006318092346191406, -0.10662841796875, 0.0716552734375, 0.01529693603515625, 0.05682373046875, -0.027984619140625, 0.006328582763671875, -0.0121917724609375, -0.0146026611328125, -0.015869140625, 0.05462646484375, 0.01413726806640625, 0.039581298828125, -0.0298309326171875, -0.021514892578125, 0.0096282958984375, 0.0567626953125, 0.06304931640625, 0.0142669677734375, 0.011505126953125, -0.030181884765625, 0.0159912109375, 0.063232421875, -0.0034027099609375, -0.0133819580078125, 0.0021610260009765625, 0.054901123046875, 0.0257720947265625, -0.038848876953125, 0.04119873046875, -0.0418701171875, -0.049591064453125, 0.0026760101318359375, 0.017852783203125, 0.01326751708984375, -0.0033168792724609375, 0.055908203125, 0.032623291015625, -0.0217437744140625, -0.0154571533203125, -0.054168701171875, -0.018035888671875, 0.041229248046875, 0.036773681640625, -0.033355712890625, -0.03485107421875, -0.021820068359375, 0.056640625, 0.0343017578125, 0.054656982421875, 0.046356201171875, 0.048065185546875, 0.0283203125, -0.0184173583984375, 0.051239013671875, 0.004123687744140625, -0.04180908203125, 0.00959014892578125, -0.00298309326171875, 0.01019287109375, -0.046142578125, -0.01055145263671875, 0.01195526123046875, 0.019927978515625, -0.0171051025390625, -0.0302734375, 0.003543853759765625, -0.01538848876953125, 0.01444244384765625, -0.01531982421875, 0.03875732421875, -0.00687408447265625, -0.01554107666015625, -0.0311431884765625, 0.007686614990234375, -0.00897216796875, 0.026092529296875, -0.00749969482421875, 0.031890869140625, -0.017181396484375, -0.007457733154296875, -0.00748443603515625, -0.0182647705078125, 0.0217437744140625, 0.0020847320556640625, 0.022216796875, 0.005645751953125, 0.0361328125, 0.0175018310546875, 0.015594482421875, 0.031463623046875, -0.00354766845703125, -0.016021728515625, -0.005828857421875, -0.042510986328125, 0.00872802734375, 0.0127105712890625, 0.03436279296875, 0.04046630859375, 0.056121826171875, 0.01983642578125, -0.01418304443359375, -0.004329681396484375, 0.007198333740234375, -0.033111572265625, -0.024566650390625, -0.027557373046875, 0.01044464111328125, 0.0276336669921875, 0.007259368896484375, -0.0031337738037109375, -0.002105712890625, 0.046173095703125, 0.032867431640625, -0.01335906982421875, 0.024810791015625, -0.006683349609375, 0.0281982421875, 0.033294677734375, -0.01454925537109375, 0.049652099609375, -0.01398468017578125, -0.01165771484375, 0.0239105224609375, -0.005298614501953125, -0.0250396728515625, 0.0117034912109375, -0.02862548828125, 0.047088623046875, -0.007129669189453125, -0.00406646728515625, 0.01470184326171875, -0.01541900634765625, 0.003070831298828125, 0.01397705078125, 0.019989013671875, 0.007419586181640625, -0.031524658203125, -0.0184478759765625, 0.0136566162109375, 0.036346435546875, -0.024993896484375, 0.08111572265625, -0.041412353515625, -0.0027141571044921875, -0.059539794921875, 0.0059356689453125, -0.019622802734375, -0.040771484375, 0.0280914306640625, 0.03826904296875, -0.023162841796875, -0.0084228515625, -0.01001739501953125, 0.05859375, 0.0396728515625, 0.0006661415100097656, 0.056060791015625, -0.0058135986328125, -0.0058135986328125, -0.038055419921875, -0.01348114013671875, -0.049072265625, -0.0026950836181640625, -0.005504608154296875, -0.0155487060546875, 0.00435638427734375, -0.036376953125, 0.00786590576171875, 0.016265869140625, -0.005649566650390625, 0.00891876220703125, 0.00113677978515625, 0.020904541015625, -0.004268646240234375, 0.0286865234375, -0.057525634765625, -0.00713348388671875, 0.032562255859375, -0.00524139404296875, 0.0181121826171875, 0.0141448974609375, 0.02587890625, 0.0364990234375, -0.0762939453125, -0.0225372314453125, 0.02801513671875, 0.036865234375, 0.005462646484375, 0.0010852813720703125, -0.00019812583923339844, -0.0235137939453125, -0.02008056640625, 0.01702880859375, -0.006439208984375, -0.027740478515625, -0.0271453857421875, 0.019256591796875, -0.03375244140625, -0.045196533203125, -0.0594482421875, 0.0147857666015625, -0.00894927978515625, 0.00876617431640625, -0.0733642578125, 0.04205322265625, 0.00519561767578125, 0.044921875, -0.02752685546875, 0.01317596435546875, -0.0040435791015625, 0.0245513916015625, -0.022125244140625, -0.0180816650390625, -0.033477783203125, 0.03546142578125, -0.024749755859375, 0.05706787109375, 0.029754638671875, -0.052459716796875, 0.017913818359375, 0.05169677734375, 0.0623779296875, 0.0904541015625, 0.054351806640625, -0.0170135498046875, -0.0005950927734375, 0.028717041015625, -0.01242828369140625, -0.0625, -0.00762939453125, -0.0083160400390625, 0.0008563995361328125, 0.036346435546875, 0.0117950439453125, 0.045501708984375, -0.016845703125, -0.08111572265625, 0.0029239654541015625, 0.00011998414993286133, -0.048248291015625, -0.032501220703125, -0.01186370849609375, 0.01093292236328125, 0.0462646484375, -0.005458831787109375, -0.003070831298828125, -0.05242919921875, 0.006870269775390625, 0.016815185546875, 0.01910400390625, 0.042938232421875, -0.01097869873046875, 0.00485992431640625, 0.0153961181640625, 0.00891876220703125, 0.004947662353515625, -0.054107666015625, 0.023162841796875, 0.008758544921875, 0.02935791015625, -0.017822265625, 0.019927978515625, 0.0303955078125, 0.016448974609375, -0.009307861328125, -0.059906005859375, 0.01593017578125, -0.0026798248291015625, 0.017608642578125, 0.037078857421875, -0.0089569091796875, -0.0406494140625, 0.023712158203125, -0.032196044921875, -0.037750244140625, -0.031951904296875, 0.013031005859375, -0.056640625, -0.032073974609375, 0.024932861328125, -0.010589599609375, 0.01343536376953125, -0.0469970703125, -0.0182342529296875, -0.0037384033203125, -0.004817962646484375, 0.01092529296875, 0.0023326873779296875, 0.0341796875, 0.0261993408203125, -0.0201263427734375, 0.036834716796875, -0.023345947265625, -0.01215362548828125, 0.041900634765625, 0.003444671630859375, -0.0188140869140625, -0.056243896484375, 0.007617950439453125, 0.045745849609375, -0.022186279296875, 0.061492919921875, -0.0310211181640625, -0.033599853515625, -0.0176849365234375, 0.0084075927734375, 0.00965118408203125, 0.0233154296875, -0.0237579345703125, 0.014923095703125, 0.01349639892578125, 0.0026035308837890625, -0.00960540771484375, -0.0073699951171875, -0.0173797607421875, 0.01371002197265625, 0.023956298828125, -0.01470184326171875, 0.061004638671875, -0.0175018310546875, -0.006275177001953125, -0.032806396484375, -0.026580810546875, -0.07586669921875, 0.049285888671875, 0.0445556640625, -0.00856781005859375, 0.05291748046875 ]
28b7303de3fdff61620ee1a83b4736dc4b86b5ef
Wordpress Stackexchange Q: How to use the_excerpt in a filter hook? I was hoping to process the_excerpt just like one would with the_content, but no such luck. How can I pass the excerpts of a Posts Page, through my plugin? I've tried variations on this: add_filter('the_excerpt', 'my_function'); But alas, no go. Suggestions? EDIT: It looks like my filter call won't work when called from within another function, but it DOES work if it's at the same level of the function I'm calling, like so: add_filter('the_excerpt', 'my_filter'); function my_filter($content) { die('hello'); } Any ideas why this is? A: use the filter get_the_excerpt. Look at line no. 250 here, they are using the_excerpt internally on the function get_the_excerpt(), and in this function on line no. 272, they're applying the filter get_the_excerpt on the actual excerpt. Hence, add_filter('get_the_excerpt', 'exc'); function exc($param) { return "Whew !".$param; } is the way to go if you want to filter excerpts!
Q: How to use the_excerpt in a filter hook? I was hoping to process the_excerpt just like one would with the_content, but no such luck. How can I pass the excerpts of a Posts Page, through my plugin? I've tried variations on this: add_filter('the_excerpt', 'my_function'); But alas, no go. Suggestions? EDIT: It looks like my filter call won't work when called from within another function, but it DOES work if it's at the same level of the function I'm calling, like so: add_filter('the_excerpt', 'my_filter'); function my_filter($content) { die('hello'); } Any ideas why this is? A: use the filter get_the_excerpt. Look at line no. 250 here, they are using the_excerpt internally on the function get_the_excerpt(), and in this function on line no. 272, they're applying the filter get_the_excerpt on the actual excerpt. Hence, add_filter('get_the_excerpt', 'exc'); function exc($param) { return "Whew !".$param; } is the way to go if you want to filter excerpts!
wordpress
{ "language": "en", "length": 152, "provenance": "stackexchange_00019.jsonl.gz:413627", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30380" }
[ 0.03802490234375, -0.0187225341796875, 0.042205810546875, 0.006694793701171875, -0.00406646728515625, -0.0290069580078125, 0.061614990234375, -0.02960205078125, 0.0222320556640625, 0.040985107421875, -0.0462646484375, -0.0203399658203125, 0.00856781005859375, -0.00873565673828125, -0.048431396484375, -0.032745361328125, 0.01203155517578125, 0.00006216764450073242, 0.0250701904296875, -0.0215911865234375, 0.0200958251953125, -0.005695343017578125, 0.0020351409912109375, 0.0190887451171875, 0.021392822265625, 0.02056884765625, 0.0927734375, -0.01186370849609375, 0.03228759765625, 0.002735137939453125, 0.0272979736328125, -0.07562255859375, 0.0075531005859375, 0.0513916015625, -0.060760498046875, -0.0006418228149414062, -0.0254669189453125, 0.0243377685546875, 0.012237548828125, 0.03497314453125, 0.027740478515625, -0.007213592529296875, -0.061920166015625, 0.038360595703125, -0.03466796875, -0.044403076171875, 0.032257080078125, -0.02581787109375, 0.00357818603515625, -0.0036792755126953125, 0.0465087890625, 0.004222869873046875, 0.048248291015625, -0.035003662109375, 0.0018892288208007812, 0.03753662109375, -0.0005259513854980469, 0.03143310546875, 0.0286865234375, -0.03436279296875, -0.03173828125, 0.0143585205078125, 0.023681640625, 0.0068359375, 0.03472900390625, 0.007091522216796875, 0.01038360595703125, 0.0276641845703125, -0.0433349609375, 0.0256195068359375, 0.026397705078125, -0.056243896484375, -0.0135955810546875, -0.059906005859375, -0.01043701171875, 0.0290069580078125, -0.00665283203125, -0.0187530517578125, -0.0150146484375, -0.0103759765625, -0.04443359375, -0.0178375244140625, -0.0482177734375, -0.00077056884765625, -0.023345947265625, 0.021942138671875, -0.029998779296875, -0.00176239013671875, -0.00534820556640625, -0.0014400482177734375, -0.007755279541015625, 0.01094818115234375, -0.00031185150146484375, 0.018035888671875, -0.0262908935546875, -0.01360321044921875, 0.025848388671875, 0.0272674560546875, -0.015594482421875, -0.00629425048828125, 0.0032558441162109375, -0.056121826171875, 0.0660400390625, -0.0389404296875, 0.006534576416015625, 0.036346435546875, 0.001796722412109375, 0.006664276123046875, 0.036224365234375, 0.03619384765625, 0.0094451904296875, 0.00626373291015625, -0.0022430419921875, -0.058349609375, -0.0007042884826660156, 0.028961181640625, -0.01055908203125, -0.0149078369140625, 0.028839111328125, -0.0252685546875, 0.007373809814453125, 0.0026950836181640625, 0.00667572021484375, 0.041473388671875, -0.02716064453125, -0.0213470458984375, -0.0126190185546875, -0.0245513916015625, 0.053436279296875, -0.030792236328125, -0.00878143310546875, 0.0221710205078125, -0.008270263671875, -0.00743865966796875, -0.0162200927734375, 0.0010232925415039062, 0.0194091796875, -0.005245208740234375, 0.00717926025390625, -0.02130126953125, 0.039520263671875, 0.006439208984375, -0.013427734375, 0.00785064697265625, -0.003997802734375, 0.00894927978515625, 0.01331329345703125, 0.00872039794921875, 0.00998687744140625, 0.0036563873291015625, -0.03851318359375, -0.0038909912109375, 0.037384033203125, -0.01029205322265625, 0.006099700927734375, -0.0288543701171875, 0.01186370849609375, -0.033416748046875, 0.0026073455810546875, -0.03662109375, 0.0679931640625, -0.0023670196533203125, -0.035125732421875, 0.01010894775390625, -0.032073974609375, -0.00913238525390625, -0.02508544921875, -0.01226043701171875, 0.01102447509765625, 0.0273590087890625, -0.00246429443359375, -0.034637451171875, -0.04473876953125, -0.01107025146484375, -0.01097869873046875, 0.00392913818359375, -0.018798828125, 0.0013284683227539062, 0.0271148681640625, 0.043487548828125, -0.002422332763671875, -0.019195556640625, 0.0254058837890625, -0.0047149658203125, -0.031402587890625, 0.0281982421875, 0.037017822265625, 0.059295654296875, -0.0272064208984375, 0.0222625732421875, 0.0182647705078125, 0.035980224609375, -0.0248565673828125, -0.00193023681640625, -0.030975341796875, -0.052642822265625, 0.022674560546875, -0.03424072265625, -0.00988006591796875, 0.06195068359375, 0.08502197265625, -0.037841796875, 0.047210693359375, -0.036834716796875, -0.034576416015625, -0.0221405029296875, -0.004734039306640625, 0.00609588623046875, 0.006259918212890625, 0.0160064697265625, 0.006580352783203125, -0.00502777099609375, -0.0291900634765625, 0.0182647705078125, -0.020172119140625, 0.0093536376953125, -0.04339599609375, -0.016754150390625, 0.0083770751953125, 0.01299285888671875, 0.037994384765625, 0.004123687744140625, -0.0017147064208984375, -0.0183868408203125, 0.0633544921875, -0.05804443359375, 0.0171661376953125, -0.0543212890625, 0.0058135986328125, -0.01517486572265625, -0.05462646484375, 0.043121337890625, 0.07794189453125, 0.0394287109375, -0.018798828125, 0.02203369140625, 0.036956787109375, -0.032623291015625, -0.015380859375, 0.043212890625, 0.05517578125, 0.0860595703125, 0.0014581680297851562, -0.061676025390625, 0.1065673828125, -0.07183837890625, 0.0081024169921875, -0.0460205078125, 0.0033817291259765625, 0.008636474609375, 0.018524169921875, -0.01537322998046875, 0.01806640625, -0.044708251953125, 0.0137786865234375, 0.0210113525390625, 0.02508544921875, -0.0004069805145263672, -0.0013799667358398438, -0.0029010772705078125, 0.01248931884765625, -0.01076507568359375, -0.03143310546875, 0.00215911865234375, 0.01145172119140625, 0.012451171875, 0.0263824462890625, 0.0269317626953125, -0.01021575927734375, -0.020843505859375, 0.0234375, 0.053070068359375, 0.003448486328125, 0.03216552734375, -0.01078033447265625, -0.0034656524658203125, -0.0259246826171875, -0.0020389556884765625, 0.0007271766662597656, -0.002773284912109375, -0.01129150390625, 0.030426025390625, 0.01445770263671875, -0.0118560791015625, -0.02606201171875, -0.0233612060546875, 0.0261688232421875, 0.00800323486328125, 0.032562255859375, -0.04095458984375, 0.0137786865234375, -0.00848388671875, -0.022979736328125, 0.0256805419921875, 0.0026416778564453125, -0.045806884765625, 0.0143890380859375, -0.059051513671875, 0.06817626953125, -0.055389404296875, 0.04339599609375, 0.058807373046875, -0.03485107421875, 0.024200439453125, 0.02032470703125, -0.00859832763671875, 0.0225830078125, 0.0246124267578125, 0.0166473388671875, 0.01465606689453125, -0.04937744140625, 0.0240478515625, 0.0211639404296875, 0.051971435546875, -0.0218353271484375, -0.032012939453125, -0.032440185546875, 0.0288238525390625, -0.056640625, -0.0017452239990234375, 0.0191802978515625, -0.058685302734375, -0.0182952880859375, -0.00949859619140625, -0.046173095703125, 0.004291534423828125, 0.01190948486328125, -0.00972747802734375, -0.003963470458984375, -0.0009312629699707031, -0.046661376953125, -0.0148773193359375, -0.07159423828125, 0.041290283203125, 0.002086639404296875, 0.03387451171875, 0.010986328125, 0.0285186767578125, 0.00791168212890625, -0.0699462890625, -0.000011861324310302734, -0.0118865966796875, -0.02020263671875, 0.02734375, 0.035369873046875, -0.01238250732421875, -0.03729248046875, 0.0195159912109375, 0.03564453125, 0.023223876953125, -0.040496826171875, -0.0097808837890625, -0.0174102783203125, 0.03326416015625, 0.0289306640625, -0.01042938232421875, 0.0157928466796875, 0.057159423828125, 0.044403076171875, -0.00722503662109375, -0.0038547515869140625, -0.0209503173828125, -0.049285888671875, -0.003025054931640625, 0.061798095703125, -0.00885009765625, -0.042694091796875, 0.009521484375, -0.025848388671875, -0.02996826171875, 0.041351318359375, -0.042999267578125, 0.029876708984375, -0.01282501220703125, -0.016021728515625, 0.00027108192443847656, 0.0084686279296875, 0.005329132080078125, 0.049835205078125, 0.0162506103515625, 0.0596923828125, 0.014892578125, 0.0303192138671875, -0.0316162109375, -0.04071044921875, 0.04766845703125, 0.0457763671875, -0.0043792724609375, 0.0190277099609375, -0.031829833984375, 0.01058197021484375, 0.0699462890625, -0.04730224609375, -0.04345703125, -0.005596160888671875, 0.01528167724609375, 0.0328369140625, -0.0250396728515625, 0.04339599609375, -0.043060302734375, -0.047882080078125, -0.01477813720703125, -0.0294189453125, -0.0301055908203125, -0.00965118408203125, 0.0030918121337890625, -0.0171966552734375, -0.01495361328125, 0.055755615234375, -0.0271453857421875, 0.0047607421875, 0.0229339599609375, -0.00009340047836303711, -0.0252532958984375, -0.059722900390625, 0.01084136962890625, -0.07781982421875, -0.006839752197265625, -0.0152435302734375, 0.07000732421875, 0.0166473388671875, -0.010650634765625, -0.0255279541015625, 0.0248260498046875, 0.018341064453125, 0.016387939453125, 0.01568603515625, -0.00794219970703125, 0.0220794677734375, -0.00843048095703125, 0.022125244140625, -0.0411376953125, 0.004405975341796875, -0.0159454345703125, -0.056182861328125, -0.002681732177734375, -0.0222015380859375, 0.038543701171875, 0.0146026611328125, -0.02459716796875, -0.08221435546875, -0.0201873779296875, -0.00873565673828125, -0.02801513671875, -0.03094482421875, 0.00916290283203125, 0.0087890625, -0.057525634765625, 0.055450439453125, 0.0289764404296875, -0.0213623046875, -0.01297760009765625, 0.05718994140625, 0.021575927734375, -0.035858154296875, -0.01605224609375, 0.0237274169921875, 0.032958984375, -0.061309814453125, 0.06341552734375, 0.02752685546875, -0.032684326171875, 0.099853515625, -0.0153656005859375, -0.012451171875, -0.01385498046875, 0.047607421875, 0.01290130615234375, 0.00504302978515625, -0.004199981689453125, 0.003368377685546875, 0.03594970703125, -0.00048232078552246094, -0.016998291015625, -0.0236968994140625, 0.0190277099609375, 0.05126953125, -0.043365478515625, 0.076171875, -0.00861358642578125, -0.018707275390625, 0.015838623046875, 0.0172119140625, 0.040008544921875, 0.0304107666015625, 0.00333404541015625, 0.0202484130859375, 0.009521484375, 0.018035888671875, -0.0307159423828125, 0.00783538818359375, -0.01262664794921875, 0.04510498046875, -0.0193328857421875, 0.0138092041015625, -0.0284271240234375, 0.00003159046173095703, -0.0105438232421875, -0.0227203369140625, -0.054107666015625, -0.00974273681640625, -0.002838134765625, 0.043365478515625, 0.0518798828125, -0.0251617431640625, -0.01776123046875, 0.015899658203125, -0.01108551025390625, 0.0308685302734375, 0.01023101806640625, 0.0136871337890625, -0.00386810302734375, 0.022186279296875, -0.0189971923828125, 0.007373809814453125, 0.03631591796875, 0.052490234375, -0.06195068359375, 0.06549072265625, -0.0006690025329589844, 0.036590576171875, 0.00212860107421875, 0.048828125, 0.0296478271484375, -0.037322998046875, 0.002895355224609375, 0.0185394287109375, -0.037841796875, -0.016632080078125, -0.018707275390625, 0.023101806640625, 0.008331298828125, -0.044281005859375, -0.00762176513671875, 0.02667236328125, 0.009521484375, -0.0161590576171875, 0.044464111328125, -0.0089569091796875, -0.0303192138671875, -0.052032470703125, -0.0038604736328125, 0.05535888671875, 0.0217437744140625, -0.01678466796875, -0.007297515869140625, -0.01178741455078125, 0.008331298828125, -0.0149383544921875, -0.02496337890625, 0.0183563232421875, 0.0086822509765625, 0.0643310546875, -0.00322723388671875, -0.0177001953125, 0.007965087890625, -0.01056671142578125, -0.021087646484375, 0.032958984375, 0.07293701171875, 0.00418853759765625, 0.019775390625, -0.0249176025390625, -0.0138397216796875, -0.0308990478515625, -0.016387939453125, 0.08282470703125, 0.03558349609375, -0.0789794921875, 0.009307861328125, -0.0267333984375, -0.002471923828125, -0.0538330078125, -0.0440673828125, -0.05810546875, 0.004039764404296875, -0.026763916015625, 0.021575927734375, 0.0090484619140625, 0.032257080078125, 0.00677490234375, -0.022125244140625, -0.046783447265625, -0.0167999267578125, -0.0190582275390625, 0.07196044921875, 0.0011425018310546875, 0.058074951171875, -0.013214111328125, 0.0134429931640625, -0.0224456787109375, -0.007785797119140625, -0.0228424072265625, -0.039459228515625, -0.0003676414489746094, 0.0229949951171875, -0.006046295166015625, 0.0269012451171875, 0.034027099609375, 0.0127410888671875, 0.00447845458984375, -0.01242828369140625, -0.006961822509765625, -0.014617919921875, 0.01056671142578125, 0.005619049072265625, -0.0267486572265625, 0.04132080078125, -0.034423828125, -0.005596160888671875, -0.00550079345703125, 0.015228271484375, 0.03216552734375, -0.01360321044921875, 0.007640838623046875, -0.002960205078125, -0.01220703125, 0.00797271728515625, 0.07861328125, 0.006046295166015625, 0.031097412109375, 0.01093292236328125, -0.0085601806640625, 0.033538818359375, 0.0100250244140625, -0.0133056640625, 0.004489898681640625, 0.00986480712890625, -0.006938934326171875, 0.00923919677734375, 0.0089263916015625, -0.01910400390625, 0.0216217041015625, 0.01215362548828125, 0.044036865234375, -0.06231689453125, 0.01837158203125, 0.016265869140625, -0.0157470703125, -0.0088348388671875, 0.0160980224609375, 0.0113067626953125, 0.00865936279296875, 0.03271484375, -0.0226898193359375, 0.0026340484619140625, 0.033233642578125, -0.00872039794921875, 0.00011491775512695312, -0.0260009765625, 0.039581298828125, -0.0024547576904296875, -0.049224853515625, 0.0086669921875, 0.039459228515625, -0.0266876220703125, -0.0137939453125, 0.005825042724609375, -0.0209808349609375, -0.0278167724609375, -0.02178955078125, -0.0034122467041015625, -0.027984619140625, -0.00016224384307861328, 0.021331787109375, 0.007617950439453125, 0.0555419921875, 0.04522705078125, 0.0187835693359375, -0.028961181640625, 0.03375244140625, -0.0129241943359375, -0.047943115234375, -0.0257415771484375, 0.006725311279296875, 0.05816650390625, -0.014678955078125, 0.03936767578125, 0.0057220458984375, -0.0272674560546875, -0.0036296844482421875, -0.0202484130859375, 0.05767822265625, -0.011322021484375, -0.050445556640625, 0.01317596435546875, -0.012481689453125, -0.0086212158203125, -0.0052947998046875, 0.036376953125, -0.03900146484375, -0.0038089752197265625, 0.00806427001953125, 0.0032329559326171875, -0.0278778076171875, -0.0213165283203125, -0.0706787109375, 0.08514404296875, 0.013092041015625, 0.0333251953125, 0.01326751708984375, 0.0196685791015625, -0.051300048828125, -0.01715087890625, -0.04742431640625, 0.043212890625, -0.0016012191772460938, 0.05987548828125, -0.05029296875, -0.001903533935546875, 0.01212310791015625, 0.033447265625, 0.04998779296875, 0.00649261474609375, -0.006801605224609375, -0.027618408203125, 0.045074462890625, 0.0239410400390625, 0.005596160888671875, 0.025390625, 0.0352783203125, 0.056549072265625, 0.026702880859375, -0.05023193359375, 0.029083251953125, -0.067138671875, 0.01389312744140625, 0.05572509765625, 0.0026645660400390625, 0.0028285980224609375, 0.00852203369140625, 0.001621246337890625, -0.0231170654296875, -0.01357269287109375, 0.0234375, -0.06549072265625, -0.0016431808471679688, 0.061248779296875, 0.04296875, -0.055145263671875, -0.0294036865234375, -0.03033447265625, 0.05029296875, 0.00514984130859375, 0.056854248046875, 0.02850341796875, 0.0212554931640625, 0.08477783203125, -0.0009007453918457031, 0.02886962890625, 0.0318603515625, -0.0229644775390625, 0.040283203125, 0.01068115234375, 0.002361297607421875, -0.036590576171875, -0.0014734268188476562, 0.01447296142578125, 0.041778564453125, -0.034881591796875, -0.0506591796875, 0.00414276123046875, -0.004547119140625, 0.004596710205078125, 0.0149688720703125, 0.0033054351806640625, 0.0012426376342773438, 0.031890869140625, 0.0223388671875, -0.0352783203125, 0.014312744140625, 0.034637451171875, 0.02227783203125, -0.00524139404296875, 0.0110931396484375, -0.0281219482421875, -0.042083740234375, 0.00023794174194335938, 0.035491943359375, 0.0396728515625, 0.00962066650390625, 0.032989501953125, -0.01300048828125, -0.00469207763671875, 0.0013179779052734375, 0.0173187255859375, -0.00933074951171875, -0.00005131959915161133, -0.01629638671875, -0.031463623046875, 0.014739990234375, 0.0249481201171875, 0.0010929107666015625, 0.003856658935546875, 0.03155517578125, 0.010589599609375, -0.058013916015625, -0.011749267578125, 0.00811767578125, -0.034027099609375, 0.0224761962890625, -0.033935546875, 0.00467681884765625, 0.016815185546875, -0.0200042724609375, -0.01678466796875, -0.017242431640625, 0.0548095703125, -0.0209503173828125, 0.038421630859375, -0.00820159912109375, -0.0221405029296875, -0.011932373046875, -0.0014009475708007812, 0.025482177734375, -0.0074462890625, -0.09234619140625, -0.0008778572082519531, -0.0322265625, -0.0838623046875, 0.017303466796875, 0.05029296875, -0.0159759521484375, -0.00289154052734375, -0.0100555419921875, 0.01031494140625, 0.0237579345703125, -0.03057861328125, -0.010650634765625, -0.00994873046875, 0.01154327392578125, -0.0184173583984375, 0.0179901123046875, -0.0003085136413574219, 0.0175628662109375, 0.0293121337890625, 0.03387451171875, 0.033721923828125, -0.0168609619140625, 0.034088134765625, 0.019561767578125, 0.0265655517578125, -0.01194000244140625, 0.008148193359375, 0.0035724639892578125, -0.0007562637329101562, 0.02581787109375, -0.0179290771484375, -0.045989990234375, 0.03985595703125, 0.0335693359375, -0.0005340576171875, 0.0259552001953125, 0.0149078369140625, -0.00569915771484375, -0.0246124267578125, 0.048095703125, -0.0016012191772460938, 0.01666259765625, -0.004535675048828125, -0.034759521484375, 0.058837890625, 0.04541015625, 0.027313232421875, -0.0015306472778320312, 0.050750732421875, 0.007904052734375, 0.007904052734375, 0.04815673828125, 0.015655517578125, 0.0307464599609375, -0.026611328125, -0.01727294921875, 0.0455322265625, -0.004062652587890625, -0.0004329681396484375, 0.02813720703125, 0.03228759765625, 0.032806396484375, -0.0189361572265625, -0.01849365234375, -0.02630615234375, 0.066162109375, 0.0032405853271484375, 0.025604248046875, -0.04754638671875, 0.03436279296875, -0.015655517578125, 0.0125885009765625, -0.04046630859375, -0.05352783203125, -0.021148681640625, -0.0224151611328125, -0.033233642578125, -0.10107421875, -0.06988525390625, 0.0022525787353515625, 0.01611328125, -0.0036563873291015625, -0.025177001953125, -0.00568389892578125, -0.00582122802734375, 0.0404052734375, -0.0238189697265625, -0.00782012939453125, 0.017364501953125, 0.0294342041015625, -0.04193115234375, -0.01235198974609375, -0.036956787109375, 0.01393890380859375, -0.03125, 0.0382080078125, 0.087890625, -0.039215087890625, -0.036895751953125, 0.056610107421875, 0.0156097412109375, 0.0994873046875, -0.05889892578125, -0.02130126953125, 0.01499176025390625, 0.024383544921875, -0.007335662841796875, -0.047637939453125, -0.00145721435546875, 0.0051116943359375, 0.019866943359375, 0.00942230224609375, -0.039794921875, -0.04718017578125, -0.053314208984375, -0.049560546875, 0.0263519287109375, 0.01654052734375, -0.03753662109375, -0.043365478515625, -0.0136260986328125, 0.0223541259765625, -0.0238494873046875, -0.00853729248046875, -0.0263671875, -0.08612060546875, 0.00266265869140625, 0.0192108154296875, 0.057861328125, -0.002429962158203125, 0.019622802734375, -0.028045654296875, 0.027740478515625, 0.00591278076171875, 0.0185394287109375, -0.03228759765625, -0.0115814208984375, 0.015777587890625, 0.039794921875, -0.00914764404296875, -0.0296173095703125, 0.028106689453125, -0.016204833984375, -0.00490570068359375, -0.01934814453125, -0.02337646484375, -0.00011658668518066406, 0.0390625, 0.046966552734375, 0.0089569091796875, -0.037750244140625, 0.033538818359375, 0.0135040283203125, -0.05621337890625, 0.0204620361328125, 0.03460693359375, -0.034027099609375, -0.00524139404296875, 0.006092071533203125, 0.01421356201171875, 0.01068115234375, -0.052886962890625, -0.0264892578125, -0.047454833984375, -0.043365478515625, 0.037628173828125, -0.043182373046875, -0.0853271484375, 0.0301361083984375, -0.0254058837890625, -0.02667236328125, 0.00505828857421875, 0.04339599609375, -0.026336669921875, -0.0006175041198730469, -0.02239990234375, 0.001018524169921875, 0.00846099853515625, 0.0202484130859375, 0.0035400390625, 0.0034122467041015625, -0.00507354736328125, 0.0193328857421875, -0.0271759033203125, 0.030364990234375, 0.0006952285766601562, 0.034820556640625, 0.00836181640625, 0.0253448486328125, 0.0037364959716796875, 0.045135498046875, -0.0182952880859375, 0.0310211181640625, -0.014617919921875, 0.0167999267578125, -0.0113067626953125, 0.01491546630859375, 0.0141143798828125, -0.002437591552734375, 0.001171112060546875, 0.009368896484375, -0.01169586181640625, -0.0041351318359375, -0.0108184814453125, -0.06243896484375, -0.004119873046875, -0.004352569580078125 ]
8779cfe45f8767e6a56b3859ef0c9439013c50d6
Wordpress Stackexchange Q: When to use is_home() vs is_front_page()? I've found that is_front_page appears to return true when I'm viewing the home page and have a single sticky post assigned there. It also returns true when I've assigned a page as the static front page via Settings > Reading. Why would I ever want to use is_home()? A: is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Your homepage displays So if you set about us as the front page then this conditional will only be true if showing the about us page. is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts. If the settings under Your homepage displays are left at default then the home page will return true for both is_front_page() and is_home() An example of using is_home(): * *You have set your posts page to a page called News. *A user navigates there and in the header you want to show additional navigation *You could use is_home() to do this.
Q: When to use is_home() vs is_front_page()? I've found that is_front_page appears to return true when I'm viewing the home page and have a single sticky post assigned there. It also returns true when I've assigned a page as the static front page via Settings > Reading. Why would I ever want to use is_home()? A: is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Your homepage displays So if you set about us as the front page then this conditional will only be true if showing the about us page. is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts. If the settings under Your homepage displays are left at default then the home page will return true for both is_front_page() and is_home() An example of using is_home(): * *You have set your posts page to a page called News. *A user navigates there and in the header you want to show additional navigation *You could use is_home() to do this. A: I've discovered that is_home() and is_front_page() don't deliver what's expected for multisites. My workaround using built in PHP goodies: if($_SERVER['REQUEST_URI'] == '/') { // you must be on the home page } As mentioned in the comments, this approach will not work for WP instances installed in subdirectories of the web root. Use at your discretion. A: You'd want to use is_home() when you want to check if the user is viewing your list of blog posts (usually set to display 10 posts per page). If you have a home.php file in your theme, that will be displayed when the is_home() condition is true. The following can possibly remove some confusion as well: when is_front_page() and is_home() conditions, both are true, the template front-page.php will be used instead of home.php.
wordpress
{ "language": "en", "length": 316, "provenance": "stackexchange_00019.jsonl.gz:413628", "question_score": "76", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30385" }
[ 0.0577392578125, 0.0102386474609375, 0.022705078125, -0.00817108154296875, 0.0156402587890625, -0.0135955810546875, 0.0265045166015625, -0.057403564453125, 0.00995635986328125, -0.003635406494140625, -0.043487548828125, -0.01064300537109375, -0.034942626953125, -0.0176544189453125, -0.0170440673828125, -0.061798095703125, 0.048309326171875, -0.0140533447265625, 0.03912353515625, -0.009033203125, 0.011962890625, 0.01666259765625, 0.029815673828125, 0.060760498046875, 0.041229248046875, -0.09356689453125, 0.040496826171875, -0.01140594482421875, 0.0302276611328125, -0.007701873779296875, 0.0297088623046875, 0.0017461776733398438, 0.0171966552734375, 0.01763916015625, -0.00020110607147216797, -0.0060272216796875, 0.0208740234375, -0.007648468017578125, 0.00852203369140625, 0.0160980224609375, 0.0177764892578125, -0.005435943603515625, -0.01654052734375, 0.028289794921875, -0.0107574462890625, -0.0260009765625, 0.000812530517578125, -0.035369873046875, -0.01373291015625, -0.00428009033203125, -0.0014371871948242188, -0.048583984375, 0.0005154609680175781, -0.0035953521728515625, -0.00852203369140625, 0.019256591796875, 0.01308441162109375, -0.01459503173828125, 0.056396484375, -0.03973388671875, -0.05029296875, -0.038665771484375, 0.050537109375, -0.0123291015625, -0.002162933349609375, -0.0174560546875, -0.0213470458984375, 0.0262603759765625, -0.060882568359375, -0.033721923828125, 0.025421142578125, -0.043212890625, 0.00952911376953125, 0.0079345703125, -0.06201171875, -0.019012451171875, 0.0192718505859375, -0.0107574462890625, 0.0234222412109375, -0.0179595947265625, -0.0478515625, 0.036163330078125, -0.10791015625, -0.01971435546875, -0.018951416015625, -0.00292205810546875, -0.03546142578125, -0.0063323974609375, -0.018157958984375, -0.0038204193115234375, -0.0032196044921875, -0.0041656494140625, 0.002002716064453125, -0.0177154541015625, -0.0166168212890625, -0.0231170654296875, 0.032928466796875, 0.057647705078125, -0.05682373046875, -0.0579833984375, -0.02960205078125, -0.0131988525390625, -0.0377197265625, -0.01303863525390625, 0.01824951171875, 0.03460693359375, -0.01134490966796875, -0.0271453857421875, 0.0316162109375, 0.0222320556640625, -0.0039520263671875, 0.0033359527587890625, -0.0350341796875, -0.027008056640625, -0.003612518310546875, 0.0165863037109375, -0.0670166015625, 0.0166473388671875, -0.00971221923828125, 0.013885498046875, 0.0171661376953125, 0.045867919921875, 0.03411865234375, -0.07666015625, 0.0167999267578125, 0.00658416748046875, -0.0352783203125, -0.05548095703125, 0.0194091796875, 0.053070068359375, -0.01035308837890625, 0.004520416259765625, -0.0021610260009765625, -0.0408935546875, -0.053131103515625, -0.0235137939453125, 0.01374053955078125, -0.01087188720703125, -0.00982666015625, 0.03857421875, -0.016265869140625, -0.072265625, -0.01453399658203125, 0.0068359375, 0.002399444580078125, 0.00506591796875, 0.0256500244140625, 0.03741455078125, -0.0146484375, -0.0543212890625, 0.067138671875, -0.040069580078125, -0.002475738525390625, 0.0174407958984375, -0.00614166259765625, 0.006481170654296875, -0.0252838134765625, 0.021026611328125, 0.005706787109375, -0.00392913818359375, 0.003192901611328125, -0.005023956298828125, 0.01210784912109375, -0.050689697265625, -0.053192138671875, -0.003482818603515625, -0.052764892578125, 0.001220703125, 0.002490997314453125, 0.02716064453125, 0.0231781005859375, 0.00362396240234375, -0.032196044921875, -0.00849151611328125, -0.0198974609375, -0.0361328125, -0.016510009765625, -0.0185394287109375, 0.042449951171875, 0.057861328125, -0.0021915435791015625, -0.0169219970703125, 0.0278472900390625, -0.0048675537109375, -0.0153350830078125, 0.01432037353515625, 0.00814056396484375, 0.0275726318359375, -0.0006060600280761719, 0.0129547119140625, 0.004543304443359375, 0.0267333984375, -0.0266876220703125, 0.029693603515625, -0.004184722900390625, -0.0187835693359375, -0.043792724609375, -0.017181396484375, -0.020233154296875, 0.01451873779296875, 0.051544189453125, -0.00908660888671875, 0.02850341796875, -0.0159149169921875, -0.0517578125, -0.00447845458984375, -0.0251007080078125, 0.0192413330078125, 0.0198516845703125, 0.040313720703125, 0.00980377197265625, 0.004322052001953125, -0.01076507568359375, -0.03466796875, -0.034881591796875, 0.00274658203125, -0.01239776611328125, 0.03985595703125, -0.0265655517578125, 0.0216827392578125, -0.0335693359375, 0.00788116455078125, -0.0291900634765625, 0.02935791015625, 0.0648193359375, -0.01202392578125, -0.004261016845703125, -0.02392578125, 0.03656005859375, 0.0192413330078125, -0.055511474609375, 0.0237274169921875, 0.023529052734375, 0.023681640625, -0.0229339599609375, 0.00498199462890625, 0.0231170654296875, -0.042327880859375, 0.01126861572265625, 0.0487060546875, 0.025360107421875, 0.0296478271484375, -0.01009368896484375, 0.0015439987182617188, 0.042938232421875, -0.030181884765625, -0.003704071044921875, -0.00807952880859375, 0.0019016265869140625, 0.0272979736328125, -0.0343017578125, 0.007251739501953125, 0.0248565673828125, -0.07965087890625, -0.02471923828125, 0.0460205078125, -0.005916595458984375, 0.02838134765625, -0.0153961181640625, -0.006191253662109375, -0.01216888427734375, 0.042816162109375, 0.0238800048828125, 0.00974273681640625, -0.0012521743774414062, -0.01232147216796875, 0.00820159912109375, -0.0010061264038085938, 0.01529693603515625, -0.013824462890625, 0.0055694580078125, -0.00341796875, 0.01824951171875, 0.0660400390625, 0.053192138671875, -0.038238525390625, -0.0141448974609375, -0.043243408203125, 0.01386260986328125, 0.0220794677734375, -0.0231170654296875, -0.0019893646240234375, -0.039947509765625, -0.00937652587890625, -0.010040283203125, -0.060455322265625, 0.0175628662109375, 0.02435302734375, 0.0633544921875, 0.0303192138671875, 0.0168609619140625, 0.03631591796875, -0.005008697509765625, 0.0635986328125, -0.01207733154296875, -0.0164031982421875, -0.05401611328125, -0.03521728515625, 0.0223846435546875, -0.0181884765625, 0.042388916015625, 0.0777587890625, 0.01593017578125, 0.0145416259765625, 0.014923095703125, 0.0011453628540039062, 0.01404571533203125, -0.0265960693359375, -0.03924560546875, 0.02508544921875, -0.0697021484375, -0.006317138671875, 0.0012502670288085938, 0.038970947265625, -0.0029888153076171875, -0.047698974609375, 0.0367431640625, -0.003116607666015625, -0.054901123046875, -0.08392333984375, -0.045013427734375, -0.037200927734375, 0.02130126953125, -0.00588226318359375, -0.00733184814453125, -0.00701904296875, -0.017120361328125, 0.0213623046875, -0.01055145263671875, -0.020965576171875, 0.005916595458984375, -0.0201873779296875, -0.025543212890625, 0.0086517333984375, 0.022064208984375, 0.0136566162109375, -0.00670623779296875, 0.061279296875, -0.007633209228515625, -0.044708251953125, -0.0008039474487304688, 0.046539306640625, 0.005786895751953125, 0.0082244873046875, -0.0034046173095703125, 0.033477783203125, -0.0114593505859375, 0.033233642578125, -0.057159423828125, -0.01172637939453125, -0.0087738037109375, -0.043975830078125, -0.03204345703125, -0.0201416015625, 0.007568359375, -0.007015228271484375, 0.03228759765625, 0.021453857421875, 0.02105712890625, -0.022857666015625, -0.05340576171875, 0.01031494140625, -0.0667724609375, -0.023590087890625, 0.05267333984375, -0.01146697998046875, 0.0160369873046875, -0.023040771484375, 0.0013294219970703125, -0.0098724365234375, 0.0654296875, -0.036407470703125, 0.01318359375, -0.01049041748046875, -0.00862884521484375, -0.041595458984375, -0.0118408203125, -0.024688720703125, -0.006103515625, -0.014495849609375, 0.007259368896484375, -0.01264190673828125, 0.0187835693359375, -0.0243988037109375, -0.04937744140625, 0.0212860107421875, -0.0028858184814453125, 0.006267547607421875, 0.00444793701171875, -0.00771331787109375, 0.04168701171875, 0.08807373046875, -0.0777587890625, 0.004940032958984375, 0.0164337158203125, 0.01093292236328125, -0.0208892822265625, -0.0281982421875, -0.059539794921875, -0.0074920654296875, -0.0293121337890625, 0.01264190673828125, -0.0102691650390625, -0.0021820068359375, -0.038482666015625, 0.0467529296875, -0.03118896484375, -0.0161590576171875, 0.01474761962890625, 0.00005078315734863281, -0.03875732421875, 0.0240631103515625, -0.025909423828125, 0.0024051666259765625, 0.0018777847290039062, -0.0159912109375, -0.056549072265625, -0.0176544189453125, 0.025177001953125, 0.0257568359375, -0.00010257959365844727, -0.031219482421875, -0.007808685302734375, 0.04638671875, 0.02386474609375, 0.0259552001953125, 0.026153564453125, -0.0173797607421875, 0.0802001953125, -0.04779052734375, 0.00018143653869628906, -0.020050048828125, 0.007396697998046875, -0.009857177734375, -0.053955078125, -0.0033855438232421875, -0.0265045166015625, 0.00634765625, 0.02777099609375, -0.024169921875, -0.031707763671875, -0.016998291015625, -0.04705810546875, -0.00702667236328125, -0.0322265625, 0.0025882720947265625, -0.02142333984375, -0.04364013671875, 0.01212310791015625, -0.0218353271484375, -0.044158935546875, 0.0276947021484375, 0.04681396484375, 0.03692626953125, -0.0078277587890625, 0.0005064010620117188, 0.0122833251953125, 0.034027099609375, -0.00019598007202148438, 0.047210693359375, 0.048797607421875, -0.031494140625, 0.028778076171875, 0.0265045166015625, -0.0076904296875, -0.0021820068359375, 0.047119140625, 0.002971649169921875, -0.0170440673828125, 0.0050048828125, 0.0014057159423828125, -0.00014972686767578125, 0.03448486328125, 0.00315093994140625, -0.029876708984375, -0.01309967041015625, 0.0287017822265625, -0.01357269287109375, 0.01129913330078125, -0.02587890625, 0.010986328125, -0.0022563934326171875, 0.0249786376953125, 0.03826904296875, 0.0272369384765625, 0.00531005859375, -0.01824951171875, 0.0031909942626953125, 0.016143798828125, 0.02032470703125, 0.0277099609375, -0.00797271728515625, 0.0181121826171875, 0.0184783935546875, -0.00978851318359375, -0.0160064697265625, 0.00141143798828125, 0.051605224609375, -0.04913330078125, -0.08740234375, -0.01861572265625, -0.0296630859375, 0.02569580078125, 0.051605224609375, 0.033660888671875, 0.0391845703125, -0.022125244140625, -0.038299560546875, -0.025360107421875, 0.0000546574592590332, -0.0156707763671875, -0.06890869140625, 0.0252685546875, -0.00734710693359375, 0.0015687942504882812, 0.00511932373046875, 0.062408447265625, 0.005603790283203125, 0.032958984375, -0.0293731689453125, -0.028106689453125, 0.0200653076171875, -0.0171966552734375, 0.0193023681640625, 0.0421142578125, 0.0163421630859375, -0.0180816650390625, 0.083984375, -0.01824951171875, 0.004772186279296875, 0.0311279296875, 0.018585205078125, -0.01268768310546875, -0.02301025390625, 0.00817108154296875, -0.0022640228271484375, -0.048858642578125, 0.06439208984375, 0.03228759765625, -0.06982421875, -0.031402587890625, 0.003284454345703125, 0.0224151611328125, -0.00887298583984375, -0.025543212890625, 0.0030002593994140625, -0.032958984375, 0.050811767578125, -0.033782958984375, -0.00726318359375, 0.044189453125, 0.028289794921875, -0.0141448974609375, -0.0012845993041992188, 0.028076171875, -0.05145263671875, 0.003940582275390625, -0.0361328125, -0.037322998046875, 0.02142333984375, 0.0005259513854980469, 0.04486083984375, -0.0180511474609375, -0.036407470703125, -0.01053619384765625, 0.0200653076171875, 0.030609130859375, 0.01165008544921875, -0.08160400390625, 0.002964019775390625, -0.06787109375, 0.006694793701171875, -0.022003173828125, -0.048065185546875, -0.0260467529296875, -0.00643157958984375, 0.0267791748046875, 0.036346435546875, -0.0243072509765625, -0.0726318359375, -0.0260467529296875, 0.0118560791015625, 0.05328369140625, 0.06549072265625, 0.013580322265625, 0.0609130859375, 0.0004553794860839844, 0.0311279296875, 0.021942138671875, 0.02484130859375, -0.0384521484375, -0.024383544921875, -0.0015802383422851562, -0.0035114288330078125, 0.01116943359375, -0.0020904541015625, 0.006687164306640625, -0.042022705078125, 0.0170745849609375, 0.00019598007202148438, -0.0009188652038574219, 0.01045989990234375, -0.00826263427734375, -0.0162200927734375, -0.0174713134765625, 0.0216522216796875, -0.0030670166015625, 0.0005784034729003906, 0.015289306640625, -0.02679443359375, -0.0178680419921875, -0.037109375, 0.01474761962890625, 0.03741455078125, 0.006099700927734375, -0.0285797119140625, -0.0792236328125, 0.08489990234375, 0.1119384765625, 0.021087646484375, 0.069091796875, 0.032806396484375, 0.021575927734375, 0.04345703125, 0.046722412109375, -0.056640625, -0.031402587890625, 0.0390625, 0.0135955810546875, -0.034027099609375, 0.01235198974609375, -0.03167724609375, 0.0166473388671875, 0.051361083984375, 0.046875, -0.06494140625, -0.0009641647338867188, 0.019683837890625, 0.000019729137420654297, 0.044891357421875, 0.021209716796875, 0.0096588134765625, 0.004596710205078125, 0.06304931640625, -0.01184844970703125, 0.01837158203125, 0.06427001953125, -0.0248870849609375, 0.01332855224609375, -0.0237884521484375, 0.06817626953125, 0.0166778564453125, -0.031341552734375, -0.0190887451171875, 0.04949951171875, -0.04669189453125, -0.007419586181640625, 0.018707275390625, -0.039093017578125, -0.0294036865234375, -0.0377197265625, -0.03143310546875, -0.0023479461669921875, -0.01371002197265625, 0.046173095703125, -0.0073699951171875, -0.01849365234375, 0.0176544189453125, -0.032440185546875, 0.05999755859375, -0.03802490234375, -0.026153564453125, -0.05096435546875, 0.0153350830078125, 0.058074951171875, 0.007625579833984375, -0.042938232421875, 0.02825927734375, -0.060150146484375, -0.019134521484375, -0.0221099853515625, -0.08758544921875, 0.034332275390625, 0.006908416748046875, -0.0125579833984375, -0.014892578125, -0.0010051727294921875, 0.01178741455078125, -0.0199432373046875, 0.056793212890625, -0.049224853515625, -0.0082855224609375, 0.0031948089599609375, -0.011322021484375, -0.044525146484375, -0.0274505615234375, -0.0596923828125, 0.0565185546875, -0.043182373046875, 0.05255126953125, -0.02691650390625, 0.0189056396484375, 0.03204345703125, 0.0160064697265625, -0.043060302734375, 0.03497314453125, 0.02911376953125, 0.0540771484375, -0.020904541015625, 0.00457000732421875, 0.0204620361328125, 0.01318359375, -0.00882720947265625, 0.00508880615234375, -0.014373779296875, 0.01514434814453125, 0.0272369384765625, 0.0257415771484375, 0.00036215782165527344, 0.0226593017578125, -0.064697265625, 0.0133514404296875, 0.03814697265625, -0.06707763671875, 0.044036865234375, -0.03070068359375, -0.016876220703125, -0.053466796875, 0.00623321533203125, -0.0005145072937011719, -0.00629425048828125, -0.00701141357421875, -0.0228729248046875, -0.003139495849609375, 0.01904296875, -0.01837158203125, -0.01336669921875, 0.0479736328125, 0.021026611328125, 0.0172271728515625, 0.05340576171875, -0.04022216796875, 0.048980712890625, 0.0112762451171875, 0.0189056396484375, 0.03033447265625, 0.028289794921875, 0.00336456298828125, 0.022705078125, 0.0269317626953125, 0.033935546875, -0.0096893310546875, 0.054168701171875, 0.051177978515625, 0.0421142578125, -0.0014200210571289062, -0.0113525390625, 0.0123443603515625, 0.05975341796875, -0.0276641845703125, -0.046295166015625, -0.0019197463989257812, -0.039093017578125, -0.0208587646484375, -0.0034885406494140625, -0.05078125, 0.0006074905395507812, 0.0179595947265625, -0.065185546875, 0.0135650634765625, 0.0258026123046875, 0.02435302734375, -0.01194000244140625, 0.01003265380859375, -0.0474853515625, -0.0220489501953125, -0.03863525390625, 0.01287841796875, 0.004180908203125, 0.01538848876953125, 0.0172119140625, 0.015472412109375, 0.048614501953125, 0.0091400146484375, -0.0270233154296875, 0.0002582073211669922, -0.035125732421875, 0.04278564453125, -0.08026123046875, -0.04241943359375, -0.01059722900390625, 0.05926513671875, 0.06597900390625, 0.03521728515625, -0.002956390380859375, -0.00463104248046875, 0.03399658203125, 0.02532958984375, 0.039031982421875, -0.0128326416015625, 0.013397216796875, 0.0193939208984375, -0.0166473388671875, -0.00846099853515625, -0.041046142578125, -0.02557373046875, 0.045867919921875, 0.014190673828125, -0.0098419189453125, 0.02899169921875, 0.005527496337890625, 0.006282806396484375, 0.0251007080078125, 0.00800323486328125, 0.026275634765625, 0.01422119140625, -0.0450439453125, -0.0184326171875, -0.025787353515625, 0.00025582313537597656, 0.00560760498046875, 0.02490234375, 0.01556396484375, -0.01018524169921875, 0.006687164306640625, 0.0045166015625, 0.03497314453125, -0.0340576171875, 0.0174560546875, -0.003414154052734375, 0.0182952880859375, 0.00033593177795410156, -0.00373077392578125, 0.00669097900390625, 0.03948974609375, -0.0032558441162109375, -0.006076812744140625, 0.051544189453125, 0.0026569366455078125, -0.007465362548828125, 0.02520751953125, 0.036651611328125, -0.01538848876953125, -0.01605224609375, 0.03948974609375, -0.0016841888427734375, 0.028778076171875, -0.017303466796875, -0.052734375, 0.0008072853088378906, 0.040985107421875, -0.0257110595703125, 0.039947509765625, -0.02056884765625, -0.0010251998901367188, -0.046051025390625, -0.019744873046875, -0.040496826171875, -0.005817413330078125, 0.0030345916748046875, -0.0019817352294921875, 0.004123687744140625, -0.04095458984375, -0.017486572265625, 0.07855224609375, -0.005645751953125, -0.041748046875, 0.0120391845703125, -0.10125732421875, 0.01287841796875, 0.01495361328125, 0.047943115234375, -0.0259246826171875, -0.01024627685546875, 0.00441741943359375, 0.007671356201171875, 0.018890380859375, 0.0135498046875, 0.0257415771484375, 0.022918701171875, -0.00322723388671875, 0.00763702392578125, 0.02001953125, -0.05364990234375, -0.002506256103515625, 0.038543701171875, 0.00653839111328125, -0.0147552490234375, -0.038970947265625, -0.0115814208984375, -0.043304443359375, -0.0184478759765625, 0.0219268798828125, -0.036651611328125, -0.03533935546875, -0.02423095703125, -0.01450347900390625, 0.01363372802734375, -0.04522705078125, 0.034393310546875, -0.03271484375, -0.047882080078125, 0.0282135009765625, -0.02435302734375, -0.015106201171875, -0.00873565673828125, -0.0147247314453125, -0.0228424072265625, 0.02874755859375, -0.033935546875, -0.0285797119140625, 0.0110931396484375, 0.023773193359375, 0.035675048828125, -0.010467529296875, -0.00972747802734375, 0.005184173583984375, -0.00862884521484375, 0.04638671875, -0.0223388671875, -0.03936767578125, 0.002285003662109375, 0.003726959228515625, 0.003063201904296875, -0.007678985595703125, 0.0137176513671875, -0.035003662109375, -0.035980224609375, -0.0518798828125, 0.012847900390625, 0.007083892822265625, -0.040863037109375, -0.031829833984375, 0.057037353515625, -0.021514892578125, -0.0249481201171875, -0.03424072265625, 0.0022258758544921875, 0.0025768280029296875, -0.032684326171875, -0.018310546875, 0.005741119384765625, -0.0189208984375, 0.030609130859375, 0.0188140869140625, 0.034912109375, 0.0241851806640625, 0.00725555419921875, -0.03466796875, 0.007770538330078125, -0.0302886962890625, 0.016387939453125, -0.0222930908203125, 0.0184173583984375, -0.01320648193359375, 0.0203857421875, -0.033477783203125, 0.0177001953125, 0.00519561767578125, 0.0271148681640625, 0.01397705078125, 0.0009870529174804688, 0.01386260986328125, 0.008636474609375, -0.001438140869140625, -0.0032672882080078125, -0.01114654541015625, -0.021942138671875, -0.07403564453125, -0.0447998046875, -0.042449951171875, 0.025604248046875, 0.0182647705078125, -0.048736572265625, 0.062255859375, -0.0066375732421875, -0.02740478515625, -0.033111572265625, 0.0083770751953125, -0.06390380859375, 0.01488494873046875, 0.0024662017822265625, -0.0018625259399414062, -0.0142059326171875, -0.025604248046875, 0.0282135009765625, -0.031219482421875, -0.031829833984375, 0.007579803466796875, 0.0197906494140625, -0.0228118896484375, 0.0308380126953125, 0.0360107421875, 0.059844970703125, -0.04736328125, -0.043914794921875, 0.045379638671875, 0.01221466064453125, 0.0295867919921875, -0.0241546630859375, 0.0565185546875, 0.00749969482421875, -0.0316162109375, 0.0158233642578125, 0.0201263427734375, 0.00960540771484375, -0.06854248046875, 0.037872314453125, -0.0017461776733398438, 0.06744384765625, 0.0036106109619140625, 0.0479736328125, -0.03472900390625, -0.0015106201171875, -0.0195465087890625, -0.00643157958984375, 0.005176544189453125, -0.0026874542236328125, 0.0052032470703125, -0.0164642333984375, 0.0067138671875, -0.032928466796875, -0.021270751953125, 0.0134124755859375 ]
5b18fe8db2078f4ef1a65e8742345841a5f0a018
Wordpress Stackexchange Q: Is there a way to parse shortcodes in PHP? Many plugins don't provide a documented way to access their functions from within PHP (e.g. when building a custom theme), but only shortcodes to insert in posts. Is there a standard way of executing shortcode from within PHP as if it were part of the content? Like so (this is made up): $gallery_html = execute_shortcode("{gallery}"); // this would return the HTML // that the gallery plugin returns // in the context of the current post A: You can execute shortcodes using the do_shortcode() function $gallery_html = do_shortcode('[gallery]');
Q: Is there a way to parse shortcodes in PHP? Many plugins don't provide a documented way to access their functions from within PHP (e.g. when building a custom theme), but only shortcodes to insert in posts. Is there a standard way of executing shortcode from within PHP as if it were part of the content? Like so (this is made up): $gallery_html = execute_shortcode("{gallery}"); // this would return the HTML // that the gallery plugin returns // in the context of the current post A: You can execute shortcodes using the do_shortcode() function $gallery_html = do_shortcode('[gallery]');
wordpress
{ "language": "en", "length": 97, "provenance": "stackexchange_00019.jsonl.gz:413632", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30403" }
[ 0.048675537109375, -0.0030612945556640625, -0.010772705078125, -0.0302734375, -0.004547119140625, -0.0195770263671875, 0.0162506103515625, -0.0169219970703125, -0.0282440185546875, 0.02734375, 0.0025539398193359375, 0.00698089599609375, -0.0703125, -0.02581787109375, -0.03076171875, -0.04888916015625, 0.015594482421875, 0.029876708984375, 0.037750244140625, -0.004364013671875, -0.00687408447265625, 0.018402099609375, 0.0086669921875, 0.024627685546875, 0.00637054443359375, 0.0004849433898925781, 0.06109619140625, -0.00574493408203125, -0.0004849433898925781, -0.00966644287109375, 0.0091400146484375, -0.00832366943359375, 0.031646728515625, 0.029266357421875, -0.04669189453125, 0.05633544921875, -0.0232391357421875, 0.0192108154296875, -0.01117706298828125, 0.036712646484375, 0.034881591796875, -0.01241302490234375, 0.0301971435546875, -0.00809478759765625, -0.00811767578125, 0.020050048828125, 0.01312255859375, -0.031890869140625, -0.013916015625, -0.0011997222900390625, 0.03466796875, -0.010955810546875, 0.04937744140625, -0.06256103515625, -0.0079193115234375, -0.00867462158203125, -0.00208282470703125, -0.0374755859375, 0.0270233154296875, 0.0151824951171875, -0.02783203125, -0.03564453125, 0.0285491943359375, -0.041534423828125, 0.03167724609375, 0.02276611328125, -0.009429931640625, 0.039337158203125, -0.004596710205078125, 0.0443115234375, 0.0033721923828125, -0.0313720703125, 0.0010271072387695312, -0.034393310546875, 0.01210784912109375, 0.042327880859375, -0.01480865478515625, 0.005184173583984375, 0.007476806640625, 0.004817962646484375, 0.03173828125, 0.0001996755599975586, -0.039581298828125, -0.0022487640380859375, 0.005573272705078125, 0.009979248046875, -0.0009002685546875, -0.0234832763671875, -0.0010519027709960938, -0.01233673095703125, -0.0219879150390625, 0.04376220703125, -0.0208740234375, -0.0153961181640625, -0.035675048828125, -0.00565338134765625, -0.021209716796875, 0.00437164306640625, -0.0117950439453125, 0.04168701171875, -0.018768310546875, -0.03759765625, 0.056915283203125, -0.031494140625, -0.01560211181640625, 0.0121307373046875, 0.01493072509765625, -0.002674102783203125, 0.01261138916015625, 0.0165252685546875, -0.02520751953125, -0.0029239654541015625, -0.03778076171875, -0.0235443115234375, -0.0041656494140625, 0.035858154296875, -0.03448486328125, 0.005771636962890625, -0.0030460357666015625, 0.008453369140625, -0.004425048828125, 0.015106201171875, 0.018798828125, 0.00009244680404663086, -0.0309906005859375, -0.0150604248046875, -0.00704193115234375, -0.049652099609375, 0.0498046875, -0.033599853515625, -0.0200958251953125, 0.040496826171875, 0.0312042236328125, -0.0004379749298095703, 0.00395965576171875, 0.01279449462890625, 0.01094818115234375, -0.0247344970703125, 0.0179443359375, -0.0241851806640625, 0.050079345703125, -0.01861572265625, -0.01375579833984375, 0.02227783203125, 0.0648193359375, 0.01371002197265625, 0.0491943359375, 0.01611328125, -0.021514892578125, -0.050994873046875, 0.0587158203125, 0.037872314453125, -0.0010347366333007812, 0.0297393798828125, 0.0225830078125, 0.0121307373046875, 0.03509521484375, -0.03192138671875, 0.02203369140625, -0.0238189697265625, -0.005157470703125, -0.00913238525390625, -0.00504302978515625, -0.022430419921875, -0.033447265625, 0.002887725830078125, -0.002101898193359375, -0.0001728534698486328, 0.0164947509765625, 0.0302886962890625, -0.029266357421875, -0.0262298583984375, -0.016937255859375, 0.046783447265625, 0.011016845703125, 0.039886474609375, -0.044769287109375, -0.0243988037109375, 0.0262603759765625, -0.00901031494140625, -0.0181427001953125, -0.0307464599609375, -0.008453369140625, 0.01947021484375, -0.042083740234375, 0.044891357421875, 0.0223236083984375, 0.0687255859375, -0.0032329559326171875, 0.0307769775390625, 0.01404571533203125, 0.029083251953125, -0.02105712890625, 0.033172607421875, 0.004291534423828125, -0.0196075439453125, -0.01003265380859375, 0.006000518798828125, -0.01690673828125, -0.0369873046875, -0.0025482177734375, -0.010101318359375, 0.01450347900390625, 0.0274200439453125, -0.0007915496826171875, -0.013092041015625, -0.0151214599609375, 0.00769805908203125, -0.0272369384765625, -0.0017070770263671875, 0.0213165283203125, -0.0270233154296875, -0.01331329345703125, 0.03607177734375, 0.00542449951171875, 0.033721923828125, -0.0253753662109375, 0.045135498046875, -0.004940032958984375, 0.05462646484375, 0.00655364990234375, -0.0721435546875, 0.0029125213623046875, 0.0030975341796875, 0.031463623046875, -0.004085540771484375, -0.0184783935546875, -0.0214080810546875, -0.0184326171875, 0.0272369384765625, -0.05914306640625, 0.01522064208984375, -0.00930023193359375, -0.0180511474609375, -0.031280517578125, -0.0078277587890625, -0.01168060302734375, -0.052825927734375, 0.0193939208984375, 0.0455322265625, 0.06103515625, 0.037689208984375, 0.0224761962890625, -0.046356201171875, 0.07537841796875, -0.01367950439453125, 0.034454345703125, -0.06561279296875, -0.01617431640625, 0.0650634765625, -0.0478515625, 0.04034423828125, -0.00612640380859375, -0.00069427490234375, -0.046234130859375, 0.058319091796875, 0.01001739501953125, -0.020294189453125, -0.012359619140625, 0.034088134765625, 0.0035419464111328125, 0.00708770751953125, -0.019866943359375, -0.005523681640625, 0.06890869140625, 0.003795623779296875, 0.034820556640625, 0.0312347412109375, -0.045196533203125, 0.023193359375, 0.0077972412109375, -0.006305694580078125, 0.00911712646484375, 0.06304931640625, -0.000438690185546875, 0.0016622543334960938, -0.011993408203125, -0.0260467529296875, -0.004436492919921875, 0.0192413330078125, -0.0030364990234375, 0.0479736328125, -0.0148773193359375, -0.0134735107421875, -0.0206756591796875, -0.025299072265625, 0.01364898681640625, 0.034271240234375, -0.01004791259765625, -0.0254058837890625, 0.0022487640380859375, 0.04986572265625, -0.041107177734375, 0.06689453125, 0.002155303955078125, -0.006649017333984375, 0.041595458984375, -0.032012939453125, 0.040985107421875, -0.0059051513671875, 0.0197906494140625, 0.059051513671875, -0.001117706298828125, 0.0051116943359375, 0.00896453857421875, -0.017974853515625, -0.0111083984375, 0.01483154296875, 0.0031585693359375, -0.025665283203125, -0.01450347900390625, 0.0153045654296875, 0.0208892822265625, 0.06610107421875, -0.0157623291015625, -0.051116943359375, -0.0028228759765625, 0.041595458984375, -0.06781005859375, -0.07147216796875, 0.05242919921875, -0.061676025390625, -0.0009908676147460938, -0.0282135009765625, -0.037017822265625, -0.008270263671875, 0.00490570068359375, -0.0201873779296875, -0.005008697509765625, -0.027801513671875, -0.02691650390625, -0.041900634765625, -0.055450439453125, 0.033966064453125, 0.01300048828125, 0.0160369873046875, 0.0007367134094238281, 0.038726806640625, 0.00019371509552001953, -0.040496826171875, -0.0084228515625, 0.0093536376953125, -0.0184783935546875, 0.003063201904296875, 0.0164337158203125, -0.0175628662109375, -0.01654052734375, 0.0009722709655761719, -0.02972412109375, 0.0063934326171875, 0.00038433074951171875, -0.019195556640625, 0.0023975372314453125, 0.00888824462890625, 0.02978515625, 0.0095062255859375, -0.017974853515625, 0.0124664306640625, 0.020538330078125, -0.0355224609375, -0.005954742431640625, -0.01776123046875, -0.062744140625, -0.01184844970703125, 0.044281005859375, 0.002849578857421875, -0.0177001953125, -0.0238189697265625, 0.0013027191162109375, 0.0273284912109375, 0.019744873046875, 0.0017194747924804688, -0.02301025390625, -0.011871337890625, -0.002696990966796875, -0.0092926025390625, 0.020111083984375, -0.01192474365234375, 0.0240325927734375, 0.005847930908203125, 0.01174163818359375, -0.006927490234375, 0.007656097412109375, -0.04559326171875, -0.02099609375, 0.050872802734375, 0.022979736328125, 0.061981201171875, -0.0513916015625, -0.04083251953125, -0.034820556640625, 0.0777587890625, -0.028167724609375, 0.00113677978515625, -0.0008287429809570312, -0.01470947265625, -0.01983642578125, -0.019195556640625, -0.08465576171875, -0.0171051025390625, -0.0806884765625, 0.0203399658203125, 0.010162353515625, -0.013275146484375, -0.0079803466796875, -0.0009388923645019531, -0.045379638671875, -0.0279693603515625, 0.03277587890625, 0.006561279296875, 0.03741455078125, -0.0030803680419921875, 0.0008168220520019531, -0.025543212890625, -0.01087188720703125, -0.004680633544921875, -0.08251953125, -0.0195159912109375, -0.0030231475830078125, 0.05792236328125, 0.033660888671875, -0.0826416015625, -0.0269317626953125, 0.03509521484375, -0.03338623046875, 0.009368896484375, -0.00789642333984375, 0.04315185546875, -0.036651611328125, 0.0268402099609375, 0.0167236328125, -0.005474090576171875, 0.0095977783203125, 0.039947509765625, 0.03460693359375, 0.048675537109375, -0.0343017578125, -0.0771484375, -0.0026454925537109375, -0.042999267578125, -0.03106689453125, -0.0219573974609375, -0.0010747909545898438, 0.0222320556640625, -0.0418701171875, 0.034942626953125, -0.016510009765625, -0.0276947021484375, 0.036376953125, 0.0019292831420898438, -0.0099945068359375, 0.0055999755859375, 0.061309814453125, 0.0101165771484375, -0.0207061767578125, -0.067626953125, 0.0127105712890625, 0.048919677734375, -0.000904083251953125, 0.01328277587890625, 0.0196685791015625, -0.0419921875, 0.053802490234375, 0.021026611328125, 0.01263427734375, -0.043365478515625, 0.052398681640625, 0.01873779296875, 0.01192474365234375, -0.00748443603515625, 0.016265869140625, 0.004596710205078125, 0.0367431640625, -0.01447296142578125, 0.01003265380859375, 0.007648468017578125, -0.01247406005859375, -0.0189208984375, 0.0120391845703125, 0.00125885009765625, -0.0295257568359375, -0.0002129077911376953, 0.056915283203125, -0.004253387451171875, 0.04132080078125, -0.0189208984375, 0.012664794921875, -0.01447296142578125, 0.0149993896484375, 0.033355712890625, 0.01035308837890625, 0.0039520263671875, 0.05438232421875, -0.0305938720703125, 0.001514434814453125, 0.0189056396484375, 0.02105712890625, -0.0179901123046875, 0.01313018798828125, -0.0010395050048828125, -0.1014404296875, 0.034576416015625, -0.01311492919921875, -0.052001953125, -0.0094451904296875, 0.0255279541015625, 0.037322998046875, -0.0159759521484375, 0.0194244384765625, -0.0041656494140625, 0.01439666748046875, -0.0257110595703125, -0.042205810546875, -0.044403076171875, -0.015655517578125, 0.0308074951171875, -0.0019550323486328125, -0.06396484375, 0.038116455078125, 0.0000324249267578125, 0.013336181640625, 0.0204010009765625, -0.0052642822265625, 0.014434814453125, -0.0019855499267578125, 0.037811279296875, -0.050506591796875, 0.0199432373046875, -0.03546142578125, -0.025909423828125, 0.0162811279296875, 0.0307464599609375, -0.0151824951171875, -0.0006308555603027344, 0.0024929046630859375, 0.008819580078125, -0.019622802734375, -0.00849151611328125, -0.0234375, 0.0266571044921875, -0.057220458984375, -0.03558349609375, 0.057373046875, 0.03741455078125, -0.0221710205078125, 0.0335693359375, -0.0269927978515625, 0.03106689453125, -0.00009399652481079102, -0.012939453125, -0.003879547119140625, -0.01209259033203125, 0.0008492469787597656, -0.001308441162109375, -0.0216522216796875, 0.0213775634765625, -0.002857208251953125, -0.0244598388671875, -0.035430908203125, 0.088134765625, -0.02423095703125, 0.0021724700927734375, -0.06317138671875, 0.043243408203125, -0.040008544921875, -0.0142822265625, 0.06732177734375, 0.03399658203125, -0.034454345703125, 0.016815185546875, -0.035308837890625, -0.007183074951171875, 0.00888824462890625, -0.032958984375, -0.049530029296875, -0.03192138671875, 0.0024662017822265625, 0.033935546875, -0.003017425537109375, 0.0203094482421875, 0.001537322998046875, 0.01496124267578125, -0.0229644775390625, 0.07623291015625, -0.0026836395263671875, 0.0032444000244140625, 0.0048980712890625, 0.043060302734375, 0.005657196044921875, -0.01059722900390625, -0.01226043701171875, -0.0220184326171875, 0.0271148681640625, 0.0011663436889648438, -0.07147216796875, -0.017486572265625, 0.0035457611083984375, -0.0038127899169921875, 0.0438232421875, -0.0269775390625, 0.01413726806640625, -0.01177978515625, -0.01294708251953125, -0.006778717041015625, 0.0253753662109375, 0.0091094970703125, 0.007663726806640625, 0.02166748046875, -0.03643798828125, -0.031280517578125, -0.002468109130859375, -0.0250396728515625, 0.062042236328125, 0.00033974647521972656, 0.0252227783203125, 0.01453399658203125, -0.0169677734375, 0.051849365234375, 0.055938720703125, -0.0131988525390625, 0.036346435546875, 0.038238525390625, -0.0027141571044921875, -0.01110076904296875, 0.0260467529296875, 0.034912109375, -0.0071258544921875, 0.065673828125, -0.0019855499267578125, -0.007640838623046875, 0.0214996337890625, -0.025390625, 0.039306640625, 0.041046142578125, 0.06793212890625, -0.065185546875, 0.019775390625, 0.027740478515625, -0.03131103515625, 0.00577545166015625, -0.044830322265625, 0.01300811767578125, -0.023529052734375, 0.06744384765625, 0.0384521484375, -0.00878143310546875, 0.022552490234375, -0.0179443359375, -0.01332855224609375, -0.0086822509765625, 0.048431396484375, 0.02374267578125, -0.025115966796875, 0.0196380615234375, 0.007266998291015625, 0.016265869140625, -0.050201416015625, 0.004871368408203125, 0.020721435546875, -0.0222320556640625, -0.0494384765625, 0.053680419921875, 0.01056671142578125, 0.022369384765625, -0.006755828857421875, 0.001983642578125, 0.0243072509765625, 0.049713134765625, -0.0281982421875, 0.01462554931640625, 0.03302001953125, 0.010986328125, -0.0161895751953125, -0.0117034912109375, 0.01203155517578125, 0.055267333984375, -0.054931640625, 0.022308349609375, -0.0228118896484375, 0.01666259765625, -0.01496124267578125, -0.040130615234375, 0.0771484375, -0.06298828125, 0.0019664764404296875, -0.00783538818359375, 0.022491455078125, 0.01438140869140625, -0.008636474609375, 0.004634857177734375, -0.0214080810546875, 0.015228271484375, -0.0106048583984375, -0.007419586181640625, -0.020782470703125, -0.03240966796875, -0.10321044921875, 0.0750732421875, 0.03863525390625, 0.052825927734375, 0.018798828125, 0.00843048095703125, -0.0543212890625, -0.03546142578125, -0.0214691162109375, 0.0406494140625, 0.0036029815673828125, 0.02386474609375, -0.0010929107666015625, 0.004852294921875, 0.021392822265625, 0.0161895751953125, 0.006221771240234375, -0.0018701553344726562, 0.005573272705078125, 0.0205535888671875, 0.04998779296875, 0.00705718994140625, -0.021209716796875, 0.0218048095703125, 0.002971649169921875, 0.0019502639770507812, 0.0259246826171875, -0.0267486572265625, 0.02398681640625, -0.033599853515625, 0.006458282470703125, 0.02001953125, 0.0012731552124023438, -0.0128326416015625, -0.0005221366882324219, 0.00400543212890625, 0.00031685829162597656, -0.007503509521484375, -0.011993408203125, -0.009185791015625, -0.0209197998046875, 0.061126708984375, 0.0287017822265625, -0.0455322265625, -0.047149658203125, -0.02337646484375, 0.03216552734375, 0.0004665851593017578, 0.038238525390625, -0.00719451904296875, 0.01251220703125, 0.046539306640625, -0.0183563232421875, 0.0114288330078125, 0.0191497802734375, -0.0171966552734375, 0.037841796875, -0.00981903076171875, 0.006687164306640625, -0.07330322265625, -0.01436614990234375, 0.04058837890625, 0.06024169921875, -0.017852783203125, -0.033203125, 0.007633209228515625, 0.01396942138671875, 0.005443572998046875, 0.0117950439453125, 0.020965576171875, -0.0278167724609375, 0.0031585693359375, 0.0033779144287109375, -0.035064697265625, 0.00479888916015625, 0.03662109375, 0.0182342529296875, 0.01549530029296875, -0.0029754638671875, -0.066162109375, -0.0142822265625, 0.0087738037109375, -0.0167083740234375, 0.00516510009765625, -0.0022258758544921875, 0.04052734375, -0.022125244140625, -0.002819061279296875, 0.003753662109375, 0.041717529296875, -0.042938232421875, 0.005615234375, -0.039794921875, -0.068603515625, -0.021026611328125, 0.04840087890625, -0.001129150390625, 0.038665771484375, 0.00540924072265625, 0.00528717041015625, 0.0225830078125, -0.00597381591796875, 0.03204345703125, -0.015899658203125, -0.01256561279296875, -0.01334381103515625, -0.004665374755859375, 0.00485992431640625, -0.0092620849609375, -0.0208740234375, 0.0223236083984375, 0.0174560546875, -0.049835205078125, 0.06658935546875, -0.0242919921875, -0.0021953582763671875, 0.032440185546875, -0.034881591796875, 0.03961181640625, -0.0222320556640625, -0.00811767578125, -0.004241943359375, -0.005237579345703125, -0.038604736328125, 0.0177764892578125, 0.034637451171875, -0.0223236083984375, 0.036102294921875, -0.0017614364624023438, -0.0117950439453125, 0.01160430908203125, 0.00402069091796875, 0.00115203857421875, -0.0136260986328125, 0.01549530029296875, -0.016387939453125, -0.0287017822265625, -0.04168701171875, -0.070556640625, 0.1051025390625, 0.06402587890625, 0.033050537109375, -0.040557861328125, 0.06951904296875, -0.0341796875, -0.022552490234375, 0.0012712478637695312, -0.0238494873046875, 0.0179443359375, 0.000598907470703125, -0.0263671875, -0.026702880859375, 0.038421630859375, 0.025146484375, 0.032257080078125, -0.0253143310546875, -0.0122833251953125, -0.0261077880859375, 0.02093505859375, 0.01251983642578125, 0.06787109375, -0.0014925003051757812, -0.043212890625, -0.05096435546875, 0.006740570068359375, 0.03814697265625, 0.072021484375, -0.01245880126953125, 0.0025806427001953125, 0.06707763671875, -0.0223388671875, 0.02490234375, -0.00850677490234375, 0.036041259765625, 0.0360107421875, 0.04852294921875, -0.0012578964233398438, -0.00960540771484375, -0.01470184326171875, -0.007091522216796875, 0.037200927734375, -0.03265380859375, 0.01971435546875, -0.061614990234375, -0.007495880126953125, 0.051605224609375, 0.06793212890625, 0.009033203125, 0.039703369140625, 0.0034084320068359375, -0.019866943359375, 0.0165252685546875, -0.042510986328125, -0.01064300537109375, -0.0634765625, 0.01470947265625, 0.030364990234375, -0.019012451171875, 0.0002505779266357422, -0.01076507568359375, -0.018310546875, 0.01311492919921875, 0.007061004638671875, -0.036590576171875, -0.006305694580078125, 0.0161895751953125, -0.01151275634765625, 0.0008301734924316406, -0.0014600753784179688, -0.0026493072509765625, 0.026397705078125, -0.0299072265625, -0.034881591796875, -0.031707763671875, 0.0179901123046875, -0.049224853515625, 0.0662841796875, 0.097412109375, -0.0638427734375, -0.06927490234375, 0.08355712890625, 0.03228759765625, 0.1234130859375, -0.0153656005859375, -0.025787353515625, 0.0236358642578125, 0.0021419525146484375, -0.019134521484375, -0.03131103515625, 0.0212554931640625, -0.046478271484375, 0.0115966796875, 0.01531982421875, -0.01145172119140625, 0.0206146240234375, -0.044708251953125, -0.1234130859375, 0.01459503173828125, -0.0137939453125, -0.055450439453125, -0.03497314453125, 0.02880859375, 0.01555633544921875, 0.005268096923828125, -0.0202484130859375, -0.00600433349609375, -0.0280609130859375, -0.00008600950241088867, 0.0128173828125, 0.00841522216796875, 0.004276275634765625, -0.00354766845703125, -0.031341552734375, 0.04766845703125, 0.03173828125, 0.01172637939453125, -0.0000776052474975586, -0.035247802734375, 0.051422119140625, 0.0263519287109375, -0.040374755859375, -0.033050537109375, 0.028472900390625, 0.036224365234375, 0.018402099609375, -0.06890869140625, -0.0474853515625, -0.034393310546875, 0.07196044921875, 0.0285797119140625, 0.0296478271484375, -0.02813720703125, -0.013275146484375, 0.008758544921875, 0.0006251335144042969, -0.0256805419921875, 0.012176513671875, -0.052642822265625, -0.0343017578125, -0.0269012451171875, 0.0164794921875, 0.006473541259765625, -0.01116943359375, -0.0030364990234375, -0.040252685546875, -0.026824951171875, -0.017364501953125, -0.0133056640625, -0.032989501953125, 0.09686279296875, -0.0474853515625, 0.01224517822265625, 0.01641845703125, 0.0198516845703125, 0.046844482421875, 0.0292205810546875, 0.01331329345703125, 0.037872314453125, -0.0186309814453125, -0.01052093505859375, 0.035125732421875, 0.019134521484375, 0.033935546875, -0.01067352294921875, 0.01407623291015625, 0.0255889892578125, -0.0108489990234375, 0.024627685546875, -0.0287017822265625, 0.04595947265625, 0.003261566162109375, 0.0158233642578125, -0.0241851806640625, -0.004596710205078125, -0.0008711814880371094, 0.002704620361328125, -0.030792236328125, -0.0011453628540039062, 0.0194244384765625, -0.04962158203125, 0.01078033447265625, 0.0355224609375, 0.030426025390625, -0.0350341796875, 0.0297393798828125, 0.013519287109375, 0.035186767578125, 0.00787353515625 ]
2d517933b45bcfac93a83765be92d8c8a44c440f
Wordpress Stackexchange Q: How to edit a wordpress plugin without break its update process I would like to add some additional features/functionality with already available WordPress plugin. Is it possible to carry over my customization while updating the plugin? A: Probably not. The recommended way to get your enhancements into the plugin is: Send your fixes to the developer and ask her to merge them into the original. If your changes are rather personal customizations, this won’t happen. If the plugin is written in a strict OOP style you can create a second plugin which extends just the classes from the original as you need it (sort of a child plugin). Unfortunately most plugin developers don’t see this need and don’t write their code accordingly. Be aware of the load order problem. We could help better if you would describe which plugin you want to extend and what exactly you want to change.
Q: How to edit a wordpress plugin without break its update process I would like to add some additional features/functionality with already available WordPress plugin. Is it possible to carry over my customization while updating the plugin? A: Probably not. The recommended way to get your enhancements into the plugin is: Send your fixes to the developer and ask her to merge them into the original. If your changes are rather personal customizations, this won’t happen. If the plugin is written in a strict OOP style you can create a second plugin which extends just the classes from the original as you need it (sort of a child plugin). Unfortunately most plugin developers don’t see this need and don’t write their code accordingly. Be aware of the load order problem. We could help better if you would describe which plugin you want to extend and what exactly you want to change. A: Unfortunately it totally depends on the plugin (or more accurately, on the plugin author!) If the author was thinking pro-actively and created the plugin in such a way to make it extensible, then yes, you can create your OWN plugin that adds to the functionality in the existing plugin. Do make note of what Toscho pointed out - that your plugin order matters (the link again is here). Hooks The most common way to make a plugin extensible is to add hooks (action and filter hooks) that you can then leverage with your own plugin. If you have a good code editor (right now I'm rocking out on NetBeans) you should do a search through the plugin source files for: do_action and apply_filters. If the plugin author has provided those hooks, this is a very convenient and easy way for you to over-ride defaults, or inject your own code. Pluggable Functions If the plugin author is savvy, but is using the global namespace for the plugin functions, he/she may have wrapped the plugin's functions within if ( function_exists() ) conditional statements. For this to work to your advantage, you have to make sure your plugin loads first (which may be a challenge). All you have to do is declare your function by the exact same name within the exact same namespace and then your function will replace the one used by the plugin. Extension If the plugin author is a good OOP coder, he/she may write the plugin code in a granular enough way that is open for extension (since, as the GOF would say, it is definitely closed for modification). Look for lots of granularity in the plugin class - that is to say methods that perform small, highly specific tasks - that can be overridden in your own class that extends the plugin's class. Of course, as Toscho mentions, the class needs to be architected in such a way that it can be overridden, and that its default implementation doesn't invoke itself completely. Fork or Patch If the plugin author is using gitHub, or has opened the source in some other way, you can either submit a patch to the author with your proposed modifications (your best bet is to modify the plugin to make it MORE flexible or powerful without removing or changing existing features or functionality), or you can just download the source, modify the plugin header to the extent that it will no longer be updated when the original author pushes an update out, and preferably submit your updated version to the author, or as its own entity directly to WordPress. Be aware that if you do submit the plugin to WP you will need to have a site for it and should be prepared to support it if others download it. A: I know it's a very old question but I think I found the solution... I've a plugin in which one of my client's developers have modified it to the limit of directories & sub directories, when updated the files get deleted and the plugin crashes. In order to make the original plugin independent of any core updates, I've moved the modified files and folders to a separate plugin in a directory named as extension. Using the code found at https://gist.github.com/wpsmith/af206df2cf6a38e4e2f0 I added the class defined by Tarvis Smith in WPS_Extend_Plugin.php and included it in my plugin. Using the WPS_Extend_Plugin class I've pointed the extended files/folders directory to the target folder extension. There's no failure yet, but I not sure that is this the right way to extend a plugin or not! // Require WPS_Extend_Plugin class require_once( 'classes/WPS_Extend_Plugin.php' ); // Extend Sitepress Multilingual CMS new WPS_Extend_Plugin( 'sitepress-multilingual-cms/sitepress.php', __FILE__, '3.9.0', 'CHERRY' ); // Extend AddThis new WPS_Extend_Plugin( 'extension', __DIR__, '0.1', 'CHERRY' ); A: I understand this question is really old but I felt this might help someone. If you feel the changes would help the community, please submit them to the developer. However, if the changes are unique to your installation, you can continue reading the following. I had this issue about carrying over changes to updated version of a theme. We did a recursive diff from old_version to modified_old_version and then applied the patch it created on the new version of the theme using the patch tool. The patch tools create files with changes that could not be applied automatically. We had a few of those, and were easily able to identify and manually make those changes. While making changes you have to make sure you don't change spacing for the entire file using editor features like auto-indent, etc. That is, make changes only where necessary. That would only make the process of carrying over the changes more time consuming later.
wordpress
{ "language": "en", "length": 940, "provenance": "stackexchange_00019.jsonl.gz:413633", "question_score": "9", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30405" }
[ 0.06878662109375, 0.00580596923828125, 0.0200958251953125, -0.0594482421875, 0.014495849609375, -0.0003211498260498047, 0.0014753341674804688, -0.048553466796875, -0.0537109375, 0.00945281982421875, 0.010467529296875, 0.004791259765625, -0.0203704833984375, -0.032928466796875, 0.03778076171875, -0.05181884765625, 0.03021240234375, -0.0171966552734375, -0.0009717941284179688, -0.0302734375, 0.021881103515625, -0.0029277801513671875, 0.00044918060302734375, 0.11663818359375, 0.0161895751953125, 0.00447845458984375, 0.0626220703125, -0.005481719970703125, -0.00213623046875, -0.00417327880859375, 0.02880859375, -0.020355224609375, 0.0275726318359375, 0.03271484375, -0.04071044921875, -0.0517578125, 0.0157623291015625, -0.015869140625, -0.0240020751953125, 0.05047607421875, 0.04595947265625, -0.0215301513671875, 0.0019474029541015625, 0.03814697265625, 0.01535797119140625, -0.062164306640625, 0.07269287109375, -0.032806396484375, 0.0092926025390625, -0.033905029296875, -0.004459381103515625, 0.00753021240234375, 0.00939178466796875, -0.042724609375, -0.00756072998046875, 0.004039764404296875, -0.01389312744140625, 0.02117919921875, 0.0302886962890625, 0.0014429092407226562, -0.0246734619140625, 0.00238037109375, 0.0147247314453125, -0.017974853515625, 0.035980224609375, -0.005176544189453125, 0.00949859619140625, 0.01806640625, -0.0799560546875, 0.041259765625, 0.0655517578125, -0.0645751953125, 0.017486572265625, 0.0027751922607421875, 0.0184478759765625, -0.04022216796875, 0.01264190673828125, -0.0137481689453125, 0.0262603759765625, 0.010955810546875, 0.050506591796875, 0.039306640625, 0.045654296875, -0.03271484375, 0.006595611572265625, -0.034149169921875, -0.00428009033203125, -0.0147247314453125, 0.00421905517578125, 0.018310546875, -0.01329803466796875, -0.03350830078125, -0.013916015625, 0.0594482421875, 0.013916015625, 0.00490570068359375, 0.0025310516357421875, -0.01220703125, 0.0145263671875, 0.048858642578125, 0.026092529296875, -0.0718994140625, 0.11114501953125, -0.052734375, -0.0277862548828125, -0.01535797119140625, 0.045135498046875, 0.0258026123046875, -0.0007042884826660156, 0.033782958984375, -0.03570556640625, 0.025054931640625, 0.00310516357421875, -0.048919677734375, 0.0220489501953125, 0.0352783203125, -0.00395965576171875, 0.056304931640625, 0.01328277587890625, 0.0271759033203125, 0.00832366943359375, 0.0154266357421875, -0.058929443359375, -0.0013408660888671875, -0.008880615234375, -0.04827880859375, -0.0148162841796875, 0.04559326171875, 0.017181396484375, -0.030853271484375, -0.05023193359375, 0.0207061767578125, 0.09442138671875, 0.053741455078125, 0.034210205078125, 0.0038661956787109375, 0.00370025634765625, 0.0172271728515625, -0.0019254684448242188, -0.00522613525390625, -0.01348114013671875, 0.00791168212890625, 0.0386962890625, -0.03131103515625, 0.00959014892578125, -0.017608642578125, 0.001102447509765625, 0.04541015625, 0.021331787109375, 0.0025539398193359375, 0.031890869140625, -0.0226593017578125, 0.007495880126953125, 0.00690460205078125, 0.04632568359375, -0.0173797607421875, 0.055755615234375, -0.043670654296875, 0.0171051025390625, -0.02752685546875, -0.050140380859375, -0.0052642822265625, 0.04705810546875, -0.01953125, -0.01910400390625, 0.0228729248046875, -0.00183868408203125, 0.004589080810546875, 0.02020263671875, -0.001132965087890625, 0.042510986328125, -0.0073394775390625, 0.03729248046875, 0.030670166015625, 0.0097198486328125, 0.016082763671875, -0.0268707275390625, 0.0301971435546875, 0.0172271728515625, 0.018829345703125, 0.006008148193359375, -0.020843505859375, 0.0797119140625, -0.017181396484375, -0.0565185546875, 0.01502227783203125, -0.0252838134765625, 0.047760009765625, 0.05029296875, 0.01334381103515625, 0.019378662109375, -0.0321044921875, -0.052215576171875, 0.0341796875, -0.0236968994140625, 0.0059967041015625, 0.0211944580078125, 0.03533935546875, -0.00865936279296875, -0.0249481201171875, -0.023590087890625, 0.01959228515625, -0.0216217041015625, 0.01413726806640625, -0.05950927734375, -0.009490966796875, -0.020965576171875, 0.046478271484375, 0.0506591796875, 0.04901123046875, -0.0224761962890625, 0.01995849609375, -0.001605987548828125, -0.0237579345703125, -0.01532745361328125, 0.0226287841796875, -0.004199981689453125, 0.04559326171875, 0.035614013671875, 0.0255584716796875, 0.06976318359375, -0.0189056396484375, 0.0404052734375, 0.0267486572265625, 0.0096588134765625, -0.0157012939453125, -0.0053558349609375, -0.0182342529296875, -0.005008697509765625, 0.00897216796875, -0.022705078125, 0.0157470703125, 0.0222015380859375, 0.007534027099609375, -0.00010579824447631836, -0.017333984375, -0.00791168212890625, -0.12103271484375, 0.017578125, 0.064453125, 0.0288238525390625, 0.0058746337890625, -0.00655364990234375, 0.038421630859375, 0.043975830078125, -0.0013895034790039062, 0.0213470458984375, 0.00478363037109375, 0.025054931640625, 0.0523681640625, -0.006572723388671875, -0.00608062744140625, 0.007564544677734375, -0.031463623046875, 0.033966064453125, 0.0181884765625, -0.0254974365234375, -0.02349853515625, -0.0281982421875, 0.0196380615234375, -0.0085601806640625, -0.048431396484375, -0.00858306884765625, -0.01861572265625, 0.03338623046875, 0.017608642578125, 0.041656494140625, 0.035064697265625, -0.026763916015625, -0.0016279220581054688, 0.0263519287109375, 0.0416259765625, 0.0190887451171875, 0.0292510986328125, -0.04730224609375, 0.0260772705078125, -0.0088043212890625, -0.0027866363525390625, 0.01287078857421875, 0.0160369873046875, -0.0161895751953125, -0.01824951171875, 0.005573272705078125, -0.006771087646484375, -0.0027713775634765625, -0.051727294921875, 0.04193115234375, 0.0016937255859375, -0.0146942138671875, -0.00498199462890625, 0.04388427734375, -0.0199432373046875, -0.041778564453125, 0.01351165771484375, -0.032623291015625, -0.029296875, 0.022430419921875, -0.0193634033203125, 0.01116180419921875, -0.0062103271484375, 0.0222625732421875, 0.056793212890625, 0.0080718994140625, -0.00792694091796875, -0.00553131103515625, -0.02984619140625, 0.005947113037109375, -0.007671356201171875, -0.012786865234375, -0.002044677734375, -0.05926513671875, 0.01198577880859375, 0.03753662109375, 0.0849609375, -0.0030975341796875, -0.0311279296875, 0.000052928924560546875, 0.065185546875, 0.0068359375, -0.0155487060546875, -0.0193634033203125, -0.04547119140625, -0.01471710205078125, -0.00090789794921875, -0.023895263671875, 0.00902557373046875, 0.0297393798828125, 0.01488494873046875, -0.004634857177734375, -0.0614013671875, 0.0017290115356445312, -0.08062744140625, -0.05987548828125, -0.0426025390625, 0.0243682861328125, 0.010589599609375, -0.00557708740234375, 0.035125732421875, -0.01335906982421875, -0.053985595703125, -0.02142333984375, 0.0244293212890625, 0.006038665771484375, -0.0013341903686523438, 0.038787841796875, -0.046844482421875, 0.034210205078125, -0.00203704833984375, 0.04052734375, 0.050048828125, -0.049713134765625, -0.01425933837890625, -0.017913818359375, -0.01261138916015625, -0.0010461807250976562, 0.00859832763671875, 0.018951416015625, 0.03472900390625, 0.01224517822265625, -0.0238800048828125, -0.0190887451171875, 0.0343017578125, -0.022369384765625, -0.0267181396484375, -0.0095062255859375, -0.021331787109375, -0.004871368408203125, 0.0008549690246582031, 0.002292633056640625, -0.0111236572265625, -0.0017852783203125, -0.0197296142578125, 0.02667236328125, -0.009002685546875, 0.011260986328125, -0.0175323486328125, -0.00601959228515625, -0.0255889892578125, 0.0235137939453125, -0.0176544189453125, 0.0156097412109375, -0.0233612060546875, 0.01515960693359375, -0.0601806640625, -0.0153656005859375, 0.017120361328125, -0.0362548828125, 0.0272674560546875, -0.03741455078125, -0.00010389089584350586, -0.0085906982421875, 0.074462890625, -0.021240234375, -0.0113067626953125, 0.0166168212890625, 0.01319122314453125, -0.032196044921875, -0.017303466796875, -0.04766845703125, -0.0275726318359375, -0.041717529296875, -0.006534576416015625, 0.0001970529556274414, -0.03094482421875, -0.012725830078125, 0.0631103515625, -0.0325927734375, -0.0193023681640625, 0.0030918121337890625, -0.0301361083984375, 0.0081329345703125, 0.007442474365234375, -0.01471710205078125, -0.018798828125, 0.01386260986328125, -0.034912109375, -0.0665283203125, -0.00873565673828125, -0.03515625, 0.042877197265625, 0.018524169921875, 0.0099639892578125, -0.01215362548828125, 0.0452880859375, -0.016998291015625, 0.0284423828125, -0.005466461181640625, 0.0198974609375, -0.00843048095703125, 0.00890350341796875, 0.0081024169921875, -0.015655517578125, -0.010711669921875, -0.024688720703125, -0.026641845703125, 0.006999969482421875, -0.0211029052734375, -0.00927734375, 0.0024356842041015625, -0.0217742919921875, -0.010345458984375, -0.037689208984375, -0.0570068359375, -0.01373291015625, -0.0216522216796875, -0.0139312744140625, -0.0293731689453125, -0.024505615234375, 0.00957489013671875, -0.0273284912109375, 0.0012598037719726562, 0.015960693359375, 0.0897216796875, 0.0325927734375, 0.00920867919921875, -0.0465087890625, -0.0303955078125, 0.017974853515625, 0.043701171875, 0.0184326171875, -0.00015795230865478516, -0.005466461181640625, 0.00896453857421875, 0.01242828369140625, 0.01104736328125, -0.010467529296875, 0.0263824462890625, 0.00455474853515625, -0.0186004638671875, 0.005634307861328125, 0.0011043548583984375, -0.00833892822265625, -0.035919189453125, -0.036529541015625, 0.006866455078125, -0.0260467529296875, 0.00586700439453125, -0.004901885986328125, 0.045684814453125, -0.003536224365234375, -0.036895751953125, 0.01360321044921875, 0.014373779296875, -0.0015001296997070312, 0.03204345703125, -0.0244293212890625, -0.0084228515625, -0.04364013671875, -0.00559234619140625, 0.015167236328125, 0.020233154296875, -0.02667236328125, 0.02825927734375, -0.0010318756103515625, -0.0164337158203125, 0.003742218017578125, -0.0084381103515625, 0.08355712890625, -0.0272064208984375, -0.041259765625, -0.0252838134765625, -0.015472412109375, -0.0121002197265625, 0.04644775390625, -0.006824493408203125, 0.039306640625, 0.03338623046875, -0.006855010986328125, -0.01537322998046875, -0.0171356201171875, 0.006381988525390625, -0.044189453125, 0.023895263671875, -0.006473541259765625, -0.0243377685546875, 0.04132080078125, -0.0245208740234375, 0.004825592041015625, -0.01107025146484375, -0.0098876953125, 0.03631591796875, 0.0178070068359375, -0.00919342041015625, 0.01110076904296875, 0.0248565673828125, 0.01421356201171875, -0.051422119140625, 0.000051021575927734375, -0.0009703636169433594, -0.002513885498046875, -0.01114654541015625, 0.0029621124267578125, -0.01425933837890625, -0.006572723388671875, 0.0430908203125, -0.011138916015625, -0.01409912109375, 0.00122833251953125, 0.004657745361328125, -0.0180206298828125, -0.0057373046875, 0.034210205078125, 0.032562255859375, 0.02490234375, 0.006328582763671875, -0.002689361572265625, -0.0103607177734375, -0.02593994140625, -0.0264892578125, -0.052642822265625, -0.00494384765625, 0.01169586181640625, -0.01629638671875, -0.01666259765625, -0.012176513671875, -0.042449951171875, -0.0206756591796875, -0.01038360595703125, -0.01197052001953125, 0.04425048828125, -0.00963592529296875, 0.0116424560546875, -0.016357421875, -0.005985260009765625, -0.0214996337890625, 0.0139312744140625, 0.031646728515625, -0.00608062744140625, -0.0301361083984375, -0.02496337890625, -0.031463623046875, -0.04156494140625, -0.0869140625, -0.053741455078125, -0.054351806640625, 0.0228729248046875, 0.006183624267578125, 0.01068115234375, -0.0294342041015625, -0.04327392578125, -0.0229644775390625, 0.0277557373046875, 0.0299072265625, 0.0265960693359375, 0.011077880859375, 0.0196990966796875, 0.0095977783203125, 0.053741455078125, 0.019256591796875, -0.00360107421875, -0.023284912109375, -0.0350341796875, -0.005809783935546875, -0.00812530517578125, -0.0200958251953125, -0.027313232421875, 0.00348663330078125, 0.046539306640625, 0.08807373046875, -0.0012350082397460938, 0.005878448486328125, -0.048187255859375, 0.0007333755493164062, -0.022369384765625, 0.0645751953125, -0.06689453125, -0.0408935546875, 0.039031982421875, -0.0298919677734375, 0.004444122314453125, 0.006275177001953125, -0.0070953369140625, 0.0055389404296875, -0.0091705322265625, 0.01515960693359375, -0.00870513916015625, -0.031005859375, 0.042144775390625, 0.02252197265625, -0.0162200927734375, 0.01494598388671875, 0.026153564453125, 0.0140533447265625, -0.0007991790771484375, -0.0302276611328125, 0.01399993896484375, 0.043914794921875, 0.037811279296875, -0.01593017578125, 0.005069732666015625, 0.0245513916015625, -0.0175018310546875, 0.0391845703125, 0.03497314453125, 0.08984375, -0.08673095703125, 0.04107666015625, 0.0151214599609375, -0.01509857177734375, 0.0477294921875, 0.01062774658203125, -0.0247802734375, -0.0276336669921875, 0.0141754150390625, -0.027679443359375, -0.0157318115234375, 0.0201873779296875, 0.00928497314453125, -0.0214691162109375, -0.04962158203125, 0.00495147705078125, 0.0196380615234375, -0.00473785400390625, 0.0556640625, -0.00855255126953125, 0.023651123046875, -0.0107879638671875, 0.003143310546875, 0.024505615234375, -0.038177490234375, -0.034759521484375, 0.0440673828125, 0.0033283233642578125, -0.008056640625, 0.0107879638671875, -0.0022411346435546875, 0.0423583984375, 0.04400634765625, -0.0081939697265625, -0.00399017333984375, 0.021575927734375, 0.004428863525390625, 0.0257568359375, -0.034088134765625, -0.006946563720703125, 0.039337158203125, -0.0263519287109375, 0.0102081298828125, 0.0137481689453125, -0.02447509765625, -0.01509857177734375, -0.0034656524658203125, 0.064208984375, -0.030029296875, -0.0203857421875, 0.0299072265625, 0.034454345703125, -0.01242828369140625, -0.00795745849609375, -0.0196990966796875, -0.042999267578125, -0.024017333984375, -0.019134521484375, -0.037994384765625, 0.0188140869140625, -0.0035457611083984375, -0.085693359375, 0.154296875, 0.034515380859375, 0.0279541015625, 0.00360870361328125, 0.06488037109375, -0.0750732421875, 0.0025157928466796875, -0.01528167724609375, 0.036834716796875, -0.0225677490234375, 0.0175933837890625, -0.033905029296875, -0.0011301040649414062, -0.005680084228515625, 0.032623291015625, 0.06689453125, 0.0157012939453125, -0.033966064453125, -0.0263824462890625, 0.026641845703125, 0.036376953125, 0.0007328987121582031, 0.043426513671875, 0.0142669677734375, -0.005840301513671875, 0.01959228515625, -0.001079559326171875, 0.03424072265625, -0.025482177734375, -0.007537841796875, 0.0281524658203125, 0.0194091796875, 0.02264404296875, -0.0200042724609375, 0.028778076171875, 0.025543212890625, -0.027435302734375, -0.0158843994140625, -0.003910064697265625, -0.0184783935546875, 0.0185394287109375, -0.0192413330078125, 0.0266571044921875, 0.01495361328125, -0.0181121826171875, 0.0179595947265625, -0.006011962890625, 0.0294952392578125, -0.036590576171875, 0.0006132125854492188, 0.00045418739318847656, -0.0204315185546875, -0.00305938720703125, 0.054351806640625, -0.045562744140625, 0.024627685546875, -0.00201416015625, 0.02117919921875, -0.022064208984375, 0.02520751953125, 0.0161285400390625, 0.0233612060546875, -0.0248260498046875, -0.0019168853759765625, 0.024322509765625, 0.0175933837890625, -0.01531982421875, -0.03179931640625, -0.0004379749298095703, -0.04400634765625, -0.005008697509765625, -0.02874755859375, 0.0001862049102783203, 0.042877197265625, 0.007732391357421875, 0.0156097412109375, 0.0298309326171875, -0.024871826171875, -0.0088348388671875, -0.0231781005859375, 0.029449462890625, -0.006404876708984375, -0.0011358261108398438, -0.00922393798828125, 0.065185546875, 0.0284271240234375, 0.005359649658203125, 0.0008063316345214844, 0.034088134765625, 0.0014247894287109375, -0.0003383159637451172, -0.0041046142578125, -0.033172607421875, 0.001434326171875, 0.0207672119140625, -0.007358551025390625, 0.01349639892578125, 0.028106689453125, 0.033782958984375, -0.03204345703125, -0.0115203857421875, 0.045440673828125, -0.01751708984375, 0.00379180908203125, -0.049774169921875, 0.049346923828125, 0.043426513671875, 0.0120849609375, 0.004566192626953125, -0.0081024169921875, 0.06927490234375, 0.00803375244140625, -0.01349639892578125, 0.01145172119140625, -0.0297088623046875, 0.061859130859375, -0.0161895751953125, 0.06622314453125, 0.0167083740234375, -0.07012939453125, -0.01416015625, -0.0338134765625, -0.01143646240234375, 0.03277587890625, 0.030731201171875, -0.0140533447265625, 0.041717529296875, -0.026397705078125, 0.002811431884765625, 0.0066680908203125, -0.035186767578125, 0.01392364501953125, -0.0021877288818359375, 0.006610870361328125, 0.00787353515625, -0.0518798828125, -0.053802490234375, -0.054931640625, 0.07861328125, 0.060333251953125, 0.031402587890625, -0.0113677978515625, 0.062255859375, 0.005496978759765625, -0.00567626953125, -0.01337432861328125, 0.006389617919921875, -0.02587890625, -0.0133514404296875, -0.00103759765625, 0.003879547119140625, -0.0499267578125, 0.0245208740234375, 0.0147247314453125, -0.014801025390625, 0.01477813720703125, -0.00431060791015625, 0.0038852691650390625, -0.008697509765625, 0.0194549560546875, -0.02545166015625, -0.0377197265625, -0.0017299652099609375, 0.0165557861328125, -0.0161590576171875, -0.0132598876953125, -0.01029205322265625, -0.032806396484375, 0.0209197998046875, -0.01415252685546875, -0.0164947509765625, 0.05908203125, -0.0303802490234375, 0.04180908203125, -0.0226898193359375, -0.06103515625, 0.00020265579223632812, -0.01285552978515625, -0.01113128662109375, 0.01580810546875, 0.056427001953125, 0.00267791748046875, -0.04339599609375, 0.034942626953125, 0.03021240234375, 0.06512451171875, -0.03662109375, 0.03173828125, 0.01995849609375, 0.026947021484375, 0.0139007568359375, -0.06903076171875, -0.055633544921875, -0.0784912109375, 0.0209808349609375, 0.0267333984375, -0.0301666259765625, -0.038970947265625, -0.047393798828125, -0.0007424354553222656, 0.02777099609375, 0.0174407958984375, -0.0924072265625, 0.044647216796875, -0.014251708984375, 0.0411376953125, -0.033233642578125, -0.054779052734375, 0.01000213623046875, 0.053497314453125, 0.007801055908203125, -0.03271484375, -0.034942626953125, 0.007465362548828125, -0.035308837890625, 0.050506591796875, 0.058837890625, -0.04205322265625, -0.01861572265625, 0.0596923828125, 0.052520751953125, 0.0926513671875, 0.003734588623046875, -0.025848388671875, 0.02435302734375, -0.02154541015625, 0.0038547515869140625, -0.040985107421875, 0.004009246826171875, -0.05999755859375, -0.019378662109375, 0.002330780029296875, -0.022552490234375, -0.004711151123046875, -0.055999755859375, -0.082763671875, 0.01053619384765625, 0.010223388671875, -0.051239013671875, -0.0325927734375, -0.016143798828125, -0.0204925537109375, 0.0058135986328125, -0.016143798828125, -0.00743865966796875, -0.0225372314453125, 0.052337646484375, -0.0005035400390625, 0.0576171875, -0.03131103515625, -0.01238250732421875, -0.024932861328125, 0.0270233154296875, 0.023284912109375, 0.006145477294921875, -0.0180511474609375, -0.01258087158203125, 0.0285797119140625, 0.0352783203125, -0.0146636962890625, -0.051910400390625, 0.0271148681640625, -0.00998687744140625, 0.0003275871276855469, -0.0404052734375, -0.007320404052734375, 0.007053375244140625, 0.0682373046875, 0.041839599609375, 0.0072174072265625, -0.047607421875, 0.0166778564453125, -0.01203155517578125, -0.012969970703125, 0.0095062255859375, 0.0028076171875, -0.036285400390625, -0.0018320083618164062, 0.022369384765625, 0.0011730194091796875, -0.0057220458984375, 0.03521728515625, -0.0163421630859375, -0.0189666748046875, 0.009368896484375, -0.01593017578125, -0.07122802734375, -0.003376007080078125, 0.07147216796875, -0.036041259765625, 0.025177001953125, 0.01343536376953125, -0.003795623779296875, 0.043548583984375, 0.049560546875, 0.0161895751953125, -0.016754150390625, -0.0160064697265625, 0.01446533203125, 0.002689361572265625, 0.029022216796875, -0.005847930908203125, -0.043853759765625, -0.0173492431640625, 0.026031494140625, 0.004550933837890625, 0.01605224609375, -0.03131103515625, 0.0489501953125, 0.0281524658203125, 0.06256103515625, -0.0004611015319824219, -0.03875732421875, -0.047393798828125, 0.032196044921875, -0.023651123046875, 0.0013704299926757812, -0.005939483642578125, -0.0162353515625, 0.0158843994140625, 0.02960205078125, 0.0379638671875, -0.006145477294921875, 0.03558349609375, -0.0110321044921875, -0.00033354759216308594, 0.0182037353515625 ]
6de7e6d82e9bdbcfb5f0c0e363819637c1343d6d
Wordpress Stackexchange Q: Removing all classes from nav_menu except current-menu-item and current-menu-parent Thanks to Rarst's clever answer, I'm succesfully using these bits to remove the classes from the custom menu markup... add_filter('nav_menu_css_class', 'discard_menu_classes', 10, 2); function discard_menu_classes($classes, $item) { return (array)get_post_meta( $item->ID, '_menu_item_classes', true ); } However, I do need the current-menu-item and current-menu-parent classes when I'm viewing a current page element or a child of a current-menu-item. Is it possible to add these without all the extra classes? A: Sure, you can filter out all the classes but the ones you want. add_filter('nav_menu_css_class', 'discard_menu_classes', 10, 2); function discard_menu_classes($classes, $item) { $classes = array_filter( $classes, create_function( '$class', 'return in_array( $class, array( "current-menu-item", "current-menu-parent" ) );' ) ); return array_merge( $classes, (array)get_post_meta( $item->ID, '_menu_item_classes', true ) ); }
Q: Removing all classes from nav_menu except current-menu-item and current-menu-parent Thanks to Rarst's clever answer, I'm succesfully using these bits to remove the classes from the custom menu markup... add_filter('nav_menu_css_class', 'discard_menu_classes', 10, 2); function discard_menu_classes($classes, $item) { return (array)get_post_meta( $item->ID, '_menu_item_classes', true ); } However, I do need the current-menu-item and current-menu-parent classes when I'm viewing a current page element or a child of a current-menu-item. Is it possible to add these without all the extra classes? A: Sure, you can filter out all the classes but the ones you want. add_filter('nav_menu_css_class', 'discard_menu_classes', 10, 2); function discard_menu_classes($classes, $item) { $classes = array_filter( $classes, create_function( '$class', 'return in_array( $class, array( "current-menu-item", "current-menu-parent" ) );' ) ); return array_merge( $classes, (array)get_post_meta( $item->ID, '_menu_item_classes', true ) ); }
wordpress
{ "language": "en", "length": 125, "provenance": "stackexchange_00019.jsonl.gz:413634", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30417" }
[ 0.061981201171875, 0.007785797119140625, 0.02911376953125, 0.01513671875, 0.03515625, -0.043487548828125, 0.09381103515625, -0.060882568359375, -0.0201873779296875, -0.005428314208984375, -0.016143798828125, -0.0032711029052734375, -0.0535888671875, -0.03460693359375, -0.00620269775390625, -0.0489501953125, 0.021881103515625, 0.00957489013671875, 0.0257720947265625, -0.01076507568359375, 0.0007653236389160156, 0.0011644363403320312, 0.040313720703125, 0.057586669921875, 0.033660888671875, -0.05316162109375, 0.00749969482421875, -0.0032138824462890625, 0.003490447998046875, -0.0188446044921875, 0.00984954833984375, 0.01922607421875, -0.0189056396484375, 0.050506591796875, 0.0162506103515625, -0.00824737548828125, -0.0011606216430664062, 0.0209808349609375, 0.0433349609375, -0.007808685302734375, 0.013092041015625, -0.01496124267578125, -0.042755126953125, 0.005970001220703125, -0.045440673828125, -0.012847900390625, 0.00042891502380371094, -0.005496978759765625, 0.04510498046875, -0.045501708984375, 0.0252532958984375, 0.01126861572265625, 0.03570556640625, -0.0390625, -0.039398193359375, -0.0173797607421875, -0.0082855224609375, -0.019927978515625, 0.024993896484375, 0.03875732421875, -0.01611328125, -0.004116058349609375, 0.0049591064453125, -0.0443115234375, -0.01806640625, -0.0007205009460449219, 0.01389312744140625, 0.0092926025390625, -0.0802001953125, -0.01012420654296875, 0.04608154296875, -0.0350341796875, -0.020660400390625, -0.01555633544921875, -0.04766845703125, -0.005916595458984375, 0.00403594970703125, -0.043243408203125, 0.005924224853515625, 0.0174560546875, 0.0146026611328125, 0.0335693359375, -0.061126708984375, -0.011810302734375, 0.013702392578125, 0.0036792755126953125, -0.01470184326171875, -0.0211029052734375, -0.01342010498046875, -0.0219268798828125, -0.0162200927734375, -0.062744140625, -0.00821685791015625, 0.00862884521484375, -0.01053619384765625, -0.030242919921875, 0.036956787109375, 0.10791015625, -0.03802490234375, -0.0007810592651367188, -0.0055389404296875, -0.0232391357421875, 0.0279083251953125, -0.06475830078125, 0.0179290771484375, 0.007068634033203125, -0.0108795166015625, 0.0235748291015625, 0.0689697265625, 0.041107177734375, 0.0079803466796875, 0.044464111328125, -0.037872314453125, -0.0166015625, -0.01531982421875, 0.021942138671875, -0.0377197265625, -0.0117950439453125, -0.0062408447265625, -0.0285491943359375, 0.024749755859375, 0.041107177734375, -0.004734039306640625, -0.005756378173828125, 0.0113372802734375, 0.0284576416015625, -0.0183868408203125, -0.0288238525390625, -0.002758026123046875, 0.0002434253692626953, -0.0247039794921875, 0.0021991729736328125, 0.049835205078125, 0.041046142578125, 0.01511383056640625, -0.0146942138671875, 0.0194091796875, -0.05035400390625, -0.005374908447265625, -0.00665283203125, 0.030181884765625, -0.00787353515625, -0.01107025146484375, -0.005214691162109375, -0.006778717041015625, -0.0013189315795898438, 0.0023956298828125, 0.012054443359375, 0.0031719207763671875, -0.0293731689453125, 0.01068115234375, -0.043914794921875, 0.0718994140625, 0.007770538330078125, -0.046722412109375, 0.002117156982421875, 0.047943115234375, -0.0290679931640625, -0.067626953125, -0.06689453125, 0.0071563720703125, -0.002147674560546875, 0.0177154541015625, -0.025787353515625, -0.043182373046875, 0.004207611083984375, -0.03961181640625, -0.0107269287109375, 0.0232391357421875, -0.038482666015625, 0.043304443359375, -0.0367431640625, 0.0273895263671875, 0.0115814208984375, -0.0004601478576660156, 0.034454345703125, 0.01617431640625, 0.024505615234375, 0.010284423828125, 0.031524658203125, -0.0138092041015625, -0.055572509765625, 0.0098724365234375, -0.01947021484375, -0.06427001953125, -0.000026226043701171875, 0.0173187255859375, 0.05743408203125, 0.032745361328125, 0.024566650390625, 0.0655517578125, -0.0274505615234375, -0.035797119140625, -0.007701873779296875, 0.002124786376953125, -0.0011777877807617188, -0.00754547119140625, 0.01093292236328125, -0.0037670135498046875, -0.008575439453125, -0.002613067626953125, 0.0071258544921875, -0.004364013671875, -0.0146331787109375, -0.10009765625, 0.016937255859375, -0.040374755859375, 0.067626953125, -0.06597900390625, -0.004764556884765625, 0.0236053466796875, -0.0294036865234375, -0.01439666748046875, -0.0173797607421875, 0.00433349609375, 0.0080718994140625, 0.0173492431640625, 0.01512908935546875, -0.022308349609375, -0.0113677978515625, -0.017913818359375, -0.0186004638671875, -0.02374267578125, 0.040557861328125, 0.049896240234375, -0.01158905029296875, -0.01473236083984375, -0.0245361328125, 0.03411865234375, 0.00403594970703125, -0.040283203125, 0.03863525390625, 0.0313720703125, 0.032684326171875, -0.034210205078125, -0.003314971923828125, 0.010406494140625, -0.04779052734375, -0.00975799560546875, 0.043701171875, 0.033050537109375, 0.0201416015625, -0.0212860107421875, -0.0308837890625, 0.035888671875, -0.05029296875, -0.0003056526184082031, -0.022430419921875, -0.029205322265625, -0.0041351318359375, 0.0265350341796875, 0.008636474609375, 0.0304412841796875, 0.03466796875, 0.023590087890625, 0.0270538330078125, -0.0084381103515625, -0.031982421875, -0.0019741058349609375, 0.01012420654296875, 0.0182952880859375, 0.01255035400390625, -0.03448486328125, 0.022003173828125, -0.0021820068359375, 0.01012420654296875, 0.005672454833984375, -0.0037593841552734375, -0.0151824951171875, -0.0110015869140625, 0.0306243896484375, 0.0226287841796875, 0.00732421875, 0.029632568359375, -0.007053375244140625, 0.008758544921875, -0.0216064453125, -0.01111602783203125, 0.029510498046875, 0.01236724853515625, -0.01406097412109375, 0.022735595703125, 0.045684814453125, -0.01213836669921875, -0.0168304443359375, -0.07025146484375, 0.032379150390625, -0.00531768798828125, -0.011199951171875, -0.02471923828125, 0.00522613525390625, 0.00168609619140625, -0.0159454345703125, 0.0106048583984375, 0.0148162841796875, -0.0307769775390625, 0.03326416015625, 0.040069580078125, 0.0014390945434570312, 0.0188446044921875, -0.0018472671508789062, 0.0184326171875, 0.00391387939453125, -0.0121612548828125, -0.004177093505859375, -0.01308441162109375, -0.009185791015625, 0.01424407958984375, -0.002635955810546875, -0.0145721435546875, -0.0133056640625, 0.04791259765625, 0.0081634521484375, 0.01300048828125, -0.006805419921875, -0.041290283203125, -0.02252197265625, 0.0006046295166015625, -0.047393798828125, -0.012786865234375, 0.056610107421875, -0.01552581787109375, -0.0291748046875, 0.01340484619140625, -0.017547607421875, -0.004486083984375, 0.02508544921875, -0.00982666015625, 0.0016632080078125, -0.0273590087890625, -0.0266265869140625, -0.01093292236328125, -0.04083251953125, 0.02593994140625, -0.0009670257568359375, 0.01361846923828125, 0.007648468017578125, 0.074462890625, 0.0160064697265625, -0.03973388671875, 0.03582763671875, 0.0198516845703125, -0.01043701171875, 0.04412841796875, 0.0236663818359375, -0.034271240234375, 0.00789642333984375, 0.008056640625, -0.0012073516845703125, 0.00640106201171875, -0.01554107666015625, -0.0306396484375, -0.018524169921875, 0.038116455078125, 0.0117645263671875, 0.00543212890625, 0.03521728515625, 0.069580078125, 0.0272369384765625, 0.0055999755859375, -0.02117919921875, -0.032745361328125, -0.021270751953125, 0.035980224609375, -0.0034847259521484375, 0.00960540771484375, -0.0251007080078125, 0.043548583984375, 0.00542449951171875, 0.01104736328125, -0.00141143798828125, -0.0118255615234375, 0.053131103515625, 0.007122039794921875, 0.0254058837890625, -0.0194091796875, 0.046417236328125, -0.005626678466796875, 0.0172119140625, 0.0186004638671875, 0.002147674560546875, 0.003116607666015625, -0.0218658447265625, -0.04998779296875, -0.045745849609375, 0.053436279296875, -0.006755828857421875, 0.0338134765625, -0.031494140625, -0.031982421875, -0.0018835067749023438, 0.1123046875, -0.039825439453125, -0.02740478515625, -0.021697998046875, -0.004245758056640625, 0.027099609375, -0.0299835205078125, 0.003604888916015625, -0.0242919921875, -0.136474609375, 0.030792236328125, -0.013336181640625, -0.033233642578125, -0.0124053955078125, -0.006256103515625, -0.08514404296875, -0.0535888671875, 0.03204345703125, -0.0274505615234375, 0.002246856689453125, 0.0303955078125, 0.0036144256591796875, -0.0270843505859375, -0.007114410400390625, -0.01117706298828125, -0.06732177734375, -0.00518798828125, -0.062042236328125, 0.06982421875, 0.0141143798828125, 0.032806396484375, -0.01861572265625, 0.0521240234375, 0.015838623046875, -0.006450653076171875, 0.0013341903686523438, -0.0101776123046875, 0.03704833984375, 0.0252685546875, -0.006504058837890625, 0.00939178466796875, 0.0021343231201171875, 0.01099395751953125, -0.0191497802734375, -0.022552490234375, -0.0301055908203125, -0.04248046875, 0.028167724609375, -0.03961181640625, -0.056304931640625, -0.044342041015625, -0.0257568359375, 0.00174713134765625, -0.0037841796875, -0.0029048919677734375, -0.02874755859375, -0.05975341796875, 0.015899658203125, -0.005794525146484375, -0.032928466796875, 0.005794525146484375, 0.01641845703125, 0.0276641845703125, -0.0251312255859375, 0.0194854736328125, 0.002536773681640625, 0.008209228515625, -0.049835205078125, 0.06854248046875, 0.0018825531005859375, -0.005645751953125, 0.06890869140625, -0.04400634765625, 0.02642822265625, -0.034332275390625, 0.06640625, -0.003826141357421875, -0.0095977783203125, 0.016143798828125, -0.0100555419921875, 0.0189971923828125, -0.0213165283203125, 0.0081024169921875, -0.05279541015625, 0.03594970703125, 0.0650634765625, 0.02496337890625, -0.003173828125, -0.049591064453125, -0.0271148681640625, 0.00445556640625, -0.0006856918334960938, 0.04425048828125, 0.051544189453125, -0.0161285400390625, 0.04791259765625, 0.018646240234375, -0.0170135498046875, -0.05438232421875, 0.012481689453125, -0.05145263671875, 0.017974853515625, -0.04248046875, -0.032806396484375, -0.0286407470703125, 0.0009603500366210938, 0.068603515625, 0.0181427001953125, -0.03094482421875, -0.01195526123046875, 0.009613037109375, 0.0216522216796875, 0.0012407302856445312, -0.004329681396484375, 0.056976318359375, 0.00839996337890625, 0.005458831787109375, -0.029022216796875, -0.052032470703125, -0.0060272216796875, -0.0465087890625, 0.01287841796875, 0.0172576904296875, -0.0242919921875, 0.0009360313415527344, 0.01324462890625, 0.0196075439453125, -0.0090179443359375, -0.01271820068359375, -0.016754150390625, -0.039764404296875, 0.048675537109375, 0.01279449462890625, -0.00589752197265625, 0.01087188720703125, 0.0244903564453125, 0.03387451171875, -0.0076751708984375, -0.030548095703125, 0.040740966796875, 0.02294921875, 0.007244110107421875, 0.01525115966796875, -0.01678466796875, 0.01442718505859375, -0.01125335693359375, 0.032012939453125, -0.0039520263671875, -0.040374755859375, -0.0167999267578125, 0.008392333984375, 0.0159149169921875, -0.0102081298828125, -0.01983642578125, 0.018280029296875, 0.0252838134765625, 0.009521484375, 0.01001739501953125, -0.06341552734375, 0.040283203125, 0.058929443359375, -0.041290283203125, 0.001590728759765625, 0.064697265625, -0.13671875, -0.03759765625, -0.02081298828125, -0.018585205078125, 0.020294189453125, -0.0023097991943359375, 0.044464111328125, -0.040130615234375, -0.01092529296875, -0.0200347900390625, 0.0005860328674316406, 0.0195465087890625, -0.0024700164794921875, -0.00485992431640625, -0.01971435546875, -0.059600830078125, -0.0251312255859375, -0.05621337890625, -0.05517578125, -0.004123687744140625, 0.01351165771484375, -0.004589080810546875, 0.0011968612670898438, 0.03778076171875, 0.036590576171875, -0.03631591796875, 0.0220184326171875, 0.0135955810546875, -0.0067138671875, -0.032928466796875, 0.088134765625, 0.0205230712890625, -0.0008840560913085938, 0.0102691650390625, 0.04718017578125, -0.0116119384765625, 0.00609588623046875, 0.0222930908203125, -0.024383544921875, -0.025054931640625, -0.02447509765625, -0.04168701171875, -0.0040740966796875, 0.051788330078125, -0.01611328125, 0.0211944580078125, -0.027557373046875, -0.003143310546875, -0.037841796875, 0.01512908935546875, -0.035675048828125, 0.00806427001953125, -0.01038360595703125, 0.0196075439453125, 0.06060791015625, -0.005016326904296875, 0.01824951171875, -0.0254058837890625, 0.0006308555603027344, 0.012664794921875, -0.0179595947265625, -0.00859832763671875, 0.042877197265625, 0.032257080078125, -0.0213165283203125, 0.02667236328125, 0.0084075927734375, 0.00875091552734375, 0.014739990234375, -0.03369140625, -0.005603790283203125, 0.057342529296875, 0.06695556640625, -0.00864410400390625, 0.005504608154296875, 0.0548095703125, -0.0174407958984375, -0.00211334228515625, 0.022735595703125, 0.056915283203125, -0.05426025390625, 0.01457977294921875, 0.0201568603515625, -0.0090484619140625, 0.04217529296875, 0.03314208984375, 0.0184783935546875, 0.039825439453125, -0.06549072265625, -0.0250091552734375, -0.03619384765625, -0.01209259033203125, 0.0168914794921875, 0.0003752708435058594, -0.02685546875, -0.01129913330078125, -0.0209503173828125, 0.00920867919921875, -0.042388916015625, 0.00209808349609375, -0.03546142578125, -0.047119140625, 0.001220703125, 0.0225067138671875, -0.012786865234375, -0.067626953125, 0.0227813720703125, -0.0228118896484375, 0.015625, 0.036712646484375, 0.0086822509765625, -0.0102691650390625, 0.028656005859375, -0.035400390625, 0.05810546875, -0.0198516845703125, -0.0224456787109375, -0.0672607421875, -0.03271484375, 0.038726806640625, -0.0018215179443359375, -0.037811279296875, 0.033599853515625, -0.0109710693359375, -0.066650390625, 0.0028476715087890625, 0.0103759765625, 0.0828857421875, -0.0361328125, -0.0252227783203125, 0.012359619140625, -0.006984710693359375, -0.006870269775390625, 0.0003495216369628906, 0.01165771484375, -0.0138397216796875, 0.0107574462890625, -0.0062255859375, -0.00005751848220825195, 0.00469970703125, -0.01486968994140625, -0.036376953125, 0.0836181640625, -0.007537841796875, 0.01120758056640625, 0.03173828125, 0.035888671875, -0.030853271484375, 0.0179443359375, -0.0165863037109375, 0.0435791015625, 0.02099609375, 0.012786865234375, -0.00325775146484375, -0.00024116039276123047, 0.01708984375, 0.0172882080078125, -0.02764892578125, -0.00214385986328125, -0.0221405029296875, 0.010894775390625, 0.0472412109375, 0.05364990234375, 0.035308837890625, 0.005565643310546875, -0.03436279296875, 0.0094757080078125, -0.0200653076171875, -0.045745849609375, 0.018798828125, -0.04876708984375, -0.046051025390625, -0.011566162109375, 0.00884246826171875, 0.019195556640625, 0.01397705078125, 0.0281982421875, 0.0183258056640625, 0.0029659271240234375, -0.01016998291015625, -0.0020008087158203125, 0.0189208984375, 0.0154266357421875, 0.0032196044921875, -0.044097900390625, -0.044525146484375, -0.0213775634765625, 0.022857666015625, -0.0017023086547851562, 0.0299072265625, 0.0101165771484375, 0.024749755859375, 0.01373291015625, -0.00475311279296875, 0.0218505859375, 0.02960205078125, -0.048004150390625, 0.0244903564453125, 0.0089263916015625, 0.027923583984375, -0.03680419921875, -0.0130767822265625, 0.03277587890625, 0.042236328125, -0.0252685546875, -0.033477783203125, 0.0072021484375, -0.0168304443359375, 0.01666259765625, 0.00017833709716796875, 0.037628173828125, -0.032867431640625, -0.037445068359375, -0.0205078125, -0.004428863525390625, 0.0114288330078125, 0.0276947021484375, 0.0057525634765625, 0.005893707275390625, -0.02362060546875, -0.0184173583984375, -0.07177734375, 0.0181884765625, 0.00946807861328125, 0.06817626953125, 0.05670166015625, 0.049652099609375, -0.0098724365234375, -0.038543701171875, -0.004947662353515625, 0.01910400390625, -0.0377197265625, 0.00653839111328125, -0.01666259765625, -0.0255889892578125, -0.024993896484375, 0.0130767822265625, 0.01181793212890625, 0.029266357421875, 0.0675048828125, 0.028411865234375, -0.041259765625, -0.00789642333984375, -0.01062774658203125, -0.03228759765625, -0.045623779296875, -0.01461029052734375, -0.0246734619140625, 0.01027679443359375, -0.00511932373046875, 0.034454345703125, 8.940696716308594e-7, 0.01227569580078125, -0.002986907958984375, 0.001094818115234375, 0.01142120361328125, -0.005542755126953125, 0.0080718994140625, 0.0216522216796875, -0.01006317138671875, 0.02630615234375, -0.11029052734375, -0.0198516845703125, -0.056488037109375, 0.016510009765625, 0.03369140625, 0.026031494140625, -0.00689697265625, 0.035736083984375, 0.059326171875, -0.03863525390625, -0.0205841064453125, 0.028350830078125, 0.0236053466796875, 0.0037841796875, 0.004703521728515625, 0.0400390625, -0.041015625, -0.019744873046875, -0.020050048828125, 0.0306396484375, 0.0400390625, -0.00035452842712402344, 0.0205841064453125, 0.034454345703125, -0.01995849609375, 0.004222869873046875, -0.030181884765625, -0.0308074951171875, 0.02203369140625, -0.013580322265625, -0.002532958984375, 0.0011053085327148438, -0.02777099609375, 0.003170013427734375, 0.083740234375, -0.037445068359375, 0.0224609375, 0.0177001953125, 0.0107421875, -0.08087158203125, 0.007480621337890625, -0.00884246826171875, 0.011810302734375, -0.01513671875, -0.0292510986328125, 0.05206298828125, 0.059478759765625, 0.0083770751953125, 0.004230499267578125, 0.033966064453125, -0.038604736328125, 0.02996826171875, 0.012237548828125, 0.059844970703125, 0.0345458984375, -0.0153045654296875, -0.00127410888671875, 0.0301361083984375, -0.00283050537109375, 0.0111846923828125, 0.018646240234375, 0.0152740478515625, 0.03497314453125, -0.051513671875, 0.050506591796875, 0.057464599609375, 0.07080078125, -0.002277374267578125, 0.0352783203125, 0.038482666015625, -0.00901031494140625, -0.0027904510498046875, -0.03009033203125, -0.0191650390625, -0.03656005859375, -0.033172607421875, 0.01922607421875, -0.04241943359375, -0.0377197265625, -0.07843017578125, 0.0025081634521484375, 0.029449462890625, 0.0196533203125, -0.06866455078125, 0.04791259765625, -0.0030155181884765625, 0.01751708984375, -0.00798797607421875, 0.0044708251953125, -0.0374755859375, -0.021881103515625, -0.00927734375, -0.0341796875, -0.0567626953125, 0.0704345703125, -0.03179931640625, -0.0078125, -0.0159149169921875, -0.005992889404296875, -0.004589080810546875, -0.012298583984375, 0.00811767578125, 0.033782958984375, 0.01461029052734375, -0.049835205078125, -0.037506103515625, -0.005245208740234375, 0.037872314453125, 0.004791259765625, 0.01171875, -0.049468994140625, -0.043609619140625, 0.0093536376953125, -0.004978179931640625, 0.007556915283203125, -0.033538818359375, -0.0738525390625, 0.0682373046875, -0.00429534912109375, -0.038116455078125, 0.0236663818359375, 0.019744873046875, -0.0093994140625, -0.02117919921875, 0.0085601806640625, -0.0218658447265625, 0.027374267578125, 0.015777587890625, 0.00882720947265625, 0.0675048828125, -0.016265869140625, 0.00899505615234375, -0.03265380859375, 0.02197265625, -0.004894256591796875, 0.037139892578125, -0.035003662109375, 0.02301025390625, -0.004116058349609375, 0.03369140625, -0.01306915283203125, 0.004077911376953125, 0.01410675048828125, -0.0004851818084716797, 0.01178741455078125, 0.0014982223510742188, -0.00922393798828125, -0.0167999267578125, 0.034942626953125, -0.021026611328125, 0.01088714599609375, 0.00754547119140625, -0.01322174072265625, -0.01082611083984375, -0.0262298583984375, 0.0035419464111328125, 0.017822265625, -0.048675537109375, -0.0019683837890625, 0.01015472412109375, -0.0064849853515625, 0.000011444091796875, 0.01103973388671875, -0.0192108154296875, -0.00586700439453125, 0.019989013671875, -0.00205230712890625, -0.0718994140625, -0.0005807876586914062, -0.0008854866027832031, -0.00978851318359375, -0.0005574226379394531, 0.00865936279296875, -0.0006594657897949219, 0.0027637481689453125, 0.0609130859375, -0.00847625732421875, -0.0261077880859375, -0.038787841796875, 0.014068603515625, -0.01580810546875, 0.023895263671875, -0.034393310546875, -0.032562255859375, -0.02880859375, -0.0128631591796875, 0.0283203125, -0.0185699462890625, -0.04718017578125, -0.00004285573959350586, 0.026092529296875, -0.0184783935546875, 0.004638671875, 0.03326416015625, -0.0014095306396484375, 0.032989501953125, 0.033294677734375, -0.040069580078125, 0.0640869140625, -0.03521728515625, -0.018768310546875, -0.0197296142578125, -0.034454345703125, -0.11395263671875, 0.064208984375, 0.0190582275390625, 0.0006022453308105469, 0.05712890625 ]
822df40bad33d19af2583cdc9c5e8d1d16fd0067
Wordpress Stackexchange Q: How to use Post Custom Metadata in Post Titles and Post Permalinks I am very new to WordPress. How can I use post custom metadata in place of Post Titles, and as the Post Permalink? For example, instead of domain.com/the-post-title, the permalink would be domain.com/$postcustommetadata. I posted my idea in the WPORG support forums. I have a general idea, but don't know how to implement it, because I don't yet fully understand WordPress conventions, classes, etc. Thanks Plzz HeLp A: This will do. The slug is saved on the wp_posts while custom fields are on the wp_posts_meta. If you want to make it like that you can use an action hook on save_post that will get the value of the custom fields and saves it as the post slug. Here is the code add_action('save_post', 'set_slug'); function set_slug($post_id){ $new_slug = get_post_meta($post_id,'custom-slug', true); $post_args = array( 'ID' => $post_id, 'post_name' => $new_slug, ); wp_update_post($post_args); }
Q: How to use Post Custom Metadata in Post Titles and Post Permalinks I am very new to WordPress. How can I use post custom metadata in place of Post Titles, and as the Post Permalink? For example, instead of domain.com/the-post-title, the permalink would be domain.com/$postcustommetadata. I posted my idea in the WPORG support forums. I have a general idea, but don't know how to implement it, because I don't yet fully understand WordPress conventions, classes, etc. Thanks Plzz HeLp A: This will do. The slug is saved on the wp_posts while custom fields are on the wp_posts_meta. If you want to make it like that you can use an action hook on save_post that will get the value of the custom fields and saves it as the post slug. Here is the code add_action('save_post', 'set_slug'); function set_slug($post_id){ $new_slug = get_post_meta($post_id,'custom-slug', true); $post_args = array( 'ID' => $post_id, 'post_name' => $new_slug, ); wp_update_post($post_args); } A: If you're looking for customizing the permalink for specific posts, pages or categories, try the Custom Permalinks plugin. I've had much success with it before.
wordpress
{ "language": "en", "length": 180, "provenance": "stackexchange_00019.jsonl.gz:413666", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30502" }
[ 0.078125, -0.0224609375, 0.0299835205078125, -0.0216217041015625, -0.01073455810546875, -0.035369873046875, 0.0552978515625, -0.02801513671875, -0.0163421630859375, 0.0266876220703125, -0.00036716461181640625, 0.00244140625, 0.0196075439453125, -0.0273590087890625, 0.0119476318359375, -0.00199127197265625, 0.034332275390625, 0.0139617919921875, 0.054595947265625, -0.01097869873046875, 0.0216827392578125, 0.006206512451171875, 0.03448486328125, 0.038238525390625, 0.040069580078125, -0.01800537109375, 0.022003173828125, -0.0308380126953125, 0.0125274658203125, -0.0322265625, 0.0250244140625, 0.0145111083984375, 0.0257568359375, -0.0242156982421875, 0.0293426513671875, 0.034881591796875, 0.029327392578125, -0.0167388916015625, 0.00319671630859375, 0.018035888671875, 0.0082550048828125, -0.0003192424774169922, -0.007080078125, 0.01971435546875, -0.004486083984375, -0.01824951171875, -0.004268646240234375, -0.058563232421875, 0.014007568359375, -0.005397796630859375, -0.008880615234375, -0.01148223876953125, 0.0021991729736328125, -0.03936767578125, -0.01396942138671875, -0.013458251953125, -0.0174102783203125, -0.01209259033203125, 0.05401611328125, -0.0071868896484375, -0.037322998046875, -0.03692626953125, 0.0268707275390625, -0.029632568359375, 0.003265380859375, -0.01361083984375, -0.01296234130859375, 0.0225067138671875, -0.026397705078125, 0.01277923583984375, 0.0236053466796875, -0.047271728515625, 0.0001456737518310547, -0.0166015625, -0.0087738037109375, -0.04193115234375, 0.009124755859375, -0.043914794921875, -0.0183868408203125, 0.0305328369140625, 0.0284271240234375, -0.01081085205078125, 0.01165008544921875, -0.0290985107421875, 0.020050048828125, -0.006061553955078125, -0.01300811767578125, -0.0123748779296875, -0.0014410018920898438, -0.033721923828125, -0.011505126953125, -0.0189208984375, -0.0223236083984375, 0.00479888916015625, -0.0020313262939453125, -0.02655029296875, 0.0223846435546875, 0.045135498046875, -0.01690673828125, 0.0052490234375, 0.007228851318359375, -0.044647216796875, 0.0267486572265625, -0.029571533203125, 0.006378173828125, 0.039703369140625, 0.01105499267578125, -0.03558349609375, 0.0020122528076171875, -0.0004291534423828125, -0.01561737060546875, -0.0084228515625, 0.00933074951171875, -0.01030731201171875, -0.0390625, 0.01503753662109375, -0.026611328125, -0.0225982666015625, -0.0019178390502929688, 0.01629638671875, 0.00274658203125, 0.015380859375, 0.03875732421875, -0.029571533203125, 0.019622802734375, 0.01512908935546875, -0.0223388671875, -0.041717529296875, -0.005893707275390625, 0.05633544921875, -0.019317626953125, -0.018707275390625, 0.042572021484375, 0.044891357421875, 0.00717926025390625, -0.036163330078125, 0.000453948974609375, -0.04437255859375, -0.0289306640625, 0.004741668701171875, 0.01456451416015625, -0.014923095703125, 0.006801605224609375, -0.01538848876953125, 0.02313232421875, 0.009124755859375, 0.006992340087890625, 0.020294189453125, 0.02093505859375, -0.0224761962890625, 0.009185791015625, -0.0069122314453125, 0.0205078125, 0.0210418701171875, -0.03009033203125, -0.002445220947265625, 0.00606536865234375, -0.01396942138671875, 0.0004973411560058594, -0.041595458984375, -0.0230255126953125, -0.0228729248046875, -0.01103973388671875, -0.037261962890625, -0.0294647216796875, 0.044464111328125, -0.00039005279541015625, 0.01024627685546875, 0.018707275390625, -0.0029144287109375, 0.03875732421875, -0.00328826904296875, -0.0200347900390625, -0.005908966064453125, 0.0109405517578125, -0.0131378173828125, -0.0046844482421875, 0.016815185546875, 0.0298309326171875, 0.022979736328125, 0.008331298828125, -0.0167236328125, 0.082763671875, -0.017791748046875, -0.0455322265625, 0.0131378173828125, 0.01203155517578125, 0.0413818359375, 0.0137481689453125, 0.01267242431640625, 0.01971435546875, -0.00402069091796875, -0.039154052734375, 0.0270538330078125, -0.0187530517578125, -0.0191192626953125, -0.0084686279296875, 0.004627227783203125, -0.00849151611328125, 0.01506805419921875, -0.03948974609375, 0.0206298828125, -0.00600433349609375, 0.0291748046875, -0.0200653076171875, 0.0211181640625, -0.0197601318359375, 0.043212890625, -0.0247344970703125, 0.020599365234375, 0.014739990234375, -0.03167724609375, -0.0014314651489257812, -0.02789306640625, -0.016387939453125, -0.033203125, -0.005229949951171875, -0.040008544921875, -0.0357666015625, -0.0068511962890625, -0.0223541259765625, -0.019134521484375, -0.0511474609375, 0.045562744140625, 0.06768798828125, -0.0142669677734375, 0.0122833251953125, -0.01995849609375, 0.037750244140625, 0.0254974365234375, -0.07049560546875, -0.0006070137023925781, 0.032318115234375, -0.0104217529296875, -0.039337158203125, 0.0048370361328125, -0.01045989990234375, -0.044342041015625, -0.011138916015625, 0.060943603515625, 0.0289459228515625, 0.017333984375, -0.006122589111328125, 0.0008382797241210938, 0.04705810546875, 0.003398895263671875, 0.0243682861328125, -0.01319122314453125, 0.01515960693359375, 0.019744873046875, -0.01517486572265625, 0.00689697265625, 0.04119873046875, -0.0188751220703125, 0.01467132568359375, 0.061859130859375, -0.044891357421875, -0.037628173828125, -0.001270294189453125, -0.006801605224609375, 0.0130462646484375, -0.055389404296875, -0.0086822509765625, -0.028045654296875, 0.004486083984375, 0.05560302734375, 0.037017822265625, 0.040679931640625, -0.0465087890625, 0.0303955078125, 0.01435089111328125, 0.028106689453125, -0.00418853759765625, -0.02447509765625, 0.052581787109375, -0.0014905929565429688, -0.0170135498046875, -0.003398895263671875, 0.0185546875, -0.01026153564453125, -0.0125732421875, 0.0208587646484375, -0.0162200927734375, -0.007030487060546875, -0.020263671875, -0.08111572265625, 0.0019388198852539062, 0.007190704345703125, 0.01543426513671875, -0.0214691162109375, 0.01538848876953125, 0.0161895751953125, -0.0322265625, 0.032012939453125, 0.0445556640625, -0.0283203125, -0.01125335693359375, -0.042633056640625, 0.036102294921875, -0.0229339599609375, 0.047698974609375, 0.07183837890625, 0.0049285888671875, 0.0177764892578125, 0.0035457611083984375, -0.0401611328125, -0.037139892578125, 0.03076171875, -0.006870269775390625, -0.0628662109375, -0.0220489501953125, 0.0099945068359375, 0.002368927001953125, 0.0087432861328125, -0.0006079673767089844, -0.029083251953125, 0.008941650390625, 0.0008778572082519531, -0.07147216796875, -0.058746337890625, 0.03729248046875, -0.06903076171875, -0.00991058349609375, -0.004150390625, -0.038055419921875, -0.0243682861328125, 0.03826904296875, -0.00235748291015625, 0.018646240234375, -0.0279693603515625, -0.045654296875, -0.02838134765625, -0.06005859375, -0.0224456787109375, 0.006587982177734375, 0.0012722015380859375, -0.002712249755859375, 0.006011962890625, -0.00841522216796875, 0.005413055419921875, 0.022552490234375, 0.0033283233642578125, 0.0086822509765625, -0.017608642578125, 0.0210723876953125, -0.026641845703125, 0.04241943359375, -0.003902435302734375, 0.05419921875, 0.0582275390625, -0.037689208984375, -0.0078277587890625, -0.016845703125, 0.011077880859375, 0.01270294189453125, -0.007442474365234375, 0.026824951171875, 0.061431884765625, 0.00818634033203125, -0.002086639404296875, -0.044097900390625, -0.0179595947265625, -0.066162109375, 0.025299072265625, 0.034759521484375, 0.00862884521484375, -0.02069091796875, 0.0340576171875, 0.00794219970703125, 0.0192108154296875, 0.04400634765625, -0.0195770263671875, -0.0015573501586914062, -0.0050048828125, 0.000553131103515625, -0.029510498046875, -0.00731658935546875, -0.01837158203125, 0.0240325927734375, -0.016357421875, 0.012847900390625, -0.0110931396484375, 0.0194549560546875, -0.04620361328125, -0.064208984375, 0.049102783203125, -0.05120849609375, 0.0218658447265625, -0.052337646484375, -0.027252197265625, -0.0133514404296875, 0.08575439453125, -0.020721435546875, -0.0180511474609375, 0.00431060791015625, -0.008941650390625, 0.01248931884765625, 0.03155517578125, -0.0362548828125, -0.0213470458984375, -0.074462890625, -0.0091552734375, -0.0126190185546875, -0.0295867919921875, -0.013092041015625, 0.05078125, -0.030303955078125, -0.030487060546875, 0.043060302734375, -0.036224365234375, 0.0306243896484375, -0.001293182373046875, 0.0087890625, -0.017852783203125, -0.043853759765625, -0.004367828369140625, -0.08563232421875, -0.01100921630859375, -0.001354217529296875, 0.056060791015625, -0.00508880615234375, -0.01467132568359375, -0.00981903076171875, 0.0447998046875, 0.0362548828125, 0.058807373046875, -0.0198516845703125, -0.0267181396484375, -0.006122589111328125, -0.0134124755859375, 0.0115814208984375, -0.0157623291015625, 0.01308441162109375, 0.01123046875, -0.050872802734375, 0.0372314453125, -0.0258331298828125, 0.036285400390625, 0.021575927734375, -0.05303955078125, -0.05474853515625, -0.0159912109375, -0.003269195556640625, 0.00971221923828125, -0.0174560546875, 0.01189422607421875, -0.01580810546875, -0.056549072265625, 0.0504150390625, 0.004657745361328125, -0.0018014907836914062, -0.0008311271667480469, 0.08514404296875, 0.00714874267578125, -0.01523590087890625, -0.0182037353515625, -0.00952911376953125, 0.0232696533203125, -0.01629638671875, 0.01442718505859375, -0.00249481201171875, -0.0211944580078125, 0.043853759765625, -0.024017333984375, -0.0391845703125, -0.038299560546875, 0.038177490234375, 0.00003790855407714844, 0.002323150634765625, -0.006145477294921875, -0.054412841796875, 0.0892333984375, 0.0246124267578125, -0.00464630126953125, 0.00039958953857421875, -0.041595458984375, 0.036224365234375, 0.021820068359375, -0.0010957717895507812, -0.05279541015625, -0.059844970703125, 0.0306549072265625, -0.0318603515625, -0.010894775390625, 0.01580810546875, -0.0097503662109375, 0.0198211669921875, -0.034637451171875, 0.0164031982421875, -0.01200103759765625, -0.0251922607421875, 0.0026073455810546875, 0.021514892578125, 0.0278167724609375, 0.016326904296875, -0.0028820037841796875, -0.01018524169921875, 0.044342041015625, -0.01076507568359375, -0.045623779296875, -0.0230255126953125, -0.01971435546875, 0.045257568359375, 0.01611328125, 0.0189971923828125, 0.058135986328125, 0.047943115234375, -0.0041046142578125, -0.01001739501953125, -0.03265380859375, 0.04412841796875, -0.048095703125, 0.00518798828125, 0.0152740478515625, -0.01349639892578125, -0.048248291015625, 0.0999755859375, 0.04449462890625, 0.0033969879150390625, -0.036407470703125, 0.0357666015625, 0.046356201171875, 0.03662109375, 0.0142364501953125, -0.034637451171875, -0.00241851806640625, 0.015625, -0.00751495361328125, -0.034576416015625, -0.0028171539306640625, 0.006908416748046875, 0.033233642578125, 0.0014743804931640625, -0.018310546875, 0.0210113525390625, -0.0242919921875, -0.0021514892578125, 0.0144500732421875, -0.00905609130859375, -0.026123046875, 0.0003197193145751953, 0.0156707763671875, 0.004100799560546875, -0.022552490234375, 0.00452423095703125, 0.0134735107421875, -0.0082855224609375, 0.043914794921875, -0.06561279296875, 0.0518798828125, -0.01216888427734375, -0.0283355712890625, 0.02032470703125, -0.01340484619140625, 0.0192108154296875, 0.0179290771484375, 0.00485992431640625, -0.035919189453125, -0.0207672119140625, 0.045989990234375, -0.01311492919921875, 0.0323486328125, -0.037933349609375, 0.0029201507568359375, 0.01093292236328125, 0.005954742431640625, 0.00795745849609375, -0.0095062255859375, -0.04351806640625, 0.00795745849609375, -0.007312774658203125, 0.0232391357421875, 0.02935791015625, -0.03515625, -0.0158538818359375, -0.04071044921875, 0.0325927734375, 0.033660888671875, 0.009246826171875, -0.018890380859375, -0.0146942138671875, -0.00428009033203125, 0.0057373046875, 0.06488037109375, -0.0216217041015625, 0.055572509765625, 0.0225372314453125, 0.0268402099609375, -0.0019245147705078125, 0.0037441253662109375, -0.01702880859375, -0.021453857421875, -0.01824951171875, -0.05877685546875, -0.046173095703125, 0.043426513671875, -0.0267181396484375, 0.06842041015625, 0.04193115234375, 0.003299713134765625, 0.035247802734375, -0.0135650634765625, 0.01526641845703125, -0.0161590576171875, -0.0032176971435546875, -0.047760009765625, -0.0018062591552734375, 0.046722412109375, -0.01233673095703125, 0.006500244140625, -0.016632080078125, -0.0272369384765625, 0.043548583984375, -0.009307861328125, 0.031646728515625, 0.00013756752014160156, -0.0171661376953125, 0.01078033447265625, 0.045745849609375, 0.03875732421875, 0.0458984375, 0.01232147216796875, 0.03851318359375, 0.0260467529296875, -0.032012939453125, 0.024810791015625, 0.024078369140625, 0.0653076171875, -0.004398345947265625, 0.0086517333984375, 0.054351806640625, -0.023101806640625, -0.007747650146484375, 0.04107666015625, 0.043792724609375, -0.0277099609375, -0.00673675537109375, 0.01885986328125, -0.0081329345703125, 0.03167724609375, 0.01153564453125, -0.005741119384765625, 0.0182647705078125, -0.00024890899658203125, -0.045440673828125, -0.024444580078125, -0.000743865966796875, 0.0036525726318359375, 0.005001068115234375, -0.0020999908447265625, 0.0009288787841796875, -0.0178070068359375, 0.0190887451171875, -0.047454833984375, -0.0167388916015625, -0.0066070556640625, -0.00787353515625, -0.01312255859375, 0.004634857177734375, -0.02294921875, -0.038604736328125, 0.0238037109375, -0.051849365234375, 0.02032470703125, 0.041107177734375, 0.03057861328125, 0.047882080078125, 0.029815673828125, 0.026611328125, -0.005016326904296875, -0.01415252685546875, 0.029815673828125, -0.046417236328125, -0.0498046875, -0.013580322265625, 0.048583984375, -0.02667236328125, 0.037200927734375, 0.005260467529296875, -0.036163330078125, -0.01543426513671875, -0.01055145263671875, 0.08123779296875, -0.042266845703125, -0.021514892578125, -0.001880645751953125, 0.019927978515625, 0.01096343994140625, -0.01108551025390625, 0.0419921875, -0.0391845703125, -0.00319671630859375, 0.0037994384765625, -0.021514892578125, -0.047210693359375, -0.031890869140625, -0.09783935546875, 0.16552734375, 0.01099395751953125, 0.06243896484375, -0.01690673828125, 0.05926513671875, -0.0286865234375, 0.039825439453125, -0.04901123046875, 0.06817626953125, -0.02642822265625, 0.050262451171875, -0.06756591796875, -0.011077880859375, 0.018280029296875, 0.0230560302734375, 0.08575439453125, 0.0247802734375, -0.049652099609375, -0.0242767333984375, 0.023956298828125, 0.0015497207641601562, -0.03424072265625, 0.063232421875, -0.001895904541015625, 0.054656982421875, 0.0265960693359375, -0.05462646484375, 0.0208892822265625, 0.005443572998046875, -0.0232086181640625, 0.02777099609375, 0.01898193359375, 0.00826263427734375, 0.0169677734375, -0.0268707275390625, -0.04473876953125, 0.01277923583984375, 0.03485107421875, -0.0019311904907226562, 0.01117706298828125, 0.00795745849609375, 0.0284881591796875, -0.05767822265625, -0.0284423828125, -0.0233612060546875, 0.03955078125, 0.0070037841796875, 0.0261383056640625, -0.018524169921875, 0.007030487060546875, 0.0247955322265625, -0.0019550323486328125, 0.012725830078125, 0.0380859375, -0.016632080078125, 0.08563232421875, 0.0216064453125, -0.0008745193481445312, -0.042388916015625, 0.038482666015625, 0.063720703125, 0.094482421875, -0.08355712890625, -0.00382232666015625, 0.024566650390625, 0.0006785392761230469, -0.02215576171875, -0.03533935546875, -0.0139312744140625, -0.0108489990234375, 0.00757598876953125, -0.02423095703125, 0.003360748291015625, 0.0187225341796875, 0.048797607421875, -0.0023097991943359375, -0.012939453125, -0.0701904296875, -0.0192108154296875, -0.040771484375, -0.00604248046875, 0.01088714599609375, 0.09283447265625, 0.045318603515625, 0.0343017578125, -0.054046630859375, -0.048492431640625, 0.0084991455078125, 0.0014791488647460938, 0.01380157470703125, -0.0190582275390625, -0.026275634765625, -0.04278564453125, 0.046142578125, 0.033050537109375, 0.0638427734375, 0.0265655517578125, 0.050445556640625, 0.00240325927734375, -0.01033782958984375, 0.011260986328125, -0.004940032958984375, -0.0230865478515625, 0.04339599609375, -0.0307464599609375, 0.00732421875, -0.007801055908203125, -0.031890869140625, -0.0194091796875, -0.002620697021484375, 0.032989501953125, -0.009490966796875, 0.032501220703125, 0.006587982177734375, -0.0242919921875, 0.041168212890625, 0.01380157470703125, 0.06317138671875, 0.02783203125, -0.04412841796875, -0.0022373199462890625, -0.03607177734375, -0.07861328125, 0.019287109375, 0.04656982421875, -0.006786346435546875, -0.00601959228515625, -0.01708984375, -0.00879669189453125, 0.03021240234375, -0.00499725341796875, -0.002544403076171875, 0.0270538330078125, 0.004810333251953125, -0.0052032470703125, -0.024810791015625, -0.018890380859375, 0.01641845703125, 0.03228759765625, -0.017425537109375, 0.058319091796875, -0.0219573974609375, -0.00792694091796875, -0.056884765625, 0.011383056640625, -0.032196044921875, -0.039947509765625, -0.007442474365234375, 0.0266571044921875, 0.0184173583984375, 0.0010700225830078125, -0.01322174072265625, -0.008392333984375, 0.050933837890625, -0.0252532958984375, -0.021026611328125, -0.00751495361328125, 0.0231475830078125, -0.02020263671875, 0.02130126953125, -0.033599853515625, -0.02978515625, -0.0540771484375, -0.017547607421875, 0.026885986328125, 0.0081939697265625, -0.002655029296875, 0.038604736328125, 0.011016845703125, -0.007373809814453125, 0.01702880859375, -0.0384521484375, 0.04327392578125, 0.057342529296875, -0.038726806640625, -0.0243377685546875, 0.0357666015625, -0.006488800048828125, 0.0005164146423339844, 0.0142822265625, 0.01873779296875, 0.0183258056640625, -0.050872802734375, -0.01543426513671875, -0.007904052734375, 0.02557373046875, -0.0251312255859375, 0.0218353271484375, -0.03424072265625, 0.0127105712890625, 0.0244140625, -0.031982421875, -0.027374267578125, -0.07098388671875, -0.01052093505859375, 0.041107177734375, -0.071533203125, -0.018035888671875, -0.10101318359375, -0.0206756591796875, 0.0352783203125, 0.0068359375, -0.00685882568359375, 0.0203704833984375, -0.0362548828125, -0.030731201171875, 0.00888824462890625, -0.043182373046875, 0.00977325439453125, 0.03900146484375, -0.005519866943359375, -0.021453857421875, -0.03314208984375, 0.00800323486328125, -0.044525146484375, 0.032501220703125, 0.043701171875, -0.04571533203125, -0.056610107421875, 0.0026416778564453125, 0.033935546875, 0.04364013671875, 0.046417236328125, -0.012420654296875, 0.006099700927734375, 0.0063934326171875, -0.0269317626953125, -0.0288238525390625, 0.0288238525390625, -0.03204345703125, -0.028106689453125, -0.03778076171875, 0.01146697998046875, 0.00445556640625, -0.028228759765625, -0.03289794921875, 0.032470703125, -0.01287841796875, -0.010223388671875, -0.07122802734375, -0.00963592529296875, 0.006866455078125, 0.039154052734375, -0.0150146484375, -0.0297698974609375, -0.05364990234375, 0.03094482421875, 0.001373291015625, 0.033935546875, 0.004299163818359375, 0.031280517578125, 0.005580902099609375, 0.03643798828125, 0.017303466796875, -0.0257110595703125, 0.032684326171875, -0.0174407958984375, 0.0004715919494628906, 0.009185791015625, -0.07305908203125, -0.0604248046875, -0.041900634765625, 0.0125274658203125, -0.037017822265625, -0.035491943359375, -0.03924560546875, 0.003765106201171875, 0.0986328125, 0.08056640625, 0.0230255126953125, -0.054107666015625, -0.02008056640625, -0.025299072265625, -0.0631103515625, 0.003925323486328125, 0.039947509765625, -0.06488037109375, 0.0098114013671875, 0.0166778564453125, 0.0133819580078125, 0.0285186767578125, -0.00766754150390625, 0.00963592529296875, -0.0093536376953125, 0.00774383544921875, -0.0221405029296875, -0.041259765625, 0.01198577880859375, 0.061798095703125, -0.03948974609375, 0.007701873779296875, -0.00274658203125, -0.0017404556274414062, 0.021514892578125, -0.023284912109375, -0.0014247894287109375, -0.00846099853515625, -0.00878143310546875, 0.00910186767578125, 0.005340576171875, 0.0274200439453125, -0.001728057861328125, -0.0275115966796875, -0.006072998046875, 0.005573272705078125, 0.000043272972106933594, 0.002704620361328125, -0.00867462158203125, 0.0123291015625, 0.002750396728515625, 0.055694580078125, -0.015594482421875, -0.03863525390625, -0.015869140625, 0.002391815185546875, -0.01242828369140625, 0.01019287109375, 0.021759033203125, -0.026519775390625, 0.012176513671875, -0.02191162109375, -0.0008854866027832031, -0.0278472900390625, -0.003597259521484375, -0.04425048828125, -0.0124664306640625, 0.01395416259765625 ]
14faaed0fcfeece134da76e36914740af714b900
Wordpress Stackexchange Q: How to change wordpress post title? How to change just wordpress post title but not menu items. add_filter('the_title', 'wordpress_title'); function wordpress_title(){ return 'New title'; } A: add_filter('the_title', 'wordpress_title'); function wordpress_title($title){ //Return new title if called inside loop if ( in_the_loop() ) return 'New title'; //Else return regular return $title; } Have you tried the in_the_loop() conditional check to return new title only if called inside loop. That means nav menu's will not get affected.
Q: How to change wordpress post title? How to change just wordpress post title but not menu items. add_filter('the_title', 'wordpress_title'); function wordpress_title(){ return 'New title'; } A: add_filter('the_title', 'wordpress_title'); function wordpress_title($title){ //Return new title if called inside loop if ( in_the_loop() ) return 'New title'; //Else return regular return $title; } Have you tried the in_the_loop() conditional check to return new title only if called inside loop. That means nav menu's will not get affected. A: If you're using custom nav menus, you can do this entirely without code. Go to Appearance -> Menus and change the "Navigation Label" of each menu item you want to be different. A: <?php add_filter('the_title', function($title) { return '<b>'. $title. '</b>';}) ?> A: You need the right set of contditions: * *Inside the loop *The ID of the post matches the id from the URL (a bit complex) *...Other optional conditions Place this in your plugin or theme: add_filter( 'the_title', 'change_my_title'); function change_my_title ($title) { if ( in_the_loop() && get_the_ID() === url_to_postid(full_url($_SERVER))) { $title = $title . " added by plugin"; } return $title; } // Function found here: http://stackoverflow.com/a/8891890/358906 function full_url($s) { $ssl = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true:false; $sp = strtolower($s['SERVER_PROTOCOL']); $protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : ''); $port = $s['SERVER_PORT']; $port = ((!$ssl && $port=='80') || ($ssl && $port=='443')) ? '' : ':'.$port; $host = isset($s['HTTP_X_FORWARDED_HOST']) ? $s['HTTP_X_FORWARDED_HOST'] : isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : $s['SERVER_NAME']; return $protocol . '://' . $host . $port . $s['REQUEST_URI']; }
wordpress
{ "language": "en", "length": 251, "provenance": "stackexchange_00019.jsonl.gz:413673", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30529" }
[ 0.0270843505859375, 0.0015954971313476562, 0.043914794921875, 0.06451416015625, -0.004108428955078125, -0.033782958984375, 0.0863037109375, -0.0802001953125, 0.006214141845703125, 0.0135650634765625, -0.0160675048828125, 0.01052093505859375, -0.0093994140625, -0.02191162109375, -0.00506591796875, -0.031494140625, 0.036346435546875, -0.0287933349609375, 0.02618408203125, -0.02032470703125, 0.00811767578125, -0.0022525787353515625, 0.0491943359375, 0.06488037109375, 0.024444580078125, -0.057525634765625, 0.033233642578125, -0.04705810546875, 0.01317596435546875, -0.027191162109375, 0.0251922607421875, 0.021820068359375, 0.0013275146484375, 0.0232086181640625, -0.01299285888671875, 0.03387451171875, 0.0007157325744628906, 0.01284027099609375, 0.0281982421875, 0.005977630615234375, 0.0298919677734375, -0.01261138916015625, -0.0096893310546875, 0.01076507568359375, -0.01291656494140625, -0.0279998779296875, 0.03265380859375, -0.0225677490234375, 0.02325439453125, -0.04266357421875, 0.02081298828125, 0.017791748046875, 0.03936767578125, -0.0250091552734375, -0.018890380859375, -0.0006561279296875, 0.0085601806640625, -0.036834716796875, 0.0390625, -0.035308837890625, -0.0276641845703125, -0.02813720703125, 0.03564453125, -0.002208709716796875, 0.00301361083984375, 0.00917816162109375, 0.023712158203125, 0.00028252601623535156, -0.05438232421875, 0.005084991455078125, 0.04290771484375, -0.04461669921875, -0.018402099609375, -0.006076812744140625, -0.020782470703125, -0.0169525146484375, 0.00499725341796875, -0.04718017578125, 0.00498199462890625, 0.01519775390625, 0.0406494140625, -0.017974853515625, 0.0215911865234375, -0.0209503173828125, 0.0193634033203125, 0.01561737060546875, -0.005001068115234375, -0.015228271484375, -0.0272979736328125, -0.018646240234375, -0.01898193359375, 0.00016963481903076172, -0.0556640625, 0.0035953521728515625, 0.006679534912109375, -0.0205841064453125, 0.006427764892578125, 0.062103271484375, -0.0093231201171875, 0.05010986328125, -0.024871826171875, -0.01275634765625, 0.03363037109375, -0.05853271484375, 0.0017604827880859375, 0.01470184326171875, 0.00005930662155151367, 0.017242431640625, 0.04376220703125, 0.03460693359375, -0.007354736328125, 0.0372314453125, -0.01239013671875, 0.01256561279296875, -0.04010009765625, 0.006191253662109375, -0.046630859375, -0.003459930419921875, -0.0200958251953125, 0.037811279296875, 0.0005130767822265625, 0.0010471343994140625, 0.00494384765625, 0.00965118408203125, 0.03961181640625, 0.0341796875, -0.0157012939453125, -0.0166015625, -0.027557373046875, 0.022735595703125, -0.0118255615234375, -0.017791748046875, 0.05621337890625, 0.07574462890625, 0.0211029052734375, -0.025360107421875, -0.027618408203125, -0.024169921875, -0.02001953125, 0.0005102157592773438, -0.0080718994140625, 0.0019378662109375, 0.0204925537109375, -0.0229644775390625, 0.0302276611328125, -0.002155303955078125, 0.0003116130828857422, 0.021820068359375, 0.0258636474609375, -0.00879669189453125, 0.0146942138671875, -0.00539398193359375, -0.0011043548583984375, 0.0306243896484375, 0.00799560546875, 0.005817413330078125, 0.0117034912109375, -0.00908660888671875, 0.0179443359375, -0.0176544189453125, -0.0025539398193359375, -0.01157379150390625, 0.016326904296875, 0.0279083251953125, -0.01788330078125, 0.0308990478515625, -0.020263671875, -0.005962371826171875, 0.01413726806640625, 0.00792694091796875, 0.02294921875, 0.01216888427734375, -0.0198974609375, -0.02191162109375, -0.00528717041015625, -0.01666259765625, -0.0214996337890625, -0.0012569427490234375, 0.0125579833984375, 0.03924560546875, -0.0093231201171875, -0.038330078125, -0.004791259765625, 0.00345611572265625, -0.048553466796875, -0.0171356201171875, 0.0172576904296875, 0.031158447265625, 0.03057861328125, 0.0241851806640625, 0.039581298828125, -0.01026153564453125, -0.01091766357421875, -0.024627685546875, -0.003490447998046875, -0.0199432373046875, 0.0121612548828125, -0.00478363037109375, -0.00046062469482421875, 0.0250244140625, 0.002094268798828125, 0.02490234375, -0.0176849365234375, -0.005908966064453125, -0.0458984375, -0.02532958984375, -0.01078033447265625, 0.037841796875, 0.023193359375, 0.01204681396484375, 0.006725311279296875, -0.0027256011962890625, 0.0012454986572265625, -0.0390625, -0.04766845703125, 0.00539398193359375, -0.037811279296875, -0.029052734375, -0.0242462158203125, -0.01262664794921875, -0.01385498046875, 0.0028591156005859375, -0.026702880859375, 0.0301361083984375, 0.07989501953125, -0.03759765625, -0.0012359619140625, -0.049957275390625, 0.05743408203125, -0.01020050048828125, -0.058013916015625, 0.048187255859375, 0.0203857421875, 0.000010609626770019531, -0.0404052734375, -0.022247314453125, -0.027008056640625, -0.0626220703125, 0.01045989990234375, 0.08038330078125, 0.03179931640625, 0.0299835205078125, 0.0005712509155273438, 0.023895263671875, 0.0521240234375, -0.01206207275390625, 0.0202484130859375, -0.00475311279296875, 0.0124053955078125, 0.0265045166015625, 0.02734375, -0.016876220703125, 0.0384521484375, -0.02423095703125, 0.0186767578125, 0.031768798828125, -0.01274871826171875, -0.031341552734375, -0.0167083740234375, 0.0001609325408935547, 0.01326751708984375, -0.0256500244140625, -0.03253173828125, 0.0029697418212890625, 0.00899505615234375, 0.0276641845703125, 0.01568603515625, 0.01396942138671875, -0.036224365234375, 0.01218414306640625, 0.02960205078125, 0.0204315185546875, 0.0144195556640625, 0.041748046875, 0.0006198883056640625, 0.0190582275390625, -0.0302886962890625, -0.0194244384765625, 0.0323486328125, 0.0164642333984375, -0.02423095703125, 0.004634857177734375, 0.039031982421875, -0.0206298828125, 0.01715087890625, -0.0465087890625, 0.028961181640625, -0.033416748046875, -0.00537872314453125, -0.011962890625, 0.020111083984375, -0.0006461143493652344, -0.02532958984375, 0.02935791015625, -0.0156707763671875, -0.019744873046875, 0.042236328125, -0.00933837890625, 0.00753021240234375, -0.004421234130859375, 0.03704833984375, 0.04022216796875, 0.01241302490234375, -0.01045989990234375, 0.0054931640625, 0.004894256591796875, 0.02117919921875, -0.0157623291015625, -0.033660888671875, 0.0283203125, -0.0950927734375, -0.00893402099609375, 0.0010356903076171875, 0.01476287841796875, -0.01837158203125, -0.0460205078125, -0.0103302001953125, -0.0034542083740234375, -0.0714111328125, -0.035064697265625, 0.0019779205322265625, -0.03680419921875, 0.019134521484375, 0.00335693359375, -0.006526947021484375, -0.01532745361328125, 0.02716064453125, 0.0038051605224609375, 0.036102294921875, -0.01453399658203125, -0.04052734375, -0.00995635986328125, -0.054107666015625, -0.00543212890625, -0.0017976760864257812, 0.00047898292541503906, 0.01244354248046875, 0.054168701171875, 0.0245361328125, -0.053955078125, 0.0078277587890625, 0.0638427734375, -0.033477783203125, 0.0006504058837890625, 0.039581298828125, -0.0232696533203125, -0.010711669921875, 0.0260772705078125, -0.01165008544921875, 0.0153961181640625, -0.01824951171875, -0.0305328369140625, -0.021728515625, 0.0386962890625, 0.006641387939453125, 0.0058746337890625, 0.0258941650390625, 0.068115234375, 0.0263671875, 0.00525665283203125, -0.0428466796875, -0.0053253173828125, -0.04949951171875, 0.042755126953125, 0.018341064453125, -0.0002238750457763672, -0.024566650390625, 0.05902099609375, 0.007350921630859375, 0.01314544677734375, -0.0009045600891113281, -0.0122833251953125, 0.031341552734375, 0.0005016326904296875, 0.006103515625, -0.01690673828125, 0.012542724609375, -0.0171661376953125, -0.0019855499267578125, -0.01241302490234375, 0.0140533447265625, -0.0024242401123046875, -0.0004646778106689453, -0.037139892578125, -0.062225341796875, 0.0196075439453125, -0.06781005859375, 0.022430419921875, -0.0271148681640625, -0.01465606689453125, 0.0247802734375, 0.1212158203125, -0.04815673828125, -0.0240325927734375, 0.005767822265625, 0.0237579345703125, 0.0205230712890625, -0.05419921875, -0.01282501220703125, -0.0423583984375, -0.08477783203125, 0.0386962890625, -0.01397705078125, 0.005767822265625, -0.0309600830078125, 0.07061767578125, -0.040283203125, -0.02532958984375, 0.0258941650390625, -0.031890869140625, 0.021453857421875, 0.001049041748046875, -0.034454345703125, -0.01398468017578125, -0.0214385986328125, -0.026275634765625, -0.07147216796875, -0.006366729736328125, -0.01415252685546875, 0.062255859375, -0.00698089599609375, 0.024261474609375, -0.02105712890625, 0.035888671875, 0.01520538330078125, 0.02850341796875, -0.00475311279296875, -0.0188446044921875, 0.0143280029296875, 0.0145263671875, 0.0063323974609375, -0.01385498046875, -0.0023860931396484375, -0.014007568359375, -0.0258636474609375, 0.024017333984375, -0.0213165283203125, 0.0299835205078125, 0.001148223876953125, -0.0234375, -0.07049560546875, -0.041290283203125, 0.00435638427734375, 0.0023784637451171875, -0.0015745162963867188, 0.0123748779296875, -0.038787841796875, -0.042083740234375, 0.06866455078125, 0.01207733154296875, -0.0142059326171875, -0.00855255126953125, 0.061767578125, 0.00844573974609375, -0.047637939453125, 0.00019681453704833984, -0.00980377197265625, 0.03143310546875, -0.026458740234375, 0.045928955078125, -0.006099700927734375, -0.03302001953125, 0.0877685546875, -0.02392578125, -0.0218048095703125, -0.00258636474609375, 0.0364990234375, 0.0133056640625, -0.037811279296875, 0.024627685546875, -0.0025177001953125, -0.0007433891296386719, 0.021392822265625, -0.01042938232421875, -0.02313232421875, -0.0209808349609375, 0.037811279296875, 0.0160064697265625, 0.0051727294921875, -0.039276123046875, -0.030853271484375, 0.0112762451171875, 0.037078857421875, 0.0031719207763671875, 0.0200042724609375, 0.00679779052734375, -0.0010099411010742188, 0.00457763671875, 0.01348114013671875, -0.05615234375, -0.017364501953125, -0.0236663818359375, 0.04150390625, -0.037109375, 0.0031642913818359375, -0.0269012451171875, -0.01806640625, 0.040069580078125, 0.0203399658203125, -0.03582763671875, 0.0081634521484375, -0.01273345947265625, 0.043243408203125, -0.006092071533203125, 0.01424407958984375, 0.03656005859375, 0.01739501953125, 0.01410675048828125, -0.0200653076171875, -0.030426025390625, 0.01194000244140625, -0.034210205078125, 0.049285888671875, 0.0367431640625, -0.00795745849609375, 0.027008056640625, 0.023101806640625, 0.046356201171875, 0.006122589111328125, -0.038238525390625, 0.04010009765625, 0.0390625, 0.0120697021484375, -0.007549285888671875, 0.0185546875, -0.0170440673828125, 0.024932861328125, 0.01788330078125, -0.026458740234375, -0.029632568359375, 0.04345703125, 0.037384033203125, 0.002716064453125, 0.01117706298828125, -0.004657745361328125, -0.0016298294067382812, 0.010101318359375, 0.026641845703125, -0.0030975341796875, -0.04400634765625, -0.005886077880859375, 0.035308837890625, 0.039581298828125, -0.027587890625, -0.0086212158203125, -0.033905029296875, -0.0035228729248046875, 0.005573272705078125, -0.01342010498046875, -0.037078857421875, 0.02044677734375, 0.02386474609375, -0.036407470703125, -0.0113067626953125, 0.0118408203125, -0.030609130859375, -0.0188751220703125, -0.00782012939453125, -0.02337646484375, 0.02685546875, -0.014678955078125, 0.059234619140625, -0.04998779296875, 0.004108428955078125, 0.00548553466796875, -0.005901336669921875, 0.0687255859375, 0.032379150390625, -0.048553466796875, -0.002803802490234375, -0.032012939453125, -0.00848388671875, -0.037994384765625, -0.038299560546875, -0.0452880859375, -0.023956298828125, 0.00710296630859375, 0.01465606689453125, 0.00782012939453125, 0.003448486328125, -0.0238037109375, 0.01456451416015625, 0.0176849365234375, 0.043365478515625, -0.0253448486328125, 0.0567626953125, 0.043670654296875, 0.032867431640625, -0.0029392242431640625, 0.00641632080078125, -0.0271148681640625, -0.00997161865234375, 0.0034637451171875, -0.0297088623046875, -0.03125, 0.001850128173828125, -0.0305938720703125, 0.01275634765625, 0.0295257568359375, -0.01239013671875, 0.031280517578125, -0.0131072998046875, 0.002166748046875, -0.0165252685546875, -0.010772705078125, -0.0390625, -0.0206298828125, 0.04595947265625, -0.007785797119140625, 0.040771484375, -0.005893707275390625, 0.0025768280029296875, 0.0040283203125, -0.015716552734375, 0.0138092041015625, 0.02264404296875, -0.051239013671875, 0.059906005859375, 0.06695556640625, -0.0131072998046875, 0.024505615234375, 0.01490020751953125, -0.00921630859375, 0.00848388671875, -0.047210693359375, 0.0085906982421875, 0.05157470703125, 0.073974609375, -0.013458251953125, -0.013702392578125, 0.05035400390625, -0.0413818359375, 0.0096588134765625, 0.06744384765625, 0.06610107421875, -0.105712890625, 0.0247955322265625, 0.0216827392578125, 0.024017333984375, 0.035430908203125, 0.0169219970703125, -0.00920867919921875, -0.012359619140625, 0.01401519775390625, -0.01102447509765625, -0.00330352783203125, 0.0236053466796875, 0.0185089111328125, 0.006275177001953125, -0.02337646484375, 0.0723876953125, 0.01157379150390625, -0.067138671875, -0.01329803466796875, 0.0377197265625, -0.0143585205078125, -0.048797607421875, -0.019012451171875, 0.06475830078125, -0.0312042236328125, -0.08343505859375, 0.056060791015625, 0.0040130615234375, 0.0191497802734375, 0.016571044921875, 0.040283203125, -0.0145111083984375, 0.063232421875, -0.0186004638671875, 0.0209808349609375, 0.04656982421875, -0.046722412109375, -0.03997802734375, -0.0263519287109375, 0.00960540771484375, 0.0236053466796875, -0.0325927734375, 0.01922607421875, -0.02197265625, -0.029022216796875, -0.01386260986328125, -0.029388427734375, 0.059417724609375, 0.01311492919921875, -0.04400634765625, -0.00998687744140625, -0.0196685791015625, 0.0239715576171875, 0.01291656494140625, 0.0255889892578125, -0.0216827392578125, 0.0148162841796875, 0.005214691162109375, -0.022857666015625, -0.0177764892578125, 0.004894256591796875, -0.05865478515625, 0.11602783203125, 0.0123138427734375, 0.005550384521484375, 0.006374359130859375, 0.051513671875, -0.03857421875, 0.0291290283203125, -0.0372314453125, 0.07330322265625, 0.004322052001953125, 0.04296875, -0.0288238525390625, -0.0039825439453125, 0.0189208984375, 0.0168609619140625, 0.01169586181640625, 0.003002166748046875, -0.024505615234375, -0.023773193359375, 0.051483154296875, 0.0765380859375, 0.039306640625, 0.009185791015625, -0.02716064453125, 0.006282806396484375, -0.0018892288208007812, -0.026336669921875, 0.0196075439453125, -0.0195465087890625, -0.0276336669921875, 0.007358551025390625, 0.03790283203125, 0.042572021484375, -0.01500701904296875, -0.0297393798828125, 0.003002166748046875, -0.0006561279296875, -0.01030731201171875, 0.041107177734375, -0.002033233642578125, 0.0313720703125, 0.005847930908203125, -0.047454833984375, 0.00955963134765625, -0.04071044921875, 0.033355712890625, -0.01027679443359375, 0.0005764961242675781, 0.0322265625, 0.01483917236328125, -0.0010328292846679688, -0.00498199462890625, 0.00719451904296875, 0.0193328857421875, -0.008941650390625, 0.0328369140625, 0.017425537109375, 0.01470184326171875, -0.035064697265625, 0.00473785400390625, 0.0531005859375, 0.0513916015625, -0.033111572265625, 0.01396942138671875, 0.0165863037109375, -0.0020503997802734375, -0.02276611328125, -0.045745849609375, -0.00556182861328125, -0.0014476776123046875, -0.004638671875, -0.009063720703125, 0.022552490234375, 0.06390380859375, 0.0010709762573242188, 0.01361083984375, 0.04107666015625, -0.06451416015625, 0.03662109375, -0.050933837890625, 0.035247802734375, 0.02215576171875, 0.07666015625, -0.0018444061279296875, 0.07806396484375, -0.043670654296875, -0.026275634765625, 0.0288543701171875, 0.03912353515625, -0.00992584228515625, -0.0249786376953125, -0.03564453125, -0.0870361328125, 0.0203399658203125, 0.0267333984375, 0.07098388671875, 0.0260772705078125, 0.08551025390625, 0.02728271484375, -0.041656494140625, 0.00693511962890625, 0.0272369384765625, -0.0166778564453125, -0.01070404052734375, 0.00838470458984375, -0.01021575927734375, 0.023162841796875, -0.0198974609375, -0.006252288818359375, 0.039398193359375, 0.0140228271484375, -0.025634765625, 0.026947021484375, -0.00408172607421875, -0.0287933349609375, 0.0246429443359375, 0.037628173828125, 0.046630859375, 0.0214996337890625, -0.09185791015625, -0.02545166015625, -0.01163482666015625, -0.033538818359375, 0.03619384765625, 0.039276123046875, -0.036773681640625, 0.017059326171875, -0.005199432373046875, -0.0026988983154296875, 0.0131378173828125, -0.0007314682006835938, 0.012786865234375, 0.0550537109375, 0.0215301513671875, 0.0267486572265625, -0.07696533203125, -0.0300445556640625, -0.050445556640625, 0.03826904296875, 0.035919189453125, 0.0021457672119140625, 0.02166748046875, 0.057281494140625, -0.056488037109375, 0.025604248046875, -0.06304931640625, -0.054351806640625, 0.013641357421875, -0.0024394989013671875, 0.0038700103759765625, 0.0061798095703125, -0.047027587890625, -0.01629638671875, 0.0491943359375, -0.0293731689453125, 0.051605224609375, -0.05133056640625, 0.01123809814453125, -0.0804443359375, 0.01364898681640625, -0.011688232421875, 0.0196990966796875, -0.0123443603515625, -0.02459716796875, 0.053192138671875, 0.024932861328125, -0.004367828369140625, 0.01396942138671875, -0.002384185791015625, -0.01708984375, 0.01355743408203125, -0.01387786865234375, 0.00794219970703125, 0.036376953125, -0.02276611328125, 0.004547119140625, 0.0097503662109375, -0.0045318603515625, -0.01325225830078125, 0.027374267578125, -0.01213836669921875, -0.006649017333984375, -0.04290771484375, -0.034576416015625, -0.048736572265625, 0.0073394775390625, -0.00641632080078125, 0.01387786865234375, -0.036956787109375, 0.009033203125, -0.038787841796875, 0.00965118408203125, -0.019378662109375, -0.048187255859375, -0.0369873046875, -0.0009965896606445312, -0.04156494140625, -0.06512451171875, -0.04742431640625, -0.00788116455078125, -0.0017709732055664062, -0.0110321044921875, -0.031890869140625, 0.046356201171875, -0.0300750732421875, -0.0206298828125, -0.0186309814453125, -0.04168701171875, 0.023193359375, 0.03936767578125, -0.035247802734375, -0.04058837890625, -0.032867431640625, -0.00023102760314941406, -0.05499267578125, 0.0005736351013183594, 0.034576416015625, -0.0303192138671875, -0.061981201171875, -0.021148681640625, 0.01837158203125, 0.0372314453125, 0.03863525390625, -0.016143798828125, -0.0142059326171875, 0.0104827880859375, 0.0013113021850585938, -0.0450439453125, 0.028228759765625, -0.0780029296875, -0.033233642578125, 0.0110626220703125, -0.033233642578125, -0.021453857421875, -0.046722412109375, -0.057861328125, 0.0187225341796875, 0.006961822509765625, -0.032684326171875, -0.0472412109375, 0.01084136962890625, -0.01280975341796875, 0.030731201171875, 0.0020122528076171875, -0.04400634765625, -0.01471710205078125, 0.030242919921875, 0.01068878173828125, 0.0850830078125, -0.00699615478515625, 0.0199432373046875, -0.005039215087890625, 0.0178375244140625, -0.0058746337890625, 0.0146636962890625, 0.01456451416015625, -0.0237579345703125, -0.0037784576416015625, 0.0023174285888671875, -0.07073974609375, -0.06988525390625, -0.029998779296875, 0.01461029052734375, -0.0171356201171875, -0.042938232421875, -0.0367431640625, -0.02630615234375, 0.0765380859375, 0.04583740234375, 0.0221099853515625, -0.021270751953125, 0.01227569580078125, 0.00695037841796875, -0.0208587646484375, 0.0018987655639648438, 0.002742767333984375, -0.0394287109375, -0.0216064453125, 0.0169219970703125, -0.032562255859375, -0.036956787109375, 0.00933837890625, -0.0640869140625, -0.0032367706298828125, -0.04278564453125, -0.00983428955078125, -0.030731201171875, -0.0604248046875, 0.07879638671875, -0.046356201171875, -0.03729248046875, 0.0298614501953125, 0.03619384765625, 0.01001739501953125, 0.00757598876953125, -0.0027866363525390625, 0.0272064208984375, -0.022705078125, -0.006946563720703125, 0.01715087890625, 0.0225982666015625, 0.000007331371307373047, -0.01165771484375, -0.0269775390625, 0.0316162109375, 0.029449462890625, 0.0294952392578125, -0.03680419921875, 0.031036376953125, 0.0243988037109375, 0.058746337890625, 0.01763916015625, 0.048828125, 0.0263671875, 0.03546142578125, -0.0160980224609375, -0.0472412109375, 0.0023899078369140625, -0.045013427734375, -0.008331298828125, 0.003692626953125, -0.01270294189453125, -0.030914306640625, 0.0195770263671875, -0.025726318359375, 0.00716400146484375, 0.0163726806640625 ]
87f28044dce347d71886071dacf9fb3923032898
Wordpress Stackexchange Q: Dequeue script, but still use wp_localize_script to pass vars I need to dequeue some scripts but still have access to the vars passed via their wp_localize_script calls. Is there a way to do that? A: I don't think so, since localize output is tied to script's print event. You will probably have to access that data and output it in some other way.
Q: Dequeue script, but still use wp_localize_script to pass vars I need to dequeue some scripts but still have access to the vars passed via their wp_localize_script calls. Is there a way to do that? A: I don't think so, since localize output is tied to script's print event. You will probably have to access that data and output it in some other way.
wordpress
{ "language": "en", "length": 64, "provenance": "stackexchange_00019.jsonl.gz:413689", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30577" }
[ 0.035125732421875, -0.0016450881958007812, -0.0027484893798828125, -0.048492431640625, 0.00765228271484375, -0.01146697998046875, -0.004886627197265625, -0.0110015869140625, 0.030731201171875, 0.026763916015625, -0.023590087890625, -0.038482666015625, -0.0160064697265625, -0.018157958984375, -0.045684814453125, -0.04962158203125, 0.058563232421875, -0.036956787109375, 0.00246429443359375, -0.008331298828125, -0.0112457275390625, 0.023223876953125, 0.0271148681640625, 0.0931396484375, 0.005893707275390625, 0.006778717041015625, 0.04840087890625, 0.033599853515625, -0.034912109375, -0.01305389404296875, 0.0178680419921875, -0.0229949951171875, 0.0137176513671875, 0.0323486328125, -0.032135009765625, 0.0241851806640625, -0.01513671875, 0.0361328125, 0.0204925537109375, 0.0024280548095703125, 0.0184326171875, -0.01215362548828125, -0.0352783203125, 0.0251617431640625, -0.0165863037109375, -0.035064697265625, 0.0146942138671875, -0.02130126953125, 0.002666473388671875, 0.0941162109375, 0.006153106689453125, 0.002399444580078125, -0.018646240234375, 0.04864501953125, 0.009307861328125, -0.0137939453125, -0.024017333984375, -0.00020229816436767578, 0.03753662109375, 0.0570068359375, -0.02532958984375, -0.019744873046875, 0.005542755126953125, -0.0858154296875, -0.007061004638671875, 0.0396728515625, -0.0005483627319335938, -0.0018138885498046875, -0.05218505859375, -0.006214141845703125, 0.0253448486328125, -0.064453125, 0.00028824806213378906, 0.0026836395263671875, 0.01080322265625, -0.00980377197265625, 0.018157958984375, -0.0015363693237304688, 0.00020647048950195312, 0.0364990234375, -0.0263214111328125, -0.06793212890625, -0.03955078125, 0.0228118896484375, -0.039947509765625, 0.0256195068359375, -0.008544921875, 0.0004963874816894531, -0.039581298828125, -0.0545654296875, -0.03515625, -0.007129669189453125, -0.0987548828125, -0.00923919677734375, -0.006443023681640625, -0.01279449462890625, 0.018798828125, 0.03729248046875, -0.00682830810546875, 0.0199432373046875, -0.0265960693359375, -0.00872039794921875, -0.00963592529296875, -0.0254058837890625, 0.00659942626953125, 0.01971435546875, 0.0143585205078125, -0.0016355514526367188, 0.0185546875, 0.01497650146484375, -0.01096343994140625, 0.034576416015625, -0.0036869049072265625, -0.02203369140625, -0.002777099609375, 0.0106201171875, -0.02362060546875, 0.00274658203125, -0.007495880126953125, -0.0290069580078125, -0.0009822845458984375, 0.031524658203125, -0.0294189453125, 0.0009937286376953125, -0.0021991729736328125, -0.033416748046875, -0.00872039794921875, 0.0228118896484375, 0.00408935546875, 0.053985595703125, -0.003116607666015625, -0.005916595458984375, 0.0041961669921875, -0.00914764404296875, -0.02069091796875, -0.029937744140625, 0.038726806640625, -0.0106964111328125, 0.0253143310546875, 0.00782012939453125, -0.011199951171875, 0.0005602836608886719, 0.025848388671875, 0.0132904052734375, -0.0301361083984375, 0.01080322265625, 0.006046295166015625, 0.00786590576171875, -0.0026874542236328125, -0.06597900390625, 0.0142974853515625, 0.0024166107177734375, 0.005321502685546875, 0.01381683349609375, 0.0253143310546875, -0.0247344970703125, 0.036834716796875, -0.031707763671875, 0.0186614990234375, -0.022735595703125, -0.027557373046875, 0.01038360595703125, 0.00884246826171875, -0.0259857177734375, 0.0068206787109375, -0.0265350341796875, 0.0263824462890625, 0.01375579833984375, 0.01959228515625, 0.021087646484375, 0.04534912109375, -0.01424407958984375, -0.01264190673828125, -0.0169219970703125, -0.006561279296875, -0.0024738311767578125, -0.033477783203125, -0.002010345458984375, 0.036529541015625, -0.05859375, -0.0218505859375, -0.033416748046875, 0.050872802734375, 0.0006184577941894531, -0.03594970703125, -0.0418701171875, 0.0163116455078125, 0.02093505859375, 0.04742431640625, 0.01313018798828125, 0.038330078125, -0.018798828125, -0.06951904296875, 0.0263671875, -0.0380859375, 0.028564453125, 0.005832672119140625, 0.0377197265625, -0.014739990234375, -0.022491455078125, 0.05010986328125, -0.018035888671875, 0.045501708984375, -0.0270233154296875, -0.0266571044921875, 0.0162353515625, -0.0128173828125, 0.025421142578125, 0.00977325439453125, -0.0110931396484375, -0.000024080276489257812, 0.0238189697265625, -0.01335906982421875, -0.01007843017578125, -0.01456451416015625, 0.0367431640625, -0.01543426513671875, 0.06414794921875, 0.01346588134765625, 0.012664794921875, 0.0406494140625, -0.04071044921875, 0.051849365234375, -0.004520416259765625, -0.042388916015625, -0.0081787109375, -0.00485992431640625, 0.0113067626953125, 0.006107330322265625, -0.03497314453125, 0.08648681640625, 0.03350830078125, -0.01201629638671875, 0.035797119140625, 0.0197601318359375, -0.01277923583984375, 0.017425537109375, -0.062469482421875, 0.041046142578125, 0.02996826171875, 0.04595947265625, 0.02630615234375, 0.007129669189453125, -0.01580810546875, 0.0138092041015625, -0.0489501953125, 0.019866943359375, -0.0297698974609375, 0.021209716796875, 0.062744140625, -0.039947509765625, -0.01439666748046875, 0.012420654296875, -0.060791015625, -0.031585693359375, 0.0489501953125, -0.028167724609375, -0.0220184326171875, -0.011322021484375, 0.0178070068359375, 0.0139617919921875, 0.0270538330078125, 0.0148162841796875, 0.0015211105346679688, 0.01442718505859375, -0.0252838134765625, -0.01534271240234375, -0.0085906982421875, -0.026947021484375, 0.006275177001953125, 0.0396728515625, -0.031280517578125, 0.00160980224609375, 0.036773681640625, -0.0271453857421875, -0.01220703125, -0.011871337890625, -0.0014829635620117188, -0.0032596588134765625, 0.0169830322265625, -0.0254364013671875, 0.0086212158203125, -0.0190582275390625, -0.0300445556640625, 0.00662994384765625, -0.0275421142578125, -0.01042938232421875, -0.046051025390625, 0.0389404296875, -0.004241943359375, 0.01009368896484375, 0.0297698974609375, -0.00618743896484375, 0.042449951171875, 0.020477294921875, -0.028564453125, 0.054718017578125, -0.0124053955078125, 0.006008148193359375, 0.005191802978515625, 0.0164642333984375, 0.05859375, 0.0126495361328125, 0.0020809173583984375, -0.0066680908203125, 0.04248046875, 0.048004150390625, -0.047760009765625, -0.036773681640625, 0.001636505126953125, -0.0701904296875, -0.0577392578125, 0.01226806640625, 0.055816650390625, -0.034820556640625, -0.04388427734375, -0.0209808349609375, 0.0102996826171875, -0.0882568359375, -0.09173583984375, 0.0292510986328125, -0.0465087890625, 0.01026153564453125, -0.0177154541015625, -0.02191162109375, -0.02679443359375, 0.005420684814453125, -0.007228851318359375, -0.005130767822265625, -0.01806640625, -0.05224609375, -0.06695556640625, -0.04058837890625, 0.0162506103515625, -0.0206451416015625, -0.0083465576171875, 0.0003502368927001953, 0.020050048828125, 0.004848480224609375, -0.0421142578125, 0.007778167724609375, 0.0143585205078125, -0.007175445556640625, 0.0189971923828125, -0.0017375946044921875, -0.01898193359375, 0.0222320556640625, -0.0012159347534179688, -0.00872039794921875, 0.0057830810546875, 0.01751708984375, -0.01654052734375, 0.01947021484375, 0.02484130859375, 0.017547607421875, 0.0235595703125, -0.01788330078125, 0.019439697265625, 0.014190673828125, -0.01922607421875, 0.001758575439453125, 0.016845703125, -0.008056640625, -0.029571533203125, 0.01183319091796875, -0.04254150390625, -0.0232696533203125, -0.01068878173828125, 0.041107177734375, -0.00885009765625, -0.0374755859375, -0.006710052490234375, 0.025115966796875, 0.0305328369140625, 0.06793212890625, 0.00896453857421875, 0.0216827392578125, -0.0300750732421875, 0.01232147216796875, -0.005466461181640625, -0.0166778564453125, -0.01206207275390625, -0.0232696533203125, -0.0191497802734375, -0.00791168212890625, 0.039520263671875, -0.0234222412109375, 0.005527496337890625, -0.0171966552734375, -0.01178741455078125, -0.00506591796875, 0.05255126953125, -0.039764404296875, -0.00316619873046875, -0.00681304931640625, 0.03125, -0.06842041015625, -0.06793212890625, -0.01849365234375, 0.0016489028930664062, -0.0079803466796875, -0.00960540771484375, -0.03155517578125, 0.004077911376953125, -0.0106353759765625, 0.00966644287109375, 0.0258636474609375, -0.03790283203125, 0.046783447265625, -0.00844573974609375, 0.019775390625, -0.0148468017578125, 0.0245819091796875, -0.042327880859375, -0.0208587646484375, -0.01153564453125, -0.058837890625, -0.0159149169921875, -0.039886474609375, 0.07672119140625, 0.038360595703125, -0.036651611328125, -0.03564453125, 0.0200653076171875, -0.0272369384765625, -0.0117645263671875, 0.023193359375, 0.0271148681640625, -0.0063018798828125, 0.039459228515625, 0.01364898681640625, -0.024322509765625, 0.00940704345703125, 0.0039043426513671875, -0.0296783447265625, -0.0303802490234375, -0.039337158203125, -0.05413818359375, 0.01020050048828125, -0.036163330078125, -0.06280517578125, -0.0113067626953125, 0.0298004150390625, -0.005191802978515625, -0.004520416259765625, 0.028961181640625, 0.00046753883361816406, -0.026519775390625, 0.034759521484375, 0.03082275390625, 0.0033512115478515625, -0.009368896484375, 0.044525146484375, 0.019012451171875, -0.0280609130859375, -0.0242462158203125, 0.03387451171875, -0.0042877197265625, 0.01178741455078125, 0.06536865234375, 0.0215301513671875, 0.0161285400390625, 0.0228271484375, -0.01216888427734375, 0.01059722900390625, 0.007076263427734375, 0.00948333740234375, 0.0252227783203125, -0.0201568603515625, 0.023040771484375, 0.01947021484375, -0.025146484375, 0.04534912109375, 0.0217437744140625, -0.057830810546875, 0.01212310791015625, 0.063720703125, -0.0157012939453125, 0.002838134765625, -0.03338623046875, -0.06903076171875, 0.01776123046875, -0.044403076171875, 0.0195159912109375, 0.00490570068359375, -0.00872802734375, 0.007114410400390625, 0.014862060546875, 0.0157928466796875, 0.0404052734375, 0.0182037353515625, -0.003467559814453125, 0.064208984375, -0.004772186279296875, 0.0181732177734375, 0.00739288330078125, 0.0023651123046875, -0.03204345703125, -0.0101318359375, -0.037109375, -0.01317596435546875, 0.025787353515625, 0.02447509765625, 0.0262908935546875, 0.004306793212890625, 0.0026302337646484375, 0.007457733154296875, 0.0236358642578125, 0.033721923828125, 0.05169677734375, -0.0026798248291015625, 0.00846099853515625, 0.0193023681640625, -0.0061187744140625, 0.0022792816162109375, -0.006160736083984375, 0.06964111328125, -0.053131103515625, 0.047271728515625, -0.004177093505859375, -0.0216064453125, -0.026885986328125, 0.0306243896484375, 0.0225067138671875, -0.01800537109375, 0.0328369140625, 0.018096923828125, 0.041473388671875, 0.0145263671875, 0.026641845703125, 0.0025501251220703125, -0.020355224609375, 0.00955963134765625, 0.0196990966796875, 0.0166168212890625, -0.0181884765625, -0.0246429443359375, 0.047088623046875, 0.000614166259765625, -0.033294677734375, -0.040008544921875, -0.017486572265625, 0.041290283203125, 0.00994873046875, 0.0260009765625, -0.02972412109375, -0.021148681640625, -0.03173828125, 0.0015592575073242188, -0.02679443359375, -0.03143310546875, -0.0144195556640625, -0.01015472412109375, 0.0011816024780273438, 0.0228729248046875, -0.082763671875, -0.0235443115234375, -0.004734039306640625, -0.011199951171875, 0.0283355712890625, 0.01226806640625, 0.01097869873046875, -0.0380859375, 0.004856109619140625, -0.01788330078125, -0.004070281982421875, 0.05657958984375, 0.004505157470703125, -0.0242767333984375, -0.00777435302734375, -0.07012939453125, -0.049591064453125, -0.06304931640625, -0.0263214111328125, -0.06683349609375, 0.0224456787109375, -0.0009064674377441406, 0.0196685791015625, -0.0019512176513671875, -0.030975341796875, 0.0001424551010131836, 0.0185394287109375, 0.01229095458984375, 0.0219268798828125, -0.03619384765625, 0.061279296875, 0.026611328125, -0.045379638671875, -0.00322723388671875, 0.050567626953125, 0.0015420913696289062, 0.0093994140625, 0.010772705078125, -0.0292510986328125, -0.0008559226989746094, -0.0323486328125, -0.0031414031982421875, -0.0080718994140625, 0.0418701171875, 0.0024204254150390625, 0.045379638671875, 0.0019378662109375, 0.00852203369140625, -0.005649566650390625, -0.041290283203125, -0.029937744140625, 0.0016765594482421875, 0.0297393798828125, -0.01325225830078125, 0.004863739013671875, -0.002788543701171875, -0.01241302490234375, 0.01213836669921875, -0.005451202392578125, -0.0016546249389648438, 0.00830841064453125, -0.00267791748046875, 0.0097503662109375, 0.051300048828125, 0.015380859375, 0.036407470703125, 0.0167999267578125, 0.00004881620407104492, 0.02606201171875, -0.016876220703125, 0.0016498565673828125, -0.0172576904296875, -0.020355224609375, -0.039337158203125, 0.0107574462890625, -0.0298004150390625, -0.005229949951171875, 0.0035076141357421875, 0.05352783203125, 0.07257080078125, -0.05926513671875, -0.0144805908203125, 0.0252685546875, -0.05572509765625, -0.07781982421875, -0.016876220703125, 0.035888671875, -0.0018854141235351562, 0.024505615234375, 0.0239105224609375, -0.0230712890625, 0.0121307373046875, -0.005405426025390625, 0.003200531005859375, -0.0014295578002929688, 0.01055908203125, 0.016754150390625, -0.00911712646484375, 0.023040771484375, 0.003818511962890625, 0.046539306640625, -0.019378662109375, -0.0215606689453125, -0.0107421875, -0.0753173828125, -0.06793212890625, -0.032684326171875, -0.01091766357421875, -0.0116424560546875, -0.033172607421875, 0.027252197265625, 0.055267333984375, 0.041473388671875, 0.0182952880859375, -0.03717041015625, 0.0218353271484375, 0.040557861328125, 0.020782470703125, -0.0127716064453125, 0.031951904296875, 0.02734375, -0.07568359375, 0.0124053955078125, -0.0270233154296875, -0.00588226318359375, -0.0019130706787109375, 0.0283050537109375, 0.04486083984375, -0.02911376953125, -0.025634765625, -0.0002446174621582031, 0.03717041015625, 0.0207672119140625, 0.00994110107421875, 0.0157623291015625, -0.07135009765625, -0.06390380859375, -0.004364013671875, -0.10076904296875, -0.0189208984375, -0.02490234375, -0.0294036865234375, 0.11541748046875, 0.0172271728515625, -0.009033203125, 0.026397705078125, 0.057403564453125, -0.035186767578125, 0.037353515625, 0.0006389617919921875, 0.07611083984375, 0.01526641845703125, 0.052276611328125, -0.019073486328125, -0.0240325927734375, 0.0633544921875, 0.0718994140625, -0.020111083984375, -0.00701904296875, 0.0278778076171875, -0.00836944580078125, 0.0021686553955078125, 0.039459228515625, 0.0016765594482421875, -0.0180816650390625, 0.00534820556640625, 0.048004150390625, 0.0001291036605834961, -0.059326171875, 0.0151519775390625, -0.048553466796875, 0.0016527175903320312, 0.0311431884765625, 0.00003516674041748047, -0.0282440185546875, 0.0144195556640625, -0.019866943359375, -0.0281219482421875, 0.01236724853515625, 0.00115966796875, 0.0262298583984375, -0.00867462158203125, 0.031524658203125, -0.0219268798828125, 0.02764892578125, -0.0693359375, 0.007144927978515625, -0.0019931793212890625, -0.006931304931640625, 0.01861572265625, 0.0482177734375, 0.03265380859375, 0.031585693359375, -0.0162506103515625, 0.01262664794921875, -0.00970458984375, -0.030181884765625, 0.0268402099609375, 0.027587890625, 0.04254150390625, 0.01209259033203125, 0.0054168701171875, 0.01165771484375, 0.026885986328125, -0.020263671875, -0.0021648406982421875, 0.020172119140625, 0.021453857421875, -0.012359619140625, -0.0228118896484375, 0.01119232177734375, -0.02398681640625, 0.004108428955078125, 0.038238525390625, -0.01183319091796875, 0.0010528564453125, 0.01224517822265625, 0.030059814453125, 0.0838623046875, -0.044525146484375, -0.016143798828125, -0.05419921875, 0.003322601318359375, 0.011199951171875, 0.0885009765625, 0.02716064453125, 0.035736083984375, -0.026458740234375, -0.044097900390625, -0.0482177734375, 0.03564453125, 0.02838134765625, 0.04443359375, -0.0679931640625, 0.003284454345703125, 0.005031585693359375, 0.053497314453125, 0.046112060546875, -0.028778076171875, 0.04840087890625, 0.0703125, -0.041259765625, -0.00617218017578125, 0.08026123046875, 0.0089263916015625, 0.0272674560546875, -0.0235595703125, 0.02105712890625, 0.0017023086547851562, -0.0196990966796875, -0.037750244140625, 0.0157623291015625, 0.024505615234375, -0.0170440673828125, -0.01275634765625, 0.002605438232421875, -0.0731201171875, 0.0227203369140625, -0.0041961669921875, 0.08154296875, -0.0021839141845703125, 0.0036640167236328125, -0.0012769699096679688, -0.037811279296875, -0.021270751953125, 0.0159759521484375, 0.035888671875, 0.0419921875, -0.0201416015625, 0.08160400390625, -0.064453125, -0.00978851318359375, 0.0718994140625, 0.042999267578125, -0.04998779296875, 0.0063629150390625, -0.01174163818359375, -0.04803466796875, -0.038116455078125, -0.044525146484375, 0.0533447265625, 0.036834716796875, -0.022003173828125, 0.0153656005859375, 0.057861328125, 0.04351806640625, -0.00528717041015625, 0.035858154296875, 0.042724609375, -0.01959228515625, 0.007160186767578125, 0.0245361328125, -0.03314208984375, 0.01053619384765625, 0.0157012939453125, 0.0244903564453125, -0.02972412109375, 0.00495147705078125, -0.0185699462890625, 0.00905609130859375, -0.01110076904296875, 0.034942626953125, -0.0225982666015625, -0.03662109375, 0.0250701904296875, 0.025634765625, -0.0167083740234375, 0.01335906982421875, 0.026947021484375, -0.0131683349609375, -0.0174102783203125, -0.0416259765625, 0.0193023681640625, -0.02294921875, 0.005153656005859375, 0.00231170654296875, 0.0130462646484375, 0.0540771484375, 0.002590179443359375, -0.01189422607421875, 0.045196533203125, 0.0182037353515625, 0.0011434555053710938, 0.015655517578125, 0.06915283203125, -0.048370361328125, -0.0099334716796875, 0.04791259765625, 0.039093017578125, 0.025146484375, -0.06439208984375, -0.0079345703125, -0.043426513671875, 0.0115203857421875, -0.0175933837890625, -0.029449462890625, 0.014556884765625, 0.02203369140625, 0.0258026123046875, -0.01239776611328125, -0.0160675048828125, -0.00952911376953125, 0.01439666748046875, -0.0131683349609375, -0.01514434814453125, 0.02313232421875, -0.0576171875, -0.0252227783203125, 0.0010671615600585938, 0.01617431640625, -0.01312255859375, 0.017364501953125, -0.051910400390625, -0.0689697265625, -0.03204345703125, 0.047637939453125, -0.03924560546875, 0.046661376953125, 0.0401611328125, -0.03631591796875, 0.0162200927734375, 0.08489990234375, 0.052764892578125, 0.13525390625, -0.03253173828125, -0.04803466796875, -0.0064849853515625, 0.013702392578125, 0.02410888671875, -0.01558685302734375, -0.007503509521484375, -0.041229248046875, 0.0117950439453125, -0.00789642333984375, 0.004383087158203125, 0.0253448486328125, -0.034820556640625, -0.07861328125, 0.058319091796875, -0.0176849365234375, -0.037261962890625, -0.0234527587890625, 0.002445220947265625, 0.0308990478515625, -0.021087646484375, -0.0102081298828125, -0.03265380859375, -0.072509765625, -0.042327880859375, -0.0011005401611328125, 0.03692626953125, 0.0177764892578125, -0.006519317626953125, -0.0235748291015625, 0.00649261474609375, 0.0027923583984375, -0.006900787353515625, -0.031463623046875, 0.01486968994140625, 0.00254058837890625, 0.0236358642578125, -0.00765228271484375, -0.014862060546875, 0.01230621337890625, 0.00537109375, -0.020965576171875, -0.018280029296875, -0.007549285888671875, 0.0013675689697265625, 0.064208984375, 0.020233154296875, 0.0198516845703125, -0.0277557373046875, 0.024261474609375, -0.0132293701171875, -0.01375579833984375, 0.002315521240234375, 0.010894775390625, -0.01110076904296875, 0.003864288330078125, -0.00986480712890625, -0.01229095458984375, -0.021759033203125, -0.004360198974609375, -0.027008056640625, -0.0253448486328125, 0.01251220703125, -0.0186309814453125, 0.0100250244140625, -0.04052734375, 0.01374053955078125, -0.00618743896484375, 0.0196990966796875, 0.01409149169921875, 0.035400390625, 0.01177978515625, 0.06341552734375, -0.033721923828125, 0.005786895751953125, -0.0167999267578125, 0.0167388916015625, -0.01141357421875, 0.06097412109375, -0.0252227783203125, 0.01023101806640625, 0.0025119781494140625, 0.01561737060546875, 0.007198333740234375, 0.0308380126953125, -0.0239410400390625, 0.061920166015625, 0.0148468017578125, -0.045623779296875, -0.0347900390625, -0.01268768310546875, -0.02178955078125, 0.00972747802734375, -0.05267333984375, 0.0294036865234375, -0.004703521728515625, -0.02386474609375, 0.018798828125, -0.0285797119140625, -0.006317138671875, -0.031982421875, 0.0025768280029296875, -0.0360107421875, -0.0246429443359375, 0.0171661376953125 ]
656a45b7faf542026ba24b2bfac80ae1581cc15d
Wordpress Stackexchange Q: Fatal error: Call to undefined function wp_create_nonce() I'm trying to add a nonce to my plugin's Ajax. I'm not sure why I'm getting this error: Fatal error: Call to undefined function wp_create_nonce() In my php file : wp_localize_script('my-ajax-handle', 'the_ajax_script', array('ajaxurl'=> admin_url('admin-ajax.php'), 'my_nonce' => wp_create_nonce('myajax-nonce'))); In js file: jQuery.post(the_ajax_script.ajaxurl, {my_nonce : the_ajax_script.my_nonce}, jQuery("#theForm").serialize() + "&maxLat="+ map_bounds[0] + "&maxLong="+ map_bounds[1] + "&minLat="+ map_bounds[2] + "&minLong="+ map_bounds[3], function(response_from_the_action_function){ jQuery("#response_area").html(response_from_the_action_function); }); Any suggestions on how to solve this? Thank you. A: More context would be helpful. Is that all the code found in your plugin or functions file directly? Or are you hooking in to something via add_action. Anyway, what's probably wrong is that you're calling wp_localize_script and wp_enqueue_script outside of an action. wp_create_nonce, or, rather, the file in which it resides, has yet to be loaded. The solution is to call wp_localize_script from inside a function hooked into wp_enqueue_scripts <?php add_action( 'wp_enqueue_scripts', 'wpse30583_enqueue' ); function wpse30583_enqueue() { // your enqueue will probably look different. wp_enqueue_script( 'wpse30583_script' ); // Localize the script $data = array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'wpse30583_nonce' ) ); wp_localize_script( 'wpse30583_script', 'wpse3058_object', $data ); }
Q: Fatal error: Call to undefined function wp_create_nonce() I'm trying to add a nonce to my plugin's Ajax. I'm not sure why I'm getting this error: Fatal error: Call to undefined function wp_create_nonce() In my php file : wp_localize_script('my-ajax-handle', 'the_ajax_script', array('ajaxurl'=> admin_url('admin-ajax.php'), 'my_nonce' => wp_create_nonce('myajax-nonce'))); In js file: jQuery.post(the_ajax_script.ajaxurl, {my_nonce : the_ajax_script.my_nonce}, jQuery("#theForm").serialize() + "&maxLat="+ map_bounds[0] + "&maxLong="+ map_bounds[1] + "&minLat="+ map_bounds[2] + "&minLong="+ map_bounds[3], function(response_from_the_action_function){ jQuery("#response_area").html(response_from_the_action_function); }); Any suggestions on how to solve this? Thank you. A: More context would be helpful. Is that all the code found in your plugin or functions file directly? Or are you hooking in to something via add_action. Anyway, what's probably wrong is that you're calling wp_localize_script and wp_enqueue_script outside of an action. wp_create_nonce, or, rather, the file in which it resides, has yet to be loaded. The solution is to call wp_localize_script from inside a function hooked into wp_enqueue_scripts <?php add_action( 'wp_enqueue_scripts', 'wpse30583_enqueue' ); function wpse30583_enqueue() { // your enqueue will probably look different. wp_enqueue_script( 'wpse30583_script' ); // Localize the script $data = array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'wpse30583_nonce' ) ); wp_localize_script( 'wpse30583_script', 'wpse3058_object', $data ); }
wordpress
{ "language": "en", "length": 189, "provenance": "stackexchange_00019.jsonl.gz:413691", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30583" }
[ 0.049346923828125, 0.0094757080078125, -0.047119140625, -0.0252838134765625, 0.03326416015625, -0.0595703125, 0.037841796875, -0.0031604766845703125, 0.0131378173828125, 0.030242919921875, -0.059478759765625, 0.025299072265625, -0.03472900390625, 0.0110015869140625, -0.040985107421875, -0.03887939453125, 0.049041748046875, -0.0193328857421875, 0.040924072265625, 0.01548004150390625, 0.0140838623046875, 0.051483154296875, 0.024139404296875, 0.0340576171875, -0.00817108154296875, -0.029632568359375, 0.1038818359375, 0.028289794921875, -0.033905029296875, -0.03399658203125, 0.016632080078125, 0.004261016845703125, 0.02587890625, 0.0303955078125, -0.056121826171875, -0.032958984375, 0.01605224609375, -0.004032135009765625, -0.0218353271484375, 0.049407958984375, 0.0247039794921875, -0.0152130126953125, 0.00016486644744873047, 0.05523681640625, -0.0223236083984375, -0.03961181640625, 0.048553466796875, -0.0081787109375, -0.0233001708984375, 0.04345703125, 0.0272979736328125, -0.025787353515625, 0.006862640380859375, 0.0139923095703125, 0.006389617919921875, 0.01476287841796875, -0.07342529296875, 0.01201629638671875, 0.017303466796875, 0.09210205078125, 0.02020263671875, -0.01273345947265625, -0.01407623291015625, -0.0611572265625, -0.03167724609375, -0.0111846923828125, -0.0005288124084472656, 0.0007262229919433594, -0.032958984375, -0.0045623779296875, 0.040863037109375, -0.0173797607421875, 0.0037441253662109375, 0.01425933837890625, 0.0048675537109375, -0.03070068359375, 0.0065460205078125, -0.006168365478515625, 0.017425537109375, 0.0274200439453125, 0.03131103515625, -0.0006709098815917969, -0.017791748046875, 0.0455322265625, -0.0270233154296875, 0.047149658203125, -0.01010894775390625, -0.036102294921875, -0.0400390625, -0.04461669921875, -0.033538818359375, -0.06427001953125, -0.0350341796875, -0.00751495361328125, -0.01364898681640625, -0.023895263671875, 0.019073486328125, 0.01751708984375, 0.0193634033203125, 0.0113525390625, 0.040557861328125, -0.055694580078125, 0.027069091796875, -0.0261688232421875, 0.006397247314453125, 0.0706787109375, 0.016632080078125, -0.00469207763671875, -0.009033203125, -0.01143646240234375, -0.002895355224609375, -0.02166748046875, 0.0273590087890625, -0.02484130859375, 0.01403045654296875, -0.039703369140625, -0.01995849609375, 0.051849365234375, 0.00945281982421875, -0.0216217041015625, -0.01275634765625, -0.01611328125, -0.01544952392578125, 0.038970947265625, 0.02728271484375, 0.0004546642303466797, -0.01763916015625, 0.0364990234375, 0.036468505859375, 0.01776123046875, -0.0330810546875, 0.025970458984375, 0.0799560546875, -0.010589599609375, -0.0142669677734375, -0.0221405029296875, 0.058807373046875, 0.020172119140625, 0.0105438232421875, 0.0094146728515625, 0.005588531494140625, -0.0236358642578125, -0.0030956268310546875, 0.005771636962890625, -0.00650787353515625, -0.0044097900390625, 0.0197601318359375, 0.020599365234375, -0.01056671142578125, -0.01265716552734375, 0.01157379150390625, -0.0116424560546875, 0.045166015625, -0.00922393798828125, -0.0033817291259765625, -0.0018091201782226562, 0.0645751953125, -0.043182373046875, -0.05914306640625, -0.048828125, 0.015838623046875, 0.0053253173828125, -0.0291290283203125, -0.0350341796875, -0.0269775390625, -0.035064697265625, -0.0162506103515625, 0.00887298583984375, 0.024688720703125, 0.01922607421875, -0.0204925537109375, -0.04327392578125, -0.00092315673828125, -0.01178741455078125, -0.0274200439453125, 0.0369873046875, -0.010467529296875, 0.037384033203125, 0.0190887451171875, 0.0018033981323242188, -0.00433349609375, -0.037994384765625, 0.07061767578125, -0.007221221923828125, -0.0589599609375, 0.0312347412109375, 0.027587890625, 0.05023193359375, -0.0035400390625, 0.0028133392333984375, 0.056976318359375, 0.029510498046875, -0.00901031494140625, 0.0201873779296875, -0.0237579345703125, -0.05926513671875, -0.01529693603515625, -0.015838623046875, -0.022613525390625, 0.04217529296875, 0.01256561279296875, -0.0225830078125, 0.040191650390625, 0.002002716064453125, -0.01305389404296875, 0.006458282470703125, -0.01342010498046875, 0.022247314453125, -0.0183868408203125, -0.004558563232421875, 0.01971435546875, 0.00791168212890625, -0.012847900390625, -0.05426025390625, -0.0241851806640625, 0.0166778564453125, -0.050994873046875, 0.0703125, -0.00650787353515625, 0.049957275390625, 0.0112762451171875, -0.08160400390625, 0.01551055908203125, -0.03662109375, 0.0076141357421875, 0.0128936767578125, -0.024993896484375, 0.00791168212890625, 0.0243072509765625, 0.006565093994140625, 0.050933837890625, 0.02655029296875, 0.0478515625, 0.057159423828125, -0.0262451171875, -0.0275115966796875, -0.02685546875, -0.050689697265625, 0.006389617919921875, 0.05133056640625, 0.051483154296875, 0.0215606689453125, -0.003620147705078125, -0.00829315185546875, 0.03314208984375, -0.0693359375, 0.00916290283203125, -0.022705078125, -0.0011234283447265625, -0.0004940032958984375, 0.0129547119140625, -0.00402069091796875, 0.034027099609375, -0.06475830078125, 0.00270843505859375, 0.04718017578125, -0.043853759765625, -0.04931640625, 0.0303955078125, -0.01322174072265625, 0.01739501953125, -0.038055419921875, -0.0091552734375, -0.008148193359375, 0.0200958251953125, -0.0286712646484375, -0.0061187744140625, -0.01380157470703125, -0.01497650146484375, -0.00234222412109375, 0.0416259765625, -0.0330810546875, -0.00907135009765625, 0.025543212890625, 0.04852294921875, 0.0013275146484375, -0.04296875, -0.01421356201171875, 0.00859832763671875, 0.033477783203125, -0.00530242919921875, 0.061279296875, -0.020111083984375, -0.019134521484375, -0.01485443115234375, -0.010009765625, -0.01549530029296875, -0.0218963623046875, 0.045989990234375, 0.01129150390625, 0.0513916015625, -0.0206756591796875, -0.031829833984375, 0.0357666015625, -0.00014102458953857422, -0.0535888671875, 0.03155517578125, 0.00008761882781982422, 0.007568359375, -0.006076812744140625, 0.025787353515625, 0.04693603515625, -0.0061798095703125, 0.0006055831909179688, 0.0184173583984375, -0.034637451171875, 0.03692626953125, 0.00720977783203125, 0.00008606910705566406, -0.03704833984375, -0.038970947265625, -0.038604736328125, 0.019744873046875, 0.0201416015625, -0.00797271728515625, -0.033538818359375, -0.017242431640625, 0.0227813720703125, -0.0950927734375, -0.0838623046875, -0.0122528076171875, -0.03887939453125, 0.034759521484375, -0.023681640625, -0.0025005340576171875, -0.0172882080078125, -0.002498626708984375, 0.00800323486328125, -0.006061553955078125, 0.00016009807586669922, -0.03277587890625, -0.04290771484375, -0.040924072265625, -0.006832122802734375, -0.010284423828125, -0.00919342041015625, -0.007617950439453125, 0.01529693603515625, 0.0013933181762695312, -0.035980224609375, -0.001598358154296875, 0.0262603759765625, -0.0139312744140625, -0.009521484375, -0.0035457611083984375, 0.007495880126953125, 0.028411865234375, 0.00714874267578125, -0.046539306640625, 0.018951416015625, -0.00006651878356933594, -0.036773681640625, 0.019195556640625, -0.025360107421875, 0.00533294677734375, 0.0482177734375, -0.020263671875, -0.0550537109375, 0.01369476318359375, -0.08251953125, 0.0167388916015625, 0.025146484375, -0.0129241943359375, -0.004329681396484375, 0.0007219314575195312, -0.047943115234375, 0.017974853515625, -0.006927490234375, 0.0164947509765625, -0.00015354156494140625, 0.0277862548828125, 0.00695037841796875, -0.00945281982421875, -0.0178680419921875, 0.00572967529296875, -0.0274505615234375, 0.036102294921875, -0.00844573974609375, -0.006031036376953125, 0.0019168853759765625, 0.01446533203125, 0.00826263427734375, -0.038543701171875, -0.0269775390625, 0.003391265869140625, 0.039215087890625, 0.01560211181640625, -0.0003190040588378906, 0.00716400146484375, -0.0283355712890625, 0.004871368408203125, 0.0250701904296875, -0.014678955078125, -0.0276336669921875, -0.013885498046875, 0.0218048095703125, -0.050506591796875, -0.046478271484375, 0.0294342041015625, -0.005809783935546875, -0.03179931640625, -0.0086212158203125, -0.047393798828125, 0.0177764892578125, 0.017913818359375, 0.032958984375, 0.048583984375, -0.061859130859375, 0.02447509765625, -0.044525146484375, 0.0037670135498046875, -0.0003662109375, -0.002162933349609375, -0.0408935546875, -0.006412506103515625, -0.031341552734375, -0.059478759765625, -0.0014467239379882812, -0.0667724609375, 0.049774169921875, 0.033905029296875, -0.00707244873046875, -0.006786346435546875, 0.028961181640625, -0.0088653564453125, -0.032440185546875, 0.0013551712036132812, 0.0009450912475585938, -0.0306243896484375, 0.049224853515625, -0.0016841888427734375, -0.0015659332275390625, 0.006687164306640625, 0.016265869140625, -0.034332275390625, 0.00867462158203125, -0.0225372314453125, -0.04327392578125, 0.0221099853515625, -0.05206298828125, -0.07830810546875, -0.0152435302734375, 0.0295562744140625, 0.0165252685546875, -0.038665771484375, 0.05767822265625, -0.014923095703125, -0.06561279296875, 0.01361083984375, -0.0313720703125, 0.0040130615234375, 0.01389312744140625, 0.057373046875, 0.017333984375, -0.002040863037109375, 0.00751495361328125, 0.0141448974609375, -0.012237548828125, -0.0220947265625, 0.0748291015625, 0.002079010009765625, 0.0311431884765625, 0.034637451171875, -0.047119140625, 0.021270751953125, 0.0302276611328125, -0.005950927734375, 0.0311431884765625, -0.0244598388671875, 0.0282135009765625, 0.049163818359375, -0.0821533203125, -0.0179443359375, -0.01837158203125, 0.031829833984375, 0.05035400390625, -0.0298919677734375, -0.03228759765625, 0.0304718017578125, 0.0230712890625, -0.02337646484375, 0.007221221923828125, -0.0345458984375, 0.01358795166015625, 0.0192108154296875, -0.00965118408203125, -0.023468017578125, -0.0161590576171875, 0.0165863037109375, 0.0242919921875, 0.0012598037719726562, -0.00023448467254638672, 0.0285797119140625, 0.0208587646484375, 0.0167999267578125, 0.0192108154296875, 0.01035308837890625, 0.0255584716796875, -0.02471923828125, -0.02862548828125, -0.053131103515625, 0.0191192626953125, 0.0000883936882019043, 0.02703857421875, 0.0292510986328125, 0.00901031494140625, -0.006023406982421875, -0.0014314651489257812, 0.00452423095703125, 0.0279693603515625, 0.0023097991943359375, -0.00931549072265625, 0.0587158203125, 0.001361846923828125, 0.02496337890625, -0.06170654296875, 0.118408203125, 0.0142059326171875, 0.026824951171875, -0.016357421875, -0.0269927978515625, -0.02996826171875, 0.07733154296875, 0.0416259765625, -0.0782470703125, -0.01561737060546875, 0.08160400390625, 0.001251220703125, -0.0225677490234375, 0.006374359130859375, 0.032135009765625, 0.0169525146484375, 0.016876220703125, 0.0100555419921875, 0.0008869171142578125, 0.00726318359375, -0.016510009765625, 0.030303955078125, 0.042266845703125, -0.03570556640625, -0.005176544189453125, 0.016265869140625, 0.01232147216796875, 0.0233154296875, 0.004894256591796875, 0.01165008544921875, 0.005382537841796875, 0.042510986328125, -0.006198883056640625, 0.006744384765625, 0.00948333740234375, 0.0013437271118164062, -0.00861358642578125, -0.01427459716796875, -0.028564453125, 0.0136260986328125, -0.0018167495727539062, -0.0027828216552734375, -0.0190277099609375, 0.011993408203125, 0.008636474609375, -0.0166168212890625, -0.0379638671875, 0.0255584716796875, -0.036346435546875, 0.0112457275390625, 0.0169525146484375, -0.03314208984375, -0.01434326171875, -0.025604248046875, -0.03326416015625, -0.03363037109375, 0.005207061767578125, -0.005016326904296875, -0.02447509765625, 0.0077362060546875, -0.018463134765625, 0.0338134765625, -0.019439697265625, 0.00243377685546875, 0.01065826416015625, -0.0093841552734375, -0.036865234375, 0.0272979736328125, -0.035614013671875, 0.07196044921875, 0.01003265380859375, -0.008209228515625, -0.011871337890625, 0.020477294921875, 0.0025310516357421875, 0.0171966552734375, -0.0207061767578125, -0.0271453857421875, 0.016326904296875, 0.01111602783203125, 0.02349853515625, 0.0025177001953125, 0.041351318359375, 0.0004439353942871094, 0.032318115234375, 0.01238250732421875, -0.001434326171875, -0.0009512901306152344, -0.004650115966796875, 0.03607177734375, 0.022003173828125, 0.07061767578125, -0.050567626953125, 0.0134429931640625, -0.0029048919677734375, 0.016693115234375, 0.0347900390625, -0.05975341796875, 0.017913818359375, 0.050018310546875, -0.0188446044921875, 0.034820556640625, 0.03350830078125, -0.030181884765625, 0.00457763671875, 0.00861358642578125, -0.0239105224609375, -0.01495361328125, 0.015899658203125, -0.065673828125, -0.0294952392578125, 0.0302734375, 0.003658294677734375, -0.032257080078125, 0.0173492431640625, 0.0005774497985839844, 0.0174102783203125, -0.003238677978515625, 0.041595458984375, -0.0343017578125, 0.03192138671875, 0.0176544189453125, -0.0106201171875, 0.006656646728515625, -0.026275634765625, 0.0291900634765625, -0.0091705322265625, 0.06103515625, 0.0158538818359375, 0.002948760986328125, 0.0284576416015625, -0.03021240234375, -0.017913818359375, -0.03131103515625, -0.01409149169921875, 0.01053619384765625, -0.016632080078125, 0.06805419921875, -0.011138916015625, 0.034210205078125, -0.006008148193359375, 0.02423095703125, 0.007076263427734375, -0.03729248046875, -0.03900146484375, 0.007747650146484375, 0.0212249755859375, -0.039947509765625, -0.00528717041015625, -0.04022216796875, 0.06561279296875, 0.042388916015625, -0.01158905029296875, -0.00856781005859375, 0.005535125732421875, 0.033355712890625, 0.048309326171875, -0.0265960693359375, 0.019378662109375, 0.07049560546875, -0.0718994140625, 0.0169830322265625, 0.0025005340576171875, -0.0027008056640625, 0.01361846923828125, -0.00775146484375, 0.01470184326171875, -0.0249176025390625, -0.0078582763671875, 0.061981201171875, -0.0103912353515625, -0.03436279296875, -0.033538818359375, 0.046417236328125, -0.0726318359375, -0.041107177734375, -0.00025534629821777344, -0.02825927734375, 0.0063323974609375, -0.0258331298828125, -0.035491943359375, 0.12054443359375, -0.0117034912109375, -0.01541900634765625, 0.0242767333984375, 0.0614013671875, -0.042022705078125, 0.0235137939453125, -0.020233154296875, 0.057586669921875, -0.048614501953125, 0.042755126953125, -0.033447265625, 0.002361297607421875, 0.024810791015625, 0.026519775390625, 0.015106201171875, 0.008392333984375, 0.0120849609375, -0.00899505615234375, -0.021331787109375, -0.01336669921875, -0.054290771484375, 0.0259552001953125, 0.0213165283203125, -0.013641357421875, 0.0027446746826171875, 0.01442718505859375, 0.0280914306640625, -0.03564453125, 0.005344390869140625, 0.054473876953125, 0.001888275146484375, -0.0199432373046875, -0.0018863677978515625, 0.04937744140625, -0.044158935546875, 0.0106353759765625, 0.0229949951171875, 0.01114654541015625, -0.029022216796875, 0.034912109375, -0.0290985107421875, -0.004604339599609375, -0.00296783447265625, -0.029327392578125, 0.0169219970703125, -0.034881591796875, -0.00714874267578125, 0.00733184814453125, 0.00850677490234375, 0.01513671875, -0.0185546875, -0.027801513671875, -0.0012865066528320312, 0.00991058349609375, 0.063232421875, 0.051300048828125, 0.034210205078125, -0.022735595703125, -0.03704833984375, 0.040435791015625, 0.09088134765625, -0.036285400390625, -0.006031036376953125, 0.004863739013671875, 0.033538818359375, 0.0185394287109375, -0.0227508544921875, 0.046417236328125, 0.0255126953125, 0.03814697265625, 0.0262451171875, -0.0248870849609375, 0.01538848876953125, 0.01044464111328125, 0.0199127197265625, 0.0242462158203125, -0.00438690185546875, -0.0018329620361328125, -0.04217529296875, 0.0016260147094726562, 0.0017185211181640625, 0.04022216796875, 0.01708984375, 0.02593994140625, 0.0017023086547851562, -0.0196380615234375, 0.007366180419921875, 0.0116729736328125, 0.0060882568359375, -0.00203704833984375, -0.02001953125, -0.0226898193359375, 0.015960693359375, 0.0246429443359375, 0.004421234130859375, 0.0146331787109375, 0.037628173828125, 0.040283203125, -0.031524658203125, -0.004344940185546875, 0.034088134765625, -0.02264404296875, -0.0185546875, -0.00567626953125, 0.01110076904296875, -0.00103759765625, -0.0030117034912109375, 0.0206756591796875, 0.03485107421875, 0.0015239715576171875, -0.038238525390625, 0.01654052734375, -0.0105133056640625, -0.039215087890625, 0.058837890625, 0.023590087890625, 0.09747314453125, -0.007366180419921875, -0.022064208984375, 0.0003924369812011719, -0.04266357421875, -0.0237274169921875, 0.023223876953125, 0.03814697265625, 0.004528045654296875, 0.0126190185546875, 0.05633544921875, -0.0192413330078125, 0.01334381103515625, 0.00975799560546875, 0.023529052734375, -0.00543975830078125, 0.0250091552734375, 0.01073455810546875, -0.024261474609375, -0.023895263671875, -0.031280517578125, 0.052459716796875, 0.01824951171875, 0.0229949951171875, -0.02734375, 0.0335693359375, 0.020294189453125, 0.01324462890625, -0.013458251953125, 0.00616455078125, -0.002536773681640625, -0.00673675537109375, 0.0186614990234375, -0.01690673828125, 0.00641632080078125, 0.006214141845703125, 0.0124664306640625, -0.0214691162109375, -0.031829833984375, -0.00687408447265625, 0.03082275390625, 0.031463623046875, 0.05950927734375, -0.0308074951171875, -0.04534912109375, -0.055511474609375, 0.00618743896484375, 0.035369873046875, 0.029510498046875, -0.02471923828125, -0.01059722900390625, -0.02752685546875, -0.047027587890625, 0.0125885009765625, -0.0194549560546875, -0.0291290283203125, 0.0035552978515625, 0.00725555419921875, 0.03131103515625, -0.0279998779296875, -0.02276611328125, 0.0214080810546875, 0.004360198974609375, -0.01042938232421875, -0.02362060546875, 0.00791168212890625, -0.0018587112426757812, -0.029632568359375, 0.00396728515625, -0.0019054412841796875, -0.01549530029296875, -0.0025196075439453125, -0.01219940185546875, -0.052581787109375, -0.019256591796875, -0.0033321380615234375, -0.0511474609375, -0.006290435791015625, 0.01448822021484375, -0.0187835693359375, 0.00677490234375, 0.020294189453125, 0.01398468017578125, 0.032958984375, -0.0074920654296875, -0.04998779296875, 0.012908935546875, -0.0404052734375, 0.06256103515625, -0.01617431640625, 0.03466796875, -0.0251617431640625, -0.00333404541015625, -0.0318603515625, -0.0355224609375, -0.02435302734375, 0.049224853515625, -0.00838470458984375, 0.00592803955078125, 0.01500701904296875, -0.00433349609375, -0.04046630859375, 0.0479736328125, -0.006191253662109375, 0.08599853515625, 0.0082550048828125, -0.0113525390625, 0.026702880859375, -0.004314422607421875, -0.031585693359375, -0.05078125, 0.0220184326171875, -0.0992431640625, -0.02423095703125, -0.039703369140625, 0.0287322998046875, 0.02618408203125, -0.042877197265625, -0.10113525390625, 0.05206298828125, -0.0289764404296875, -0.03302001953125, -0.072509765625, 0.006664276123046875, 0.03973388671875, -0.02117919921875, -0.04083251953125, -0.01416778564453125, -0.08837890625, -0.0080413818359375, 0.01183319091796875, -0.02459716796875, 0.0572509765625, -0.01043701171875, -0.0218658447265625, -0.0079803466796875, 0.015869140625, -0.0227508544921875, -0.01953125, -0.0010843276977539062, 0.01531219482421875, 0.05853271484375, -0.00492095947265625, -0.037139892578125, 0.010101318359375, -0.049285888671875, 0.0110626220703125, 0.016998291015625, -0.0035648345947265625, 0.01088714599609375, 0.0823974609375, -0.0165252685546875, 0.029052734375, -0.0165557861328125, -0.0033588409423828125, -0.03509521484375, 0.00531768798828125, -0.0290069580078125, 0.00647735595703125, -0.06060791015625, -0.01849365234375, 0.000013530254364013672, -0.015960693359375, -0.0293731689453125, 0.0139923095703125, -0.029937744140625, -0.0116424560546875, 0.013519287109375, -0.027008056640625, 0.0090179443359375, -0.0675048828125, 0.09423828125, -0.037017822265625, -0.001361846923828125, 0.060333251953125, 0.026641845703125, 0.046722412109375, 0.07427978515625, -0.041290283203125, 0.0159454345703125, 0.004741668701171875, 0.0225830078125, -0.0002460479736328125, 0.024810791015625, -0.00951385498046875, 0.0240936279296875, -0.0001672506332397461, 0.007030487060546875, -0.00726318359375, 0.032684326171875, 0.036529541015625, 0.0032939910888671875, -0.00887298583984375, -0.0200042724609375, -0.053466796875, 0.0273284912109375, -0.0279998779296875, 0.0101165771484375, 0.005641937255859375, 0.0301513671875, 0.08428955078125, -0.0131988525390625, 0.0295257568359375, 0.035186767578125, 0.01128387451171875, 0.026611328125, -0.0096282958984375, 0.0031604766845703125, 0.0100555419921875, -0.0140380859375 ]
dfae21773c458b4d011689330b637d6fadbb06ae
Wordpress Stackexchange Q: Is there any global functions.php file which works for any theme? Is there some global kind of functions.php file that works for any theme? The problem is here: When I change a functions.php file in any theme, I need to take care of two changes: First, I need to take care of the updates of that theme. Second, I need to take care of changing the theme of the site. So, instead of making changes in the functions.php of a theme, is it possible to make changes in some functions.php file that is independent of any theme? A: Well that is a real problem and many peoples facing it when they change theme but there is a simple solutions. add that function to a new page not functions.php and give it a unique name for example yousitename+timestamp or whatever you want but unique create folder of same name zipped it and upload it as a plugin so it will surely works until you disable it. To understand which plugin is for what don't miss to give name to that plugin like : /* Plugin Name: XYZ */
Q: Is there any global functions.php file which works for any theme? Is there some global kind of functions.php file that works for any theme? The problem is here: When I change a functions.php file in any theme, I need to take care of two changes: First, I need to take care of the updates of that theme. Second, I need to take care of changing the theme of the site. So, instead of making changes in the functions.php of a theme, is it possible to make changes in some functions.php file that is independent of any theme? A: Well that is a real problem and many peoples facing it when they change theme but there is a simple solutions. add that function to a new page not functions.php and give it a unique name for example yousitename+timestamp or whatever you want but unique create folder of same name zipped it and upload it as a plugin so it will surely works until you disable it. To understand which plugin is for what don't miss to give name to that plugin like : /* Plugin Name: XYZ */ A: As an addition to @MBTheDeveloper answer. Other options would be: * *Create a child theme for your current theme and use the functions.php file from this one (this is "best practice"). *Use include in your themes function php file and load a custom-function.php file that contains your custom code. A: Don't make your site specific changes in the theme's functions.php file. Instead, create a site-specific plugin. I like to use the site's domain name, like "ottopress.com". Then put your snippets into that plugin and leave it active on that site only. Alternatively, when you have a snippet of related changes, create a specific plugin for just them. That gives you the option to turn on/off related bits of code as needed. A: Some Explanation First you need to understand the purpose of functions.php in a theme. Functions.php is basically just a plugin file with out any name which if present is automatically loaded by Wordpress. Wordpress loads your current theme's function.php for wordpress front-end pages and as well as back-end (admin) pages. There is no different between a plugin and functions.php except that plugins have name and they can be activated/de-activated irrespective of other plugins and themes. The funtions.php is attached with your current theme and if you switch to another theme Wordpress uses new theme's functions.php and not your old functions.php with custom modifications. Theme updates also overwrite functions.php and there is not way to avoid it, even if you put your custom modifictions in separate code files and include it in your fucntions.php, you will have to add that include line after every update. Generally the type of code that should go in functions.php: * *functions that are used in your theme's template files. *theme options *sidebars *navigation menus *post formats *post thumbnails *any code that is only related to the current theme. As you want to retain your custom modifications even if you switch themes. Because child theme will not work in this case as you will switch the theme and the functions.php of the child theme will not be used. The Solution The only solution as recommended by @Otto is to create a plugin file. The approach you can take to create your site specific plugin is to create a folder with your sitename in 'wp-content/plugins' and create plugin files in it. Why plugin files? and not single plugin file. Group related site's functionality related to code in separate plugin files and don't forget to add the plugin header in all your plugin files so they are recognized by Wordpress as separate plugins. You will then have the ability to activate/de-activate different features/functionality of your site without breaking everything. A: The difference between theme and non-theme code is organizational rather than technical. Any code that is active contributes to resulting environment, does not matter where it is loaded from. There is number of places where code gets loaded from, which are not part of WordPress core: * *wp-config.php configuration file *active theme (and its parent in for child themes) *active plugins *must use plugins *drop-ins (these are somewhat advanced and serve very specific purposes) Typical place for your own code, that should not be part of theme, is to create a plugin. Other approaches do not have benefits from generic case, but forfeit interface (managing through admin area) and technical (activation/deactivation/uninstall events) conveniences of normal plugin.
wordpress
{ "language": "en", "length": 749, "provenance": "stackexchange_00019.jsonl.gz:413700", "question_score": "11", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30614" }
[ 0.044036865234375, -0.003833770751953125, -0.01824951171875, -0.0256500244140625, -0.0009670257568359375, -0.029754638671875, 0.021240234375, 0.00569915771484375, 0.01342010498046875, 0.0013904571533203125, -0.0184173583984375, 0.0205535888671875, -0.0154571533203125, -0.0236358642578125, 0.00975799560546875, -0.0247955322265625, 0.04925537109375, -0.016998291015625, 0.013336181640625, -0.01245880126953125, 0.01177978515625, 0.03985595703125, -0.00972747802734375, 0.10650634765625, 0.03155517578125, -0.0026378631591796875, 0.036346435546875, 0.01520538330078125, -0.0027675628662109375, -0.0091400146484375, 0.01873779296875, -0.0139923095703125, 0.0008244514465332031, 0.05865478515625, -0.040435791015625, -0.0166473388671875, -0.0069732666015625, 0.02569580078125, 0.0110015869140625, 0.01788330078125, 0.039520263671875, -0.0177459716796875, -0.0217742919921875, 0.08392333984375, -0.004947662353515625, -0.09637451171875, 0.061004638671875, -0.04705810546875, -0.0243988037109375, 0.0067596435546875, 0.019805908203125, 0.009765625, 0.036895751953125, 0.0008883476257324219, 0.01483917236328125, 0.00933074951171875, -0.03363037109375, 0.041168212890625, 0.0231170654296875, -0.0038967132568359375, -0.017303466796875, -0.0033054351806640625, 0.016204833984375, 0.0015840530395507812, -0.014251708984375, -0.01062774658203125, -0.028289794921875, 0.0235443115234375, -0.049896240234375, -0.0086822509765625, 0.041412353515625, -0.0301513671875, 0.0007143020629882812, 0.01184844970703125, -0.0010204315185546875, -0.0296478271484375, 0.01641845703125, -0.00855255126953125, 0.0132293701171875, 0.015533447265625, -0.01044464111328125, -0.0413818359375, -0.00560760498046875, -0.041656494140625, 0.0220794677734375, 0.005382537841796875, -0.005184173583984375, 0.0131988525390625, -0.047088623046875, -0.0168914794921875, -0.0301513671875, -0.00006341934204101562, -0.0780029296875, 0.0025997161865234375, 0.020904541015625, -0.01038360595703125, 0.01403045654296875, 0.040771484375, -0.044525146484375, 0.003879547119140625, 0.017120361328125, -0.035064697265625, 0.05230712890625, -0.0401611328125, -0.01100921630859375, 0.0966796875, 0.048431396484375, 0.006877899169921875, -0.0217437744140625, -0.02056884765625, 0.016632080078125, -0.0196380615234375, 0.0196380615234375, -0.031982421875, -0.0018415451049804688, 0.0082550048828125, -0.0185546875, 0.0244903564453125, 0.0185394287109375, 0.0142364501953125, 0.031341552734375, 0.030181884765625, 0.022369384765625, -0.0015621185302734375, -0.0084228515625, -0.026702880859375, -0.046142578125, -0.0390625, 0.0033512115478515625, 0.01416015625, -0.0567626953125, 0.00402069091796875, 0.0855712890625, 0.016265869140625, 0.00528717041015625, -0.0247344970703125, 0.004749298095703125, -0.02294921875, 0.0017251968383789062, 0.0166473388671875, 0.0241241455078125, -0.053680419921875, -0.0256195068359375, 0.040679931640625, 0.0224456787109375, 0.00823974609375, 0.0265045166015625, 0.0256500244140625, -0.01508331298828125, -0.037872314453125, 0.042938232421875, 0.00884246826171875, 0.0253753662109375, -0.006595611572265625, -0.0012102127075195312, -0.0162506103515625, 0.01091766357421875, -0.01180267333984375, -0.0035858154296875, 0.003002166748046875, 0.0009288787841796875, -0.04864501953125, -0.04583740234375, 0.019073486328125, -0.01464080810546875, 0.05462646484375, 0.003993988037109375, 0.0183868408203125, 0.0182647705078125, 0.0202484130859375, 0.0138092041015625, 0.023468017578125, 0.039459228515625, 0.0214385986328125, -0.005619049072265625, 0.001434326171875, -0.0322265625, 0.01363372802734375, 0.01983642578125, 0.014373779296875, -0.014312744140625, -0.0489501953125, 0.015533447265625, -0.011932373046875, -0.08233642578125, 0.024810791015625, 0.0056610107421875, 0.056549072265625, 0.0384521484375, 0.01271820068359375, 0.04046630859375, -0.003910064697265625, 0.0128326416015625, 0.0073699951171875, 0.00037407875061035156, 0.007381439208984375, -0.0193328857421875, 0.041839599609375, -0.0171661376953125, -0.04827880859375, 0.0029697418212890625, 0.004245758056640625, 0.00565338134765625, -0.0218353271484375, -0.054718017578125, -0.0134124755859375, -0.0159759521484375, 0.03863525390625, 0.0261993408203125, 0.0303802490234375, -0.0119781494140625, 0.01129913330078125, -0.014251708984375, -0.020721435546875, -0.0248260498046875, 0.036163330078125, -0.019195556640625, 0.03057861328125, -0.00360107421875, 0.059906005859375, -0.0304412841796875, -0.00785064697265625, -0.0374755859375, -0.0249786376953125, -0.0171356201171875, 0.0223541259765625, -0.047393798828125, 0.0025119781494140625, -0.06707763671875, 0.011474609375, -0.021087646484375, 0.054718017578125, 0.0044097900390625, 0.04266357421875, -0.0070648193359375, -0.017303466796875, -0.017242431640625, -0.056396484375, 0.007167816162109375, 0.034637451171875, 0.036102294921875, 0.00742340087890625, -0.0164642333984375, -0.01374053955078125, 0.038604736328125, -0.0212554931640625, 0.0165252685546875, -0.015411376953125, 0.0089874267578125, 0.0181427001953125, -0.00439453125, -0.0179443359375, 0.0230255126953125, -0.07635498046875, 0.016693115234375, 0.0269317626953125, -0.0304412841796875, 0.00765228271484375, -0.01165771484375, 0.011749267578125, -0.01306915283203125, -0.03570556640625, -0.00286102294921875, -0.0335693359375, 0.00582122802734375, -0.00922393798828125, -0.0130615234375, -0.01351165771484375, -0.0207977294921875, -0.0084381103515625, 0.042999267578125, 0.006778717041015625, -0.01556396484375, 0.0298614501953125, 0.027435302734375, 0.0269012451171875, -0.04034423828125, 0.0029125213623046875, -0.019989013671875, 0.028717041015625, -0.028533935546875, -0.0106658935546875, -0.039581298828125, -0.0106658935546875, 0.009521484375, -0.037933349609375, 0.023834228515625, 0.00713348388671875, 0.007144927978515625, -0.017181396484375, -0.0015611648559570312, 0.02960205078125, -0.049346923828125, 0.05859375, -0.000812530517578125, -0.027069091796875, -0.00875091552734375, -0.059417724609375, 0.034454345703125, -0.05010986328125, 0.01446533203125, 0.06640625, 0.0167388916015625, -0.01473236083984375, 0.01088714599609375, -0.002513885498046875, 0.0211029052734375, -0.00656890869140625, -0.0017499923706054688, 0.0298614501953125, -0.056488037109375, 0.0018177032470703125, 0.0036945343017578125, 0.031982421875, -0.0256805419921875, -0.07440185546875, -0.022918701171875, 0.0003552436828613281, -0.1004638671875, -0.0635986328125, -0.047088623046875, -0.04052734375, 0.0168914794921875, -0.00519561767578125, -0.004955291748046875, 0.0009050369262695312, -0.0001596212387084961, 0.02593994140625, 0.0238189697265625, -0.0394287109375, -0.0231170654296875, -0.0273590087890625, -0.07659912109375, -0.01053619384765625, 0.0157928466796875, 0.0164794921875, -0.0147705078125, 0.08837890625, 0.012054443359375, -0.055511474609375, -0.015411376953125, 0.06396484375, -0.00000768899917602539, 0.0005936622619628906, 0.04998779296875, -0.06390380859375, 0.0015506744384765625, 0.00408172607421875, 0.02838134765625, 0.042510986328125, -0.04644775390625, 0.0003361701965332031, 0.00572967529296875, -0.00807952880859375, 0.00550079345703125, 0.059814453125, -0.007503509521484375, -0.032867431640625, -0.0026340484619140625, -0.068603515625, -0.050994873046875, 0.0243377685546875, -0.038421630859375, 0.07342529296875, 0.01320648193359375, -0.036895751953125, 0.0136566162109375, 0.02642822265625, 0.0186004638671875, 0.0232696533203125, -0.0042877197265625, 0.00888824462890625, 0.006381988525390625, 0.00778961181640625, 0.0196685791015625, 0.0005097389221191406, 0.01529693603515625, -0.0148773193359375, -0.021759033203125, -0.0000889897346496582, 0.0034027099609375, 0.0084228515625, 0.01348876953125, 0.0037937164306640625, -0.01486968994140625, 0.00836944580078125, 0.00028204917907714844, 0.0288848876953125, -0.013519287109375, -0.01239013671875, -0.014923095703125, 0.05181884765625, -0.025390625, -0.0036487579345703125, 0.01861572265625, 0.01666259765625, -0.04791259765625, -0.030517578125, -0.06640625, -0.00991058349609375, -0.055328369140625, -0.00030112266540527344, -0.0021762847900390625, -0.0102691650390625, 0.001186370849609375, 0.060791015625, -0.0081787109375, -0.026153564453125, 0.0081939697265625, 0.0122833251953125, 0.004695892333984375, 0.00933074951171875, -0.00818634033203125, 0.012725830078125, 0.0188751220703125, -0.0224456787109375, -0.049041748046875, -0.0109405517578125, -0.02496337890625, 0.049346923828125, 0.03875732421875, -0.052337646484375, -0.0020999908447265625, 0.025054931640625, 0.022064208984375, 0.040496826171875, 0.00007593631744384766, -0.0187225341796875, 0.0374755859375, -0.00524139404296875, 0.0173187255859375, -0.004886627197265625, -0.039215087890625, 0.02532958984375, -0.01461029052734375, 0.07440185546875, 0.02874755859375, -0.035430908203125, 0.06591796875, -0.052398681640625, -0.0150604248046875, 0.024871826171875, -0.006916046142578125, 0.0311431884765625, -0.0010728836059570312, -0.005680084228515625, 0.007350921630859375, -0.037750244140625, 0.03802490234375, 0.0219879150390625, -0.03302001953125, 0.0181884765625, 0.0638427734375, 0.0185089111328125, -0.0285491943359375, -0.1063232421875, 0.0026397705078125, 0.038330078125, 0.01107025146484375, 0.0177154541015625, -0.032073974609375, -0.036163330078125, 0.0614013671875, 0.00693511962890625, 0.0181121826171875, -0.0439453125, 0.0411376953125, -0.00583648681640625, -0.006984710693359375, 0.00811004638671875, -0.021514892578125, 0.057586669921875, 0.006603240966796875, -0.00818634033203125, -0.029266357421875, -0.02642822265625, 0.049163818359375, 0.006999969482421875, 0.0396728515625, -0.047332763671875, -0.027801513671875, 0.0035991668701171875, -0.02691650390625, 0.0291900634765625, 0.002819061279296875, 0.003078460693359375, 0.0242462158203125, 0.0428466796875, 0.003528594970703125, 0.039459228515625, 0.06915283203125, -0.02008056640625, 0.022369384765625, 0.047698974609375, -0.01067352294921875, -0.0242462158203125, -0.01335906982421875, 0.062286376953125, 0.00963592529296875, -0.0212554931640625, -0.006511688232421875, -0.0247650146484375, -0.026763916015625, 0.0003380775451660156, -0.0229949951171875, 0.04583740234375, 0.037567138671875, -0.031402587890625, -0.01190185546875, -0.01873779296875, -0.00885772705078125, -0.044769287109375, 0.0345458984375, 0.0241546630859375, -0.02685546875, 0.0057220458984375, 0.01090240478515625, 0.01358795166015625, -0.0071563720703125, -0.0120086669921875, 0.00807952880859375, 0.012451171875, 0.0039215087890625, 0.01253509521484375, 0.00907135009765625, -0.0006661415100097656, -0.0102996826171875, 0.0176849365234375, 0.006305694580078125, -0.01003265380859375, -0.009033203125, -0.0252532958984375, 0.01190185546875, 0.036041259765625, 0.0111083984375, 0.0273590087890625, -0.0180511474609375, 0.031890869140625, 0.0245208740234375, -0.029693603515625, -0.0015211105346679688, 0.0193328857421875, 0.02496337890625, -0.004383087158203125, 0.00553131103515625, -0.010467529296875, -0.028961181640625, -0.039337158203125, 0.0103759765625, -0.050537109375, -0.0013141632080078125, 0.020660400390625, -0.0528564453125, -0.01525115966796875, -0.0140228271484375, -0.05499267578125, -0.044769287109375, 0.00030541419982910156, -0.0092315673828125, 0.02764892578125, -0.01134490966796875, 0.037689208984375, -0.0191192626953125, -0.0289306640625, 0.0254669189453125, -0.0088348388671875, 0.07843017578125, 0.043670654296875, -0.114501953125, 0.003082275390625, -0.0035877227783203125, 0.001430511474609375, -0.0303802490234375, -0.042327880859375, -0.07122802734375, 0.00183868408203125, 0.007213592529296875, 0.0168609619140625, -0.0178680419921875, -0.036529541015625, 0.0044403076171875, 0.0164947509765625, 0.0255279541015625, 0.03466796875, -0.0254669189453125, 0.02313232421875, 0.01300048828125, 0.01523590087890625, -0.0030155181884765625, 0.0134735107421875, 0.0088958740234375, -0.03546142578125, 0.00887298583984375, -0.0013551712036132812, -0.0258941650390625, -0.039520263671875, -0.0143890380859375, 0.0160980224609375, 0.07659912109375, -0.0098419189453125, -0.0012197494506835938, -0.0281829833984375, -0.0017948150634765625, -0.00949859619140625, 0.0287628173828125, -0.0126800537109375, -0.024169921875, 0.0265045166015625, -0.044647216796875, -0.03155517578125, 0.0030612945556640625, -0.0200347900390625, 0.048919677734375, -0.0100555419921875, 0.0276641845703125, 0.03521728515625, -0.06988525390625, 0.058380126953125, 0.04095458984375, 0.019256591796875, 0.039764404296875, -0.00617218017578125, 0.0185546875, 0.01448822021484375, 0.02239990234375, 0.00165557861328125, 0.00579071044921875, 0.040069580078125, -0.006748199462890625, -0.039520263671875, -0.022308349609375, -0.034393310546875, -0.0159149169921875, 0.06207275390625, 0.052276611328125, -0.080810546875, 0.002101898193359375, 0.0263671875, 0.017578125, -0.006084442138671875, 0.005168914794921875, -0.046783447265625, -0.0386962890625, 0.037261962890625, -0.0440673828125, -0.018463134765625, 0.0269775390625, 0.0270843505859375, -0.006282806396484375, -0.026397705078125, 0.0621337890625, 0.00972747802734375, -0.025665283203125, 0.01210784912109375, 0.0007948875427246094, 0.00969696044921875, -0.0203094482421875, 0.005748748779296875, 0.0013303756713867188, -0.029571533203125, -0.048248291015625, 0.01238250732421875, 0.01605224609375, -0.00881195068359375, -0.044830322265625, -0.032440185546875, 0.0212249755859375, 0.036529541015625, -0.05633544921875, 0.00905609130859375, 0.01238250732421875, 0.031707763671875, -0.02960205078125, -0.0201568603515625, 0.033905029296875, 0.010101318359375, -0.0260772705078125, 0.0218658447265625, -0.0236663818359375, -0.042724609375, -0.0232696533203125, -0.0229339599609375, 0.07794189453125, -0.0106964111328125, -0.026885986328125, 0.007503509521484375, -0.0010309219360351562, -0.0106201171875, -0.0016193389892578125, 0.031463623046875, -0.07061767578125, -0.0253143310546875, 0.0256195068359375, 0.004947662353515625, -0.0215911865234375, 0.01186370849609375, -0.070556640625, 0.124755859375, -0.03662109375, 0.039794921875, -0.0021877288818359375, 0.040618896484375, -0.004932403564453125, 0.0270538330078125, -0.0158843994140625, 0.041107177734375, -0.03155517578125, 0.054229736328125, 0.0037364959716796875, 0.01507568359375, 0.0277862548828125, 0.010986328125, 0.006183624267578125, -0.007419586181640625, 0.0024242401123046875, 0.006580352783203125, 0.0421142578125, 0.04449462890625, 0.01029205322265625, 0.00717926025390625, -0.0214080810546875, -0.0013246536254882812, 0.00800323486328125, -0.0011453628540039062, 0.0274200439453125, -0.021392822265625, -0.032501220703125, 0.0152435302734375, 0.00923919677734375, -0.01202392578125, -0.007720947265625, -0.04412841796875, -0.0214080810546875, -0.005130767822265625, -0.0238800048828125, 0.05450439453125, -0.029052734375, 0.0240020751953125, -0.0176239013671875, -0.00859832763671875, -0.00911712646484375, -0.00799560546875, 0.032684326171875, -0.00616455078125, 0.01136016845703125, 0.0158843994140625, 0.0134735107421875, 0.00814056396484375, -0.04278564453125, -0.0017480850219726562, 0.0104522705078125, -0.03985595703125, 0.057708740234375, 0.029541015625, 0.0164794921875, -0.0382080078125, -0.027191162109375, 0.045623779296875, 0.07171630859375, -0.036834716796875, -0.038818359375, 0.00995635986328125, -0.00910186767578125, 0.0036602020263671875, 0.0179443359375, 0.0306549072265625, -0.0037384033203125, -0.0190887451171875, 0.0168609619140625, 0.0008854866027832031, 0.0170135498046875, -0.0024013519287109375, 0.019866943359375, 0.0252685546875, -0.028411865234375, 0.015472412109375, -0.0672607421875, 0.028289794921875, 0.03558349609375, 0.04901123046875, -0.0097503662109375, 0.088134765625, 0.0517578125, -0.0166473388671875, 0.010955810546875, 0.02508544921875, -0.038848876953125, -0.0016374588012695312, -0.053375244140625, -0.06439208984375, 0.0019702911376953125, 0.0447998046875, 0.0164794921875, 0.0173492431640625, 0.041046142578125, 0.0445556640625, -0.004665374755859375, 0.0018739700317382812, 0.0171051025390625, -0.0178985595703125, -0.0229034423828125, -0.0013189315795898438, -0.017791748046875, 0.0033626556396484375, -0.0096893310546875, -0.01800537109375, 0.04339599609375, 0.0031147003173828125, -0.0187225341796875, -0.0103759765625, 0.00485992431640625, -0.05999755859375, 0.0372314453125, 0.0002225637435913086, 0.10198974609375, 0.0183563232421875, -0.039703369140625, -0.0115203857421875, -0.054656982421875, -0.01548004150390625, 0.037139892578125, 0.0439453125, -0.007572174072265625, 0.0140380859375, 0.0062255859375, -0.004795074462890625, 0.0219879150390625, -0.028045654296875, 0.0008683204650878906, -0.01081085205078125, 0.01708984375, 0.0053558349609375, -0.0168304443359375, -0.03594970703125, -0.0273284912109375, 0.06878662109375, 0.018341064453125, 0.07171630859375, -0.051239013671875, 0.05108642578125, 0.02642822265625, -0.0007619857788085938, 0.00020778179168701172, 0.0022029876708984375, 0.0286865234375, -0.0208740234375, -0.00682830810546875, -0.01363372802734375, -0.0816650390625, 0.01346588134765625, 0.0268402099609375, -0.01285552978515625, 0.00858306884765625, 0.005748748779296875, 0.0220947265625, -0.0044097900390625, 0.007747650146484375, 0.009796142578125, -0.0089874267578125, 0.042083740234375, 0.0270233154296875, 0.008697509765625, 0.038299560546875, -0.018218994140625, 0.01259613037109375, 0.0233306884765625, -0.0271759033203125, 0.006015777587890625, 0.008209228515625, -0.00931549072265625, 0.031494140625, 0.0207061767578125, -0.0693359375, 0.00029015541076660156, -0.012969970703125, -0.0308074951171875, 0.02288818359375, 0.07177734375, -0.0335693359375, -0.00679779052734375, 0.00824737548828125, 0.0301361083984375, 0.0202789306640625, -0.031829833984375, 0.000576019287109375, 0.087646484375, -0.02703857421875, -0.02655029296875, -0.041778564453125, -0.01074981689453125, -0.01255035400390625, -0.00514984130859375, 0.0222930908203125, -0.007175445556640625, -0.0264434814453125, -0.01953125, 0.0258636474609375, 0.02984619140625, 0.01428985595703125, -0.08099365234375, 0.021881103515625, -0.0219879150390625, 0.091064453125, -0.0295562744140625, 0.0017557144165039062, -0.0055084228515625, 0.0306396484375, -0.0240936279296875, -0.0154266357421875, -0.04571533203125, 0.0025482177734375, -0.01593017578125, 0.02862548828125, 0.044403076171875, -0.02545166015625, 0.01348876953125, 0.06427001953125, 0.0460205078125, 0.11676025390625, -0.0218048095703125, -0.0247802734375, 0.0228271484375, -0.010589599609375, -0.0033283233642578125, -0.03485107421875, 0.0175323486328125, -0.056915283203125, -0.0123291015625, 0.003170013427734375, -0.0025310516357421875, 0.00972747802734375, -0.046600341796875, -0.07757568359375, -0.003017425537109375, 0.0092315673828125, -0.0479736328125, -0.04669189453125, -0.00698089599609375, 0.0175018310546875, -0.005645751953125, -0.0161895751953125, -0.01544952392578125, -0.048675537109375, 0.0226898193359375, 0.01523590087890625, 0.01513671875, 0.0188140869140625, 0.034210205078125, -0.0032062530517578125, 0.039337158203125, 0.0175018310546875, -0.0017251968383789062, 0.01053619384765625, -0.034149169921875, 0.0391845703125, 0.053009033203125, -0.0233154296875, -0.039398193359375, -0.0026683807373046875, -0.031585693359375, -0.0222625732421875, -0.004482269287109375, -0.0426025390625, -0.007598876953125, 0.09600830078125, 0.05230712890625, 0.0276641845703125, -0.0299530029296875, -0.0097198486328125, -0.004749298095703125, -0.00685882568359375, 0.00876617431640625, 0.01399993896484375, -0.041961669921875, -0.0027637481689453125, 0.004146575927734375, -0.03179931640625, 0.01435089111328125, -0.01175689697265625, -0.0357666015625, 0.0111846923828125, -0.005657196044921875, -0.0146331787109375, 0.01047515869140625, -0.0308837890625, 0.045989990234375, -0.0155792236328125, 0.032928466796875, -0.002765655517578125, 0.01788330078125, 0.04779052734375, 0.02880859375, 0.0235595703125, 0.02813720703125, -0.0165252685546875, 0.015869140625, 0.0107421875, 0.04718017578125, -0.01454925537109375, -0.036895751953125, -0.01268768310546875, 0.034576416015625, -0.00888824462890625, 0.0169525146484375, -0.01184844970703125, 0.053985595703125, 0.01165771484375, 0.07269287109375, 0.00022482872009277344, 0.0260467529296875, -0.0082550048828125, 0.041900634765625, -0.01398468017578125, -0.012786865234375, 0.01166534423828125, -0.078369140625, 0.01849365234375, 0.01201629638671875, 0.0275726318359375, -0.002197265625, 0.005947113037109375, -0.03460693359375, 0.0180206298828125, 0.00003844499588012695 ]
4d0e20938ebc0ea395e5f197f62424871651d0c5
Wordpress Stackexchange Q: Manually set global $post vars with an ID, in order to use template tags I have a function retrieving ID's of posts by very specific means. I need to be able to set the global $post in order to use functions like the_content(), which does not allow an ID as a parameter. How can I achieve this? A: When your going through your loop add this: global $post; $post = get_post( $ID, OBJECT ); setup_postdata( $post ); //Do something wp_reset_postdata();
Q: Manually set global $post vars with an ID, in order to use template tags I have a function retrieving ID's of posts by very specific means. I need to be able to set the global $post in order to use functions like the_content(), which does not allow an ID as a parameter. How can I achieve this? A: When your going through your loop add this: global $post; $post = get_post( $ID, OBJECT ); setup_postdata( $post ); //Do something wp_reset_postdata(); A: To work with posts outta loop try using: get_post(post_id) to get a post with a specific ID out of the loop,when you do this,the global object $post will hold the post which you'v just selected.Now you can get the content using : $post->post_content . check the get_post documentation on Wordpress Codex A: A solution that works for me is: * *global $post; before the loop *setup_postdata($post); inside the loop *wp_reset_postdata(); after the loop Take into account that the name of the variable must be $post A: You may use a one-liner to reset the global post object. setup_postdata( $GLOBALS['post'] =& $custom_post_object ); When you finish your template or loop be sure to reset the global post so you won't break other templates further down the stack. wp_reset_postdata(); Note: PHPCS with WordPress standards will complain about overriding the global post so if you're using the WordPress standards you'll need to disable it for the line like so: setup_postdata( $GLOBALS['post'] =& $post ); //phpcs:ignore
wordpress
{ "language": "en", "length": 244, "provenance": "stackexchange_00019.jsonl.gz:413729", "question_score": "26", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30694" }
[ 0.03594970703125, 0.00009524822235107422, -0.0013761520385742188, -0.00902557373046875, 0.01149749755859375, -0.02435302734375, 0.03302001953125, -0.0261077880859375, 0.03314208984375, 0.000018417835235595703, -0.06597900390625, -0.0227203369140625, 0.0041046142578125, -0.01548004150390625, -0.00040078163146972656, -0.038543701171875, 0.040008544921875, -0.044403076171875, -0.015228271484375, -0.0239105224609375, -0.000843048095703125, -0.004543304443359375, 0.028350830078125, 0.032562255859375, 0.0274810791015625, 0.01296234130859375, -0.0226287841796875, 0.005481719970703125, -0.0240936279296875, -0.025634765625, 0.0104827880859375, 0.03033447265625, 0.02410888671875, -0.01143646240234375, -0.0206298828125, -0.0036716461181640625, 0.01560211181640625, -0.00861358642578125, 0.01061248779296875, 0.010894775390625, 0.0190582275390625, -0.011444091796875, 0.01491546630859375, 0.022369384765625, -0.004497528076171875, -0.0286865234375, 0.021728515625, -0.058349609375, 0.04791259765625, 0.0026874542236328125, -0.0122528076171875, 0.0290374755859375, -0.00811767578125, -0.016510009765625, -0.00322723388671875, 0.002017974853515625, 0.01136016845703125, -0.032623291015625, 0.066162109375, 0.003208160400390625, -0.0560302734375, -0.056182861328125, 0.0269927978515625, -0.06494140625, 0.0265960693359375, 0.0029449462890625, 0.035430908203125, 0.028839111328125, -0.0811767578125, 0.013275146484375, 0.0640869140625, -0.045135498046875, -0.005130767822265625, -0.0244598388671875, 0.0244293212890625, -0.047607421875, 0.023468017578125, -0.03619384765625, -0.01500701904296875, 0.03369140625, -0.0034999847412109375, -0.042083740234375, -0.037384033203125, -0.0229339599609375, 0.0237884521484375, 0.01317596435546875, -0.005901336669921875, -0.0038604736328125, -0.0189666748046875, -0.06494140625, -0.0262298583984375, 0.0196533203125, -0.023468017578125, -0.0367431640625, -0.052764892578125, -0.022705078125, 0.01432037353515625, 0.057281494140625, -0.01174163818359375, -0.000804901123046875, -0.003803253173828125, -0.0294952392578125, 0.027618408203125, -0.0369873046875, -0.018310546875, 0.0283966064453125, 0.0219879150390625, 0.0202484130859375, 0.0203094482421875, 0.022857666015625, -0.01285552978515625, -0.0131072998046875, 0.032867431640625, 0.0478515625, -0.09002685546875, -0.03826904296875, -0.0247802734375, -0.0357666015625, -0.0227813720703125, 0.0025501251220703125, 0.011871337890625, 0.0260467529296875, -0.0220794677734375, 0.0361328125, -0.0086517333984375, 0.0208282470703125, 0.01032257080078125, -0.04400634765625, -0.041168212890625, -0.008026123046875, -0.0447998046875, 0.0281982421875, 0.12060546875, 0.042877197265625, 0.022064208984375, -0.00917816162109375, -0.006122589111328125, -0.039764404296875, -0.0209503173828125, 0.00872039794921875, -0.004058837890625, -0.0189361572265625, 0.026397705078125, -0.009307861328125, 0.01293182373046875, 0.048370361328125, 0.03765869140625, -0.0010194778442382812, -0.029571533203125, -0.057098388671875, 0.004444122314453125, 0.0036716461181640625, -0.0022182464599609375, 0.02313232421875, 0.020355224609375, -0.0235137939453125, 0.0347900390625, -0.04156494140625, 0.003818511962890625, -0.024383544921875, 0.0012426376342773438, -0.022430419921875, -0.006526947021484375, -0.0222930908203125, -0.035675048828125, 0.0178375244140625, -0.0175323486328125, -0.0033111572265625, 0.029022216796875, 0.07196044921875, 0.02093505859375, 0.01062774658203125, -0.0018024444580078125, 0.0001666545867919922, -0.0210418701171875, -0.03289794921875, -0.0033435821533203125, -0.02081298828125, 0.0217132568359375, 0.00487518310546875, -0.01480865478515625, -0.0239410400390625, -0.00435638427734375, 0.0017786026000976562, -0.06036376953125, 0.0316162109375, 0.0013866424560546875, 0.05828857421875, 0.056488037109375, 0.01367950439453125, 0.0304718017578125, -0.033782958984375, -0.054656982421875, 0.0274658203125, 0.0246734619140625, -0.0005130767822265625, -0.042999267578125, -0.017608642578125, 0.0147705078125, -0.0287017822265625, 0.02056884765625, -0.0255126953125, 0.0147857666015625, -0.006500244140625, -0.050445556640625, -0.0037326812744140625, -0.0155792236328125, 0.0255126953125, -0.022125244140625, -0.0171051025390625, 0.033721923828125, -0.017913818359375, 0.0004405975341796875, -0.056640625, -0.05438232421875, 0.019866943359375, -0.02886962890625, 0.015655517578125, -0.021240234375, 0.0479736328125, -0.02752685546875, -0.0482177734375, -0.0400390625, -0.006683349609375, 0.060150146484375, 0.0113525390625, -0.019317626953125, -0.007694244384765625, 0.03619384765625, 0.0225677490234375, -0.057159423828125, 0.01482391357421875, -0.034332275390625, -0.003936767578125, 0.00180816650390625, -0.0006928443908691406, 0.006992340087890625, -0.07391357421875, 0.0260772705078125, 0.042938232421875, 0.040130615234375, 0.038177490234375, -0.0185699462890625, -0.020660400390625, 0.032073974609375, 0.00351715087890625, 0.02685546875, -0.036468505859375, 0.030853271484375, 0.058502197265625, 0.011199951171875, -0.0223236083984375, 0.0155487060546875, -0.053375244140625, 0.0197906494140625, 0.01361083984375, -0.0267486572265625, -0.006786346435546875, 0.0082550048828125, 0.01360321044921875, -0.034088134765625, -0.01800537109375, 0.0389404296875, -0.036590576171875, 0.04144287109375, 0.007717132568359375, 0.037139892578125, 0.0191192626953125, -0.021759033203125, -0.01250457763671875, 0.01305389404296875, 0.0178070068359375, -0.0023059844970703125, 0.0235137939453125, 0.004711151123046875, 0.0032196044921875, -0.02386474609375, -0.0024166107177734375, 0.008514404296875, 0.001537322998046875, -0.0030517578125, 0.050750732421875, -0.016937255859375, -0.015380859375, -0.0294189453125, -0.035614013671875, -0.004283905029296875, 0.0179443359375, 0.005584716796875, -0.041015625, -0.007534027099609375, 0.026336669921875, -0.066650390625, 0.07049560546875, -0.00434112548828125, -0.027587890625, 0.03973388671875, -0.045867919921875, 0.03253173828125, -0.038818359375, 0.041778564453125, 0.055145263671875, -0.004428863525390625, -0.001750946044921875, 0.005702972412109375, 0.0316162109375, 0.036590576171875, -0.013397216796875, 0.004573822021484375, -0.0017271041870117188, -0.0031147003173828125, 0.011627197265625, 0.012847900390625, 0.09454345703125, -0.0531005859375, -0.08038330078125, -0.021026611328125, 0.0273284912109375, -0.0968017578125, -0.06787109375, 0.07220458984375, -0.0406494140625, -0.05035400390625, -0.0242767333984375, -0.0360107421875, -0.006351470947265625, -0.01103973388671875, -0.0290679931640625, -0.001956939697265625, 0.00212860107421875, -0.07061767578125, -0.036346435546875, -0.07354736328125, -0.01366424560546875, -0.0267181396484375, 0.020111083984375, -0.006435394287109375, 0.057891845703125, 0.007503509521484375, -0.02532958984375, -0.0003960132598876953, 0.03680419921875, -0.009002685546875, -0.00946044921875, 0.01248931884765625, -0.01171875, -0.0009965896606445312, 0.006526947021484375, -0.01097869873046875, 0.02276611328125, -0.01047515869140625, -0.0299835205078125, -0.004650115966796875, 0.027252197265625, 0.01788330078125, 0.01556396484375, 0.01351165771484375, 0.03656005859375, 0.022918701171875, -0.031890869140625, -0.0262298583984375, 0.01181793212890625, -0.0291595458984375, -0.006481170654296875, 0.0218658447265625, -0.0251312255859375, -0.04876708984375, 0.0253448486328125, -0.01004791259765625, -0.011627197265625, 0.01263427734375, -0.0238800048828125, 0.032928466796875, 0.0063629150390625, 0.0048065185546875, 0.01467132568359375, -0.0141754150390625, -0.0217742919921875, -0.023193359375, -0.03204345703125, 0.00919342041015625, -0.006320953369140625, -0.00403594970703125, -0.0288848876953125, -0.01262664794921875, 0.042877197265625, 0.02099609375, 0.022674560546875, -0.01605224609375, -0.050933837890625, -0.02081298828125, 0.0740966796875, -0.03662109375, 0.00893402099609375, -0.0157928466796875, -0.0099639892578125, -0.0260162353515625, -0.04736328125, -0.0693359375, 0.006317138671875, 0.01474761962890625, 0.023101806640625, -0.0025501251220703125, 0.01366424560546875, -0.0204315185546875, 0.06719970703125, 0.00872802734375, 0.00396728515625, 0.027557373046875, -0.0089111328125, -0.00267791748046875, 0.0142974853515625, -0.01026153564453125, 0.023223876953125, -0.0237274169921875, -0.007076263427734375, -0.0882568359375, -0.024627685546875, 0.029998779296875, 0.056732177734375, 0.011138916015625, -0.059295654296875, 0.0110015869140625, 0.048583984375, 0.0280303955078125, -0.001918792724609375, -0.0093536376953125, -0.01033782958984375, 0.002330780029296875, -0.006290435791015625, -0.00553131103515625, -0.011474609375, -0.00893402099609375, -0.004322052001953125, -0.0216217041015625, 0.0528564453125, -0.0205230712890625, -0.004810333251953125, -0.0031757354736328125, -0.0260467529296875, -0.0916748046875, -0.00629425048828125, 0.025909423828125, 0.01715087890625, 0.0016450881958007812, 0.0167236328125, -0.002689361572265625, -0.09478759765625, 0.0794677734375, 0.058929443359375, -0.03594970703125, -0.01041412353515625, 0.060577392578125, 0.0150909423828125, -0.05023193359375, -0.0606689453125, 0.005535125732421875, 0.041168212890625, -0.01216888427734375, 0.01068878173828125, 0.002147674560546875, -0.038299560546875, 0.04083251953125, 0.0159912109375, 0.0030384063720703125, -0.01299285888671875, 0.060546875, -0.0220947265625, -0.0258026123046875, 0.0285797119140625, -0.0391845703125, 0.01058197021484375, 0.00664520263671875, -0.0032806396484375, -0.031524658203125, 0.0017347335815429688, 0.040557861328125, -0.0176849365234375, 0.061614990234375, -0.02056884765625, -0.021453857421875, 0.02294921875, -0.01418304443359375, -0.01465606689453125, 0.00791168212890625, 0.00554656982421875, -0.029052734375, -0.02545166015625, 0.0257415771484375, 0.05010986328125, 0.0210418701171875, 0.031494140625, 0.032623291015625, 0.06939697265625, 0.029022216796875, 0.004474639892578125, 0.00044155120849609375, 0.03851318359375, 0.0002605915069580078, -0.029815673828125, 0.0123748779296875, -0.0011119842529296875, -0.0012359619140625, 0.0096282958984375, -0.0158233642578125, 0.0560302734375, 0.045318603515625, -0.0055694580078125, 0.01140594482421875, -0.0137786865234375, -0.0028400421142578125, -0.03265380859375, 0.0234222412109375, 0.02777099609375, -0.0191497802734375, 0.0047149658203125, 0.04351806640625, 0.020599365234375, 0.016357421875, -0.037506103515625, 0.029388427734375, 0.0140533447265625, 0.0269317626953125, 0.018157958984375, -0.0110015869140625, -0.0024242401123046875, 0.007289886474609375, -0.0085296630859375, -0.0264434814453125, -0.004180908203125, 0.0158843994140625, 0.0518798828125, -0.01788330078125, -0.01239776611328125, 0.0079345703125, -0.02630615234375, 0.0004634857177734375, 0.040802001953125, -0.0083465576171875, -0.037872314453125, -0.0163116455078125, 0.0308074951171875, 0.034027099609375, -0.0227508544921875, 0.029510498046875, -0.0272064208984375, -0.010498046875, 0.01522064208984375, 0.0204315185546875, 0.0040740966796875, -0.018768310546875, -0.035736083984375, -0.006862640380859375, -0.030731201171875, -0.0209808349609375, -0.0261688232421875, -0.0307464599609375, -0.00021135807037353516, 0.00881195068359375, 0.04376220703125, -0.005954742431640625, 0.06610107421875, -0.037933349609375, -0.0263824462890625, -0.007701873779296875, 0.007671356201171875, 0.04730224609375, 0.0293121337890625, -0.03857421875, 0.00846099853515625, -0.03271484375, -0.00555419921875, -0.014404296875, -0.041015625, -0.04486083984375, 0.0003039836883544922, 0.01265716552734375, 0.02142333984375, -0.03253173828125, -0.03289794921875, 0.01535797119140625, 0.02783203125, 0.004436492919921875, 0.08404541015625, 0.0004673004150390625, 0.01459503173828125, -0.0194549560546875, 0.046173095703125, 0.0037708282470703125, -0.016815185546875, -0.0134124755859375, -0.035003662109375, -0.026123046875, -0.04864501953125, 0.01253509521484375, 0.00945281982421875, 0.013092041015625, 0.0260009765625, 0.041900634765625, 0.0163421630859375, 0.0181884765625, -0.0261077880859375, -0.0028285980224609375, -0.01556396484375, 0.004756927490234375, -0.050750732421875, -0.039031982421875, 0.036865234375, -0.016815185546875, -0.0177459716796875, 0.0187835693359375, 0.001705169677734375, 0.0083465576171875, -0.005157470703125, 0.00830078125, -0.005931854248046875, -0.04071044921875, 0.0203857421875, 0.09271240234375, 0.0269012451171875, 0.04998779296875, 0.007450103759765625, 0.0010700225830078125, 0.034088134765625, 0.032623291015625, -0.036529541015625, -0.030853271484375, 0.0357666015625, 0.0164947509765625, -0.03466796875, 0.006259918212890625, -0.03253173828125, 0.005279541015625, 0.0217132568359375, 0.036529541015625, -0.0294036865234375, 0.0008978843688964844, 0.017059326171875, -0.0174560546875, 0.00225830078125, -0.0059661865234375, -0.01477813720703125, -0.0025386810302734375, 0.032135009765625, -0.03118896484375, -0.0300750732421875, 0.024078369140625, -0.00276947021484375, -0.0099029541015625, -0.0233154296875, 0.0400390625, 0.017730712890625, -0.0120391845703125, 0.033843994140625, 0.0084991455078125, 0.0217437744140625, -0.0232086181640625, 0.0030307769775390625, 0.0009670257568359375, -0.0249786376953125, -0.06329345703125, -0.001895904541015625, -0.0047760009765625, -0.0130462646484375, 0.00200653076171875, -0.0017423629760742188, 0.0176239013671875, 0.0189056396484375, 0.00728607177734375, -0.0197906494140625, 0.0010461807250976562, -0.020721435546875, -0.03497314453125, 0.00213623046875, 0.0154571533203125, 0.06243896484375, -0.005523681640625, 0.02423095703125, -0.0031147003173828125, -0.017364501953125, 0.0005927085876464844, 0.0216064453125, 0.033721923828125, -0.0233001708984375, -0.0211181640625, 0.038055419921875, 0.017364501953125, -0.013702392578125, -0.0093231201171875, 0.00511932373046875, -0.03857421875, -0.0034542083740234375, -0.002384185791015625, -0.0200653076171875, -0.0233917236328125, -0.01934814453125, -0.07110595703125, 0.1195068359375, -0.0006361007690429688, 0.00688934326171875, -0.0075836181640625, 0.042266845703125, -0.0293121337890625, 0.02166748046875, -0.03900146484375, 0.066650390625, -0.0198516845703125, 0.058349609375, -0.077880859375, -0.00704193115234375, 0.020355224609375, 0.032867431640625, 0.045806884765625, 0.0009908676147460938, -0.0243377685546875, -0.012237548828125, 0.017913818359375, 0.0399169921875, -0.0012159347534179688, 0.02252197265625, 0.0194854736328125, 0.04608154296875, 0.02484130859375, -0.056640625, 0.019927978515625, -0.054840087890625, 0.007663726806640625, 0.035858154296875, 0.006641387939453125, -0.023040771484375, 0.0127716064453125, -0.006198883056640625, -0.053497314453125, 0.0029735565185546875, 0.03240966796875, -0.018463134765625, 0.0285797119140625, 0.02978515625, 0.0670166015625, -0.03924560546875, -0.039276123046875, -0.0118865966796875, 0.0677490234375, 0.019683837890625, 0.0186920166015625, 0.0421142578125, 0.0232696533203125, 0.01483154296875, 0.018829345703125, 0.0215301513671875, 0.0033702850341796875, -0.005283355712890625, 0.041473388671875, 0.0299530029296875, 0.015472412109375, -0.051849365234375, -0.009552001953125, 0.010955810546875, 0.042816162109375, -0.03900146484375, -0.00867462158203125, 0.0160980224609375, 0.0174713134765625, 0.002628326416015625, -0.034881591796875, 0.007389068603515625, 0.031890869140625, 0.0330810546875, -0.043670654296875, -0.0011281967163085938, 0.04095458984375, 0.0177001953125, 0.01238250732421875, 0.0188140869140625, -0.06414794921875, -0.0279693603515625, -0.04443359375, 0.01275634765625, 0.055633544921875, 0.07635498046875, 0.0007014274597167969, 0.08734130859375, -0.03387451171875, -0.0347900390625, 0.02783203125, 0.0222015380859375, -0.0008220672607421875, -0.0177764892578125, 0.0117340087890625, -0.0237274169921875, -0.024261474609375, 0.01403045654296875, -0.006465911865234375, -0.027374267578125, 0.045806884765625, 0.046478271484375, -0.0633544921875, -0.0313720703125, -0.0187225341796875, -0.0274200439453125, 0.0457763671875, 0.01113128662109375, -0.01290130615234375, -0.039703369140625, -0.0384521484375, -0.03131103515625, 0.047027587890625, -0.0236053466796875, 0.0059051513671875, 0.05206298828125, 0.003070831298828125, -0.0184478759765625, 0.03448486328125, 0.008392333984375, 0.0972900390625, 0.024627685546875, -0.042724609375, 0.0239715576171875, -0.047393798828125, -0.09893798828125, 0.05072021484375, 0.044097900390625, -0.04522705078125, 0.0258026123046875, -0.03167724609375, -0.008941650390625, 0.0281982421875, -0.0182342529296875, -0.006435394287109375, 0.0401611328125, 0.0230255126953125, 0.004573822021484375, -0.01102447509765625, -0.0221099853515625, -0.01556396484375, 0.0251312255859375, 0.0421142578125, 0.042572021484375, -0.01148223876953125, 0.0517578125, -0.0275115966796875, 0.0556640625, -0.054168701171875, -0.0016756057739257812, 0.01306915283203125, 0.02130126953125, 0.026275634765625, -0.00759124755859375, -0.0232086181640625, 0.06646728515625, 0.035614013671875, 0.0142822265625, 0.050018310546875, -0.017120361328125, -0.0010690689086914062, -0.0282135009765625, 0.049224853515625, -0.006710052490234375, -0.0024547576904296875, -0.06195068359375, -0.03460693359375, 0.06744384765625, 0.030914306640625, -0.0162353515625, 0.0269317626953125, -0.047698974609375, -0.026275634765625, 0.03216552734375, -0.032623291015625, 0.0118408203125, 0.0279541015625, -0.021697998046875, -0.031768798828125, 0.01367950439453125, -0.007904052734375, 0.0047607421875, 0.0240478515625, 0.026275634765625, 0.0216064453125, -0.03814697265625, -0.003314971923828125, -0.0012569427490234375, 0.051055908203125, 0.0019702911376953125, 0.01250457763671875, -0.00372314453125, 0.004192352294921875, -0.031036376953125, -0.0012722015380859375, -0.009368896484375, -0.0188140869140625, -0.007091522216796875, 0.00428009033203125, 0.0032749176025390625, -0.0267791748046875, -0.036224365234375, -0.00893402099609375, 0.023956298828125, -0.004863739013671875, -0.0269012451171875, -0.0088653564453125, -0.00860595703125, 0.06317138671875, -0.0255889892578125, 0.00930023193359375, -0.00450897216796875, 0.0016088485717773438, -0.031524658203125, 0.004718780517578125, -0.051025390625, 0.0019330978393554688, -0.0025634765625, 0.0302734375, 0.0182342529296875, -0.03399658203125, 0.00580596923828125, 0.0643310546875, 0.034698486328125, 0.103271484375, 0.0305633544921875, -0.03216552734375, 0.023895263671875, 0.0039043426513671875, -0.0161590576171875, -0.061370849609375, 0.0126953125, -0.09075927734375, 0.0124969482421875, -0.0154876708984375, 0.0196533203125, 0.02484130859375, -0.0256500244140625, -0.053009033203125, 0.035919189453125, -0.02520751953125, -0.0269622802734375, 0.006259918212890625, -0.01012420654296875, 0.00130462646484375, 0.0025768280029296875, 0.02056884765625, -0.06103515625, -0.030426025390625, -0.00745391845703125, -0.00943756103515625, 0.01238250732421875, 0.0494384765625, -0.00954437255859375, -0.039947509765625, -0.030853271484375, -0.043548583984375, -0.0244903564453125, 0.023040771484375, -0.0145111083984375, 0.0157928466796875, 0.00685882568359375, -0.0609130859375, -0.01324462890625, -0.0113067626953125, 0.03546142578125, -0.0247650146484375, -0.0258941650390625, -0.00716400146484375, 0.01544952392578125, 0.047760009765625, 0.0595703125, 0.004680633544921875, -0.053955078125, 0.018341064453125, 0.021942138671875, -0.06756591796875, 0.00908660888671875, 0.037384033203125, -0.03155517578125, -0.003536224365234375, -0.0233001708984375, -0.021270751953125, 0.0261688232421875, -0.0537109375, -0.02447509765625, -0.000614166259765625, -0.031768798828125, 0.0036220550537109375, 0.0091705322265625, 0.004528045654296875, 0.01496124267578125, -0.0208282470703125, -0.001007080078125, -0.00894927978515625, -0.0007338523864746094, -0.0033016204833984375, 0.005298614501953125, 0.01434326171875, 0.03082275390625, -0.047119140625, 0.02886962890625, 0.003173828125, 0.022857666015625, -0.043548583984375, -0.009368896484375, -0.0262603759765625, 0.0212860107421875, 0.00901031494140625, 0.026092529296875, -0.00409698486328125, 0.052978515625, 0.01233673095703125, 0.04693603515625, -0.0037174224853515625, 0.0136260986328125, 0.0309295654296875, 0.01580810546875, -0.049041748046875, 0.0009293556213378906, -0.01922607421875, -0.05279541015625, -0.00952911376953125, -0.0174102783203125, -0.0167694091796875, -0.0301513671875, 0.00254058837890625, 0.00757598876953125, -0.00704193115234375, 0.01085662841796875 ]
132a8e30815cb7c31dca7286226c0f69e8990545
Wordpress Stackexchange Q: Why is WP-Query spelled like it is? I'm new to PHP and WordPress, and I'm curious: Why is WP-Query capitalized like it is? Is this a PHP naming convention, based on the type of query? Or what? Thanks. A: WP_Query is a PHP Class, class names are capitalized, with words separated by underscores, as per the Naming Conventions in WordPress Coding Standards.
Q: Why is WP-Query spelled like it is? I'm new to PHP and WordPress, and I'm curious: Why is WP-Query capitalized like it is? Is this a PHP naming convention, based on the type of query? Or what? Thanks. A: WP_Query is a PHP Class, class names are capitalized, with words separated by underscores, as per the Naming Conventions in WordPress Coding Standards.
wordpress
{ "language": "en", "length": 63, "provenance": "stackexchange_00019.jsonl.gz:413746", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30756" }
[ 0.004726409912109375, 0.0009775161743164062, -0.0281219482421875, -0.019866943359375, 0.0069122314453125, -0.03265380859375, 0.006122589111328125, 0.00746917724609375, 0.00807952880859375, 0.039886474609375, -0.01239776611328125, -0.0159912109375, 0.0258026123046875, -0.0245513916015625, -0.00922393798828125, -0.0089569091796875, -0.005870819091796875, -0.01922607421875, -0.04437255859375, -0.033203125, 0.001995086669921875, -0.028350830078125, -0.0231781005859375, -0.02081298828125, 0.0157318115234375, -0.0143280029296875, 0.0830078125, -0.00884246826171875, 0.0216827392578125, -0.0008220672607421875, 0.01666259765625, -0.0322265625, 0.0343017578125, 0.007694244384765625, 0.020782470703125, 0.060089111328125, 0.0294952392578125, -0.005199432373046875, 0.031280517578125, 0.0233001708984375, 0.007457733154296875, -0.006801605224609375, 0.02398681640625, -0.0236053466796875, -0.0065155029296875, -0.0010280609130859375, 0.01552581787109375, 0.004547119140625, 0.040069580078125, -0.0241241455078125, -0.0245361328125, 0.049224853515625, -0.01025390625, -0.06109619140625, -0.0019626617431640625, 0.005268096923828125, 0.03253173828125, -0.01416015625, 0.032867431640625, -0.0195159912109375, -0.05322265625, -0.01001739501953125, 0.034271240234375, -0.01335906982421875, -0.028350830078125, -0.004730224609375, 0.060333251953125, 0.004169464111328125, -0.0008730888366699219, -0.042022705078125, 0.005218505859375, 0.035247802734375, -0.00948333740234375, 0.031097412109375, 0.02496337890625, -0.04107666015625, 0.02227783203125, -0.0018358230590820312, 0.012603759765625, 0.051971435546875, 0.02545166015625, -0.047515869140625, -0.022796630859375, 0.02117919921875, -0.00186920166015625, 0.0127410888671875, 0.009124755859375, -0.01244354248046875, 0.004001617431640625, -0.032135009765625, -0.006000518798828125, 0.043243408203125, -0.045501708984375, -0.01125335693359375, -0.007282257080078125, -0.0572509765625, -0.029449462890625, 0.0055389404296875, 0.0025463104248046875, 0.0168914794921875, 0.00658416748046875, -0.039093017578125, 0.0275115966796875, -0.02130126953125, 0.0028858184814453125, 0.02154541015625, -0.0289306640625, 0.06982421875, 0.061309814453125, 0.049285888671875, 0.01132965087890625, -0.02191162109375, -0.01439666748046875, -0.037689208984375, -0.014801025390625, 0.0194854736328125, -0.0304718017578125, 0.01947021484375, 0.0142669677734375, -0.003582000732421875, 0.0115203857421875, 0.031646728515625, 0.049468994140625, -0.049774169921875, -0.0174102783203125, -0.0096435546875, -0.02130126953125, -0.052978515625, -0.0482177734375, 0.05792236328125, -0.005947113037109375, -0.0295562744140625, 0.0186767578125, 0.05267333984375, -0.004756927490234375, -0.035980224609375, 0.013671875, -0.006366729736328125, -0.0020961761474609375, 0.0280303955078125, 0.00476837158203125, -0.04547119140625, -0.0003542900085449219, 0.01995849609375, 0.03411865234375, 0.0246429443359375, 0.032470703125, 0.00867462158203125, -0.00804901123046875, -0.049072265625, 0.0208587646484375, 0.0122222900390625, 0.000053048133850097656, 0.019744873046875, -0.038421630859375, -0.0171661376953125, -0.023590087890625, -0.0251922607421875, 0.0192413330078125, -0.0208740234375, 0.00646209716796875, 0.0128631591796875, 0.016815185546875, 0.00860595703125, 0.01010894775390625, -0.0277252197265625, -0.01531219482421875, 0.0031070709228515625, 0.0095672607421875, -0.041656494140625, 0.0166015625, 0.0024204254150390625, 0.05511474609375, -0.009033203125, -0.0014057159423828125, 0.0010385513305664062, 0.0035152435302734375, -0.026275634765625, 0.0251312255859375, 0.0134735107421875, -0.005565643310546875, -0.0203704833984375, 0.033782958984375, -0.0245208740234375, -0.0112152099609375, -0.00811767578125, 0.0172576904296875, 0.020538330078125, -0.0169525146484375, 0.0288848876953125, 0.01276397705078125, 0.038482666015625, -0.0450439453125, 0.07891845703125, -0.0083160400390625, -0.04058837890625, -0.0008907318115234375, 0.0236053466796875, -0.01336669921875, -0.055511474609375, -0.0113525390625, 0.0095062255859375, -0.0239410400390625, 0.023651123046875, -0.0926513671875, 0.02093505859375, -0.03802490234375, 0.024810791015625, 0.01340484619140625, -0.0121307373046875, 0.01180267333984375, -0.01739501953125, 0.00374603271484375, -0.045928955078125, -0.07568359375, 0.0084075927734375, 0.004482269287109375, -0.012908935546875, -0.003070831298828125, -0.037384033203125, 0.00920867919921875, -0.0172576904296875, -0.0065460205078125, 0.032623291015625, 0.051361083984375, -0.0110015869140625, -0.030029296875, -0.027130126953125, 0.035369873046875, -0.0296478271484375, 0.009002685546875, 0.07684326171875, 0.0531005859375, 0.09539794921875, -0.0021533966064453125, -0.025604248046875, -0.01343536376953125, -0.050994873046875, 0.012054443359375, 0.04052734375, 0.0177764892578125, 0.0557861328125, -0.003326416015625, 0.00830841064453125, 0.0216217041015625, -0.0171966552734375, 0.0095367431640625, -0.0121002197265625, 0.003025054931640625, 0.037445068359375, 0.0092926025390625, -0.0097808837890625, 0.015869140625, 0.007709503173828125, -0.0017480850219726562, 0.01788330078125, 0.00504302978515625, -0.001117706298828125, -0.00991058349609375, 0.028656005859375, -0.01568603515625, -0.007007598876953125, 0.0018787384033203125, -0.01427459716796875, 0.0015249252319335938, 0.0007491111755371094, 0.01085662841796875, 0.01345062255859375, -0.0053863525390625, -0.00446319580078125, 0.0089111328125, -0.01209259033203125, -0.00970458984375, 0.051910400390625, 0.018829345703125, -0.01020050048828125, -0.0289306640625, -0.00926971435546875, -0.00475311279296875, 0.0169219970703125, 0.003925323486328125, 0.0302886962890625, -0.009033203125, -0.0228729248046875, 0.0079498291015625, -0.03399658203125, -0.01183319091796875, -0.01142120361328125, -0.0135955810546875, -0.0294647216796875, -0.01068115234375, 0.048583984375, -0.042694091796875, 0.0723876953125, -0.011962890625, -0.0204315185546875, -0.00228118896484375, 0.01953125, -0.00665283203125, -0.0029048919677734375, 0.028350830078125, 0.03765869140625, -0.004131317138671875, -0.0219268798828125, 0.0014553070068359375, -0.0017061233520507812, 0.03839111328125, -0.0281829833984375, -0.04119873046875, 0.00791168212890625, -0.07733154296875, -0.03125, 0.03350830078125, 0.09210205078125, -0.0203704833984375, -0.056182861328125, -0.018035888671875, 0.0404052734375, -0.07421875, -0.1083984375, -0.002166748046875, -0.024261474609375, 0.0016450881958007812, -0.01136016845703125, -0.0084075927734375, 0.002105712890625, -0.01442718505859375, -0.006725311279296875, 0.027923583984375, -0.0240478515625, -0.07794189453125, -0.057861328125, -0.06463623046875, 0.014984130859375, -0.0094451904296875, 0.01229095458984375, 0.01494598388671875, 0.01502227783203125, 0.02276611328125, -0.01666259765625, 0.028106689453125, 0.038330078125, -0.03594970703125, -0.031890869140625, -0.007568359375, -0.00689697265625, -0.00688934326171875, 0.00344085693359375, -0.0341796875, -0.010040283203125, 0.010467529296875, -0.01309967041015625, 0.02020263671875, -0.0244903564453125, 0.030120849609375, 0.01812744140625, -0.0350341796875, -0.012664794921875, 0.02294921875, -0.054931640625, -0.044158935546875, 0.0003247261047363281, -0.0321044921875, 0.01447296142578125, 0.0013599395751953125, -0.003070831298828125, -0.00870513916015625, 0.04180908203125, 0.0251007080078125, 0.020111083984375, -0.040435791015625, -0.045501708984375, 0.09381103515625, 0.0243682861328125, 0.0697021484375, 0.002834320068359375, -0.004306793212890625, -0.041168212890625, 0.01245880126953125, -0.0108489990234375, -0.01427459716796875, -0.0122528076171875, -0.0029659271240234375, -0.028594970703125, -0.0765380859375, 0.0465087890625, -0.062744140625, -0.0223388671875, -0.044891357421875, -0.01332855224609375, 0.018096923828125, 0.096435546875, -0.0340576171875, -0.01155853271484375, 0.035125732421875, 0.0009541511535644531, -0.036346435546875, 0.0082244873046875, -0.07080078125, -0.0210418701171875, -0.0148773193359375, -0.003509521484375, 0.008880615234375, -0.024566650390625, -0.01395416259765625, -0.0263214111328125, -0.01506805419921875, -0.0045318603515625, 0.02154541015625, -0.047821044921875, 0.031280517578125, 0.0205841064453125, 0.01300048828125, -0.0017175674438476562, -0.005123138427734375, -0.05023193359375, -0.1116943359375, -0.0233154296875, 0.006866455078125, 0.0906982421875, -0.01007843017578125, -0.021240234375, -0.06475830078125, 0.039215087890625, 0.0186920166015625, 0.026824951171875, 0.02001953125, -0.01438140869140625, 0.0330810546875, 0.05523681640625, 0.0404052734375, 0.0172882080078125, 0.023223876953125, -0.0110931396484375, -0.048797607421875, -0.0279693603515625, -0.042205810546875, -0.008026123046875, -0.002964019775390625, -0.03741455078125, -0.0265045166015625, -0.024139404296875, 0.0115966796875, 0.0154571533203125, 0.00995635986328125, 0.004730224609375, -0.01438140869140625, -0.0123138427734375, 0.08740234375, 0.01776123046875, 0.009857177734375, -0.0115509033203125, 0.0926513671875, -0.0019207000732421875, -0.043487548828125, -0.06903076171875, 0.0016326904296875, 0.0134735107421875, -0.0010175704956054688, 0.023468017578125, -0.000904083251953125, -0.00019800662994384766, 0.01995849609375, -0.016082763671875, -0.01343536376953125, 0.0083465576171875, 0.05517578125, 0.0034427642822265625, -0.0209197998046875, 0.0197601318359375, -0.02752685546875, -0.0023937225341796875, 0.05816650390625, 0.03070068359375, -0.058074951171875, 0.0202789306640625, 0.01340484619140625, -0.0130462646484375, -0.0047454833984375, -0.0036182403564453125, -0.0301666259765625, 0.0263824462890625, -0.0173187255859375, 0.0034313201904296875, -0.02325439453125, -0.0002541542053222656, -0.03277587890625, -0.035797119140625, 0.0258941650390625, 0.0233306884765625, 0.044158935546875, -0.038330078125, 0.065673828125, -0.035369873046875, -0.019500732421875, 0.00612640380859375, -0.006732940673828125, 0.096923828125, -0.0018138885498046875, -0.03173828125, 0.0008411407470703125, -0.029876708984375, -0.05767822265625, 0.01800537109375, -0.0029315948486328125, -0.0196380615234375, 0.00414276123046875, -0.002468109130859375, 0.00872802734375, 0.0260467529296875, -0.013427734375, 0.004749298095703125, 0.064697265625, 0.001434326171875, 0.01351165771484375, 0.0209808349609375, 0.03973388671875, 0.018402099609375, 0.021392822265625, -0.0192413330078125, -0.01041412353515625, -0.0163726806640625, 0.0259857177734375, 0.0161285400390625, -0.04840087890625, 0.03753662109375, 0.005847930908203125, 0.03363037109375, -0.0421142578125, -0.001453399658203125, 0.019195556640625, 0.006671905517578125, -0.01230621337890625, -0.0212249755859375, 0.0313720703125, 0.0284576416015625, -0.01153564453125, -0.0045318603515625, 0.01259613037109375, 0.01439666748046875, -0.008056640625, -0.016326904296875, 0.01363372802734375, 0.02166748046875, 0.00203704833984375, 0.0095672607421875, -0.00928497314453125, 0.030487060546875, -0.009490966796875, 0.016845703125, -0.03533935546875, -0.03936767578125, 0.0138092041015625, 0.0265960693359375, -0.0185546875, -0.00562286376953125, -0.041168212890625, -0.021148681640625, -0.033111572265625, 0.09588623046875, -0.02581787109375, 0.03814697265625, -0.049041748046875, 0.00909423828125, 0.0065155029296875, 0.0144500732421875, 0.0300750732421875, 0.0083465576171875, -0.0261993408203125, -0.01068115234375, -0.050811767578125, -0.0279388427734375, -0.01727294921875, -0.022796630859375, -0.034881591796875, 0.0015506744384765625, -0.0016336441040039062, -0.0169525146484375, 0.0151824951171875, 0.0015134811401367188, -0.049041748046875, 0.042999267578125, 0.033355712890625, 0.0007724761962890625, -0.07366943359375, 0.062744140625, 0.0260162353515625, -0.0194244384765625, -0.031646728515625, 0.005527496337890625, 0.024139404296875, 0.041900634765625, 0.0181732177734375, -0.04998779296875, -0.044891357421875, -0.02880859375, -0.0156402587890625, 0.01241302490234375, 0.0224609375, -0.0262451171875, 0.03448486328125, -0.0015125274658203125, -0.005779266357421875, 0.004444122314453125, -0.026153564453125, -0.0273284912109375, 0.038848876953125, 0.013031005859375, -0.00437164306640625, 0.03033447265625, -0.0107421875, -0.02874755859375, 0.007801055908203125, -0.004779815673828125, -0.002216339111328125, 0.0367431640625, -0.0245208740234375, 0.0013456344604492188, 0.0274658203125, 0.015777587890625, 0.016448974609375, 0.007022857666015625, 0.0025501251220703125, -0.0280609130859375, 0.0122528076171875, -0.0304718017578125, 0.0148162841796875, 0.06304931640625, 0.01352691650390625, -0.021514892578125, 0.023956298828125, -0.029571533203125, 0.0286102294921875, 0.0699462890625, 0.10955810546875, -0.08074951171875, 0.0094146728515625, 0.03656005859375, -0.03326416015625, 0.0125274658203125, 0.024078369140625, -0.004055023193359375, -0.0174407958984375, 0.0340576171875, -0.032379150390625, 0.0036640167236328125, 0.0125274658203125, -0.0239715576171875, -0.001125335693359375, 0.01629638671875, 0.0750732421875, 0.0174407958984375, -0.04815673828125, 0.0018396377563476562, 0.02459716796875, 0.00992584228515625, 0.005268096923828125, 0.037628173828125, 0.00988006591796875, 0.012908935546875, -0.03753662109375, 0.027008056640625, -0.0247039794921875, -0.029693603515625, 0.00597381591796875, 0.002468109130859375, 0.01523590087890625, 0.05267333984375, -0.01947021484375, 0.03570556640625, 0.0028018951416015625, 0.0112152099609375, -0.0166168212890625, -0.009246826171875, 0.0308837890625, 0.037811279296875, -0.07757568359375, 0.0301971435546875, -0.043731689453125, 0.010223388671875, 0.0039825439453125, -0.0175628662109375, 0.053466796875, -0.037506103515625, -0.0058441162109375, 0.0181427001953125, -0.02032470703125, 0.0086669921875, 0.0150146484375, -0.050872802734375, -0.03839111328125, -0.0019197463989257812, -0.0186920166015625, -0.026336669921875, 0.046539306640625, 0.005840301513671875, -0.0081634521484375, 0.0085601806640625, -0.005279541015625, 0.01116180419921875, 0.0672607421875, -0.00751495361328125, -0.0198516845703125, -0.00826263427734375, -0.038787841796875, 0.045196533203125, -0.0204010009765625, 0.07684326171875, -0.06536865234375, -0.0117950439453125, 0.037261962890625, 0.03448486328125, 0.042205810546875, -0.01001739501953125, -0.03753662109375, 0.02850341796875, 0.11895751953125, 0.0638427734375, 0.032318115234375, 0.0202178955078125, 0.027313232421875, 0.022369384765625, 0.042633056640625, -0.00893402099609375, 0.0270233154296875, -0.004695892333984375, 0.0009522438049316406, 0.052215576171875, 0.0153350830078125, 0.0010776519775390625, -0.01149749755859375, 0.0245513916015625, -0.044097900390625, 0.003910064697265625, 0.0196990966796875, 0.050689697265625, -0.020599365234375, 0.034088134765625, 0.023223876953125, -0.0972900390625, -0.048736572265625, -0.0361328125, 0.032989501953125, 0.022003173828125, 0.0110015869140625, 0.0268096923828125, 0.003231048583984375, 0.0275115966796875, -0.011199951171875, -0.0013608932495117188, 0.01386260986328125, -0.00922393798828125, 0.05364990234375, 0.01490020751953125, 0.04052734375, -0.03509521484375, -0.01056671142578125, 0.03271484375, 0.07037353515625, -0.0299224853515625, -0.031005859375, -0.001270294189453125, -0.0025482177734375, 0.010833740234375, -0.01036834716796875, 0.0167388916015625, 0.0007081031799316406, 0.0048370361328125, -0.0028228759765625, -0.005809783935546875, 0.020355224609375, -0.0206451416015625, -0.0037097930908203125, -0.0096435546875, 0.0225372314453125, 0.00803375244140625, 0.0020961761474609375, 0.0263671875, -0.022552490234375, 0.03857421875, -0.0212249755859375, 0.056060791015625, -0.07940673828125, -0.01361846923828125, -0.048675537109375, 0.0101165771484375, -0.0020999908447265625, 0.037872314453125, -0.04437255859375, -0.006816864013671875, 0.0164794921875, 0.045196533203125, 0.06439208984375, 0.00782012939453125, 0.00402069091796875, -0.01145172119140625, 0.005237579345703125, 0.0276641845703125, 0.020050048828125, -0.01326751708984375, 0.007541656494140625, -0.021453857421875, 0.0178375244140625, 0.0100555419921875, 0.004367828369140625, -0.01453399658203125, 0.044769287109375, 0.01535797119140625, 0.0133056640625, -0.01971435546875, 0.00437164306640625, -0.018585205078125, 0.0472412109375, -0.0210113525390625, 0.0235443115234375, 0.034088134765625, -0.049163818359375, -0.012298583984375, 0.0162353515625, -0.0047454833984375, 0.004833221435546875, 0.021759033203125, 0.0009303092956542969, 0.012847900390625, 0.035186767578125, -0.02606201171875, -0.01149749755859375, 0.035400390625, 0.01149749755859375, 0.004711151123046875, 0.004180908203125, 0.0059814453125, -0.07098388671875, -0.033294677734375, -0.01447296142578125, 0.0182647705078125, -0.0154266357421875, 0.0247955322265625, 0.017791748046875, 0.0072784423828125, -0.006465911865234375, -0.0153961181640625, -0.01003265380859375, -0.0258026123046875, 0.0498046875, -0.054473876953125, -0.032501220703125, 0.0115966796875, 0.0017986297607421875, 0.00628662109375, 0.0266876220703125, -0.044586181640625, -0.011199951171875, -0.0160064697265625, 0.02227783203125, -0.0071563720703125, 0.05462646484375, -0.015411376953125, 0.032684326171875, 0.0213165283203125, -0.021026611328125, 0.034210205078125, -0.023956298828125, -0.003070831298828125, 0.0235137939453125, -0.040496826171875, -0.051300048828125, 0.050140380859375, -0.0838623046875, 0.0433349609375, 0.025146484375, -0.006313323974609375, -0.0015573501586914062, -0.0221099853515625, -0.0264892578125, -0.00853729248046875, 0.01067352294921875, -0.02349853515625, 0.00009143352508544922, -0.00603485107421875, -0.05511474609375, -0.0272674560546875, 0.0279388427734375, 0.00865936279296875, 0.0157318115234375, -0.0582275390625, 0.003055572509765625, -0.0117950439453125, -0.017730712890625, -0.0323486328125, -0.011932373046875, -0.0014467239379882812, 0.017059326171875, 0.00336456298828125, -0.0479736328125, -0.0557861328125, -0.039276123046875, 0.0232391357421875, -0.02337646484375, 0.037139892578125, -0.041259765625, -0.041168212890625, -0.039825439453125, -0.004047393798828125, 0.00229644775390625, 0.02099609375, 0.02447509765625, -0.0390625, 0.0160369873046875, -0.00836181640625, -0.0265045166015625, 0.015777587890625, 0.0162200927734375, 0.02447509765625, -0.0293121337890625, 0.00104522705078125, 0.0458984375, 0.024566650390625, 0.08551025390625, 0.01085662841796875, -0.0220184326171875, 0.041229248046875, 0.0023899078369140625, -0.00725555419921875, -0.048614501953125, -0.01128387451171875, -0.0255584716796875, 0.0193939208984375, 0.046539306640625, -0.001251220703125, 0.02789306640625, -0.035736083984375, -0.11785888671875, 0.051605224609375, -0.0158233642578125, -0.05908203125, -0.03314208984375, -0.0251922607421875, -0.006633758544921875, 0.04632568359375, -0.0164642333984375, 0.01152801513671875, -0.030426025390625, 0.030548095703125, 0.0243682861328125, 0.02557373046875, 0.017791748046875, 0.0010404586791992188, -0.0399169921875, 0.030853271484375, 0.0108642578125, 0.0361328125, 0.022613525390625, -0.01374053955078125, 0.030059814453125, 0.046539306640625, -0.0220184326171875, -0.0259857177734375, -0.00994110107421875, -0.03436279296875, -0.0281982421875, -0.0152130126953125, 0.05255126953125, 0.031036376953125, -0.0006389617919921875, 0.0159454345703125, -0.01508331298828125, -0.031402587890625, -0.0108184814453125, -0.0216064453125, 0.002628326416015625, -0.0209808349609375, 0.0037078857421875, -0.0782470703125, -0.03619384765625, 0.02130126953125, -0.00928497314453125, 0.0014400482177734375, -0.007465362548828125, -0.036773681640625, -0.0179595947265625, -0.033538818359375, -0.0007143020629882812, -0.031036376953125, -0.07232666015625, 0.0477294921875, -0.041656494140625, -0.043060302734375, 0.0127105712890625, 0.056060791015625, -0.03167724609375, -0.0043792724609375, 0.0008115768432617188, -0.0007476806640625, 0.00420379638671875, -0.01384735107421875, 0.0340576171875, -0.054931640625, 0.0340576171875, 0.005462646484375, -0.0082244873046875, 0.0322265625, 0.015777587890625, 0.037017822265625, -0.044189453125, 0.05731201171875, 0.009613037109375, 0.00623321533203125, 0.031585693359375, 0.0003497600555419922, -0.00568389892578125, 0.0643310546875, 0.0207061767578125, -0.06170654296875, 0.0194091796875, -0.0194854736328125, 0.025909423828125, 0.0039825439453125, -0.0035190582275390625, 0.0168609619140625, -0.0309600830078125, 0.005809783935546875, -0.036834716796875, -0.0087738037109375 ]
cf24ae52fdd9a300db616e85bba7ecaa14918e25
Wordpress Stackexchange Q: Change Posts per page count In the wordpress settings => Reading => Blog pages show at most [input field] posts I have it set to 3 posts at the moment. On my index, date archives, tag archives, category archives, search results, etc... All pages that use the loop and paging, it shows 3 posts per page now. My goal is to be able to have different number of results for different pages. ON my index maybe have 3 posts but on search results or archives, show a different number of results per page. Any ideas how to do this? A: This will do it: (add to your theme's functions.php) add_action( 'pre_get_posts', 'set_posts_per_page' ); function set_posts_per_page( $query ) { global $wp_the_query; if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_search() ) ) { $query->set( 'posts_per_page', 3 ); } elseif ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_archive() ) ) { $query->set( 'posts_per_page', 5 ); } // Etc.. return $query; }
Q: Change Posts per page count In the wordpress settings => Reading => Blog pages show at most [input field] posts I have it set to 3 posts at the moment. On my index, date archives, tag archives, category archives, search results, etc... All pages that use the loop and paging, it shows 3 posts per page now. My goal is to be able to have different number of results for different pages. ON my index maybe have 3 posts but on search results or archives, show a different number of results per page. Any ideas how to do this? A: This will do it: (add to your theme's functions.php) add_action( 'pre_get_posts', 'set_posts_per_page' ); function set_posts_per_page( $query ) { global $wp_the_query; if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_search() ) ) { $query->set( 'posts_per_page', 3 ); } elseif ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_archive() ) ) { $query->set( 'posts_per_page', 5 ); } // Etc.. return $query; } A: Improving on the answer above: hook pre_get_posts is fetched by reference, thus it does not require a global call or a returncall. add_action( 'pre_get_posts', 'set_posts_per_page' ); function set_posts_per_page( $query ) { if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_search() ) ) { $query->set( 'posts_per_page', 3 ); } elseif ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_archive() ) ) { $query->set( 'posts_per_page', 5 ); } // Etc.. } A: Using $GLOBALS['wp_query'] or just $wp_query add_action( 'pre_get_posts', 'set_posts_per_page' ); function set_posts_per_page( $query ) { if ( ( ! is_admin() ) && ( $query === $GLOBALS['wp_query'] ) && ( $query->is_search() ) ) { $query->set( 'posts_per_page', 3 ); } elseif ( ( ! is_admin() ) && ( $query === $GLOBALS['wp_the_query'] ) && ( $query->is_archive() ) ) { $query->set( 'posts_per_page', 5 ); } return $query; }
wordpress
{ "language": "en", "length": 317, "provenance": "stackexchange_00019.jsonl.gz:413747", "question_score": "20", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30757" }
[ 0.06707763671875, 0.0145111083984375, 0.0162506103515625, 0.01085662841796875, 0.01453399658203125, -0.049072265625, 0.06695556640625, -0.05499267578125, 0.0036525726318359375, -0.005168914794921875, -0.06134033203125, 0.02679443359375, -0.039764404296875, 0.0024967193603515625, 0.007701873779296875, -0.03662109375, 0.04486083984375, -0.050201416015625, 0.0006852149963378906, -0.00811004638671875, 0.01055145263671875, 0.0169677734375, 0.036407470703125, 0.0831298828125, 0.024993896484375, -0.014678955078125, 0.02374267578125, -0.01904296875, -0.0019702911376953125, -0.018341064453125, 0.007488250732421875, 0.006282806396484375, 0.042022705078125, -0.004749298095703125, -0.020660400390625, 0.031829833984375, 0.01067352294921875, -0.0181732177734375, 0.0024089813232421875, 0.018829345703125, 0.0221405029296875, -0.011993408203125, 0.007595062255859375, -0.01432037353515625, 0.0042877197265625, -0.0179290771484375, 0.0218353271484375, -0.0562744140625, 0.0233917236328125, -0.053955078125, -0.000751495361328125, 0.04583740234375, 0.0103607177734375, -0.0587158203125, -0.0193023681640625, 0.0242462158203125, 0.0270538330078125, -0.0276031494140625, 0.051483154296875, -0.07440185546875, -0.0645751953125, -0.038543701171875, 0.05377197265625, -0.0028667449951171875, -0.0272979736328125, -0.0098114013671875, 0.00012755393981933594, 0.0112762451171875, -0.0184783935546875, -0.049652099609375, 0.0338134765625, 0.0117950439453125, 0.005176544189453125, -0.024749755859375, -0.0018815994262695312, -0.004611968994140625, 0.0128326416015625, -0.000002682209014892578, 0.0019741058349609375, 0.01007080078125, -0.00485992431640625, 0.0133514404296875, -0.047760009765625, -0.01293182373046875, 0.00030040740966796875, -0.0002899169921875, -0.005474090576171875, -0.001796722412109375, -0.033538818359375, -0.01012420654296875, -0.0168914794921875, -0.02978515625, -0.0268707275390625, -0.0119171142578125, 0.0100860595703125, -0.030059814453125, -0.0132904052734375, 0.037384033203125, -0.0029811859130859375, 0.00513458251953125, -0.021636962890625, -0.0183868408203125, -0.0222930908203125, -0.0239410400390625, 0.01517486572265625, -0.0016889572143554688, -0.0002536773681640625, 0.060302734375, 0.0880126953125, 0.04498291015625, 0.00733184814453125, 0.08477783203125, -0.00897979736328125, 0.0166015625, -0.048248291015625, -0.024261474609375, -0.055450439453125, -0.01239013671875, -0.00604248046875, -0.0076751708984375, 0.01068878173828125, 0.037567138671875, -0.0185394287109375, -0.032073974609375, 0.00946044921875, 0.003330230712890625, 0.00931549072265625, -0.0439453125, 0.025726318359375, 0.0298614501953125, -0.0202789306640625, -0.005786895751953125, 0.004756927490234375, 0.018035888671875, -0.0023212432861328125, -0.005245208740234375, 0.019073486328125, -0.03448486328125, -0.0313720703125, 0.043853759765625, -0.02508544921875, -0.053985595703125, -0.004085540771484375, -0.02081298828125, 0.01006317138671875, 0.018310546875, 0.0300140380859375, 0.02581787109375, -0.01065826416015625, -0.02020263671875, 0.01111602783203125, 0.02398681640625, 0.0235748291015625, 0.0007648468017578125, -0.056671142578125, -0.0243377685546875, -0.030609130859375, 0.00453948974609375, -0.0021877288818359375, -0.0131683349609375, 0.057403564453125, 0.0008482933044433594, 0.003108978271484375, -0.029693603515625, -0.04449462890625, -0.0181732177734375, -0.067138671875, -0.00719451904296875, 0.01123046875, 0.0002639293670654297, 0.02313232421875, -0.015869140625, -0.0028285980224609375, -0.031402587890625, -0.0289306640625, -0.0151824951171875, -0.00032901763916015625, 0.0120391845703125, 0.0204620361328125, 0.004016876220703125, 0.01245880126953125, -0.01145172119140625, 0.05084228515625, -0.01224517822265625, -0.033477783203125, 0.01560211181640625, 0.0233154296875, 0.0218505859375, -0.008544921875, 0.0234222412109375, 0.040802001953125, 0.041046142578125, -0.001190185546875, 0.01523590087890625, 0.0127105712890625, -0.0186920166015625, -0.0472412109375, -0.0033283233642578125, -0.01313018798828125, -0.01019287109375, -0.003131866455078125, 0.0284881591796875, -0.0193023681640625, 0.041290283203125, -0.0171661376953125, 0.0238800048828125, -0.006732940673828125, 0.0211944580078125, 0.012786865234375, 0.028350830078125, 0.010833740234375, 0.002593994140625, -0.017730712890625, -0.007030487060546875, -0.006244659423828125, 0.0159912109375, -0.004131317138671875, -0.00124359130859375, -0.0270233154296875, -0.0006914138793945312, -0.0086822509765625, -0.04052734375, -0.0251312255859375, 0.039154052734375, 0.09588623046875, -0.07073974609375, 0.00313568115234375, -0.07745361328125, 0.03948974609375, -0.01861572265625, -0.0806884765625, 0.072998046875, 0.0535888671875, 0.0662841796875, -0.01036834716796875, 0.000667572021484375, 0.020050048828125, -0.0240325927734375, 0.0130157470703125, 0.03472900390625, 0.03729248046875, 0.00507354736328125, -0.00919342041015625, -0.024505615234375, 0.01654052734375, -0.052093505859375, 0.0265045166015625, -0.031494140625, 0.0092620849609375, 0.0246734619140625, 0.0023746490478515625, -0.01342010498046875, 0.01885986328125, -0.0699462890625, 0.0131988525390625, 0.040496826171875, 0.0108795166015625, 0.01399993896484375, -0.01434326171875, 0.0081024169921875, -0.0052337646484375, -0.003925323486328125, -0.011199951171875, -0.00518035888671875, -0.02593994140625, 0.053375244140625, 0.010040283203125, 0.02435302734375, -0.028961181640625, 0.01490020751953125, 0.0172882080078125, 0.0007624626159667969, 0.0012331008911132812, -0.03448486328125, -0.0897216796875, -0.01358795166015625, -0.047088623046875, 0.063720703125, -0.0014142990112304688, -0.048065185546875, -0.012664794921875, 0.0282745361328125, -0.039398193359375, -0.017486572265625, -0.00588226318359375, -0.05657958984375, -0.02557373046875, 0.0156707763671875, -0.0030956268310546875, -0.023681640625, 0.0180816650390625, -0.0006680488586425781, -0.04107666015625, 0.05072021484375, -0.03350830078125, -0.0240936279296875, 0.016510009765625, -0.09600830078125, 0.0843505859375, -0.07489013671875, 0.06207275390625, 0.08087158203125, -0.0369873046875, 0.04296875, -0.0017538070678710938, 0.005279541015625, -0.0216522216796875, 0.0215606689453125, -0.01268768310546875, -0.038909912109375, -0.0175018310546875, 0.0292205810546875, 0.0183563232421875, -0.00423431396484375, 0.00792694091796875, -0.0281829833984375, -0.00644683837890625, 0.0086822509765625, -0.08123779296875, -0.0740966796875, 0.02734375, -0.09197998046875, -0.017425537109375, 0.0038700103759765625, -0.050445556640625, -0.019073486328125, 0.0321044921875, -0.0115509033203125, 0.0281982421875, 0.006397247314453125, -0.0413818359375, 0.0211334228515625, -0.04180908203125, 0.031707763671875, -0.00786590576171875, 0.00787353515625, -0.00820159912109375, 0.1209716796875, 0.00614166259765625, -0.0958251953125, -0.045989990234375, 0.04364013671875, -0.03326416015625, -0.0092620849609375, 0.01216888427734375, -0.03497314453125, -0.0144195556640625, -0.00986480712890625, 0.0005002021789550781, 0.01495361328125, 0.0010690689086914062, 0.01117706298828125, 0.014373779296875, 0.014617919921875, 0.01407623291015625, -0.00921630859375, -0.01087188720703125, 0.0276031494140625, -0.018341064453125, -0.03607177734375, -0.011077880859375, -0.0252838134765625, -0.0660400390625, -0.007625579833984375, 0.042877197265625, -0.0007524490356445312, -0.006374359130859375, -0.04254150390625, -0.0047607421875, -0.0229339599609375, 0.01611328125, -0.05364990234375, 0.050811767578125, 0.0166778564453125, 0.01459503173828125, -0.029571533203125, -0.0030612945556640625, -0.0287322998046875, 0.0160675048828125, 0.002124786376953125, -0.0019207000732421875, -0.003376007080078125, 0.0279693603515625, 0.0005545616149902344, -0.039337158203125, 0.03302001953125, -0.00899505615234375, 0.014190673828125, -0.0229949951171875, -0.034637451171875, 0.00009953975677490234, 0.08111572265625, -0.0379638671875, -0.0166015625, -0.0305633544921875, 0.0041961669921875, -0.0010766983032226562, -0.05859375, 0.007747650146484375, -0.0195159912109375, -0.01934814453125, -0.0039825439453125, -0.03466796875, 0.0111846923828125, -0.0207061767578125, 0.040771484375, -0.0024700164794921875, -0.025543212890625, 0.038238525390625, 0.00989532470703125, -0.022674560546875, -0.0144195556640625, -0.020355224609375, -0.0418701171875, -0.0345458984375, 0.0171356201171875, -0.0933837890625, -0.037078857421875, 0.036376953125, 0.07818603515625, 0.0023097991943359375, -0.07952880859375, -0.014892578125, 0.058563232421875, 0.0309906005859375, 0.05718994140625, 0.021209716796875, -0.01043701171875, -0.0018558502197265625, -0.0208740234375, 0.034912109375, -0.0299072265625, -0.01155853271484375, -0.037933349609375, 0.015350341796875, -0.007053375244140625, -0.04864501953125, -0.0035877227783203125, -0.039337158203125, -0.0009760856628417969, -0.06915283203125, -0.0224151611328125, -0.0040740966796875, 0.0005588531494140625, -0.03375244140625, 0.00524139404296875, -0.0107879638671875, -0.05511474609375, 0.04241943359375, 0.0160064697265625, -0.033050537109375, 0.00047016143798828125, 0.05914306640625, 0.01331329345703125, -0.029266357421875, -0.051239013671875, -0.004543304443359375, 0.0044097900390625, 0.0045928955078125, 0.03936767578125, -0.0073089599609375, -0.00299072265625, 0.03277587890625, -0.0253753662109375, -0.0214080810546875, -0.01531982421875, 0.0215606689453125, -0.0133514404296875, -0.01486968994140625, 0.0089569091796875, -0.04058837890625, 0.062469482421875, 0.03887939453125, -0.01262664794921875, -0.0236663818359375, -0.01464080810546875, 0.048004150390625, -0.0020122528076171875, 0.015167236328125, -0.03118896484375, -0.00879669189453125, -0.0032787322998046875, 0.0462646484375, 0.03240966796875, -0.01192474365234375, 0.0278167724609375, 0.01146697998046875, 0.0572509765625, -0.00592803955078125, 0.045684814453125, 0.0692138671875, -0.00469970703125, 0.047149658203125, 0.0123138427734375, -0.0195465087890625, -0.0159759521484375, -0.004619598388671875, 0.017974853515625, -0.0110931396484375, -0.033966064453125, 0.01389312744140625, -0.00583648681640625, 0.0205230712890625, 0.03057861328125, -0.0021038055419921875, 0.02947998046875, 0.0018367767333984375, -0.0114898681640625, -0.018341064453125, -0.0238037109375, -0.0293121337890625, -0.051849365234375, 0.0029697418212890625, 0.0106964111328125, -0.00809478759765625, 0.0294647216796875, 0.048828125, -0.0038814544677734375, 0.04058837890625, -0.020721435546875, -0.006195068359375, 0.0030689239501953125, 0.01031494140625, 0.03216552734375, 0.006374359130859375, -0.0214080810546875, -0.006122589111328125, 0.019500732421875, -0.007579803466796875, -0.01100921630859375, 0.0394287109375, -0.0018320083618164062, 0.0042572021484375, 0.01200103759765625, -0.0134429931640625, 0.02178955078125, -0.01430511474609375, 0.021392822265625, -0.0044097900390625, -0.01204681396484375, -0.027984619140625, -0.03338623046875, 0.028076171875, -0.00981903076171875, 0.0036468505859375, -0.027923583984375, 0.00908660888671875, 0.00882720947265625, -0.0198211669921875, -0.005710601806640625, -0.007110595703125, -0.0033130645751953125, -0.0360107421875, -0.01499176025390625, -0.002010345458984375, -0.052978515625, -0.03857421875, 0.0090179443359375, 0.006805419921875, 0.00408172607421875, -0.0210418701171875, 0.0362548828125, -0.01629638671875, -0.016510009765625, -0.0101165771484375, 0.02874755859375, 0.015777587890625, 0.0048828125, -0.050933837890625, -0.008331298828125, -0.052459716796875, -0.030426025390625, -0.007785797119140625, 0.007549285888671875, -0.046630859375, 0.0010194778442382812, 0.049346923828125, 0.014984130859375, 0.0026454925537109375, -0.076904296875, -0.0227813720703125, -0.011810302734375, 0.046661376953125, 0.0169677734375, -0.0182952880859375, 0.04315185546875, -0.0000903010368347168, 0.0204620361328125, -0.008331298828125, 0.0036983489990234375, 0.00624847412109375, -0.0121002197265625, 0.01251983642578125, -0.057159423828125, -0.0261993408203125, 0.0169219970703125, -0.07891845703125, -0.00939178466796875, 0.01056671142578125, -0.0032176971435546875, -0.00921630859375, -0.0186920166015625, -0.0009331703186035156, -0.01464080810546875, 0.0253448486328125, -0.019561767578125, -0.031890869140625, 0.037933349609375, 0.0184783935546875, 0.0198822021484375, -0.026702880859375, -0.0274200439453125, 0.006649017333984375, 0.01788330078125, 0.01189422607421875, -0.024169921875, -0.038604736328125, 0.0248565673828125, 0.054412841796875, 0.025360107421875, 0.04498291015625, 0.01273345947265625, 0.00902557373046875, -0.00460052490234375, -0.0164337158203125, 0.0298614501953125, 0.032958984375, 0.029449462890625, -0.020355224609375, 0.03179931640625, 0.0170135498046875, -0.0177764892578125, -0.0196685791015625, 0.0310211181640625, -0.0011005401611328125, -0.05303955078125, 0.00501251220703125, -0.03515625, -0.0022907257080078125, 0.042083740234375, 0.0103759765625, -0.00521087646484375, -0.01027679443359375, 0.036468505859375, 0.0010614395141601562, 0.005611419677734375, 0.0212249755859375, 0.0005140304565429688, -0.013031005859375, -0.0189971923828125, 0.024505615234375, 0.0091552734375, -0.0225830078125, 0.0188140869140625, 0.004047393798828125, 0.00853729248046875, 0.0011835098266601562, 0.006443023681640625, 0.0204010009765625, -0.0104827880859375, -0.0704345703125, 0.01189422607421875, -0.040618896484375, -0.023956298828125, 0.005741119384765625, 0.029022216796875, -0.0106964111328125, 0.06256103515625, -0.02520751953125, 0.0135650634765625, 0.047027587890625, -0.051849365234375, -0.08154296875, -0.00711822509765625, 0.04693603515625, 0.038726806640625, -0.048858642578125, 0.031341552734375, -0.06378173828125, -0.0241851806640625, -0.0158538818359375, 0.006496429443359375, 0.048919677734375, 0.0034427642822265625, -0.020050048828125, 0.0242462158203125, 0.01837158203125, -0.017364501953125, -0.0124053955078125, -0.0070343017578125, -0.055084228515625, -0.0269927978515625, 0.0016613006591796875, -0.0256805419921875, -0.004810333251953125, -0.008819580078125, -0.060089111328125, 0.12548828125, -0.03460693359375, 0.0166015625, 0.0294342041015625, 0.047698974609375, -0.0361328125, 0.021728515625, -0.0220947265625, 0.0167236328125, -0.032257080078125, 0.06280517578125, -0.049957275390625, -0.01263427734375, 0.0265045166015625, 0.056884765625, 0.04656982421875, 0.0027065277099609375, -0.02911376953125, -0.0140228271484375, 0.045196533203125, 0.061767578125, 0.0204620361328125, 0.0106964111328125, 0.0015592575073242188, 0.04962158203125, 0.04229736328125, -0.057098388671875, 0.0249481201171875, -0.00261688232421875, -0.012603759765625, 0.040496826171875, 0.00539398193359375, 0.005901336669921875, -0.00949859619140625, 0.02789306640625, -0.0478515625, -0.0003898143768310547, 0.03912353515625, -0.0023040771484375, 0.0114898681640625, 0.051788330078125, 0.06011962890625, -0.0657958984375, -0.00925445556640625, -0.032196044921875, 0.055206298828125, 0.01146697998046875, 0.0224151611328125, 0.0226593017578125, -0.005191802978515625, 0.1014404296875, 0.01464080810546875, 0.01055908203125, 0.0361328125, 0.00519561767578125, 0.0648193359375, 0.045684814453125, 0.041839599609375, 0.0012369155883789062, 0.0215301513671875, 0.00428009033203125, 0.0667724609375, -0.05694580078125, -0.0596923828125, -0.0004563331604003906, 0.01235198974609375, 0.006946563720703125, 0.0253143310546875, 0.00563812255859375, 0.0166168212890625, 0.059967041015625, 0.0004925727844238281, -0.01483917236328125, -0.01009368896484375, 0.0023250579833984375, -0.005573272705078125, 0.0155181884765625, 0.01493072509765625, -0.011993408203125, 0.0010175704956054688, -0.0177764892578125, 0.0137176513671875, 0.030303955078125, 0.006740570068359375, 0.022613525390625, -0.053863525390625, -0.00797271728515625, 0.00785064697265625, 0.005611419677734375, -0.03900146484375, -0.0019292831420898438, -0.041168212890625, -0.0648193359375, -0.02032470703125, 0.044158935546875, 0.0294647216796875, -0.00650787353515625, 0.0302276611328125, 0.044097900390625, -0.018524169921875, -0.0181884765625, 0.033203125, -0.003742218017578125, -0.013519287109375, -0.0066680908203125, -0.023223876953125, 0.00370025634765625, -0.0161590576171875, -0.022247314453125, 0.044464111328125, -0.00501251220703125, 0.0180816650390625, -0.0264739990234375, 0.019073486328125, -0.037078857421875, 0.032684326171875, 0.031646728515625, 0.0517578125, 0.05010986328125, -0.077880859375, -0.003238677978515625, -0.0263671875, -0.0682373046875, 0.0262603759765625, 0.03662109375, -0.037078857421875, 0.007251739501953125, 0.019378662109375, -0.02032470703125, 0.0172576904296875, -0.003284454345703125, 0.0170135498046875, 0.0330810546875, 0.015472412109375, 0.0197906494140625, -0.04437255859375, -0.034210205078125, 0.0043182373046875, 0.0361328125, -0.018280029296875, 0.0406494140625, -0.0007233619689941406, 0.0016689300537109375, 0.0113372802734375, -0.01025390625, 0.0113372802734375, -0.0065460205078125, 0.027130126953125, -0.0223388671875, -0.00025010108947753906, -0.0132598876953125, -0.0045318603515625, -0.00821685791015625, 0.051788330078125, -0.059326171875, 0.0137481689453125, -0.036346435546875, 0.0192108154296875, -0.043121337890625, -0.0082244873046875, -0.016845703125, 0.0157318115234375, -0.026641845703125, -0.01454925537109375, 0.049407958984375, -0.02154541015625, -0.060699462890625, 0.044921875, 0.0247039794921875, -0.00827789306640625, 0.033203125, -0.019927978515625, 0.05859375, 0.037567138671875, -0.0215606689453125, 0.0118560791015625, -0.0025482177734375, -0.039947509765625, 0.0037689208984375, 0.004543304443359375, 0.0108489990234375, -0.01145172119140625, 0.00505828857421875, -0.02862548828125, -0.017852783203125, -0.01351165771484375, -0.038421630859375, -0.01271820068359375, 0.0203399658203125, -0.01476287841796875, -0.0164031982421875, 0.03460693359375, -0.01580810546875, 0.005657196044921875, -0.0098724365234375, -0.010498046875, 0.0102691650390625, -0.043243408203125, -0.0552978515625, 0.01197052001953125, 0.00531005859375, 0.002536773681640625, -0.05419921875, 0.0733642578125, -0.038848876953125, -0.00748443603515625, -0.036224365234375, -0.0484619140625, 0.01309967041015625, 0.0159759521484375, -0.0206298828125, 0.03173828125, -0.057830810546875, -0.056915283203125, -0.0183258056640625, -0.00650787353515625, 0.036895751953125, -0.01910400390625, -0.053680419921875, -0.04132080078125, -0.0149078369140625, 0.006099700927734375, 0.00980377197265625, 0.01141357421875, 0.04669189453125, 0.007328033447265625, -0.049560546875, -0.10498046875, 0.018951416015625, -0.060760498046875, 0.024017333984375, 0.004634857177734375, -0.001117706298828125, 0.00962066650390625, -0.019317626953125, -0.058135986328125, 0.0306243896484375, -0.0132293701171875, -0.0232086181640625, -0.0238800048828125, -0.0171966552734375, -0.02874755859375, 0.0276641845703125, 0.02362060546875, -0.0426025390625, -0.02215576171875, 0.017242431640625, 0.00910186767578125, 0.043365478515625, 0.0003180503845214844, 0.01043701171875, -0.0404052734375, 0.02081298828125, 0.0026836395263671875, 0.02398681640625, 0.017425537109375, -0.01081085205078125, 0.0379638671875, 0.0282745361328125, -0.037750244140625, 0.0157318115234375, -0.0102996826171875, -0.01849365234375, 0.0031948089599609375, -0.022186279296875, -0.05645751953125, -0.03466796875, 0.07275390625, 0.050384521484375, 0.025054931640625, -0.0246429443359375, 0.0062255859375, -0.0158233642578125, -0.0233154296875, -0.00849151611328125, 0.00672149658203125, -0.0386962890625, 0.004657745361328125, -0.0017910003662109375, -0.0309600830078125, -0.01348876953125, -0.01302337646484375, -0.047119140625, -0.0005769729614257812, -0.03607177734375, -0.006378173828125, -0.007175445556640625, 0.00804901123046875, -0.008209228515625, -0.01218414306640625, -0.0341796875, 0.004489898681640625, 0.0004525184631347656, -0.0443115234375, 0.015289306640625, -0.0027179718017578125, 0.0261383056640625, -0.0302886962890625, 0.0023670196533203125, 0.0110321044921875, 0.0040435791015625, -0.0242919921875, 0.0127716064453125, 0.0225830078125, 0.0022068023681640625, -0.01261138916015625, -0.00372314453125, 0.0124359130859375, 0.002658843994140625, -0.0340576171875, 0.057952880859375, -0.0038738250732421875, 0.05804443359375, 0.027252197265625, -0.000032901763916015625, -0.02569580078125, 0.0018911361694335938, -0.00023889541625976562, -0.036407470703125, -0.007343292236328125, 0.018707275390625, -0.032073974609375, -0.0265045166015625, 0.004283905029296875, 0.0008668899536132812, -0.009857177734375, 0.003894805908203125 ]
0119cc087c62cc7042479078564ad6186c46a4af
Wordpress Stackexchange Q: Wordpress custom taxonomy description for each post? In a Wordpress blog, I'd like to put the term description of a specific custom taxonomy in the footer of each article. Is this possible? I've tried <?php term_description( $term_id, $taxonomy ) ?> but no luck. Unless I'm using it incorrectly? When used, nothing shows up. A: sounds like a silly question but are you echo'ing it out? <?php echo term_description($term_id, $taxonomy); ?> otherwise you'll need to get the current post's terms (where my_term is your custom taxonomy): $terms = wp_get_post_terms( $post->ID, 'my_term' ) then get the description for the first term in ther array: echo term_description($terms[0]->term_id, 'my_term'); I've not tested this but it should put you in the right direction. So here's the full code below (should go in the single.php or loop.php or wherever your single post is created)...paste it inside the loop: <?php $my_taxonomy = 'projects'; // set this to whatever your custom taxonomy is called $terms = wp_get_post_terms( $post->ID, $my_taxonomy ); // this gets all the terms attached to the post for your custom taxonomy echo term_description($terms[0]->term_id, $my_taxonomy); // this displays the description for the first term in the $terms array ?> Hope it helps, Dave
Q: Wordpress custom taxonomy description for each post? In a Wordpress blog, I'd like to put the term description of a specific custom taxonomy in the footer of each article. Is this possible? I've tried <?php term_description( $term_id, $taxonomy ) ?> but no luck. Unless I'm using it incorrectly? When used, nothing shows up. A: sounds like a silly question but are you echo'ing it out? <?php echo term_description($term_id, $taxonomy); ?> otherwise you'll need to get the current post's terms (where my_term is your custom taxonomy): $terms = wp_get_post_terms( $post->ID, 'my_term' ) then get the description for the first term in ther array: echo term_description($terms[0]->term_id, 'my_term'); I've not tested this but it should put you in the right direction. So here's the full code below (should go in the single.php or loop.php or wherever your single post is created)...paste it inside the loop: <?php $my_taxonomy = 'projects'; // set this to whatever your custom taxonomy is called $terms = wp_get_post_terms( $post->ID, $my_taxonomy ); // this gets all the terms attached to the post for your custom taxonomy echo term_description($terms[0]->term_id, $my_taxonomy); // this displays the description for the first term in the $terms array ?> Hope it helps, Dave
wordpress
{ "language": "en", "length": 198, "provenance": "stackexchange_00019.jsonl.gz:413753", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30788" }
[ 0.032379150390625, 0.0050048828125, -0.0168914794921875, -0.00896453857421875, 0.009918212890625, -0.036590576171875, 0.0187225341796875, -0.0257110595703125, -0.03302001953125, 0.030120849609375, -0.0278778076171875, 0.00173187255859375, -0.0239410400390625, -0.021575927734375, 0.00194549560546875, -0.045867919921875, 0.03466796875, 0.006725311279296875, 0.05780029296875, -0.0030670166015625, 0.0172271728515625, 0.0198211669921875, 0.043426513671875, 0.035980224609375, 0.0213775634765625, -0.054351806640625, 0.0728759765625, -0.01904296875, 0.023040771484375, -0.005603790283203125, 0.0260009765625, -0.0011167526245117188, 0.00383758544921875, 0.009979248046875, 0.013092041015625, -0.050628662109375, 0.0159454345703125, -0.011993408203125, -0.00411224365234375, 0.046875, 0.05126953125, -0.0293426513671875, 0.0011968612670898438, 0.0039520263671875, 0.01134490966796875, -0.032470703125, 0.041839599609375, -0.0377197265625, -0.00031685829162597656, -0.04473876953125, 0.034942626953125, 0.0005993843078613281, 0.0615234375, -0.045623779296875, -0.03375244140625, -0.00811767578125, -0.01247406005859375, -0.004680633544921875, 0.021484375, -0.050048828125, -0.028961181640625, -0.0073394775390625, 0.049285888671875, 0.043609619140625, -0.020416259765625, 0.0011234283447265625, 0.0088958740234375, 0.0012769699096679688, -0.051422119140625, -0.0552978515625, 0.0264739990234375, -0.0191497802734375, 0.004383087158203125, -0.01104736328125, -0.003261566162109375, -0.04119873046875, 0.035186767578125, -0.0301361083984375, -0.022064208984375, 0.023406982421875, 0.0128173828125, -0.0271453857421875, -0.0167694091796875, 0.0355224609375, -0.0166778564453125, 0.050933837890625, -0.003986358642578125, -0.0182037353515625, -0.0203094482421875, -0.0250701904296875, -0.01067352294921875, -0.0134124755859375, -0.040435791015625, 0.0016422271728515625, -0.004302978515625, -0.0185546875, 0.005336761474609375, 0.0616455078125, -0.046661376953125, 0.0008711814880371094, -0.029144287109375, -0.0146026611328125, 0.03546142578125, -0.056182861328125, 0.00774383544921875, -0.0028247833251953125, 0.0007348060607910156, -0.023284912109375, 0.027984619140625, 0.0222930908203125, -0.0161285400390625, 0.007659912109375, -0.01371002197265625, -0.0174407958984375, 0.01605224609375, 0.00742340087890625, -0.03643798828125, 0.0218658447265625, -0.00945281982421875, -0.011199951171875, 0.0221710205078125, 0.04254150390625, -0.00659942626953125, 0.0178985595703125, -0.028533935546875, -0.00785064697265625, 0.00646209716796875, -0.052520751953125, -0.0103607177734375, 0.0230865478515625, -0.0281829833984375, 0.0146331787109375, 0.0675048828125, 0.030181884765625, 0.00023353099822998047, -0.0184478759765625, 0.021728515625, 0.026458740234375, -0.01080322265625, -0.0048828125, 0.00949859619140625, -0.00087738037109375, 0.01555633544921875, -0.0100555419921875, -0.0491943359375, 0.0024738311767578125, 0.0244903564453125, 0.040283203125, -0.03106689453125, -0.0452880859375, 0.01090240478515625, -0.00689697265625, 0.051177978515625, 0.0019779205322265625, -0.05511474609375, -0.0134429931640625, 0.0277862548828125, -0.029998779296875, -0.034576416015625, -0.052490234375, 0.0140228271484375, 0.0008902549743652344, -0.0168609619140625, 0.01129913330078125, -0.00200653076171875, -0.005687713623046875, 0.00948333740234375, 0.004650115966796875, 0.0139923095703125, 0.017242431640625, 0.00812530517578125, 0.007068634033203125, 0.00537109375, 0.00713348388671875, -0.0018148422241210938, -0.01152801513671875, -0.04095458984375, 0.00334930419921875, 0.04541015625, 0.00441741943359375, -0.03204345703125, -0.038604736328125, 0.026641845703125, -0.01505279541015625, -0.0282745361328125, 0.01157379150390625, 0.00955963134765625, 0.049652099609375, 0.0122833251953125, 0.0261688232421875, 0.0001894235610961914, 0.0070648193359375, -0.0931396484375, 0.047027587890625, 0.0040740966796875, 0.006404876708984375, -0.0460205078125, -0.002452850341796875, -0.01104736328125, -0.017730712890625, -0.005870819091796875, -0.0079803466796875, 0.01151275634765625, 0.0013132095336914062, -0.022369384765625, -0.0008144378662109375, -0.007106781005859375, 0.0280303955078125, -0.0012111663818359375, -0.022735595703125, 0.0180206298828125, -0.02301025390625, -0.004352569580078125, -0.034423828125, -0.0582275390625, -0.00135040283203125, -0.032073974609375, 0.0264892578125, -0.0036373138427734375, 0.01096343994140625, 0.018646240234375, -0.0127410888671875, 0.033935546875, 0.0482177734375, 0.041748046875, 0.0163421630859375, -0.030059814453125, -0.0018444061279296875, 0.030426025390625, 0.0250091552734375, -0.04559326171875, 0.001415252685546875, 0.029754638671875, 0.0098876953125, -0.003925323486328125, 0.0187225341796875, 0.035064697265625, -0.066162109375, -0.006252288818359375, 0.033355712890625, 0.0209503173828125, 0.03448486328125, -0.0316162109375, -0.01348114013671875, 0.07073974609375, 0.009368896484375, 0.00527191162109375, -0.0188751220703125, 0.01904296875, 0.04693603515625, 0.00533294677734375, 0.0178985595703125, 0.003376007080078125, -0.020751953125, 0.022735595703125, 0.038360595703125, -0.035369873046875, -0.033416748046875, 0.032440185546875, 0.004058837890625, -0.001071929931640625, -0.0221710205078125, -0.0003457069396972656, -0.006557464599609375, 0.04150390625, 0.04241943359375, 0.0325927734375, 0.033050537109375, -0.08099365234375, 0.03240966796875, 0.036407470703125, 0.04034423828125, -0.0029239654541015625, 0.01229095458984375, 0.0155029296875, -0.0318603515625, -0.0311431884765625, 0.006778717041015625, 0.01210784912109375, -0.01212310791015625, 0.029815673828125, 0.0650634765625, -0.00949859619140625, -0.00365447998046875, -0.018218994140625, -0.07501220703125, -0.0102691650390625, 0.061614990234375, -0.0670166015625, -0.0400390625, -0.004802703857421875, 0.05889892578125, -0.019439697265625, 0.0012788772583007812, -0.0034618377685546875, 0.0241241455078125, -0.03594970703125, -0.050628662109375, 0.0504150390625, -0.0236358642578125, -0.004505157470703125, 0.07684326171875, 0.040313720703125, -0.0004088878631591797, -0.00170135498046875, -0.01335906982421875, -0.0005006790161132812, -0.01160430908203125, -0.02264404296875, 0.00629425048828125, -0.055450439453125, 0.01165008544921875, 0.01031494140625, 0.0772705078125, -0.036834716796875, -0.053680419921875, -0.0070037841796875, 0.007144927978515625, -0.036590576171875, -0.00812530517578125, 0.043701171875, -0.0556640625, 0.00876617431640625, -0.02923583984375, -0.044189453125, -0.034820556640625, -0.00473785400390625, -0.001041412353515625, 0.005527496337890625, -0.07159423828125, -0.058929443359375, -0.076416015625, -0.0794677734375, 0.0225372314453125, 0.021026611328125, 0.019805908203125, 0.01012420654296875, 0.054962158203125, 0.0283050537109375, -0.030975341796875, 0.040557861328125, 0.038665771484375, -0.0220489501953125, 0.04095458984375, 0.0186920166015625, -0.0262603759765625, 0.0017938613891601562, -0.004085540771484375, -0.01560211181640625, 0.0224151611328125, -0.0108642578125, -0.00547027587890625, -0.0270538330078125, -0.005512237548828125, 0.01343536376953125, -0.031494140625, 0.0127716064453125, 0.00789642333984375, 0.0008897781372070312, -0.040069580078125, -0.0005168914794921875, -0.01183319091796875, -0.01239013671875, 0.00447845458984375, 0.003124237060546875, -0.0172576904296875, -0.03411865234375, 0.035797119140625, -0.052581787109375, -0.0008525848388671875, -0.016510009765625, -0.0273895263671875, -0.00374603271484375, -0.01251220703125, -0.03497314453125, 0.031402587890625, 0.01224517822265625, -0.01148223876953125, 0.0284881591796875, 0.014984130859375, 0.0285797119140625, -0.01103973388671875, 0.0147552490234375, -0.060943603515625, -0.06097412109375, 0.03387451171875, -0.0689697265625, 0.0017757415771484375, -0.036285400390625, -0.006931304931640625, 0.00873565673828125, 0.092041015625, -0.072265625, -0.01104736328125, 0.0165863037109375, -0.00373077392578125, 0.047149658203125, 0.01434326171875, -0.048187255859375, -0.051116943359375, -0.091796875, 0.007843017578125, 0.00443267822265625, -0.037445068359375, -0.013092041015625, 0.045867919921875, -0.07049560546875, -0.031829833984375, 0.0032253265380859375, -0.0189056396484375, -0.0019330978393554688, 0.03167724609375, -0.03387451171875, 0.01026153564453125, -0.0016088485717773438, -0.05328369140625, -0.04541015625, -0.007518768310546875, 0.0301666259765625, 0.01407623291015625, -0.01416778564453125, -0.01227569580078125, 0.019073486328125, 0.06475830078125, 0.0290069580078125, -0.00022804737091064453, -0.005321502685546875, -0.004283905029296875, 0.004638671875, -0.00885772705078125, -0.012664794921875, -0.01971435546875, -0.0283966064453125, -0.0181121826171875, 0.005260467529296875, 0.059722900390625, -0.003986358642578125, 0.021087646484375, 0.01197052001953125, -0.009307861328125, -0.0250396728515625, -0.0207061767578125, -0.0299072265625, 0.00563812255859375, -0.023773193359375, -0.01320648193359375, -0.0307159423828125, -0.03857421875, 0.0283203125, -0.00524139404296875, -0.0289459228515625, 0.0276641845703125, 0.062286376953125, 0.0156402587890625, -0.01465606689453125, -0.0894775390625, 0.0092315673828125, 0.05242919921875, -0.0091400146484375, 0.029876708984375, 0.01271820068359375, -0.045166015625, 0.1025390625, 0.02044677734375, -0.0009093284606933594, -0.006687164306640625, 0.052978515625, -0.0070953369140625, -0.045074462890625, 0.036376953125, -0.0240325927734375, -0.01366424560546875, -0.0377197265625, -0.062103271484375, 0.0223541259765625, -0.0034122467041015625, 0.03460693359375, -0.045989990234375, 0.083251953125, -0.012908935546875, -0.035919189453125, 0.0232391357421875, -0.0029926300048828125, 0.01279449462890625, 0.0039825439453125, 0.00649261474609375, 0.0005846023559570312, -0.027557373046875, -0.01495361328125, 0.00319671630859375, -0.016632080078125, 0.026214599609375, -0.0005083084106445312, 0.0163116455078125, -0.00940704345703125, 0.0007977485656738281, -0.00310516357421875, 0.0745849609375, -0.0281219482421875, -0.06463623046875, 0.003204345703125, -0.0257110595703125, 0.038177490234375, 0.043212890625, 0.0175018310546875, 0.04193115234375, 0.01318359375, 0.0028209686279296875, -0.00452423095703125, -0.024810791015625, -0.004482269287109375, -0.0255889892578125, 0.044952392578125, 0.01103973388671875, -0.00730133056640625, -0.0020599365234375, 0.04534912109375, -0.006206512451171875, 0.0157623291015625, -0.01161956787109375, 0.01049041748046875, -0.0182342529296875, 0.0609130859375, 0.0242919921875, -0.032501220703125, -0.00046753883361816406, 0.0302734375, -0.005100250244140625, -0.046966552734375, 0.0206298828125, -0.0321044921875, 0.037261962890625, -0.022705078125, -0.040863037109375, 0.05419921875, -0.042327880859375, -0.00891876220703125, -0.01320648193359375, -0.044342041015625, -0.044952392578125, 0.00799560546875, 0.0032024383544921875, -0.00689697265625, -0.0240631103515625, -0.027008056640625, 0.047698974609375, -0.031494140625, 0.05645751953125, -0.06573486328125, 0.0367431640625, -0.016021728515625, -0.003566741943359375, -0.038238525390625, 0.0143890380859375, 0.007198333740234375, -0.033477783203125, -0.06695556640625, 0.003398895263671875, -0.0289154052734375, 0.032318115234375, -0.03375244140625, 0.03155517578125, -0.0157012939453125, -0.0207977294921875, -0.040008544921875, 0.0155029296875, 0.032562255859375, 0.040771484375, -0.0250091552734375, 0.010284423828125, -0.046051025390625, 0.0018062591552734375, -0.01320648193359375, -0.066650390625, -0.0198822021484375, -0.0333251953125, -0.00780487060546875, 0.0068817138671875, 0.0238037109375, 0.04638671875, -0.00821685791015625, 0.03216552734375, -0.01012420654296875, 0.01531982421875, -0.004665374755859375, 0.00848388671875, 0.006656646728515625, 0.028717041015625, -0.0014400482177734375, -0.0012845993041992188, 0.006023406982421875, -0.0322265625, -0.01099395751953125, -0.093017578125, -0.029937744140625, 0.0008254051208496094, -0.041778564453125, 0.06268310546875, 0.0173492431640625, 0.00798797607421875, -0.0009403228759765625, 0.01385498046875, 0.0265960693359375, -0.00855255126953125, -0.021240234375, 0.0092926025390625, -0.029266357421875, 0.049652099609375, -0.024322509765625, 0.02301025390625, 0.0155487060546875, 0.0248870849609375, 0.0211181640625, -0.03314208984375, 0.033935546875, 0.00856781005859375, -0.00007957220077514648, 0.0089569091796875, 0.02630615234375, 0.0288848876953125, 0.0478515625, 0.01157379150390625, 0.047332763671875, -0.0024890899658203125, 0.01690673828125, -0.017578125, -0.0242767333984375, 0.029693603515625, 0.00905609130859375, 0.007434844970703125, 0.024871826171875, -0.017181396484375, -0.037933349609375, -0.0110015869140625, 0.00882720947265625, -0.006198883056640625, 0.00878143310546875, 0.0171051025390625, 0.01490020751953125, 0.0266265869140625, 0.0181732177734375, -0.0056915283203125, -0.0144195556640625, -0.022125244140625, 0.007415771484375, -0.036712646484375, -0.0165863037109375, 0.02130126953125, 0.01513671875, 0.01092529296875, 0.017608642578125, 0.0087890625, -0.045501708984375, 0.007541656494140625, 0.040191650390625, 0.01348114013671875, -0.0312042236328125, -0.029266357421875, -0.002147674560546875, -0.0177764892578125, -0.05096435546875, 0.029541015625, -0.060028076171875, 0.048583984375, 0.0535888671875, -0.02032470703125, -0.016815185546875, 0.0350341796875, -0.011566162109375, 0.035797119140625, -0.00832366943359375, -0.052734375, -0.046875, -0.01470184326171875, 0.0338134765625, 0.05792236328125, -0.04010009765625, 0.04620361328125, -0.0075531005859375, -0.01678466796875, -0.0296630859375, -0.0482177734375, 0.0987548828125, -0.0511474609375, 0.005523681640625, 0.00977325439453125, 0.05499267578125, 0.0094757080078125, -0.02362060546875, 0.0269927978515625, -0.06201171875, -0.01157379150390625, 0.0034465789794921875, 0.00609588623046875, -0.02313232421875, -0.0264129638671875, -0.06829833984375, 0.09503173828125, 0.0287322998046875, -0.0160675048828125, -0.01258087158203125, 0.04840087890625, -0.031494140625, 0.027130126953125, -0.0276947021484375, 0.0224761962890625, 0.038360595703125, 0.039947509765625, -0.0238494873046875, -0.0300750732421875, 0.023712158203125, 0.068603515625, 0.086181640625, 0.01568603515625, 0.01126861572265625, -0.00669097900390625, 0.052642822265625, 0.01538848876953125, -0.04107666015625, 0.017303466796875, 0.030731201171875, 0.01523590087890625, 0.041168212890625, 0.014312744140625, 0.048492431640625, -0.001125335693359375, -0.01406097412109375, 0.0584716796875, 0.0202484130859375, 0.03399658203125, -0.00946807861328125, -0.028533935546875, -0.044586181640625, -0.0038127899169921875, 0.033721923828125, -0.01486968994140625, 0.025421142578125, 0.0207061767578125, 0.00783538818359375, -0.0154266357421875, 0.05511474609375, -0.0333251953125, 0.046478271484375, -0.031951904296875, 0.05084228515625, 0.029876708984375, 0.01702880859375, 0.057708740234375, 0.0097808837890625, 0.03704833984375, 0.0279541015625, -0.006683349609375, 0.049041748046875, -0.0167694091796875, 0.01538848876953125, -0.06756591796875, -0.00923919677734375, 0.01251983642578125, 0.053192138671875, -0.04681396484375, -0.0275421142578125, 0.0121612548828125, 0.0132904052734375, 0.003681182861328125, 0.0079193115234375, 0.0149078369140625, 0.04150390625, 0.072998046875, -0.07501220703125, 0.010406494140625, 0.0127410888671875, 0.04510498046875, -0.0230865478515625, -0.0236968994140625, -0.039337158203125, -0.0438232421875, -0.043243408203125, 0.0156402587890625, 0.006404876708984375, 0.056671142578125, 0.0172576904296875, 0.05047607421875, -0.0038433074951171875, -0.0176544189453125, -0.00858306884765625, 0.037078857421875, 0.0179443359375, 0.004924774169921875, -0.0038394927978515625, -0.006404876708984375, -0.0112762451171875, 0.020263671875, -0.01201629638671875, 0.002685546875, 0.0093994140625, 0.039306640625, 0.0052337646484375, -0.027008056640625, 0.00751495361328125, -0.0155029296875, -0.0289764404296875, -0.034576416015625, -0.026641845703125, 0.0292816162109375, -0.001316070556640625, 0.0223236083984375, -0.0008835792541503906, 0.044036865234375, -0.010650634765625, 0.057403564453125, -0.0023250579833984375, 0.007640838623046875, 0.01053619384765625, -0.00974273681640625, 0.045257568359375, 0.0298004150390625, -0.045166015625, 0.0166778564453125, -0.060516357421875, -0.04669189453125, 0.02020263671875, 0.0276947021484375, -0.01194000244140625, 0.0226898193359375, 0.0061492919921875, -0.023590087890625, 0.0098876953125, 0.006763458251953125, 0.0218353271484375, 0.0011281967163085938, 0.01258087158203125, -0.006015777587890625, -0.028656005859375, -0.0200042724609375, 0.0010881423950195312, 0.0174102783203125, 0.0006270408630371094, 0.0400390625, 0.0014505386352539062, 0.0008406639099121094, -0.050628662109375, 0.0625, -0.10028076171875, -0.045867919921875, 0.02008056640625, -0.006542205810546875, 0.0082855224609375, 0.01204681396484375, -0.07196044921875, 0.03863525390625, 0.045623779296875, 0.002452850341796875, 0.038421630859375, -0.0015077590942382812, 0.0062713623046875, -0.03936767578125, 0.032684326171875, -0.0037822723388671875, -0.0031032562255859375, -0.031982421875, -0.033416748046875, 0.05859375, 0.06646728515625, 0.0098419189453125, -0.00391387939453125, 0.0426025390625, -0.039154052734375, 0.0287322998046875, -0.0069122314453125, 0.04571533203125, 0.037567138671875, 0.039337158203125, -0.054443359375, -0.00015234947204589844, -0.0170440673828125, -0.0191802978515625, 0.00215911865234375, 0.0254974365234375, 0.00411224365234375, -0.0748291015625, 0.01934814453125, 0.0024814605712890625, 0.040802001953125, -0.021240234375, 0.0200042724609375, 0.00901031494140625, -0.0012035369873046875, 0.01274871826171875, -0.047088623046875, -0.0333251953125, -0.0311737060546875, 0.00049591064453125, 0.0228118896484375, -0.0033016204833984375, -0.0272369384765625, -0.04827880859375, -0.023651123046875, 0.035369873046875, -0.006275177001953125, 0.0252532958984375, -0.035308837890625, -0.025390625, -0.01006317138671875, 0.01824951171875, -0.01885986328125, 0.0294647216796875, 0.054656982421875, -0.00870513916015625, -0.005466461181640625, -0.01348114013671875, -0.00151824951171875, -0.00319671630859375, 0.00000476837158203125, 0.000797271728515625, -0.01052093505859375, -0.0213775634765625, 0.031707763671875, 0.013885498046875, 0.064208984375, 0.01198577880859375, -0.009674072265625, 0.01126861572265625, 0.003101348876953125, -0.04241943359375, -0.06805419921875, 0.0258636474609375, -0.059173583984375, -0.0352783203125, -0.005645751953125, 0.004787445068359375, 0.01479339599609375, -0.040374755859375, -0.07373046875, 0.048492431640625, -0.0229949951171875, -0.038818359375, -0.038055419921875, -0.007843017578125, -0.00829315185546875, 0.0182952880859375, 0.0025539398193359375, -0.036956787109375, -0.024017333984375, 0.0307159423828125, 0.0020084381103515625, 0.0633544921875, 0.0006184577941894531, -0.01113128662109375, -0.032867431640625, 0.00749969482421875, -0.0005779266357421875, 0.00362396240234375, 0.0328369140625, -0.01739501953125, 0.011932373046875, 0.0232086181640625, -0.04925537109375, -0.039794921875, -0.041900634765625, -0.00632476806640625, -0.0238037109375, -0.05224609375, -0.020111083984375, -0.034393310546875, 0.0716552734375, 0.0208740234375, 0.00960540771484375, -0.01322174072265625, -0.0152130126953125, 0.005451202392578125, -0.051483154296875, -0.0052032470703125, 0.03143310546875, -0.055999755859375, 0.003231048583984375, 0.007488250732421875, 0.00882720947265625, 0.00998687744140625, -0.0098724365234375, -0.0226898193359375, -0.0181121826171875, -0.0038852691650390625, 0.002285003662109375, -0.056396484375, 0.0187530517578125, 0.002452850341796875, -0.02886962890625, -0.033935546875, -0.02459716796875, 0.0116119384765625, -0.027923583984375, -0.05523681640625, -0.0253753662109375, 0.004150390625, 0.006671905517578125, 0.0093231201171875, 0.01334381103515625, -0.034912109375, 0.0233306884765625, 0.025421142578125, -0.027496337890625, 0.0179443359375, 0.00799560546875, 0.00824737548828125, -0.01343536376953125, 0.032440185546875, 0.00868988037109375, 0.06292724609375, -0.018035888671875, 0.056121826171875, -0.01137542724609375, 0.047271728515625, -0.0223236083984375, -0.016448974609375, -0.004276275634765625, -0.024627685546875, 0.01175689697265625, 0.01910400390625, 0.01152801513671875, -0.0020732879638671875, -0.0093994140625, -0.0035839080810546875, -0.0017080307006835938, 0.00518035888671875 ]
cb05e08313584aaab5565daa3a544d7b78f91dce
Wordpress Stackexchange Q: SQL select of users by metadata Hi I'm trying to select users with a particular role only, using the following sql statement... SELECT DISTINCT ID, u.user_login, u.user_nicename, u.user_email FROM wp_users u, wp_usermeta m WHERE m.meta_key = 'wp_capabilities' AND m.meta_value LIKE '%supplier%' ORDER BY u.user_registered However, it reurns the whole table. What am I doing wrong? PS this needs to be a SQL select as I'm doing this in myphpadmin to export the data to csv. Thanks in advance! A: Double-check your SQL syntax. It sounds like you want to do a JOIN ... But you're not building the query correctly. It should be something more like: SELECT u.ID, u.user_login, u.user_nicename, u.user_email FROM $wpdb->users u INNER JOIN $wpdb->usermeta m ON m.user_id = u.ID WHERE m.meta_key = 'wp_capabilities' AND m.meta_value LIKE '%supplier%' ORDER BY u.user_registered You have to tell the query how you're relating the user meta to the user. Also note that I'm using $wpdb-> rather than wp_. This is important if you ever expect to use this query in a plugin on a site with a database prefix other than "wp." If you're running things directly in SQL, though, you should switch back.
Q: SQL select of users by metadata Hi I'm trying to select users with a particular role only, using the following sql statement... SELECT DISTINCT ID, u.user_login, u.user_nicename, u.user_email FROM wp_users u, wp_usermeta m WHERE m.meta_key = 'wp_capabilities' AND m.meta_value LIKE '%supplier%' ORDER BY u.user_registered However, it reurns the whole table. What am I doing wrong? PS this needs to be a SQL select as I'm doing this in myphpadmin to export the data to csv. Thanks in advance! A: Double-check your SQL syntax. It sounds like you want to do a JOIN ... But you're not building the query correctly. It should be something more like: SELECT u.ID, u.user_login, u.user_nicename, u.user_email FROM $wpdb->users u INNER JOIN $wpdb->usermeta m ON m.user_id = u.ID WHERE m.meta_key = 'wp_capabilities' AND m.meta_value LIKE '%supplier%' ORDER BY u.user_registered You have to tell the query how you're relating the user meta to the user. Also note that I'm using $wpdb-> rather than wp_. This is important if you ever expect to use this query in a plugin on a site with a database prefix other than "wp." If you're running things directly in SQL, though, you should switch back. A: There's a (query-)class built into core: new WP_User_Query; // Example $all_subscribers = new WP_User_Query( array( 'role' => 'subscriber' ) ); This then allows looping through the user objects: // Example foreach ( $all_subscribers as $subscriber ) { echo $subscriber->display_name; // Check object: var_dump( $subscriber ); } For further examples, or querying users by other fields, please consult the codex.
wordpress
{ "language": "en", "length": 254, "provenance": "stackexchange_00019.jsonl.gz:413756", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30802" }
[ 0.037200927734375, 0.018218994140625, -0.04608154296875, -0.00208282470703125, 0.032623291015625, -0.059478759765625, 0.061767578125, -0.0200958251953125, 0.0189056396484375, 0.0723876953125, -0.00878143310546875, 0.0029544830322265625, 0.0011081695556640625, 0.0020465850830078125, -0.0518798828125, -0.00569915771484375, 0.00690460205078125, 0.025146484375, -0.006328582763671875, -0.018798828125, 0.014404296875, -0.01177978515625, -0.045928955078125, -0.0073699951171875, 0.04083251953125, -0.020721435546875, 0.04443359375, -0.023345947265625, 0.0531005859375, 0.005062103271484375, 0.034088134765625, -0.05657958984375, 0.01430511474609375, -0.0277557373046875, 0.0413818359375, -0.0220489501953125, 0.05218505859375, -0.0264129638671875, -0.00710296630859375, 0.01309967041015625, 0.0229339599609375, -0.016021728515625, -0.08819580078125, -0.00982666015625, -0.0460205078125, -0.053924560546875, 0.053131103515625, 0.0099029541015625, 0.0306396484375, -0.03155517578125, -0.00959014892578125, 0.02386474609375, 0.0088653564453125, -0.0274505615234375, -0.0011949539184570312, 0.016876220703125, -0.054931640625, 0.039398193359375, 0.0219879150390625, 0.020263671875, -0.006011962890625, 0.0005669593811035156, -0.0003631114959716797, -0.0165252685546875, 0.0027256011962890625, -0.0032958984375, 0.01033782958984375, 0.0205535888671875, 0.0226287841796875, -0.019805908203125, -0.0294647216796875, 0.0081024169921875, -0.005458831787109375, 0.02166748046875, -0.0310211181640625, -0.01396942138671875, 0.01203155517578125, -0.003803253173828125, 0.0135040283203125, 0.01326751708984375, -0.01513671875, 0.00347137451171875, -0.07208251953125, 0.01306915283203125, -0.0208892822265625, 0.025848388671875, -0.023834228515625, -0.01293182373046875, -0.01381683349609375, 0.008544921875, -0.0055999755859375, 0.0016279220581054688, -0.009796142578125, 0.0168914794921875, -0.00687408447265625, -0.0230255126953125, 0.032745361328125, 0.0565185546875, 0.00424957275390625, -0.0046539306640625, 0.01483917236328125, -0.048553466796875, -0.0100555419921875, -0.0174713134765625, 0.004833221435546875, 0.051849365234375, 0.01013946533203125, 0.036102294921875, 0.0264739990234375, 0.01325225830078125, 0.0301513671875, -0.014801025390625, -0.03411865234375, -0.044464111328125, -0.017913818359375, 0.051300048828125, -0.0240631103515625, -0.021759033203125, 0.0077056884765625, -0.01520538330078125, -0.014862060546875, 0.0156402587890625, -0.0013980865478515625, -0.051025390625, -0.00658416748046875, -0.028717041015625, -0.01303863525390625, -0.006412506103515625, -0.070556640625, 0.03338623046875, -0.006488800048828125, 0.0186767578125, 0.034210205078125, 0.032135009765625, -0.028228759765625, -0.0084991455078125, 0.0067596435546875, -0.0189361572265625, -0.0083465576171875, 0.02178955078125, 0.012939453125, -0.04510498046875, 0.00197601318359375, 0.002979278564453125, -0.0098876953125, 0.0108642578125, 0.0005664825439453125, 0.0032253265380859375, -0.0018558502197265625, 0.0196990966796875, -0.0654296875, -0.00711822509765625, -0.0237274169921875, 0.01187896728515625, 0.035614013671875, 0.005954742431640625, 0.01058197021484375, -0.02252197265625, 0.01442718505859375, 0.0014324188232421875, 0.033447265625, -0.00244903564453125, -0.0146636962890625, -0.0284576416015625, -0.047760009765625, -0.01348876953125, -0.03729248046875, -0.0019664764404296875, 0.03668212890625, 0.0282135009765625, 0.0115203857421875, -0.01922607421875, 0.06268310546875, 0.047637939453125, 0.00579071044921875, 0.045867919921875, -0.019561767578125, 0.0254669189453125, 0.01947021484375, -0.05059814453125, -0.031646728515625, -0.035125732421875, 0.051116943359375, -0.0084991455078125, -0.048858642578125, 0.051666259765625, 0.00220489501953125, 0.05316162109375, 0.013824462890625, 0.004062652587890625, 0.024566650390625, 0.039154052734375, -0.0170135498046875, 0.0301361083984375, -0.0175933837890625, -0.0673828125, 0.0226898193359375, -0.0059661865234375, -0.003269195556640625, 0.02337646484375, 0.0830078125, 0.006107330322265625, 0.0277252197265625, -0.0494384765625, -0.069580078125, 0.024810791015625, -0.018463134765625, 0.0256195068359375, -0.0152435302734375, -0.0002484321594238281, -0.0007085800170898438, -0.0257568359375, -0.0074920654296875, 0.0017080307006835938, -0.0198211669921875, -0.0196075439453125, -0.005054473876953125, 0.03607177734375, 0.004817962646484375, 0.041412353515625, -0.01026153564453125, -0.0257568359375, -0.02294921875, 0.007232666015625, -0.001220703125, -0.0250396728515625, 0.0132293701171875, 0.004207611083984375, 0.0380859375, -0.004611968994140625, 0.0726318359375, -0.0155487060546875, 0.023284912109375, 0.053131103515625, -0.006153106689453125, 0.0073699951171875, 0.005222320556640625, -0.00661468505859375, 0.005886077880859375, 0.00983428955078125, 0.035675048828125, -0.005237579345703125, -0.01206207275390625, -0.0036640167236328125, 0.0083770751953125, -0.04803466796875, 0.01381683349609375, 0.00457763671875, 0.001979827880859375, 0.0223388671875, -0.019866943359375, -0.00917816162109375, 0.0209197998046875, 0.01715087890625, 0.01535797119140625, 0.0229339599609375, -0.050079345703125, 0.0225830078125, -0.0078125, 0.0013189315795898438, -0.02642822265625, -0.02178955078125, 0.05810546875, -0.040740966796875, 0.01385498046875, -0.0019388198852539062, 0.0311279296875, 0.0220947265625, -0.0077362060546875, -0.01097869873046875, 0.00726318359375, -0.0015268325805664062, 0.006824493408203125, 0.00878143310546875, 0.04595947265625, 0.0204620361328125, -0.0312347412109375, -0.01702880859375, 0.01763916015625, 0.0216064453125, 0.015960693359375, 0.028411865234375, 0.0168914794921875, -0.0027637481689453125, 0.003223419189453125, -0.05731201171875, 0.0153656005859375, 0.033966064453125, -0.01416015625, 0.003185272216796875, 0.034942626953125, 0.014984130859375, -0.0250701904296875, 0.046600341796875, -0.0418701171875, -0.0091400146484375, 0.0248870849609375, -0.0248870849609375, 0.0039825439453125, -0.0162200927734375, 0.046478271484375, 0.05474853515625, 0.020904541015625, -0.022735595703125, -0.00839996337890625, -0.045013427734375, -0.023101806640625, 0.0301513671875, 0.004772186279296875, -0.07452392578125, 0.013763427734375, 0.035736083984375, 0.03643798828125, 0.048919677734375, 0.0032558441162109375, -0.0280914306640625, -0.016510009765625, 0.04266357421875, -0.0304412841796875, -0.056671142578125, -0.0452880859375, -0.05865478515625, 0.03314208984375, -0.031646728515625, -0.004337310791015625, 0.004909515380859375, -0.00730133056640625, 0.033905029296875, 0.0193634033203125, -0.0179290771484375, -0.0682373046875, -0.02899169921875, -0.06951904296875, 0.0238189697265625, -0.007450103759765625, 0.0117950439453125, 0.00579833984375, 0.00846099853515625, -0.01209259033203125, -0.049285888671875, -0.0224761962890625, 0.0086212158203125, -0.019744873046875, -0.0268707275390625, 0.00927734375, -0.01413726806640625, -0.03997802734375, 0.00994873046875, 0.0164642333984375, -0.003742218017578125, -0.007625579833984375, 0.000059723854064941406, 0.041290283203125, 0.0013456344604492188, 0.07281494140625, -0.044647216796875, -0.08245849609375, 0.07537841796875, 0.061126708984375, -0.0012216567993164062, -0.004638671875, -0.0289764404296875, -0.03704833984375, 0.01458740234375, 0.0029087066650390625, 0.01204681396484375, 0.01506805419921875, -0.0096435546875, 0.03912353515625, 0.04107666015625, -0.0255126953125, -0.004314422607421875, 0.013824462890625, 0.016632080078125, 0.050872802734375, 0.01099395751953125, -0.0095977783203125, -0.03424072265625, 0.007076263427734375, -0.01512908935546875, 0.0010890960693359375, 0.00894927978515625, -0.01059722900390625, -0.0048675537109375, -0.05926513671875, 0.0438232421875, -0.01184844970703125, 0.018524169921875, -0.046234130859375, -0.018218994140625, -0.005397796630859375, 0.10418701171875, 0.00634002685546875, -0.00942230224609375, 0.030181884765625, 0.0091552734375, -0.05877685546875, 0.01071929931640625, -0.084716796875, 0.0186614990234375, -0.0709228515625, -0.043609619140625, -0.007442474365234375, -0.06036376953125, 0.01149749755859375, -0.059814453125, -0.04473876953125, -0.0435791015625, 0.026611328125, -0.0027751922607421875, 0.0211334228515625, 0.00921630859375, -0.0124359130859375, -0.01224517822265625, -0.020538330078125, -0.01068115234375, -0.08758544921875, -0.0089874267578125, -0.00966644287109375, 0.04742431640625, 0.0039043426513671875, -0.01458740234375, -0.00586700439453125, 0.043701171875, -0.007770538330078125, 0.01082611083984375, -0.004810333251953125, -0.00047779083251953125, 0.00751495361328125, -0.0251922607421875, -0.00913238525390625, -0.01482391357421875, -0.0167388916015625, -0.052581787109375, -0.006378173828125, -0.0278167724609375, -0.044708251953125, 0.0102691650390625, -0.05120849609375, 0.01230621337890625, -0.0171966552734375, -0.0017156600952148438, -0.0042877197265625, 0.0178985595703125, -0.00679779052734375, -0.00218963623046875, -0.01541900634765625, -0.037322998046875, 0.0498046875, 0.0308685302734375, 0.00714111328125, 0.0031528472900390625, 0.0753173828125, 0.0085296630859375, -0.03350830078125, -0.045379638671875, -0.01145172119140625, 0.031463623046875, -0.0078277587890625, 0.03375244140625, 0.02294921875, -0.022125244140625, 0.0172576904296875, 0.0199432373046875, 0.0292816162109375, -0.045654296875, 0.045684814453125, -0.0299224853515625, -0.0282135009765625, 0.0474853515625, -0.0155029296875, -0.02154541015625, 0.043243408203125, 0.0186309814453125, -0.048736572265625, -0.0025997161865234375, 0.040924072265625, 0.01464080810546875, -0.002643585205078125, -0.0286407470703125, -0.0709228515625, 0.03106689453125, -0.050048828125, 0.0168609619140625, -0.01141357421875, 0.005573272705078125, 0.0171966552734375, -0.007080078125, -0.01305389404296875, 0.02606201171875, 0.0013790130615234375, -0.018463134765625, 0.0214996337890625, -0.0226593017578125, -0.0280609130859375, -0.004596710205078125, -0.0262298583984375, 0.09381103515625, 0.017578125, -0.042236328125, 0.0248870849609375, -0.032562255859375, 0.03326416015625, 0.0295257568359375, 0.0066375732421875, 0.07049560546875, 0.012847900390625, -0.0180816650390625, -0.00970458984375, -0.0548095703125, -0.00681304931640625, -0.060302734375, 0.01654052734375, -0.010986328125, 0.0067596435546875, -0.0186614990234375, 0.0919189453125, -0.028076171875, 0.05096435546875, -0.00957489013671875, 0.042755126953125, -0.003986358642578125, 0.0303192138671875, -0.0016727447509765625, -0.002117156982421875, 0.0221405029296875, 0.00458526611328125, 0.01239776611328125, -0.00632476806640625, 0.01018524169921875, 0.01102447509765625, 0.004425048828125, 0.05108642578125, 0.01666259765625, -0.01198577880859375, -0.0279693603515625, -0.00444793701171875, 0.0379638671875, -0.01091766357421875, -0.041168212890625, -0.041015625, -0.0099334716796875, 0.0225067138671875, -0.0266876220703125, -0.005207061767578125, 0.025970458984375, -0.02008056640625, 0.0400390625, -0.033477783203125, 0.018035888671875, -0.00852203369140625, -0.011810302734375, -0.02789306640625, -0.031280517578125, -0.0189361572265625, -0.0231781005859375, 0.029571533203125, -0.01076507568359375, -0.0278778076171875, 0.0179290771484375, -0.010467529296875, 0.028656005859375, -0.04486083984375, 0.00324249267578125, -0.093505859375, -0.00695037841796875, 0.036895751953125, 0.021759033203125, -0.00604248046875, -0.006252288818359375, -0.0003783702850341797, -0.018402099609375, 0.05841064453125, -0.014190673828125, -0.0213623046875, -0.0308837890625, -0.0033702850341796875, 0.02142333984375, -0.0173797607421875, -0.03265380859375, -0.03326416015625, -0.00991058349609375, 0.0191802978515625, 0.0035266876220703125, -0.04364013671875, 0.06695556640625, 0.0037937164306640625, 0.0382080078125, -0.0015859603881835938, 0.0285186767578125, 0.006275177001953125, -0.00902557373046875, 0.0042266845703125, -0.044708251953125, -0.023681640625, -0.0276947021484375, -0.01078033447265625, 0.0119781494140625, 0.0306549072265625, -0.0023975372314453125, 0.0606689453125, 0.002292633056640625, 0.00821685791015625, -0.00728607177734375, -0.033966064453125, -0.0254974365234375, 0.0232696533203125, 0.041839599609375, -0.007568359375, 0.0218353271484375, -0.019622802734375, -0.035980224609375, 0.01273345947265625, 0.0027523040771484375, -0.0058746337890625, 0.0093536376953125, -0.01239776611328125, 0.01617431640625, 0.0340576171875, 0.00103759765625, 0.0292816162109375, 0.00431060791015625, 0.0134429931640625, -0.0006241798400878906, -0.0245819091796875, -0.00458526611328125, 0.0295562744140625, 0.04229736328125, -0.0227813720703125, -0.01904296875, 0.02410888671875, -0.0167083740234375, 0.03643798828125, 0.0374755859375, 0.06842041015625, -0.0755615234375, 0.0267181396484375, 0.005329132080078125, -0.02203369140625, 0.0231170654296875, 0.003170013427734375, -0.0228729248046875, -0.0638427734375, -0.001308441162109375, 0.030975341796875, -0.0186004638671875, -0.010040283203125, 0.024200439453125, -0.00754547119140625, -0.0133819580078125, 0.006328582763671875, 0.004680633544921875, 0.035797119140625, -0.03363037109375, -0.0125732421875, 0.00421142578125, -0.0002715587615966797, 0.0008091926574707031, 0.0005259513854980469, -0.01045989990234375, -0.0418701171875, -0.0004868507385253906, -0.038909912109375, -0.01166534423828125, -0.02276611328125, 0.037078857421875, 0.053436279296875, 0.036102294921875, 0.01103973388671875, -0.038330078125, 0.0396728515625, -0.006793975830078125, -0.0180206298828125, -0.037933349609375, -0.0188140869140625, 0.0297698974609375, -0.0102996826171875, 0.033416748046875, 0.010589599609375, -0.01910400390625, -0.0167236328125, -0.032501220703125, 0.069580078125, -0.004947662353515625, -0.03021240234375, 0.0079803466796875, 0.0008258819580078125, -0.0128631591796875, 0.017669677734375, 0.046417236328125, -0.061859130859375, -0.039825439453125, 0.0229644775390625, -0.037017822265625, 0.00872802734375, 0.044830322265625, -0.06646728515625, 0.049072265625, -0.006092071533203125, 0.03399658203125, 0.00988006591796875, 0.01082611083984375, 0.011932373046875, -0.00554656982421875, -0.06787109375, 0.10516357421875, -0.0178680419921875, 0.10052490234375, -0.04132080078125, 0.0173492431640625, 0.0628662109375, -0.007518768310546875, 0.048553466796875, 0.0142364501953125, -0.063720703125, -0.01268768310546875, 0.0277557373046875, 0.0097503662109375, 0.0029163360595703125, 0.05902099609375, 0.01355743408203125, 0.0653076171875, 0.08074951171875, -0.0455322265625, 0.03826904296875, -0.00563812255859375, -0.0193023681640625, 0.0219573974609375, -0.003376007080078125, -0.001224517822265625, -0.0293121337890625, 0.0452880859375, -0.0013589859008789062, -0.036590576171875, -0.0012159347534179688, -0.0299072265625, 0.004116058349609375, 0.0120391845703125, 0.027557373046875, -0.0703125, -0.029052734375, -0.0287017822265625, 0.0372314453125, 0.01495361328125, 0.01067352294921875, 0.0197601318359375, 0.020355224609375, 0.053314208984375, -0.042083740234375, 0.005893707275390625, 0.015625, -0.0171356201171875, 0.07611083984375, 0.00212860107421875, 0.0211181640625, -0.057037353515625, 0.0230865478515625, 0.033721923828125, 0.0703125, -0.05328369140625, -0.057891845703125, 0.00890350341796875, 0.029449462890625, 0.0129241943359375, 0.042388916015625, 0.0242462158203125, -0.00711822509765625, 0.06805419921875, -0.0258026123046875, 0.0034961700439453125, 0.0012359619140625, -0.007648468017578125, -0.0255889892578125, -0.0256195068359375, 0.0306549072265625, 0.03448486328125, -0.01043701171875, -0.0002472400665283203, 0.0214080810546875, 0.0006461143493652344, 0.0031528472900390625, 0.0083160400390625, 0.04425048828125, 0.01337432861328125, -0.0117645263671875, 0.0006494522094726562, -0.006603240966796875, 0.0025634765625, -0.043243408203125, -0.04327392578125, 0.0406494140625, 0.039276123046875, -0.016448974609375, -0.022979736328125, 0.00843048095703125, 0.04046630859375, -0.0038623809814453125, -0.02886962890625, 0.01323699951171875, -0.01666259765625, -0.0279388427734375, -0.0008263587951660156, -0.0004718303680419922, 0.01519775390625, 0.0079498291015625, -0.00391387939453125, 0.0816650390625, -0.0204620361328125, 0.00004941225051879883, 0.06634521484375, -0.008544921875, 0.01305389404296875, 0.0102081298828125, -0.02655029296875, 0.0316162109375, 0.022918701171875, -0.07464599609375, -0.01058197021484375, -0.044189453125, -0.0263824462890625, 0.00995635986328125, 0.027313232421875, 0.0008096694946289062, 0.0218048095703125, 0.0042877197265625, -0.031219482421875, -0.00357818603515625, 0.03216552734375, 0.00951385498046875, 0.0244598388671875, 0.022247314453125, -0.00992584228515625, -0.0231170654296875, -0.0078887939453125, 0.01385498046875, 0.00946044921875, -0.00788116455078125, 0.037811279296875, -0.007633209228515625, 0.003597259521484375, -0.024688720703125, 0.0097198486328125, -0.01099395751953125, -0.0382080078125, 0.06683349609375, 0.0010356903076171875, -0.0257568359375, -0.00968170166015625, 0.0110015869140625, 0.03497314453125, 0.0251312255859375, -0.0013933181762695312, -0.0198516845703125, 0.001251220703125, 0.019195556640625, 0.01422119140625, 0.007801055908203125, -0.02703857421875, -0.0101318359375, -0.0172271728515625, -0.01047515869140625, 0.0242767333984375, 0.01311492919921875, 0.01885986328125, 0.00769805908203125, -0.03485107421875, -0.011077880859375, -0.0205841064453125, 0.0220947265625, -0.044281005859375, 0.0229644775390625, -0.0138397216796875, 0.0174102783203125, 0.035003662109375, -0.0120086669921875, 0.0225830078125, 0.0211029052734375, -0.0015106201171875, 0.048614501953125, -0.0472412109375, 0.0572509765625, 0.059234619140625, 0.054962158203125, 0.02020263671875, 0.01148223876953125, 0.0421142578125, -0.0236053466796875, 0.00395965576171875, -0.041107177734375, -0.035736083984375, -0.035797119140625, 0.0060577392578125, 0.03607177734375, -0.00952911376953125, -0.033599853515625, -0.070068359375, -0.029083251953125, 0.00951385498046875, 0.01137542724609375, -0.07696533203125, 0.0504150390625, 0.00530242919921875, 0.003078460693359375, -0.03167724609375, -0.026397705078125, 0.01096343994140625, 0.038848876953125, -0.00791168212890625, -0.03082275390625, -0.00524139404296875, 0.033477783203125, -0.010498046875, 0.01143646240234375, 0.0258636474609375, -0.01219940185546875, -0.0159149169921875, 0.0220184326171875, -0.01332855224609375, 0.062042236328125, -0.01395416259765625, -0.01152801513671875, 0.041473388671875, -0.0186309814453125, -0.007366180419921875, -0.041778564453125, -0.0025463104248046875, -0.047332763671875, -0.0084381103515625, 0.006755828857421875, 0.01209259033203125, 0.0197601318359375, -0.037811279296875, -0.084716796875, 0.1395263671875, -0.031524658203125, -0.0255126953125, -0.00530242919921875, 0.00589752197265625, 0.0167236328125, -0.01432037353515625, 0.00135040283203125, -0.021820068359375, -0.055694580078125, -0.008392333984375, 0.0251617431640625, -0.036163330078125, 0.0275726318359375, 0.0094757080078125, -0.08624267578125, 0.029754638671875, 0.0243072509765625, 0.00995635986328125, -0.027435302734375, 0.03033447265625, 0.0036468505859375, 0.028076171875, -0.0038890838623046875, 0.01224517822265625, 0.004573822021484375, -0.0191192626953125, -0.01331329345703125, -0.0160369873046875, -0.0143280029296875, -0.0055999755859375, 0.018798828125, 0.06463623046875, 0.00634765625, -0.0254364013671875, -0.029632568359375, -0.0445556640625, 0.0207366943359375, -0.04345703125, 0.009765625, -0.050201416015625, 0.008087158203125, -0.0163726806640625, -0.026458740234375, 0.02984619140625, 0.0186309814453125, -0.0243072509765625, 0.007228851318359375, 0.0104827880859375, -0.0167388916015625, -0.051513671875, -0.006458282470703125, 0.0254974365234375, -0.055328369140625, -0.10125732421875, 0.01285552978515625, 0.01349639892578125, -0.0740966796875, -0.059600830078125, -0.01317596435546875, -0.0225372314453125, 0.026702880859375, 0.044708251953125, 0.0030574798583984375, -0.00566864013671875, -0.0307159423828125, -0.0115203857421875, -0.0236358642578125, 0.0167236328125, 0.006591796875, 0.032470703125, 0.0209197998046875, -0.007965087890625, 0.0193023681640625, -0.0269622802734375, 0.0009560585021972656, -0.0423583984375, -0.0213165283203125, 0.0278167724609375, 0.0618896484375, -0.04620361328125, 0.092529296875, -0.0215301513671875, -0.004749298095703125, 0.0102996826171875, -0.01151275634765625, -0.051239013671875, 0.002330780029296875, 0.0352783203125, 0.0018024444580078125, 0.019866943359375 ]
37f5596919b5c01b8952e0c98636e335df273a51
Wordpress Stackexchange Q: How to use a custom post type archive as front page? I'd like to use a custom post type archive as a site's front page, so that http://the_site.com/ is a custom post type archive displayed according to my archive-{post-type}.php file. Ideally I would like to alter the query using is_front_page() in my functions.php file. I tried the following, with a page called "Home" as my front page: add_filter('pre_get_posts', 'my_get_posts'); function my_get_posts($query){ global $wp_the_query; if(is_front_page()&&$wp_the_query===$query){ $query->set('post_type','album'); $query->set('posts_per_page',-1); } return $query; } but the front page is returning the content of "Home" and seems to be ignoring the custom query. What am I doing wrong? Is there a better way, in general, of going about this? A: Re-name your CPT archive to home.php Then use pre_get_posts to alter the home page query so only CPT's display function wpsites_home_page_cpt_filter($query) { if ( !is_admin() && $query->is_main_query() && is_home() ) { $query->set('post_type', array( 'your-cpt' ) ); } } add_action('pre_get_posts','wpsites_home_page_cpt_filter'); Replace your-cpt with the name of your custom post type.
Q: How to use a custom post type archive as front page? I'd like to use a custom post type archive as a site's front page, so that http://the_site.com/ is a custom post type archive displayed according to my archive-{post-type}.php file. Ideally I would like to alter the query using is_front_page() in my functions.php file. I tried the following, with a page called "Home" as my front page: add_filter('pre_get_posts', 'my_get_posts'); function my_get_posts($query){ global $wp_the_query; if(is_front_page()&&$wp_the_query===$query){ $query->set('post_type','album'); $query->set('posts_per_page',-1); } return $query; } but the front page is returning the content of "Home" and seems to be ignoring the custom query. What am I doing wrong? Is there a better way, in general, of going about this? A: Re-name your CPT archive to home.php Then use pre_get_posts to alter the home page query so only CPT's display function wpsites_home_page_cpt_filter($query) { if ( !is_admin() && $query->is_main_query() && is_home() ) { $query->set('post_type', array( 'your-cpt' ) ); } } add_action('pre_get_posts','wpsites_home_page_cpt_filter'); Replace your-cpt with the name of your custom post type. A: After you have set a static page as your home page you can add this to your functions.php and you are good to go. This will call the archive-POSTTYPE.php template correctly as well. add_action("pre_get_posts", "custom_front_page"); function custom_front_page($wp_query){ //Ensure this filter isn't applied to the admin area if(is_admin()) { return; } if($wp_query->get('page_id') == get_option('page_on_front')): $wp_query->set('post_type', 'CUSTOM POST TYPE NAME HERE'); $wp_query->set('page_id', ''); //Empty //Set properties that describe the page to reflect that //we aren't really displaying a static page $wp_query->is_page = 0; $wp_query->is_singular = 0; $wp_query->is_post_type_archive = 1; $wp_query->is_archive = 1; endif; } A: Thanks for the answer ljaas—I was looking to solve this exact problem. In order to get the custom post type archive template to be called I had to add the following conditions: $wp_query->is_post_type_archive = 1; $wp_query->is_archive = 1; A: This works better for me overriding both blog posts and static page in Settings > Reading > Front page displays: <?php /** * Set custom post type archive as front page. * * @since 1.0.0 */ function ql_set_as_front_page( $query ) { if ( is_admin() || ! $query->is_main_query() ) { return; } if ( ql_is_front_page( $query ) ) { $query->set( 'page_id', '' ); $query->is_page = false; $query->is_singular = false; $query->set( 'post_type', 'MYCPT' ); $query->is_archive = true; $query->is_post_type_archive = true; } } add_action( 'pre_get_posts', 'ql_set_as_front_page' ); /** * Taken from WP_Query::is_front_page and adapted to compare page_on_front with current page ID. * * @since 1.0.0 * * @param object $query The main WP Query. */ function ql_is_front_page( $query ) { if ( 'posts' == get_option( 'show_on_front') && $query->is_home() ) return true; elseif ( 'page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && $query->get('page_id') == get_option( 'page_on_front' ) ) return true; else return false; } I'm using it in conjunction with a template override using the filters front_page_template and home_template to return a custom template. A: For me it breaks the pagination : either you select the index or a static page as the home page, the pagination links shows up but when clicking on page 2 I get : * *in case of index page (default) : the 404 page *in case of static page : the same results as page 1 : the "paged" argument is then interpreted to show the page type pagination, not the post type list pagination. I think it needs some rewrite rules to catch the paged argument and pass it correctly. Anyway, a custom template page should be the solution with some additional rewrite rules.
wordpress
{ "language": "en", "length": 576, "provenance": "stackexchange_00019.jsonl.gz:413774", "question_score": "19", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30851" }
[ 0.07135009765625, 0.0231170654296875, 0.007659912109375, -0.035858154296875, 0.048004150390625, -0.037994384765625, 0.0504150390625, -0.0367431640625, 0.0137786865234375, 0.006855010986328125, -0.007755279541015625, -0.034637451171875, -0.0158538818359375, -0.0380859375, -0.0172882080078125, -0.0234832763671875, 0.042144775390625, -0.0215606689453125, 0.021148681640625, -0.0092010498046875, 0.0023975372314453125, 0.007373809814453125, 0.029296875, 0.039825439453125, 0.001903533935546875, 0.019256591796875, 0.063720703125, 0.0084686279296875, 0.00786590576171875, 0.01195526123046875, 0.0110931396484375, -0.04644775390625, 0.0277557373046875, -0.0186309814453125, 0.01067352294921875, 0.05242919921875, -0.0003962516784667969, 0.01247406005859375, 0.006313323974609375, 0.0251312255859375, 0.0003638267517089844, 0.0163116455078125, -0.032684326171875, 0.0305328369140625, -0.03851318359375, -0.050811767578125, 0.00702667236328125, -0.00997161865234375, 0.00021755695343017578, 0.021026611328125, 0.00928497314453125, -0.0015239715576171875, 0.0160675048828125, -0.00893402099609375, 0.003734588623046875, 0.0305023193359375, 0.00661468505859375, -0.050506591796875, 0.041290283203125, -0.034088134765625, -0.0274810791015625, -0.03936767578125, 0.054840087890625, -0.003070831298828125, -0.02093505859375, 0.00406646728515625, 0.0279388427734375, -0.011474609375, -0.0511474609375, -0.02899169921875, 0.0377197265625, -0.00154876708984375, 0.045379638671875, -0.01483154296875, -0.0382080078125, -0.03228759765625, -0.00351715087890625, -0.0190887451171875, 0.046112060546875, -0.044189453125, -0.014129638671875, -0.00811004638671875, -0.07037353515625, -0.0252838134765625, -0.00485992431640625, -0.007053375244140625, -0.01535797119140625, -0.004016876220703125, -0.01461029052734375, -0.0099334716796875, -0.0109100341796875, -0.04241943359375, 0.0048370361328125, 0.0015077590942382812, 0.0037517547607421875, -0.04376220703125, -0.0017099380493164062, 0.0275421142578125, -0.0426025390625, 0.014312744140625, -0.04046630859375, -0.0169830322265625, 0.0243682861328125, -0.03021240234375, 0.033905029296875, 0.033294677734375, -0.00984954833984375, 0.047149658203125, 0.06707763671875, 0.0308074951171875, 0.027618408203125, 0.029693603515625, -0.04376220703125, -0.016937255859375, -0.027923583984375, 0.042236328125, -0.050323486328125, -0.0200347900390625, -0.023529052734375, 0.03485107421875, 0.031097412109375, 0.033050537109375, 0.07440185546875, -0.0626220703125, 0.0101165771484375, 0.005901336669921875, -0.035308837890625, -0.0791015625, 0.010955810546875, 0.06512451171875, -0.021514892578125, -0.01403045654296875, -0.00540924072265625, -0.0231475830078125, -0.02081298828125, -0.03424072265625, 0.038177490234375, -0.00020360946655273438, -0.0026416778564453125, 0.00487518310546875, 0.07269287109375, -0.036285400390625, -0.05126953125, 0.026763916015625, 0.009918212890625, 0.0128631591796875, 0.046173095703125, 0.0174713134765625, -0.04071044921875, -0.034454345703125, 0.0299835205078125, -0.01059722900390625, 0.02880859375, -0.007720947265625, -0.01273345947265625, -0.005550384521484375, -0.01010894775390625, 0.00978851318359375, -0.02117919921875, -0.021942138671875, 0.00592041015625, -0.0050506591796875, -0.0012464523315429688, -0.038360595703125, -0.0296783447265625, -0.005619049072265625, -0.02728271484375, 0.00434112548828125, 0.01119232177734375, 0.040252685546875, 0.0300140380859375, -0.0212249755859375, -0.0016641616821289062, -0.0024013519287109375, -0.0227203369140625, -0.01165771484375, 0.006923675537109375, 0.00785064697265625, 0.0281982421875, 0.0673828125, -0.0013227462768554688, -0.0184326171875, 0.06884765625, -0.0194244384765625, -0.04034423828125, 0.01154327392578125, 0.02239990234375, 0.038543701171875, -0.017242431640625, 0.0190887451171875, 0.016357421875, 0.03790283203125, -0.038818359375, 0.0222015380859375, -0.015625, -0.035491943359375, -0.01222991943359375, -0.029541015625, -0.0239105224609375, 0.057769775390625, -0.00951385498046875, 0.029388427734375, -0.00853729248046875, 0.0214080810546875, -0.06109619140625, 0.0287933349609375, -0.02734375, 0.041961669921875, 0.0270843505859375, 0.036712646484375, 0.010894775390625, 0.03118896484375, -0.032135009765625, -0.0330810546875, -0.027008056640625, 0.03900146484375, 0.01297760009765625, 0.01465606689453125, -0.021697998046875, -0.00785064697265625, -0.006122589111328125, -0.03411865234375, -0.0242156982421875, 0.045196533203125, 0.07183837890625, 0.0037136077880859375, -0.0184326171875, -0.02471923828125, 0.0224761962890625, 0.021728515625, -0.084716796875, 0.037872314453125, 0.068359375, 0.049560546875, -0.0227203369140625, 0.0005712509155273438, 0.00774383544921875, -0.0496826171875, -0.0014085769653320312, 0.04840087890625, 0.01166534423828125, 0.03143310546875, -0.01406097412109375, 0.007114410400390625, 0.042694091796875, -0.003932952880859375, 0.01611328125, -0.00038361549377441406, 0.02313232421875, 0.0189666748046875, -0.05938720703125, -0.0244903564453125, 0.052276611328125, -0.040313720703125, 0.01141357421875, 0.04510498046875, 0.04449462890625, 0.050933837890625, 0.0084686279296875, -0.0176544189453125, -0.007701873779296875, 0.0239410400390625, -0.03277587890625, 0.027862548828125, 0.0279388427734375, 0.01541900634765625, 0.050689697265625, 0.036773681640625, -0.0224761962890625, 0.0085601806640625, 0.0038509368896484375, 0.0190277099609375, -0.004291534423828125, 0.013702392578125, 0.026702880859375, -0.0249481201171875, -0.0206146240234375, 0.005084991455078125, 0.002040863037109375, -0.01885986328125, -0.01541900634765625, 0.0199737548828125, -0.047271728515625, -0.0009427070617675781, -0.03997802734375, -0.06829833984375, 0.01322174072265625, 0.049407958984375, 0.004917144775390625, -0.005290985107421875, 0.0156402587890625, 0.016998291015625, -0.04400634765625, 0.06658935546875, -0.0117645263671875, -0.026214599609375, -0.00542449951171875, -0.06329345703125, 0.04156494140625, -0.03131103515625, 0.08526611328125, 0.0797119140625, -0.0012722015380859375, 0.017852783203125, 0.0016508102416992188, 0.007122039794921875, -0.0038509368896484375, 0.0362548828125, -0.016845703125, -0.0304412841796875, -0.0445556640625, -0.0024166107177734375, 0.02044677734375, 0.04779052734375, 0.0055999755859375, -0.0257110595703125, 0.01050567626953125, 0.0374755859375, -0.034423828125, -0.060699462890625, -0.0008945465087890625, -0.069091796875, 0.0535888671875, -0.021881103515625, -0.0198516845703125, -0.02508544921875, 0.0013551712036132812, 0.01352691650390625, 0.0228271484375, -0.0080413818359375, -0.0242462158203125, -0.0243988037109375, -0.033721923828125, -0.0294647216796875, -0.000751495361328125, -0.00783538818359375, -0.0011749267578125, 0.06585693359375, 0.0084686279296875, -0.0595703125, 0.0086212158203125, 0.038421630859375, -0.025177001953125, 0.00970458984375, 0.04437255859375, -0.03607177734375, 0.01192474365234375, 0.01280975341796875, 0.01454925537109375, 0.032562255859375, -0.0379638671875, -0.0231170654296875, -0.00281524658203125, 0.00438690185546875, 0.021209716796875, 0.02410888671875, -0.0003974437713623047, 0.0245208740234375, 0.0267791748046875, -0.0311737060546875, -0.03173828125, -0.006458282470703125, -0.0406494140625, 0.00832366943359375, 0.028717041015625, -0.0034313201904296875, -0.005710601806640625, 0.005214691162109375, 0.0335693359375, -0.0031223297119140625, 0.056121826171875, -0.04058837890625, -0.0006537437438964844, 0.01702880859375, 0.03533935546875, -0.044189453125, 0.033203125, -0.007541656494140625, 0.04193115234375, 0.0377197265625, 0.0055999755859375, 0.0231475830078125, -0.0244140625, -0.0050201416015625, -0.067626953125, 0.042938232421875, -0.047637939453125, -0.00894927978515625, -0.026519775390625, -0.0166778564453125, 0.0295562744140625, 0.09906005859375, -0.075439453125, -0.00125885009765625, 0.0148773193359375, -0.007129669189453125, 0.0048980712890625, -0.0228271484375, -0.07208251953125, -0.01068115234375, -0.05181884765625, 0.0031280517578125, -0.03253173828125, -0.022705078125, -0.01084136962890625, -0.0034637451171875, -0.03460693359375, -0.054443359375, 0.055755615234375, -0.001262664794921875, -0.007537841796875, 0.019683837890625, -0.03155517578125, -0.006378173828125, -0.0428466796875, 0.00841522216796875, -0.0826416015625, -0.033935546875, 0.0401611328125, 0.07720947265625, -0.008880615234375, -0.040313720703125, -0.0460205078125, 0.04534912109375, 0.04107666015625, -0.01183319091796875, 0.0211639404296875, -0.01708984375, 0.0006704330444335938, -0.053009033203125, -0.018280029296875, -0.04638671875, 0.02142333984375, 0.01195526123046875, -0.04656982421875, -0.01168060302734375, -0.04876708984375, -0.0108489990234375, 0.0110931396484375, -0.02490234375, -0.04937744140625, -0.0457763671875, -0.0196380615234375, -0.00771331787109375, 0.006031036376953125, -0.02191162109375, -0.03887939453125, -0.03338623046875, 0.003063201904296875, 0.025787353515625, -0.05096435546875, 0.01342010498046875, 0.035186767578125, 0.023681640625, -0.0187835693359375, -0.04925537109375, -0.01145172119140625, 0.01934814453125, -0.00868988037109375, 0.043212890625, 0.029815673828125, -0.0172576904296875, 0.0236663818359375, -0.004207611083984375, -0.036163330078125, -0.0232391357421875, 0.061065673828125, 0.0253448486328125, -0.015380859375, 0.01258087158203125, -0.0034351348876953125, 0.0377197265625, -0.0026798248291015625, -0.004253387451171875, -0.03753662109375, -0.004364013671875, 0.0472412109375, -0.00957489013671875, 0.03851318359375, -0.023834228515625, -0.005901336669921875, 0.01258087158203125, 0.022308349609375, 0.0308380126953125, -0.00634765625, 0.00482940673828125, -0.0128021240234375, -0.0166473388671875, 0.00798797607421875, 0.027099609375, 0.029876708984375, 0.005985260009765625, 0.052703857421875, -0.00945281982421875, -0.003452301025390625, -0.0031585693359375, 0.00368499755859375, -0.0034885406494140625, -0.057525634765625, -0.05450439453125, -0.018951416015625, -0.0186920166015625, -0.0034961700439453125, 0.06903076171875, -0.0218353271484375, 0.030059814453125, 0.057464599609375, -0.047149658203125, -0.0121612548828125, 0.017791748046875, -0.021484375, -0.05328369140625, 0.014617919921875, 0.0158843994140625, 0.0096282958984375, 0.01058197021484375, 0.0838623046875, 0.0292510986328125, 0.042938232421875, -0.038604736328125, 0.0043792724609375, 0.01318359375, 0.02996826171875, 0.005779266357421875, -0.00325775146484375, 0.0128326416015625, 0.017730712890625, 0.0265350341796875, -0.0042724609375, -0.02374267578125, 0.005764007568359375, 0.021240234375, -0.022216796875, 0.0109405517578125, 0.0028095245361328125, -0.004398345947265625, -0.003314971923828125, 0.0264892578125, 0.018341064453125, -0.0195770263671875, -0.0177459716796875, -0.0278472900390625, 0.003086090087890625, -0.01529693603515625, -0.039154052734375, 0.02801513671875, -0.025421142578125, 0.0670166015625, -0.0391845703125, 0.0025653839111328125, 0.04681396484375, 0.026611328125, -0.0017070770263671875, -0.030975341796875, -0.0175018310546875, 0.00904083251953125, 0.0261383056640625, -0.0367431640625, -0.0297698974609375, 0.03900146484375, -0.03704833984375, 0.01446533203125, -0.0201263427734375, 0.0027751922607421875, -0.023345947265625, 0.0101776123046875, 0.07464599609375, 0.057098388671875, -0.062286376953125, -0.009674072265625, -0.038116455078125, -0.0174102783203125, 0.0012197494506835938, -0.0023403167724609375, -0.0465087890625, 0.00624847412109375, 0.005558013916015625, 0.013031005859375, -0.00467681884765625, -0.0288238525390625, -0.026641845703125, 0.0106201171875, 0.031890869140625, 0.0313720703125, -0.048309326171875, 0.08648681640625, 0.0005316734313964844, 0.051971435546875, -0.012115478515625, 0.024566650390625, 0.0037555694580078125, -0.002979278564453125, -0.00872039794921875, -0.04376220703125, -0.0059051513671875, -0.004665374755859375, -0.02197265625, 0.04266357421875, 0.0616455078125, 0.0004360675811767578, 0.0084686279296875, 0.00007522106170654297, -0.00701141357421875, -0.030731201171875, -0.00531005859375, -0.0254974365234375, 0.0209197998046875, 0.00008696317672729492, 0.00884246826171875, 0.018341064453125, -0.019866943359375, -0.0304107666015625, 0.017181396484375, 0.0049591064453125, 0.0182647705078125, -0.004917144775390625, -0.04412841796875, 0.07720947265625, 0.098876953125, 0.02777099609375, 0.06097412109375, 0.0160675048828125, 0.0042266845703125, 0.003963470458984375, 0.00681304931640625, -0.04229736328125, 0.0104217529296875, 0.03515625, -0.006687164306640625, -0.02581787109375, 0.0175323486328125, -0.006740570068359375, -0.006591796875, 0.02496337890625, 0.038970947265625, -0.04400634765625, -0.013519287109375, 0.01302337646484375, -0.000537872314453125, 0.0138092041015625, 0.039398193359375, -0.00032591819763183594, 0.02105712890625, 0.0005154609680175781, -0.0108795166015625, 0.006011962890625, 0.0192413330078125, 0.0267486572265625, -0.0031299591064453125, -0.0171661376953125, 0.03924560546875, 0.0018739700317382812, -0.033905029296875, 0.0006947517395019531, -0.0012025833129882812, -0.0084381103515625, -0.007488250732421875, 0.039886474609375, -0.042266845703125, -0.0048370361328125, -0.049468994140625, -0.0146484375, 0.011474609375, -0.0229644775390625, 0.0101776123046875, 0.023193359375, -0.00820159912109375, 0.034698486328125, -0.01183319091796875, 0.0234222412109375, -0.0027675628662109375, -0.009979248046875, -0.045928955078125, -0.03399658203125, 0.02166748046875, 0.051300048828125, -0.0272674560546875, 0.0391845703125, -0.00861358642578125, -0.0312347412109375, -0.0292510986328125, -0.0675048828125, 0.05902099609375, -0.0165863037109375, -0.01031494140625, 0.00431060791015625, 0.01157379150390625, -0.006572723388671875, 0.00782012939453125, 0.0165252685546875, -0.0281829833984375, -0.0345458984375, 0.019775390625, -0.0565185546875, -0.037139892578125, -0.0007648468017578125, -0.01395416259765625, 0.07159423828125, -0.028472900390625, -0.003284454345703125, 0.0428466796875, 0.034942626953125, -0.021453857421875, 0.0280914306640625, -0.029205322265625, 0.0240936279296875, -0.0140533447265625, 0.03326416015625, -0.06182861328125, -0.0092010498046875, -0.0038909912109375, 0.045989990234375, 0.02691650390625, 0.01468658447265625, -0.067626953125, -0.0086669921875, 0.044677734375, 0.0235595703125, 0.0132904052734375, 0.06292724609375, -0.04718017578125, 0.03436279296875, 0.028472900390625, -0.0362548828125, 0.039642333984375, 0.0025177001953125, -0.06622314453125, -0.01047515869140625, 0.01434326171875, 0.0160369873046875, 0.0028629302978515625, -0.0246429443359375, -0.0303955078125, 0.000007987022399902344, 0.0223541259765625, 0.00522613525390625, -0.006633758544921875, 0.061614990234375, 0.054473876953125, -0.02899169921875, 0.0161895751953125, -0.03277587890625, 0.053680419921875, -0.01096343994140625, 0.01264190673828125, 0.033538818359375, 0.00986480712890625, 0.03350830078125, -0.006450653076171875, -0.0034694671630859375, 0.01727294921875, -0.0105133056640625, 0.054901123046875, 0.046783447265625, 0.03619384765625, 0.0007767677307128906, 0.018646240234375, 0.012786865234375, 0.060791015625, -0.04534912109375, -0.059844970703125, -0.004608154296875, -0.017822265625, 0.000048160552978515625, 0.0196990966796875, -0.00450897216796875, 0.039794921875, 0.046234130859375, -0.038818359375, 0.0208282470703125, -0.0174102783203125, -0.0009984970092773438, -0.0308685302734375, -0.032318115234375, 0.01611328125, 0.0176849365234375, -0.0281524658203125, -0.0253753662109375, 0.0110626220703125, 0.0548095703125, 0.0341796875, -0.00360107421875, -0.0062255859375, -0.0171356201171875, -0.04107666015625, 0.03863525390625, -0.0230865478515625, 0.049407958984375, -0.041412353515625, -0.0270233154296875, -0.00624847412109375, 0.03570556640625, 0.044708251953125, 0.02294921875, 0.00943756103515625, -0.0005259513854980469, 0.034210205078125, 0.02392578125, 0.0548095703125, -0.0008540153503417969, 0.0090484619140625, -0.0218505859375, 0.01605224609375, -0.0045928955078125, -0.0025424957275390625, -0.0038089752197265625, 0.035888671875, -0.005764007568359375, 0.027679443359375, 0.01128387451171875, 0.0004811286926269531, -0.01611328125, 0.03302001953125, -0.01404571533203125, 0.059814453125, 0.02618408203125, -0.0693359375, -0.03369140625, -0.0399169921875, -0.021026611328125, 0.048675537109375, 0.053131103515625, 0.0221099853515625, -0.0316162109375, 0.0250701904296875, -0.0183868408203125, -0.005718231201171875, -0.0082244873046875, 0.0252227783203125, 0.0127105712890625, -0.00202178955078125, 0.026214599609375, -0.0400390625, -0.027435302734375, -0.0098419189453125, 0.016265869140625, 0.02471923828125, 0.05743408203125, 0.00832366943359375, 0.030181884765625, 0.0287628173828125, 0.053009033203125, -0.021453857421875, 0.01222991943359375, 0.02288818359375, -0.0236053466796875, 0.0179901123046875, -0.0152587890625, -0.01861572265625, -0.033050537109375, 0.06549072265625, -0.07501220703125, 0.002490997314453125, -0.00328826904296875, 0.01241302490234375, -0.0694580078125, 0.0017004013061523438, -0.02618408203125, 0.0196990966796875, -0.00830841064453125, -0.0271148681640625, 0.056671142578125, -0.00799560546875, -0.0278167724609375, 0.058563232421875, 0.0084686279296875, -0.0251922607421875, 0.061676025390625, -0.0828857421875, 0.09173583984375, 0.0352783203125, 0.0046234130859375, -0.0287933349609375, 0.0201263427734375, -0.0089874267578125, 0.013885498046875, 0.0229644775390625, 0.04443359375, 0.028228759765625, 0.0185394287109375, -0.0229339599609375, -0.041900634765625, 0.005161285400390625, -0.0269317626953125, -0.0055999755859375, -0.0137939453125, 0.00457763671875, -0.0174102783203125, -0.024383544921875, -0.041107177734375, -0.0262603759765625, 0.00678253173828125, 0.013519287109375, -0.00032782554626464844, -0.04266357421875, -0.06494140625, -0.0037288665771484375, 0.049774169921875, -0.0030975341796875, -0.032958984375, 0.0305328369140625, -0.06298828125, 0.00783538818359375, 0.012176513671875, -0.039703369140625, 0.001064300537109375, 0.0133056640625, 0.00966644287109375, 0.0217132568359375, -0.0521240234375, -0.0158538818359375, -0.01439666748046875, 0.01166534423828125, 0.050262451171875, -0.0168609619140625, -0.0274200439453125, -0.0301055908203125, -0.027557373046875, 0.02691650390625, -0.048431396484375, -0.006130218505859375, 0.0290374755859375, -0.01885986328125, -0.015625, -0.0408935546875, 0.007476806640625, -0.059173583984375, -0.027313232421875, -0.01708984375, 0.01540374755859375, 0.021728515625, -0.0182647705078125, -0.0482177734375, 0.065673828125, -0.0271148681640625, -0.00963592529296875, -0.048614501953125, 0.0304412841796875, -0.0005335807800292969, -0.00255584716796875, 0.002933502197265625, -0.036773681640625, -0.016632080078125, 0.005191802978515625, -0.0018472671508789062, 0.06756591796875, 0.0152435302734375, -0.01318359375, -0.0233154296875, -0.03302001953125, -0.03155517578125, 0.0246124267578125, 0.0115203857421875, 0.006465911865234375, 0.0029468536376953125, 0.01082611083984375, -0.048980712890625, 0.015625, -0.021697998046875, 0.0223541259765625, 0.00936126708984375, -0.00557708740234375, -0.04046630859375, -0.0175018310546875, 0.047149658203125, 0.0236968994140625, 0.01136016845703125, -0.02252197265625, -0.00914764404296875, -0.0261993408203125, -0.0384521484375, -0.033233642578125, 0.019989013671875, -0.06787109375, -0.027191162109375, -0.008514404296875, -0.042877197265625, -0.0021190643310546875, 0.006893157958984375, -0.049591064453125, 0.03369140625, 0.016876220703125, -0.024078369140625, 0.010833740234375, 0.0303955078125, 0.00510406494140625, -0.02166748046875, -0.037628173828125, -0.0175933837890625, -0.0160675048828125, -0.0289459228515625, -0.042205810546875, -0.03564453125, 0.0191192626953125, 0.00569915771484375, -0.01517486572265625, 0.013763427734375, -0.00803375244140625, 0.0399169921875, 0.02288818359375, 0.0237884521484375, -0.0079803466796875, -0.0242156982421875, -0.0202178955078125, 0.0028247833251953125, 0.03778076171875, -0.03680419921875, 0.07373046875, -0.005474090576171875, 0.007450103759765625, 0.005645751953125, -0.0009284019470214844, -0.0140228271484375, 0.004291534423828125, 0.008209228515625, -0.01509857177734375, 0.00855255126953125, -0.03466796875, -0.059814453125, -0.0146026611328125, -0.0167236328125, -0.0218658447265625, -0.05682373046875, 0.009185791015625 ]
e952a3804ab43a9385c0ffadb78f1582fd63a86a
Wordpress Stackexchange Q: How to use a custom post type as front page? I would like to set a site's front page to be a single post from a custom post type. I have been able to alter the request for my front page to a Custom Post Type archive with the following code (originally posted here): function custom_front_page($wp_query){ if($wp_query->get('page_id')==get_option('page_on_front')){ $wp_query->set('post_type','album'); $wp_query->set('page_id',''); // empty // fix conditional functions $wp_query->is_page = false; $wp_query->is_archive = true; $wp_query->is_post_type_archive = true; } } add_action('pre_get_posts','custom_front_page'); Replacing $wp_query->is_archive = true; $wp_query->is_post_type_archive = true; with $wp_query->is_single = true; calls the single-album.php template as I'd like to, but it still returns ALL the posts in the "Albums" category, instead of only one. Adding $wp_query->set('posts_per_page',1); has no effect. What should I be doing instead? Bonus question: is there a good reference somewhere about how to manipulate the query this way? A: I had to do the same for a customer and I have found two resources which helped me: How do you use a CPT as the default home page? http://wpquestions.com/question/show/id/2944
Q: How to use a custom post type as front page? I would like to set a site's front page to be a single post from a custom post type. I have been able to alter the request for my front page to a Custom Post Type archive with the following code (originally posted here): function custom_front_page($wp_query){ if($wp_query->get('page_id')==get_option('page_on_front')){ $wp_query->set('post_type','album'); $wp_query->set('page_id',''); // empty // fix conditional functions $wp_query->is_page = false; $wp_query->is_archive = true; $wp_query->is_post_type_archive = true; } } add_action('pre_get_posts','custom_front_page'); Replacing $wp_query->is_archive = true; $wp_query->is_post_type_archive = true; with $wp_query->is_single = true; calls the single-album.php template as I'd like to, but it still returns ALL the posts in the "Albums" category, instead of only one. Adding $wp_query->set('posts_per_page',1); has no effect. What should I be doing instead? Bonus question: is there a good reference somewhere about how to manipulate the query this way? A: I had to do the same for a customer and I have found two resources which helped me: How do you use a CPT as the default home page? http://wpquestions.com/question/show/id/2944 A: Easiest way to display single post on front page would be: global $wp_query; $wp_query = new WP_Query( array( 'p' => 'POST ID HERE' ) ); include( 'single-POSTTYPE.php' ); A: This is the solution that worked for me: function add_<MYTPE>_to_dropdown( $pages, $r ) { if('page_on_front' == $r['name']) { $args = array( 'post_type' => '<MYTYPE>' ); $items = get_posts($args); $pages = array_merge($pages, $items); } return $pages; } add_filter( 'get_pages', 'add_<MYTPE>_to_dropdown' ); function enable_front_page_<MYTPE>( $query ) { if('' == $query->query_vars['post_type'] && 0 != $query->query_vars['page_id']) $query->query_vars['post_type'] = array( 'page', '<MYTPE>' ); } add_action( 'pre_get_posts', 'enable_front_page_<MYTPE>' ); Just replace <MYTYPE> with your custom post type machine name A: https://wordpress.org/plugins/mpress-custom-front-page/ seems to be implementing the correct logic in a clean manner. Github https://github.com/wpscholar/mpress-custom-front-page/
wordpress
{ "language": "en", "length": 288, "provenance": "stackexchange_00019.jsonl.gz:413779", "question_score": "6", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30869" }
[ 0.06988525390625, 0.00867462158203125, -0.010406494140625, -0.03955078125, 0.031524658203125, -0.03131103515625, 0.05670166015625, -0.018951416015625, -0.030059814453125, -0.00769805908203125, 0.007617950439453125, -0.0212249755859375, -0.04095458984375, -0.046173095703125, 0.017364501953125, -0.04925537109375, 0.037841796875, -0.0185699462890625, 0.0118408203125, -0.00499725341796875, 0.01142120361328125, 0.00870513916015625, 0.009735107421875, 0.035491943359375, 0.00008058547973632812, 0.0259552001953125, 0.0237274169921875, -0.00971221923828125, 0.005863189697265625, -0.0019311904907226562, 0.007343292236328125, -0.01212310791015625, 0.0267333984375, -0.018310546875, 0.006122589111328125, 0.046173095703125, -0.00557708740234375, 0.0169830322265625, 0.005107879638671875, 0.0263824462890625, 0.0009870529174804688, 0.007091522216796875, -0.0239715576171875, 0.02294921875, -0.02423095703125, -0.05755615234375, 0.0243988037109375, -0.0235595703125, 0.01181793212890625, -0.023101806640625, -0.00316619873046875, -0.0009984970092773438, 0.01373291015625, -0.032989501953125, -0.016815185546875, 0.002223968505859375, 0.01534271240234375, -0.07989501953125, 0.025482177734375, -0.01152801513671875, -0.0157623291015625, -0.0248870849609375, 0.050262451171875, -0.0017528533935546875, -0.0252532958984375, -0.00739288330078125, -0.00589752197265625, 0.00684356689453125, -0.05853271484375, -0.048828125, 0.0364990234375, -0.0113983154296875, 0.03985595703125, -0.015777587890625, -0.028839111328125, -0.00464630126953125, 0.00037479400634765625, 0.00439453125, 0.04718017578125, -0.0355224609375, -0.0189208984375, -0.019012451171875, -0.055450439453125, -0.039459228515625, 0.018218994140625, -0.01200103759765625, -0.006244659423828125, 0.0011816024780273438, -0.031280517578125, 0.0025234222412109375, -0.0290069580078125, -0.03753662109375, 0.01473236083984375, -0.012847900390625, -0.014190673828125, -0.0118255615234375, 0.01258087158203125, 0.0394287109375, -0.01505279541015625, 0.0110015869140625, -0.0126953125, -0.03472900390625, 0.023284912109375, -0.03704833984375, 0.0281524658203125, 0.01158905029296875, -0.002132415771484375, 0.0011653900146484375, 0.05517578125, 0.0261077880859375, 0.006389617919921875, 0.06768798828125, -0.028350830078125, -0.005512237548828125, -0.04168701171875, 0.0177764892578125, -0.04888916015625, -0.005634307861328125, -0.0164794921875, 0.04241943359375, 0.02069091796875, 0.041046142578125, 0.042572021484375, -0.057861328125, -0.00044608116149902344, -0.00164794921875, -0.0217437744140625, -0.0775146484375, 0.0020771026611328125, 0.042572021484375, -0.0283355712890625, -0.006519317626953125, 0.0421142578125, 0.0160675048828125, 0.0092926025390625, -0.02264404296875, 0.036651611328125, 0.0017518997192382812, -0.004077911376953125, 0.026214599609375, 0.048248291015625, -0.055938720703125, -0.046844482421875, 0.037200927734375, 0.033416748046875, -0.00269317626953125, 0.035797119140625, 0.0297393798828125, -0.031768798828125, -0.0158843994140625, 0.03326416015625, 0.020233154296875, 0.009979248046875, 0.004619598388671875, -0.0205230712890625, -0.021087646484375, -0.00945281982421875, 0.0011043548583984375, 0.0077667236328125, -0.011871337890625, 0.004665374755859375, -0.0150146484375, -0.0018167495727539062, -0.0287017822265625, -0.0296630859375, 0.01200103759765625, -0.0330810546875, -0.0037708282470703125, 0.004085540771484375, 0.0188751220703125, -0.0069580078125, -0.00533294677734375, 0.006214141845703125, -0.0243682861328125, -0.0290069580078125, -0.0181884765625, 0.00789642333984375, 0.01003265380859375, 0.006046295166015625, 0.06781005859375, 0.001293182373046875, -0.032073974609375, 0.04193115234375, -0.01885986328125, -0.052764892578125, 0.04486083984375, 0.01824951171875, 0.038818359375, -0.021087646484375, 0.01235198974609375, 0.04156494140625, 0.061370849609375, -0.056121826171875, 0.01123809814453125, -0.0069122314453125, -0.013458251953125, -0.047760009765625, -0.039459228515625, -0.0267791748046875, 0.061981201171875, 0.00040221214294433594, 0.0207061767578125, 0.002567291259765625, 0.01349639892578125, -0.02239990234375, 0.00870513916015625, -0.0037555694580078125, 0.03289794921875, -0.00847625732421875, 0.0189361572265625, 0.0240325927734375, 0.006134033203125, -0.0214996337890625, -0.036376953125, -0.021453857421875, 0.0176239013671875, 0.0235748291015625, 0.003917694091796875, -0.0210418701171875, -0.020111083984375, -0.008697509765625, -0.04034423828125, -0.02227783203125, 0.0721435546875, 0.09271240234375, -0.00653839111328125, -0.0162200927734375, -0.039947509765625, 0.040924072265625, 0.01153564453125, -0.09930419921875, 0.036712646484375, 0.033233642578125, 0.013885498046875, -0.0276641845703125, 0.007236480712890625, 0.00002950429916381836, -0.039825439453125, -0.0035648345947265625, 0.04669189453125, 0.00708770751953125, -0.004825592041015625, -0.00907135009765625, 0.042572021484375, 0.023345947265625, 0.0016584396362304688, 0.0206756591796875, 0.01210784912109375, 0.0238494873046875, 0.016632080078125, -0.03448486328125, -0.0209197998046875, 0.043487548828125, -0.06317138671875, 0.035064697265625, 0.0227203369140625, 0.0300750732421875, 0.033935546875, 0.016448974609375, -0.0308837890625, 0.00429534912109375, 0.016998291015625, -0.025848388671875, 0.0196075439453125, 0.045013427734375, 0.01509857177734375, 0.050262451171875, 0.037200927734375, -0.0181884765625, 0.0183563232421875, -0.0109710693359375, 0.0010986328125, -0.0015420913696289062, 0.01849365234375, -0.00017535686492919922, -0.0170745849609375, -0.02056884765625, 0.0030975341796875, 0.0121917724609375, -0.009735107421875, -0.017791748046875, 0.01345062255859375, -0.041107177734375, -0.0019817352294921875, -0.035888671875, -0.07122802734375, 0.00830078125, 0.04376220703125, -0.0006299018859863281, -0.0005016326904296875, 0.015716552734375, 0.03375244140625, -0.03802490234375, 0.049713134765625, -0.007122039794921875, -0.0196990966796875, -0.0051116943359375, -0.0697021484375, 0.052734375, -0.035919189453125, 0.081787109375, 0.086181640625, -0.009918212890625, 0.0308990478515625, -0.004291534423828125, 0.006443023681640625, 0.0011301040649414062, 0.0248870849609375, -0.0274658203125, -0.04052734375, -0.0196075439453125, 0.010986328125, 0.0170135498046875, 0.06256103515625, 0.0006890296936035156, -0.02728271484375, 0.005413055419921875, 0.0455322265625, -0.009735107421875, -0.031524658203125, 0.03485107421875, -0.085693359375, 0.045562744140625, -0.017913818359375, -0.0254058837890625, -0.041534423828125, 0.0218505859375, 0.008026123046875, 0.0253448486328125, 0.00228118896484375, -0.0262298583984375, -0.0276947021484375, -0.04345703125, -0.048248291015625, -0.005062103271484375, -0.00846099853515625, 0.003025054931640625, 0.05804443359375, 0.01367950439453125, -0.0599365234375, 0.01160430908203125, 0.03961181640625, -0.027587890625, 0.003509521484375, 0.0380859375, -0.044219970703125, 0.00945281982421875, 0.01253509521484375, -0.007038116455078125, 0.0333251953125, -0.0222625732421875, -0.0216217041015625, -0.004016876220703125, -0.01142120361328125, 0.0015010833740234375, 0.06396484375, 0.01270294189453125, 0.02276611328125, 0.0501708984375, -0.0267333984375, -0.0386962890625, -0.00994873046875, -0.05010986328125, 0.006683349609375, 0.0269927978515625, 0.015380859375, -0.0219573974609375, 0.020599365234375, 0.0107421875, -0.006927490234375, 0.040069580078125, -0.0270843505859375, -0.0007843971252441406, -0.0008230209350585938, -0.0004038810729980469, -0.027313232421875, 0.034423828125, -0.01177215576171875, 0.0151214599609375, 0.029998779296875, -0.002773284912109375, 0.0133819580078125, -0.042388916015625, -0.0186004638671875, -0.068115234375, 0.032867431640625, -0.0516357421875, 0.0137176513671875, -0.03680419921875, -0.02166748046875, 0.0167388916015625, 0.1016845703125, -0.06451416015625, -0.0046234130859375, 0.01226806640625, 0.0014133453369140625, -0.005229949951171875, -0.05181884765625, -0.052398681640625, -0.01381683349609375, -0.0009431838989257812, -0.007595062255859375, -0.0244598388671875, -0.01253509521484375, -0.01224517822265625, -0.006046295166015625, -0.0122222900390625, -0.0306396484375, 0.0462646484375, -0.02337646484375, -0.0251922607421875, 0.03973388671875, -0.03546142578125, 0.0038909912109375, -0.032623291015625, -0.01313018798828125, -0.0931396484375, -0.03363037109375, 0.055511474609375, 0.053802490234375, -0.032806396484375, -0.0248565673828125, -0.037750244140625, 0.056671142578125, 0.023223876953125, -0.01203155517578125, 0.0178680419921875, -0.01334381103515625, 0.0057373046875, -0.0411376953125, -0.01230621337890625, -0.047821044921875, 0.005664825439453125, -0.019439697265625, -0.035614013671875, -0.01338958740234375, -0.047119140625, -0.00778961181640625, -0.0113372802734375, -0.00289154052734375, -0.06201171875, -0.056854248046875, -0.02093505859375, 0.00962066650390625, 0.00484466552734375, -0.0088348388671875, -0.053558349609375, -0.056396484375, 0.01026153564453125, 0.01448822021484375, -0.0450439453125, 0.0211334228515625, 0.047576904296875, 0.01560211181640625, -0.0189056396484375, -0.07781982421875, -0.004383087158203125, 0.025421142578125, 0.0118865966796875, 0.0290374755859375, 0.0169219970703125, -0.01201629638671875, 0.0229034423828125, -0.003948211669921875, -0.0258026123046875, -0.0272369384765625, 0.06463623046875, 0.0013971328735351562, -0.016357421875, 0.0130615234375, -0.0225372314453125, 0.04010009765625, 0.01995849609375, -0.01340484619140625, -0.0231475830078125, -0.00550079345703125, 0.035125732421875, -0.0092926025390625, 0.026397705078125, -0.0222320556640625, -0.0237884521484375, 0.01125335693359375, 0.050537109375, 0.0050506591796875, -0.001857757568359375, 0.0182952880859375, -0.01045989990234375, -0.00339508056640625, -0.0020084381103515625, 0.034454345703125, 0.05279541015625, 0.011962890625, 0.032379150390625, 0.0225830078125, -0.006015777587890625, -0.021575927734375, 0.002483367919921875, -0.0038356781005859375, -0.03717041015625, -0.059173583984375, -0.003673553466796875, -0.02099609375, -0.004802703857421875, 0.04998779296875, 0.00782012939453125, 0.04205322265625, 0.026611328125, -0.026336669921875, -0.034759521484375, -0.00921630859375, -0.01375579833984375, -0.05914306640625, 0.00007480382919311523, 0.029754638671875, -0.0022296905517578125, 0.026641845703125, 0.06011962890625, 0.050689697265625, 0.032135009765625, -0.041717529296875, -0.0127716064453125, 0.0019483566284179688, 0.039764404296875, 0.0004863739013671875, 0.00982666015625, -0.0131683349609375, 0.04327392578125, 0.0312042236328125, -0.01538848876953125, -0.020416259765625, 0.01300048828125, 0.0400390625, -0.0144805908203125, -0.00479888916015625, -0.0029315948486328125, -0.028411865234375, -0.0087738037109375, 0.030731201171875, -0.00551605224609375, -0.033172607421875, -0.0198822021484375, -0.00714874267578125, 0.0296173095703125, -0.0197906494140625, -0.032470703125, 0.0706787109375, -0.0237579345703125, 0.0745849609375, -0.01800537109375, -0.005062103271484375, 0.03985595703125, 0.037628173828125, 0.00826263427734375, -0.0297393798828125, -0.01534271240234375, -0.01947021484375, 0.03076171875, -0.04345703125, -0.032989501953125, 0.0360107421875, -0.01396942138671875, 0.033905029296875, -0.0193023681640625, -0.0251007080078125, -0.0193023681640625, 0.00763702392578125, 0.0672607421875, 0.0406494140625, -0.019256591796875, -0.01885986328125, -0.03521728515625, -0.035308837890625, 0.02862548828125, 0.0031566619873046875, -0.03839111328125, -0.01035308837890625, 0.0239105224609375, 0.0292510986328125, 0.00400543212890625, -0.04638671875, -0.0311279296875, -0.006195068359375, 0.0238800048828125, 0.0377197265625, -0.04949951171875, 0.06121826171875, 0.004913330078125, 0.03570556640625, -0.0276641845703125, -0.000018835067749023438, 0.00594329833984375, 0.0002925395965576172, -0.00946807861328125, -0.050537109375, 0.00554656982421875, 0.0028820037841796875, -0.005889892578125, 0.0474853515625, 0.048492431640625, 0.016876220703125, -0.00785064697265625, -0.006107330322265625, 0.00441741943359375, -0.03155517578125, 0.018524169921875, -0.0243988037109375, -0.006549835205078125, -0.006763458251953125, 0.0179443359375, 0.040008544921875, -0.01861572265625, -0.030609130859375, 0.0116119384765625, 0.00316619873046875, 0.024078369140625, -0.007396697998046875, -0.034820556640625, 0.06158447265625, 0.08026123046875, 0.0222320556640625, 0.05523681640625, 0.0121002197265625, 0.0027523040771484375, -0.006320953369140625, 0.005035400390625, -0.052947998046875, 0.0107421875, 0.0195465087890625, -0.0160675048828125, -0.016632080078125, 0.004230499267578125, -0.0017538070678710938, 0.00913238525390625, 0.0305023193359375, 0.043670654296875, -0.06622314453125, 0.01166534423828125, 0.0171661376953125, 0.0006880760192871094, 0.015716552734375, 0.01493072509765625, -0.0001748800277709961, -0.0006284713745117188, 0.0163726806640625, 0.0104522705078125, -0.00618743896484375, 0.01447296142578125, 0.0223236083984375, 0.010711669921875, -0.0082550048828125, 0.05792236328125, 0.00951385498046875, -0.038299560546875, -0.0079803466796875, -0.001220703125, -0.0017156600952148438, -0.00855255126953125, 0.007495880126953125, -0.024505615234375, -0.0293731689453125, -0.0599365234375, -0.0143585205078125, -0.006866455078125, -0.0118255615234375, 0.033660888671875, 0.015350341796875, -0.024688720703125, 0.035186767578125, -0.027099609375, 0.04656982421875, -0.01043701171875, -0.02044677734375, -0.07635498046875, -0.0309600830078125, 0.03668212890625, 0.031524658203125, -0.0509033203125, 0.049407958984375, -0.026947021484375, -0.0394287109375, -0.0213165283203125, -0.037689208984375, 0.06927490234375, -0.045166015625, -0.006488800048828125, 0.01244354248046875, 0.0280914306640625, 0.0007171630859375, -0.006023406982421875, 0.00470733642578125, -0.038787841796875, -0.032958984375, 0.0092926025390625, -0.0479736328125, -0.018768310546875, 0.0004076957702636719, -0.0280609130859375, 0.1083984375, -0.01258087158203125, -0.0042724609375, 0.037078857421875, 0.051666259765625, -0.050079345703125, 0.031341552734375, -0.0161285400390625, 0.03515625, -0.01715087890625, 0.0228424072265625, -0.03411865234375, 0.0088043212890625, -0.006092071533203125, 0.021484375, 0.06854248046875, 0.0189208984375, -0.05255126953125, 0.01099395751953125, 0.0623779296875, 0.019317626953125, -0.010650634765625, 0.06378173828125, -0.04425048828125, -0.0048828125, 0.031219482421875, -0.006683349609375, 0.035736083984375, 0.022186279296875, -0.052886962890625, -0.00400543212890625, 0.032318115234375, 0.0298919677734375, 0.005863189697265625, 0.0074615478515625, -0.047637939453125, 0.00589752197265625, 0.049407958984375, 0.004261016845703125, -0.0046234130859375, 0.07177734375, 0.06329345703125, -0.0226593017578125, 0.0308380126953125, -0.0308685302734375, 0.062286376953125, -0.00946807861328125, 0.01319122314453125, 0.0224609375, 0.00824737548828125, 0.01611328125, -0.01128387451171875, -0.0009064674377441406, 0.0115509033203125, -0.01361846923828125, 0.056640625, 0.0465087890625, 0.0219573974609375, -0.02166748046875, 0.0411376953125, 0.025299072265625, 0.060028076171875, -0.06097412109375, -0.05657958984375, 0.0028018951416015625, -0.004547119140625, 0.0095672607421875, 0.0164337158203125, 0.0148468017578125, 0.01526641845703125, 0.028106689453125, -0.057525634765625, 0.0240936279296875, 0.006855010986328125, 0.007312774658203125, -0.029388427734375, -0.023773193359375, -0.0239105224609375, 0.004779815673828125, -0.034576416015625, -0.0027942657470703125, -0.005428314208984375, 0.05120849609375, 0.0265960693359375, 0.0244598388671875, -0.0125274658203125, -0.008697509765625, -0.024658203125, 0.022430419921875, -0.02899169921875, 0.040557861328125, -0.03900146484375, -0.03564453125, 0.00848388671875, 0.035430908203125, 0.049163818359375, 0.0235443115234375, 0.038360595703125, 0.00960540771484375, -0.004947662353515625, 0.012115478515625, 0.04962158203125, -0.0149078369140625, -0.032989501953125, -0.00002372264862060547, -0.0037288665771484375, 0.016815185546875, -0.0009646415710449219, 0.01520538330078125, 0.046142578125, 0.010223388671875, 0.03582763671875, 0.0380859375, 0.00777435302734375, -0.011322021484375, 0.03070068359375, -0.007335662841796875, 0.07830810546875, 0.0423583984375, -0.078125, -0.0312347412109375, -0.033660888671875, -0.051239013671875, 0.05145263671875, 0.051361083984375, 0.0037078857421875, -0.023345947265625, 0.0017518997192382812, 0.0174102783203125, -0.0020427703857421875, -0.051025390625, 0.0289154052734375, 0.0213165283203125, 0.00482177734375, 0.032501220703125, -0.0682373046875, -0.04461669921875, -0.0310821533203125, 0.0267791748046875, 0.0175018310546875, 0.0682373046875, 0.0150604248046875, 0.0256195068359375, 0.029571533203125, 0.044830322265625, -0.0172119140625, 0.01067352294921875, 0.020172119140625, -0.027374267578125, 0.025634765625, -0.01300811767578125, -0.01556396484375, -0.0272979736328125, 0.05657958984375, -0.0625, -0.005252838134765625, -0.01751708984375, 0.01395416259765625, -0.048431396484375, 0.01265716552734375, -0.0289154052734375, 0.00494384765625, -0.05267333984375, -0.045440673828125, 0.06634521484375, -0.01070404052734375, -0.0273895263671875, 0.067626953125, -0.00885772705078125, -0.042572021484375, 0.040924072265625, -0.08868408203125, 0.05706787109375, 0.04296875, 0.012603759765625, -0.0258636474609375, 0.0099334716796875, -0.0133819580078125, 0.02386474609375, 0.013916015625, 0.04742431640625, 0.013580322265625, 0.0020999908447265625, -0.008697509765625, -0.053955078125, -0.01007843017578125, -0.039337158203125, -0.020965576171875, 0.004100799560546875, 0.0103759765625, -0.021636962890625, -0.007175445556640625, -0.023193359375, -0.0234375, 0.0016155242919921875, 0.0038852691650390625, -0.00955963134765625, -0.042205810546875, -0.06280517578125, -0.017974853515625, 0.050872802734375, -0.01117706298828125, -0.03216552734375, 0.03668212890625, -0.06500244140625, -0.004383087158203125, 0.0030040740966796875, -0.0231475830078125, -0.003246307373046875, 0.01282501220703125, -0.020294189453125, 0.0043487548828125, -0.04779052734375, -0.01451873779296875, -0.025421142578125, 0.00925445556640625, 0.0531005859375, -0.010894775390625, -0.016876220703125, -0.03387451171875, -0.027130126953125, 0.029327392578125, -0.05889892578125, -0.00824737548828125, 0.0112457275390625, -0.017669677734375, -0.0090484619140625, -0.041656494140625, 0.00836181640625, -0.060211181640625, -0.027740478515625, -0.01297760009765625, 0.002094268798828125, 0.01446533203125, -0.0355224609375, -0.0457763671875, 0.040985107421875, -0.019439697265625, -0.0191802978515625, -0.026641845703125, 0.0256195068359375, -0.01505279541015625, 0.0206451416015625, 0.00382232666015625, -0.00431060791015625, 0.0130615234375, 0.0224456787109375, 0.00896453857421875, 0.08038330078125, 0.0221710205078125, 0.003627777099609375, -0.019500732421875, -0.02703857421875, -0.0391845703125, 0.02789306640625, 0.0162506103515625, -0.01141357421875, 0.0131683349609375, -0.0034160614013671875, -0.07861328125, 0.0183868408203125, -0.025177001953125, 0.055511474609375, 0.02130126953125, -0.008819580078125, -0.06524658203125, -0.0213623046875, 0.0418701171875, 0.048858642578125, 0.023345947265625, -0.026947021484375, -0.0135650634765625, -0.035980224609375, -0.04010009765625, -0.0046844482421875, 0.0239410400390625, -0.04937744140625, 0.00765228271484375, -0.00019109249114990234, -0.050537109375, -0.005710601806640625, 0.0089111328125, -0.0465087890625, 0.0362548828125, 0.025634765625, -0.0217132568359375, -0.005702972412109375, 0.041778564453125, -0.0145111083984375, -0.0053253173828125, -0.031829833984375, -0.02520751953125, -0.017791748046875, -0.03472900390625, -0.036163330078125, -0.0372314453125, 0.051177978515625, -0.028472900390625, -0.02740478515625, 0.005222320556640625, -0.00787353515625, 0.00896453857421875, 0.03857421875, 0.02655029296875, 0.0064239501953125, -0.020172119140625, 0.004138946533203125, 0.0097503662109375, 0.03143310546875, -0.03338623046875, 0.043365478515625, -0.00921630859375, -0.00199127197265625, 0.00970458984375, 0.0034732818603515625, -0.0230712890625, 0.0189666748046875, -0.0041351318359375, -0.0230255126953125, 0.00536346435546875, -0.0216064453125, -0.0228271484375, -0.02630615234375, -0.00431060791015625, -0.0316162109375, -0.0303802490234375, 0.01447296142578125 ]
ae250949db7165ab4a1b7cf6aaf517ed0cc3a6fa
Wordpress Stackexchange Q: How to Change 404 page title i have try many methods after searching on internet but unable to ramove Nothing Found from my 404 page title how to do it please help me even i have us this in my 404 page header if( is_404() ) echo '404 message goes here | '; else wp_title( '|', true, 'right' ); i also ramove php title function and five their my own header but still not changing why ? A: WordPress 4.4 and up The accepted answer no longer works as wp_title is deprecated in WordPress 4.4 and up (see here). We must now use the document_title_parts filter hook instead. Here is the accepted answer rewritten to use document_title_parts. function theme_slug_filter_wp_title( $title_parts ) { if ( is_404() ) { $title_parts['title'] = 'ADD 404 TITLE TEXT HERE'; } return $title_parts; } // Hook into document_title_parts add_filter( 'document_title_parts', 'theme_slug_filter_wp_title' );
Q: How to Change 404 page title i have try many methods after searching on internet but unable to ramove Nothing Found from my 404 page title how to do it please help me even i have us this in my 404 page header if( is_404() ) echo '404 message goes here | '; else wp_title( '|', true, 'right' ); i also ramove php title function and five their my own header but still not changing why ? A: WordPress 4.4 and up The accepted answer no longer works as wp_title is deprecated in WordPress 4.4 and up (see here). We must now use the document_title_parts filter hook instead. Here is the accepted answer rewritten to use document_title_parts. function theme_slug_filter_wp_title( $title_parts ) { if ( is_404() ) { $title_parts['title'] = 'ADD 404 TITLE TEXT HERE'; } return $title_parts; } // Hook into document_title_parts add_filter( 'document_title_parts', 'theme_slug_filter_wp_title' ); A: I would use the wp_title filter hook: function theme_slug_filter_wp_title( $title ) { if ( is_404() ) { $title = 'ADD 404 TITLE TEXT HERE'; } // You can do other filtering here, or // just return $title return $title; } // Hook into wp_title filter hook add_filter( 'wp_title', 'theme_slug_filter_wp_title' ); This will play nicely with other Plugins (e.g. SEO Plugins), and will be relatively forward-compatible (changes to document title are coming soon). EDIT If you need to override an SEO Plugin filter, you probably just need to add a lower priority to your add_filter() call; e.g. as follows: add_filter( 'wp_title', 'theme_slug_filter_wp_title', 11 ); The default is 10. Lower numbers execute earlier (e.g. higher priority), and higher numbers execute later (e.g. lower priority). So, assuming your SEO Plugin uses the default priority (i.e. 10), simply use a number that is 11 or higher. A: The following code works fine with the twenty eleven theme: if ( is_404() ) { echo __('Nothing Found','mytheme') } So the title code looks like the following: <title> <?php global $page, $paged; if ( is_404() ) { echo __('Nothing Found | ','mytheme'); } else { wp_title( '|', true, 'right' ); } ?> </title>
wordpress
{ "language": "en", "length": 344, "provenance": "stackexchange_00019.jsonl.gz:413782", "question_score": "8", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30873" }
[ 0.011138916015625, -0.026824951171875, 0.01479339599609375, -0.0087127685546875, -0.021697998046875, 0.00461578369140625, 0.029815673828125, -0.01300048828125, 0.01214599609375, 0.037078857421875, 0.0296173095703125, -0.0009126663208007812, 0.0182647705078125, -0.0279693603515625, -0.033203125, -0.0020313262939453125, 0.004322052001953125, -0.01861572265625, 0.0190887451171875, -0.01161956787109375, 0.013824462890625, -0.01525115966796875, 0.0259552001953125, -0.031982421875, 0.00530242919921875, -0.056365966796875, 0.0816650390625, -0.039886474609375, 0.002117156982421875, -0.045684814453125, 0.007472991943359375, 0.038604736328125, 0.04168701171875, -0.032440185546875, 0.01904296875, 0.049652099609375, 0.039276123046875, -0.035247802734375, 0.0035800933837890625, 0.03228759765625, 0.0193328857421875, -0.006038665771484375, 0.03643798828125, 0.039093017578125, 0.0072021484375, -0.035614013671875, 0.0289459228515625, -0.048980712890625, 0.024627685546875, 0.0004267692565917969, 0.0017786026000976562, 0.046356201171875, 0.0195770263671875, -0.061676025390625, -0.005123138427734375, -0.0200042724609375, 0.0213623046875, 0.049560546875, 0.0242919921875, -0.039520263671875, -0.034210205078125, 0.035400390625, 0.0110015869140625, 0.008819580078125, -0.0074310302734375, -0.01715087890625, 0.013580322265625, 0.01241302490234375, -0.019683837890625, -0.006549835205078125, 0.0309906005859375, -0.0005788803100585938, -0.00016677379608154297, -0.00955963134765625, -0.00968170166015625, -0.017181396484375, -0.0003972053527832031, -0.035797119140625, 0.01514434814453125, 0.01404571533203125, 0.05706787109375, -0.0531005859375, 0.044342041015625, 0.020477294921875, 0.0170440673828125, 0.04290771484375, -0.002231597900390625, -0.0245513916015625, -0.0220794677734375, 0.010650634765625, -0.0128173828125, -0.007091522216796875, -0.01190185546875, 0.0235137939453125, 0.00634002685546875, -0.01203155517578125, -0.0012722015380859375, 0.037445068359375, -0.0274658203125, 0.027252197265625, -0.017730712890625, -0.008575439453125, 0.01593017578125, -0.03643798828125, -0.007129669189453125, 0.00981903076171875, 0.006542205810546875, -0.0164947509765625, 0.003589630126953125, 0.01543426513671875, -0.0295257568359375, 0.0303497314453125, -0.01206207275390625, -0.0180206298828125, -0.0300750732421875, 0.06988525390625, 0.0222015380859375, -0.0411376953125, -0.0121917724609375, 0.00908660888671875, -0.0022792816162109375, 0.00010401010513305664, 0.027923583984375, -0.0205078125, 0.003021240234375, -0.018707275390625, -0.021636962890625, -0.021270751953125, 0.07879638671875, 0.00550079345703125, -0.01222991943359375, -0.0017690658569335938, 0.01044464111328125, -0.006984710693359375, -0.018951416015625, -0.00984954833984375, -0.0294342041015625, -0.0275726318359375, -0.0148773193359375, -0.0012493133544921875, 0.04046630859375, -0.0240325927734375, 0.0222625732421875, 0.020263671875, 0.0194091796875, 0.0174407958984375, -0.0008254051208496094, 0.019927978515625, 0.0159912109375, -0.056427001953125, 0.036773681640625, -0.0124969482421875, 0.01548004150390625, 0.0341796875, -0.0249786376953125, -0.0260162353515625, 0.024383544921875, -0.032470703125, 0.0181121826171875, -0.06134033203125, 0.04388427734375, 0.005970001220703125, 0.0135955810546875, 0.0216217041015625, -0.007659912109375, -0.0017242431640625, -0.038909912109375, -0.006137847900390625, -0.0031642913818359375, 0.00789642333984375, -0.0173797607421875, 0.031707763671875, -0.05029296875, -0.02508544921875, -0.0018339157104492188, -0.0318603515625, 0.00858306884765625, 0.01163482666015625, -0.0005478858947753906, 0.033538818359375, -0.000016391277313232422, -0.035308837890625, 0.0179901123046875, -0.01001739501953125, -0.0628662109375, 0.028106689453125, 0.00740814208984375, 0.05108642578125, 0.01629638671875, 0.003322601318359375, 0.0260009765625, 0.01381683349609375, 0.0036449432373046875, 0.03887939453125, -0.0045013427734375, -0.02459716796875, -0.0144805908203125, 0.01219940185546875, -0.0194244384765625, -0.0131683349609375, -0.0242462158203125, 0.041900634765625, -0.033660888671875, 0.0256195068359375, -0.007480621337890625, -0.02252197265625, 0.02423095703125, 0.01415252685546875, 0.01137542724609375, 0.023773193359375, 0.00823974609375, 0.0101470947265625, -0.025482177734375, -0.011688232421875, -0.02032470703125, 0.0181732177734375, -0.01519775390625, -0.0152587890625, -0.0300140380859375, 0.0126495361328125, -0.0262298583984375, -0.0048370361328125, -0.028472900390625, 0.031280517578125, 0.061309814453125, -0.0333251953125, 0.0018405914306640625, -0.02886962890625, 0.07073974609375, 0.0056915283203125, -0.0210113525390625, 0.0118408203125, 0.025054931640625, 0.039154052734375, -0.035919189453125, -0.02886962890625, -0.053375244140625, -0.05975341796875, 0.0004818439483642578, 0.07586669921875, 0.0360107421875, 0.024078369140625, -0.005889892578125, -0.017852783203125, 0.0154266357421875, -0.049163818359375, 0.0243988037109375, -0.0219573974609375, 0.034942626953125, -0.004283905029296875, 0.021453857421875, -0.040618896484375, 0.055694580078125, 0.013824462890625, 0.02630615234375, 0.023590087890625, -0.029022216796875, -0.01348114013671875, -0.01020050048828125, 0.006992340087890625, 0.0012950897216796875, -0.0233001708984375, -0.004268646240234375, -0.0217742919921875, 0.037841796875, 0.00768280029296875, 0.0191802978515625, 0.025848388671875, -0.04254150390625, 0.0206756591796875, 0.021942138671875, 0.005878448486328125, 0.02642822265625, 0.037322998046875, 0.0048980712890625, 0.04864501953125, -0.01210784912109375, -0.02789306640625, 0.034027099609375, 0.0230255126953125, -0.0171356201171875, 0.026580810546875, -0.01219940185546875, -0.0249481201171875, -0.0172119140625, -0.046051025390625, 0.00872039794921875, -0.0172882080078125, 0.036865234375, 0.01439666748046875, 0.0204315185546875, 0.0245513916015625, -0.0218963623046875, 0.05828857421875, 0.0018262863159179688, -0.0213775634765625, -0.0277252197265625, -0.0689697265625, 0.05633544921875, -0.041107177734375, 0.0408935546875, 0.0748291015625, -0.01922607421875, 0.0084991455078125, 0.0237274169921875, -0.006389617919921875, 0.042144775390625, -0.02392578125, -0.01494598388671875, 0.043609619140625, -0.08770751953125, 0.00494384765625, 0.0180206298828125, 0.02276611328125, 0.0153961181640625, -0.011627197265625, 0.0240478515625, 0.0198822021484375, -0.07763671875, -0.112548828125, -0.01209259033203125, -0.026947021484375, 0.01409912109375, 0.032806396484375, -0.0006256103515625, -0.022857666015625, 0.052886962890625, 0.002685546875, 0.0092315673828125, -0.032745361328125, -0.041351318359375, -0.0245361328125, -0.053924560546875, 0.00959014892578125, -0.005687713623046875, 0.009735107421875, 0.0036449432373046875, 0.001811981201171875, -0.0022678375244140625, -0.042083740234375, -0.0037899017333984375, 0.07794189453125, -0.0004949569702148438, -0.0301971435546875, 0.036407470703125, -0.0302734375, 0.007312774658203125, 0.017730712890625, 0.00959014892578125, 0.0108795166015625, -0.00954437255859375, -0.032073974609375, -0.05413818359375, -0.00933837890625, -0.0258331298828125, 0.040435791015625, 0.06646728515625, -0.03057861328125, 0.00386810302734375, -0.03759765625, -0.07598876953125, -0.004978179931640625, -0.065185546875, 0.0548095703125, 0.046630859375, 0.0063018798828125, -0.024169921875, 0.04595947265625, 0.0192413330078125, 0.005023956298828125, 0.027435302734375, -0.0206756591796875, 0.0267486572265625, 0.0091094970703125, 0.01373291015625, -0.03472900390625, 0.03375244140625, 0.0098419189453125, -0.01363372802734375, 0.01560211181640625, 0.05120849609375, 0.01580810546875, 0.0247344970703125, -0.036895751953125, -0.03826904296875, 0.020477294921875, -0.0628662109375, 0.034698486328125, -0.03338623046875, -0.032989501953125, -0.0057220458984375, 0.0775146484375, -0.044677734375, -0.0457763671875, -0.0158233642578125, 0.0145721435546875, 0.044403076171875, -0.032073974609375, 0.05609130859375, -0.03948974609375, -0.0706787109375, 0.02923583984375, -0.00677490234375, -0.0259552001953125, -0.0140838623046875, 0.01360321044921875, -0.031524658203125, -0.0274810791015625, 0.0233001708984375, -0.054718017578125, -0.006549835205078125, 0.052093505859375, -0.06695556640625, 0.0546875, -0.054443359375, -0.03802490234375, -0.055389404296875, -0.03369140625, -0.0028781890869140625, 0.0765380859375, 0.01528167724609375, -0.0248870849609375, 0.0032978057861328125, 0.06134033203125, 0.0184173583984375, 0.047088623046875, -0.0191192626953125, -0.03558349609375, 0.0004439353942871094, 0.0247802734375, 0.0004684925079345703, 0.00722503662109375, 0.01126861572265625, 0.00212860107421875, -0.0736083984375, -0.00506591796875, -0.00917816162109375, 0.03143310546875, 0.044647216796875, -0.058502197265625, -0.042999267578125, -0.039215087890625, 0.0272674560546875, 0.01383209228515625, 0.0030193328857421875, -0.0032787322998046875, -0.028167724609375, -0.031829833984375, 0.07244873046875, 0.021148681640625, -0.0019388198852539062, -0.0165863037109375, 0.0345458984375, 0.00789642333984375, -0.0482177734375, 0.023345947265625, 0.0096282958984375, 0.026092529296875, -0.05364990234375, 0.023956298828125, -0.03326416015625, -0.0302886962890625, 0.11761474609375, -0.064697265625, -0.037841796875, 0.0008535385131835938, 0.0160980224609375, -0.0175323486328125, -0.045501708984375, 0.023468017578125, -0.053009033203125, 0.04364013671875, 0.038604736328125, 0.008148193359375, -0.01374053955078125, -0.0207366943359375, 0.01422119140625, -0.01837158203125, 0.0240478515625, 0.002750396728515625, -0.06298828125, 0.0222625732421875, 0.059478759765625, 0.006145477294921875, 0.00476837158203125, 0.019012451171875, 0.01081085205078125, 0.001705169677734375, 0.00211334228515625, -0.036590576171875, -0.0012845993041992188, -0.01224517822265625, 0.03863525390625, -0.0279541015625, 0.003955841064453125, -0.01369476318359375, -0.006572723388671875, 0.0257110595703125, 0.0227813720703125, -0.0325927734375, -0.00798797607421875, -0.0006861686706542969, 0.0132598876953125, -0.0015811920166015625, 0.030548095703125, 0.007625579833984375, 0.01275634765625, -0.002277374267578125, 0.0110626220703125, 0.00910186767578125, 0.0297088623046875, -0.0207061767578125, 0.049468994140625, 0.0260162353515625, -0.01026153564453125, -0.0164947509765625, 0.039703369140625, 0.06280517578125, -0.0162506103515625, -0.0281829833984375, -0.0088958740234375, 0.01308441162109375, 0.045562744140625, 0.0207366943359375, -0.045654296875, -0.00621795654296875, 0.04583740234375, 0.0313720703125, -0.06121826171875, -0.018524169921875, 0.020965576171875, 0.037506103515625, -0.021087646484375, -0.028045654296875, 0.034393310546875, 0.00008803606033325195, -0.0182647705078125, 0.0202178955078125, -0.038848876953125, -0.0546875, -0.0540771484375, 0.003131866455078125, 0.057464599609375, -0.003093719482421875, -0.01096343994140625, -0.015838623046875, -0.0269622802734375, -0.00751495361328125, 0.00872039794921875, -0.037567138671875, 0.0014677047729492188, 0.0274658203125, 0.020721435546875, -0.0279083251953125, -0.0094451904296875, -0.0234222412109375, 0.0116729736328125, -0.0263519287109375, 0.00618743896484375, 0.046966552734375, -0.01372528076171875, 0.035369873046875, -0.0325927734375, -0.006046295166015625, 0.04827880859375, 0.0012598037719726562, 0.03839111328125, -0.0022125244140625, -0.056304931640625, 0.0102691650390625, -0.052978515625, 0.003398895263671875, -0.0135040283203125, -0.06072998046875, -0.018280029296875, -0.0306854248046875, 0.01401519775390625, 0.0208740234375, -0.005786895751953125, -0.0267333984375, -0.01050567626953125, 0.016632080078125, 0.0279693603515625, 0.0252532958984375, -0.023040771484375, 0.026947021484375, 0.017608642578125, 0.021728515625, -0.004276275634765625, 0.011383056640625, 0.0079803466796875, -0.0311126708984375, 0.0245361328125, -0.0209808349609375, -0.03375244140625, -0.016510009765625, -0.01560211181640625, 0.015716552734375, 0.0391845703125, -0.01303863525390625, -0.01222991943359375, -0.0159149169921875, 0.004116058349609375, -0.027130126953125, 0.04388427734375, -0.0023899078369140625, -0.0296783447265625, 0.017242431640625, -0.01317596435546875, 0.0153656005859375, -0.03515625, 0.007167816162109375, -0.007099151611328125, -0.0195465087890625, -0.009002685546875, 0.0260467529296875, -0.059539794921875, 0.043182373046875, 0.0667724609375, 0.03302001953125, 0.056549072265625, -0.01010894775390625, 0.0186614990234375, 0.031951904296875, 0.00689697265625, -0.0013284683227539062, -0.0267333984375, 0.0389404296875, 0.0009946823120117188, -0.0224761962890625, 0.0185546875, -0.03594970703125, -0.017059326171875, 0.04217529296875, 0.00551605224609375, -0.0655517578125, -0.0000635981559753418, -0.0323486328125, 0.0175933837890625, 0.040069580078125, 0.01458740234375, -0.0073394775390625, -0.018035888671875, 0.0208740234375, -0.0274810791015625, -0.0107574462890625, 0.006511688232421875, 0.006267547607421875, -0.034149169921875, 0.0017480850219726562, 0.06878662109375, 0.0148773193359375, -0.049774169921875, 0.00434112548828125, 0.00044846534729003906, 0.00838470458984375, -0.023681640625, 0.00290679931640625, 0.024261474609375, 0.0013914108276367188, -0.0418701171875, 0.0657958984375, -0.0103607177734375, 0.012115478515625, -0.020751953125, 0.0462646484375, -0.0201263427734375, 0.044708251953125, -0.0237579345703125, 0.003997802734375, 0.0229339599609375, -0.0278167724609375, 0.039031982421875, -0.0112762451171875, -0.00992584228515625, 0.01090240478515625, -0.045135498046875, -0.01073455810546875, -0.029022216796875, 0.0230560302734375, -0.013519287109375, -0.04156494140625, 0.0606689453125, 0.0014562606811523438, -0.044403076171875, -0.012420654296875, -0.0228424072265625, 0.0233306884765625, 0.0195465087890625, 0.0297393798828125, -0.0216522216796875, -0.0008182525634765625, 0.024017333984375, -0.0261077880859375, -0.0218658447265625, 0.026458740234375, -0.05072021484375, 0.11126708984375, -0.0178985595703125, 0.031982421875, 0.00041937828063964844, 0.040771484375, -0.00905609130859375, 0.02532958984375, -0.035247802734375, 0.061248779296875, -0.00024199485778808594, 0.06231689453125, -0.0188140869140625, -0.004268646240234375, 0.048248291015625, 0.0138092041015625, 0.046661376953125, 0.006122589111328125, -0.0033550262451171875, -0.0217742919921875, 0.03424072265625, 0.039154052734375, -0.00905609130859375, 0.018646240234375, -0.039459228515625, 0.046630859375, 0.007549285888671875, -0.0262603759765625, 0.0193328857421875, 0.01210784912109375, -0.059326171875, 0.003795623779296875, 0.0204315185546875, 0.0188446044921875, 0.0123291015625, -0.00786590576171875, -0.03466796875, -0.0017642974853515625, 0.021209716796875, 0.01910400390625, -0.0216827392578125, 0.07696533203125, 0.040252685546875, -0.07562255859375, 0.0296173095703125, -0.0723876953125, 0.061431884765625, -0.00926971435546875, 0.0012693405151367188, 0.01076507568359375, 0.0074462890625, 0.010223388671875, -0.0226898193359375, -0.005764007568359375, 0.0240020751953125, -0.0059356689453125, 0.039154052734375, 0.0345458984375, 0.0189208984375, -0.00103759765625, 0.046112060546875, 0.06524658203125, 0.061614990234375, -0.057647705078125, 0.0034637451171875, 0.01470947265625, 0.0167388916015625, -0.02716064453125, -0.03509521484375, -0.0183563232421875, -0.0133819580078125, 0.00250244140625, -0.0021152496337890625, 0.0031909942626953125, 0.032501220703125, -0.025543212890625, -0.0105743408203125, 0.00127410888671875, 0.0007343292236328125, 0.037078857421875, -0.04193115234375, 0.00847625732421875, 0.01544952392578125, 0.0726318359375, 0.0164947509765625, 0.06427001953125, -0.00347137451171875, -0.0308380126953125, 0.009613037109375, 0.048919677734375, 0.006694793701171875, -0.0111236572265625, -0.0195770263671875, -0.040496826171875, 0.00506591796875, 0.016571044921875, 0.034912109375, 0.00679779052734375, 0.05145263671875, 0.0234222412109375, -0.02239990234375, -0.005329132080078125, -0.0304107666015625, -0.02581787109375, 0.0229644775390625, 0.00453948974609375, 0.0241851806640625, 0.02325439453125, -0.0038661956787109375, -0.041046142578125, 0.05706787109375, 0.0210723876953125, -0.0028514862060546875, -0.0196685791015625, 0.018310546875, -0.050872802734375, 0.0171966552734375, 0.03045654296875, 0.05474853515625, 0.0330810546875, -0.08367919921875, -0.005512237548828125, 0.015899658203125, -0.0849609375, 0.017242431640625, 0.056915283203125, -0.0306854248046875, -0.01513671875, 0.01983642578125, 0.00669097900390625, 0.0008716583251953125, -0.01338958740234375, 0.007427215576171875, 0.01534271240234375, 0.025909423828125, 0.033782958984375, -0.018829345703125, -0.009796142578125, -0.007720947265625, 0.047760009765625, -0.002964019775390625, 0.07958984375, -0.048248291015625, 0.0157928466796875, -0.032012939453125, 0.0023651123046875, -0.025665283203125, -0.0321044921875, 0.01200103759765625, 0.0091400146484375, 0.0047760009765625, -0.0169219970703125, -0.06915283203125, 0.033966064453125, 0.051483154296875, 0.0176239013671875, 0.051483154296875, -0.002079010009765625, 0.0126800537109375, -0.051788330078125, -0.055084228515625, -0.041534423828125, -0.0335693359375, -0.0100250244140625, 0.00350189208984375, 0.0008211135864257812, -0.006603240966796875, -0.01393890380859375, -0.00858306884765625, 0.0014200210571289062, -0.0172119140625, 0.0452880859375, -0.004123687744140625, 0.06292724609375, 0.03485107421875, -0.05133056640625, -0.01540374755859375, 0.0086822509765625, -0.00553131103515625, -0.00037288665771484375, 0.017059326171875, 0.003177642822265625, -0.01251220703125, 0.031524658203125, -0.06658935546875, -0.09130859375, -0.0203094482421875, -0.00722503662109375, -0.0088348388671875, -0.0833740234375, 0.0147705078125, -0.01560211181640625, -0.0010623931884765625, 0.0008392333984375, -0.024383544921875, -0.0152587890625, 0.0223388671875, -0.004638671875, 0.00998687744140625, -0.009429931640625, -0.0034332275390625, 0.00035572052001953125, 0.003627777099609375, -0.0283203125, 0.0253753662109375, -0.028594970703125, -0.0099334716796875, -0.004772186279296875, -0.0111083984375, 0.0139312744140625, 0.02496337890625, -0.050262451171875, 0.031494140625, -0.034332275390625, -0.058502197265625, -0.0179290771484375, -0.0111083984375, 0.056488037109375, 0.00485992431640625, -0.033233642578125, -0.055023193359375, -0.0280609130859375, 0.00310516357421875, -0.063720703125, -0.03143310546875, 0.006290435791015625, -0.006649017333984375, 0.02740478515625, -0.01416015625, -0.006450653076171875, -0.03997802734375, -0.01554107666015625, 0.01087188720703125, -0.0357666015625, -0.0223846435546875, -0.042205810546875, -0.020721435546875, 0.042266845703125, 0.01447296142578125, -0.01515960693359375, -0.054840087890625, 0.01264190673828125, -0.0174560546875, 0.01261138916015625, -0.0177459716796875, -0.012847900390625, -0.0027332305908203125, 0.036956787109375, 0.022247314453125, 0.03729248046875, -0.004611968994140625, 0.04559326171875, -0.03179931640625, 0.055633544921875, 0.03424072265625, 0.0001175999641418457, 0.0253448486328125, -0.0259857177734375, 0.0155181884765625, 0.0175933837890625, -0.0718994140625, -0.0264434814453125, -0.02288818359375, -0.00954437255859375, -0.004886627197265625, -0.0172271728515625, -0.016693115234375, -0.013397216796875, 0.08367919921875, 0.00946807861328125, 0.0182037353515625, -0.01934814453125, -0.036712646484375, -0.02392578125, -0.01514434814453125, -0.007312774658203125, 0.02734375, -0.080322265625, -0.0082244873046875, 0.0209503173828125, -0.0305328369140625, 0.0204925537109375, -0.016387939453125, -0.0226287841796875, 0.00945281982421875, -0.022705078125, -0.0439453125, 0.0005550384521484375, -0.0262603759765625, 0.0811767578125, -0.049713134765625, -0.021514892578125, 0.0002428293228149414, 0.036224365234375, 0.0240631103515625, -0.047607421875, -0.0089569091796875, 0.007053375244140625, -0.0160675048828125, 0.00446319580078125, -0.00470733642578125, 0.043914794921875, -0.005619049072265625, -0.0060882568359375, -0.011566162109375, 0.01174163818359375, 0.0120391845703125, -0.005207061767578125, -0.02490234375, -0.01155853271484375, -0.0135955810546875, 0.053741455078125, -0.005756378173828125, 0.032318115234375, -0.00943756103515625, 0.072265625, 0.01629638671875, -0.04443359375, 0.022613525390625, -0.017852783203125, 0.01251983642578125, -0.00913238525390625, 0.02484130859375, -0.047271728515625, 0.0450439453125, -0.0435791015625, 0.0097503662109375, 0.040130615234375 ]
70c90f901e761db16a78d24d442435c216dd8ae2
Wordpress Stackexchange Q: How to disable admin flyout menus? Seriously, I hate flyout menus with a passion, and now they're popping up all over the place in the admin screen. (They are particularly heinous when you use the blue admin theme, because they add a dark arrow. Eye dirt.) How do I disable the flyout menu? They add zero functionality and usability to my workflow. Thanks A: Aaron Campbell wrote a gist to expand all menus all the time. The dev chat today also indicated some issues in the blue theme. For more discussion, see Admin menu doesn't expand/collapse in 3.3 beta 1. Why? in the Support forums.
Q: How to disable admin flyout menus? Seriously, I hate flyout menus with a passion, and now they're popping up all over the place in the admin screen. (They are particularly heinous when you use the blue admin theme, because they add a dark arrow. Eye dirt.) How do I disable the flyout menu? They add zero functionality and usability to my workflow. Thanks A: Aaron Campbell wrote a gist to expand all menus all the time. The dev chat today also indicated some issues in the blue theme. For more discussion, see Admin menu doesn't expand/collapse in 3.3 beta 1. Why? in the Support forums. A: It's a bit of a workarround but here you go: function remove_flyout() { echo '<style type="text/css"> .js #adminmenu .wp-submenu.sub-open { display: none; } </style>'; } add_action('admin_head', 'remove_flyout'); Put it in your functions.php A: The solution provided is not working in modern version, but I've finally found how to fix it in a new one, just add #adminmenuwrap { overflow: hidden; } via custom css plugin or browser add-on and flyouts both on :hover and :active will be hidden
wordpress
{ "language": "en", "length": 185, "provenance": "stackexchange_00019.jsonl.gz:413794", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30899" }
[ 0.09808349609375, -0.016998291015625, 0.049468994140625, 0.0013990402221679688, 0.01099395751953125, -0.03533935546875, 0.0787353515625, -0.0399169921875, 0.0106048583984375, 0.04071044921875, -0.043060302734375, 0.0018682479858398438, -0.0008592605590820312, 0.0121307373046875, -0.03271484375, -0.0238800048828125, 0.01947021484375, 0.0115814208984375, 0.005825042724609375, 0.00292205810546875, 0.0024852752685546875, 0.0306854248046875, -0.0458984375, 0.0087738037109375, 0.005443572998046875, 0.043701171875, -0.0223236083984375, -0.015716552734375, -0.01019287109375, -0.013641357421875, 0.00829315185546875, -0.008697509765625, -0.014495849609375, 0.0299530029296875, 0.01221466064453125, 0.01000213623046875, -0.0308990478515625, 0.04302978515625, 0.04119873046875, -0.0284881591796875, 0.00830078125, -0.014678955078125, -0.006656646728515625, 0.03955078125, -0.01983642578125, -0.01520538330078125, -0.01152801513671875, -0.055023193359375, 0.0189208984375, -0.0241546630859375, -0.0014505386352539062, 0.0016355514526367188, 0.0084381103515625, -0.01385498046875, -0.03546142578125, -0.035308837890625, -0.00849151611328125, -0.01523590087890625, 0.021484375, 0.039031982421875, -0.00888824462890625, -0.0063018798828125, 0.001049041748046875, -0.0380859375, -0.01776123046875, -0.004180908203125, -0.061859130859375, 0.009552001953125, -0.05078125, 0.01342010498046875, 0.049468994140625, -0.0611572265625, 0.014739990234375, -0.007457733154296875, -0.0133514404296875, -0.005245208740234375, 0.006916046142578125, 0.0013523101806640625, 0.022552490234375, -0.00873565673828125, 0.0794677734375, -0.0091705322265625, -0.0296173095703125, 0.05023193359375, -0.006023406982421875, 0.05755615234375, 0.0138092041015625, -0.0435791015625, 0.00007587671279907227, -0.01580810546875, -0.0110321044921875, -0.002685546875, -0.017578125, 0.00893402099609375, -0.0130615234375, -0.0306396484375, 0.0168609619140625, 0.0268096923828125, 0.012481689453125, -0.004791259765625, -0.01132965087890625, -0.03692626953125, 0.002399444580078125, -0.0269775390625, 0.00948333740234375, 0.044769287109375, -0.0249481201171875, -0.000005900859832763672, 0.0550537109375, 0.0167083740234375, 0.0299072265625, 0.002071380615234375, -0.021453857421875, 0.0035953521728515625, -0.016998291015625, 0.0247650146484375, -0.05084228515625, 0.030517578125, -0.0166168212890625, 0.07232666015625, -0.0009021759033203125, 0.00016736984252929688, -0.01404571533203125, 0.032745361328125, -0.01258087158203125, -0.01282501220703125, -0.009765625, -0.008331298828125, 0.0199432373046875, -0.00881195068359375, -0.042633056640625, 0.00864410400390625, 0.055145263671875, 0.0267486572265625, 0.01885986328125, -0.010894775390625, 0.01983642578125, -0.043365478515625, 0.0157470703125, -0.010833740234375, 0.0241546630859375, -0.02386474609375, -0.015655517578125, 0.0208892822265625, -0.044708251953125, -0.001750946044921875, 0.00800323486328125, 0.0185089111328125, -0.0191650390625, -0.033447265625, -0.035369873046875, -0.01020050048828125, 0.05328369140625, 0.023773193359375, -0.0372314453125, 0.027801513671875, 0.060882568359375, -0.0163116455078125, -0.08502197265625, -0.053497314453125, -0.07464599609375, 0.0172576904296875, 0.05377197265625, -0.023345947265625, -0.02337646484375, -0.00738525390625, 0.0618896484375, 0.0005049705505371094, 0.0237579345703125, 0.03009033203125, 0.025726318359375, -0.0625, -0.011993408203125, 0.00890350341796875, -0.0080413818359375, 0.0243988037109375, 0.0428466796875, -0.00681304931640625, 0.0237274169921875, 0.034088134765625, -0.012969970703125, -0.03955078125, 0.04949951171875, -0.048431396484375, -0.054534912109375, 0.045013427734375, -0.0214996337890625, 0.018707275390625, 0.043060302734375, -0.0231781005859375, 0.03094482421875, -0.00027298927307128906, 0.0278778076171875, -0.0243682861328125, 0.00732421875, -0.008636474609375, -0.002246856689453125, 0.01471710205078125, 0.0024280548095703125, -0.025482177734375, -0.0201568603515625, 0.03167724609375, -0.02764892578125, 0.03070068359375, 0.0034427642822265625, -0.00382232666015625, 0.001430511474609375, 0.0274810791015625, 0.062408447265625, 0.0282440185546875, -0.00949859619140625, -0.0032939910888671875, -0.018768310546875, 0.02386474609375, -0.036651611328125, 0.00797271728515625, -0.029815673828125, -0.0032024383544921875, -0.01219940185546875, 0.002071380615234375, 0.031890869140625, -0.023345947265625, 0.0301361083984375, 0.02630615234375, -0.000029265880584716797, -0.0177764892578125, -0.007266998291015625, -0.0010471343994140625, 0.040618896484375, -0.0119781494140625, 0.061920166015625, 0.02215576171875, 0.0103912353515625, 0.010711669921875, -0.0185699462890625, 0.012847900390625, 0.0020542144775390625, -0.044952392578125, -0.0139007568359375, 0.0290374755859375, 0.046661376953125, 0.033782958984375, -0.0095367431640625, -0.023834228515625, 0.0021495819091796875, -0.06890869140625, 0.01116943359375, -0.019622802734375, -0.01373291015625, -0.0008969306945800781, 0.0023403167724609375, -0.0264129638671875, 0.044677734375, -0.0025386810302734375, -0.007663726806640625, 0.034698486328125, -0.0267181396484375, -0.037445068359375, 0.041015625, -0.01806640625, 0.013946533203125, 0.0005984306335449219, 0.0009045600891113281, -0.0109405517578125, -0.0120697021484375, -0.0106658935546875, -0.003025054931640625, -0.00714111328125, -0.0273895263671875, -0.01486968994140625, 0.0304412841796875, 0.0177154541015625, -0.003047943115234375, 0.062744140625, 0.039703369140625, -0.0543212890625, -0.0257415771484375, -0.0251617431640625, -0.0006022453308105469, 0.0259246826171875, -0.0026073455810546875, 0.016204833984375, -0.004520416259765625, -0.004886627197265625, -0.004932403564453125, -0.03863525390625, 0.01129913330078125, 0.01143646240234375, -0.004505157470703125, 0.0111083984375, 0.0228424072265625, 0.046661376953125, 0.0086822509765625, 0.01392364501953125, 0.007488250732421875, 0.006397247314453125, 0.0153656005859375, 0.0020427703857421875, -0.0072174072265625, 0.006214141845703125, 0.06658935546875, 0.050384521484375, -0.0000934600830078125, -0.019287109375, 0.0205841064453125, -0.0259857177734375, -0.0025653839111328125, 0.0494384765625, 0.023681640625, 0.01364898681640625, -0.039398193359375, 0.0374755859375, 0.0166473388671875, 0.003589630126953125, 0.000335693359375, -0.023162841796875, -0.0009145736694335938, 0.0186920166015625, -0.0254974365234375, -0.006622314453125, -0.038055419921875, -0.042083740234375, -0.01184844970703125, 0.037933349609375, -0.0252685546875, -0.00569915771484375, 0.07659912109375, 0.016571044921875, 0.03662109375, -0.0122222900390625, -0.02581787109375, 0.0017271041870117188, -0.040313720703125, -0.0143890380859375, -0.01010894775390625, -0.0102386474609375, -0.004825592041015625, 0.09356689453125, -0.010345458984375, -0.052001953125, 0.003692626953125, -0.09478759765625, -0.0035190582275390625, 0.0648193359375, 0.046295166015625, 0.0031452178955078125, 0.022125244140625, 0.0184326171875, -0.0296478271484375, 0.0271453857421875, -0.0179290771484375, -0.04742431640625, -0.0103759765625, -0.0110015869140625, -0.01393890380859375, -0.04638671875, 0.00934600830078125, -0.0340576171875, -0.057861328125, -0.07635498046875, 0.01409912109375, -0.0307769775390625, -0.03924560546875, -0.01387786865234375, 0.01910400390625, 0.0020885467529296875, -0.004058837890625, -0.0213623046875, 0.053466796875, 0.00635528564453125, -0.0164794921875, 0.0022125244140625, 0.006687164306640625, 0.015045166015625, 0.06976318359375, -0.026031494140625, 0.047454833984375, -0.01120758056640625, 0.0511474609375, 0.033935546875, 0.00836944580078125, -0.0033512115478515625, -0.0016117095947265625, -0.027923583984375, -0.0210723876953125, 0.025848388671875, -0.046356201171875, -0.01128387451171875, -0.01560211181640625, -0.0022373199462890625, 0.01122283935546875, 0.051055908203125, 0.042938232421875, -0.001239776611328125, -0.0229034423828125, -0.0130767822265625, -0.01416778564453125, -0.0050506591796875, -0.030517578125, 0.0008807182312011719, -0.105712890625, 0.01258087158203125, -0.006267547607421875, -0.040618896484375, -0.037567138671875, 0.005863189697265625, -0.07415771484375, -0.029571533203125, 0.0222930908203125, -0.01219940185546875, -0.03302001953125, 0.00829315185546875, -0.038604736328125, -0.032196044921875, -0.0034999847412109375, -0.00974273681640625, -0.06787109375, -0.00782012939453125, -0.0303802490234375, 0.03851318359375, 0.02203369140625, -0.035736083984375, 0.008026123046875, 0.034820556640625, 0.0297698974609375, -0.0178375244140625, 0.018890380859375, -0.01540374755859375, 0.0279998779296875, 0.01678466796875, -0.0024662017822265625, 0.00672149658203125, -0.004192352294921875, 0.02740478515625, -0.035491943359375, -0.0011377334594726562, 0.00878143310546875, -0.0382080078125, 0.08319091796875, -0.06414794921875, -0.053466796875, -0.047607421875, -0.06085205078125, -0.00766754150390625, -0.00545501708984375, -0.025970458984375, -0.034088134765625, -0.0755615234375, 0.00591278076171875, -0.01284027099609375, 0.00940704345703125, -0.0007662773132324219, 0.0213623046875, 0.008514404296875, -0.01320648193359375, 0.0469970703125, 0.0016431808471679688, 0.028656005859375, -0.00612640380859375, 0.04241943359375, 0.0154266357421875, -0.0076751708984375, 0.048065185546875, -0.0109405517578125, 0.0025691986083984375, -0.0265350341796875, 0.04608154296875, -0.0267181396484375, -0.040191650390625, 0.03411865234375, -0.042633056640625, 0.01074981689453125, 0.029815673828125, 0.044921875, -0.04388427734375, 0.0233612060546875, 0.0506591796875, 0.03955078125, -0.0655517578125, -0.0565185546875, 0.0008416175842285156, -0.00675201416015625, 0.02960205078125, 0.060638427734375, 0.055450439453125, -0.004245758056640625, 0.0154266357421875, 0.0279693603515625, -0.012603759765625, 0.01641845703125, 0.018951416015625, -0.02978515625, 0.040130615234375, -0.0382080078125, -0.060882568359375, 0.0128021240234375, -0.00982666015625, 0.0980224609375, 0.0213623046875, -0.0208740234375, -0.06439208984375, -0.00955963134765625, 0.037811279296875, -0.0201416015625, 0.00811767578125, 0.0264739990234375, 0.007091522216796875, -0.003597259521484375, -0.006748199462890625, 0.036346435546875, -0.031494140625, -0.0209808349609375, 0.0307769775390625, -0.0098114013671875, 0.00650787353515625, 0.041259765625, 0.0225372314453125, 0.0394287109375, 0.03167724609375, -0.031005859375, -0.00885772705078125, -0.0240631103515625, 0.00913238525390625, 0.0093841552734375, 0.02490234375, 0.020233154296875, -0.019195556640625, 0.050994873046875, -0.04217529296875, -0.01441192626953125, 0.049560546875, 0.01593017578125, 0.0296173095703125, -0.0012187957763671875, -0.0097808837890625, 0.01070404052734375, -0.025390625, 0.079345703125, 0.00008255243301391602, -0.0963134765625, -0.0216827392578125, 0.033599853515625, 0.005840301513671875, -0.059234619140625, -0.00563812255859375, 0.0116729736328125, -0.035980224609375, -0.02203369140625, 0.0245361328125, -0.038330078125, -0.01959228515625, -0.0005483627319335938, -0.0272979736328125, -0.02587890625, 0.00975799560546875, -0.052215576171875, -0.03997802734375, 0.010955810546875, 0.01311492919921875, 0.0129852294921875, -0.05853271484375, 0.00823211669921875, -0.0011692047119140625, 0.0130615234375, 0.030029296875, 0.037750244140625, 0.02520751953125, 0.0212860107421875, -0.07318115234375, 0.006175994873046875, -0.051025390625, -0.007732391357421875, -0.027557373046875, -0.0638427734375, -0.04736328125, -0.01233673095703125, 0.02423095703125, -0.00722503662109375, 0.0074615478515625, -0.01190948486328125, -0.0239715576171875, 0.0308685302734375, 0.039886474609375, 0.034820556640625, -0.032440185546875, 0.0200958251953125, -0.0233917236328125, -0.0073089599609375, -0.03253173828125, 0.001216888427734375, 0.030364990234375, 0.00536346435546875, 0.01220703125, -0.0006875991821289062, -0.0020160675048828125, 0.0086517333984375, -0.0061798095703125, -0.0418701171875, 0.0265655517578125, -0.0255584716796875, 0.024566650390625, -0.04168701171875, 0.0138397216796875, -0.022735595703125, 0.04791259765625, -0.052734375, -0.021697998046875, 0.033355712890625, -0.016265869140625, 0.0221710205078125, 0.0330810546875, -0.01197052001953125, -0.0171356201171875, 0.011077880859375, -0.0006608963012695312, -0.005008697509765625, -0.01424407958984375, 0.0100250244140625, 0.0161590576171875, 0.01129150390625, 0.00536346435546875, 0.0081634521484375, 0.007080078125, -0.0634765625, 0.00664520263671875, 0.027130126953125, -0.0106048583984375, 0.0714111328125, 0.013458251953125, -0.01508331298828125, 0.04736328125, -0.041778564453125, 0.020843505859375, 0.06048583984375, 0.06622314453125, -0.077880859375, 0.0135345458984375, 0.0091705322265625, 0.0066070556640625, 0.0677490234375, -0.0102691650390625, -0.039398193359375, -0.09490966796875, 0.0350341796875, -0.025421142578125, -0.0245819091796875, -0.0261993408203125, -0.0237579345703125, -0.0189361572265625, 0.00400543212890625, 0.024627685546875, 0.0140228271484375, 0.02178955078125, -0.0343017578125, -0.0169677734375, -0.01007843017578125, -0.0223846435546875, -0.01245880126953125, 0.018218994140625, -0.051605224609375, -0.066650390625, -0.0016603469848632812, 0.00746917724609375, -0.00807952880859375, 0.041229248046875, 0.00923919677734375, 0.0005426406860351562, 0.05780029296875, -0.04388427734375, 0.06439208984375, 0.004322052001953125, 0.027618408203125, 0.0236968994140625, -0.0267486572265625, -0.0055694580078125, 0.031829833984375, -0.002410888671875, 0.01464080810546875, 0.00640106201171875, -0.0177154541015625, -0.003662109375, -0.00550079345703125, 0.018096923828125, -0.0233917236328125, -0.01044464111328125, 0.051239013671875, -0.006336212158203125, -0.034149169921875, -0.0066680908203125, 0.0225677490234375, -0.056671142578125, 0.00689697265625, -0.003124237060546875, -0.01317596435546875, -0.003520965576171875, 0.0025119781494140625, -0.0264739990234375, 0.058197021484375, -0.028961181640625, -0.00711822509765625, 0.0160064697265625, 0.038055419921875, -0.0171356201171875, 0.00801849365234375, -0.013153076171875, 0.0133056640625, -0.0261993408203125, 0.0203399658203125, -0.0078582763671875, 0.028167724609375, -0.0102996826171875, 0.0024242401123046875, -0.026824951171875, -0.0266571044921875, 0.047088623046875, -0.005802154541015625, 0.062347412109375, 0.09979248046875, 0.05352783203125, -0.0570068359375, -0.005279541015625, -0.00525665283203125, 0.031158447265625, -0.0301055908203125, 0.0268707275390625, -0.005283355712890625, -0.00421905517578125, 0.02484130859375, 0.006816864013671875, 0.00982666015625, 0.062408447265625, -0.0169830322265625, 0.0157470703125, 0.034942626953125, -0.01348114013671875, -0.0261688232421875, 0.0059814453125, 0.013671875, -0.00969696044921875, -0.01407623291015625, 0.014251708984375, -0.028289794921875, 0.0357666015625, 0.0017986297607421875, -0.01306915283203125, -0.0178680419921875, 0.010040283203125, -0.04803466796875, -0.0294647216796875, -0.0156097412109375, 0.037933349609375, -0.058563232421875, -0.00469207763671875, -0.0179290771484375, 0.0249481201171875, -0.05706787109375, -0.05609130859375, 0.0030460357666015625, 0.0200958251953125, 0.005001068115234375, -0.056396484375, 0.01369476318359375, 0.01425933837890625, 0.01131439208984375, 0.024322509765625, 0.0222625732421875, 0.0176849365234375, 0.044219970703125, -0.00479888916015625, -0.00691986083984375, 0.0287628173828125, -0.0086669921875, 0.018585205078125, 0.042999267578125, 0.0029544830322265625, 0.0110015869140625, -0.017852783203125, -0.0210723876953125, 0.01482391357421875, 0.033843994140625, 0.042816162109375, 0.005462646484375, 0.01690673828125, -0.0297698974609375, -0.006069183349609375, 0.0174713134765625, -0.03082275390625, 0.0274200439453125, -0.04779052734375, -0.048858642578125, 0.022613525390625, 0.03936767578125, -0.028961181640625, 0.02349853515625, 0.04119873046875, 0.07171630859375, -0.005615234375, -0.0253448486328125, 0.07110595703125, -0.0183563232421875, -0.033172607421875, -0.0208282470703125, 0.004184722900390625, 0.034515380859375, 0.012176513671875, 0.011260986328125, 0.027496337890625, 0.033905029296875, 0.0010366439819335938, 0.020965576171875, 0.005840301513671875, -0.0201873779296875, -0.034210205078125, 0.011749267578125, 0.01351165771484375, 0.034423828125, -0.120849609375, -0.0501708984375, 0.01519775390625, 0.0089111328125, 0.0300140380859375, 0.0440673828125, -0.023284912109375, 0.01277923583984375, -0.0261993408203125, 0.0199127197265625, -0.03070068359375, 0.0030574798583984375, -0.0087890625, 0.004608154296875, 0.0291748046875, 0.0092620849609375, -0.05145263671875, -0.0295867919921875, -0.0271453857421875, 0.0302276611328125, 0.01251983642578125, 0.069091796875, -0.0009908676147460938, 0.0196075439453125, -0.016510009765625, -0.017669677734375, -0.0095977783203125, -0.00927734375, -0.0163421630859375, -0.01525115966796875, -0.00881195068359375, 0.001613616943359375, -0.10479736328125, 0.0243377685546875, 0.017242431640625, -0.0008344650268554688, 0.036773681640625, 0.02374267578125, 0.0081634521484375, -0.027130126953125, -0.01241302490234375, -0.032501220703125, 0.00601959228515625, 0.0234832763671875, 0.0009479522705078125, -0.004215240478515625, -0.0029697418212890625, -0.0019702911376953125, -0.0115966796875, 0.0253448486328125, 0.006649017333984375, -0.0030460357666015625, 0.046478271484375, -0.007793426513671875, 0.0156402587890625, -0.005382537841796875, -0.0200042724609375, 0.0041656494140625, -0.013214111328125, 0.041748046875, -0.0017824172973632812, 0.02276611328125, 0.041046142578125, -0.0408935546875, 0.0401611328125, -0.011932373046875, -0.0084075927734375, -0.0770263671875, -0.0330810546875, 0.042572021484375, 0.009735107421875, 0.0294342041015625, -0.006107330322265625, -0.0200958251953125, -0.03326416015625, 0.0224151611328125, 0.04437255859375, -0.01424407958984375, -0.00843048095703125, -0.0697021484375, -0.0394287109375, 0.0634765625, 0.0296630859375, -0.06683349609375, 0.006855010986328125, -0.0167083740234375, 0.03466796875, 0.0188751220703125, 0.041412353515625, -0.0305328369140625, -0.00792694091796875, -0.01056671142578125, -0.039031982421875, -0.00940704345703125, 0.08416748046875, 0.013702392578125, -0.046722412109375, -0.03643798828125, 0.011199951171875, -0.018096923828125, -0.0171661376953125, -0.0202484130859375, 0.0228729248046875, 0.03912353515625, -0.027923583984375, -0.0188140869140625, 0.006107330322265625, -0.0004220008850097656, 0.027130126953125, 0.02142333984375, 0.007411956787109375, -0.05670166015625, -0.0258026123046875, 0.00872039794921875, -0.0003190040588378906, -0.041168212890625, -0.052001953125, -0.00923919677734375, 0.006496429443359375, -0.036834716796875, 0.014190673828125, -0.00545501708984375, -0.022857666015625, -0.0037517547607421875, 0.0195770263671875, -0.04400634765625, 0.0158843994140625, 0.0225677490234375, 0.0244293212890625, 0.0274658203125, 0.027008056640625, 0.015625, -0.01033782958984375, 0.0269317626953125, 0.011016845703125, 0.0160675048828125, -0.016357421875, 0.003803253173828125, 0.023651123046875, 0.0450439453125, -0.0202789306640625, 0.0007753372192382812, 0.01050567626953125, -0.007778167724609375, -0.0235137939453125, -0.00562286376953125, 0.0104522705078125, 0.02044677734375, 0.021575927734375, 0.06915283203125, -0.0008783340454101562, -0.054443359375, -0.03863525390625, -0.032745361328125, 0.0408935546875, -0.01482391357421875, -0.0108795166015625, -0.05169677734375, -0.0028591156005859375, 0.003490447998046875, 0.00018215179443359375, -0.0330810546875, 0.034515380859375, -0.0255889892578125, -0.0240325927734375, 0.024078369140625, 0.00605010986328125, -0.0626220703125, -0.0144500732421875, 0.0159912109375, -0.03045654296875, -0.03900146484375, 0.01149749755859375, 0.0214691162109375, -0.0369873046875, -0.0162811279296875, -0.02215576171875, -0.041900634765625, -0.044403076171875, 0.0777587890625, -0.0457763671875, 0.0689697265625, -0.09405517578125, -0.025665283203125, -0.0175933837890625, 0.0189208984375, 0.0238037109375, 0.017578125, -0.060302734375, 0.0182342529296875, 0.0174560546875, -0.01873779296875, 0.0229339599609375, 0.0430908203125, -0.016845703125, 0.06427001953125, 0.0261993408203125, -0.0538330078125, 0.019317626953125, -0.0196990966796875, 0.00409698486328125, 0.01470184326171875, 0.0025386810302734375, -0.0391845703125, 0.01557159423828125, 0.01026153564453125, 0.0222930908203125, 0.01904296875 ]
f6fb57d8c0f023343059908bd19409b2a48a71c6
Wordpress Stackexchange Q: Default timezone hardcoded as UTC? While debugging a plugin I was writing, I noticed that on line 36 of wp-settings.php, the default timezone is hardcoded to UTC with a call to the date_default_set_timezone() function. This means any call to the PHP date/time functions will work with UTC as the local time. Can someone please explain to me why this is a sane design choice by the Wordpress team? I understand if they want to store and manipulate times internally as UTC, but wouldn't a better alternative be to explicitly switch to a "UTC mode" when they need to do such logic? Assuming you know to set your server's php.ini's timezone setting, this hardcoded UTC basically invalidates php.net's description of the date() function: date — Format a local time/date Which strikes me as a bad thing, no? A: Somehow I missed the current_time function, which gives a good description of the situation and how to properly deal with the need to get the current blog-local time. http://codex.wordpress.org/Function_Reference/current_time Though the purist in me still hates how WP makes the time zone setting in php.ini obsolete without giving you a choice. *grumble grumble*
Q: Default timezone hardcoded as UTC? While debugging a plugin I was writing, I noticed that on line 36 of wp-settings.php, the default timezone is hardcoded to UTC with a call to the date_default_set_timezone() function. This means any call to the PHP date/time functions will work with UTC as the local time. Can someone please explain to me why this is a sane design choice by the Wordpress team? I understand if they want to store and manipulate times internally as UTC, but wouldn't a better alternative be to explicitly switch to a "UTC mode" when they need to do such logic? Assuming you know to set your server's php.ini's timezone setting, this hardcoded UTC basically invalidates php.net's description of the date() function: date — Format a local time/date Which strikes me as a bad thing, no? A: Somehow I missed the current_time function, which gives a good description of the situation and how to properly deal with the need to get the current blog-local time. http://codex.wordpress.org/Function_Reference/current_time Though the purist in me still hates how WP makes the time zone setting in php.ini obsolete without giving you a choice. *grumble grumble* A: WordPress is not a simplistic script, it is a extensive web app. It includes own time zone settings and own functions for output of localized date/time info. I suppose it is much more straightforward to set baseline time zone and operate on top of that, than trying to change it back and forth around all related functionality.
wordpress
{ "language": "en", "length": 249, "provenance": "stackexchange_00019.jsonl.gz:413807", "question_score": "8", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30946" }
[ 0.05596923828125, -0.0306854248046875, 0.0160064697265625, -0.00698089599609375, -0.0003643035888671875, -0.0269622802734375, 0.06982421875, -0.00783538818359375, -0.00809478759765625, 0.013702392578125, -0.01229095458984375, -0.001163482666015625, -0.03125, -0.0259246826171875, -0.016448974609375, -0.0297088623046875, 0.041748046875, -0.0294189453125, -0.004695892333984375, -0.01378631591796875, -0.020355224609375, 0.01092529296875, 0.019256591796875, 0.05828857421875, 0.051055908203125, -0.024627685546875, 0.060882568359375, -0.03411865234375, 0.047637939453125, -0.0086822509765625, 0.033843994140625, -0.0263519287109375, 0.01212310791015625, 0.01476287841796875, -0.0086517333984375, -0.0219573974609375, -0.020263671875, 0.0294036865234375, -0.0279998779296875, 0.041473388671875, 0.0132598876953125, -0.0096588134765625, 0.004451751708984375, 0.00904083251953125, -0.0221099853515625, -0.047393798828125, 0.0428466796875, -0.00457000732421875, -0.003631591796875, -0.00884246826171875, 0.0020904541015625, 0.0182342529296875, 0.021881103515625, -0.0423583984375, -0.015533447265625, -0.03369140625, -0.0120391845703125, 0.00850677490234375, 0.0396728515625, -0.0026454925537109375, -0.049896240234375, -0.019287109375, 0.025299072265625, -0.032562255859375, 0.00901031494140625, -0.0079193115234375, 0.0533447265625, 0.022796630859375, -0.029388427734375, 0.0218658447265625, 0.037567138671875, -0.0016069412231445312, 0.006427764892578125, -0.02783203125, 0.01739501953125, -0.00814056396484375, -0.0142669677734375, -0.011138916015625, 0.0157928466796875, 0.007720947265625, 0.045013427734375, -0.006793975830078125, -0.0194244384765625, -0.0197906494140625, 0.0321044921875, -0.0078582763671875, 0.0061798095703125, -0.0229949951171875, -0.059783935546875, -0.036102294921875, -0.0269012451171875, -0.005565643310546875, -0.0809326171875, -0.0239105224609375, 0.0086822509765625, -0.0249176025390625, -0.0209503173828125, 0.0240325927734375, -0.0271453857421875, -0.046905517578125, 0.0019664764404296875, -0.0010166168212890625, -0.0693359375, 0.00420379638671875, 0.0198822021484375, 0.031768798828125, -0.0007848739624023438, 0.0153961181640625, 0.042236328125, 0.02301025390625, -0.001239776611328125, 0.00783538818359375, -0.01226043701171875, -0.037139892578125, -0.022705078125, 0.038177490234375, -0.006084442138671875, 0.0077972412109375, 0.032196044921875, 0.01432037353515625, 0.01497650146484375, 0.05352783203125, -0.0306396484375, -0.0362548828125, 0.004726409912109375, -0.00905609130859375, -0.0215301513671875, -0.014007568359375, -0.048492431640625, 0.0017881393432617188, -0.0396728515625, 0.025115966796875, 0.035308837890625, 0.0009751319885253906, -0.008880615234375, -0.0167236328125, 0.0721435546875, -0.00443267822265625, 0.0019855499267578125, 0.030548095703125, -0.0305023193359375, -0.017242431640625, 0.0131378173828125, -0.0180206298828125, 0.0142364501953125, 0.0079193115234375, 0.023681640625, 0.017730712890625, -0.01134490966796875, -0.027099609375, 0.0142669677734375, 0.0172119140625, 0.0172119140625, 0.004734039306640625, 0.0125732421875, -0.01499176025390625, 0.043731689453125, -0.034820556640625, -0.02886962890625, -0.03515625, -0.01983642578125, -0.027587890625, -0.0396728515625, -0.052764892578125, -0.05517578125, 0.028411865234375, 0.027496337890625, 0.0028018951416015625, 0.01534271240234375, 0.005771636962890625, 0.00396728515625, -0.03826904296875, -0.031768798828125, 0.006961822509765625, 0.0008945465087890625, 0.0345458984375, 0.0035953521728515625, 0.0194244384765625, -0.026885986328125, 0.06182861328125, 0.0341796875, -0.0291748046875, -0.01555633544921875, 0.0166778564453125, -0.0237579345703125, -0.017120361328125, -0.0020160675048828125, 0.01556396484375, 0.02978515625, 0.018157958984375, -0.0184173583984375, -0.007354736328125, -0.061981201171875, 0.050933837890625, -0.00954437255859375, -0.006305694580078125, -0.037139892578125, -0.0012035369873046875, -0.0157928466796875, -0.0245361328125, 0.00617218017578125, 0.006839752197265625, 0.0093994140625, 0.0015554428100585938, -0.0758056640625, 0.037109375, -0.038726806640625, 0.037139892578125, 0.0187530517578125, -0.025115966796875, -0.01047515869140625, -0.006267547607421875, 0.01207733154296875, -0.07781982421875, -0.053253173828125, 0.060089111328125, -0.033203125, 0.041259765625, -0.01386260986328125, 0.0516357421875, -0.03857421875, -0.0239410400390625, -0.0021381378173828125, 0.00475311279296875, 0.042266845703125, 0.0223388671875, -0.009124755859375, 0.01202392578125, 0.082275390625, 0.0254974365234375, 0.01593017578125, -0.0029144287109375, -0.020111083984375, -0.007366180419921875, -0.05706787109375, 0.00473785400390625, -0.02362060546875, -0.0017824172973632812, -0.003376007080078125, 0.039825439453125, 0.0294647216796875, -0.0181884765625, 0.0014591217041015625, 0.0126953125, 0.0191192626953125, -0.002593994140625, 0.028778076171875, -0.007671356201171875, 0.017913818359375, 0.02069091796875, -0.062255859375, -0.0369873046875, 0.037261962890625, -0.09271240234375, -0.0124664306640625, 0.045318603515625, -0.037628173828125, -0.06353759765625, 0.03228759765625, 0.017547607421875, 0.00959014892578125, -0.020599365234375, -0.01406097412109375, -0.0014781951904296875, 0.05072021484375, -0.0218658447265625, 0.0121002197265625, 0.002216339111328125, -0.032958984375, 0.00021982192993164062, 0.0126190185546875, -0.038848876953125, -0.0038967132568359375, 0.02105712890625, 0.029449462890625, -0.024688720703125, -0.0230712890625, 0.0095062255859375, 0.0013675689697265625, 0.003814697265625, -0.0277099609375, 0.016448974609375, 0.00565338134765625, -0.0147552490234375, -0.01568603515625, -0.027679443359375, 0.0204010009765625, 0.01219940185546875, 0.05224609375, -0.024444580078125, 0.01311492919921875, -0.00862884521484375, -0.053802490234375, 0.06427001953125, 0.023529052734375, -0.072998046875, -0.0165252685546875, 0.01036834716796875, 0.005016326904296875, 0.01055908203125, 0.004283905029296875, 0.03997802734375, 0.0172119140625, -0.004268646240234375, -0.0114593505859375, 0.0157470703125, 0.0021839141845703125, -0.00013339519500732422, -0.01297760009765625, -0.00164794921875, -0.05426025390625, -0.01107025146484375, 0.006008148193359375, 0.0279388427734375, -0.04193115234375, -0.03851318359375, -0.049346923828125, -0.0203094482421875, -0.09942626953125, -0.057952880859375, -0.021453857421875, -0.0214691162109375, 0.012969970703125, 0.004184722900390625, 0.0081634521484375, -0.004119873046875, 0.006122589111328125, 0.00034356117248535156, 0.047576904296875, -0.017120361328125, -0.032867431640625, -0.01922607421875, -0.051116943359375, -0.028656005859375, -0.0102691650390625, -0.006832122802734375, 0.0038318634033203125, 0.0284576416015625, -0.00691986083984375, -0.0758056640625, -0.04571533203125, -0.0171051025390625, -0.0273895263671875, -0.0220947265625, -0.020538330078125, -0.0271759033203125, 0.0166473388671875, -0.0193328857421875, 0.00782012939453125, 0.017730712890625, -0.0029239654541015625, 0.0038089752197265625, 0.0018310546875, -0.02166748046875, 0.0219879150390625, 0.0266876220703125, -0.032806396484375, -0.005367279052734375, 0.0264129638671875, -0.058197021484375, -0.0087890625, -0.004852294921875, -0.0244903564453125, 0.021087646484375, 0.0035190582275390625, 0.0030422210693359375, -0.0098419189453125, 0.01947021484375, -0.0281982421875, 0.00548553466796875, 0.048309326171875, -0.0234375, 0.014739990234375, -0.0338134765625, -0.050537109375, -0.01898193359375, 0.02496337890625, -0.02557373046875, -0.042083740234375, -0.01346588134765625, -0.0172882080078125, -0.008941650390625, -0.0528564453125, -0.045654296875, -0.074951171875, 0.0528564453125, -0.0186004638671875, -0.01120758056640625, -0.0236358642578125, -0.020965576171875, 0.00756072998046875, 0.09710693359375, -0.08343505859375, -0.010101318359375, 0.011810302734375, 0.0283966064453125, -0.034332275390625, -0.025634765625, -0.05120849609375, -0.021270751953125, -0.003875732421875, 0.019256591796875, -0.00270843505859375, 0.0233306884765625, -0.03973388671875, 0.038177490234375, -0.006561279296875, -0.0199127197265625, 0.00279998779296875, 0.037750244140625, 0.002094268798828125, 0.015777587890625, -0.01215362548828125, 0.011993408203125, 0.0264434814453125, -0.0239105224609375, -0.076904296875, -0.01617431640625, -0.044403076171875, 0.05145263671875, 0.0295257568359375, -0.0243377685546875, -0.019775390625, 0.0261383056640625, 0.0228118896484375, -0.01229095458984375, 0.0291595458984375, -0.0276031494140625, 0.062225341796875, 0.056793212890625, 0.0294952392578125, -0.0007739067077636719, -0.0087738037109375, 0.038848876953125, -0.0276947021484375, 0.027984619140625, 0.01311492919921875, -0.0185546875, 0.06866455078125, -0.0628662109375, 0.004756927490234375, -0.0290985107421875, -0.03143310546875, 0.026763916015625, -0.0423583984375, 0.035736083984375, -0.031707763671875, -0.042236328125, 0.07891845703125, 0.004894256591796875, 0.005985260009765625, -0.0130462646484375, 0.07147216796875, -0.005279541015625, -0.04052734375, -0.04461669921875, 0.00923919677734375, 0.00986480712890625, 0.004673004150390625, 0.045135498046875, -0.0181732177734375, -0.0006084442138671875, 0.0654296875, -0.02362060546875, 0.039459228515625, -0.063720703125, 0.059539794921875, -0.0316162109375, -0.01158905029296875, 0.033843994140625, -0.04779052734375, 0.01131439208984375, 0.04266357421875, 0.007965087890625, -0.02978515625, -0.006534576416015625, 0.04168701171875, -0.00021338462829589844, -0.005886077880859375, -0.048858642578125, -0.0137176513671875, 0.0184478759765625, -0.0570068359375, 0.0137786865234375, -0.003635406494140625, 0.005741119384765625, -0.0134735107421875, 0.01088714599609375, 0.0118255615234375, -0.0038242340087890625, -0.0032024383544921875, 0.0004570484161376953, 0.03717041015625, -0.007106781005859375, 0.004756927490234375, -0.00855255126953125, -0.0214691162109375, 0.07928466796875, 0.03350830078125, -0.003223419189453125, 0.01284027099609375, -0.01641845703125, -0.0162811279296875, -0.016571044921875, -0.001323699951171875, 0.034637451171875, -0.007762908935546875, -0.0011234283447265625, -0.01174163818359375, -0.045623779296875, -0.00333404541015625, -0.0504150390625, 0.057220458984375, 0.0211181640625, 0.011627197265625, 0.003448486328125, 0.08489990234375, 0.0321044921875, 0.03582763671875, -0.031219482421875, 0.0325927734375, -0.0067596435546875, 0.07110595703125, 0.01953125, -0.051544189453125, 0.00677490234375, 0.032257080078125, -0.0408935546875, 0.0057525634765625, -0.00818634033203125, -0.0012845993041992188, -0.0161285400390625, -0.009796142578125, 0.0113525390625, 0.0273895263671875, 0.0193634033203125, -0.01531982421875, -0.01041412353515625, -0.0178375244140625, -0.021728515625, -0.0011167526245117188, -0.00321197509765625, 0.011199951171875, 0.00904083251953125, -0.01551055908203125, 0.0235595703125, -0.039520263671875, 0.036102294921875, -0.03082275390625, 0.029144287109375, -0.0236053466796875, -0.0426025390625, -0.05389404296875, -0.054473876953125, -0.01715087890625, -0.0242462158203125, 0.01168060302734375, -0.019744873046875, -0.0229644775390625, 0.053131103515625, -0.01432037353515625, -0.0047607421875, -0.00823974609375, -0.00618743896484375, -0.0689697265625, 0.0031147003173828125, 0.03515625, 0.00534820556640625, -0.048583984375, -0.01480865478515625, -0.058624267578125, -0.0025653839111328125, -0.04498291015625, -0.057403564453125, -0.041595458984375, 0.022613525390625, 0.05364990234375, 0.05072021484375, -0.0088958740234375, -0.0682373046875, -0.01100921630859375, -0.0101318359375, 0.0213165283203125, 0.08587646484375, -0.061431884765625, 0.056915283203125, 0.036956787109375, 0.048980712890625, -0.00885772705078125, 0.0051727294921875, -0.01021575927734375, 0.001003265380859375, 0.0297393798828125, -0.040863037109375, -0.0404052734375, -0.00850677490234375, -0.01502227783203125, 0.006412506103515625, 0.006359100341796875, -0.00522613525390625, 0.0157623291015625, -0.01152801513671875, 0.016357421875, -0.0241546630859375, 0.0277252197265625, -0.0382080078125, 0.01448822021484375, -0.024078369140625, 0.0208740234375, 0.036712646484375, -0.041748046875, -0.0096588134765625, -0.01271820068359375, -0.00901031494140625, -0.00632476806640625, -0.004634857177734375, 0.01415252685546875, -0.0357666015625, 0.033447265625, 0.01342010498046875, 0.04693603515625, 0.02862548828125, 0.017578125, 0.0307159423828125, 0.0243377685546875, -0.10491943359375, -0.040924072265625, -0.0218505859375, 0.014801025390625, -0.01132965087890625, 0.002685546875, 0.00848388671875, 0.0172882080078125, 0.06988525390625, 0.07586669921875, -0.07904052734375, 0.005573272705078125, 0.037200927734375, 0.00262451171875, 0.047882080078125, 0.0024929046630859375, -0.01483154296875, 0.05560302734375, 0.02764892578125, -0.085693359375, -0.0447998046875, 0.0258636474609375, 0.022369384765625, -0.0028591156005859375, -0.005199432373046875, 0.046356201171875, 0.019012451171875, -0.006526947021484375, 0.0284271240234375, -0.017364501953125, 0.056060791015625, -0.01154327392578125, 0.00537109375, 0.018829345703125, -0.032073974609375, -0.0694580078125, 0.0018596649169921875, -0.017364501953125, -0.0257720947265625, 0.0209197998046875, -0.019622802734375, 0.06085205078125, 0.053924560546875, -0.0071258544921875, 0.030975341796875, 0.01482391357421875, 0.027099609375, -0.039154052734375, -0.03326416015625, 0.017059326171875, 0.03997802734375, -0.03802490234375, 0.0313720703125, -0.00725555419921875, -0.028045654296875, -0.005580902099609375, -0.01776123046875, 0.052490234375, -0.0218963623046875, -0.0250244140625, 0.0139312744140625, -0.0184173583984375, 0.003231048583984375, -0.027496337890625, 0.0418701171875, -0.0443115234375, -0.0102996826171875, -0.0163421630859375, -0.004886627197265625, 0.0156097412109375, -0.0220947265625, -0.0109710693359375, 0.0284881591796875, -0.0215301513671875, -0.0183258056640625, 0.000820159912109375, 0.0106353759765625, 0.006626129150390625, 0.00635528564453125, -0.037933349609375, 0.0279693603515625, 0.022003173828125, 0.0251007080078125, -0.046539306640625, -0.0208740234375, -0.0013837814331054688, 0.031646728515625, 0.06500244140625, 0.01849365234375, -0.03656005859375, -0.0043487548828125, 0.040557861328125, 0.02178955078125, -0.0171356201171875, 0.03570556640625, -0.0072021484375, 0.003795623779296875, 0.0146331787109375, 0.004016876220703125, 0.02154541015625, 0.0144195556640625, -0.038909912109375, 0.0048675537109375, 0.00777435302734375, -0.0117645263671875, -0.02691650390625, 0.0212860107421875, -0.05426025390625, -0.01041412353515625, 0.024017333984375, 0.00986480712890625, -0.0308685302734375, 0.045745849609375, 0.0255279541015625, -0.08331298828125, -0.041290283203125, -0.04132080078125, 0.037353515625, 0.0037708282470703125, -0.054046630859375, 0.0301513671875, 0.01507568359375, -0.08123779296875, -0.041534423828125, -0.039947509765625, -0.01175689697265625, -0.01099395751953125, 0.01068878173828125, 0.0245513916015625, 0.02935791015625, -0.01371002197265625, -0.025146484375, 0.0263214111328125, 0.018585205078125, -0.007099151611328125, -0.037994384765625, 0.007221221923828125, -0.006988525390625, 0.0294647216796875, -0.00579071044921875, 0.041168212890625, -0.076171875, -0.043121337890625, -0.01551055908203125, 0.01158905029296875, 0.053192138671875, 0.0029392242431640625, 0.0170440673828125, 0.0279998779296875, -0.054779052734375, -0.003559112548828125, -0.024017333984375, 0.00562286376953125, -0.004482269287109375, 0.0726318359375, 0.0031909942626953125, 0.06719970703125, -0.0703125, -0.04815673828125, 0.05194091796875, -0.00205230712890625, 0.017669677734375, -0.0794677734375, 0.04339599609375, -0.0325927734375, -0.01107025146484375, 0.003665924072265625, 0.006439208984375, 0.00408935546875, 0.052337646484375, 0.01800537109375, -0.043609619140625, -0.01239776611328125, 0.009307861328125, -0.032012939453125, -0.06787109375, -0.0272369384765625, -0.004852294921875, 0.03948974609375, 0.0298919677734375, 0.03778076171875, 0.0247802734375, 0.0233001708984375, -0.0263671875, 0.04278564453125, -0.00012814998626708984, 0.0087738037109375, 0.050994873046875, -0.00865936279296875, 0.032806396484375, 0.0027408599853515625, 0.062103271484375, 0.01190948486328125, 0.021453857421875, -0.01406097412109375, -0.01483154296875, 0.0187530517578125, 0.036163330078125, -0.007686614990234375, 0.0233001708984375, -0.0311279296875, -0.0023097991943359375, 0.0027370452880859375, 0.0271453857421875, -0.043792724609375, -0.012298583984375, -0.02294921875, -0.042633056640625, -0.0227813720703125, -0.033599853515625, 0.035980224609375, 0.01369476318359375, 0.041717529296875, -0.004413604736328125, 0.03594970703125, 0.017852783203125, -0.00873565673828125, 0.00017595291137695312, 0.003284454345703125, -0.006160736083984375, -0.0210113525390625, 0.0019483566284179688, 0.006305694580078125, -0.01320648193359375, 0.0199432373046875, 0.03228759765625, -0.01206207275390625, 0.005611419677734375, -0.0160369873046875, 0.0271759033203125, 0.002178192138671875, 0.03466796875, -0.002758026123046875, 0.0091705322265625, 0.03179931640625, 0.002925872802734375, 0.0244598388671875, 0.03045654296875, -0.0086517333984375, 0.01097869873046875, -0.0272064208984375, -0.020751953125, 0.01334381103515625, -0.0205078125, -0.0071258544921875, 0.0173797607421875, -0.0177001953125, -0.017913818359375, -0.01263427734375, -0.012298583984375, -0.0095977783203125, 0.012420654296875, -0.00968170166015625, 0.00875091552734375, -0.019134521484375, 0.0188446044921875, -0.01444244384765625, -0.005466461181640625, -0.04449462890625, -0.0205535888671875, 0.0288848876953125, 0.00894927978515625, 0.0035381317138671875, -0.0020999908447265625, -0.01058197021484375, -0.04010009765625, 0.01032257080078125, 0.034149169921875, -0.017730712890625, 0.0095672607421875, -0.030914306640625, -0.034515380859375, 0.0189056396484375, -0.042327880859375, 0.0645751953125, -0.0601806640625, -0.0345458984375, -0.0114593505859375, -0.0176544189453125, 0.0115814208984375, -0.028533935546875, -0.01534271240234375, -0.03155517578125, -0.061767578125, -0.072509765625, 0.044219970703125, -0.0771484375, 0.0060272216796875, 0.04052734375, -0.01105499267578125, -0.0220794677734375, -0.01861572265625, -0.00972747802734375, 0.0231781005859375, -0.06378173828125, -0.0297088623046875, 0.01385498046875, -0.0141143798828125, 0.0002493858337402344, -0.00815582275390625, 0.01947021484375, -0.08013916015625, -0.0247039794921875, 0.01409912109375, -0.03826904296875, 0.0002894401550292969, -0.036407470703125, -0.0382080078125, 0.0252532958984375, 0.0078125, -0.034637451171875, -0.04913330078125, 0.0096893310546875, -0.01543426513671875, 0.06622314453125, -0.00579833984375, -0.0238800048828125, -0.0008268356323242188, 0.0131378173828125, 0.0158538818359375, 0.00618743896484375, 0.022308349609375, -0.00659942626953125, -0.02398681640625, 0.020751953125, 0.006397247314453125, -0.004016876220703125, 0.0103912353515625, 0.0091552734375, 0.017730712890625, 0.04180908203125, -0.020721435546875, 0.03936767578125, 0.0013132095336914062, 0.006114959716796875, -0.03411865234375, -0.0020999908447265625, -0.033966064453125, -0.0247650146484375, 0.11029052734375, 0.054443359375, 0.020751953125, -0.0215911865234375, -0.036407470703125, -0.052520751953125, -0.0195770263671875, -0.0310211181640625, 0.0160675048828125, -0.09136962890625, -0.0158843994140625, 0.01113128662109375, -0.00034880638122558594, -0.0110931396484375, -0.00144195556640625, -0.031890869140625, -0.005954742431640625, -0.02392578125, -0.031402587890625, -0.02276611328125, 0.0037384033203125, -0.01654052734375, -0.0026569366455078125, 0.0170745849609375, -0.0418701171875, 0.025604248046875, -0.0126800537109375, -0.002170562744140625, 0.0205230712890625, 0.0308990478515625, -0.0228729248046875, -0.018035888671875, 0.023529052734375, -0.031890869140625, 0.005397796630859375, -0.01275634765625, 0.020904541015625, -0.0227508544921875, -0.0158233642578125, -0.008392333984375, 0.058624267578125, -0.056488037109375, -0.022674560546875, -0.027740478515625, 0.01158905029296875, -0.0252227783203125, -0.0288848876953125, 0.042449951171875, -0.02947998046875, -0.0158538818359375, -0.01282501220703125, -0.038543701171875, 0.0194854736328125, 0.0275115966796875, 0.037750244140625, 0.0072479248046875, -0.004962921142578125, -0.08465576171875, 0.0165557861328125, -0.003025054931640625 ]
9e85416890cce21405ffde109c9c0b3198f8686b
Wordpress Stackexchange Q: Set default image sizes in WordPress to hard crop How do I set the medium and large images sizes in WP to hard crop? In my theme I can set the thumbnail size to hard crop using this: add_theme_support('post-thumbnails'); set_post_thumbnail_size( 96, 96, true ); But I can see no way to make the medium and large images to hard crop. Is there possibly a way to remove the medium and large sizes and re-add them using: add_image_size( 'medium', $width, $height, true ); add_image_size( 'large', $width, $height, true ); A: To enable cropping for the medium images, it is enough to use this code: update_option( 'medium_crop', 1 ); The update_option() function itself checks whether such an option exists, and adds it if necessary: If the option does not exist, then the option will be added with the option value, with an $autoload value of yes.
Q: Set default image sizes in WordPress to hard crop How do I set the medium and large images sizes in WP to hard crop? In my theme I can set the thumbnail size to hard crop using this: add_theme_support('post-thumbnails'); set_post_thumbnail_size( 96, 96, true ); But I can see no way to make the medium and large images to hard crop. Is there possibly a way to remove the medium and large sizes and re-add them using: add_image_size( 'medium', $width, $height, true ); add_image_size( 'large', $width, $height, true ); A: To enable cropping for the medium images, it is enough to use this code: update_option( 'medium_crop', 1 ); The update_option() function itself checks whether such an option exists, and adds it if necessary: If the option does not exist, then the option will be added with the option value, with an $autoload value of yes. A: Here's an improvement that uses the settings as you tried to do: add_image_size('medium', get_option( 'medium_size_w' ), get_option( 'medium_size_h' ), true ); A: You can over write the default like this: add_image_size( 'medium', 200, 200, true ); A: The Gleb's answer worked nicely for me. // Medium Size Thumbnail if(false === get_option('medium_crop')) { add_option('medium_crop', '1'); } else { update_option('medium_crop', '1'); } Found the full code here
wordpress
{ "language": "en", "length": 211, "provenance": "stackexchange_00019.jsonl.gz:413813", "question_score": "22", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30965" }
[ 0.003204345703125, -0.03570556640625, 0.043914794921875, 0.041961669921875, -0.03155517578125, -0.01448822021484375, 0.08111572265625, -0.038909912109375, 0.039581298828125, 0.01058197021484375, -0.044677734375, 0.0076904296875, 0.0010671615600585938, -0.0028514862060546875, -0.0264739990234375, -0.01351165771484375, 0.053680419921875, -0.048553466796875, 0.0141754150390625, -0.00916290283203125, 0.03662109375, 0.02008056640625, 0.0189361572265625, 0.1103515625, -0.0313720703125, 0.044586181640625, 0.045745849609375, -0.0198974609375, -0.053558349609375, -0.038604736328125, -0.005382537841796875, 0.040496826171875, 0.04168701171875, -0.0244598388671875, 0.002437591552734375, 0.0280303955078125, -0.00054168701171875, -0.02545166015625, -0.0234222412109375, 0.0266571044921875, 0.00830078125, -0.00429534912109375, 0.0037689208984375, -0.00791168212890625, -0.0236663818359375, 0.0033512115478515625, -0.018768310546875, -0.0228729248046875, 0.00246429443359375, -0.008453369140625, 0.0028839111328125, -0.006427764892578125, 0.02398681640625, -0.0169219970703125, -0.0198822021484375, -0.018463134765625, -0.007366180419921875, 0.055450439453125, 0.0244140625, -0.0019474029541015625, -0.0447998046875, 0.0294952392578125, -0.00827789306640625, -0.030181884765625, 0.0038242340087890625, -0.0213470458984375, -0.041656494140625, 0.011199951171875, -0.01264190673828125, 0.007293701171875, 0.033355712890625, -0.0224609375, -0.0019683837890625, -0.045806884765625, 0.0212860107421875, 0.076416015625, -0.041290283203125, 0.028472900390625, 0.0103912353515625, -0.00390625, 0.0305938720703125, -0.0159149169921875, -0.009002685546875, -0.01043701171875, 0.057769775390625, 0.048065185546875, -0.0008349418640136719, -0.028228759765625, -0.00742340087890625, 0.0087890625, -0.0014486312866210938, -0.040130615234375, -0.0266265869140625, 0.046844482421875, 0.0102386474609375, -0.01436614990234375, 0.01149749755859375, 0.011260986328125, -0.0313720703125, -0.024627685546875, 0.036407470703125, -0.049530029296875, 0.0227813720703125, -0.026611328125, 0.02227783203125, -0.00254058837890625, -0.040069580078125, -0.01512908935546875, 0.040008544921875, 0.0625, -0.006206512451171875, 0.0213165283203125, -0.00365447998046875, 0.0039005279541015625, -0.01477813720703125, -0.0197296142578125, -0.058502197265625, 0.039520263671875, -0.0028781890869140625, 0.021728515625, 0.0015420913696289062, 0.033599853515625, -0.0002925395965576172, -0.04693603515625, 0.021881103515625, 0.0163421630859375, -0.00995635986328125, -0.047271728515625, -0.040374755859375, 0.043426513671875, -0.0238494873046875, 0.0205841064453125, 0.0277252197265625, -0.002590179443359375, -0.024993896484375, -0.0096282958984375, -0.0141754150390625, -0.053314208984375, -0.0369873046875, 0.025115966796875, -0.040313720703125, -0.01312255859375, 0.04254150390625, -0.031585693359375, 0.020294189453125, 0.0189971923828125, 0.01458740234375, 0.01522064208984375, 0.008056640625, -0.032470703125, 0.01389312744140625, -0.0123748779296875, 0.0104217529296875, 0.0274505615234375, -0.013031005859375, -0.0005426406860351562, 0.061920166015625, -0.025604248046875, -0.040435791015625, -0.052825927734375, 0.029449462890625, -0.00888824462890625, -0.01163482666015625, -0.016571044921875, -0.0197601318359375, -0.0010862350463867188, -0.047607421875, 0.007114410400390625, 0.0210723876953125, -0.0210723876953125, -0.011383056640625, 0.0268402099609375, 0.005474090576171875, 0.01016998291015625, 0.00870513916015625, 0.00850677490234375, 0.029571533203125, 0.01910400390625, -0.0135955810546875, 0.04351806640625, 0.01241302490234375, -0.031585693359375, 0.0380859375, -0.0203399658203125, 0.03253173828125, -0.08135986328125, -0.00173187255859375, -0.0190582275390625, 0.042999267578125, 0.044464111328125, -0.0634765625, -0.04302978515625, -0.035797119140625, 0.033233642578125, -0.01428985595703125, -0.003459930419921875, -0.03497314453125, -0.006511688232421875, -0.0195159912109375, 0.013946533203125, 0.018524169921875, -0.0127716064453125, 0.03326416015625, -0.0125579833984375, -0.016448974609375, 0.00817108154296875, -0.0240020751953125, 0.027801513671875, -0.0170745849609375, 0.004669189453125, 0.01389312744140625, -0.015228271484375, -0.0186309814453125, -0.004634857177734375, -0.0159149169921875, -0.00972747802734375, 0.0038242340087890625, 0.0153350830078125, -0.01410675048828125, 0.0187225341796875, -0.028778076171875, -0.034515380859375, -0.01064300537109375, 0.034515380859375, 0.053497314453125, 0.00643157958984375, -0.0133209228515625, -0.007648468017578125, 0.0516357421875, 0.0026988983154296875, -0.004924774169921875, 0.039886474609375, 0.0181121826171875, 0.00109100341796875, -0.01406097412109375, -0.0015964508056640625, 0.032501220703125, -0.04241943359375, 0.00611114501953125, 0.037261962890625, 0.03314208984375, 0.034820556640625, 0.00977325439453125, 0.03253173828125, 0.0625, 0.01467132568359375, 0.029205322265625, -0.01494598388671875, -0.00928497314453125, -0.0243682861328125, -0.0340576171875, -0.03302001953125, 0.03729248046875, -0.08905029296875, 0.0131988525390625, 0.0374755859375, -0.024871826171875, -0.037078857421875, 0.0014410018920898438, 0.040283203125, 0.0017194747924804688, 0.015350341796875, -0.0010623931884765625, 0.0037975311279296875, -0.022064208984375, 0.024383544921875, -0.01617431640625, -0.0190277099609375, -0.037933349609375, 0.04974365234375, 0.024322509765625, -0.0305328369140625, 0.00029850006103515625, 0.0141448974609375, 0.029449462890625, 0.001529693603515625, -0.042755126953125, 0.005374908447265625, 0.025482177734375, 0.007617950439453125, -0.02374267578125, 0.003162384033203125, -0.058349609375, -0.00923919677734375, -0.0283355712890625, -0.07330322265625, 0.01059722900390625, 0.0233001708984375, 0.0217132568359375, -0.033782958984375, -0.011444091796875, 0.04742431640625, -0.007129669189453125, 0.057281494140625, -0.0035858154296875, -0.02545166015625, 0.031036376953125, -0.05731201171875, 0.06280517578125, -0.046783447265625, 0.09130859375, 0.08770751953125, -0.056427001953125, 0.0697021484375, -0.008056640625, 0.0087127685546875, -0.007404327392578125, 0.021026611328125, -0.00417327880859375, -0.042694091796875, -0.0028972625732421875, -0.0200653076171875, 0.0008411407470703125, 0.0538330078125, -0.04705810546875, -0.047088623046875, 0.006763458251953125, 0.017730712890625, -0.007152557373046875, 0.0174713134765625, 0.00899505615234375, -0.0555419921875, -0.052886962890625, -0.007801055908203125, -0.0357666015625, 0.01904296875, 0.0114898681640625, -0.0219268798828125, -0.0181121826171875, 0.005336761474609375, 0.0206756591796875, -0.01277923583984375, -0.0102081298828125, -0.0102386474609375, 0.003143310546875, -0.005523681640625, 0.01275634765625, -0.000028073787689208984, 0.00479888916015625, -0.01971435546875, 0.00849151611328125, 0.004161834716796875, -0.007320404052734375, -0.007717132568359375, 0.0145416259765625, -0.028564453125, 0.00806427001953125, -0.01617431640625, -0.01293182373046875, 0.040191650390625, -0.01262664794921875, -0.0137481689453125, -0.050933837890625, -0.0254364013671875, -0.062255859375, 0.053314208984375, 0.07476806640625, -0.068359375, -0.0306396484375, -0.057861328125, -0.0120086669921875, -0.0253448486328125, -0.042449951171875, 0.030731201171875, 0.04541015625, -0.01342010498046875, -0.0162200927734375, 0.0018758773803710938, 0.050628662109375, 0.060455322265625, 0.00681304931640625, 0.032012939453125, 0.0172576904296875, -0.004772186279296875, -0.0006656646728515625, -0.045654296875, -0.0323486328125, -0.0304107666015625, 0.03631591796875, -0.02032470703125, 0.015655517578125, -0.0123138427734375, 0.0157470703125, -0.0433349609375, -0.035308837890625, 0.0294647216796875, -0.01358795166015625, 0.0312347412109375, -0.031494140625, -0.024078369140625, 0.0007634162902832031, 0.073486328125, -0.0755615234375, -0.0300140380859375, -0.029144287109375, 0.031158447265625, -0.01276397705078125, -0.07940673828125, 0.01288604736328125, -0.0161285400390625, -0.071533203125, 0.0166778564453125, 0.029296875, -0.05224609375, -0.01293182373046875, 0.009368896484375, -0.05828857421875, -0.0185089111328125, 0.01528167724609375, 0.034271240234375, -0.01922607421875, 0.0107269287109375, -0.034637451171875, 0.03558349609375, -0.01445770263671875, 0.00782012939453125, -0.087158203125, -0.01532745361328125, -0.01146697998046875, 0.07073974609375, -0.0245819091796875, 0.04461669921875, -0.053009033203125, 0.03570556640625, -0.003997802734375, 0.018096923828125, -0.0088653564453125, -0.006649017333984375, 0.01319122314453125, 0.01361846923828125, -0.0014734268188476562, -0.00849151611328125, -0.003116607666015625, -0.062164306640625, -0.05279541015625, -0.02984619140625, -0.0266571044921875, 0.040863037109375, -0.019561767578125, 0.0007104873657226562, -0.049285888671875, -0.0430908203125, -0.03173828125, 0.018646240234375, -0.0206298828125, -0.0027370452880859375, -0.062408447265625, -0.06549072265625, 0.07379150390625, 0.01401519775390625, 0.00350189208984375, -0.013336181640625, 0.07806396484375, 0.00008040666580200195, -0.035675048828125, -0.04583740234375, -0.02984619140625, 0.038330078125, 0.0078125, 0.004581451416015625, 0.01407623291015625, -0.033355712890625, 0.0212249755859375, 0.033782958984375, -0.013031005859375, -0.02655029296875, 0.07012939453125, -0.019561767578125, -0.00922393798828125, 0.020782470703125, -0.042877197265625, 0.0254669189453125, 0.02606201171875, -0.0031795501708984375, -0.0233917236328125, -0.038787841796875, 0.042022705078125, 0.005535125732421875, 0.00798797607421875, -0.04168701171875, -0.005565643310546875, 0.007434844970703125, -0.0184326171875, 0.036712646484375, 0.0014629364013671875, 0.0135650634765625, -0.013458251953125, 0.0157623291015625, 0.002391815185546875, 0.00740814208984375, -0.01088714599609375, 0.00994873046875, 0.0399169921875, -0.007526397705078125, 0.0110626220703125, 0.01314544677734375, 0.01511383056640625, -0.0245513916015625, -0.0014772415161132812, -0.02166748046875, -0.083251953125, 0.0237579345703125, 0.032012939453125, -0.004886627197265625, -0.0127410888671875, 0.06304931640625, 0.0164642333984375, -0.01287078857421875, -0.02154541015625, -0.0634765625, -0.0002803802490234375, -0.071533203125, 0.00774383544921875, 0.0230865478515625, -0.023406982421875, 0.06353759765625, -0.001861572265625, 0.032012939453125, 0.010467529296875, -0.01409149169921875, 0.0290069580078125, 0.0347900390625, 0.0287933349609375, 0.01529693603515625, 0.0027942657470703125, -0.0171356201171875, 0.00954437255859375, 0.00952911376953125, -0.0136566162109375, 0.01416015625, 0.035064697265625, 0.019805908203125, -0.01227569580078125, -0.0297698974609375, 0.0114593505859375, -0.00537872314453125, 0.01031494140625, -0.003116607666015625, -0.0531005859375, -0.058807373046875, 0.004734039306640625, 0.060089111328125, 0.053680419921875, -0.051513671875, -0.05694580078125, 0.01727294921875, -0.0293426513671875, 0.035614013671875, 0.00531005859375, -0.047210693359375, 0.0645751953125, 0.062347412109375, -0.0211944580078125, -0.01971435546875, -0.0222625732421875, -0.0138092041015625, 0.0034332275390625, -0.01611328125, -0.0281829833984375, 0.0557861328125, -0.03314208984375, 0.003810882568359375, 0.01258087158203125, -0.02178955078125, -0.0027027130126953125, 0.02105712890625, 0.0322265625, 0.0083160400390625, -0.0128936767578125, -0.038909912109375, -0.03265380859375, -0.031463623046875, 0.0382080078125, 0.02825927734375, -0.0184478759765625, 0.009674072265625, -0.0207061767578125, 0.023529052734375, -0.031341552734375, -0.03790283203125, -0.01898193359375, 0.00228118896484375, 0.003997802734375, -0.0036773681640625, -0.0158233642578125, 0.001918792724609375, 0.02032470703125, 0.019256591796875, 0.0021839141845703125, -0.00861358642578125, -0.01256561279296875, -0.01413726806640625, -0.0165252685546875, -0.0648193359375, 0.01512908935546875, 0.0125274658203125, -0.0070343017578125, 0.01332855224609375, 0.01202392578125, 0.016387939453125, 0.01505279541015625, -0.03564453125, -0.01244354248046875, -0.02685546875, 0.03668212890625, -0.06573486328125, 0.009674072265625, -0.00742340087890625, -0.0295257568359375, 0.06036376953125, -0.016204833984375, -0.007427215576171875, 0.0106048583984375, -0.058837890625, 0.018280029296875, 0.071044921875, -0.0113525390625, -0.0002378225326538086, 0.057098388671875, -0.0266571044921875, 0.02593994140625, 0.0225677490234375, -0.00579071044921875, 0.05029296875, 0.01195526123046875, -0.0230712890625, 0.007007598876953125, 0.0292816162109375, 0.006572723388671875, 0.005657196044921875, 0.00713348388671875, -0.003505706787109375, 0.03607177734375, 0.0031681060791015625, 0.080810546875, -0.006763458251953125, 0.040679931640625, 0.052093505859375, -0.035919189453125, 0.0273590087890625, 0.00949859619140625, -0.0156707763671875, 0.0306854248046875, 0.045623779296875, -0.06585693359375, -0.0231170654296875, 0.0150604248046875, 0.004974365234375, -0.0109710693359375, -0.01500701904296875, -0.012847900390625, -0.0001227855682373047, -0.061309814453125, 0.00605010986328125, 0.04803466796875, -0.038909912109375, 0.0028076171875, 0.027801513671875, -0.036163330078125, -0.01165008544921875, -0.043243408203125, -0.03057861328125, -0.032501220703125, -0.02508544921875, 0.04034423828125, 0.0032405853271484375, 0.0283355712890625, 0.0260772705078125, 0.008148193359375, 0.0015859603881835938, -0.0005540847778320312, -0.052093505859375, 0.044921875, -0.0232696533203125, 0.0428466796875, -0.0028553009033203125, -0.0404052734375, 0.0041351318359375, -0.01561737060546875, -0.027130126953125, -0.0196380615234375, -0.025146484375, 0.042694091796875, -0.00946807861328125, -0.00911712646484375, 0.00557708740234375, 0.042236328125, 0.007480621337890625, -0.00794219970703125, 0.0635986328125, -0.061431884765625, -0.0202789306640625, 0.0255584716796875, -0.00045037269592285156, -0.01213836669921875, -0.0094757080078125, -0.0212554931640625, 0.050079345703125, -0.02252197265625, -0.0225372314453125, -0.001678466796875, 0.0308685302734375, -0.0029125213623046875, 0.022705078125, -0.002643585205078125, -0.019378662109375, -0.0306549072265625, -0.006504058837890625, -0.0076751708984375, 0.017730712890625, -0.0146942138671875, 0.0080413818359375, 0.0160980224609375, -0.003414154052734375, -0.0628662109375, -0.00025153160095214844, 0.07830810546875, 0.07501220703125, 0.054443359375, 0.0268402099609375, -0.0362548828125, -0.022064208984375, 0.005435943603515625, -0.016693115234375, 0.0189208984375, -0.0078887939453125, -0.0477294921875, 0.00807952880859375, -0.005519866943359375, 0.0058135986328125, -0.027099609375, 0.057098388671875, -0.05035400390625, -0.016845703125, 0.056304931640625, -0.0579833984375, 0.03094482421875, 0.051177978515625, 0.053955078125, 0.0107879638671875, -0.02777099609375, -0.00751495361328125, 0.05059814453125, 0.0037326812744140625, 0.01067352294921875, 0.005664825439453125, 0.00128173828125, 0.02044677734375, 0.005580902099609375, -0.007038116455078125, 0.03643798828125, 0.0005946159362792969, -0.0212860107421875, -0.01348114013671875, -0.0009398460388183594, -0.00933837890625, 0.052032470703125, -0.00948333740234375, -0.0374755859375, -0.027801513671875, -0.0260009765625, 0.0020427703857421875, 0.0009517669677734375, 0.00299835205078125, -0.021728515625, -0.01739501953125, -0.06732177734375, -0.01812744140625, -0.056488037109375, 0.0015821456909179688, 0.042144775390625, 0.0243988037109375, -0.015655517578125, -0.00885009765625, -0.042022705078125, -0.0120697021484375, 0.003231048583984375, -0.0260162353515625, 0.0259246826171875, 0.018096923828125, 0.0004703998565673828, 0.0140838623046875, 0.0179290771484375, 0.01522064208984375, -0.00017392635345458984, 0.0198516845703125, -0.0195770263671875, 0.0067596435546875, -0.0028095245361328125, -0.0008645057678222656, -0.0262908935546875, 0.025299072265625, 0.007213592529296875, 0.0132904052734375, 0.07843017578125, 0.04010009765625, -0.08416748046875, -0.0228424072265625, 0.0047149658203125, -0.04730224609375, 0.00745391845703125, -0.04620361328125, 0.02777099609375, 0.0096893310546875, -0.00400543212890625, -0.01497650146484375, -0.0019063949584960938, 0.0321044921875, -0.018341064453125, 0.04779052734375, 0.009368896484375, -0.017913818359375, 0.0115203857421875, -0.0007696151733398438, 0.072998046875, 0.0093994140625, -0.0241241455078125, 0.00749969482421875, -0.00921630859375, -0.047943115234375, 0.00376129150390625, 0.0279083251953125, -0.0239105224609375, 0.0297393798828125, -0.01074981689453125, -0.021026611328125, 0.01274871826171875, 0.002445220947265625, 0.007175445556640625, 0.0006427764892578125, 0.00597381591796875, -0.01263427734375, -0.037109375, -0.010711669921875, -0.01445770263671875, 0.014251708984375, -0.002712249755859375, 0.07244873046875, -0.015899658203125, 0.016845703125, -0.006534576416015625, 0.0009622573852539062, -0.003566741943359375, -0.0150299072265625, 0.01393890380859375, 0.0078277587890625, -0.0012149810791015625, -0.007785797119140625, 0.0200347900390625, -0.01412200927734375, 0.014373779296875, -0.05084228515625, -0.031280517578125, -0.0258636474609375, 0.0173187255859375, 0.041107177734375, 0.036224365234375, -0.020843505859375, -0.0303802490234375, -0.04876708984375, 0.0122222900390625, 0.0178070068359375, -0.01531982421875, -0.06646728515625, 0.022918701171875, 0.03662109375, 0.03558349609375, 0.01690673828125, 0.02069091796875, 0.04339599609375, 0.050384521484375, -0.08416748046875, -0.07000732421875, 0.0106048583984375, 0.002895355224609375, -0.044677734375, 0.037353515625, 0.0213165283203125, 0.0042572021484375, -0.0230560302734375, 0.037353515625, -0.00030732154846191406, 0.0107421875, -0.06304931640625, -0.0220794677734375, 0.0311126708984375, 0.0256500244140625, 0.032318115234375, 0.0206298828125, -0.0005745887756347656, 0.00447845458984375, -0.01074981689453125, 0.016815185546875, 0.02313232421875, 0.0265350341796875, -0.01934814453125, 0.006343841552734375, 0.0119781494140625, 0.004428863525390625, -0.037994384765625, 0.03741455078125, -0.025238037109375, 0.00655364990234375, -0.02130126953125, -0.033782958984375, -0.00045609474182128906, 0.00878143310546875, -0.018035888671875, -0.057159423828125, -0.042694091796875, 0.03143310546875, -0.044586181640625, 0.037200927734375, 0.041351318359375, -0.03570556640625, 0.00624847412109375, 0.01558685302734375, 0.032135009765625, 0.07379150390625, -0.01187896728515625, -0.02313232421875, 0.02032470703125, -0.011962890625, -0.00411224365234375, -0.060089111328125, -0.0094451904296875, -0.07965087890625, 0.0160980224609375, -0.033416748046875, -0.0080108642578125, -0.0036525726318359375, -0.041961669921875, -0.08282470703125, 0.029022216796875, -0.0203094482421875, -0.0287628173828125, 0.00289154052734375, -0.021728515625, -0.041839599609375, 0.039306640625, 0.025360107421875, -0.031219482421875, -0.0123291015625, 0.0179901123046875, 0.01971435546875, -0.0232086181640625, 0.0304412841796875, 0.0162506103515625, 0.0060882568359375, 0.039459228515625, 0.0438232421875, -0.0285186767578125, 0.014404296875, -0.0141754150390625, 0.05389404296875, 0.07098388671875, -0.005611419677734375, 0.005321502685546875, 0.00335693359375, -0.039825439453125, -0.00872039794921875, -0.0157928466796875, -0.05206298828125, -0.0232391357421875, 0.08599853515625, 0.04718017578125, 0.0245208740234375, -0.029541015625, -0.0209808349609375, 0.01187896728515625, -0.01433563232421875, -0.0215606689453125, 0.0265960693359375, -0.06036376953125, -0.02618408203125, -0.035247802734375, -0.0020122528076171875, 0.0091094970703125, -0.028106689453125, -0.03485107421875, -0.0027713775634765625, -0.0263824462890625, 0.00957489013671875, -0.06689453125, 0.068359375, 0.03271484375, -0.035552978515625, 0.0009531974792480469, -0.043243408203125, -0.007022857666015625, 0.00792694091796875, -0.07427978515625, -0.0269622802734375, 0.00603485107421875, 0.006610870361328125, 0.0258331298828125, -0.00231170654296875, -0.02886962890625, 0.0031261444091796875, 0.0289154052734375, 0.00711822509765625, 0.00021183490753173828, -0.004001617431640625, 0.0212249755859375, 0.0087127685546875, -0.038177490234375, -0.0191192626953125, -0.054168701171875, -0.00702667236328125, -0.0270843505859375, -0.0278167724609375, 0.01032257080078125, 0.00897979736328125, -0.0103912353515625, 0.033843994140625, -0.00473785400390625, 0.03326416015625, -0.009246826171875, -0.024688720703125, 0.005290985107421875, -0.0178985595703125, 0.032318115234375, -0.048431396484375, 0.00217437744140625 ]
69c609c0049731bd6e1d17956b8bd7f0082a4628
Wordpress Stackexchange Q: Using get_posts with arguments found in meta keys I am using get posts, but I need to refine the query based on posts where a certain meta_key has a certain value. Something like this <?php $reviews = get_posts('post_type=reviews&numberposts=-1& // eg. // location=berkshire'); Is it possible to do this and if so how? Marvellous A: get_posts accepts any of the arguments that WP_Query accepts. So there's a few options. 1. meta_key and meta_value <?php get_posts(array( // some more args here 'meta_key' => 'some_key', 'meta_value' => 'some value' )); 2. meta_query meta_query is more sophisticated that using meta_key and meta_value. For instance, say you wanted to get posts that have the meta_key with one of three values: <?php get_posts(array( // more args here 'meta_query' => array( // meta query takes an array of arrays, watch out for this! array( 'key' => 'some_key', 'value' => array('anOption', 'anotherOption', 'thirdOption'), 'compare' => 'IN' ) ) )); There's a ton of examples for you to checkout in the custom fields section of WP_Query's documentation.
Q: Using get_posts with arguments found in meta keys I am using get posts, but I need to refine the query based on posts where a certain meta_key has a certain value. Something like this <?php $reviews = get_posts('post_type=reviews&numberposts=-1& // eg. // location=berkshire'); Is it possible to do this and if so how? Marvellous A: get_posts accepts any of the arguments that WP_Query accepts. So there's a few options. 1. meta_key and meta_value <?php get_posts(array( // some more args here 'meta_key' => 'some_key', 'meta_value' => 'some value' )); 2. meta_query meta_query is more sophisticated that using meta_key and meta_value. For instance, say you wanted to get posts that have the meta_key with one of three values: <?php get_posts(array( // more args here 'meta_query' => array( // meta query takes an array of arrays, watch out for this! array( 'key' => 'some_key', 'value' => array('anOption', 'anotherOption', 'thirdOption'), 'compare' => 'IN' ) ) )); There's a ton of examples for you to checkout in the custom fields section of WP_Query's documentation. A: Yes. Its possible. Use meta_key and meta_value parameters. meta_key is for custom field key (e.g. location) and meta_value is for custom field value (e.g. berkshire). Use the refined code below: /* Query args. */ $args = array( 'post_type' => 'reviews', 'posts_per_page' => -1, 'meta_key' => 'location', 'meta_value' => 'berkshire' ); /* Get Reviews */ $reviews = get_posts( $args );
wordpress
{ "language": "en", "length": 229, "provenance": "stackexchange_00019.jsonl.gz:413815", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30970" }
[ 0.04693603515625, 0.00428009033203125, 0.062164306640625, 0.03216552734375, -0.0114898681640625, -0.0038814544677734375, 0.06964111328125, -0.060516357421875, -0.00860595703125, 0.005931854248046875, -0.04083251953125, -0.014068603515625, -0.03851318359375, -0.0233306884765625, -0.001964569091796875, -0.05560302734375, 0.042938232421875, 0.0002982616424560547, 0.022705078125, -0.0127105712890625, 0.01316070556640625, 0.0162506103515625, 0.0196533203125, 0.02484130859375, 0.054351806640625, -0.042022705078125, 0.0538330078125, -0.003814697265625, 0.0272064208984375, 0.00545501708984375, 0.0361328125, -0.0299835205078125, 0.00495147705078125, -0.015716552734375, 0.03515625, 0.010986328125, 0.03558349609375, -0.00582122802734375, 0.0258636474609375, 0.0012750625610351562, 0.0161895751953125, -0.0084228515625, -0.02215576171875, 0.019622802734375, -0.0099334716796875, -0.0382080078125, 0.028106689453125, -0.02972412109375, 0.007541656494140625, -0.0093994140625, -0.00986480712890625, 0.030517578125, 0.0033740997314453125, -0.0035953521728515625, -0.012054443359375, -0.021026611328125, 0.01247406005859375, -0.056427001953125, 0.0416259765625, -0.0273284912109375, -0.0283966064453125, -0.03643798828125, 0.044189453125, 0.00319671630859375, -0.007175445556640625, -0.01151275634765625, 0.009613037109375, 0.006580352783203125, -0.0280914306640625, -0.01537322998046875, 0.0252227783203125, -0.005657196044921875, 0.0188751220703125, -0.035919189453125, 0.0269775390625, -0.04071044921875, 0.01568603515625, -0.0323486328125, -0.009124755859375, 0.0205841064453125, 0.00966644287109375, -0.02886962890625, -0.00978851318359375, -0.0007777214050292969, 0.006435394287109375, 0.007732391357421875, -0.0088653564453125, -0.0139007568359375, -0.0223236083984375, -0.051300048828125, -0.0091705322265625, -0.057342529296875, -0.06781005859375, 0.005306243896484375, 0.00756072998046875, -0.0537109375, -0.008453369140625, -0.00609588623046875, -0.0008015632629394531, 0.016357421875, -0.0232696533203125, -0.02886962890625, 0.00206756591796875, -0.0155792236328125, 0.0208740234375, 0.037750244140625, -0.025115966796875, 0.01812744140625, 0.043487548828125, 0.043914794921875, 0.0199737548828125, -0.01036834716796875, -0.0226287841796875, -0.00582122802734375, -0.02789306640625, 0.03814697265625, -0.0296478271484375, -0.005306243896484375, -0.00968170166015625, 0.01361083984375, 0.0093841552734375, 0.04071044921875, 0.037567138671875, -0.058563232421875, 0.030609130859375, 0.0193634033203125, -0.0239715576171875, -0.06536865234375, -0.0565185546875, 0.0943603515625, -0.033233642578125, -0.0164642333984375, 0.03851318359375, -0.0033283233642578125, -0.03057861328125, -0.055877685546875, -0.01044464111328125, -0.038177490234375, -0.01027679443359375, 0.0034885406494140625, -0.007415771484375, -0.03656005859375, 0.0183563232421875, -0.00711822509765625, 0.01129150390625, 0.01030731201171875, 0.03643798828125, 0.0189666748046875, -0.030120849609375, -0.04364013671875, 0.0178985595703125, 0.01543426513671875, 0.0237274169921875, 0.003978729248046875, -0.017608642578125, 0.0093536376953125, 0.029052734375, -0.034515380859375, -0.0254669189453125, -0.04052734375, 0.01366424560546875, -0.0005679130554199219, 0.01145172119140625, -0.0292510986328125, -0.034881591796875, -0.0004374980926513672, -0.02569580078125, -0.01470184326171875, 0.0142364501953125, 0.024871826171875, 0.02349853515625, -0.020599365234375, 0.021392822265625, -0.003917694091796875, -0.013427734375, -0.0033016204833984375, 0.0015897750854492188, 0.029937744140625, -0.0109100341796875, 0.04205322265625, 0.00775909423828125, -0.039794921875, 0.005123138427734375, 0.016265869140625, -0.051971435546875, 0.0521240234375, 0.0218353271484375, 0.07391357421875, -0.020050048828125, 0.0252227783203125, 0.04791259765625, 0.030609130859375, -0.01090240478515625, 0.03045654296875, 0.0027675628662109375, -0.0218048095703125, -0.004909515380859375, 0.0029773712158203125, -0.0011796951293945312, -0.032684326171875, 0.0023365020751953125, -0.01528167724609375, -0.0112457275390625, 0.0022220611572265625, -0.08349609375, -0.01212310791015625, -0.031585693359375, 0.034271240234375, -0.023345947265625, 0.0204925537109375, 0.029754638671875, 0.0013723373413085938, -0.048736572265625, 0.03106689453125, -0.004680633544921875, 0.00553131103515625, 0.00766754150390625, -0.0001844167709350586, -0.0166473388671875, -0.0143585205078125, -0.01490020751953125, -0.019561767578125, -0.032928466796875, 0.031463623046875, 0.0516357421875, 0.0011444091796875, -0.00919342041015625, -0.0123291015625, 0.033843994140625, 0.0202789306640625, -0.03759765625, 0.006725311279296875, 0.04510498046875, 0.0235595703125, -0.014801025390625, 0.0216827392578125, 0.025726318359375, -0.046600341796875, -0.00817108154296875, 0.0416259765625, 0.0255584716796875, 0.035003662109375, 0.015625, 0.0266265869140625, 0.023529052734375, -0.044189453125, 0.0030517578125, -0.006805419921875, 0.01503753662109375, 0.059356689453125, -0.042083740234375, -0.009735107421875, 0.0150604248046875, -0.0213165283203125, -0.0219268798828125, 0.030548095703125, -0.03070068359375, 0.019561767578125, 0.003787994384765625, -0.0068817138671875, -0.027679443359375, -0.0247039794921875, 0.0293121337890625, -0.0239105224609375, 0.04925537109375, -0.0017271041870117188, 0.0377197265625, 0.028045654296875, -0.0234527587890625, 0.005001068115234375, 0.0016431808471679688, -0.015960693359375, 0.01287078857421875, 0.005462646484375, -0.04681396484375, 0.0159149169921875, -0.0082244873046875, 0.007190704345703125, 0.0264892578125, -0.00121307373046875, 0.004001617431640625, 0.048095703125, -0.029327392578125, -0.0008606910705566406, -0.033111572265625, -0.0253448486328125, 0.000934600830078125, 0.038177490234375, -0.0127716064453125, -0.0097198486328125, 0.0261993408203125, 0.025909423828125, -0.00720977783203125, -0.0034542083740234375, -0.0149993896484375, -0.019561767578125, -0.006168365478515625, -0.06689453125, 0.05120849609375, -0.03375244140625, 0.01654052734375, 0.0638427734375, -0.0024776458740234375, 0.01422882080078125, -0.006969451904296875, -0.00046563148498535156, -0.0220947265625, 0.028167724609375, -0.003093719482421875, -0.051483154296875, -0.01013946533203125, 0.0101470947265625, 0.02191162109375, 0.04644775390625, 0.01265716552734375, -0.0249176025390625, 0.0036163330078125, 0.0243682861328125, -0.1016845703125, -0.119384765625, 0.08740234375, -0.042266845703125, -0.0221710205078125, -0.029022216796875, -0.045318603515625, -0.02056884765625, -0.0196533203125, -0.0292205810546875, -0.00093841552734375, 0.0251007080078125, -0.078857421875, -0.0219879150390625, -0.08465576171875, -0.00710296630859375, -0.0206298828125, 0.0252838134765625, 0.0100555419921875, 0.05224609375, 0.0031795501708984375, -0.02215576171875, 0.00981903076171875, 0.04302978515625, -0.00579071044921875, -0.02294921875, -0.003902435302734375, -0.0158233642578125, 0.0240478515625, -0.02044677734375, 0.09228515625, 0.032257080078125, -0.039093017578125, 0.0084075927734375, 0.00324249267578125, 0.01263427734375, 0.040740966796875, -0.0164947509765625, -0.0280914306640625, 0.05328369140625, 0.038360595703125, -0.0071868896484375, -0.017913818359375, -0.0303802490234375, -0.0518798828125, -0.0283660888671875, 0.034149169921875, 0.0244598388671875, -0.0521240234375, 0.0162506103515625, 0.024871826171875, -0.0010957717895507812, 0.0214080810546875, -0.032745361328125, 0.046630859375, 0.0157928466796875, 0.045257568359375, -0.039947509765625, -0.028076171875, -0.048065185546875, 0.042144775390625, -0.0166015625, -0.01203155517578125, -0.00989532470703125, -0.01142120361328125, -0.0181884765625, -0.0259246826171875, 0.062286376953125, 0.0196990966796875, 0.05084228515625, -0.051483154296875, -0.05657958984375, -0.0386962890625, 0.09869384765625, 0.033294677734375, -0.046875, -0.015350341796875, 0.00864410400390625, -0.046142578125, -0.00726318359375, 0.015838623046875, 0.010528564453125, -0.07684326171875, -0.0005402565002441406, -0.01422882080078125, -0.045928955078125, 0.0020618438720703125, -0.031890869140625, -0.040771484375, -0.033660888671875, 0.035858154296875, -0.0017442703247070312, 0.038421630859375, -0.0029773712158203125, 0.03265380859375, 0.0127410888671875, -0.01123809814453125, -0.0147552490234375, -0.04022216796875, -0.033935546875, 0.035125732421875, 0.056396484375, -0.0014390945434570312, -0.012786865234375, 0.00432586669921875, 0.0640869140625, 0.0034160614013671875, 0.0259552001953125, 0.0164337158203125, 0.022857666015625, -0.004016876220703125, -0.0226593017578125, 0.016204833984375, -0.046142578125, -0.01319122314453125, -0.0197906494140625, -0.01137542724609375, -0.000530242919921875, -0.0316162109375, 0.007965087890625, -0.030670166015625, -0.01047515869140625, -0.04949951171875, 0.0071258544921875, -0.0028209686279296875, -0.0024394989013671875, -0.0192108154296875, -0.0237884521484375, 0.004734039306640625, -0.04229736328125, 0.0421142578125, 0.017303466796875, 0.00470733642578125, -0.0174407958984375, 0.08941650390625, 0.01146697998046875, -0.036163330078125, -0.007720947265625, -0.04058837890625, -0.01068878173828125, -0.0261688232421875, 0.037628173828125, -0.0207366943359375, 0.00936126708984375, 0.053253173828125, -0.04425048828125, 0.0158233642578125, -0.0169677734375, 0.044891357421875, -0.0284423828125, -0.0156707763671875, 0.01580810546875, -0.0322265625, 0.004146575927734375, 0.043243408203125, -0.0052032470703125, -0.04638671875, 0.00778961181640625, 0.05615234375, -0.029022216796875, 0.034881591796875, -0.033416748046875, -0.020599365234375, -0.01161956787109375, 0.0065460205078125, -0.00188446044921875, 0.005863189697265625, -0.007259368896484375, -0.00785064697265625, -0.0005750656127929688, 0.002498626708984375, 0.002017974853515625, 0.032745361328125, -0.0233001708984375, 0.01270294189453125, 0.0096282958984375, -0.03533935546875, -0.0155029296875, -0.0006422996520996094, 0.040283203125, -0.0305633544921875, -0.06463623046875, -0.001800537109375, -0.0247802734375, 0.054962158203125, 0.04388427734375, -0.014068603515625, 0.0391845703125, 0.035552978515625, -0.0496826171875, -0.02337646484375, 0.00952911376953125, -0.032318115234375, -0.061279296875, -0.00650787353515625, -0.00771331787109375, -0.00034880638122558594, -0.01073455810546875, 0.10968017578125, -0.04449462890625, 0.081787109375, -0.0232696533203125, 0.0341796875, 0.042572021484375, -0.0003752708435058594, 0.01354217529296875, 0.01629638671875, 0.00769805908203125, -0.0176544189453125, -0.004795074462890625, 0.004917144775390625, -0.017669677734375, -0.0067596435546875, -0.007808685302734375, -0.0008988380432128906, 0.02606201171875, 0.019989013671875, 0.0096435546875, -0.027099609375, 0.0222320556640625, 0.00785064697265625, -0.027587890625, -0.022064208984375, -0.01433563232421875, 0.006893157958984375, 0.01282501220703125, 0.004364013671875, 0.002330780029296875, -0.01088714599609375, 0.034454345703125, -0.036224365234375, 0.0291748046875, -0.0189208984375, -0.0211029052734375, -0.0233612060546875, -0.015106201171875, 0.017181396484375, -0.04229736328125, -0.0294952392578125, -0.015716552734375, -0.022216796875, 0.04827880859375, 0.0026950836181640625, 0.00878143310546875, -0.046661376953125, 0.017181396484375, -0.004730224609375, -0.0087738037109375, 0.0457763671875, -0.01325225830078125, 0.001800537109375, -0.02392578125, -0.04083251953125, -0.020477294921875, 0.0067291259765625, -0.00931549072265625, -0.00817108154296875, 0.00959014892578125, 0.0007424354553222656, 0.03912353515625, 0.0049285888671875, 0.0061187744140625, 0.00492095947265625, -0.01348876953125, -0.0299530029296875, 0.036346435546875, -0.013580322265625, 0.042510986328125, -0.0053253173828125, 0.028656005859375, 0.00792694091796875, 0.006092071533203125, -0.029998779296875, -0.00481414794921875, 0.00208282470703125, -0.0643310546875, -0.023681640625, -0.0007047653198242188, -0.0122833251953125, 0.019805908203125, 0.01503753662109375, -0.00823211669921875, 0.01047515869140625, -0.0426025390625, -0.01239776611328125, -0.0162811279296875, 0.040130615234375, -0.0460205078125, 0.0064849853515625, 0.01425933837890625, -0.02349853515625, -0.00971221923828125, -0.00769805908203125, 0.0012750625610351562, 0.00862884521484375, -0.0166015625, -0.0026378631591796875, 0.033477783203125, -0.03106689453125, 0.019073486328125, 0.0982666015625, 0.034698486328125, 0.034027099609375, 0.0130157470703125, 0.01255035400390625, 0.0026226043701171875, -0.0178070068359375, 0.049041748046875, 0.042816162109375, 0.0667724609375, -0.022979736328125, -0.00923919677734375, 0.0295562744140625, -0.040985107421875, -0.0083465576171875, 0.01222991943359375, 0.01568603515625, -0.059051513671875, 0.034332275390625, 0.02471923828125, 0.04736328125, 0.0247039794921875, 0.02337646484375, -0.01381683349609375, -0.01412200927734375, -0.01114654541015625, -0.00614166259765625, -0.024749755859375, -0.00200653076171875, 0.02630615234375, -0.01007080078125, -0.03363037109375, 0.00653076171875, -0.0150146484375, -0.0157928466796875, 0.0194854736328125, 0.02496337890625, -0.03033447265625, -0.0040130615234375, -0.01491546630859375, -0.0054168701171875, -0.048309326171875, -0.09576416015625, -0.0484619140625, -0.03460693359375, -0.034759521484375, -0.01129150390625, 0.0306549072265625, 0.04498291015625, 0.050689697265625, 0.01131439208984375, -0.0347900390625, 0.027374267578125, -0.00792694091796875, -0.057403564453125, -0.02880859375, 0.00801849365234375, 0.0256500244140625, 0.00039196014404296875, 0.0341796875, -0.01166534423828125, -0.036834716796875, -0.0010442733764648438, 0.0188140869140625, 0.04913330078125, -0.0219573974609375, -0.021392822265625, 0.035186767578125, -0.00888824462890625, -0.017242431640625, 0.037322998046875, 0.00384521484375, -0.0187225341796875, -0.0228271484375, 0.01511383056640625, -0.0484619140625, -0.0023174285888671875, 0.017822265625, -0.056854248046875, 0.04302978515625, 0.0022983551025390625, -0.0038814544677734375, 0.005069732666015625, 0.017669677734375, -0.0322265625, -0.01442718505859375, -0.0712890625, 0.060791015625, -0.01325225830078125, 0.047088623046875, -0.1090087890625, -0.012969970703125, -0.02679443359375, 0.0185089111328125, 0.04168701171875, 0.010498046875, -0.052734375, -0.005859375, 0.05035400390625, 0.0482177734375, 0.01514434814453125, 0.03729248046875, 0.02545166015625, 0.0826416015625, 0.09796142578125, -0.033660888671875, 0.045562744140625, 0.0201873779296875, -0.004608154296875, 0.041473388671875, 0.0014219284057617188, -0.01248931884765625, -0.0157470703125, 0.0185394287109375, -0.03302001953125, -0.0037212371826171875, 0.023162841796875, -0.002239227294921875, 0.03546142578125, 0.01062774658203125, 0.035186767578125, -0.02484130859375, -0.01617431640625, -0.00775909423828125, 0.0249481201171875, 0.010223388671875, 0.03179931640625, 0.045135498046875, 0.0267181396484375, 0.0496826171875, 0.0020503997802734375, 0.01280975341796875, 0.0079193115234375, 0.0006384849548339844, 0.07977294921875, 0.0283966064453125, 0.0017681121826171875, -0.03955078125, 0.06134033203125, 0.03546142578125, 0.0699462890625, -0.08221435546875, -0.01309967041015625, 0.0104522705078125, -0.0252838134765625, -0.006862640380859375, -0.0264892578125, -0.01430511474609375, 0.04254150390625, 0.022979736328125, -0.08026123046875, -0.0006260871887207031, 0.0286712646484375, 0.01873779296875, -0.0056304931640625, -0.01248931884765625, -0.016632080078125, -0.01922607421875, -0.057708740234375, 0.015899658203125, 0.019287109375, 0.060089111328125, 0.027496337890625, 0.029022216796875, -0.0019102096557617188, -0.0200653076171875, -0.00527191162109375, 0.0257415771484375, -0.0045318603515625, 0.0162353515625, -0.0263824462890625, -0.029022216796875, -0.01035308837890625, 0.03570556640625, 0.04327392578125, 0.00011962652206420898, 0.044830322265625, 0.048065185546875, -0.006237030029296875, 0.00441741943359375, 0.08251953125, 0.00649261474609375, -0.0274200439453125, -0.0318603515625, -0.00981903076171875, 0.00579071044921875, -0.004688262939453125, 0.0096435546875, 0.0219268798828125, 0.005252838134765625, 0.0286712646484375, 0.040740966796875, 0.01334381103515625, 0.0194091796875, 0.01476287841796875, -0.004711151123046875, 0.0080718994140625, 0.040374755859375, -0.05963134765625, -0.0029506683349609375, -0.0202178955078125, -0.043365478515625, -0.004638671875, 0.0165863037109375, -0.033782958984375, 0.044158935546875, -0.0190277099609375, -0.034576416015625, 0.0232696533203125, 0.0247650146484375, 0.0214385986328125, 0.0298004150390625, 0.0022335052490234375, 0.0030117034912109375, -0.05035400390625, -0.013824462890625, 0.01043701171875, -0.013214111328125, -0.018585205078125, 0.003681182861328125, 0.0298919677734375, -0.0089111328125, -0.0305023193359375, -0.0162506103515625, -0.0011816024780273438, -0.01442718505859375, 0.01044464111328125, 0.01050567626953125, -0.016021728515625, -0.01259613037109375, 0.051605224609375, 0.00540924072265625, 0.048858642578125, -0.045379638671875, -0.0312347412109375, -0.0002658367156982422, 0.01340484619140625, -0.0181427001953125, -0.0008206367492675781, -0.0391845703125, -0.00946044921875, -0.025177001953125, -0.0406494140625, 0.045501708984375, 0.028533935546875, 0.01171875, 0.0221710205078125, 0.02880859375, -0.021026611328125, 0.031585693359375, -0.0187225341796875, 0.079345703125, 0.036041259765625, -0.0244293212890625, 0.06024169921875, 0.01556396484375, -0.0178985595703125, 0.043548583984375, 0.0121002197265625, -0.0201873779296875, 0.01480865478515625, 0.0236053466796875, -0.0229034423828125, -0.01126861572265625, 0.03143310546875, 0.006610870361328125, -0.00800323486328125, -0.006694793701171875, -0.01212310791015625, -0.0292510986328125, -0.004276275634765625, -0.033782958984375, -0.04266357421875, -0.0083770751953125, -0.0053253173828125, -0.0155792236328125, -0.053863525390625, -0.019378662109375, -0.0008263587951660156, -0.001125335693359375, -0.006496429443359375, -0.02239990234375, 0.03460693359375, -0.01351165771484375, -0.0001558065414428711, -0.0428466796875, -0.01113128662109375, -0.004909515380859375, 0.041900634765625, -0.0210113525390625, -0.01419830322265625, -0.020111083984375, 0.00759124755859375, -0.01468658447265625, 0.041717529296875, 0.047698974609375, -0.043487548828125, -0.026611328125, 0.0618896484375, 0.04217529296875, 0.0726318359375, 0.0181121826171875, -0.0016813278198242188, 0.02197265625, 0.02490234375, -0.048736572265625, -0.10308837890625, 0.0172271728515625, -0.05596923828125, 0.00043582916259765625, 0.010009765625, 0.0214691162109375, 0.05792236328125, 0.00003409385681152344, -0.0679931640625, 0.06964111328125, -0.0283660888671875, -0.03692626953125, -0.02490234375, -0.031768798828125, 0.004718780517578125, 0.02886962890625, 0.0203704833984375, -0.039093017578125, -0.0703125, -0.00152587890625, 0.031494140625, -0.0293731689453125, 0.054351806640625, 0.032470703125, -0.09283447265625, 0.0010852813720703125, -0.0255126953125, 0.004573822021484375, -0.00390625, 0.0087738037109375, -0.017303466796875, 0.01666259765625, -0.049530029296875, -0.017120361328125, -0.0200042724609375, 0.00469970703125, -0.003269195556640625, -0.00803375244140625, -0.0294189453125, 0.00220489501953125, 0.04595947265625, 0.053741455078125, 0.016937255859375, -0.050750732421875, 0.030975341796875, -0.00675201416015625, 0.01123809814453125, -0.03271484375, 0.005870819091796875, -0.056610107421875, -0.050079345703125, 0.007503509521484375, -0.0009241104125976562, -0.012908935546875, -0.023712158203125, -0.01497650146484375, -0.0142974853515625, 0.00228118896484375, -0.01432037353515625, 0.01873779296875, -0.013153076171875, 0.0723876953125, -0.036041259765625, 0.0180511474609375, 0.007160186767578125, 0.017822265625, 0.0355224609375, 0.01806640625, 0.005916595458984375, 0.0188446044921875, -0.0032138824462890625, 0.0024204254150390625, 0.0266265869140625, -0.00449371337890625, 0.0268096923828125, -0.00888824462890625, -0.0213623046875, 0.0271759033203125, 0.021942138671875, 0.018829345703125, -0.02838134765625, 0.0235595703125, 0.0206756591796875, 0.0093994140625, 0.01042938232421875, 0.03765869140625, 0.00423431396484375, 0.03045654296875, -0.0018281936645507812, -0.0321044921875, 0.0274658203125, -0.05450439453125, -0.006927490234375, -0.01209259033203125, -0.051605224609375, -0.04437255859375, 0.0156707763671875, 0.07025146484375, -0.0272674560546875, 0.02813720703125 ]
551d3bd824a1069ed96f543056051d3a9a1fcb73
Wordpress Stackexchange Q: Overriding The Loop with filter or hook I'm trying to replace the $wp_query object for a specific category, without having to deal with creating a new template and creating a new WP_Query object there. My aim is to change the data available to The Loop from the default for that request to a custom query. add_filter( 'pre_get_posts', 'custom_wpquery' ); function custom_wpquery( $query ){ global $wp_query; if (is_category(121)) { if ($wp_query === $query) { $query = new WP_Query('page_id=146'); $query->set('page_id', 146); } } return $query; }; That doesn't seem to affect The Loop at all, what am I doing wrong? A: This seems to work, but I would be interested in hearing from others if it's the "correct" way to provide this sort of override. I'm assuming you're visiting a category archive page, like http://www.example.com/category/computers/. // landing page = 188 // category = "computers" (#8) function custom_wpquery( $query ){ // the main query global $wp_the_query; if ( 'computers' === $query->get( 'category_name' ) ) { if ( $wp_the_query === $query) { // reset and override the active query $query->init(); $query->query( 'page_id=188' ); } } }; add_filter( 'pre_get_posts', 'custom_wpquery' ); This should probably test $query->is_archive, as well.
Q: Overriding The Loop with filter or hook I'm trying to replace the $wp_query object for a specific category, without having to deal with creating a new template and creating a new WP_Query object there. My aim is to change the data available to The Loop from the default for that request to a custom query. add_filter( 'pre_get_posts', 'custom_wpquery' ); function custom_wpquery( $query ){ global $wp_query; if (is_category(121)) { if ($wp_query === $query) { $query = new WP_Query('page_id=146'); $query->set('page_id', 146); } } return $query; }; That doesn't seem to affect The Loop at all, what am I doing wrong? A: This seems to work, but I would be interested in hearing from others if it's the "correct" way to provide this sort of override. I'm assuming you're visiting a category archive page, like http://www.example.com/category/computers/. // landing page = 188 // category = "computers" (#8) function custom_wpquery( $query ){ // the main query global $wp_the_query; if ( 'computers' === $query->get( 'category_name' ) ) { if ( $wp_the_query === $query) { // reset and override the active query $query->init(); $query->query( 'page_id=188' ); } } }; add_filter( 'pre_get_posts', 'custom_wpquery' ); This should probably test $query->is_archive, as well.
wordpress
{ "language": "en", "length": 194, "provenance": "stackexchange_00019.jsonl.gz:413824", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/30999" }
[ 0.047027587890625, 0.033905029296875, -0.0191497802734375, -0.0197296142578125, 0.0533447265625, -0.047149658203125, 0.059417724609375, -0.0294342041015625, 0.02215576171875, -0.0100860595703125, -0.0286865234375, -0.0281829833984375, 0.01209259033203125, -0.042572021484375, 0.0223541259765625, -0.0232696533203125, 0.042510986328125, -0.042327880859375, 0.00856781005859375, -0.0164642333984375, 0.032623291015625, 0.004520416259765625, 0.00440216064453125, 0.039093017578125, 0.0157012939453125, -0.0286865234375, 0.037933349609375, -0.0176239013671875, 0.0113677978515625, -0.0017137527465820312, 0.002376556396484375, -0.00881195068359375, 0.0172576904296875, 0.0110626220703125, -0.0184326171875, 0.00696563720703125, 0.01384735107421875, 0.0028285980224609375, 0.01329803466796875, 0.0040435791015625, 0.036346435546875, -0.0279083251953125, -0.027984619140625, -0.00014269351959228516, -0.01690673828125, -0.01546478271484375, 0.0185546875, -0.03704833984375, 0.032470703125, -0.01038360595703125, -0.0001189112663269043, 0.0168914794921875, 0.004695892333984375, -0.031494140625, -0.012939453125, 0.0216827392578125, -0.0158538818359375, -0.0214996337890625, 0.0391845703125, -0.0238494873046875, -0.02545166015625, -0.049774169921875, 0.043731689453125, -0.00801849365234375, 0.0033893585205078125, -0.01336669921875, 0.03277587890625, 0.01806640625, -0.05267333984375, -0.0246124267578125, 0.037628173828125, -0.0021419525146484375, -0.005519866943359375, 0.007610321044921875, -0.04925537109375, -0.0303192138671875, 0.042083740234375, -0.01233673095703125, 0.0016345977783203125, -0.0014162063598632812, 0.01168060302734375, -0.026214599609375, -0.002689361572265625, 0.00855255126953125, 0.0006060600280761719, 0.032684326171875, -0.014251708984375, -0.019683837890625, -0.0029582977294921875, -0.0054168701171875, -0.005771636962890625, -0.030181884765625, -0.01132965087890625, -0.0087738037109375, 0.004497528076171875, -0.055572509765625, 0.0294189453125, 0.0293731689453125, 0.00821685791015625, 0.026885986328125, -0.0068511962890625, -0.0225982666015625, 0.019073486328125, -0.03106689453125, 0.0248870849609375, 0.024749755859375, 0.0027866363525390625, 0.0443115234375, 0.0740966796875, 0.0224456787109375, 0.0133819580078125, 0.0970458984375, -0.02142333984375, 0.00771331787109375, -0.0546875, 0.01398468017578125, -0.0290985107421875, -0.03326416015625, -0.0124359130859375, 0.0006985664367675781, 0.0330810546875, 0.03643798828125, 0.01192474365234375, -0.01036834716796875, 0.01056671142578125, 0.01079559326171875, -0.0174713134765625, -0.044708251953125, 0.0023136138916015625, 0.0174407958984375, -0.03094482421875, -0.007099151611328125, 0.060302734375, 0.0367431640625, 0.0240936279296875, -0.0201568603515625, 0.03521728515625, 0.004795074462890625, -0.000965118408203125, 0.017303466796875, 0.031005859375, -0.0196685791015625, -0.020843505859375, 0.01058197021484375, 0.026611328125, 0.0030612945556640625, 0.028167724609375, 0.0265350341796875, -0.012451171875, -0.01105499267578125, 0.027069091796875, 0.005512237548828125, 0.0269622802734375, -0.001789093017578125, -0.02703857421875, -0.00194549560546875, 0.017181396484375, -0.00627899169921875, -0.03253173828125, -0.0294647216796875, 0.0020503997802734375, 0.01404571533203125, 0.0267333984375, -0.046600341796875, -0.0198211669921875, -0.040557861328125, -0.042724609375, 0.0089569091796875, 0.0202484130859375, 0.0504150390625, 0.033843994140625, -0.012603759765625, 0.0189056396484375, 0.00007969141006469727, -0.0208587646484375, -0.0108795166015625, -0.017608642578125, -0.00400543212890625, 0.033447265625, 0.005279541015625, -0.04205322265625, -0.047149658203125, 0.0113067626953125, -0.01212310791015625, -0.0537109375, 0.037506103515625, 0.0087432861328125, 0.0247802734375, -0.0282440185546875, 0.007808685302734375, 0.07623291015625, 0.0540771484375, -0.065673828125, 0.032257080078125, -0.01401519775390625, -0.033233642578125, 0.04278564453125, -0.007343292236328125, 0.01462554931640625, 0.006031036376953125, -0.0027904510498046875, 0.01070404052734375, -0.017333984375, 0.01035308837890625, -0.093017578125, 0.0309295654296875, -0.0360107421875, 0.046722412109375, 0.01824951171875, 0.019805908203125, 0.004985809326171875, -0.0019159317016601562, -0.028106689453125, 0.0092010498046875, -0.028717041015625, 0.0020503997802734375, 0.0013551712036132812, 0.026092529296875, -0.00921630859375, 0.00626373291015625, -0.006847381591796875, -0.01508331298828125, -0.00789642333984375, 0.0273284912109375, 0.06622314453125, -0.0236053466796875, -0.00865936279296875, -0.038787841796875, 0.033355712890625, 0.004207611083984375, -0.06048583984375, 0.049072265625, 0.1024169921875, 0.08038330078125, -0.04168701171875, -0.0045013427734375, -0.00244140625, -0.032623291015625, -0.0160369873046875, 0.053497314453125, 0.0394287109375, 0.01471710205078125, -0.01355743408203125, -0.021026611328125, 0.023406982421875, -0.051513671875, 0.003936767578125, -0.0131072998046875, -0.011077880859375, 0.0206298828125, 0.0001055598258972168, -0.00060272216796875, 0.015655517578125, 0.0357666015625, 0.0274200439453125, 0.01153564453125, 0.043212890625, 0.0144195556640625, 0.00954437255859375, 0.007030487060546875, 0.0008382797241210938, 0.0183868408203125, -0.051055908203125, 0.033966064453125, 0.05499267578125, -0.005352020263671875, 0.03399658203125, 0.0222320556640625, -0.00585174560546875, -0.004909515380859375, 0.003940582275390625, -0.048431396484375, -0.008544921875, -0.00641632080078125, -0.037384033203125, 0.02410888671875, -0.06317138671875, 0.038238525390625, 0.0159149169921875, -0.0107879638671875, 0.0172882080078125, 0.07916259765625, -0.01461029052734375, -0.017730712890625, -0.030242919921875, -0.037261962890625, -0.0184478759765625, 0.0172119140625, -0.0146026611328125, 0.0087738037109375, 0.031890869140625, 0.01306915283203125, -0.041046142578125, 0.037139892578125, -0.04388427734375, -0.01476287841796875, 0.03662109375, -0.04315185546875, 0.04486083984375, -0.03857421875, 0.03350830078125, 0.0687255859375, -0.011444091796875, 0.0258331298828125, -0.0243988037109375, 0.008270263671875, -0.005275726318359375, 0.0167694091796875, -0.01239776611328125, -0.03045654296875, -0.03167724609375, -0.006725311279296875, 0.043182373046875, 0.03668212890625, 0.02557373046875, -0.0187225341796875, 0.0226898193359375, 0.034637451171875, -0.0760498046875, -0.1375732421875, 0.05279541015625, -0.036285400390625, 0.0216827392578125, -0.01531982421875, -0.01470184326171875, -0.0165252685546875, -0.010223388671875, 0.0003066062927246094, 0.022979736328125, -0.0215911865234375, -0.069580078125, -0.06915283203125, -0.08135986328125, -0.03387451171875, 0.007122039794921875, 0.011810302734375, 0.01157379150390625, 0.07244873046875, 0.02587890625, -0.0457763671875, 0.015899658203125, 0.0391845703125, -0.0172576904296875, 0.01020050048828125, 0.017608642578125, -0.04144287109375, -0.00888824462890625, 0.0058746337890625, 0.013458251953125, 0.025543212890625, -0.01557159423828125, 0.0014448165893554688, 0.006587982177734375, 0.03277587890625, 0.01215362548828125, -0.007701873779296875, 0.00403594970703125, 0.025299072265625, 0.0080108642578125, -0.023651123046875, -0.040435791015625, -0.0173187255859375, -0.033966064453125, 0.0340576171875, 0.00677490234375, 0.01611328125, 0.0024967193603515625, 0.045623779296875, 0.028961181640625, -0.0230865478515625, 0.01439666748046875, -0.046783447265625, 0.0177459716796875, 0.0296783447265625, 0.06585693359375, -0.0005855560302734375, 0.029022216796875, -0.039703369140625, 0.005161285400390625, 0.01220703125, -0.0303802490234375, 0.0197906494140625, -0.0699462890625, 0.01203155517578125, -0.0423583984375, 0.0377197265625, -0.0285186767578125, 0.00469970703125, -0.032867431640625, -0.017333984375, -0.0030727386474609375, 0.0855712890625, -0.040283203125, -0.0161590576171875, -0.0179443359375, -0.0025463104248046875, 0.006954193115234375, -0.016510009765625, -0.02069091796875, -0.023956298828125, -0.0897216796875, -0.00042891502380371094, -0.035797119140625, -0.033721923828125, -0.0201568603515625, 0.0025272369384765625, -0.059173583984375, -0.043243408203125, 0.0413818359375, -0.027252197265625, -0.0102386474609375, -0.01023101806640625, -0.029510498046875, -0.021484375, -0.01385498046875, -0.0255279541015625, -0.12420654296875, -0.005908966064453125, -0.0013990402221679688, 0.0718994140625, -0.0089874267578125, -0.0037212371826171875, -0.0361328125, 0.039581298828125, 0.0221405029296875, 0.015869140625, 0.03131103515625, 0.0089874267578125, 0.008056640625, -0.023406982421875, 0.01727294921875, -0.044769287109375, 0.003765106201171875, -0.0112762451171875, -0.012420654296875, -0.0007257461547851562, -0.0491943359375, -0.024688720703125, -0.040740966796875, -0.017974853515625, -0.062286376953125, -0.04840087890625, -0.039581298828125, -0.005645751953125, -0.03228759765625, -0.00220489501953125, -0.03900146484375, -0.053955078125, 0.0292816162109375, 0.0009555816650390625, -0.0220184326171875, 0.007350921630859375, 0.0364990234375, 0.0220947265625, -0.0264739990234375, -0.01511383056640625, -0.0095367431640625, 0.01036834716796875, -0.0199127197265625, 0.02996826171875, -0.00673675537109375, -0.002712249755859375, 0.04034423828125, -0.0296173095703125, -0.00804901123046875, -0.027801513671875, 0.06890869140625, 0.01309967041015625, -0.00888824462890625, 0.0225067138671875, -0.00457763671875, 0.00882720947265625, 0.0169677734375, -0.01036834716796875, -0.02362060546875, 0.00847625732421875, 0.03497314453125, -0.01377105712890625, 0.013214111328125, -0.0362548828125, -0.0031642913818359375, 0.00960540771484375, 0.049896240234375, 0.0299530029296875, 0.0166778564453125, -0.0132904052734375, -0.011138916015625, -0.018524169921875, 0.00756072998046875, -0.0202178955078125, 0.0430908203125, -0.0635986328125, 0.03887939453125, -0.0176544189453125, -0.0231170654296875, -0.03948974609375, 0.00911712646484375, -0.004276275634765625, -0.0282440185546875, -0.049530029296875, 0.00650787353515625, -0.003108978271484375, -0.009735107421875, 0.036468505859375, -0.027435302734375, 0.0009317398071289062, -0.0018854141235351562, -0.033905029296875, 0.0116424560546875, -0.00612640380859375, -0.0291900634765625, -0.03826904296875, 0.003879547119140625, 0.03033447265625, -0.01308441162109375, -0.00978851318359375, 0.0189666748046875, 0.0302734375, -0.015869140625, -0.01354217529296875, 0.0258331298828125, 0.0209197998046875, 0.01271820068359375, 0.007778167724609375, 0.0207977294921875, -0.007568359375, 0.0166168212890625, 0.012451171875, -0.0240020751953125, -0.0287322998046875, 0.041351318359375, 0.0565185546875, -0.0019702911376953125, 0.0008563995361328125, -0.0190582275390625, -0.01947021484375, -0.016448974609375, 0.02667236328125, 0.00945281982421875, -0.00785064697265625, -0.036895751953125, -0.0400390625, 0.02203369140625, -0.0013265609741210938, -0.0008387565612792969, -0.015960693359375, -0.0141143798828125, 0.0272369384765625, -0.0195465087890625, 0.02099609375, -0.002880096435546875, -0.01450347900390625, -0.01071929931640625, -0.01070404052734375, -0.0032405853271484375, 0.005950927734375, -0.0087432861328125, -0.0196685791015625, -0.021942138671875, 0.023681640625, -0.0301513671875, 0.035186767578125, -0.0195159912109375, -0.0207366943359375, -0.018798828125, 0.006649017333984375, 0.0789794921875, 0.05859375, -0.051483154296875, -0.01015472412109375, -0.06414794921875, -0.0300445556640625, -0.0198211669921875, -0.0224609375, -0.04150390625, 0.01568603515625, -0.01312255859375, 0.029998779296875, -0.0117034912109375, -0.018035888671875, -0.051025390625, 0.00836944580078125, 0.0391845703125, 0.04736328125, -0.033111572265625, 0.04119873046875, 0.0294189453125, 0.0273590087890625, 0.004913330078125, 0.002994537353515625, -0.0115203857421875, -0.004482269287109375, -0.031646728515625, -0.07330322265625, -0.0045318603515625, 0.040374755859375, -0.0477294921875, 0.05255126953125, 0.0445556640625, 0.006195068359375, 0.039703369140625, -0.021575927734375, -0.0084075927734375, -0.01287078857421875, 0.01299285888671875, -0.040069580078125, 0.039337158203125, 0.0113525390625, 0.0159149169921875, 0.022369384765625, -0.0263214111328125, -0.010009765625, 0.007129669189453125, 0.0012769699096679688, 0.01485443115234375, -0.02227783203125, -0.0833740234375, 0.07135009765625, 0.04803466796875, -0.01233673095703125, 0.019439697265625, -0.040924072265625, -0.008514404296875, 0.0254364013671875, -0.0219573974609375, 0.026397705078125, 0.0113525390625, 0.041778564453125, -0.00910186767578125, 0.01263427734375, 0.04852294921875, -0.0223846435546875, -0.0299072265625, 0.03662109375, 0.033966064453125, -0.0562744140625, -0.00823974609375, 0.0226593017578125, 0.032196044921875, -0.015625, 0.021240234375, -0.00357818603515625, 0.03814697265625, 0.01904296875, -0.00696563720703125, -0.0189666748046875, 0.0226287841796875, 0.0300445556640625, -0.01422882080078125, -0.01727294921875, 0.013671875, -0.005157470703125, -0.006694793701171875, -0.0107421875, 0.0003561973571777344, -0.015045166015625, 0.0133056640625, 0.0191192626953125, 0.004238128662109375, -0.02459716796875, -0.07025146484375, -0.005218505859375, 0.00749969482421875, -0.045166015625, 0.01082611083984375, 0.0056610107421875, 0.006237030029296875, 0.0232086181640625, 0.001739501953125, 0.000025212764739990234, -0.01372528076171875, -0.04742431640625, -0.0291748046875, -0.0191650390625, 0.02398681640625, 0.037078857421875, -0.033538818359375, 0.01605224609375, -0.017547607421875, -0.01172637939453125, -0.0163726806640625, -0.02947998046875, 0.06829833984375, -0.058380126953125, -0.0029125213623046875, 0.024993896484375, -0.0110626220703125, -0.01507568359375, 0.0165863037109375, 0.00930023193359375, -0.06610107421875, -0.05615234375, 0.012542724609375, -0.08013916015625, -0.033447265625, 0.00119781494140625, -0.01898193359375, 0.0244140625, -0.02105712890625, 0.0192413330078125, 0.035400390625, -0.0021839141845703125, -0.005321502685546875, 0.000053822994232177734, -0.07464599609375, 0.0231170654296875, 0.035888671875, 0.07794189453125, -0.032684326171875, -0.0207061767578125, 0.025390625, 0.022003173828125, 0.062103271484375, 0.004985809326171875, -0.034088134765625, -0.02398681640625, 0.01043701171875, 0.039337158203125, -0.0123138427734375, 0.027587890625, -0.00719451904296875, 0.03216552734375, 0.040771484375, -0.04925537109375, 0.0105133056640625, -0.001201629638671875, -0.014373779296875, 0.0160980224609375, 0.0245208740234375, 0.03485107421875, -0.02655029296875, 0.0167694091796875, -0.041259765625, -0.0175933837890625, 0.0341796875, -0.020751953125, 0.004039764404296875, 0.043365478515625, 0.0185394287109375, -0.036834716796875, -0.0184783935546875, -0.017059326171875, 0.035186767578125, -0.0179595947265625, 0.007045745849609375, 0.04730224609375, 0.0034465789794921875, 0.07733154296875, 0.0005388259887695312, 0.0018291473388671875, 0.0133514404296875, 0.01568603515625, 0.0716552734375, 0.04022216796875, 0.042694091796875, 0.004062652587890625, 0.044525146484375, 0.0141143798828125, 0.05560302734375, -0.053131103515625, -0.05340576171875, 0.00685882568359375, 0.004787445068359375, 0.02093505859375, 0.011077880859375, 0.0162353515625, -0.002155303955078125, 0.043182373046875, -0.0300140380859375, 0.0104827880859375, 0.01251983642578125, -0.025115966796875, -0.0120391845703125, -0.00762176513671875, 0.0223846435546875, 0.0261077880859375, -0.01910400390625, -0.0111541748046875, 0.0201263427734375, 0.06561279296875, -0.007015228271484375, 0.05035400390625, -0.051544189453125, -0.0288543701171875, -0.0447998046875, 0.039642333984375, -0.01727294921875, 0.06402587890625, -0.06365966796875, -0.0206298828125, -0.01030731201171875, 0.058868408203125, 0.043426513671875, 0.00490570068359375, 0.043548583984375, 0.004276275634765625, -0.017669677734375, 0.02276611328125, 0.05865478515625, -0.0157318115234375, 0.01517486572265625, -0.033294677734375, 0.015350341796875, 0.00859832763671875, -0.00087738037109375, -0.034393310546875, 0.01314544677734375, 0.03167724609375, 0.006992340087890625, 0.0263214111328125, 0.0068817138671875, -0.039215087890625, 0.02508544921875, -0.003749847412109375, 0.10888671875, 0.03973388671875, -0.0858154296875, -0.0341796875, -0.0218658447265625, -0.051177978515625, 0.04541015625, 0.051513671875, 0.006862640380859375, -0.0232086181640625, 0.040313720703125, -0.04583740234375, 0.0307159423828125, 0.034820556640625, -0.0301055908203125, 0.0013866424560546875, 0.0283355712890625, -0.0206298828125, -0.033660888671875, -0.0048828125, 0.00351715087890625, -0.0018815994262695312, 0.0132904052734375, 0.01013946533203125, 0.038116455078125, -0.002391815185546875, 0.0251922607421875, 0.01227569580078125, -0.0240325927734375, 0.00799560546875, 0.03424072265625, -0.055145263671875, -0.0136871337890625, 0.00008594989776611328, 0.00010657310485839844, -0.019378662109375, 0.0394287109375, -0.0460205078125, 0.00823974609375, -0.051116943359375, 0.0218505859375, -0.044158935546875, 0.034332275390625, -0.0257110595703125, 0.0071258544921875, -0.023590087890625, -0.03948974609375, 0.051055908203125, 0.005413055419921875, -0.01605224609375, 0.0167694091796875, -0.00865936279296875, 0.0237579345703125, 0.00989532470703125, 0.0201873779296875, 0.023834228515625, 0.037811279296875, -0.07501220703125, 0.0266876220703125, -0.031707763671875, -0.028045654296875, -0.004085540771484375, 0.0206146240234375, -0.04193115234375, 0.002960205078125, 0.03204345703125, -0.0310211181640625, -0.00576019287109375, 0.0249176025390625, -0.0167236328125, 0.0123748779296875, -0.01380157470703125, -0.0105743408203125, -0.00720977783203125, 0.00937652587890625, -0.042816162109375, -0.006473541259765625, -0.010345458984375, 0.0036487579345703125, 0.006938934326171875, -0.0452880859375, -0.0577392578125, -0.01213836669921875, 0.04376220703125, 0.004703521728515625, -0.073974609375, 0.038818359375, -0.0552978515625, 0.041595458984375, -0.0166015625, -0.0362548828125, -0.0171966552734375, -0.037322998046875, -0.035125732421875, 0.00021457672119140625, -0.06378173828125, -0.0066680908203125, -0.026214599609375, -0.0117645263671875, 0.0284881591796875, -0.015350341796875, -0.07373046875, 0.007617950439453125, -0.00397491455078125, 0.042022705078125, -0.00115966796875, 0.0038700103759765625, 0.04095458984375, 0.00023221969604492188, -0.033172607421875, -0.05792236328125, 0.005008697509765625, -0.0233612060546875, 0.0107269287109375, 0.0477294921875, -0.037841796875, -0.0046539306640625, -0.025634765625, -0.035614013671875, -0.041412353515625, 0.04248046875, -0.035125732421875, -0.0418701171875, 0.0082855224609375, -0.00815582275390625, 0.01502227783203125, -0.0012569427490234375, -0.02459716796875, -0.0182037353515625, 0.00841522216796875, 0.03631591796875, -0.0034618377685546875, 0.0350341796875, 0.0234527587890625, -0.1080322265625, -0.00749969482421875, -0.041534423828125, 0.0528564453125, -0.001873016357421875, -0.0005106925964355469, 0.00958251953125, 0.01033782958984375, -0.02154541015625, 0.015380859375, 0.005443572998046875, -0.02142333984375, -0.002567291259765625, -0.025146484375, -0.048828125, -0.019012451171875, 0.053680419921875, 0.045196533203125, 0.02606201171875, -0.0146636962890625, -0.04522705078125, -0.00603485107421875, -0.0011653900146484375, -0.00588226318359375, 0.026580810546875, -0.0650634765625, 0.00650787353515625, 0.0097808837890625, -0.02923583984375, 0.0027332305908203125, -0.0180206298828125, -0.048736572265625, 0.005123138427734375, -0.017608642578125, -0.005962371826171875, -0.024932861328125, 0.004772186279296875, 0.0019779205322265625, -0.0303955078125, -0.057830810546875, -0.0023975372314453125, -0.0005922317504882812, -0.04815673828125, -0.0173492431640625, -0.0103302001953125, 0.0174560546875, -0.0126190185546875, -0.0310821533203125, 0.027313232421875, -0.05096435546875, 0.044952392578125, 0.0072021484375, -0.0189208984375, 0.01091766357421875, 0.004558563232421875, -0.0057220458984375, -0.0234832763671875, 0.051910400390625, 0.01556396484375, 0.054931640625, -0.0062255859375, 0.04180908203125, 0.0083465576171875, 0.0269775390625, 0.026031494140625, -0.01605224609375, 0.055328369140625, -0.050567626953125, -0.0164947509765625, 0.004047393798828125, -0.06640625, -0.0401611328125, 0.0016393661499023438, -0.041229248046875, -0.0260009765625, 0.01326751708984375 ]
2fbad49e5f6606a5713ac4e5f0ab76700e4ed355
Wordpress Stackexchange Q: Can I create my own "Recent Posts" widget or customize the existing one? I'd like to enable the Recent posts widget with the ability to show a "View All" link when there are more posts than I've currently got the widget set to show. I'd also like to be able to exclude certain categories or posts from it. Is it possible to do either via my theme's functions.php? (1) Customize the existing widget or (2) Create a copy of it that I can customize? A: It's usually best to copy the existing one, name it something unique, and then add your own functionality. Copy the WP_Widget_Recent_Posts class from wp-includes/class-wp-widget-recent-posts.php into your functions.php (or, preferably, another file in your theme devoted just to widgets) and rename to something else, like My_Widget_Recent_Posts Add your functionality in there. Don't forget to call register_widget('My_Widget_Recent_Posts') as part of the init phase as well.
Q: Can I create my own "Recent Posts" widget or customize the existing one? I'd like to enable the Recent posts widget with the ability to show a "View All" link when there are more posts than I've currently got the widget set to show. I'd also like to be able to exclude certain categories or posts from it. Is it possible to do either via my theme's functions.php? (1) Customize the existing widget or (2) Create a copy of it that I can customize? A: It's usually best to copy the existing one, name it something unique, and then add your own functionality. Copy the WP_Widget_Recent_Posts class from wp-includes/class-wp-widget-recent-posts.php into your functions.php (or, preferably, another file in your theme devoted just to widgets) and rename to something else, like My_Widget_Recent_Posts Add your functionality in there. Don't forget to call register_widget('My_Widget_Recent_Posts') as part of the init phase as well.
wordpress
{ "language": "en", "length": 149, "provenance": "stackexchange_00019.jsonl.gz:413833", "question_score": "14", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31031" }
[ 0.0972900390625, -0.0543212890625, 0.04595947265625, -0.046234130859375, -0.00693511962890625, -0.0225677490234375, 0.055572509765625, -0.00263214111328125, 0.000553131103515625, 0.028900146484375, 0.016998291015625, -0.00926971435546875, -0.032745361328125, -0.033172607421875, -0.02325439453125, -0.027984619140625, 0.06768798828125, -0.02069091796875, 0.064453125, 0.003635406494140625, -0.005817413330078125, 0.0302886962890625, 0.08343505859375, 0.09429931640625, -0.02423095703125, 0.017242431640625, 0.0709228515625, -0.006595611572265625, -0.01605224609375, -0.019073486328125, 0.0256500244140625, -0.005313873291015625, 0.01074981689453125, 0.01239776611328125, -0.0225677490234375, 0.00927734375, -0.004024505615234375, 0.005401611328125, 0.002613067626953125, 0.010498046875, 0.002384185791015625, -0.009796142578125, -0.007568359375, 0.00894927978515625, -0.042327880859375, -0.01010894775390625, 0.01552581787109375, 0.0089569091796875, 0.022491455078125, 0.01442718505859375, 0.006717681884765625, -0.015167236328125, 0.018646240234375, -0.05535888671875, -0.016387939453125, -0.043426513671875, -0.0026760101318359375, -0.0147552490234375, 0.0736083984375, -0.01995849609375, -0.041656494140625, -0.06329345703125, 0.032135009765625, -0.0254058837890625, -0.01303863525390625, -0.0104217529296875, 0.0296630859375, 0.017181396484375, -0.044097900390625, -0.0285186767578125, 0.0250244140625, -0.0241546630859375, 0.01160430908203125, -0.028656005859375, -0.01373291015625, -0.0283050537109375, -0.0003025531768798828, -0.052276611328125, 0.0168609619140625, -0.01396942138671875, -0.002330780029296875, 0.01317596435546875, 0.006195068359375, -0.0289306640625, -0.014434814453125, -0.024688720703125, -0.02166748046875, -0.0010366439819335938, 0.01291656494140625, -0.0207977294921875, 0.0004665851593017578, -0.053741455078125, -0.037078857421875, 0.0625, 0.026702880859375, -0.0224761962890625, 0.029510498046875, 0.03643798828125, 0.004688262939453125, 0.0191192626953125, -0.005565643310546875, -0.04107666015625, 0.03668212890625, -0.034515380859375, 0.0181121826171875, 0.0275726318359375, -0.025238037109375, 0.016632080078125, 0.05462646484375, 0.035858154296875, 0.0265960693359375, -0.0017976760864257812, 0.00357818603515625, -0.010833740234375, -0.034912109375, 0.0010528564453125, -0.0247955322265625, 0.0018529891967773438, 0.01088714599609375, 0.0173797607421875, -0.0027790069580078125, 0.0101318359375, 0.042510986328125, 0.0177154541015625, 0.004001617431640625, 0.0189056396484375, -0.031494140625, -0.050811767578125, 0.057861328125, -0.0003752708435058594, -0.057769775390625, -0.003421783447265625, 0.07061767578125, 0.037139892578125, 0.041229248046875, -0.02020263671875, 0.041412353515625, -0.0190582275390625, 0.004985809326171875, 0.0128631591796875, -0.002593994140625, -0.03717041015625, -0.00873565673828125, -0.01413726806640625, 0.0333251953125, 0.0221405029296875, -0.009979248046875, -0.007030487060546875, 0.04217529296875, 0.0111236572265625, -0.0206451416015625, -0.034637451171875, 0.01067352294921875, 0.007049560546875, 0.04241943359375, -0.02239990234375, 0.0294189453125, -0.0167236328125, 0.0194854736328125, -0.0198516845703125, 0.053558349609375, -0.012420654296875, -0.048065185546875, -0.0161285400390625, -0.056488037109375, -0.0026035308837890625, -0.0146942138671875, -0.002277374267578125, 0.0287628173828125, 0.05450439453125, 0.004119873046875, -0.03997802734375, 0.048675537109375, 0.0330810546875, -0.006725311279296875, 0.03607177734375, -0.032196044921875, -0.0010662078857421875, 0.0290374755859375, 0.02459716796875, -0.005863189697265625, -0.03717041015625, 0.01404571533203125, 0.01044464111328125, -0.031341552734375, 0.003993988037109375, 0.02789306640625, 0.049041748046875, -0.00762939453125, 0.0447998046875, 0.018585205078125, 0.0038089752197265625, -0.0291900634765625, -0.01004791259765625, -0.010223388671875, -0.01471710205078125, -0.0164947509765625, -0.01349639892578125, -0.00910186767578125, 0.0261688232421875, 0.0229034423828125, -0.0011425018310546875, 0.005523681640625, 0.0150604248046875, -0.053070068359375, 0.02789306640625, -0.039215087890625, 0.046783447265625, -0.004238128662109375, -0.01800537109375, 0.0262451171875, -0.01226806640625, -0.0241546630859375, 0.00789642333984375, -0.041748046875, -0.00021886825561523438, -0.01885986328125, 0.052978515625, 0.00482940673828125, 0.0003190040588378906, 0.0143585205078125, -0.029510498046875, 0.0181884765625, 0.0225677490234375, 0.04931640625, -0.0245361328125, -0.021728515625, -0.04669189453125, -0.0277252197265625, 0.011810302734375, -0.08404541015625, 0.054718017578125, -0.0136871337890625, -0.0203857421875, -0.03961181640625, -0.019866943359375, -0.017120361328125, -0.030426025390625, 0.013671875, 0.05743408203125, 0.0302886962890625, 0.0110626220703125, 0.002437591552734375, 0.0195770263671875, 0.0011081695556640625, -0.06353759765625, 0.01190185546875, -0.00025963783264160156, 0.02117919921875, 0.045654296875, -0.004680633544921875, -0.00775909423828125, 0.0221710205078125, -0.028472900390625, 0.0211029052734375, 0.03045654296875, -0.01873779296875, 0.01617431640625, -0.0173187255859375, -0.0017528533935546875, -0.017181396484375, 0.006473541259765625, 0.0159454345703125, -0.0115966796875, 0.043853759765625, 0.00771331787109375, 0.0478515625, 0.03582763671875, -0.00775146484375, 0.0005369186401367188, -0.01062774658203125, -0.0330810546875, 0.015045166015625, 0.00528717041015625, 0.01195526123046875, -0.01132965087890625, -0.030853271484375, -0.0146331787109375, 0.045013427734375, -0.0050506591796875, -0.0190277099609375, 0.016143798828125, -0.0347900390625, -0.010284423828125, -0.006015777587890625, -0.09552001953125, 0.0009379386901855469, 0.00982666015625, 0.01186370849609375, -0.00951385498046875, 0.012847900390625, -0.0015172958374023438, -0.04290771484375, 0.049102783203125, 0.0280914306640625, -0.0355224609375, 0.00972747802734375, -0.037872314453125, 0.04852294921875, -0.035614013671875, 0.049285888671875, 0.06610107421875, -0.00762939453125, 0.0391845703125, -0.009429931640625, 0.042083740234375, 0.021026611328125, -0.0210723876953125, -0.0247802734375, -0.017730712890625, -0.047210693359375, -0.037139892578125, 0.020965576171875, 0.07080078125, -0.00942230224609375, -0.03509521484375, 0.01296234130859375, 0.0364990234375, -0.020904541015625, -0.020294189453125, -0.0022602081298828125, -0.039276123046875, -0.0235137939453125, 0.0131683349609375, -0.03643798828125, 0.0032939910888671875, 0.039276123046875, 0.01373291015625, -0.031585693359375, -0.01168060302734375, -0.0262908935546875, -0.0216064453125, -0.01367950439453125, 0.04229736328125, -0.0012149810791015625, -0.00006461143493652344, -0.00345611572265625, 0.07354736328125, -0.00945281982421875, -0.04742431640625, -0.036346435546875, 0.0017566680908203125, 0.00270843505859375, -0.009613037109375, 0.0247802734375, 0.013519287109375, -0.0304412841796875, 0.0248870849609375, 0.0316162109375, 0.0166778564453125, -0.047943115234375, -0.021331787109375, -0.016357421875, 0.027862548828125, -0.0117950439453125, 0.034271240234375, 0.033203125, 0.0131378173828125, -0.0007457733154296875, -0.016357421875, 0.005275726318359375, -0.00540924072265625, -0.020660400390625, -0.00441741943359375, -0.0240325927734375, -0.00914764404296875, -0.00096893310546875, 0.01012420654296875, -0.0029430389404296875, -0.0273895263671875, 0.0269622802734375, -0.0498046875, 0.0633544921875, 0.0110015869140625, 0.013275146484375, -0.0111541748046875, -0.03729248046875, -0.037994384765625, 0.07952880859375, -0.01763916015625, 0.021209716796875, -0.01265716552734375, 0.06256103515625, -0.039581298828125, -0.031982421875, 0.02655029296875, -0.0352783203125, 0.004856109619140625, 0.0042724609375, -0.00174713134765625, 0.045318603515625, 0.0755615234375, -0.0775146484375, -0.0170440673828125, -0.0095062255859375, 0.0233154296875, -0.021087646484375, -0.0506591796875, -0.033447265625, -0.0181121826171875, -0.09417724609375, 0.016937255859375, -0.007183074951171875, -0.0193023681640625, -0.036102294921875, 0.021697998046875, -0.0509033203125, -0.0294189453125, 0.040771484375, -0.00688934326171875, -0.007152557373046875, 0.027099609375, -0.00856781005859375, -0.00021064281463623047, -0.03558349609375, 0.0026092529296875, -0.06549072265625, 0.0137939453125, -0.06756591796875, 0.0222015380859375, 0.02423095703125, 0.004428863525390625, -0.0263824462890625, 0.01236724853515625, 0.0136260986328125, -0.026519775390625, 0.034881591796875, -0.00305938720703125, 0.0210723876953125, 0.029571533203125, 0.016082763671875, -0.0169525146484375, 0.0196685791015625, -0.01934814453125, -0.0457763671875, 0.0040435791015625, -0.0650634765625, -0.0054473876953125, -0.031585693359375, -0.03094482421875, -0.043060302734375, -0.035491943359375, -0.043365478515625, 0.02203369140625, -0.046142578125, 0.0240478515625, -0.0291900634765625, -0.06689453125, 0.017974853515625, 0.0015850067138671875, -0.037384033203125, 0.004962921142578125, 0.0767822265625, 0.019989013671875, -0.027862548828125, -0.054718017578125, -0.01031494140625, 0.047210693359375, 0.00811004638671875, -0.001415252685546875, 0.03448486328125, -0.0306243896484375, 0.00791168212890625, 0.0301666259765625, -0.031524658203125, 0.0278472900390625, 0.025909423828125, 0.029449462890625, 0.00682830810546875, -0.03399658203125, 0.01788330078125, 0.0134429931640625, 0.032470703125, -0.0155487060546875, -0.018341064453125, 0.0104522705078125, 0.054473876953125, -0.0239105224609375, -0.005100250244140625, -0.034759521484375, 0.00493621826171875, -0.0023975372314453125, 0.0015115737915039062, 0.00347137451171875, 0.0232086181640625, 0.00353240966796875, -0.0254058837890625, -0.02642822265625, -0.005374908447265625, 0.0071868896484375, 0.01166534423828125, -0.0237579345703125, 0.006870269775390625, 0.018463134765625, -0.032958984375, 0.0157623291015625, -0.004062652587890625, 0.0266265869140625, -0.0028629302978515625, -0.0430908203125, 0.01085662841796875, 0.005023956298828125, 0.034423828125, 0.0226287841796875, -0.021270751953125, 0.0386962890625, 0.056243896484375, -0.022918701171875, -0.0214080810546875, -0.0264892578125, 0.0187835693359375, -0.0545654296875, -0.0628662109375, 0.01102447509765625, -0.015838623046875, 0.029083251953125, 0.0341796875, 0.0457763671875, 0.037322998046875, -0.047027587890625, 0.0531005859375, 0.0150299072265625, 0.0159759521484375, -0.0042724609375, 0.02911376953125, 0.018768310546875, -0.036865234375, -0.01178741455078125, -0.0192413330078125, -0.0182037353515625, -0.007030487060546875, 0.0097808837890625, -0.01971435546875, -0.0018749237060546875, 0.040496826171875, 0.013641357421875, -0.035400390625, 0.0633544921875, 0.059722900390625, -0.039520263671875, -0.0127410888671875, 0.0176544189453125, 0.004276275634765625, 0.0131072998046875, -0.0143585205078125, 0.01480865478515625, -0.039642333984375, 0.0233917236328125, 0.005054473876953125, 0.033721923828125, -0.03228759765625, -0.048736572265625, -0.0178070068359375, -0.03814697265625, 0.024993896484375, -0.0577392578125, -0.00463104248046875, -0.0164031982421875, -0.006694793701171875, 0.0238037109375, 0.016204833984375, 0.050567626953125, -0.0262451171875, -0.04119873046875, 0.007793426513671875, 0.014862060546875, 0.003936767578125, -0.0294189453125, -0.055511474609375, 0.00606536865234375, -0.06610107421875, -0.01372528076171875, -0.0239410400390625, -0.050750732421875, -0.04632568359375, -0.0194091796875, 0.041107177734375, 0.0212554931640625, 0.01158905029296875, -0.0296478271484375, -0.043304443359375, -0.022491455078125, 0.0267333984375, 0.01265716552734375, -0.0082855224609375, 0.048736572265625, 0.0040283203125, 0.08099365234375, -0.0055694580078125, -0.01512908935546875, -0.054290771484375, -0.01271820068359375, 0.023651123046875, -0.0377197265625, -0.0321044921875, -0.0110321044921875, -0.05322265625, 0.0027103424072265625, 0.039520263671875, -0.022216796875, 0.0161285400390625, -0.033538818359375, 0.0098876953125, -0.0277099609375, 0.00640869140625, -0.054046630859375, -0.02227783203125, 0.02587890625, -0.03179931640625, -0.03424072265625, 0.00801849365234375, -0.00057220458984375, -0.0172271728515625, 0.004734039306640625, -0.0352783203125, 0.018218994140625, -0.061798095703125, 0.08203125, 0.02679443359375, 0.00814056396484375, 0.040130615234375, -0.001995086669921875, 0.0323486328125, 0.0111541748046875, -0.0156402587890625, -0.039764404296875, 0.0241851806640625, 0.051727294921875, 0.0015993118286132812, -0.008880615234375, 0.0247955322265625, -0.01486968994140625, 0.0007119178771972656, 0.0092620849609375, 0.034271240234375, -0.054595947265625, 0.027587890625, -0.01369476318359375, -0.00319671630859375, 0.0312042236328125, 0.01373291015625, -0.0197296142578125, -0.042724609375, 0.036865234375, -0.0210418701171875, -0.00447845458984375, 0.01751708984375, -0.0091705322265625, 0.005157470703125, -0.023223876953125, 0.049102783203125, 0.01180267333984375, -0.05975341796875, 0.0028858184814453125, 0.0305938720703125, -0.0185546875, -0.007785797119140625, -0.00909423828125, -0.0019130706787109375, -0.022735595703125, -0.039703369140625, 0.0192718505859375, -0.02557373046875, 0.0012674331665039062, 0.031494140625, -0.032470703125, 0.031585693359375, 0.063720703125, -0.039825439453125, 0.05126953125, 0.00725555419921875, 0.015411376953125, -0.01995849609375, -0.0014820098876953125, 0.0264129638671875, 0.04266357421875, -0.002483367919921875, 0.0186920166015625, 0.004970550537109375, -0.029296875, -0.0242767333984375, 0.00030732154846191406, 0.12548828125, -0.0179595947265625, -0.03448486328125, 0.0269012451171875, 0.0267486572265625, -0.040191650390625, 0.00785064697265625, -0.006378173828125, -0.030487060546875, 0.0214080810546875, -0.0242767333984375, -0.02825927734375, 0.030975341796875, -0.0169677734375, -0.047088623046875, 0.09368896484375, 0.007678985595703125, 0.0447998046875, 0.01056671142578125, 0.038665771484375, -0.01273345947265625, 0.0251312255859375, -0.0222625732421875, 0.037261962890625, -0.032440185546875, 0.0628662109375, -0.01332855224609375, 0.01340484619140625, 0.030487060546875, 0.013336181640625, 0.037322998046875, 0.01027679443359375, 0.006168365478515625, -0.0121307373046875, 0.0266571044921875, 0.05133056640625, -0.01288604736328125, 0.01357269287109375, -0.009613037109375, 0.03265380859375, -0.0038127899169921875, -0.01432037353515625, 0.022796630859375, 0.025909423828125, -0.0499267578125, 0.02801513671875, 0.023101806640625, 0.02691650390625, -0.0206451416015625, 0.03997802734375, -0.0161285400390625, -0.00441741943359375, 0.017181396484375, 0.0010528564453125, -0.00431060791015625, 0.04864501953125, 0.06390380859375, -0.044586181640625, 0.0265045166015625, -0.05255126953125, 0.06219482421875, 0.02764892578125, 0.0281219482421875, 0.00081634521484375, 0.022613525390625, -0.0143585205078125, 0.0173492431640625, 0.0255126953125, 0.058349609375, -0.060211181640625, 0.06951904296875, 0.054901123046875, 0.016876220703125, -0.02972412109375, -0.00846099853515625, 0.0614013671875, 0.08282470703125, -0.041656494140625, -0.0253143310546875, 0.0176849365234375, -0.0099334716796875, -0.01024627685546875, -0.0018930435180664062, 0.00724029541015625, -0.0029010772705078125, 0.006969451904296875, -0.047119140625, -0.01412200927734375, 0.047271728515625, 0.0298004150390625, -0.006336212158203125, -0.0274810791015625, -0.01422882080078125, -0.0235443115234375, -0.026153564453125, -0.04144287109375, 0.016265869140625, 0.05413818359375, 0.02490234375, 0.009552001953125, -0.00792694091796875, -0.01387786865234375, 0.006664276123046875, 0.0169219970703125, -0.00661468505859375, -0.0196990966796875, -0.025726318359375, -0.04632568359375, 0.0201568603515625, 0.033843994140625, 0.01494598388671875, -0.00856781005859375, 0.033203125, 0.01824951171875, -0.0257568359375, -0.0175628662109375, 0.01470184326171875, -0.007251739501953125, 0.009124755859375, -0.04632568359375, -0.0198516845703125, -0.0181732177734375, -0.0215911865234375, 0.0062408447265625, -0.03369140625, 0.0343017578125, -0.039642333984375, 0.060394287109375, -0.0153656005859375, 0.0196990966796875, 0.0828857421875, -0.00380706787109375, 0.046356201171875, -0.0129852294921875, -0.1007080078125, -0.02032470703125, -0.01450347900390625, -0.06842041015625, 0.03338623046875, 0.0333251953125, -0.0592041015625, 0.033111572265625, -0.00676727294921875, 0.004955291748046875, 0.009490966796875, -0.0228118896484375, 0.011749267578125, -0.0010709762573242188, 0.0078582763671875, 0.012908935546875, -0.05126953125, -0.01326751708984375, -0.01422882080078125, 0.015960693359375, 0.04595947265625, 0.0274658203125, 0.029632568359375, 0.0281982421875, -0.01385498046875, 0.00788116455078125, -0.040130615234375, -0.0253753662109375, 0.07012939453125, -0.0250244140625, -0.0318603515625, -0.0020618438720703125, -0.0173797607421875, 0.0005121231079101562, 0.00021708011627197266, -0.051361083984375, 0.007568359375, -0.053375244140625, 0.0117340087890625, 0.01049041748046875, 0.0232086181640625, -0.0283966064453125, 0.038909912109375, -0.020172119140625, -0.0511474609375, 0.04876708984375, -0.053802490234375, -0.0347900390625, -0.0225067138671875, 0.026702880859375, -0.028411865234375, 0.0053558349609375, 0.035888671875, 0.0126190185546875, 0.03302001953125, -0.0034809112548828125, -0.01244354248046875, -0.0016155242919921875, -0.015533447265625, 0.0027980804443359375, 0.01276397705078125, 0.00542449951171875, 0.0041351318359375, -0.007801055908203125, 0.0005435943603515625, -0.0114593505859375, 0.01456451416015625, -0.054351806640625, 0.00328826904296875, 0.020294189453125, 0.003765106201171875, 0.01053619384765625, -0.048004150390625, -0.019256591796875, -0.03375244140625, -0.01483917236328125, 0.0305938720703125, -0.03509521484375, -0.0389404296875, -0.06121826171875, 0.01236724853515625, 0.03924560546875, 0.027191162109375, -0.09112548828125, 0.06964111328125, -0.01934814453125, 0.0285491943359375, -0.001628875732421875, -0.0272064208984375, -0.010498046875, 0.020233154296875, 0.01092529296875, -0.010162353515625, -0.037750244140625, 0.0080108642578125, -0.01418304443359375, 0.01123046875, 0.0157470703125, -0.030853271484375, -0.0186004638671875, 0.0250244140625, 0.0233612060546875, 0.0555419921875, 0.032379150390625, 0.00008350610733032227, 0.0232391357421875, 0.002109527587890625, -0.03411865234375, -0.050201416015625, 0.03765869140625, -0.055938720703125, -0.0130157470703125, 0.007640838623046875, -0.04547119140625, -0.040771484375, -0.05645751953125, -0.078369140625, 0.041107177734375, -0.0012750625610351562, -0.044891357421875, -0.016754150390625, 0.024383544921875, 0.0010976791381835938, -0.0161285400390625, 0.00799560546875, -0.034332275390625, -0.009735107421875, 0.010589599609375, 0.0296478271484375, 0.0716552734375, 0.0030231475830078125, 0.024658203125, -0.0198211669921875, 0.0253143310546875, -0.00605010986328125, 0.03955078125, -0.01511383056640625, 0.00743865966796875, -0.007061004638671875, 0.048980712890625, -0.0379638671875, -0.04498291015625, -0.03558349609375, 0.026275634765625, -0.00586700439453125, -0.031524658203125, -0.0400390625, -0.02618408203125, 0.049346923828125, 0.06256103515625, 0.0203857421875, -0.0238800048828125, 0.01605224609375, -0.02508544921875, -0.029296875, -0.01322174072265625, 0.00930023193359375, -0.04315185546875, -0.011688232421875, 0.02606201171875, -0.0013065338134765625, 0.0181732177734375, -0.00702667236328125, -0.007965087890625, 0.0019054412841796875, 0.0325927734375, 0.015960693359375, -0.05291748046875, 0.07269287109375, 0.048614501953125, -0.03289794921875, 0.03607177734375, -0.006458282470703125, -0.0300140380859375, 0.052825927734375, 0.00946807861328125, -0.038238525390625, -0.01461029052734375, 0.00922393798828125, 0.0145111083984375, -0.004352569580078125, 0.03887939453125, 0.0037841796875, 0.0177154541015625, -0.026214599609375, 0.01092529296875, 0.00725555419921875, 0.0006303787231445312, 0.0223541259765625, 0.0204925537109375, 0.015228271484375, 0.04083251953125, 0.00545501708984375, 0.023681640625, -0.0240936279296875, 0.048980712890625, -0.020721435546875, -0.0197906494140625, 0.00988006591796875, -0.0269927978515625, -0.0010595321655273438, -0.020660400390625, 0.006633758544921875, -0.0323486328125, 0.02325439453125, 0.043304443359375, -0.0234527587890625, 0.017364501953125 ]
72e3e1d57ede231fdf20e84f65147f379a6205be
Wordpress Stackexchange Q: Should HTML output be passed through esc_html() AND wp_kses()? I'm confused about the different uses of esc_html() and wp_kses(). I understand that esc_html() converts special characters to their HTML entity, and that wp_kses() removes unwanted tags (e.g., &lt;script&gt;), but I'm not sure in what contexts they should be used together or separately. If I run some untrusted HTML through esc_html(), then any JavaScript will be displayed in plain text rather than being rendered by the browser, so it is safe at that point, correct? The only reason to also run it through wp_kses() would be to avoid having the raw script displayed? Basically, esc_html() makes it safe, and wp_kses() makes it pretty. Is that correct? A: The general rule, at least as espoused by Mark Jaquith, is sanitize on input, escape on output (the corollary to this rule being sanitize early, escape late). So: use sanitization filters (such as the kses() family) when storing untrusted data in the database, and use escaping filters (i.e. the esc_*() family) when outputting untrusted data in the template.
Q: Should HTML output be passed through esc_html() AND wp_kses()? I'm confused about the different uses of esc_html() and wp_kses(). I understand that esc_html() converts special characters to their HTML entity, and that wp_kses() removes unwanted tags (e.g., &lt;script&gt;), but I'm not sure in what contexts they should be used together or separately. If I run some untrusted HTML through esc_html(), then any JavaScript will be displayed in plain text rather than being rendered by the browser, so it is safe at that point, correct? The only reason to also run it through wp_kses() would be to avoid having the raw script displayed? Basically, esc_html() makes it safe, and wp_kses() makes it pretty. Is that correct? A: The general rule, at least as espoused by Mark Jaquith, is sanitize on input, escape on output (the corollary to this rule being sanitize early, escape late). So: use sanitization filters (such as the kses() family) when storing untrusted data in the database, and use escaping filters (i.e. the esc_*() family) when outputting untrusted data in the template. A: The kses functions should be used when you want to allow some subset of html to be in the result. For example, comments allow some HTML in them for bold, italic, links, and such. The esc_html function should be used to escape html completely. No HTML will go through it without being converted to something that will be interpreted as non-HTML by a browser.
wordpress
{ "language": "en", "length": 240, "provenance": "stackexchange_00019.jsonl.gz:413856", "question_score": "12", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31118" }
[ 0.026031494140625, -0.0160980224609375, -0.0396728515625, -0.01076507568359375, 0.00302886962890625, -0.036895751953125, 0.02130126953125, 0.00782012939453125, -0.0094757080078125, 0.0557861328125, 0.0161590576171875, 0.00038313865661621094, 0.021697998046875, -0.031463623046875, 0.00042939186096191406, 0.01432037353515625, 0.02435302734375, -0.01181793212890625, 0.02740478515625, -0.0058441162109375, -0.005626678466796875, 0.005825042724609375, 0.0396728515625, -0.0244903564453125, 0.00047516822814941406, -0.054718017578125, 0.08880615234375, 0.00031757354736328125, 0.010467529296875, -0.006763458251953125, -0.0001519918441772461, -0.00423431396484375, 0.01959228515625, 0.049957275390625, -0.0777587890625, -0.001911163330078125, -0.035186767578125, 0.05072021484375, -0.006916046142578125, 0.023834228515625, -0.00347900390625, 0.0034236907958984375, 0.055816650390625, -0.029876708984375, 0.0142822265625, -0.01129913330078125, -0.0023746490478515625, -0.04547119140625, -0.021484375, 0.028106689453125, 0.034210205078125, -0.017364501953125, 0.042999267578125, -0.039276123046875, 0.0065765380859375, 0.0006327629089355469, -0.056121826171875, 0.0086212158203125, -0.0003859996795654297, 0.11163330078125, 0.038177490234375, 0.0267333984375, -0.050018310546875, -0.06463623046875, 0.0196075439453125, -0.0106658935546875, 0.01328277587890625, 0.035675048828125, -0.0650634765625, -0.0027561187744140625, 0.043182373046875, -0.034759521484375, 0.005725860595703125, -0.06121826171875, 0.01000213623046875, 0.06817626953125, -0.06103515625, -0.01253509521484375, 0.04412841796875, -0.0221405029296875, 0.006011962890625, 0.0107574462890625, -0.0265655517578125, -0.0343017578125, 0.005565643310546875, -0.0273895263671875, -0.0042877197265625, -0.0035457611083984375, 0.00048661231994628906, 0.00804901123046875, -0.017303466796875, 0.0096435546875, 0.022491455078125, 0.00164031982421875, -0.0149078369140625, -0.0164031982421875, 0.011566162109375, 0.02606201171875, -0.007015228271484375, 0.0157623291015625, 0.040313720703125, -0.0577392578125, 0.045654296875, -0.03631591796875, 0.002529144287109375, 0.10504150390625, 0.0258636474609375, -0.021331787109375, 0.01593017578125, -0.0234832763671875, 0.0369873046875, 0.007572174072265625, -0.017822265625, -0.064208984375, -0.01023101806640625, 0.068359375, 0.0011434555053710938, 0.0141143798828125, 0.02984619140625, 0.027252197265625, -0.0015382766723632812, 0.01535797119140625, 0.032562255859375, -0.05987548828125, -0.027008056640625, -0.0489501953125, -0.028228759765625, -0.01373291015625, -0.0185546875, -0.00711822509765625, -0.0162811279296875, 0.0241851806640625, 0.04498291015625, 0.050689697265625, 0.007640838623046875, -0.01033782958984375, -0.016815185546875, -0.01050567626953125, 0.008087158203125, 0.024627685546875, -0.0284271240234375, -0.034088134765625, 0.027130126953125, -0.0130462646484375, -0.002109527587890625, 0.035308837890625, 0.031494140625, -0.004306793212890625, -0.005413055419921875, -0.07244873046875, 0.0024700164794921875, -0.00027108192443847656, 0.045806884765625, -0.0283203125, -0.005405426025390625, -0.0655517578125, -0.01108551025390625, -0.038726806640625, 0.01000213623046875, -0.0287933349609375, -0.00417327880859375, -0.0169677734375, 0.0218353271484375, -0.000171661376953125, -0.00795745849609375, 0.01059722900390625, -0.0093231201171875, -0.004863739013671875, 0.0150299072265625, 0.0030040740966796875, -0.0263519287109375, -0.0509033203125, -0.015869140625, -0.0070648193359375, -0.0103302001953125, 0.04278564453125, -0.037384033203125, 0.0277099609375, 0.035400390625, 0.041046142578125, 0.03875732421875, -0.0192108154296875, 0.07568359375, 0.003871917724609375, -0.06427001953125, 0.0219879150390625, -0.0012712478637695312, 0.045318603515625, 0.053802490234375, 0.00482177734375, 0.02880859375, -0.0106964111328125, 0.02447509765625, -0.0128173828125, 0.03369140625, -0.048004150390625, -0.039031982421875, -0.04150390625, -0.0049896240234375, 0.009674072265625, 0.06903076171875, -0.027862548828125, 0.059112548828125, -0.03753662109375, -0.010284423828125, -0.006961822509765625, -0.01153564453125, 0.0179595947265625, -0.0148162841796875, 0.03497314453125, 0.0248565673828125, -0.0103607177734375, -0.047821044921875, 0.050506591796875, 0.0099334716796875, -0.043609619140625, -0.0297698974609375, 0.0804443359375, -0.0038814544677734375, 0.0526123046875, 0.00635528564453125, -0.037017822265625, 0.0167083740234375, -0.004985809326171875, 0.002651214599609375, -0.02166748046875, -0.0074310302734375, -0.0237884521484375, 0.011688232421875, -0.005218505859375, 0.037567138671875, 0.0287017822265625, 0.062469482421875, 0.05340576171875, -0.005077362060546875, -0.014678955078125, 0.01419830322265625, -0.0673828125, -0.0015964508056640625, 0.056365966796875, 0.048675537109375, 0.08331298828125, -0.009765625, -0.058349609375, 0.058258056640625, -0.07122802734375, 0.018585205078125, -0.054229736328125, 0.00032329559326171875, 0.0007534027099609375, 0.01058197021484375, -0.0198211669921875, 0.009918212890625, -0.07147216796875, 0.01166534423828125, 0.007099151611328125, -0.0265350341796875, -0.0187225341796875, -0.0264739990234375, 0.0160064697265625, 0.00981903076171875, -0.02838134765625, -0.01233673095703125, -0.0085296630859375, 0.028900146484375, -0.04974365234375, -0.0106658935546875, -0.028411865234375, -0.00807952880859375, -0.0157470703125, 0.0272369384765625, -0.040863037109375, -0.01690673828125, 0.0509033203125, 0.01059722900390625, 0.0171661376953125, -0.03375244140625, -0.0029239654541015625, -0.020538330078125, 0.032958984375, 0.005496978759765625, 0.0552978515625, -0.004268646240234375, -0.03192138671875, -0.0343017578125, 0.007236480712890625, 0.000530242919921875, 0.01520538330078125, 0.0124053955078125, 0.0202484130859375, 0.0428466796875, 0.0281982421875, -0.0026187896728515625, 0.027130126953125, -0.0207061767578125, 0.0020904541015625, 0.005809783935546875, -0.0408935546875, 0.0235748291015625, -0.002742767333984375, 0.059326171875, 0.07122802734375, 0.023223876953125, -0.004695892333984375, 0.002979278564453125, 0.0218963623046875, 0.0218505859375, 0.0014467239379882812, -0.01371002197265625, -0.001964569091796875, -0.081787109375, -0.06219482421875, 0.0181732177734375, 0.04681396484375, -0.03912353515625, -0.040496826171875, -0.04345703125, 0.012939453125, -0.056732177734375, -0.026824951171875, 0.02117919921875, -0.0270233154296875, -0.032470703125, -0.00650787353515625, -0.0121612548828125, 0.00667572021484375, -0.005306243896484375, -0.0056915283203125, -0.0037841796875, 0.0167694091796875, -0.056549072265625, -0.002269744873046875, -0.04010009765625, 0.073486328125, -0.01318359375, 0.0214996337890625, 0.0010700225830078125, 0.03326416015625, 0.000591278076171875, -0.022003173828125, 0.00713348388671875, 0.0093536376953125, 0.00409698486328125, 0.0085296630859375, -0.024993896484375, -0.0428466796875, -0.026275634765625, -0.007686614990234375, -0.004520416259765625, -0.03961181640625, 0.051177978515625, -0.003116607666015625, 0.006328582763671875, 0.00959014892578125, 0.0386962890625, -0.01227569580078125, -0.035614013671875, 0.037078857421875, 0.0277099609375, -0.0151214599609375, -0.0070953369140625, -0.0122528076171875, -0.034454345703125, -0.0112152099609375, 0.0289154052734375, -0.00035452842712402344, -0.0200958251953125, -0.0040283203125, 0.04669189453125, 0.0261383056640625, 0.02947998046875, 0.0232696533203125, -0.038726806640625, -0.00490570068359375, 0.02239990234375, -0.0333251953125, 0.0169219970703125, -0.02789306640625, 0.020111083984375, 0.00452423095703125, -0.015716552734375, -0.01092529296875, 0.00980377197265625, -0.0014324188232421875, -0.00188446044921875, 0.051025390625, 0.0264739990234375, 0.04693603515625, -0.0224456787109375, -0.035003662109375, -0.02191162109375, 0.07672119140625, -0.0142669677734375, -0.0162200927734375, 0.002559661865234375, -0.0012493133544921875, -0.0202484130859375, 0.0021648406982421875, -0.029815673828125, -0.006412506103515625, -0.052947998046875, 0.0184783935546875, 0.00203704833984375, -0.0279998779296875, -0.0200653076171875, -0.0343017578125, -0.03375244140625, -0.032867431640625, 0.0285797119140625, -0.0115966796875, 0.01397705078125, -0.043487548828125, 0.012725830078125, -0.059112548828125, -0.005535125732421875, -0.0106353759765625, -0.047821044921875, -0.00925445556640625, -0.0200042724609375, 0.05755615234375, 0.038543701171875, -0.052032470703125, -0.029388427734375, 0.0333251953125, 0.00043272972106933594, 0.0411376953125, 0.03515625, 0.038360595703125, 0.00676727294921875, -0.024932861328125, 0.035003662109375, -0.043853759765625, 0.0036449432373046875, -0.010833740234375, -0.04248046875, -0.05145263671875, -0.013763427734375, -0.058990478515625, 0.0452880859375, -0.038543701171875, -0.044586181640625, -0.040252685546875, -0.016265869140625, -0.0313720703125, 0.01343536376953125, -0.035980224609375, -0.0173797607421875, -0.004482269287109375, 0.056304931640625, 0.039947509765625, 0.011810302734375, -0.036163330078125, 0.0394287109375, 0.0228118896484375, -0.050567626953125, 0.05438232421875, -0.038238525390625, 0.003276824951171875, -0.057342529296875, 0.055877685546875, 0.041656494140625, 0.007732391357421875, 0.0277252197265625, -0.04473876953125, 0.035064697265625, -0.053466796875, 0.074951171875, -0.0045013427734375, 0.0270233154296875, 0.01302337646484375, 0.0157928466796875, -0.01355743408203125, 0.0399169921875, 0.013763427734375, 0.02642822265625, 0.0025463104248046875, -0.043975830078125, 0.00542449951171875, -0.03240966796875, 0.0177764892578125, -0.01035308837890625, -0.00830841064453125, 0.02734375, 0.04962158203125, 0.04669189453125, 0.0023956298828125, 0.01739501953125, 0.0231781005859375, 0.0127410888671875, -0.040557861328125, -0.006717681884765625, -0.029388427734375, 0.054962158203125, -0.042510986328125, -0.0010614395141601562, -0.0146484375, -0.00524139404296875, 0.007213592529296875, 0.00463104248046875, -0.0166473388671875, -0.0179901123046875, 0.01303863525390625, 0.005786895751953125, 0.00732421875, 0.0443115234375, -0.00276947021484375, -0.016387939453125, -0.00036406517028808594, 0.0081787109375, 0.033355712890625, -0.01727294921875, -0.01019287109375, -0.048919677734375, 0.0015993118286132812, -0.0250091552734375, 0.0338134765625, 0.013824462890625, -0.03155517578125, 0.032135009765625, -0.015899658203125, 0.0274810791015625, 0.0185699462890625, 0.02642822265625, 0.0228118896484375, -0.031463623046875, 0.0027446746826171875, -0.0082855224609375, -0.0124053955078125, -0.0224151611328125, -0.053802490234375, 0.048828125, 0.0050811767578125, -0.054473876953125, 0.010498046875, 0.018829345703125, 0.052276611328125, -0.01629638671875, 0.0223541259765625, -0.01763916015625, -0.01013946533203125, -0.051605224609375, -0.0247344970703125, 0.04248046875, 0.02508544921875, -0.0021762847900390625, -0.007541656494140625, -0.0250244140625, 0.0168914794921875, -0.0008516311645507812, 0.00550079345703125, -0.033355712890625, -0.030364990234375, -0.005542755126953125, -0.0146636962890625, -0.006687164306640625, -0.037994384765625, -0.0002532005310058594, -0.031768798828125, -0.0238800048828125, 0.059600830078125, -0.02618408203125, 0.0660400390625, -0.03424072265625, -0.0187835693359375, 0.006778717041015625, 0.03271484375, 0.0264434814453125, 0.0287628173828125, -0.050567626953125, 0.00927734375, -0.04754638671875, -0.01039886474609375, -0.0265960693359375, -0.00502777099609375, -0.04180908203125, 0.002532958984375, -0.0157470703125, 0.0212249755859375, -0.02734375, -0.01433563232421875, 0.0030364990234375, 0.027374267578125, -0.018585205078125, 0.047576904296875, -0.014892578125, 0.05694580078125, -0.03070068359375, 0.035980224609375, -0.008026123046875, 0.01806640625, 0.006183624267578125, -0.01483917236328125, 0.0025730133056640625, -0.023040771484375, -0.003650665283203125, -0.053375244140625, 0.0278167724609375, 0.0174713134765625, 0.0484619140625, 0.00928497314453125, 0.0380859375, 0.0036678314208984375, 0.007213592529296875, 0.00251007080078125, -0.0006809234619140625, -0.007587432861328125, 0.0140380859375, 0.05181884765625, -0.029754638671875, -0.0206298828125, 0.003910064697265625, 0.0013723373413085938, 0.04046630859375, -0.0151519775390625, 0.013946533203125, -0.0096282958984375, 0.0205535888671875, 0.007213592529296875, 0.0226593017578125, -0.00131988525390625, 0.0189208984375, 0.01861572265625, 0.00975799560546875, 0.0013265609741210938, -0.016632080078125, 0.0165863037109375, 0.00034999847412109375, -0.016937255859375, -0.031341552734375, 0.015960693359375, -0.02490234375, -0.0081024169921875, 0.0276336669921875, 0.084716796875, 0.08001708984375, -0.09039306640625, -0.005126953125, 0.026336669921875, -0.06903076171875, -0.051239013671875, -0.022674560546875, -0.0032520294189453125, -0.051483154296875, 0.044189453125, -0.0148468017578125, -0.0203399658203125, 0.002674102783203125, -0.02935791015625, -0.00026154518127441406, -0.0063323974609375, 0.06597900390625, 0.007411956787109375, -0.05169677734375, -0.0064697265625, 0.041259765625, -0.0228424072265625, -0.022613525390625, 0.01233673095703125, 0.0095672607421875, -0.043701171875, -0.07135009765625, -0.021209716796875, 0.005130767822265625, -0.03680419921875, 0.0020122528076171875, 0.005580902099609375, 0.052520751953125, 0.05548095703125, -0.01084136962890625, 0.018096923828125, 0.0270843505859375, 0.0201568603515625, 0.01259613037109375, -0.025390625, -0.01090240478515625, 0.00423431396484375, -0.04058837890625, 0.01065826416015625, -0.0194244384765625, 0.004726409912109375, -0.01200103759765625, -0.002716064453125, 0.038787841796875, 0.033050537109375, -0.03814697265625, 0.0108642578125, 0.05645751953125, 0.0030460357666015625, -0.02032470703125, 0.0040130615234375, -0.09228515625, -0.042144775390625, -0.0028171539306640625, -0.025482177734375, 0.0037250518798828125, -0.01078033447265625, -0.07940673828125, 0.056671142578125, 0.0765380859375, 0.03887939453125, -0.0303497314453125, 0.0157928466796875, -0.034759521484375, -0.0233612060546875, -0.0042266845703125, 0.0034942626953125, -0.0023860931396484375, 0.031524658203125, -0.006458282470703125, -0.00824737548828125, 0.017547607421875, 0.04833984375, 0.0040283203125, -0.00887298583984375, 0.00681304931640625, 0.02105712890625, 0.032745361328125, 0.0020046234130859375, -0.0200042724609375, 0.0141448974609375, 0.01430511474609375, 0.03125, 0.04510498046875, -0.0285797119140625, 0.019683837890625, -0.036407470703125, -0.00021374225616455078, 0.0303192138671875, 0.0049285888671875, -0.0156402587890625, 0.0062103271484375, 0.0136871337890625, -0.0193939208984375, 0.0026493072509765625, -0.009613037109375, 0.0172271728515625, -0.05389404296875, 0.0193634033203125, 0.000005245208740234375, -0.064697265625, -0.03863525390625, -0.03375244140625, 0.0208587646484375, 0.023590087890625, 0.01474761962890625, 0.04254150390625, 0.01457977294921875, 0.026763916015625, 0.037933349609375, 0.02447509765625, 0.0226593017578125, 0.0107269287109375, -0.00005447864532470703, 0.01151275634765625, 0.031982421875, -0.024383544921875, -0.0180206298828125, 0.04058837890625, 0.0229034423828125, -0.005794525146484375, -0.000015974044799804688, 0.0050506591796875, 0.0294036865234375, 0.004222869873046875, -0.0183868408203125, 0.0263824462890625, 0.0206146240234375, 0.020294189453125, 0.0087127685546875, -0.0137786865234375, -0.003467559814453125, -0.0067596435546875, 0.0007181167602539062, -0.004848480224609375, 0.02410888671875, 0.00901031494140625, -0.060302734375, 0.0173187255859375, -0.0281829833984375, 0.040191650390625, 0.055755615234375, 0.0063629150390625, 0.01080322265625, -0.02581787109375, -0.032196044921875, 0.0179901123046875, 0.00917816162109375, 0.0255279541015625, -0.03765869140625, 0.0180511474609375, 0.03533935546875, 0.0257110595703125, 0.0301361083984375, 0.0183868408203125, 0.036865234375, 0.01192474365234375, -0.00734710693359375, -0.00042629241943359375, 0.0225067138671875, -0.01303863525390625, 0.0187835693359375, -0.022857666015625, 0.0380859375, 0.021453857421875, 0.007701873779296875, -0.03216552734375, 0.029022216796875, 0.056396484375, -0.0164642333984375, 0.0391845703125, -0.00803375244140625, -0.051910400390625, 0.00402069091796875, -0.0200653076171875, 0.0894775390625, 0.003879547119140625, -0.00018334388732910156, -0.0170745849609375, 0.0294952392578125, -0.006931304931640625, 0.02197265625, 0.048736572265625, 0.00698089599609375, 0.00572967529296875, 0.07965087890625, -0.060150146484375, 0.04779052734375, 0.0731201171875, -0.02557373046875, -0.023712158203125, 0.044586181640625, -0.0231475830078125, -0.004909515380859375, -0.00441741943359375, 0.01006317138671875, 0.0496826171875, -0.0277862548828125, 0.04656982421875, -0.053619384765625, 0.0263671875, 0.030609130859375, 0.013397216796875, 0.00632476806640625, 0.0310821533203125, 0.031524658203125, 0.028900146484375, 0.01390838623046875, -0.037872314453125, -0.01849365234375, 0.03955078125, 0.0100860595703125, -0.00948333740234375, 0.00160980224609375, 0.00882720947265625, 0.0135345458984375, 0.0279388427734375, 0.04449462890625, -0.0064239501953125, -0.03546142578125, -0.003173828125, 0.018218994140625, 0.02667236328125, 0.05877685546875, 0.0092620849609375, 0.06951904296875, 0.005706787109375, -0.003997802734375, 0.01380157470703125, -0.0673828125, -0.005916595458984375, 0.01137542724609375, 0.02264404296875, 0.030120849609375, 0.01168060302734375, -0.022430419921875, -0.0027256011962890625, 0.0171356201171875, -0.0215606689453125, -0.00299072265625, -0.00540924072265625, -0.043182373046875, 0.027618408203125, 0.0296630859375, 0.026397705078125, 0.01439666748046875, -0.0010433197021484375, -0.033050537109375, -0.0246429443359375, -0.00191497802734375, -0.01415252685546875, 0.0119781494140625, -0.0191650390625, 0.00693511962890625, 0.01053619384765625, -0.06640625, -0.0550537109375, -0.03778076171875, 0.01264190673828125, -0.006969451904296875, 0.0253143310546875, -0.061859130859375, -0.00598907470703125, 0.0147552490234375, 0.0088348388671875, 0.040802001953125, -0.0400390625, -0.0232391357421875, -0.03533935546875, -0.052215576171875, -0.05889892578125, 0.07965087890625, -0.052734375, -0.0011959075927734375, 0.000461578369140625, 0.003368377685546875, -0.0122528076171875, 0.024383544921875, -0.00006014108657836914, 0.07525634765625, 0.000377655029296875, -0.020843505859375, -0.0251617431640625, 0.03564453125, -0.0131683349609375, -0.054534912109375, -0.00682830810546875, -0.00536346435546875, 0.01513671875, 0.030548095703125, -0.00838470458984375, 0.021331787109375, -0.032257080078125, -0.06719970703125, 0.0711669921875, 0.007602691650390625, -0.0244903564453125, 0.007137298583984375, 0.02264404296875, 0.0035610198974609375, -0.03802490234375, -0.00421142578125, -0.0122222900390625, 0.0005040168762207031, -0.00441741943359375, 0.0147552490234375, 0.0021839141845703125, 0.0325927734375, 0.006565093994140625, -0.039520263671875, 0.009735107421875, -0.017578125, -0.008697509765625, -0.0654296875, 0.021636962890625, 0.0223388671875, 0.0145111083984375, 0.0022296905517578125, 0.0689697265625, 0.06329345703125, 0.0323486328125, -0.01849365234375, -0.03094482421875, -0.0009150505065917969, 0.0014524459838867188, 0.07427978515625, 0.01331329345703125, 0.0076141357421875, -0.040283203125, -0.0313720703125, -0.0650634765625, -0.005123138427734375, -0.0126953125, -0.0006852149963378906, -0.05792236328125, 0.01354217529296875, 0.017730712890625, 0.0004756450653076172, 0.024169921875, -0.0273284912109375, 0.0024967193603515625, -0.004364013671875, 0.01497650146484375, 0.0002448558807373047, 0.02459716796875, -0.0362548828125, 0.043701171875, -0.0270538330078125, 0.0003237724304199219, 0.0093841552734375, 0.0251312255859375, 0.0169677734375, 0.037445068359375, 0.0262908935546875, -0.0032329559326171875, -0.00728607177734375, 0.004512786865234375, 0.0220794677734375, 0.028656005859375, -0.0164337158203125, -0.032867431640625, 0.003265380859375, 0.03515625, -0.01276397705078125, 0.06732177734375, 0.0000059604644775390625, 0.0141754150390625, 0.0024471282958984375, -0.0170135498046875, -0.06390380859375, 0.0085906982421875, -0.011474609375, -0.0180511474609375, -0.013214111328125, 0.04217529296875, 0.06744384765625, -0.03350830078125, 0.01629638671875, -0.04205322265625, 0.009124755859375, -0.027191162109375, -0.0051422119140625, -0.024139404296875, -0.0159759521484375, 0.0188140869140625 ]
f78f5aff1059fbea3143c5b6f35bb6bf8ce13e9d
Wordpress Stackexchange Q: How to rename a custom field? I have 3000 posts with that custom field name 'refer' and i need to change it to 'ref' for theme needs, instead of doing it manually i need a query or technique to change them all. Question 1 I am trying to rename a custom field, from 'refer' to ref. what is the query needed to rename a custom filed. it would be better if its done using function.php(instead of doing in phpmyadmin). Question 2 I also have a lot of unwanted custom fields which are need to be deleted, how should i go about. help me out guys. A: I found the answer UPDATE `wp_postmeta` SET `meta_key` = 'ref' WHERE `meta_key` = 'refer' use this part in your SQL Reference
Q: How to rename a custom field? I have 3000 posts with that custom field name 'refer' and i need to change it to 'ref' for theme needs, instead of doing it manually i need a query or technique to change them all. Question 1 I am trying to rename a custom field, from 'refer' to ref. what is the query needed to rename a custom filed. it would be better if its done using function.php(instead of doing in phpmyadmin). Question 2 I also have a lot of unwanted custom fields which are need to be deleted, how should i go about. help me out guys. A: I found the answer UPDATE `wp_postmeta` SET `meta_key` = 'ref' WHERE `meta_key` = 'refer' use this part in your SQL Reference A: If you're trying to delete a post's custom field, then please edit your post, select 'Custom Fields' from the screen options, and scroll to the bottom, below the post editor. You'll find all your custom fields listed out there, you can edit their name, and change their values too. But ONLY those which you've added while adding / editing the post. Not the ones that WP creates for each post. DO NOT DELETE THE CUSTOM FIELDS WHICH YOU HAVEN'T ADDED! A: An cleaner version of @t31os's answer : global $wpdb; $querystr = $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_key = '%s' WHERE meta_key = '%s'",'new','old'); $result = $wpdb->get_results ( $querystr );
wordpress
{ "language": "en", "length": 238, "provenance": "stackexchange_00019.jsonl.gz:413872", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31178" }
[ -0.01194000244140625, -0.0167388916015625, -0.0214080810546875, 0.017791748046875, -0.025360107421875, -0.0153961181640625, 0.0017290115356445312, -0.0170135498046875, -0.007549285888671875, 0.033416748046875, 0.02874755859375, -0.036590576171875, 0.04193115234375, -0.045318603515625, -0.00911712646484375, -0.0132904052734375, 0.0236053466796875, 0.0177459716796875, 0.059539794921875, 0.0008549690246582031, 0.035308837890625, 0.01236724853515625, 0.03704833984375, -0.0243072509765625, 0.03826904296875, -0.05303955078125, 0.07586669921875, -0.045623779296875, 0.041900634765625, -0.03668212890625, 0.0357666015625, 0.00238800048828125, 0.035919189453125, 0.0189208984375, -0.05169677734375, 0.032135009765625, 0.01238250732421875, -0.003498077392578125, -0.01910400390625, 0.044097900390625, 0.054931640625, -0.0205078125, -0.08416748046875, 0.016876220703125, -0.043914794921875, -0.06976318359375, 0.0599365234375, -0.00472259521484375, 0.029296875, -0.0175933837890625, -0.01082611083984375, 0.040863037109375, 0.0016431808471679688, -0.024169921875, -0.01395416259765625, -0.004467010498046875, 0.0008797645568847656, -0.01432037353515625, 0.007720947265625, 0.0034885406494140625, 0.01413726806640625, 0.02301025390625, 0.00872802734375, 0.01328277587890625, -0.01039886474609375, 0.0134429931640625, 0.03216552734375, 0.0146636962890625, -0.0011835098266601562, -0.0118408203125, 0.00815582275390625, -0.00251007080078125, 0.0259246826171875, -0.00016164779663085938, 0.0225830078125, -0.046234130859375, 0.018310546875, -0.00812530517578125, -0.01215362548828125, 0.02447509765625, 0.0217437744140625, -0.0474853515625, 0.05706787109375, 0.0220947265625, -0.04864501953125, -0.0073699951171875, -0.00872039794921875, 0.00402069091796875, -0.0203704833984375, -0.0616455078125, -0.00656890869140625, -0.045684814453125, -0.095458984375, 0.0199127197265625, 0.017852783203125, -0.039947509765625, 0.0240325927734375, 0.019744873046875, 0.005092620849609375, -0.022857666015625, 0.015960693359375, -0.039794921875, -0.026336669921875, 0.0080108642578125, 0.0251007080078125, 0.0250701904296875, -0.0235137939453125, -0.023712158203125, 0.030303955078125, 0.021026611328125, -0.0080413818359375, -0.011077880859375, 0.02203369140625, 0.0225372314453125, -0.0584716796875, -0.0135650634765625, 0.002475738525390625, -0.032196044921875, -0.020751953125, 0.00218963623046875, -0.00283050537109375, -0.01140594482421875, 0.0231781005859375, -0.022735595703125, 0.01806640625, -0.01314544677734375, -0.0599365234375, 0.0180816650390625, -0.024261474609375, 0.004215240478515625, -0.03912353515625, 0.007427215576171875, 0.08868408203125, 0.06329345703125, 0.042449951171875, -0.01727294921875, 0.019287109375, 0.00856781005859375, 0.020599365234375, 0.00804901123046875, -0.0013837814331054688, -0.0224456787109375, 0.01514434814453125, 0.01056671142578125, 0.0234375, 0.0308380126953125, 0.025390625, 0.01299285888671875, -0.016754150390625, -0.057861328125, 0.024169921875, -0.009857177734375, 0.0246429443359375, 0.013885498046875, 0.007717132568359375, -0.022186279296875, 0.05010986328125, -0.041839599609375, -0.001010894775390625, -0.042144775390625, 0.04638671875, -0.006931304931640625, 0.0014123916625976562, -0.0274200439453125, -0.054443359375, 0.01116943359375, -0.060638427734375, -0.01168060302734375, 0.019561767578125, -0.0011882781982421875, 0.024444580078125, 0.005344390869140625, -0.003437042236328125, 0.003971099853515625, 0.0009794235229492188, -0.004688262939453125, 0.006694793701171875, -0.0095367431640625, 0.02386474609375, 0.036376953125, -0.005126953125, -0.0325927734375, 0.0260162353515625, -0.01739501953125, -0.051177978515625, 0.021484375, 0.005840301513671875, 0.0279083251953125, 0.0280914306640625, 0.008392333984375, 0.0311279296875, -0.002902984619140625, 0.00255584716796875, -0.0115814208984375, 0.0142364501953125, -0.00438690185546875, -0.0169219970703125, -0.00273895263671875, -0.0036754608154296875, 0.000179290771484375, -0.0433349609375, -0.00951385498046875, -0.00431060791015625, 0.02032470703125, -0.043670654296875, 0.00624847412109375, -0.0189208984375, 0.028900146484375, -0.035125732421875, 0.01016998291015625, 0.031402587890625, -0.006435394287109375, -0.0304718017578125, 0.0243988037109375, -0.005523681640625, -0.032196044921875, 0.007053375244140625, -0.039794921875, 0.0169219970703125, -0.05120849609375, 0.038604736328125, 0.008453369140625, -0.006748199462890625, 0.0263824462890625, -0.0072021484375, -0.0200653076171875, -0.0215606689453125, -0.025909423828125, -0.0189361572265625, -0.015655517578125, -0.0292816162109375, 0.054107666015625, 0.041717529296875, 0.0222320556640625, 0.00698089599609375, 0.0157012939453125, 0.01422882080078125, -0.10418701171875, -0.00823211669921875, 0.047393798828125, 0.0306243896484375, -0.008453369140625, -0.020477294921875, 0.0008859634399414062, 0.060943603515625, 0.0167236328125, 0.01053619384765625, 0.006504058837890625, 0.043975830078125, 0.042724609375, -0.0178070068359375, -0.0316162109375, 0.0230865478515625, -0.058746337890625, 0.04083251953125, 0.033721923828125, -0.03497314453125, -0.046173095703125, 0.016845703125, 0.00537872314453125, 0.01806640625, -0.035675048828125, -0.0275726318359375, 0.0012102127075195312, 0.040771484375, 0.025299072265625, 0.042633056640625, 0.02667236328125, -0.0303802490234375, 0.0308837890625, 0.016326904296875, -0.0101318359375, -0.0028076171875, -0.040618896484375, 0.0235443115234375, 0.01560211181640625, -0.053863525390625, 0.02923583984375, 0.0171051025390625, -0.0279998779296875, -0.0148773193359375, 0.0232086181640625, -0.0085296630859375, -0.01102447509765625, -0.0035800933837890625, -0.028472900390625, 0.0076904296875, 0.0107421875, -0.01727294921875, -0.0254058837890625, 0.00792694091796875, 0.004962921142578125, -0.02264404296875, -0.0116424560546875, 0.01007080078125, -0.02197265625, -0.0027713775634765625, -0.0184326171875, 0.032928466796875, -0.04052734375, 0.00295257568359375, 0.046966552734375, -0.03173828125, 0.01131439208984375, 0.0021991729736328125, 0.0193634033203125, 0.0033969879150390625, -0.003765106201171875, -0.003475189208984375, -0.006191253662109375, -0.053436279296875, 0.01568603515625, 0.0308380126953125, 0.07366943359375, -0.00848388671875, -0.04693603515625, 0.00937652587890625, 0.03399658203125, -0.07586669921875, -0.089599609375, -0.013519287109375, -0.020263671875, -0.028045654296875, 0.0048675537109375, -0.00852203369140625, 0.0119476318359375, 0.01285552978515625, -0.0015592575073242188, 0.08551025390625, -0.027099609375, -0.054534912109375, -0.01326751708984375, -0.08233642578125, -0.0621337890625, 0.0034351348876953125, -0.01458740234375, 0.0032215118408203125, 0.0253448486328125, 0.000949859619140625, -0.019989013671875, -0.01126861572265625, 0.01141357421875, -0.005870819091796875, -0.0225677490234375, 0.0443115234375, -0.039215087890625, -0.01189422607421875, 0.0139617919921875, 0.005306243896484375, 0.01488494873046875, -0.01407623291015625, -0.030426025390625, -0.00801849365234375, 0.006244659423828125, 0.01090240478515625, 0.0068359375, 0.0023479461669921875, 0.0252532958984375, 0.0203399658203125, -0.0296630859375, -0.03668212890625, -0.00524139404296875, -0.032745361328125, 0.026397705078125, 0.012451171875, 0.01372528076171875, -0.02685546875, 0.060699462890625, 0.00711822509765625, -0.006313323974609375, -0.01195526123046875, -0.024810791015625, 0.00420379638671875, 0.0179290771484375, 0.032257080078125, 0.0009322166442871094, -0.005077362060546875, -0.03472900390625, 0.04803466796875, 0.004802703857421875, 0.0189666748046875, 0.0020008087158203125, 0.0197906494140625, -0.0220184326171875, -0.1199951171875, 0.039825439453125, -0.07684326171875, -0.022186279296875, -0.057281494140625, 0.0017518997192382812, 0.004459381103515625, 0.10565185546875, -0.0252685546875, -0.037017822265625, -0.00896453857421875, -0.0128173828125, 0.025665283203125, 0.04022216796875, 0.005908966064453125, -0.026947021484375, -0.09942626953125, 0.01251220703125, 0.00862884521484375, -0.03985595703125, -0.060211181640625, 0.0421142578125, -0.09454345703125, -0.0253448486328125, 0.0244140625, -0.0276641845703125, 0.0190582275390625, -0.0072784423828125, 0.007965087890625, -0.02044677734375, -0.011322021484375, -0.035919189453125, -0.118896484375, -0.029693603515625, -0.01540374755859375, 0.0999755859375, 0.01255035400390625, -0.0221405029296875, -0.0009551048278808594, 0.07501220703125, 0.05023193359375, 0.04656982421875, -0.003612518310546875, -0.058135986328125, 0.01221466064453125, 0.0113372802734375, 0.015777587890625, -0.004093170166015625, -0.0284576416015625, -0.0458984375, -0.01181793212890625, 0.019134521484375, -0.004909515380859375, 0.03167724609375, 0.0095367431640625, 0.0002231597900390625, -0.01154327392578125, -0.01212310791015625, -0.0016546249389648438, 0.042999267578125, -0.0185546875, 0.00555419921875, -0.0247802734375, -0.033782958984375, 0.035247802734375, -0.003936767578125, -0.00025343894958496094, 0.02874755859375, 0.059844970703125, -0.0038909912109375, -0.0257568359375, -0.09698486328125, 0.00399017333984375, 0.0137939453125, 0.01023101806640625, 0.058197021484375, 0.0072479248046875, -0.00894927978515625, 0.064453125, -0.005107879638671875, -0.0224456787109375, 0.013275146484375, -0.0134124755859375, 0.02496337890625, 0.0030193328857421875, -0.0214080810546875, 0.004787445068359375, 0.05682373046875, -0.005001068115234375, -0.0160369873046875, -0.02093505859375, -0.0196990966796875, 0.0615234375, 0.00244903564453125, 0.01184844970703125, -0.059967041015625, -0.045013427734375, 0.0169677734375, -0.04644775390625, -0.0030975341796875, -0.0165252685546875, 0.006927490234375, -0.01331329345703125, -0.006855010986328125, 0.039306640625, -0.015960693359375, 0.01065826416015625, -0.053192138671875, 0.040435791015625, 0.01084136962890625, 0.0079498291015625, -0.007015228271484375, -0.0207672119140625, 0.09521484375, 0.00872802734375, -0.048126220703125, -0.0009055137634277344, -0.043426513671875, -0.00769805908203125, -0.0097503662109375, -0.0013055801391601562, 0.006839752197265625, 0.0274505615234375, 0.0065765380859375, 0.03399658203125, -0.0000959634780883789, 0.0272979736328125, -0.00927734375, 0.01812744140625, 0.0251007080078125, -0.03729248046875, -0.03155517578125, 0.04541015625, -0.0037937164306640625, -0.007083892822265625, 0.01163482666015625, 0.0494384765625, 0.04193115234375, 0.030792236328125, 0.020538330078125, 0.0009684562683105469, -0.01374053955078125, 0.00765228271484375, -0.0291748046875, -0.03167724609375, 0.01538848876953125, 0.00879669189453125, 0.041168212890625, -0.0208282470703125, -0.0293731689453125, 0.032196044921875, -0.043975830078125, -0.0014801025390625, 0.0216064453125, -0.0036029815673828125, -0.032379150390625, -0.0043182373046875, -0.02679443359375, -0.00904083251953125, -0.02362060546875, 0.01201629638671875, -0.01153564453125, -0.05364990234375, 0.01554107666015625, -0.0206756591796875, 0.039398193359375, -0.055023193359375, -0.05169677734375, -0.0212249755859375, -0.00839996337890625, -0.0235595703125, -0.0004487037658691406, -0.041290283203125, 0.012115478515625, -0.0275421142578125, 0.037261962890625, 0.0255584716796875, 0.0152130126953125, -0.0179901123046875, -0.022705078125, -0.007320404052734375, -0.0150604248046875, 0.04296875, -0.01238250732421875, -0.05615234375, 0.01488494873046875, -0.0347900390625, 0.0164642333984375, -0.015625, -0.08160400390625, -0.01535797119140625, -0.025787353515625, -0.02484130859375, 0.004119873046875, -0.0038299560546875, 0.0095672607421875, 0.01297760009765625, 0.0135345458984375, -0.0234375, -0.0252532958984375, -0.0109100341796875, 0.001262664794921875, 0.03399658203125, 0.01544952392578125, 0.005664825439453125, -0.00470733642578125, 0.020599365234375, -0.03887939453125, 0.00012743473052978516, -0.040008544921875, -0.0171966552734375, 0.006099700927734375, -0.01346588134765625, 0.0071563720703125, 0.0277099609375, -0.00769805908203125, 0.041229248046875, -0.0247955322265625, 0.0009145736694335938, -0.022125244140625, 0.0105133056640625, -0.05145263671875, 0.0238037109375, -0.0015287399291992188, -0.0031452178955078125, 0.040435791015625, 0.00849151611328125, 0.01251983642578125, -0.0082550048828125, -0.0149993896484375, 0.0179595947265625, 0.0100555419921875, -0.0218048095703125, 0.01134490966796875, 0.044586181640625, 0.0021266937255859375, 0.0338134765625, 0.005603790283203125, 0.01444244384765625, 0.03326416015625, 0.0185394287109375, 0.050323486328125, 0.0051727294921875, 0.082275390625, 0.01180267333984375, -0.03350830078125, 0.018829345703125, -0.0579833984375, 0.0101318359375, 0.036041259765625, 0.059661865234375, -0.0770263671875, 0.01313018798828125, 0.02423095703125, 0.0090179443359375, 0.030426025390625, 0.043365478515625, -0.015594482421875, -0.0124969482421875, -0.0306854248046875, -0.04559326171875, -0.0177154541015625, -0.0170135498046875, 0.01152801513671875, -0.00774383544921875, 0.0021495819091796875, 0.032012939453125, -0.00177764892578125, 0.038055419921875, -0.0618896484375, -0.034454345703125, -0.017852783203125, -0.01953125, 0.004596710205078125, 0.006366729736328125, -0.0233917236328125, -0.05535888671875, 0.025634765625, -0.03277587890625, 0.0062713623046875, 0.0146636962890625, 0.054901123046875, 0.028900146484375, 0.04071044921875, 0.0203399658203125, 0.00901031494140625, -0.004730224609375, 0.043487548828125, -0.01727294921875, -0.039093017578125, -0.00569915771484375, 0.0004513263702392578, -0.045623779296875, 0.01500701904296875, -0.028839111328125, -0.01415252685546875, -0.020965576171875, -0.005889892578125, 0.07623291015625, 0.0007948875427246094, -0.0379638671875, 0.0212249755859375, 0.01367950439453125, -0.00968170166015625, 0.006786346435546875, -0.0048675537109375, -0.0179290771484375, -0.01337432861328125, -0.002254486083984375, -0.0462646484375, -0.0075225830078125, -0.0106048583984375, -0.06195068359375, 0.09991455078125, 0.01995849609375, 0.00980377197265625, -0.0020771026611328125, 0.04730224609375, -0.034393310546875, 0.0180511474609375, -0.02294921875, 0.05780029296875, 0.0205535888671875, 0.00841522216796875, -0.0335693359375, -0.005374908447265625, -0.01107025146484375, 0.019775390625, 0.0345458984375, 0.007049560546875, -0.0206146240234375, -0.011474609375, 0.0594482421875, 0.02838134765625, 0.00405120849609375, 0.038238525390625, 0.00005412101745605469, 0.03106689453125, 0.04180908203125, 0.0175018310546875, 0.03924560546875, 0.0245819091796875, -0.052642822265625, 0.025238037109375, 0.036346435546875, 0.039520263671875, -0.00527191162109375, 0.035186767578125, -0.04736328125, -0.0004343986511230469, 0.053497314453125, 0.0090484619140625, -0.0258331298828125, 0.03955078125, 0.010101318359375, -0.00643157958984375, 0.0139312744140625, -0.03497314453125, 0.040618896484375, 0.00922393798828125, 0.03948974609375, 0.00850677490234375, 0.0188751220703125, 0.040771484375, -0.006534576416015625, 0.02423095703125, 0.0306396484375, -0.0438232421875, 0.060546875, 0.0499267578125, 0.015289306640625, -0.0054168701171875, 0.00738525390625, 0.039642333984375, 0.07354736328125, -0.045501708984375, -0.0261993408203125, 0.0285491943359375, 0.00274658203125, -0.017822265625, -0.037078857421875, -0.038482666015625, -0.049896240234375, -0.007328033447265625, -0.037322998046875, 0.0396728515625, 0.0697021484375, -0.0168914794921875, 0.0025634765625, 0.0254669189453125, -0.05816650390625, 0.039794921875, -0.038787841796875, 0.0088653564453125, 0.01494598388671875, 0.0238037109375, 0.01470947265625, 0.0440673828125, 0.05816650390625, -0.00525665283203125, 0.00567626953125, 0.00940704345703125, -0.0004067420959472656, -0.004062652587890625, -0.0112457275390625, -0.028045654296875, 0.0186309814453125, 0.0279083251953125, 0.01264190673828125, 0.01540374755859375, 0.055450439453125, 0.00983428955078125, -0.068359375, -0.007144927978515625, 0.0011720657348632812, -0.043304443359375, 0.039642333984375, -0.0278778076171875, 0.0117034912109375, -0.0027980804443359375, -0.00928497314453125, -0.046722412109375, 0.017730712890625, 0.007556915283203125, -0.002323150634765625, 0.0618896484375, 0.008209228515625, 0.00045037269592285156, 0.043487548828125, 0.00531005859375, 0.05279541015625, 0.038421630859375, -0.03448486328125, -0.01013946533203125, -0.0262451171875, -0.021087646484375, 0.004688262939453125, 0.0305328369140625, -0.01500701904296875, 0.0298309326171875, -0.0091552734375, -0.0147247314453125, 0.005046844482421875, 0.0206756591796875, -0.006397247314453125, 0.04168701171875, 0.020233154296875, 0.00650787353515625, -0.01483917236328125, -0.0166473388671875, 0.0131072998046875, 0.01190948486328125, 0.0177001953125, 0.005237579345703125, 0.0076904296875, 0.03363037109375, -0.0499267578125, 0.0156707763671875, -0.02587890625, -0.04241943359375, 0.0277252197265625, 0.0294342041015625, 0.0015344619750976562, -0.00983428955078125, 0.0164642333984375, 0.0297088623046875, 0.03912353515625, -0.0364990234375, 0.005672454833984375, -0.00457000732421875, 0.016326904296875, -0.019317626953125, -0.05120849609375, -0.03472900390625, -0.031890869140625, -0.0026302337646484375, 0.007640838623046875, -0.0159759521484375, -0.0255279541015625, -0.00560760498046875, -0.0026187896728515625, 0.0305938720703125, -0.01184844970703125, 0.028076171875, -0.01248931884765625, 0.060150146484375, 0.04071044921875, -0.0095977783203125, -0.0762939453125, 0.0241241455078125, -0.0087127685546875, 0.0142669677734375, 0.006076812744140625, 0.10101318359375, 0.0259552001953125, 0.0216522216796875, -0.010772705078125, -0.0249786376953125, 0.0240631103515625, 0.0059051513671875, -0.007183074951171875, -0.044219970703125, -0.0018434524536132812, -0.0291595458984375, -0.0736083984375, -0.035247802734375, -0.038665771484375, 0.013702392578125, 0.05255126953125, -0.00955963134765625, -0.00592041015625, -0.03692626953125, 0.029571533203125, 0.044219970703125, -0.00916290283203125, -0.043487548828125, 0.04095458984375, -0.0440673828125, 0.0214080810546875, -0.0009284019470214844, -0.06793212890625, 0.018218994140625, 0.044158935546875, 0.026123046875, -0.034637451171875, -0.047576904296875, 0.0191650390625, -0.027313232421875, 0.01500701904296875, 0.04864501953125, -0.006561279296875, -0.0168914794921875, -0.017547607421875, 0.0190887451171875, 0.01629638671875, 0.00888824462890625, -0.034423828125, 0.0116424560546875, -0.0134429931640625, -0.0175018310546875, -0.0577392578125, 0.023834228515625, -0.08929443359375, -0.0129241943359375, -0.0218658447265625, 0.015716552734375, 0.023040771484375, -0.0325927734375, -0.066650390625, 0.01329803466796875, -0.0023345947265625, -0.0258331298828125, -0.05712890625, -0.024993896484375, -0.006244659423828125, 0.046966552734375, 0.00018393993377685547, -0.041656494140625, -0.045196533203125, 0.05126953125, -0.0086517333984375, 0.05706787109375, -0.0175323486328125, 0.032745361328125, -0.02911376953125, 0.01617431640625, -0.0015916824340820312, 0.010345458984375, -0.0007834434509277344, 0.005016326904296875, -0.0018291473388671875, 0.0199737548828125, -0.0411376953125, -0.040740966796875, -0.0177001953125, -0.005916595458984375, -0.01039886474609375, -0.04986572265625, -0.046722412109375, -0.0364990234375, 0.033966064453125, 0.050262451171875, 0.00829315185546875, -0.00809478759765625, 0.0140228271484375, -0.007587432861328125, -0.0189971923828125, -0.02838134765625, -0.005767822265625, -0.046661376953125, -0.037109375, -0.0027637481689453125, -0.00762176513671875, -0.032928466796875, 0.011474609375, -0.0239105224609375, 0.0049591064453125, 0.053070068359375, 0.0162353515625, -0.023101806640625, 0.07122802734375, 0.036041259765625, -0.04949951171875, -0.021240234375, 0.005687713623046875, -0.02325439453125, -0.0013532638549804688, -0.03778076171875, 0.00812530517578125, -0.043304443359375, 0.0250701904296875, 0.044891357421875, 0.0066986083984375, 0.019317626953125, -0.01065826416015625, -0.032989501953125, -0.00860595703125, 0.0124664306640625, -0.0158538818359375, -0.002834320068359375, -0.0280609130859375, 0.041748046875, -0.0120391845703125, 0.072998046875, -0.00254058837890625, 0.0259552001953125, -0.02362060546875, 0.04034423828125, -0.022064208984375, -0.00684356689453125, -0.0017290115356445312, -0.022491455078125, 0.0256805419921875, 0.02191162109375, 0.00007390975952148438, 0.01378631591796875, -0.0152740478515625, 0.0274200439453125, -0.01503753662109375, -0.006389617919921875 ]
d7623920aae0b492c0bd8d68c8dce6e036ca9b77
Wordpress Stackexchange Q: How to set permalink structure via functions.php I'm setting up a Wordpress Network and wanted all new sites to have the same permalink structure (i.e. "/%year%/%monthnum%/%postname%/"). I'm wondering if this is possible to do via hooks or hacks in functions.php, without having to rely on users to choose that structure. A: Previous Answer is not working. I have gotten a pure solution. Can use Use this code. It will work 100%. Thanks /** * Rewrite set up, when theme activate i mean */ if (isset($_GET['activated']) && is_admin()) { global $wp_rewrite; $wp_rewrite->set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); } /** * Redirect to Permalink setting Page. * Otherwise Redirect rule will not work Properly. */ function redirect_to_permalink() { wp_redirect('options-permalink.php'); } add_action( 'after_switch_theme', 'redirect_to_permalink' );
Q: How to set permalink structure via functions.php I'm setting up a Wordpress Network and wanted all new sites to have the same permalink structure (i.e. "/%year%/%monthnum%/%postname%/"). I'm wondering if this is possible to do via hooks or hacks in functions.php, without having to rely on users to choose that structure. A: Previous Answer is not working. I have gotten a pure solution. Can use Use this code. It will work 100%. Thanks /** * Rewrite set up, when theme activate i mean */ if (isset($_GET['activated']) && is_admin()) { global $wp_rewrite; $wp_rewrite->set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); } /** * Redirect to Permalink setting Page. * Otherwise Redirect rule will not work Properly. */ function redirect_to_permalink() { wp_redirect('options-permalink.php'); } add_action( 'after_switch_theme', 'redirect_to_permalink' ); A: You can set the permalink structure by calling on the set_permalink_structure() method of the global $wp_rewrite object. add_action( 'init', function() { global $wp_rewrite; $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%postname%/' ); } ); Here's a PHP < 5.3 version of the code in case you're getting errors. function reset_permalinks() { global $wp_rewrite; $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%postname%/' ); } add_action( 'init', 'reset_permalinks' ); A: function setPermaLink(){ $ps = '/%category%/%postname%/'; $permalink_structure = sanitize_option( 'permalink_structure', $ps); $blog_prefix = '/blog'; $prefix = '/index.php'; if ( ! empty( $permalink_structure ) ) { $permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) ); if ( $prefix && $blog_prefix ) { $permalink_structure = $prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure ); } else { $permalink_structure = $blog_prefix . $permalink_structure; } } $wp_rewrite->set_permalink_structure( $permalink_structure ); flush_rewrite_rules(); } setPermaLink();
wordpress
{ "language": "en", "length": 245, "provenance": "stackexchange_00019.jsonl.gz:413881", "question_score": "10", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31207" }
[ 0.071044921875, -0.026458740234375, 0.0163421630859375, -0.0176239013671875, -0.01678466796875, -0.0278167724609375, 0.04144287109375, -0.0209197998046875, 0.0032901763916015625, -0.00982666015625, 0.007205963134765625, -0.007625579833984375, -0.015716552734375, -0.05645751953125, 0.034881591796875, 0.0036029815673828125, 0.03228759765625, -0.0654296875, -0.0204315185546875, -0.01605224609375, 0.020111083984375, 0.0146026611328125, 0.036773681640625, 0.024749755859375, 0.0238037109375, -0.025054931640625, 0.0819091796875, -0.04376220703125, 0.027099609375, -0.031707763671875, 0.014190673828125, -0.0147552490234375, 0.00482177734375, 0.01201629638671875, 0.0270843505859375, 0.033111572265625, 0.0202178955078125, 0.00039768218994140625, 0.0293121337890625, 0.0247039794921875, 0.01800537109375, -0.005168914794921875, 0.02459716796875, 0.051177978515625, 0.00876617431640625, -0.033843994140625, -0.005870819091796875, -0.087646484375, 0.0032863616943359375, -0.020721435546875, 0.0078277587890625, 0.0173187255859375, 0.03338623046875, -0.003177642822265625, -0.029937744140625, -0.029388427734375, 0.008758544921875, -0.041778564453125, 0.01092529296875, 0.0347900390625, -0.005401611328125, -0.003505706787109375, 0.007411956787109375, -0.03253173828125, -0.01276397705078125, -0.01361846923828125, -0.016510009765625, 0.04205322265625, -0.046173095703125, -0.0170745849609375, 0.041046142578125, -0.02972412109375, -0.021575927734375, -0.0256500244140625, 0.0115814208984375, 0.00925445556640625, -0.0013513565063476562, -0.0200653076171875, 0.002712249755859375, 0.0181732177734375, 0.026702880859375, -0.03350830078125, 0.004184722900390625, -0.034515380859375, 0.0631103515625, -0.0034637451171875, 0.006702423095703125, 0.0005621910095214844, -0.049072265625, -0.05548095703125, -0.044158935546875, -0.0333251953125, -0.045654296875, -0.0340576171875, -0.023284912109375, -0.0287933349609375, 0.03692626953125, 0.028045654296875, 0.0177764892578125, 0.0247955322265625, 0.0267181396484375, -0.0540771484375, 0.043365478515625, -0.030548095703125, -0.0171966552734375, 0.01031494140625, 0.032012939453125, 0.0006079673767089844, 0.006465911865234375, 0.005619049072265625, -0.0245513916015625, 0.033477783203125, -0.020233154296875, -0.00870513916015625, -0.0318603515625, 0.0181884765625, -0.05340576171875, -0.01232147216796875, -0.0095977783203125, 0.02471923828125, -0.0187225341796875, 0.032562255859375, -0.0031108856201171875, 0.007450103759765625, -0.00547027587890625, 0.0070343017578125, 0.0079803466796875, -0.044677734375, -0.0076751708984375, 0.009857177734375, -0.0284881591796875, -0.003753662109375, 0.0579833984375, 0.0660400390625, 0.036529541015625, -0.00994110107421875, 0.056793212890625, -0.043853759765625, -0.031097412109375, 0.0330810546875, 0.0113372802734375, -0.01113128662109375, -0.01540374755859375, -0.01541900634765625, -0.01427459716796875, 0.03955078125, 0.0277252197265625, 0.002956390380859375, -0.017974853515625, -0.04010009765625, -0.039215087890625, -0.006099700927734375, 0.01025390625, 0.0170440673828125, -0.034210205078125, -0.00511932373046875, -0.00344085693359375, 0.00414276123046875, -0.00780487060546875, -0.0251922607421875, 0.02899169921875, -0.01427459716796875, -0.023895263671875, -0.01155853271484375, -0.059600830078125, 0.0214385986328125, -0.047332763671875, -0.01428985595703125, 0.0179595947265625, -0.0024013519287109375, 0.007709503173828125, 0.006786346435546875, -0.0197906494140625, -0.0284271240234375, -0.00966644287109375, -0.0200042724609375, -0.01904296875, 0.0299224853515625, -0.00217437744140625, 0.0275421142578125, 0.0168914794921875, -0.03131103515625, 0.001941680908203125, 0.0126800537109375, -0.06658935546875, 0.047637939453125, 0.005886077880859375, 0.056182861328125, 0.0048828125, 0.012969970703125, 0.023223876953125, 0.021331787109375, -0.06976318359375, 0.00402069091796875, -0.0127716064453125, 0.006092071533203125, 0.0163421630859375, 0.004680633544921875, -0.00910186767578125, 0.00908660888671875, -0.0251312255859375, 0.0261383056640625, -0.0222320556640625, 0.043060302734375, 0.01302337646484375, 0.016204833984375, 0.00799560546875, 0.01459503173828125, 0.043212890625, 0.0266265869140625, 0.008148193359375, 0.0258941650390625, -0.0206756591796875, -0.0347900390625, -0.02032470703125, 0.074951171875, -0.00235748291015625, 0.0004863739013671875, -0.020843505859375, 0.00273895263671875, 0.0225372314453125, -0.0321044921875, 0.003192901611328125, 0.042083740234375, 0.02044677734375, -0.056182861328125, -0.00799560546875, -0.050079345703125, -0.038330078125, -0.00830078125, -0.0667724609375, 0.0667724609375, 0.007434844970703125, 0.0250244140625, -0.0212860107421875, 0.01163482666015625, 0.0011510848999023438, -0.01433563232421875, -0.005096435546875, 0.0269012451171875, 0.029388427734375, 0.0653076171875, -0.01800537109375, -0.00974273681640625, 0.01153564453125, -0.0838623046875, 0.0029048919677734375, 0.00023925304412841797, 0.0205535888671875, 0.0665283203125, -0.00380706787109375, 0.024139404296875, 0.0007815361022949219, -0.031036376953125, -0.00260162353515625, 0.047637939453125, -0.0239715576171875, -0.037384033203125, 0.022796630859375, 0.0018148422241210938, 0.01505279541015625, -0.006076812744140625, -0.0208587646484375, -0.0248260498046875, 0.0278167724609375, 0.01488494873046875, 0.01806640625, 0.020172119140625, -0.01483917236328125, 0.00450897216796875, 0.007152557373046875, -0.026397705078125, -0.0038814544677734375, 0.018310546875, 0.00792694091796875, -0.0504150390625, -0.03631591796875, 0.002300262451171875, 0.006214141845703125, -0.0020503997802734375, -0.0189971923828125, 0.0258026123046875, -0.01165771484375, -0.021209716796875, -0.00492095947265625, -0.0140228271484375, -0.0021305084228515625, -0.005886077880859375, 0.05938720703125, 0.01169586181640625, 0.051361083984375, -0.024993896484375, -0.030914306640625, 0.026092529296875, -0.002429962158203125, -0.05206298828125, 0.01312255859375, -0.04644775390625, 0.03546142578125, -0.032989501953125, 0.030853271484375, 0.059844970703125, 0.0057830810546875, -0.01061248779296875, 0.008087158203125, -0.0066070556640625, 0.00916290283203125, -0.0191497802734375, -0.03411865234375, -0.007167816162109375, -0.059417724609375, -0.020599365234375, 0.022796630859375, 0.0206756591796875, 0.0020694732666015625, -0.0247344970703125, -0.0020160675048828125, 0.0165863037109375, -0.06085205078125, -0.05023193359375, -0.0263824462890625, -0.02447509765625, 0.03887939453125, 0.017974853515625, 0.00440216064453125, -0.03729248046875, 0.027679443359375, 0.005279541015625, 0.0323486328125, -0.0208892822265625, -0.06072998046875, -0.0411376953125, -0.0648193359375, 0.0032100677490234375, -0.011199951171875, -0.00569915771484375, -0.0081787109375, -0.00553131103515625, -0.0146026611328125, -0.052581787109375, -0.013702392578125, 0.050323486328125, 0.01253509521484375, -0.0207061767578125, -0.016204833984375, -0.01079559326171875, 0.0280303955078125, -0.0180816650390625, 0.07232666015625, 0.044097900390625, -0.0404052734375, 0.004199981689453125, -0.0016698837280273438, -0.002323150634765625, 0.0234222412109375, 0.027740478515625, -0.006916046142578125, -0.0218505859375, 0.0192718505859375, -0.057098388671875, -0.043853759765625, -0.0192108154296875, -0.07049560546875, 0.004871368408203125, 0.031341552734375, 0.0014896392822265625, 0.004474639892578125, -0.00701141357421875, 0.00662994384765625, 0.0014019012451171875, 0.00852203369140625, -0.041961669921875, 0.0445556640625, 0.0035076141357421875, 0.020477294921875, -0.03851318359375, 0.0323486328125, -0.0200958251953125, 0.02899169921875, 0.01245880126953125, -0.021575927734375, -0.013916015625, -0.0220184326171875, -0.0523681640625, -0.07537841796875, 0.03204345703125, -0.10052490234375, -0.023651123046875, -0.049896240234375, -0.003246307373046875, 0.0169677734375, 0.08984375, 0.0089569091796875, -0.0082855224609375, -0.004192352294921875, -0.00814056396484375, -0.04412841796875, -0.01222991943359375, -0.040252685546875, 0.00801849365234375, -0.049224853515625, -0.0110015869140625, -0.0112152099609375, -0.024627685546875, -0.00769805908203125, -0.0311126708984375, -0.0312042236328125, -0.01971435546875, 0.034027099609375, 0.0518798828125, -0.0250244140625, 0.0285491943359375, -0.026611328125, 0.005756378173828125, -0.0257720947265625, 0.0362548828125, -0.07464599609375, -0.0200347900390625, 0.01372528076171875, 0.062103271484375, 0.0181427001953125, -0.058746337890625, -0.01922607421875, 0.053497314453125, -0.005710601806640625, 0.0032901763916015625, 0.0214996337890625, 0.0196685791015625, 0.0279541015625, -0.017303466796875, -0.009735107421875, -0.0208740234375, -0.0028896331787109375, -0.0223388671875, -0.0186614990234375, 0.018310546875, -0.03265380859375, 0.0106048583984375, -0.003063201904296875, -0.018524169921875, -0.08355712890625, 0.00600433349609375, -0.00879669189453125, 0.0272674560546875, -0.024322509765625, 0.00014400482177734375, -0.006603240966796875, -0.09796142578125, 0.04974365234375, -0.00843048095703125, -0.0009136199951171875, -0.003509521484375, 0.04437255859375, -0.005558013916015625, -0.025604248046875, -0.0270233154296875, 0.0208892822265625, 0.0253753662109375, -0.0206146240234375, 0.03436279296875, -0.016998291015625, -0.00809478759765625, 0.049163818359375, -0.032928466796875, -0.009185791015625, -0.038360595703125, 0.004425048828125, 0.01190948486328125, -0.01342010498046875, 0.01512908935546875, -0.0167999267578125, 0.06671142578125, 0.032196044921875, 0.006725311279296875, 0.0085906982421875, -0.00797271728515625, 0.00782012939453125, 0.01235198974609375, -0.010650634765625, -0.02532958984375, -0.0309906005859375, 0.0218658447265625, 0.0183258056640625, 0.0205535888671875, -0.01345062255859375, 0.0107879638671875, 0.01617431640625, 0.0265960693359375, 0.0066986083984375, 0.0098419189453125, -0.0011739730834960938, 0.011077880859375, 0.0377197265625, 0.0145263671875, 0.020477294921875, -0.0159454345703125, -0.00933074951171875, 0.0599365234375, 0.03057861328125, -0.000896453857421875, -0.0299530029296875, -0.01334381103515625, 0.0145111083984375, -0.017059326171875, -0.0200347900390625, 0.042572021484375, 0.043792724609375, 0.0015592575073242188, 0.00024080276489257812, -0.0247955322265625, 0.01053619384765625, -0.034881591796875, 0.0260467529296875, 0.0283050537109375, -0.007633209228515625, 0.0253143310546875, 0.061920166015625, 0.046661376953125, 0.0430908203125, -0.024383544921875, 0.00566864013671875, 0.055084228515625, 0.01152801513671875, 0.031219482421875, -0.0118560791015625, -0.01248931884765625, -0.0163726806640625, 0.019775390625, -0.038970947265625, -0.01181793212890625, 0.043121337890625, 0.057220458984375, 0.00344085693359375, -0.0008249282836914062, -0.004253387451171875, 0.0023956298828125, -0.01172637939453125, 0.0196533203125, -0.0272369384765625, -0.05645751953125, -0.026611328125, 0.025970458984375, 0.03497314453125, -0.032379150390625, -0.0030078887939453125, -0.0016689300537109375, -0.031402587890625, -0.00439453125, 0.034820556640625, -0.0164031982421875, -0.0035228729248046875, -0.005191802978515625, 0.0235595703125, -0.0196075439453125, 0.0162811279296875, -0.0445556640625, 0.0205535888671875, -0.05133056640625, -0.0150299072265625, 0.06939697265625, -0.0279541015625, 0.039398193359375, -0.0267333984375, -0.0142059326171875, 0.0167083740234375, -0.016357421875, 0.07171630859375, 0.04461669921875, -0.08172607421875, 0.00218963623046875, -0.0169219970703125, 0.00783538818359375, -0.03656005859375, -0.006313323974609375, -0.02777099609375, 0.01192474365234375, 0.02496337890625, 0.0189666748046875, 0.01366424560546875, 0.00597381591796875, -0.00791168212890625, 0.037628173828125, 0.004772186279296875, 0.038330078125, -0.0159454345703125, 0.072265625, -0.01373291015625, 0.061309814453125, -0.00637054443359375, 0.0147552490234375, -0.031463623046875, -0.01548004150390625, 0.00211334228515625, -0.043548583984375, -0.042205810546875, -0.00588226318359375, -0.02996826171875, 0.03240966796875, 0.062255859375, -0.00954437255859375, 0.007694244384765625, -0.00032639503479003906, 0.0157470703125, -0.04522705078125, -0.01311492919921875, -0.05267333984375, 0.00734710693359375, -0.044158935546875, 0.03924560546875, 0.06744384765625, -0.035858154296875, -0.045196533203125, 0.01165771484375, 0.01200103759765625, 0.03729248046875, -0.00811767578125, -0.073974609375, 0.02655029296875, 0.0257110595703125, 0.033935546875, 0.04296875, -0.0230255126953125, 0.016143798828125, 0.024261474609375, -0.0180816650390625, 0.04864501953125, 0.02752685546875, 0.06231689453125, -0.01245880126953125, 0.031280517578125, 0.04180908203125, -0.00884246826171875, -0.017333984375, 0.056732177734375, 0.03668212890625, -0.0894775390625, -0.0022563934326171875, -0.004268646240234375, 0.01425933837890625, 0.056427001953125, -0.01064300537109375, -0.00302886962890625, 0.0030231475830078125, 0.031158447265625, -0.012603759765625, -0.01282501220703125, 0.01520538330078125, 0.00867462158203125, -0.0135955810546875, -0.0095672607421875, 0.0259857177734375, 0.01352691650390625, 0.0224456787109375, -0.025421142578125, -0.00479888916015625, 0.0032405853271484375, 0.000005900859832763672, 0.00029778480529785156, -0.02435302734375, -0.0224609375, -0.011322021484375, 0.0013904571533203125, -0.045806884765625, 0.0202484130859375, 0.0036373138427734375, -0.0389404296875, -0.01146697998046875, 0.0421142578125, -0.045562744140625, 0.01409912109375, 0.021636962890625, -0.0362548828125, -0.017913818359375, -0.037200927734375, 0.0041961669921875, -0.04083251953125, -0.006290435791015625, 0.015106201171875, -0.03375244140625, -0.052978515625, -0.007518768310546875, -0.0255279541015625, 0.072021484375, -0.00867462158203125, -0.026641845703125, 0.0211639404296875, -0.0136871337890625, -0.023590087890625, 0.0013189315795898438, 0.0111541748046875, -0.037261962890625, -0.03826904296875, -0.006938934326171875, -0.0443115234375, -0.0171661376953125, -0.03228759765625, -0.05169677734375, 0.111083984375, -0.02667236328125, 0.03271484375, 0.050628662109375, 0.028961181640625, -0.0343017578125, 0.0027103424072265625, -0.04608154296875, 0.061981201171875, 0.0214996337890625, 0.035186767578125, -0.039581298828125, -0.00846099853515625, 0.006572723388671875, 0.020660400390625, 0.07916259765625, 0.0280914306640625, -0.06890869140625, 0.00327301025390625, 0.07476806640625, 0.040069580078125, 0.00299835205078125, 0.042266845703125, -0.036773681640625, 0.019195556640625, 0.022796630859375, -0.0394287109375, 0.004474639892578125, 0.02117919921875, -0.050262451171875, 0.0086517333984375, 0.01395416259765625, 0.0168609619140625, -0.0285186767578125, -0.032958984375, -0.072021484375, -0.007801055908203125, 0.06640625, -0.00774383544921875, 0.0110626220703125, -0.006420135498046875, 0.0295562744140625, -0.070556640625, -0.006801605224609375, -0.02093505859375, 0.04541015625, 0.00891876220703125, 0.0037555694580078125, 0.004940032958984375, 0.0106658935546875, 0.0190277099609375, 0.0071258544921875, 0.00966644287109375, 0.0230865478515625, -0.01049041748046875, 0.0579833984375, 0.034088134765625, 0.0205230712890625, -0.0151519775390625, -0.050872802734375, 0.043426513671875, 0.0804443359375, -0.0194244384765625, -0.0177764892578125, 0.0065765380859375, 0.0268402099609375, 0.0142822265625, 0.007720947265625, 0.050994873046875, 0.0162506103515625, 0.03204345703125, -0.0035915374755859375, -0.0250244140625, 0.024749755859375, 0.0229339599609375, 0.0094146728515625, -0.01165008544921875, -0.028594970703125, -0.0020465850830078125, -0.06427001953125, 0.047332763671875, 0.0209503173828125, 0.05450439453125, -0.01763916015625, 0.078125, -0.00004273653030395508, -0.0242462158203125, 0.01678466796875, 0.00514984130859375, -0.01543426513671875, -0.0223541259765625, -0.004329681396484375, -0.039886474609375, 0.0011272430419921875, 0.0341796875, 0.030242919921875, 0.03009033203125, 0.0231781005859375, -0.000621795654296875, 0.01666259765625, 0.004688262939453125, 0.01108551025390625, -0.02362060546875, 0.048492431640625, -0.00879669189453125, 0.006038665771484375, -0.017486572265625, -0.01485443115234375, -0.04449462890625, 0.034210205078125, 0.00913238525390625, -0.020355224609375, 0.035552978515625, -0.002529144287109375, -0.01186370849609375, 0.015411376953125, 0.00397491455078125, 0.056610107421875, 0.0145721435546875, -0.017181396484375, -0.0125579833984375, -0.0289306640625, -0.0750732421875, 0.045623779296875, 0.057037353515625, 0.03961181640625, -0.054962158203125, -0.0201263427734375, 0.00357818603515625, 0.037628173828125, -0.0299835205078125, -0.002063751220703125, 0.033172607421875, 0.0190887451171875, 0.0136566162109375, -0.0584716796875, -0.0229644775390625, -0.0308074951171875, 0.015350341796875, 0.0086212158203125, 0.11181640625, -0.0251617431640625, 0.0142364501953125, -0.0177459716796875, 0.00998687744140625, -0.015869140625, -0.0197906494140625, 0.04559326171875, -0.01459503173828125, -0.01090240478515625, -0.001049041748046875, -0.0304107666015625, -0.00199127197265625, 0.0273590087890625, -0.03887939453125, 0.006740570068359375, -0.0182952880859375, 0.0260467529296875, -0.004718780517578125, 0.03546142578125, -0.031097412109375, -0.06060791015625, -0.03338623046875, 0.0179595947265625, -0.01166534423828125, 0.01424407958984375, 0.0141754150390625, 0.047637939453125, 0.0022945404052734375, -0.01605224609375, 0.0040130615234375, -0.046142578125, -0.005229949951171875, 0.025848388671875, 0.0164642333984375, -0.033477783203125, 0.03204345703125, -0.0151519775390625, -0.0113983154296875, 0.0196075439453125, 0.00884246826171875, 0.0237579345703125, -0.0163116455078125, -0.0272064208984375, -0.002239227294921875, -0.01309967041015625, -0.0161590576171875, -0.00989532470703125, 0.0128173828125, -0.035430908203125, -0.0016069412231445312, -0.0217437744140625, -0.0230865478515625, -0.0246734619140625, 0.0088043212890625, 0.026092529296875, 0.01409149169921875, -0.024505615234375, -0.013885498046875, 0.0244598388671875, 0.01125335693359375, 0.0011053085327148438, -0.05157470703125, 0.038604736328125, -0.04058837890625, 0.06695556640625, -0.041778564453125, -0.0255889892578125, 0.0157623291015625, 0.0095062255859375, -0.043701171875, -0.03314208984375, -0.0487060546875, 0.006290435791015625, -0.044525146484375, 0.0005159378051757812, 0.043212890625, -0.00521087646484375, -0.0084381103515625, -0.00440216064453125, -0.024444580078125, 0.057159423828125, -0.060699462890625, -0.02105712890625, 0.02044677734375, 0.008636474609375, 0.0083465576171875, -0.053009033203125, -0.01263427734375, -0.01068878173828125, 0.0225830078125, -0.00986480712890625, -0.04217529296875, -0.02392578125, -0.060577392578125, -0.07080078125, 0.019195556640625, -0.003662109375, -0.03460693359375, -0.04583740234375, -0.0023555755615234375, -0.003021240234375, 0.046142578125, 0.005275726318359375, -0.0127410888671875, -0.0259246826171875, 0.017059326171875, 0.0016241073608398438, 0.016754150390625, 0.0021820068359375, 0.0305633544921875, -0.00530242919921875, 0.043365478515625, 0.031402587890625, -0.0107421875, 0.043792724609375, -0.044525146484375, 0.061126708984375, 0.04095458984375, -0.0416259765625, 0.009613037109375, -0.0172882080078125, -0.005817413330078125, -0.0175018310546875, -0.054962158203125, -0.00894927978515625, -0.020050048828125, 0.08367919921875, -0.001689910888671875, 0.01541900634765625, -0.01953125, -0.050506591796875, -0.01131439208984375, -0.015533447265625, -0.024505615234375, 0.03387451171875, -0.08941650390625, -0.0078887939453125, -0.0080108642578125, 0.0087127685546875, -0.0205535888671875, 0.0006561279296875, -0.0099334716796875, -0.0089111328125, 0.01708984375, -0.009002685546875, 0.0165863037109375, -0.00665283203125, 0.068115234375, -0.057769775390625, -0.0406494140625, -0.005313873291015625, 0.0236358642578125, -0.02508544921875, -0.0631103515625, 0.01401519775390625, 0.045928955078125, -0.025634765625, -0.016998291015625, 0.031036376953125, 0.0244903564453125, -0.00696563720703125, -0.00969696044921875, 0.00572967529296875, 0.0233154296875, -0.0120391845703125, 0.011383056640625, -0.0212249755859375, 0.0657958984375, 0.0022411346435546875, 0.0667724609375, 0.0023975372314453125, 0.02825927734375, -0.0008678436279296875, 0.041046142578125, -0.0701904296875, 0.0078582763671875, -0.0631103515625, -0.039093017578125, 0.01309967041015625, 0.0309600830078125, 0.031890869140625, -0.01666259765625, 0.036712646484375, -0.056854248046875, 0.0288848876953125, 0.01454925537109375 ]
9a844351bb66f93c6cab8d71896dd00e4b5a0c78
Wordpress Stackexchange Q: How to enable user_can_rich_edit for guests? Using wp 3.3beta1 with the wp_editor on the front-end for bbPress. When calling the editor on the front end, how do I allow a guest to see the visual editor? I only see options to disable the visual editor site wide, or on a per user basis, but no option to allow guests to use visual? A: Just add the can_richedit capability to the user you want to be able to use the editor. You can use the Capability Manager to do it. Update: to enable the rich editor on anonymous/guest users, add this to your funcitons.php or anywhere you like, just make sure it comes before the wp_editor() call. add_filter('user_can_richedit', '__return_true');
Q: How to enable user_can_rich_edit for guests? Using wp 3.3beta1 with the wp_editor on the front-end for bbPress. When calling the editor on the front end, how do I allow a guest to see the visual editor? I only see options to disable the visual editor site wide, or on a per user basis, but no option to allow guests to use visual? A: Just add the can_richedit capability to the user you want to be able to use the editor. You can use the Capability Manager to do it. Update: to enable the rich editor on anonymous/guest users, add this to your funcitons.php or anywhere you like, just make sure it comes before the wp_editor() call. add_filter('user_can_richedit', '__return_true');
wordpress
{ "language": "en", "length": 119, "provenance": "stackexchange_00019.jsonl.gz:413885", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31214" }
[ 0.06689453125, -0.029052734375, 0.031341552734375, -0.0270538330078125, -0.002788543701171875, -0.02642822265625, 0.033233642578125, -0.028839111328125, 0.047698974609375, 0.023834228515625, -0.019500732421875, -0.05133056640625, 0.0045623779296875, -0.0189361572265625, -0.07623291015625, -0.031707763671875, 0.0238800048828125, -0.0106964111328125, 0.0182647705078125, -0.01044464111328125, 0.00843048095703125, 0.0074310302734375, 0.0276947021484375, -0.020721435546875, 0.025390625, 0.055450439453125, 0.0203704833984375, -0.0266876220703125, 0.032440185546875, 0.01290130615234375, 0.0256500244140625, -0.05938720703125, 0.0274658203125, 0.045166015625, -0.0723876953125, 0.0116119384765625, -0.041839599609375, 0.0208282470703125, -0.00457763671875, 0.0125579833984375, 0.0084991455078125, -0.0024318695068359375, -0.04791259765625, -0.018768310546875, -0.048309326171875, -0.01126861572265625, -0.01024627685546875, 0.0079803466796875, 0.021148681640625, -0.00536346435546875, 0.023468017578125, 0.043304443359375, 0.04107666015625, -0.043609619140625, 0.006801605224609375, 0.0264434814453125, -0.0177459716796875, -0.01132965087890625, 0.0277099609375, 0.01995849609375, -0.00826263427734375, -0.03387451171875, 0.02459716796875, -0.03692626953125, -0.0159759521484375, -0.0145111083984375, -0.0300140380859375, 0.0220489501953125, -0.0166015625, -0.030548095703125, -0.003910064697265625, -0.0177764892578125, 0.0259857177734375, -0.0096893310546875, -0.01141357421875, -0.01910400390625, -0.028076171875, -0.0310516357421875, 0.0439453125, -0.021942138671875, -0.0233306884765625, -0.003093719482421875, -0.044158935546875, 0.00016033649444580078, -0.03125, 0.013336181640625, -0.0162811279296875, -0.0005316734313964844, -0.004180908203125, 0.00626373291015625, 0.003948211669921875, -0.0055389404296875, -0.038238525390625, 0.07147216796875, 0.0246124267578125, -0.01354217529296875, 0.027618408203125, 0.027374267578125, -0.0185699462890625, 0.0166778564453125, 0.05035400390625, -0.07965087890625, 0.094482421875, -0.045074462890625, -0.0152435302734375, -0.039154052734375, 0.00215911865234375, 0.03277587890625, 0.036346435546875, 0.051605224609375, -0.0155487060546875, 0.044647216796875, 0.0201568603515625, 0.00678253173828125, -0.0003981590270996094, -0.0179443359375, -0.03619384765625, 0.044097900390625, -0.01451873779296875, 0.0257110595703125, -0.0008955001831054688, 0.035919189453125, -0.03875732421875, 0.015045166015625, -0.02618408203125, -0.0157623291015625, 0.005420684814453125, -0.01099395751953125, -0.0113677978515625, 0.02923583984375, -0.0513916015625, 0.0200347900390625, 0.0782470703125, 0.023956298828125, 0.0009489059448242188, -0.024169921875, 0.0027599334716796875, -0.029510498046875, -0.0113677978515625, -0.0023632049560546875, 0.0201416015625, 0.01230621337890625, 0.023712158203125, -0.0005965232849121094, -0.004482269287109375, 0.0535888671875, 0.0217437744140625, -0.0081634521484375, -0.0305023193359375, -0.047027587890625, -0.00811004638671875, -0.026641845703125, -0.01116180419921875, 0.041015625, 0.048980712890625, -0.025665283203125, 0.07586669921875, -0.0494384765625, 0.0293121337890625, -0.04510498046875, -0.0014858245849609375, -0.006908416748046875, 0.040313720703125, -0.0179443359375, -0.0152587890625, 0.005374908447265625, -0.03033447265625, -0.006885528564453125, 0.02850341796875, 0.018218994140625, 0.033172607421875, -0.06024169921875, 0.028594970703125, 0.01111602783203125, -0.02020263671875, 0.04473876953125, 0.0178375244140625, 0.03753662109375, 0.003597259521484375, 0.0355224609375, 0.0191192626953125, -0.03924560546875, 0.065185546875, -0.01947021484375, -0.047271728515625, 0.01507568359375, -0.01366424560546875, 0.04669189453125, 0.06243896484375, 0.01216888427734375, -0.0287933349609375, -0.0103759765625, 0.045745849609375, -0.0128173828125, 0.01666259765625, -0.07666015625, 0.013580322265625, -0.043701171875, -0.0087127685546875, 0.02117919921875, 0.0753173828125, -0.0269622802734375, 0.0570068359375, -0.07891845703125, -0.07830810546875, 0.0157470703125, -0.042327880859375, 0.044189453125, 0.06781005859375, 0.0026912689208984375, -0.028564453125, -0.04833984375, 0.00875091552734375, 0.02325439453125, -0.055023193359375, 0.00246429443359375, -0.004749298095703125, 0.10205078125, 0.044219970703125, 0.037872314453125, 0.0728759765625, -0.05126953125, 0.0897216796875, -0.0266571044921875, 0.00421905517578125, -0.006908416748046875, -0.01204681396484375, 0.0028820037841796875, 0.03216552734375, 0.0010614395141601562, 0.05377197265625, -0.007503509521484375, 0.0012722015380859375, 0.0268096923828125, 0.0006732940673828125, 0.00725555419921875, -0.00669097900390625, -0.055328369140625, 0.00972747802734375, 0.0286102294921875, 0.052001953125, 0.0271148681640625, 0.0030918121337890625, -0.0295562744140625, 0.04888916015625, -0.0266265869140625, 0.0244293212890625, -0.046661376953125, 0.0059661865234375, 0.069091796875, -0.019989013671875, 0.036468505859375, -0.0072479248046875, -0.031494140625, 0.001697540283203125, 0.0288543701171875, 0.02001953125, 0.019683837890625, 0.0280303955078125, 0.0017757415771484375, -0.00740814208984375, 0.0007367134094238281, -0.01306915283203125, -0.0051727294921875, -0.0158233642578125, 0.01018524169921875, 0.032012939453125, 0.021881103515625, -0.0161590576171875, -0.005481719970703125, 0.0078277587890625, 0.022430419921875, -0.0118408203125, 0.00627899169921875, 0.0305023193359375, 0.0306549072265625, -0.0244293212890625, 0.005252838134765625, -0.002857208251953125, 0.0154876708984375, -0.0196685791015625, -0.01143646240234375, -0.01556396484375, -0.0067291259765625, -0.00862884521484375, -0.06170654296875, 0.027069091796875, 0.01276397705078125, -0.020294189453125, 0.0015134811401367188, 0.0303497314453125, 0.035400390625, 0.00982666015625, 0.0031261444091796875, -0.0299072265625, 0.01491546630859375, -0.0205078125, -0.07000732421875, 0.04461669921875, -0.04656982421875, 0.0379638671875, 0.076171875, 0.00647735595703125, 0.0113067626953125, 0.0079803466796875, -0.0170440673828125, -0.0118560791015625, 0.045318603515625, 0.0162506103515625, -0.0419921875, -0.0189056396484375, 0.00818634033203125, 0.01558685302734375, -0.01433563232421875, 0.00760650634765625, -0.02532958984375, -0.0194244384765625, 0.01128387451171875, -0.04803466796875, -0.0119171142578125, -0.01947021484375, -0.0433349609375, -0.045654296875, 0.0015411376953125, -0.0335693359375, 0.0162506103515625, 0.01983642578125, -0.0024776458740234375, 0.006999969482421875, -0.00785064697265625, 0.056976318359375, 0.00930023193359375, -0.005279541015625, -0.065185546875, 0.01036834716796875, -0.032684326171875, -0.004367828369140625, 0.042724609375, -0.0120086669921875, -0.03167724609375, -0.027252197265625, -0.042083740234375, -0.006877899169921875, -0.0270843505859375, -0.00859832763671875, 0.0223541259765625, -0.024993896484375, 0.00872802734375, 0.00864410400390625, 0.0113067626953125, -0.0217437744140625, -0.0032100677490234375, -0.03570556640625, -0.0202484130859375, 0.004436492919921875, -0.0179595947265625, 0.0195159912109375, 0.0168609619140625, 0.0313720703125, -0.02142333984375, 0.0416259765625, -0.0164337158203125, -0.0223388671875, -0.03179931640625, 0.0023345947265625, -0.00267791748046875, -0.025299072265625, -0.0268402099609375, 0.005767822265625, 0.009765625, 0.0164947509765625, -0.006561279296875, 0.0076904296875, -0.0310211181640625, -0.0165863037109375, -0.02880859375, 0.0160369873046875, -0.0209197998046875, 0.0242919921875, -0.01837158203125, -0.020416259765625, -0.0587158203125, 0.0484619140625, -0.07373046875, 0.01503753662109375, 0.00858306884765625, -0.0103302001953125, 0.0224456787109375, -0.0030670166015625, -0.00432586669921875, -0.006778717041015625, 0.01467132568359375, 0.004032135009765625, 0.00661468505859375, -0.0192108154296875, -0.019989013671875, -0.03057861328125, 0.02386474609375, -0.06878662109375, 0.017852783203125, -0.07562255859375, 0.0286712646484375, -0.010223388671875, -0.01849365234375, -0.02227783203125, -0.035125732421875, -0.044342041015625, -0.04949951171875, 0.05023193359375, -0.04583740234375, 0.0019102096557617188, 0.0318603515625, -0.03985595703125, -0.005336761474609375, -0.0582275390625, -0.0156097412109375, -0.09368896484375, -0.0082550048828125, -0.052276611328125, 0.0572509765625, 0.007251739501953125, 0.017059326171875, -0.00787353515625, 0.04864501953125, 0.0380859375, 0.023529052734375, -0.0011625289916992188, -0.04351806640625, 0.042449951171875, -0.0168304443359375, -0.01195526123046875, -0.00937652587890625, 0.021759033203125, 0.0186920166015625, -0.056671142578125, -0.0198974609375, -0.041290283203125, -0.030029296875, 0.038330078125, -0.057464599609375, -0.033050537109375, -0.02227783203125, -0.0548095703125, -0.003582000732421875, -0.01560211181640625, -0.029510498046875, -0.0301361083984375, -0.07110595703125, 0.048370361328125, -0.0458984375, 0.00913238525390625, 0.002857208251953125, 0.06646728515625, -0.0040130615234375, -0.007049560546875, -0.0131072998046875, 0.031341552734375, 0.051605224609375, 0.046173095703125, -0.0007567405700683594, -0.005863189697265625, -0.04901123046875, 0.048583984375, 0.049530029296875, 0.006633758544921875, -0.03204345703125, 0.00875091552734375, 0.00691986083984375, -0.0308990478515625, 0.0279693603515625, -0.002193450927734375, 0.0222015380859375, 0.0255889892578125, -0.01018524169921875, 0.0256195068359375, 0.0005745887756347656, 0.00870513916015625, 0.00015795230865478516, -0.038177490234375, -0.0207977294921875, -0.04132080078125, 0.00716400146484375, -0.002651214599609375, 0.01013946533203125, 0.0011491775512695312, 0.01525115966796875, 0.005352020263671875, 0.039947509765625, -0.026214599609375, 0.04205322265625, 0.0242462158203125, 0.0169219970703125, 0.02838134765625, -0.0157012939453125, -0.0252838134765625, 0.0008711814880371094, 0.0006623268127441406, 0.01215362548828125, -0.0328369140625, -0.05755615234375, -0.057281494140625, -0.0012598037719726562, 0.0567626953125, 0.0275115966796875, 0.0178375244140625, 0.0153045654296875, 0.040435791015625, 0.005321502685546875, -0.005001068115234375, 0.035369873046875, 0.039459228515625, -0.0200958251953125, -0.007476806640625, -0.020782470703125, -0.00010311603546142578, 0.005695343017578125, 0.040557861328125, -0.00400543212890625, 0.022491455078125, -0.01251983642578125, 0.043212890625, 0.0389404296875, -0.032501220703125, 0.0103759765625, 0.067626953125, -0.018310546875, -0.037139892578125, 0.0018367767333984375, -0.0469970703125, -0.040435791015625, -0.005916595458984375, 0.04827880859375, 0.008575439453125, 0.0092010498046875, 0.00641632080078125, 0.0009684562683105469, -0.0082855224609375, 0.0244903564453125, 0.0173187255859375, -0.0205230712890625, -0.01383209228515625, 0.002597808837890625, 0.0161590576171875, -0.008636474609375, 0.0112457275390625, -0.0147705078125, -0.0259857177734375, -0.0200042724609375, 0.009674072265625, -0.0279998779296875, -0.02252197265625, -0.0154266357421875, -0.0125274658203125, -0.025115966796875, 0.02996826171875, -0.06256103515625, 0.035552978515625, -0.03021240234375, -0.0229034423828125, 0.0421142578125, -0.032623291015625, 0.004566192626953125, -0.03802490234375, 0.03363037109375, -0.05047607421875, 0.003582000732421875, 0.0623779296875, 0.056793212890625, -0.0286407470703125, -0.006366729736328125, -0.060302734375, -0.0085906982421875, 0.0286712646484375, -0.0246734619140625, -0.01776123046875, -0.0245819091796875, -0.031219482421875, 0.016326904296875, -0.02703857421875, 0.00945281982421875, -0.00942230224609375, 0.0634765625, 0.0032291412353515625, 0.09686279296875, 0.014617919921875, 0.007213592529296875, -0.0081939697265625, 0.0753173828125, 0.0166778564453125, -0.0022735595703125, -0.02703857421875, -0.049957275390625, -0.0016927719116210938, -0.0189208984375, -0.0284271240234375, -0.0286865234375, 0.01763916015625, 0.031341552734375, 0.052337646484375, -0.01934814453125, -0.0029926300048828125, -0.0299835205078125, 0.00031685829162597656, -0.01800537109375, 0.0097808837890625, -0.0218048095703125, -0.0220794677734375, -0.00774383544921875, -0.037567138671875, -0.00513458251953125, -0.005374908447265625, -0.0309295654296875, 0.020172119140625, -0.00469207763671875, 0.01030731201171875, 0.032623291015625, -0.036773681640625, 0.057342529296875, 0.06756591796875, 0.0113983154296875, 0.03387451171875, 0.00885772705078125, 0.0025691986083984375, 0.004825592041015625, 0.0200958251953125, 0.00984954833984375, 0.009979248046875, -0.012054443359375, -0.01375579833984375, 0.039093017578125, -0.02618408203125, 0.004756927490234375, 0.0148773193359375, 0.070556640625, 0.07391357421875, -0.0848388671875, -0.006103515625, 0.016998291015625, -0.02691650390625, 0.01406097412109375, 0.02288818359375, -0.0007328987121582031, -0.05224609375, 0.05084228515625, -0.053009033203125, 0.01195526123046875, 0.028594970703125, -0.046783447265625, -0.00452423095703125, -0.032684326171875, 0.03533935546875, 0.01227569580078125, 0.00421905517578125, 0.0028514862060546875, 0.00867462158203125, -0.007537841796875, -0.02740478515625, -0.00528717041015625, 0.00690460205078125, -0.037109375, -0.10235595703125, -0.034149169921875, 0.0159912109375, -0.0219573974609375, 0.0220947265625, -0.00965118408203125, 0.0057220458984375, 0.0595703125, -0.05438232421875, 0.06500244140625, 0.0150146484375, -0.0119476318359375, 0.059783935546875, -0.03814697265625, -0.02545166015625, 0.0343017578125, -0.045623779296875, 0.0014181137084960938, 0.0246429443359375, 0.005870819091796875, -0.0182952880859375, -0.00601959228515625, 0.03765869140625, 0.043731689453125, -0.0528564453125, 0.02630615234375, 0.007049560546875, -0.00970458984375, 0.02294921875, -0.0225677490234375, -0.0361328125, -0.03375244140625, 0.01253509521484375, -0.06024169921875, 0.0214385986328125, 0.0411376953125, -0.06671142578125, 0.07647705078125, 0.0008540153503417969, 0.02301025390625, -0.00022864341735839844, 0.0226287841796875, -0.04296875, -0.0161590576171875, -0.0181884765625, 0.037322998046875, -0.007320404052734375, 0.046905517578125, -0.046478271484375, -0.0053558349609375, 0.0144500732421875, 0.05712890625, 0.046844482421875, 0.0069732666015625, -0.031890869140625, -0.02264404296875, 0.03558349609375, 0.0423583984375, -0.004302978515625, 0.0292510986328125, 0.0141448974609375, -0.0298309326171875, -0.01096343994140625, 0.01316070556640625, 0.0258941650390625, -0.041656494140625, -0.0189971923828125, 0.01056671142578125, -0.004512786865234375, -0.0036754608154296875, 0.01849365234375, 0.0290374755859375, -0.01053619384765625, 0.0023746490478515625, 0.018157958984375, -0.058135986328125, -0.037139892578125, 0.01280975341796875, -0.017669677734375, -0.038665771484375, -0.0272674560546875, -0.0274200439453125, 0.0186614990234375, 0.012420654296875, -0.029449462890625, 0.04754638671875, 0.005779266357421875, -0.0411376953125, 0.03802490234375, 0.006256103515625, 0.0035419464111328125, 0.0214691162109375, 0.030975341796875, 0.0020046234130859375, 0.005825042724609375, -0.041778564453125, -0.00847625732421875, 0.0108642578125, 0.02777099609375, -0.0299072265625, -0.01412200927734375, 0.01238250732421875, 0.01224517822265625, -0.0177764892578125, -0.007198333740234375, -0.013824462890625, 0.020965576171875, 0.049072265625, -0.0307159423828125, 0.0013895034790039062, 0.020660400390625, 0.0260009765625, -0.0137786865234375, -0.0146331787109375, -0.0104522705078125, 0.00371551513671875, -0.0008568763732910156, 0.00605010986328125, 0.001056671142578125, -0.03717041015625, -0.0019464492797851562, -0.00939178466796875, 0.060394287109375, 0.03546142578125, -0.033538818359375, 0.04718017578125, 0.027191162109375, 0.01145172119140625, -0.039215087890625, -0.02410888671875, 0.0297393798828125, 0.028961181640625, -0.016754150390625, 0.019989013671875, 0.038909912109375, 0.03143310546875, -0.01535797119140625, -0.0294189453125, 0.005092620849609375, -0.0301971435546875, -0.00955963134765625, 0.0017604827880859375, -0.0205535888671875, 0.007602691650390625, -0.0137176513671875, -0.035125732421875, 0.041351318359375, 0.0158538818359375, -0.0333251953125, 0.04925537109375, -0.0008683204650878906, 0.0001741647720336914, 0.01000213623046875, -0.01275634765625, -0.0114898681640625, -0.0034465789794921875, -0.0350341796875, 0.0009217262268066406, -0.040069580078125, -0.0087432861328125, 0.0163116455078125, 0.0261077880859375, -0.0235137939453125, 0.05780029296875, -0.009613037109375, 0.005077362060546875, 0.0257415771484375, 0.001201629638671875, -0.0259246826171875, -0.006137847900390625, 0.0413818359375, -0.022064208984375, -0.05950927734375, -0.025238037109375, -0.0328369140625, 0.0299835205078125, 0.01045989990234375, 0.11962890625, -0.034820556640625, 0.016693115234375, -0.03240966796875, 0.0211334228515625, 0.0005054473876953125, -0.0204925537109375, -0.0010709762573242188, 0.06646728515625, 0.034942626953125, -0.0313720703125, -0.0438232421875, 0.032562255859375, 0.0108184814453125, 0.01036834716796875, 0.019134521484375, -0.0181121826171875, 0.0155181884765625, 0.019561767578125, 0.018463134765625, -0.0247802734375, -0.0180511474609375, 0.006744384765625, 0.0057220458984375, -0.01024627685546875, -0.00821685791015625, 0.00402069091796875, -0.009521484375, -0.004978179931640625, -0.0268707275390625, 0.005939483642578125, 0.0026340484619140625, -0.0032901763916015625, 0.014984130859375, 0.00339508056640625, -0.0211029052734375, 0.0168304443359375, -0.00971221923828125, 0.0150604248046875, 0.0013475418090820312, 0.0155029296875, 0.0229339599609375, -0.08184814453125, 0.035125732421875, -0.0223236083984375, 0.02374267578125, -0.0308837890625, -0.0240020751953125, 0.01505279541015625, 0.0032367706298828125, -0.01206207275390625, -0.0300140380859375, -0.039154052734375, -0.045440673828125, 0.0116424560546875, 0.031341552734375, -0.0137786865234375, -0.04229736328125, -0.08148193359375, 0.01015472412109375, 0.003704071044921875, -0.00861358642578125, -0.066650390625, 0.033355712890625, -0.0169219970703125, 0.0589599609375, -0.047088623046875, -0.003803253173828125, 0.01085662841796875, 0.018218994140625, -0.0280303955078125, -0.0012302398681640625, -0.01261138916015625, 0.006805419921875, -0.001018524169921875, 0.0355224609375, 0.052276611328125, -0.02178955078125, -0.01995849609375, 0.04766845703125, 0.0236663818359375, 0.087646484375, 0.0017499923706054688, -0.041748046875, -0.0135345458984375, 0.00606536865234375, 0.0264892578125, -0.0225677490234375, -0.0122528076171875, -0.017547607421875, 0.0028018951416015625, 0.01238250732421875, -0.0035953521728515625, 0.01096343994140625, -0.057403564453125, -0.133544921875, 0.022003173828125, -0.00601959228515625, -0.05670166015625, -0.0078277587890625, -0.0171356201171875, -0.0146636962890625, 0.0148468017578125, -0.0006580352783203125, -0.02447509765625, -0.007671356201171875, 0.02728271484375, 0.01300048828125, -0.0034198760986328125, 0.015625, 0.01346588134765625, -0.03936767578125, 0.01537322998046875, 0.0031890869140625, -0.02142333984375, -0.000911712646484375, -0.0011243820190429688, 0.0084686279296875, 0.031463623046875, -0.02801513671875, -0.028900146484375, -0.009979248046875, -0.01654052734375, -0.0022678375244140625, -0.03692626953125, -0.0298004150390625, -0.016082763671875, 0.0789794921875, 0.0143890380859375, 0.018096923828125, -0.009979248046875, -0.00940704345703125, -0.0303497314453125, -0.01168060302734375, 0.035980224609375, 0.002742767333984375, -0.01517486572265625, 0.032958984375, 0.01300048828125, -0.03021240234375, 0.01476287841796875, 0.025848388671875, -0.0345458984375, 0.0120391845703125, -0.003223419189453125, -0.033538818359375, -0.059356689453125, -0.016082763671875, 0.06646728515625, -0.058746337890625, -0.033477783203125, 0.017425537109375, 0.0106964111328125, -0.00618743896484375, -0.0203094482421875, -0.0280303955078125, -0.050872802734375, -0.014068603515625, 0.030426025390625, -0.029327392578125, 0.03759765625, -0.042449951171875, -0.01139068603515625, 0.02252197265625, 0.0161285400390625, -0.00885772705078125, 0.01422119140625, 0.0023441314697265625, 0.005702972412109375, -0.028717041015625, -0.0084686279296875, -0.0251007080078125, -0.0224609375, -0.01580810546875, -0.0031223297119140625, -0.044036865234375, 0.0252838134765625, -0.018218994140625, 0.004604339599609375, 0.024688720703125, 0.032318115234375, 0.020843505859375, 0.0244293212890625, -0.019775390625, 0.009552001953125, -0.000110626220703125, -0.00989532470703125 ]
b34811b5163314090ae8ad5a296a5d87632c6eb3
Wordpress Stackexchange Q: Get post count of current loop when using multiple queries on one page I'm trying to get a count of the current posts inside of a loop. I'm using multiple loops on one page in my theme. So far I have: $my_post_count = $wp_query->post_count; But when I print $my_post_count, it returns the number all of the posts on my WP site. Could it have something to do with using multiple queries on one page? I tried using wp_reset_query after every loop to make sure I wasn't throwing things off that way. What am I doing wrong? A: I believe the post_count is stored in the global, so before the custom loop you should set it to 0, since you can use it outside the loop, but this depends on how you are structuring your multiple query's, maybe you can add them to your post? There is another way that I use within the loop that counts posts using current_post + 1, for example. <?php $my_query = new WP_Query();?> <?php if ($my_query->have_posts()) :while ($my_query->have_posts()) : $my_query->the_post(); $count_posts = $my_query->current_post + 1; //counts posts in loop endwhile;?>
Q: Get post count of current loop when using multiple queries on one page I'm trying to get a count of the current posts inside of a loop. I'm using multiple loops on one page in my theme. So far I have: $my_post_count = $wp_query->post_count; But when I print $my_post_count, it returns the number all of the posts on my WP site. Could it have something to do with using multiple queries on one page? I tried using wp_reset_query after every loop to make sure I wasn't throwing things off that way. What am I doing wrong? A: I believe the post_count is stored in the global, so before the custom loop you should set it to 0, since you can use it outside the loop, but this depends on how you are structuring your multiple query's, maybe you can add them to your post? There is another way that I use within the loop that counts posts using current_post + 1, for example. <?php $my_query = new WP_Query();?> <?php if ($my_query->have_posts()) :while ($my_query->have_posts()) : $my_query->the_post(); $count_posts = $my_query->current_post + 1; //counts posts in loop endwhile;?> A: An alternative solution using WP_Query would be: <?php $args = array( 'post_type' => 'post' ); $the_query = new WP_Query( $args ); $totalpost = $the_query->found_posts; ?> A: $wp_query hold main loop of page and should not be used to create multiple loops. If you are using new WP_Query object then your variable that holds it will have according count: $my_query = new WP_Query(); // stuff $count = $my_query->post_count; If you are using get_posts() then WP_Query object is not accessible and you should just count returned set: $posts = get_posts(); $count = count($posts); A: Simple way to count total post including pagignation <?php global $wp_query echo $wp_query->found_posts; ?>
wordpress
{ "language": "en", "length": 293, "provenance": "stackexchange_00019.jsonl.gz:413895", "question_score": "15", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31254" }
[ 0.0604248046875, 0.00982666015625, -0.004810333251953125, -0.0164794921875, 0.030059814453125, -0.0338134765625, 0.061553955078125, -0.0294342041015625, 0.0374755859375, 0.0187225341796875, -0.034912109375, 0.0004315376281738281, -0.016510009765625, -0.01398468017578125, -0.02789306640625, -0.0193939208984375, 0.047454833984375, -0.0587158203125, 0.02703857421875, -0.0010023117065429688, -0.0019989013671875, 0.0270538330078125, 0.06707763671875, 0.0445556640625, -0.00970458984375, 0.00240325927734375, 0.06085205078125, -0.0262451171875, 0.005054473876953125, -0.023468017578125, 0.005126953125, 0.01451873779296875, 0.0178375244140625, 0.00690460205078125, -0.0151214599609375, -0.01477813720703125, 0.01233673095703125, -0.01959228515625, -0.0100860595703125, 0.041351318359375, 0.020782470703125, -0.01514434814453125, 0.015533447265625, -0.03253173828125, -0.00385284423828125, -0.019256591796875, 0.03009033203125, -0.031158447265625, 0.015228271484375, -0.0196380615234375, 0.0240325927734375, 0.01849365234375, 0.03912353515625, -0.00286865234375, -0.0312042236328125, -0.0025310516357421875, 0.050384521484375, -0.0457763671875, 0.05328369140625, -0.053314208984375, -0.051513671875, -0.041595458984375, 0.068359375, -0.0192718505859375, -0.02593994140625, 0.0147857666015625, 0.011322021484375, 0.0230712890625, -0.01222991943359375, -0.048553466796875, -0.01082611083984375, -0.0012598037719726562, -0.003437042236328125, 0.0157928466796875, -0.0229339599609375, -0.06842041015625, 0.03594970703125, -0.04351806640625, -0.0026302337646484375, 0.032745361328125, -0.041534423828125, -0.0196685791015625, -0.0689697265625, 0.034332275390625, -0.053924560546875, 0.0157012939453125, -0.023956298828125, 0.01171112060546875, -0.0015125274658203125, -0.022308349609375, -0.0026702880859375, 0.014129638671875, 0.0021228790283203125, 0.00228118896484375, -0.02935791015625, -0.02337646484375, 0.040863037109375, 0.06536865234375, -0.031890869140625, -0.048004150390625, 0.0020427703857421875, -0.0272216796875, -0.06341552734375, -0.0120391845703125, 0.0345458984375, 0.0255584716796875, -0.003643035888671875, 0.04266357421875, 0.090087890625, 0.032989501953125, 0.018096923828125, 0.08319091796875, -0.04791259765625, -0.020751953125, -0.037445068359375, 0.03582763671875, -0.048614501953125, -0.029327392578125, -0.006557464599609375, -0.00757598876953125, -0.014190673828125, 0.0153656005859375, -0.01366424560546875, 0.008544921875, 0.01085662841796875, 0.0006313323974609375, 0.00495147705078125, -0.01776123046875, 0.0145416259765625, 0.07244873046875, -0.038299560546875, -0.021331787109375, 0.06219482421875, 0.0154876708984375, 0.0004897117614746094, -0.049896240234375, 0.0024585723876953125, -0.03558349609375, -0.0020465850830078125, 0.0088348388671875, 0.0008387565612792969, -0.0509033203125, -0.006839752197265625, -0.00585174560546875, 0.003986358642578125, 0.031890869140625, 0.0218048095703125, 0.007678985595703125, -0.01187896728515625, -0.046783447265625, 0.02264404296875, -0.0199432373046875, 0.0018720626831054688, -0.001392364501953125, 0.0157318115234375, -0.00653076171875, -0.031036376953125, -0.006046295166015625, 0.0423583984375, 0.029754638671875, 0.04058837890625, -0.007442474365234375, -0.0216522216796875, 0.0110015869140625, -0.05010986328125, 0.024810791015625, -0.023712158203125, -0.01383209228515625, 0.023468017578125, -0.0162811279296875, 0.011444091796875, 0.00023603439331054688, 0.029266357421875, -0.009918212890625, -0.00908660888671875, -0.01177978515625, -0.04010009765625, -0.018157958984375, 0.04949951171875, 0.0230865478515625, -0.0257110595703125, -0.043975830078125, 0.01273345947265625, 0.0108795166015625, -0.02703857421875, 0.0240631103515625, -0.0029850006103515625, -0.0018157958984375, -0.0099029541015625, -0.0009412765502929688, 0.033660888671875, 0.053955078125, -0.04559326171875, 0.020599365234375, 0.01006317138671875, 0.002895355224609375, -0.037506103515625, -0.00031495094299316406, -0.009490966796875, -0.037200927734375, 0.0220947265625, -0.00666046142578125, -0.01226043701171875, -0.010284423828125, -0.07049560546875, -0.003173828125, -0.007904052734375, 0.0281219482421875, -0.003673553466796875, 0.01418304443359375, 0.031097412109375, -0.00530242919921875, -0.0186004638671875, -0.03546142578125, -0.045806884765625, -0.00849151611328125, -0.020721435546875, -0.0129852294921875, -0.0198974609375, -0.005157470703125, -0.018402099609375, 0.0193023681640625, -0.021331787109375, 0.03936767578125, 0.09234619140625, -0.01885986328125, -0.0265655517578125, -0.050201416015625, 0.0195770263671875, -0.00322723388671875, -0.09515380859375, 0.062164306640625, -0.004604339599609375, -0.01763916015625, -0.05291748046875, -0.036163330078125, -0.01776123046875, -0.033294677734375, 0.0166015625, 0.06646728515625, 0.0302581787109375, 0.031494140625, -0.0021991729736328125, -0.005428314208984375, 0.0278778076171875, -0.024261474609375, 0.0165252685546875, -0.0139312744140625, 0.036102294921875, 0.041259765625, 0.0263214111328125, 0.004367828369140625, 0.0291900634765625, 0.0109100341796875, 0.02655029296875, 0.036590576171875, 0.00890350341796875, 0.0217132568359375, -0.066650390625, 0.036346435546875, -0.010101318359375, -0.04034423828125, -0.0178375244140625, -0.0247344970703125, 0.0073394775390625, -0.016876220703125, 0.01319122314453125, 0.01317596435546875, 0.007534027099609375, -0.021087646484375, 0.0166015625, -0.0234222412109375, -0.000591278076171875, -0.026824951171875, -0.09368896484375, 0.004283905029296875, -0.05206298828125, 0.0411376953125, 0.021484375, -0.044647216796875, -0.0247955322265625, -0.01160430908203125, -0.057037353515625, -0.0151824951171875, -0.01311492919921875, -0.07391357421875, 0.004177093505859375, 0.01226043701171875, -0.00450897216796875, -0.01396942138671875, 0.0197296142578125, 0.0241241455078125, -0.05029296875, 0.05523681640625, -0.011993408203125, -0.01038360595703125, 0.026275634765625, -0.07391357421875, 0.063232421875, -0.059356689453125, 0.057647705078125, 0.07177734375, -0.02752685546875, 0.034088134765625, -0.0031280517578125, 0.005077362060546875, 0.00014495849609375, 0.0113983154296875, -0.010772705078125, -0.0213623046875, -0.07080078125, -0.0283660888671875, 0.0391845703125, 0.0645751953125, 0.0198822021484375, -0.03076171875, 0.020751953125, 0.04010009765625, -0.06903076171875, -0.10528564453125, 0.042083740234375, -0.06805419921875, 0.006805419921875, -0.0262451171875, -0.03607177734375, -0.0204315185546875, -0.00836944580078125, 0.0014247894287109375, -0.037811279296875, -0.0171356201171875, -0.0347900390625, -0.06634521484375, -0.056304931640625, 0.0166778564453125, 0.00902557373046875, 0.022491455078125, -0.00009357929229736328, 0.07891845703125, 0.0106964111328125, -0.05303955078125, -0.0211029052734375, 0.00966644287109375, -0.033416748046875, -0.018463134765625, -0.0220947265625, 0.0229644775390625, -0.030426025390625, 0.0124053955078125, -0.051300048828125, -0.00738525390625, 0.0192718505859375, -0.0281982421875, 0.00411224365234375, -0.0191497802734375, 0.035400390625, 0.007747650146484375, -0.028228759765625, 0.03253173828125, 0.047821044921875, -0.0168304443359375, -0.037933349609375, -0.01430511474609375, -0.06085205078125, -0.0220489501953125, 0.0279083251953125, 0.0178985595703125, -0.01418304443359375, -0.01302337646484375, 0.015716552734375, 0.006473541259765625, -0.00815582275390625, -0.038116455078125, 0.08447265625, 0.0227813720703125, 0.036529541015625, -0.0155487060546875, -0.0161590576171875, -0.033416748046875, 0.03240966796875, -0.0209503173828125, 0.00714874267578125, -0.01947021484375, 0.02276611328125, -0.0316162109375, -0.0310516357421875, 0.05523681640625, 0.052490234375, 0.0217742919921875, -0.00101470947265625, -0.04547119140625, 0.0189666748046875, 0.08404541015625, -0.04937744140625, -0.034515380859375, -0.03387451171875, 0.006320953369140625, 0.017669677734375, -0.044921875, 0.02740478515625, -0.0433349609375, -0.0400390625, -0.016204833984375, -0.0386962890625, -0.007617950439453125, -0.027557373046875, 0.024810791015625, -0.03582763671875, -0.02838134765625, 0.024200439453125, -0.059539794921875, 0.0196990966796875, -0.0244903564453125, -0.0218048095703125, -0.0259246826171875, -0.01461029052734375, -0.0589599609375, -0.07379150390625, -0.0035648345947265625, -0.0189361572265625, 0.057342529296875, 0.000843048095703125, -0.00405120849609375, -0.01160430908203125, 0.0411376953125, 0.01160430908203125, 0.019073486328125, -0.0045166015625, 0.0025196075439453125, 0.0033588409423828125, 0.004932403564453125, -0.0042266845703125, -0.01065826416015625, -0.020050048828125, -0.0169830322265625, 0.0296783447265625, 0.0125274658203125, -0.05230712890625, -0.03729248046875, -0.05126953125, 0.00469207763671875, -0.014923095703125, -0.01438140869140625, 0.0153961181640625, 0.026336669921875, -0.025054931640625, 0.0290069580078125, 0.0034942626953125, -0.006450653076171875, 0.03289794921875, -0.0005235671997070312, -0.02386474609375, 0.012420654296875, 0.07318115234375, 0.0183258056640625, -0.01141357421875, -0.0745849609375, -0.041412353515625, 0.02947998046875, -0.033294677734375, 0.041717529296875, 0.034637451171875, -0.015625, 0.03131103515625, 0.00379180908203125, -0.02069091796875, 0.003215789794921875, 0.0264434814453125, 0.0113983154296875, -0.0196533203125, -0.002796173095703125, -0.005985260009765625, 0.0228424072265625, 0.0174713134765625, -0.029327392578125, -0.00006413459777832031, 0.022216796875, 0.04058837890625, -0.0333251953125, 0.0282440185546875, -0.025238037109375, -0.046600341796875, 0.0008807182312011719, -0.00310516357421875, 0.02886962890625, 0.03167724609375, -0.00099945068359375, 0.0537109375, 0.046417236328125, 0.0088043212890625, 0.005077362060546875, 0.0543212890625, -0.00804901123046875, 0.05078125, 0.002841949462890625, -0.00296783447265625, -0.0193939208984375, -0.01200103759765625, 0.042266845703125, -0.01056671142578125, -0.07110595703125, 0.057586669921875, -0.027618408203125, -0.0245361328125, 0.0261688232421875, 0.005893707275390625, 0.04443359375, 0.027496337890625, -0.036041259765625, -0.01873779296875, 0.0061187744140625, -0.0236663818359375, -0.057159423828125, 0.00930023193359375, -0.00420379638671875, 0.0037994384765625, -0.0034332275390625, 0.08148193359375, -0.003978729248046875, 0.051727294921875, -0.01361846923828125, 0.01195526123046875, -0.0009746551513671875, 0.037353515625, 0.0251312255859375, -0.0247650146484375, 0.0164794921875, 0.0023670196533203125, -0.0020904541015625, -0.01474761962890625, -0.001953125, 0.01128387451171875, 0.03619384765625, 0.0186004638671875, 0.0104217529296875, -0.00109100341796875, -0.01381683349609375, -0.006305694580078125, 0.0194549560546875, 0.028411865234375, -0.00908660888671875, -0.00811767578125, 0.01568603515625, 0.023590087890625, 0.01294708251953125, -0.00406646728515625, -0.0174560546875, -0.031890869140625, 0.0186920166015625, -0.030731201171875, 0.035614013671875, -0.00786590576171875, -0.0246429443359375, -0.03729248046875, -0.0090179443359375, -0.0022602081298828125, -0.0032138824462890625, -0.0261993408203125, 0.0000743865966796875, -0.0306549072265625, 0.01336669921875, 0.00696563720703125, 0.04913330078125, -0.0170135498046875, -0.048370361328125, 0.01044464111328125, -0.0000870823860168457, 0.058563232421875, 0.03277587890625, -0.033721923828125, 0.00628662109375, -0.0595703125, -0.019927978515625, 0.044769287109375, -0.016143798828125, -0.04132080078125, -0.0281982421875, 0.03759765625, 0.0276031494140625, 0.0206756591796875, -0.041839599609375, -0.0213623046875, -0.01099395751953125, 0.0246734619140625, 0.040191650390625, -0.0061798095703125, 0.053314208984375, 0.01375579833984375, 0.0177459716796875, 0.0084686279296875, 0.0140228271484375, -0.0027828216552734375, -0.019378662109375, 0.0238494873046875, -0.04498291015625, -0.0247955322265625, 0.010498046875, -0.022674560546875, -0.033843994140625, -0.031402587890625, -0.01155853271484375, -0.00833892822265625, 0.0025997161865234375, 0.0205841064453125, -0.00720977783203125, -0.0196075439453125, 0.033111572265625, -0.0234222412109375, 0.05865478515625, 0.020782470703125, -0.0038204193115234375, -0.003246307373046875, -0.01324462890625, -0.03106689453125, 0.033782958984375, -0.042388916015625, -0.0228118896484375, -0.03369140625, 0.0521240234375, 0.0777587890625, -0.00042819976806640625, 0.042022705078125, 0.022918701171875, 0.01045989990234375, 0.00885772705078125, 0.005626678466796875, 0.033294677734375, 0.0014753341674804688, 0.053436279296875, -0.00661468505859375, -0.01323699951171875, 0.01226806640625, -0.0382080078125, 0.0020732879638671875, -0.01470184326171875, 0.0274200439453125, -0.005771636962890625, 0.007122039794921875, 0.005748748779296875, -0.0207672119140625, 0.007843017578125, 0.0002371072769165039, 0.017913818359375, -0.007106781005859375, 0.0665283203125, 0.0013513565063476562, -0.0074920654296875, 0.0361328125, -0.0192413330078125, -0.00762939453125, -0.030914306640625, 0.03204345703125, -0.0003688335418701172, -0.04949951171875, 0.023223876953125, 0.033935546875, -0.0237579345703125, -0.024139404296875, 0.00020825862884521484, -0.01273345947265625, 0.02880859375, -0.048065185546875, 0.0302886962890625, -0.0728759765625, 0.0295257568359375, -0.0171051025390625, 0.0185699462890625, 0.0024585723876953125, 0.06622314453125, -0.0231170654296875, 0.027496337890625, 0.048828125, -0.0269622802734375, -0.056427001953125, -0.0097503662109375, 0.01297760009765625, 0.023834228515625, -0.054840087890625, 0.0286407470703125, -0.05377197265625, 0.01358795166015625, 0.00037860870361328125, 0.0076751708984375, 0.07049560546875, -0.050628662109375, -0.005405426025390625, 0.02655029296875, 0.032257080078125, -0.002567291259765625, -0.01360321044921875, 0.0022449493408203125, -0.03668212890625, -0.00846099853515625, -0.000888824462890625, 0.0109405517578125, 0.0016040802001953125, -0.0078887939453125, -0.040283203125, 0.09686279296875, -0.0684814453125, 0.02880859375, 0.052001953125, 0.028167724609375, -0.00792694091796875, 0.015899658203125, -0.063232421875, 0.038360595703125, -0.0155181884765625, 0.0859375, -0.08563232421875, -0.020111083984375, 0.01186370849609375, 0.057403564453125, 0.0595703125, 0.00252532958984375, -0.0038089752197265625, -0.0115814208984375, 0.06121826171875, 0.0487060546875, 0.00238800048828125, 0.0160980224609375, 0.028289794921875, 0.056060791015625, 0.069091796875, -0.034515380859375, 0.025146484375, 0.02081298828125, -0.0014944076538085938, 0.058685302734375, 0.00022661685943603516, -0.0157928466796875, -0.01253509521484375, 0.0184326171875, -0.043243408203125, -0.001316070556640625, 0.0164642333984375, 0.045440673828125, -0.0248260498046875, 0.0816650390625, 0.0310821533203125, -0.038970947265625, 0.00437164306640625, -0.047088623046875, 0.044677734375, -0.00946807861328125, 0.022491455078125, 0.0168609619140625, 0.01348876953125, 0.06585693359375, -0.018951416015625, 0.0149383544921875, 0.01094818115234375, -0.0341796875, 0.05999755859375, 0.041717529296875, 0.03704833984375, -0.022308349609375, 0.01508331298828125, 0.007747650146484375, 0.057403564453125, -0.047210693359375, -0.0374755859375, 0.01103973388671875, -0.0168609619140625, -0.014923095703125, 0.0022144317626953125, -0.00921630859375, 0.0579833984375, 0.055908203125, -0.0160064697265625, -0.04010009765625, -0.0008072853088378906, 0.020172119140625, 0.0017385482788085938, -0.00984954833984375, 0.01513671875, -0.04803466796875, -0.00923919677734375, -0.018402099609375, -0.0052337646484375, 0.053131103515625, -0.000014543533325195312, 0.044921875, -0.0633544921875, -0.017303466796875, 0.002536773681640625, 0.03204345703125, -0.01335906982421875, -0.0005931854248046875, -0.031341552734375, -0.052093505859375, -0.01222991943359375, 0.038604736328125, 0.03216552734375, -0.0164642333984375, 0.035247802734375, 0.02911376953125, -0.0207366943359375, -0.0147857666015625, 0.00485992431640625, -0.01374053955078125, -0.04510498046875, -0.0004742145538330078, -0.0304107666015625, 0.0248260498046875, -0.006214141845703125, 0.0176239013671875, 0.043670654296875, -0.0003223419189453125, 0.0006499290466308594, 0.0026874542236328125, 0.009918212890625, -0.0276947021484375, -0.00231170654296875, 0.0026912689208984375, 0.0391845703125, 0.0236053466796875, -0.07574462890625, -0.0129547119140625, -0.01092529296875, -0.01366424560546875, 0.00164031982421875, 0.0237274169921875, -0.01068115234375, 0.01552581787109375, -0.0083770751953125, -0.00984954833984375, 0.0233612060546875, -0.005550384521484375, -0.00429534912109375, 0.026031494140625, 0.029815673828125, 0.008453369140625, -0.0528564453125, -0.036346435546875, 0.00530242919921875, 0.01258087158203125, 0.01239776611328125, -0.01377105712890625, 0.03948974609375, 0.0179290771484375, 0.005062103271484375, 0.00331878662109375, -0.0020122528076171875, 0.0006551742553710938, 0.0292816162109375, 0.0009055137634277344, 0.004116058349609375, -0.01165771484375, -0.044219970703125, -0.0011806488037109375, 0.0660400390625, -0.0267333984375, -0.005126953125, 0.0081787109375, 0.02825927734375, -0.03338623046875, 0.01377105712890625, -0.01328277587890625, 0.03887939453125, 0.0197601318359375, -0.0394287109375, 0.041259765625, -0.0088958740234375, 0.006378173828125, 0.037933349609375, -0.0037250518798828125, -0.0177001953125, 0.030670166015625, -0.033416748046875, 0.0281982421875, 0.03204345703125, -0.037261962890625, 0.00322723388671875, 0.0016050338745117188, -0.01233673095703125, -0.01454925537109375, 0.0285491943359375, -0.0168304443359375, 0.01019287109375, -0.008148193359375, 0.0005335807800292969, 0.0178070068359375, 0.0531005859375, 0.00217437744140625, 0.0242919921875, -0.0203399658203125, -0.0035266876220703125, 0.027130126953125, -0.033599853515625, -0.021331787109375, -0.04119873046875, -0.00689697265625, 0.0207977294921875, -0.0191497802734375, -0.0035114288330078125, -0.0173797607421875, -0.01238250732421875, 0.006099700927734375, -0.01558685302734375, -0.001941680908203125, 0.0001838207244873047, -0.027618408203125, -0.0164947509765625, -0.037200927734375, -0.039825439453125, 0.030242919921875, 0.032135009765625, -0.016845703125, 0.022552490234375, -0.0276336669921875, -0.042724609375, 0.0024509429931640625, -0.0017366409301757812, -0.00693511962890625, -0.018402099609375, 0.0031795501708984375, -0.00733184814453125, 0.002056121826171875, 0.0287628173828125, 0.048919677734375, -0.008026123046875, 0.0293426513671875, -0.004825592041015625, -0.00897216796875, -0.053192138671875, 0.02789306640625, -0.06219482421875, -0.019500732421875, -0.0399169921875, 0.0255126953125, 0.0438232421875, -0.0162811279296875, -0.030731201171875, 0.0128173828125, -0.0168304443359375, -0.02783203125, -0.0743408203125, 0.01549530029296875, 0.0167083740234375, -0.026641845703125, -0.012451171875, -0.0516357421875, -0.046112060546875, 0.030364990234375, 0.0169830322265625, 0.002246856689453125, 0.0283355712890625, 0.01763916015625, -0.055084228515625, 0.0197296142578125, -0.007678985595703125, 0.00612640380859375, 0.0260162353515625, -0.0204010009765625, 0.0282440185546875, 0.02337646484375, -0.049346923828125, -0.0003135204315185547, -0.024658203125, 0.0065155029296875, -0.0281524658203125, -0.04119873046875, -0.006908416748046875, -0.016632080078125, 0.07159423828125, 0.0364990234375, 0.013458251953125, -0.0340576171875, -0.0233306884765625, -0.01050567626953125, -0.024505615234375, -0.01303863525390625, 0.024444580078125, -0.0689697265625, -0.0157928466796875, 0.001178741455078125, -0.01062774658203125, -0.03533935546875, -0.0193634033203125, -0.04974365234375, -0.0193939208984375, -0.055908203125, -0.0007162094116210938, -0.0192718505859375, 0.0164031982421875, -0.01540374755859375, -0.004047393798828125, -0.0183563232421875, 0.0061798095703125, -0.007625579833984375, -0.0235595703125, 0.040252685546875, 0.033660888671875, 0.004150390625, -0.01459503173828125, 0.0006589889526367188, 0.02984619140625, -0.0240325927734375, 0.01180267333984375, -0.0139617919921875, -0.000274658203125, 0.0121917724609375, -0.002597808837890625, 0.01580810546875, 0.0193939208984375, 0.046356201171875, 0.01201629638671875, 0.019378662109375, 0.011505126953125, 0.0584716796875, 0.002010345458984375, 0.03961181640625, -0.01122283935546875, -0.0131988525390625, -0.01526641845703125, -0.0155792236328125, -0.00548553466796875, 0.002063751220703125, -0.032318115234375, -0.0257415771484375, 0.012298583984375, 0.059295654296875, -0.0024242401123046875, 0.01084136962890625 ]
c2b3c86d3c0dcf6e587de6b06df1cd8693e1c90e
Wordpress Stackexchange Q: Problem with 'post__not_in' I am running a custom query below each post, to get other post from its category. Now I want to exclude the current post. This is my Query: <?php // related_posts(); $exclude_post = $post->ID; $cats = get_the_category(); //$cats[0]->term_id;$cats[1]->term_id; //name global $post; $newQuery = new WP_Query('posts_per_page=5&orderby=rand&cat='.$cats[0]->term_id.'&post__not_in='.array($exclude_post).''); if ( $newQuery->have_posts() ):?> <ul> <?php while ( $newQuery->have_posts() ) : $newQuery->the_post(); ?> <li> <a title="<?php the_title();?>" href="<?php the_permalink();?>"><?php the_title();?></a> </li> <?php endwhile;?> </ul> <?php endif; ?> Now my query shows 0 results. The same, if I set the post which shall be excluded testwise to 1 or so. What could be the error in my custom query? Cheers Lars A: You are trying to supply an array as part of the string query parameter. You could instead just supply the arguments list as an array like this: $newQuery = new WP_Query( array( 'posts_per_page' => 5, 'orderby' => 'rand', 'cat' => $cats[0]->term_id, 'post__not_in' => array($exclude_post) ) );
Q: Problem with 'post__not_in' I am running a custom query below each post, to get other post from its category. Now I want to exclude the current post. This is my Query: <?php // related_posts(); $exclude_post = $post->ID; $cats = get_the_category(); //$cats[0]->term_id;$cats[1]->term_id; //name global $post; $newQuery = new WP_Query('posts_per_page=5&orderby=rand&cat='.$cats[0]->term_id.'&post__not_in='.array($exclude_post).''); if ( $newQuery->have_posts() ):?> <ul> <?php while ( $newQuery->have_posts() ) : $newQuery->the_post(); ?> <li> <a title="<?php the_title();?>" href="<?php the_permalink();?>"><?php the_title();?></a> </li> <?php endwhile;?> </ul> <?php endif; ?> Now my query shows 0 results. The same, if I set the post which shall be excluded testwise to 1 or so. What could be the error in my custom query? Cheers Lars A: You are trying to supply an array as part of the string query parameter. You could instead just supply the arguments list as an array like this: $newQuery = new WP_Query( array( 'posts_per_page' => 5, 'orderby' => 'rand', 'cat' => $cats[0]->term_id, 'post__not_in' => array($exclude_post) ) );
wordpress
{ "language": "en", "length": 156, "provenance": "stackexchange_00019.jsonl.gz:413897", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31256" }
[ 0.0684814453125, -0.01096343994140625, 0.020599365234375, -0.0290985107421875, 0.0260772705078125, -0.02862548828125, 0.07861328125, -0.0131988525390625, -0.0021343231201171875, 0.0029754638671875, -0.06732177734375, 0.0027484893798828125, -0.020477294921875, -0.0233306884765625, 0.0099029541015625, -0.04998779296875, 0.0139007568359375, 0.0029544830322265625, 0.01947021484375, -0.01229095458984375, -0.00765228271484375, -0.01201629638671875, 0.0357666015625, 0.037750244140625, 0.0266876220703125, -0.00823211669921875, 0.07281494140625, -0.04547119140625, 0.02294921875, -0.04278564453125, 0.0321044921875, -0.0009927749633789062, -0.0013895034790039062, 0.030517578125, -0.004779815673828125, -0.01239776611328125, 0.0054931640625, 0.003032684326171875, 0.0102081298828125, 0.033172607421875, 0.00812530517578125, -0.01319122314453125, -0.0012750625610351562, -0.00283050537109375, -0.017852783203125, -0.032623291015625, 0.0256195068359375, -0.0206451416015625, 0.0330810546875, -0.05126953125, 0.006214141845703125, 0.0171051025390625, 0.02728271484375, -0.015716552734375, -0.033172607421875, 0.002895355224609375, 0.012115478515625, 0.007465362548828125, 0.037017822265625, -0.0192718505859375, -0.05133056640625, 0.0155487060546875, 0.0159759521484375, -0.029876708984375, 0.01010894775390625, -0.0024318695068359375, 0.04058837890625, 0.0291748046875, -0.036346435546875, -0.01329803466796875, 0.033294677734375, -0.01023101806640625, -0.008819580078125, -0.0191650390625, -0.05133056640625, -0.0287322998046875, 0.04058837890625, -0.055572509765625, -0.0204315185546875, -0.0006337165832519531, -0.0225067138671875, 0.004779815673828125, -0.069091796875, -0.0057373046875, -0.004390716552734375, 0.0278167724609375, -0.0204925537109375, -0.0024871826171875, -0.0435791015625, 0.004638671875, -0.03375244140625, -0.038177490234375, -0.03875732421875, 0.0123138427734375, 0.017333984375, -0.01313018798828125, 0.0340576171875, 0.072021484375, -0.01261138916015625, -0.008636474609375, -0.00812530517578125, -0.024688720703125, 0.000946044921875, -0.01122283935546875, 0.032806396484375, 0.028106689453125, -0.0255279541015625, -0.001468658447265625, 0.05792236328125, 0.0207061767578125, 0.0181121826171875, -0.0029354095458984375, 0.0275115966796875, -0.0228118896484375, -0.05474853515625, 0.012908935546875, 0.02239990234375, -0.02532958984375, 0.013946533203125, -0.01349639892578125, -0.00301361083984375, 0.01253509521484375, -0.031158447265625, -0.01146697998046875, 0.0445556640625, 0.01552581787109375, -0.009185791015625, 0.0088043212890625, 0.02911376953125, 0.038299560546875, -0.05560302734375, 0.0046234130859375, 0.1134033203125, 0.025115966796875, 0.01119232177734375, -0.028839111328125, 0.0300445556640625, -0.0197601318359375, -0.00260162353515625, 0.009521484375, 0.0090789794921875, -0.040374755859375, -0.01166534423828125, -0.0016622543334960938, 0.0173492431640625, 0.01776123046875, 0.03350830078125, 0.0267181396484375, -0.0003490447998046875, -0.04949951171875, 0.030609130859375, -0.01300811767578125, 0.050201416015625, -0.0035343170166015625, -0.022735595703125, -0.0174560546875, -0.0008821487426757812, -0.024169921875, -0.0244598388671875, -0.039794921875, 0.061431884765625, 0.020050048828125, 0.0021953582763671875, -0.007781982421875, -0.047882080078125, -0.029022216796875, -0.048583984375, -0.0082244873046875, 0.014556884765625, 0.0423583984375, 0.0020923614501953125, -0.019073486328125, 0.0204315185546875, -0.01074981689453125, -0.0294952392578125, -0.006649017333984375, -0.006259918212890625, -0.0089569091796875, 0.0145416259765625, 0.0182037353515625, -0.00978851318359375, -0.0275726318359375, -0.0292510986328125, 0.0174407958984375, -0.062744140625, 0.046356201171875, 0.00811004638671875, 0.03826904296875, -0.00727081298828125, 0.01038360595703125, 0.0760498046875, 0.0443115234375, -0.0308990478515625, 0.0129547119140625, 0.0007014274597167969, -0.022216796875, -0.03466796875, -0.0186309814453125, -0.01128387451171875, 0.01499176025390625, 0.002193450927734375, -0.021484375, -0.0206298828125, 0.019195556640625, -0.0987548828125, 0.00506591796875, -0.034332275390625, 0.03448486328125, -0.038848876953125, 0.0155792236328125, 0.04364013671875, 0.02777099609375, -0.0625, 0.0153656005859375, -0.01422119140625, -0.0179443359375, -0.0233154296875, -0.0016107559204101562, -0.01082611083984375, -0.00829315185546875, 0.00798797607421875, -0.0272216796875, -0.00920867919921875, 0.0313720703125, 0.07171630859375, -0.0303802490234375, 0.0006465911865234375, -0.041961669921875, 0.0187225341796875, 0.0113677978515625, -0.0811767578125, 0.031463623046875, 0.059051513671875, 0.0450439453125, -0.0240936279296875, 0.005603790283203125, 0.02093505859375, -0.01021575927734375, -0.0016155242919921875, 0.0285186767578125, 0.0176544189453125, 0.037628173828125, -0.0272674560546875, -0.0239410400390625, 0.0748291015625, -0.027130126953125, -0.0018100738525390625, -0.01351165771484375, -0.006023406982421875, 0.006916046142578125, 0.0198822021484375, 0.0016393661499023438, 0.037017822265625, 0.020599365234375, 0.0374755859375, 0.0215606689453125, 0.00891876220703125, 0.03607177734375, -0.014404296875, 0.0021495819091796875, 0.0007405281066894531, -0.004825592041015625, -0.020477294921875, 0.01300811767578125, 0.039947509765625, -0.03338623046875, 0.0147552490234375, -0.0008854866027832031, 0.0016450881958007812, -0.009246826171875, 0.006130218505859375, -0.062744140625, -0.01192474365234375, -0.0219268798828125, -0.0213470458984375, 0.0156097412109375, -0.049591064453125, 0.040283203125, 0.024017333984375, -0.0253143310546875, -0.011322021484375, 0.057373046875, 0.0182342529296875, -0.018890380859375, -0.0450439453125, -0.061309814453125, 0.0217437744140625, 0.0183868408203125, -0.01678466796875, -0.00787353515625, 0.027374267578125, 0.016815185546875, -0.025787353515625, 0.006103515625, 0.004741668701171875, -0.00836944580078125, -0.00492095947265625, -0.046417236328125, 0.03936767578125, -0.039520263671875, 0.00719451904296875, 0.05548095703125, 0.000049948692321777344, -0.007343292236328125, 0.0009279251098632812, 0.01557159423828125, 0.01629638671875, 0.00588226318359375, -0.00835418701171875, -0.001312255859375, -0.061309814453125, -0.022003173828125, 0.0352783203125, 0.05126953125, 0.007625579833984375, -0.02459716796875, 0.0131072998046875, 0.037384033203125, -0.01446533203125, -0.051666259765625, 0.038604736328125, -0.007793426513671875, 0.006946563720703125, -0.00435638427734375, 0.00623321533203125, -0.034393310546875, -0.0103912353515625, -0.00720977783203125, -0.0010805130004882812, -0.03936767578125, -0.078857421875, -0.08306884765625, -0.0751953125, 0.00800323486328125, 0.01326751708984375, 0.02044677734375, 0.0189971923828125, 0.1138916015625, 0.022674560546875, -0.08111572265625, -0.004688262939453125, 0.0020427703857421875, -0.0377197265625, 0.0380859375, -0.0152130126953125, 0.0304107666015625, -0.00873565673828125, 0.01250457763671875, 0.07891845703125, 0.0221710205078125, -0.0533447265625, -0.00475311279296875, -0.0037384033203125, 0.00873565673828125, 0.0303497314453125, -0.0271759033203125, -0.01629638671875, 0.037200927734375, 0.0249786376953125, -0.023345947265625, -0.039154052734375, -0.0372314453125, -0.064208984375, 0.027191162109375, 0.046539306640625, 0.01922607421875, -0.01953125, -0.0014400482177734375, -0.0006670951843261719, -0.01078033447265625, -0.0196533203125, -0.0213623046875, 0.04449462890625, 0.0083160400390625, 0.029937744140625, 0.002735137939453125, 0.0205535888671875, -0.019012451171875, 0.0077056884765625, -0.0007662773132324219, -0.00484466552734375, -0.003173828125, -0.016448974609375, -0.013519287109375, -0.033477783203125, 0.0350341796875, 0.0167388916015625, 0.03094482421875, -0.0071868896484375, -0.0377197265625, -0.0050048828125, 0.08184814453125, -0.0274200439453125, -0.05657958984375, -0.034942626953125, 0.0074005126953125, 0.01788330078125, -0.046051025390625, 0.057464599609375, -0.01543426513671875, -0.019012451171875, -0.0107421875, -0.0302581787109375, -0.00820159912109375, -0.0022106170654296875, -0.00516510009765625, -0.006343841552734375, -0.0279083251953125, 0.0364990234375, -0.019256591796875, 0.0018262863159179688, -0.02252197265625, -0.0106353759765625, -0.0552978515625, -0.006847381591796875, -0.012603759765625, -0.066162109375, -0.005893707275390625, -0.0061187744140625, 0.0194244384765625, -0.0248260498046875, 0.040313720703125, -0.0616455078125, 0.0254364013671875, -0.0092315673828125, -0.041107177734375, 0.01160430908203125, 0.02069091796875, -0.00374603271484375, 0.032257080078125, -0.0183258056640625, -0.0176544189453125, -0.007320404052734375, -0.0092926025390625, -0.0087890625, -0.0035953521728515625, -0.042999267578125, -0.040771484375, -0.016571044921875, -0.03448486328125, -0.05645751953125, -0.01268768310546875, -0.006969451904296875, 0.0247650146484375, -0.0181884765625, -0.01145172119140625, -0.016815185546875, -0.053863525390625, 0.048614501953125, 0.0233306884765625, -0.03521728515625, 0.005718231201171875, 0.0404052734375, 0.0166778564453125, -0.047088623046875, -0.039215087890625, -0.038055419921875, 0.01448822021484375, -0.0128936767578125, 0.050445556640625, 0.0088653564453125, -0.00849151611328125, 0.070556640625, -0.015655517578125, -0.004924774169921875, -0.006134033203125, 0.0182037353515625, -0.007305145263671875, -0.0217437744140625, 0.007663726806640625, -0.0199737548828125, 0.0220184326171875, -0.0085906982421875, -0.040679931640625, -0.00870513916015625, 0.0210113525390625, 0.036895751953125, -0.041961669921875, 0.04150390625, -0.0298004150390625, -0.016510009765625, 0.00506591796875, 0.0343017578125, 0.033660888671875, 0.0428466796875, -0.005680084228515625, 0.00897979736328125, -0.02215576171875, 0.01195526123046875, 0.006694793701171875, 0.0576171875, -0.0304718017578125, 0.0176544189453125, 0.035797119140625, -0.0238189697265625, -0.0072784423828125, 0.005893707275390625, 0.0169677734375, 0.00444793701171875, -0.03765869140625, 0.00494384765625, 0.01200103759765625, 0.0281829833984375, -0.00818634033203125, 0.0025482177734375, 0.029571533203125, 0.0214385986328125, 0.01186370849609375, -0.01180267333984375, -0.01262664794921875, -0.00316619873046875, -0.022918701171875, 0.036102294921875, 0.015411376953125, 0.01319122314453125, 0.00908660888671875, 0.09088134765625, 0.020263671875, 0.060333251953125, -0.032470703125, 0.01183319091796875, -0.01190948486328125, 0.060638427734375, 0.0003731250762939453, -0.01287841796875, 0.0263671875, 0.034149169921875, 0.0279388427734375, -0.041717529296875, -0.03253173828125, -0.01033782958984375, 0.034027099609375, -0.0209197998046875, -0.01055145263671875, 0.0450439453125, 0.001140594482421875, -0.03363037109375, 0.049407958984375, 0.06646728515625, -0.0249176025390625, -0.030914306640625, 0.0006613731384277344, 0.0328369140625, 0.00984954833984375, -0.0139923095703125, 0.02032470703125, -0.040771484375, 0.0240936279296875, -0.03662109375, 0.018585205078125, -0.012237548828125, -0.0184783935546875, 0.001068115234375, -0.0283050537109375, -0.0200653076171875, 0.0650634765625, 0.00977325439453125, -0.015960693359375, -0.01806640625, 0.01715087890625, -0.0267486572265625, 0.056427001953125, -0.0221405029296875, -0.044891357421875, -0.0355224609375, 0.01178741455078125, 0.044036865234375, 0.05035400390625, -0.005779266357421875, -0.022369384765625, -0.016632080078125, -0.03717041015625, 0.0279541015625, -0.021209716796875, -0.023529052734375, -0.017059326171875, 0.0133209228515625, 0.007221221923828125, -0.00911712646484375, -0.04925537109375, -0.031524658203125, 0.003246307373046875, 0.0211639404296875, -0.0031871795654296875, -0.035308837890625, 0.04046630859375, 0.019622802734375, 0.003993988037109375, -0.0109405517578125, 0.0221099853515625, 0.0263519287109375, -0.0135650634765625, -0.01219940185546875, -0.09857177734375, 0.0005068778991699219, 0.0237579345703125, -0.053253173828125, 0.048828125, 0.035125732421875, 0.01366424560546875, 0.007427215576171875, -0.005542755126953125, 0.0181427001953125, -0.01983642578125, 0.0005135536193847656, -0.013946533203125, -0.0123748779296875, 0.032440185546875, -0.0164947509765625, -0.0297698974609375, -0.025848388671875, -0.01253509521484375, -0.01454925537109375, 0.0074005126953125, -0.038421630859375, 0.0070037841796875, -0.0192718505859375, 0.04913330078125, 0.08367919921875, -0.00159454345703125, 0.058258056640625, 0.03631591796875, 0.0128173828125, 0.0138702392578125, -0.0157928466796875, 0.033538818359375, 0.00463104248046875, 0.06890869140625, -0.01062774658203125, -0.0219879150390625, 0.038848876953125, -0.050079345703125, -0.01534271240234375, 0.0095977783203125, 0.029205322265625, -0.048614501953125, 0.035400390625, 0.0180206298828125, 0.0123443603515625, -0.00600433349609375, 0.016326904296875, -0.00643157958984375, -0.0170135498046875, 0.01708984375, 0.00847625732421875, -0.0144500732421875, 0.007110595703125, 0.005523681640625, -0.0224456787109375, -0.005828857421875, 0.019378662109375, 0.0250396728515625, -0.0416259765625, 0.020782470703125, 0.0308074951171875, -0.006565093994140625, 0.00044536590576171875, 0.007343292236328125, -0.0009784698486328125, -0.0186004638671875, -0.070068359375, -0.00940704345703125, -0.00568389892578125, -0.0250091552734375, 0.007633209228515625, -0.00859832763671875, 0.0268707275390625, 0.033233642578125, -0.005077362060546875, 0.0015192031860351562, 0.005588531494140625, -0.0135650634765625, -0.00171661376953125, 0.0037670135498046875, 0.00537109375, 0.05120849609375, -0.024261474609375, 0.00948333740234375, -0.01007843017578125, 0.00798797607421875, 0.0040740966796875, -0.011505126953125, 0.08245849609375, -0.05010986328125, -0.0086212158203125, 0.019683837890625, -0.0132598876953125, -0.0005755424499511719, -0.00849151611328125, 0.01226806640625, -0.05169677734375, -0.024017333984375, 0.0021076202392578125, -0.00023066997528076172, 0.0029850006103515625, -0.00939178466796875, -0.046661376953125, 0.10906982421875, -0.046234130859375, 0.0462646484375, 0.044281005859375, 0.03607177734375, -0.01523590087890625, 0.0229644775390625, -0.0833740234375, 0.07403564453125, 0.004512786865234375, 0.0821533203125, -0.07550048828125, -0.0138702392578125, 0.0096435546875, 0.03497314453125, 0.05816650390625, 0.008819580078125, -0.023040771484375, -0.0305328369140625, 0.0186004638671875, 0.055206298828125, 0.004840850830078125, 0.009124755859375, 0.0155487060546875, 0.0255889892578125, 0.049102783203125, 0.004985809326171875, 0.05535888671875, -0.0012359619140625, -0.0216827392578125, 0.033477783203125, 0.0017147064208984375, 0.0194549560546875, 0.0033855438232421875, 0.008026123046875, -0.0028285980224609375, 0.006008148193359375, -0.00021636486053466797, 0.00794219970703125, 0.00859832763671875, 0.044189453125, 0.03912353515625, -0.0667724609375, -0.04449462890625, -0.032470703125, 0.0293426513671875, 0.00010955333709716797, 0.0362548828125, 0.0390625, 0.018463134765625, 0.0762939453125, -0.021697998046875, 0.0212249755859375, 0.0019989013671875, -0.02728271484375, 0.0560302734375, 0.04718017578125, 0.030914306640625, -0.015838623046875, 0.038543701171875, 0.0667724609375, 0.08135986328125, -0.06524658203125, 0.0034694671630859375, 0.015899658203125, 0.0226287841796875, -0.023345947265625, -0.009765625, 0.006504058837890625, 0.059661865234375, 0.0555419921875, -0.050048828125, 0.006687164306640625, 0.02752685546875, 0.0111236572265625, -0.0205230712890625, -0.04913330078125, -0.0019197463989257812, 0.0013132095336914062, -0.01611328125, -0.01218414306640625, -0.0044097900390625, 0.05218505859375, 0.03515625, 0.0196990966796875, -0.047454833984375, -0.022247314453125, 0.01092529296875, 0.0022182464599609375, -0.05267333984375, 0.00846099853515625, 0.0005064010620117188, -0.01806640625, -0.0299224853515625, 0.0175628662109375, 0.0000133514404296875, -0.0027828216552734375, 0.038482666015625, 0.049591064453125, -0.0182037353515625, -0.0222015380859375, 0.0230560302734375, -0.01053619384765625, -0.061553955078125, -0.0201263427734375, 0.01409149169921875, 0.055206298828125, 0.0276641845703125, 0.016357421875, 0.08135986328125, 0.0173187255859375, 0.00405120849609375, 0.0300445556640625, 0.0024509429931640625, -0.00867462158203125, 0.0173797607421875, -0.0006818771362304688, 0.032012939453125, 0.022125244140625, -0.047454833984375, -0.011444091796875, -0.0237579345703125, -0.021697998046875, 0.00795745849609375, 0.012298583984375, -0.0172576904296875, 0.040008544921875, 0.058746337890625, -0.02923583984375, -0.0024204254150390625, -0.00362396240234375, 0.05987548828125, -0.0029582977294921875, -0.01055145263671875, 0.0316162109375, -0.0180816650390625, -0.00616455078125, 0.0300445556640625, 0.007671356201171875, 0.0153045654296875, 0.033355712890625, 0.0088043212890625, 0.006519317626953125, 0.0038890838623046875, 0.052703857421875, -0.04876708984375, -0.01474761962890625, 0.057281494140625, -0.0224761962890625, -0.0020084381103515625, -0.00469207763671875, 0.01250457763671875, -0.0255126953125, 0.04241943359375, -0.058685302734375, -0.0016574859619140625, -0.059173583984375, 0.022125244140625, -0.037078857421875, 0.0253753662109375, -0.0147705078125, 0.01531219482421875, -0.035247802734375, -0.044586181640625, 0.06195068359375, 0.033294677734375, 0.005706787109375, 0.01024627685546875, 0.01087188720703125, -0.0257568359375, 0.034576416015625, -0.013824462890625, 0.044525146484375, 0.04119873046875, -0.01319122314453125, 0.036041259765625, -0.02276611328125, -0.022491455078125, -0.004756927490234375, 0.0224151611328125, -0.0312042236328125, -0.0020904541015625, -0.0243377685546875, -0.0064239501953125, 0.0210113525390625, 0.0210113525390625, -0.0161895751953125, -0.0010986328125, -0.00441741943359375, -0.01024627685546875, 0.033843994140625, -0.0006856918334960938, -0.0309295654296875, -0.0298309326171875, -0.0296173095703125, -0.01177215576171875, -0.031524658203125, -0.057830810546875, -0.00424957275390625, 0.016998291015625, 0.02032470703125, 0.007633209228515625, -0.06549072265625, 0.032684326171875, -0.0096893310546875, 0.055877685546875, -0.025482177734375, -0.025390625, 0.0288238525390625, 0.06414794921875, -0.02227783203125, -0.0243072509765625, -0.01462554931640625, -0.017974853515625, -0.0218505859375, 0.0162506103515625, 0.033233642578125, -0.02203369140625, -0.046630859375, 0.01387786865234375, 0.0004780292510986328, 0.044647216796875, -0.001361846923828125, 0.01194000244140625, 0.05364990234375, 0.0034503936767578125, -0.0791015625, -0.05413818359375, 0.0302886962890625, -0.038818359375, -0.037353515625, 0.0211029052734375, -0.01122283935546875, 0.0197296142578125, -0.03631591796875, -0.1036376953125, 0.0313720703125, -0.00838470458984375, -0.049468994140625, -0.0181427001953125, -0.0007238388061523438, 0.01433563232421875, -0.04364013671875, -0.00310516357421875, -0.042266845703125, -0.05938720703125, -0.023193359375, 0.0190582275390625, 0.0257568359375, 0.0242462158203125, -0.01329803466796875, -0.079345703125, -0.0072479248046875, -0.0265960693359375, 0.0357666015625, -0.00821685791015625, 0.046600341796875, -0.0225830078125, 0.043609619140625, -0.01007843017578125, 0.00653076171875, -0.043670654296875, -0.01837158203125, 0.01107025146484375, -0.00817108154296875, -0.06939697265625, -0.03204345703125, 0.07135009765625, 0.051300048828125, 0.02874755859375, -0.016265869140625, -0.040252685546875, -0.044097900390625, 0.004505157470703125, -0.029388427734375, 0.0195770263671875, -0.080322265625, -0.0225982666015625, 0.0233306884765625, -0.020416259765625, -0.01274871826171875, 0.0069580078125, -0.03656005859375, -0.007526397705078125, -0.013671875, -0.006591796875, -0.043365478515625, 0.03326416015625, -0.00534820556640625, -0.0228424072265625, -0.03936767578125, -0.010528564453125, -0.01183319091796875, -0.031982421875, -0.0021877288818359375, -0.026611328125, -0.02532958984375, 0.0144500732421875, 0.02880859375, 0.00812530517578125, 0.0048370361328125, 0.006267547607421875, -0.0159759521484375, -0.029876708984375, -0.0033168792724609375, 0.0029754638671875, -0.01282501220703125, 0.006134033203125, -0.0016832351684570312, 0.009124755859375, 0.0125274658203125, 0.0180206298828125, 0.01293182373046875, -0.006481170654296875, 0.055084228515625, 0.03936767578125, -0.054046630859375, 0.04754638671875, -0.0225067138671875, -0.00586700439453125, -0.002475738525390625, -0.0237274169921875, -0.0261993408203125, -0.0066680908203125, 0.03619384765625, -0.005596160888671875, 0.0029926300048828125 ]
bc1b4f25033fdfe010389a3b0cdb515d16b04e47
Wordpress Stackexchange Q: Edit image / Delete image link There is a function in Wordpress that allows to display a "edit post" link if the user has sufficient rights. <?php edit_post_link( __( 'Edit' ), '<small class="edit-link">', '</small>' ); ?> Is there an equivalent for media files / attachments, UPDATE This sorts of work $images = fdw_get_post_images('preview-onepost-thumbnail'); if ($images){ $counter= 0; foreach ($images as $image){ $src = $image['src']; $info = $image['info']; edit_post_link( __( 'Edit image' ), '<section><small class="edit-link">', '</small></section>', $info->ID ); ?> But the user actually need to be able to Delete the image. That screen does not allow it. A: This isn't 100% complete, but should be a good start for you. <a href="<?php echo wp_nonce_url( "/wp-admin/post.php?action=delete&amp;post=$post->ID", 'delete-attachment_' . $post->ID ) ?>"><?php _e( 'Delete Permanently' ) ?></a> A couple notes on what you'll have left to do: * *This will do no confirmation, so you'll probably want to use JS to verify that it wasn't clicked by mistake *This will redirect back to the current page, which will no longer exist. The URI may look something like, ?attachment_id=704&deleted=1. You'll want to intercept front-end attachment requests where $_GET['deleted'] == '1' and handle that gracefully (e.g. redirect).
Q: Edit image / Delete image link There is a function in Wordpress that allows to display a "edit post" link if the user has sufficient rights. <?php edit_post_link( __( 'Edit' ), '<small class="edit-link">', '</small>' ); ?> Is there an equivalent for media files / attachments, UPDATE This sorts of work $images = fdw_get_post_images('preview-onepost-thumbnail'); if ($images){ $counter= 0; foreach ($images as $image){ $src = $image['src']; $info = $image['info']; edit_post_link( __( 'Edit image' ), '<section><small class="edit-link">', '</small></section>', $info->ID ); ?> But the user actually need to be able to Delete the image. That screen does not allow it. A: This isn't 100% complete, but should be a good start for you. <a href="<?php echo wp_nonce_url( "/wp-admin/post.php?action=delete&amp;post=$post->ID", 'delete-attachment_' . $post->ID ) ?>"><?php _e( 'Delete Permanently' ) ?></a> A couple notes on what you'll have left to do: * *This will do no confirmation, so you'll probably want to use JS to verify that it wasn't clicked by mistake *This will redirect back to the current page, which will no longer exist. The URI may look something like, ?attachment_id=704&deleted=1. You'll want to intercept front-end attachment requests where $_GET['deleted'] == '1' and handle that gracefully (e.g. redirect).
wordpress
{ "language": "en", "length": 193, "provenance": "stackexchange_00019.jsonl.gz:413930", "question_score": "5", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31371" }
[ 0.07781982421875, -0.01114654541015625, 0.0300140380859375, 0.008270263671875, 0.012908935546875, -0.031402587890625, 0.0906982421875, -0.050323486328125, 0.046966552734375, 0.012969970703125, 0.0048828125, -0.03564453125, 0.005977630615234375, -0.046783447265625, -0.016204833984375, -0.01268768310546875, 0.04486083984375, -0.0343017578125, 0.040863037109375, 0.013824462890625, 0.0008835792541503906, 0.05023193359375, 0.053802490234375, -0.0115203857421875, -0.016571044921875, 0.03961181640625, 0.0560302734375, -0.0106353759765625, -0.04058837890625, -0.03369140625, 0.0014562606811523438, 0.03204345703125, 0.0181732177734375, 0.0221710205078125, -0.021209716796875, -0.040130615234375, 0.00994873046875, 0.007381439208984375, -0.013214111328125, 0.0350341796875, 0.0256805419921875, -0.01202392578125, -0.0010128021240234375, -0.005706787109375, -0.0022487640380859375, -0.0293121337890625, 0.0222930908203125, -0.03594970703125, 0.0100250244140625, 0.03631591796875, 0.0233306884765625, 0.004795074462890625, 0.02313232421875, 0.0203857421875, -0.016998291015625, -0.0169677734375, -0.0147857666015625, 0.0026721954345703125, 0.02996826171875, 0.0026187896728515625, -0.027191162109375, -0.00788116455078125, 0.01374053955078125, -0.0294342041015625, -0.01099395751953125, 0.0028514862060546875, -0.01064300537109375, 0.0279083251953125, -0.047515869140625, -0.03558349609375, 0.0084228515625, -0.043182373046875, -0.01537322998046875, -0.060302734375, 0.0228271484375, 0.058868408203125, -0.01311492919921875, 0.0020122528076171875, -0.01934814453125, 0.008636474609375, 0.037200927734375, -0.0250091552734375, -0.0287628173828125, 0.0022144317626953125, 0.0301513671875, 0.033447265625, 0.0059356689453125, -0.0325927734375, -0.02618408203125, -0.0117645263671875, -0.03143310546875, -0.03131103515625, 0.019073486328125, -0.0231781005859375, -0.03265380859375, -0.01407623291015625, 0.0270233154296875, -0.0007214546203613281, 0.0147705078125, -0.004657745361328125, 0.0063018798828125, -0.039581298828125, -0.004180908203125, -0.004299163818359375, -0.01145172119140625, 0.02490234375, 0.041046142578125, 0.013336181640625, -0.00965118408203125, 0.00821685791015625, -0.019500732421875, 0.011322021484375, -0.0098876953125, -0.0187225341796875, -0.00469207763671875, 0.0296173095703125, -0.031219482421875, 0.023193359375, -0.006656646728515625, 0.0291748046875, -0.0361328125, -0.0182037353515625, 0.0121612548828125, 0.0087738037109375, 0.0216064453125, -0.0064239501953125, -0.01465606689453125, -0.003665924072265625, 0.03955078125, -0.035888671875, -0.06646728515625, 0.0469970703125, 0.11102294921875, -0.0094451904296875, 0.0235595703125, -0.00414276123046875, -0.00579071044921875, -0.0049896240234375, -0.00608062744140625, 0.0106658935546875, 0.038299560546875, -0.00946044921875, 0.002216339111328125, 0.00850677490234375, -0.004512786865234375, 0.035369873046875, 0.018218994140625, -0.0023937225341796875, -0.00876617431640625, -0.0650634765625, -0.0081939697265625, -0.0148773193359375, 0.06341552734375, -0.0085296630859375, 0.00977325439453125, -0.055755615234375, 0.07769775390625, -0.05999755859375, -0.0066070556640625, -0.0738525390625, 0.0322265625, -0.0011377334594726562, 0.032623291015625, -0.0166168212890625, -0.044525146484375, 0.0097503662109375, -0.08685302734375, -0.0257415771484375, 0.0193023681640625, 0.054107666015625, 0.01549530029296875, -0.044189453125, -0.05108642578125, -0.00421142578125, -0.00920867919921875, -0.0000095367431640625, -0.022125244140625, 0.0294647216796875, -0.00015175342559814453, 0.0745849609375, 0.0297698974609375, -0.0243682861328125, 0.0260162353515625, 0.0132904052734375, -0.040618896484375, 0.039581298828125, -0.00885772705078125, 0.05377197265625, 0.029266357421875, 0.0247955322265625, 0.00647735595703125, 0.01155853271484375, -0.01505279541015625, 0.047119140625, -0.0228729248046875, -0.0792236328125, -0.016082763671875, -0.03265380859375, -0.0265045166015625, 0.045867919921875, 0.01226806640625, 0.0104827880859375, -0.0003457069396972656, -0.00798797607421875, -0.08197021484375, 0.0367431640625, -0.03759765625, 0.045562744140625, -0.04833984375, 0.034576416015625, 0.042633056640625, 0.00879669189453125, -0.0266876220703125, -0.0186309814453125, 0.016815185546875, -0.00677490234375, -0.0142059326171875, 0.0030193328857421875, -0.00860595703125, 0.0394287109375, -0.035888671875, -0.03668212890625, -0.048187255859375, -0.0194091796875, 0.038330078125, 0.0007338523864746094, -0.0160980224609375, -0.0205078125, 0.00705718994140625, 0.014190673828125, -0.032562255859375, 0.038818359375, -0.00170135498046875, -0.0257110595703125, -0.0340576171875, -0.0181732177734375, -0.0126800537109375, -0.08099365234375, 0.01702880859375, 0.06378173828125, 0.019683837890625, 0.01971435546875, -0.017181396484375, -0.0055084228515625, 0.0521240234375, 0.01320648193359375, 0.0228729248046875, -0.023162841796875, 0.00621795654296875, 0.0235137939453125, -0.029205322265625, -0.0012359619140625, 0.0197296142578125, -0.044189453125, -0.0179901123046875, 0.043487548828125, -0.0074920654296875, 0.0086517333984375, -0.0202789306640625, 0.031585693359375, -0.0157928466796875, -0.008026123046875, 0.0019054412841796875, -0.0124359130859375, 0.042449951171875, -0.007152557373046875, 0.04425048828125, 0.01316070556640625, -0.032989501953125, -0.006099700927734375, 0.0185699462890625, -0.0157928466796875, -0.0014896392822265625, 0.03704833984375, 0.0094757080078125, -0.0223846435546875, -0.01361083984375, 0.005519866943359375, 0.0024280548095703125, 0.00771331787109375, -0.0266265869140625, 0.00347137451171875, 0.010498046875, -0.012542724609375, -0.00791168212890625, -0.050262451171875, 0.017303466796875, -0.013763427734375, 0.005458831787109375, -0.004085540771484375, 0.0172119140625, 0.050750732421875, -0.020904541015625, 0.0501708984375, -0.005428314208984375, -0.00830841064453125, -0.0050201416015625, -0.03546142578125, 0.04010009765625, -0.039581298828125, 0.0543212890625, 0.06829833984375, -0.03692626953125, 0.03729248046875, 0.007587432861328125, 0.0174560546875, 0.0266265869140625, 0.0203857421875, 0.0031604766845703125, -0.027618408203125, -0.0167388916015625, -0.0443115234375, -0.0113067626953125, -0.00843048095703125, -0.03448486328125, -0.044219970703125, -0.0248565673828125, -0.0289459228515625, -0.1151123046875, -0.04095458984375, -0.028350830078125, -0.080322265625, 0.01140594482421875, 0.0138702392578125, -0.050079345703125, -0.015289306640625, 0.0673828125, 0.01551055908203125, -0.0244293212890625, 0.01003265380859375, 0.0003294944763183594, -0.01532745361328125, -0.035736083984375, -0.0273284912109375, 0.0092315673828125, 0.0033016204833984375, 0.0063018798828125, 0.042724609375, 0.000640869140625, -0.053314208984375, 0.007785797119140625, 0.01409149169921875, -0.006305694580078125, -0.004497528076171875, 0.011505126953125, -0.00717926025390625, -0.02301025390625, -0.0008807182312011719, 0.035919189453125, 0.0269927978515625, -0.03863525390625, 0.0025043487548828125, -0.031951904296875, 0.0028591156005859375, 0.01384735107421875, 0.0006546974182128906, 0.02728271484375, 0.00957489013671875, 0.0213165283203125, -0.021759033203125, -0.0007257461547851562, -0.036529541015625, -0.0361328125, 0.009674072265625, 0.016998291015625, 0.0190582275390625, -0.01318359375, 0.0196533203125, 0.0136260986328125, 0.031524658203125, 0.016937255859375, -0.005771636962890625, 0.0248565673828125, -0.010589599609375, 0.0018177032470703125, -0.0251007080078125, 0.016632080078125, 0.004856109619140625, -0.0006985664367675781, -0.000011861324310302734, 0.0260009765625, -0.00598907470703125, -0.007373809814453125, -0.0645751953125, -0.048858642578125, 0.038543701171875, -0.0241851806640625, 0.02587890625, -0.046417236328125, -0.01971435546875, -0.0200347900390625, 0.07867431640625, -0.0225982666015625, -0.038482666015625, -0.0070648193359375, 0.0254058837890625, -0.0221710205078125, -0.0467529296875, 0.032958984375, -0.016021728515625, -0.09881591796875, 0.0302581787109375, 0.022216796875, -0.0235137939453125, -0.031524658203125, 0.04071044921875, -0.0750732421875, -0.02978515625, 0.0238800048828125, -0.031646728515625, 0.01629638671875, 0.026519775390625, -0.017303466796875, 0.01092529296875, -0.0259246826171875, -0.044525146484375, -0.03851318359375, -0.01507568359375, 0.00711822509765625, 0.040130615234375, 0.0073089599609375, 0.022705078125, -0.0106201171875, 0.042877197265625, 0.026947021484375, -0.0075836181640625, -0.01226043701171875, -0.016357421875, -0.027008056640625, -0.0198974609375, -0.012847900390625, -0.0361328125, -0.005367279052734375, -0.048797607421875, -0.04730224609375, -0.053497314453125, -0.045562744140625, 0.0010404586791992188, -0.01049041748046875, -0.0172119140625, -0.06878662109375, -0.0164642333984375, -0.0151519775390625, 0.0352783203125, -0.01824951171875, -0.0013523101806640625, -0.043060302734375, -0.09039306640625, 0.01320648193359375, -0.018707275390625, -0.02252197265625, 0.00954437255859375, 0.044586181640625, 0.01398468017578125, 0.00028896331787109375, -0.032623291015625, 0.0323486328125, 0.03765869140625, -0.011688232421875, 0.05059814453125, 0.049407958984375, 0.01134490966796875, 0.0006456375122070312, 0.021148681640625, -0.00527191162109375, -0.021881103515625, 0.048492431640625, 0.0031757354736328125, -0.01116180419921875, 0.01255035400390625, -0.02191162109375, 0.00652313232421875, 0.01499176025390625, -0.0203857421875, -0.011077880859375, 0.00495147705078125, 0.032379150390625, -0.0306396484375, 0.045684814453125, -0.020538330078125, -0.03436279296875, -0.00951385498046875, -0.0008478164672851562, 0.045745849609375, 0.0196990966796875, -0.00598907470703125, 0.0301666259765625, 0.04241943359375, 0.02008056640625, -0.0280609130859375, -0.014312744140625, -0.019317626953125, 0.048858642578125, -0.0206146240234375, 0.006561279296875, 0.0017719268798828125, -0.006378173828125, 0.062744140625, 0.006809234619140625, -0.0206451416015625, -0.03985595703125, 0.0024204254150390625, -0.012420654296875, -0.0052642822265625, -0.0176239013671875, 0.01971435546875, 0.021209716796875, -0.0252227783203125, -0.0008006095886230469, -0.0197601318359375, -0.005245208740234375, -0.046966552734375, 0.035858154296875, 0.00896453857421875, 0.008026123046875, 0.058013916015625, 0.035308837890625, 0.0045928955078125, 0.042205810546875, -0.022918701171875, 0.038604736328125, 0.05865478515625, 0.005825042724609375, 0.0176544189453125, 0.0301055908203125, -0.01910400390625, -0.0188751220703125, -0.00949859619140625, -0.061981201171875, -0.037139892578125, 0.05548095703125, 0.07305908203125, -0.0022830963134765625, -0.002742767333984375, -0.007049560546875, -0.008575439453125, -0.0234527587890625, 0.0621337890625, 0.0269775390625, -0.07684326171875, -0.0030918121337890625, 0.0438232421875, 0.0141754150390625, -0.032989501953125, -0.01094818115234375, -0.0106964111328125, 0.01149749755859375, 0.0200958251953125, -0.01166534423828125, -0.023193359375, 0.00666046142578125, 0.0008625984191894531, -0.0023632049560546875, -0.0274810791015625, -0.02117919921875, 0.0259857177734375, 0.00994110107421875, -0.0411376953125, -0.040557861328125, 0.0863037109375, -0.0039520263671875, -0.001483917236328125, -0.022674560546875, -0.008087158203125, -0.00554656982421875, -0.0105133056640625, 0.084716796875, 0.0276336669921875, -0.038116455078125, -0.01137542724609375, -0.024688720703125, -0.0078125, 0.026275634765625, -0.0311279296875, -0.024261474609375, -0.005001068115234375, -0.013214111328125, 0.034820556640625, -0.0271453857421875, -0.0115203857421875, -0.0255584716796875, -0.0010833740234375, 0.0050506591796875, 0.06573486328125, 0.0244598388671875, 0.0039215087890625, -0.0117340087890625, 0.04156494140625, 0.033172607421875, 0.0014295578002929688, -0.035064697265625, -0.0323486328125, -0.004199981689453125, -0.030792236328125, 0.01519775390625, -0.0303955078125, 0.0179290771484375, -0.00421142578125, 0.01280975341796875, 0.011077880859375, -0.018768310546875, -0.019927978515625, -0.00634002685546875, -0.036712646484375, 0.040618896484375, -0.00464630126953125, 0.0017108917236328125, -0.0215911865234375, -0.035247802734375, -0.0226593017578125, 0.0163726806640625, 0.030914306640625, -0.0010395050048828125, -0.0216064453125, -0.0174713134765625, 0.029205322265625, -0.00495147705078125, 0.0192718505859375, 0.06939697265625, -0.01727294921875, 0.0292510986328125, 0.01983642578125, -0.0022678375244140625, 0.0523681640625, 0.01010894775390625, -0.01279449462890625, -0.001293182373046875, 0.038787841796875, -0.00696563720703125, -0.00345611572265625, 0.005565643310546875, -0.008026123046875, 0.00928497314453125, 0.040191650390625, 0.053680419921875, -0.053863525390625, 0.0239105224609375, -0.0035495758056640625, -0.003124237060546875, 0.05419921875, -0.01198577880859375, 0.0271148681640625, 0.006439208984375, 0.003688812255859375, -0.00655364990234375, -0.0226287841796875, -0.0206298828125, -0.01384735107421875, 0.014801025390625, -0.0049591064453125, 0.0300140380859375, 0.005008697509765625, -0.0755615234375, -0.028717041015625, 0.06719970703125, -0.033447265625, -0.0338134765625, 0.0032825469970703125, 0.0018024444580078125, 0.006381988525390625, -0.04620361328125, 0.02886962890625, -0.0197296142578125, 0.0298919677734375, 0.015777587890625, -0.0245819091796875, -0.0010461807250976562, 0.053741455078125, -0.0286865234375, 0.025665283203125, 0.03167724609375, -0.0545654296875, -0.01824951171875, -0.0299224853515625, 0.0035877227783203125, 0.014892578125, -0.044952392578125, 0.023345947265625, -0.034271240234375, -0.01220703125, -0.021759033203125, 0.003726959228515625, 0.0740966796875, -0.03485107421875, -0.01332855224609375, 0.043609619140625, 0.04193115234375, -0.0379638671875, -0.01050567626953125, -0.006137847900390625, -0.050262451171875, -0.03033447265625, -0.03643798828125, -0.06463623046875, 0.0020313262939453125, -0.06280517578125, -0.0650634765625, 0.0836181640625, -0.017608642578125, 0.049591064453125, 0.006259918212890625, 0.0307159423828125, 0.01103973388671875, 0.0119781494140625, -0.034332275390625, 0.045562744140625, -0.019195556640625, 0.00283050537109375, -0.041229248046875, 0.003055572509765625, -0.0127410888671875, 0.00653076171875, 0.1004638671875, 0.038604736328125, -0.023712158203125, -0.0038928985595703125, 0.022705078125, 0.009033203125, -0.037109375, 0.053009033203125, -0.004852294921875, -0.007678985595703125, 0.016998291015625, -0.046478271484375, 0.01454925537109375, -0.0301666259765625, -0.00316619873046875, 0.015899658203125, 0.0093994140625, 0.007129669189453125, 0.0244903564453125, 0.0269622802734375, -0.04364013671875, 0.0034198760986328125, 0.04583740234375, -0.05029296875, 0.01099395751953125, 0.041717529296875, 0.059417724609375, -0.0255889892578125, -0.00385284423828125, -0.01922607421875, 0.04754638671875, 0.01531982421875, -0.00830841064453125, 0.04315185546875, 0.02398681640625, 0.0120697021484375, -0.0137939453125, -0.0033721923828125, 0.00952911376953125, -0.00133514404296875, 0.0408935546875, 0.0281829833984375, 0.0184326171875, -0.04986572265625, -0.03204345703125, 0.07861328125, 0.08233642578125, -0.036163330078125, -0.0180816650390625, 0.0175628662109375, 0.026214599609375, 0.016632080078125, -0.01654052734375, 0.032684326171875, -0.0579833984375, -0.00821685791015625, -0.028350830078125, 0.0167388916015625, 0.054412841796875, 0.0224761962890625, 0.0167999267578125, 0.00905609130859375, -0.07757568359375, 0.010986328125, -0.0262451171875, -0.0018444061279296875, 0.010986328125, -0.0137939453125, 0.0016803741455078125, -0.005527496337890625, 0.07611083984375, 0.022430419921875, -0.0217132568359375, 0.055633544921875, -0.00206756591796875, 0.012847900390625, -0.03240966796875, -0.067138671875, 0.0269622802734375, 0.039306640625, 0.00495147705078125, 0.0042877197265625, 0.050567626953125, 0.02081298828125, -0.0526123046875, -0.01407623291015625, -0.0034999847412109375, -0.038665771484375, 0.0266571044921875, -0.0291290283203125, 0.0218048095703125, -0.007259368896484375, -0.007137298583984375, -0.01010894775390625, 0.01123046875, 0.040924072265625, -0.0262603759765625, 0.027313232421875, -0.01104736328125, -0.0163116455078125, 0.026611328125, -0.016143798828125, 0.0260162353515625, -0.0129547119140625, -0.08984375, -0.035369873046875, -0.00876617431640625, -0.032012939453125, 0.015838623046875, 0.03204345703125, -0.034759521484375, 0.0192108154296875, -0.0380859375, -0.01171875, 0.005954742431640625, -0.008331298828125, -0.0107269287109375, 0.0006322860717773438, 0.0033855438232421875, -0.0224609375, -0.01114654541015625, 0.00289154052734375, -0.011383056640625, 0.0251922607421875, 0.003406524658203125, 0.06353759765625, -0.0248870849609375, 0.018798828125, -0.004825592041015625, 0.048004150390625, -0.053192138671875, -0.0028972625732421875, 0.0231170654296875, -0.0087127685546875, -0.0100250244140625, -0.017913818359375, -0.00257110595703125, 0.05938720703125, 0.0108795166015625, -0.029510498046875, 0.006191253662109375, 0.004444122314453125, 0.002895355224609375, 0.0279998779296875, 0.0176239013671875, -0.0253753662109375, -0.01024627685546875, -0.04644775390625, -0.025177001953125, 0.0474853515625, 0.037353515625, 0.01255035400390625, 0.0263824462890625, 0.022216796875, -0.00740814208984375, 0.02099609375, -0.005931854248046875, 0.049835205078125, 0.03729248046875, -0.02362060546875, -0.023223876953125, 0.0048675537109375, -0.004009246826171875, -0.021575927734375, 0.0253143310546875, -0.01239776611328125, 0.01389312744140625, -0.007659912109375, -0.013580322265625, -0.043914794921875, 0.015228271484375, -0.020233154296875, -0.00727081298828125, -0.032928466796875, 0.0164031982421875, 0.005718231201171875, 0.010955810546875, -0.00939178466796875, -0.061767578125, -0.015411376953125, -0.01001739501953125, -0.032012939453125, -0.0278167724609375, -0.02386474609375, -0.0111083984375, 0.035888671875, 0.019378662109375, -0.078857421875, 0.0255584716796875, 0.01221466064453125, 0.037353515625, -0.0096282958984375, 0.0008130073547363281, -0.0238494873046875, 0.01236724853515625, -0.041229248046875, -0.05841064453125, -0.06549072265625, 0.045745849609375, -0.07135009765625, 0.0186920166015625, 0.036041259765625, -0.028228759765625, 0.005825042724609375, 0.0164031982421875, 0.0170135498046875, 0.05877685546875, -0.00708770751953125, -0.0341796875, -0.0361328125, 0.0154571533203125, 0.0223388671875, -0.036102294921875, -0.00640869140625, -0.0247039794921875, -0.0146331787109375, 0.01702880859375, -0.01023101806640625, 0.014007568359375, -0.042816162109375, -0.09014892578125, 0.0455322265625, -0.0159759521484375, -0.036956787109375, -0.009735107421875, -0.0038089752197265625, -0.020355224609375, 0.027435302734375, 0.016693115234375, -0.0255279541015625, -0.01154327392578125, 0.023773193359375, 0.0027027130126953125, 0.03643798828125, -0.007266998291015625, 0.023529052734375, -0.022705078125, 0.02862548828125, 0.0040435791015625, -0.012786865234375, 0.033538818359375, -0.04425048828125, 0.08294677734375, 0.06195068359375, -0.0128021240234375, -0.00011968612670898438, 0.01355743408203125, -0.050537109375, -0.0211944580078125, -0.045501708984375, -0.050689697265625, -0.016204833984375, 0.093017578125, 0.056976318359375, 0.027191162109375, -0.031646728515625, 0.0311279296875, -0.01172637939453125, -0.0628662109375, -0.00223541259765625, 0.030029296875, -0.04937744140625, -0.0189056396484375, 0.016021728515625, -0.021942138671875, 0.007289886474609375, -0.00662994384765625, -0.04974365234375, 0.0027027130126953125, -0.0111083984375, -0.010772705078125, -0.047760009765625, 0.035125732421875, 0.07586669921875, -0.04864501953125, 0.027191162109375, -0.01421356201171875, -0.003673553466796875, 0.049224853515625, -0.04425048828125, 0.01099395751953125, 0.004119873046875, -0.0209197998046875, 0.0061492919921875, 0.005634307861328125, -0.00439453125, -0.0189361572265625, -0.0179290771484375, -0.0298309326171875, 0.0192413330078125, 0.0015039443969726562, 0.0081787109375, 0.00374603271484375, 0.0487060546875, 0.0191650390625, 0.044677734375, -0.023040771484375, 0.0174102783203125, 0.005523681640625, -0.00994110107421875, -0.0268402099609375, 0.0283660888671875, 0.0222625732421875, -0.04229736328125, -0.0026264190673828125, 0.0036716461181640625, -0.0120391845703125, -0.049957275390625, 0.022979736328125, 0.0242767333984375, -0.01068878173828125, 0.023773193359375 ]
d4a5b74b3e5b3e900bb6376820026e70fdd4a60a
Wordpress Stackexchange Q: Can't add a Page with Name 2011 I've no idea why i can't add a Page with Name 2011. Wordpress changes the URL Slug to 2011-01. There is no Post with this Name in my Database. I tried zu flush my rewrite rules but nothing seems to be work. If i add a Page 2013 it works fine. But only once... If i delete this Page (from Trash) i can't add it again. Wordpress changes the slug to 2013-01. If i change the Post name directly in the database. Nothing happens... I really wonder why because there is no Post with this Name. Any suggestions? A: This has to do with how paging-within-a-page works. See ticket #5305. There's a plugin that will allow you to have numeric slugs if you're willing to sacrifice paging: http://wordpress.org/extend/plugins/allow-numeric-stubs/
Q: Can't add a Page with Name 2011 I've no idea why i can't add a Page with Name 2011. Wordpress changes the URL Slug to 2011-01. There is no Post with this Name in my Database. I tried zu flush my rewrite rules but nothing seems to be work. If i add a Page 2013 it works fine. But only once... If i delete this Page (from Trash) i can't add it again. Wordpress changes the slug to 2013-01. If i change the Post name directly in the database. Nothing happens... I really wonder why because there is no Post with this Name. Any suggestions? A: This has to do with how paging-within-a-page works. See ticket #5305. There's a plugin that will allow you to have numeric slugs if you're willing to sacrifice paging: http://wordpress.org/extend/plugins/allow-numeric-stubs/
wordpress
{ "language": "en", "length": 136, "provenance": "stackexchange_00019.jsonl.gz:413936", "question_score": "3", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31406" }
[ 0.006359100341796875, 0.0168609619140625, -0.03173828125, 0.002353668212890625, 0.01123046875, -0.0311279296875, 0.0240631103515625, -0.031646728515625, 0.0107574462890625, 0.00015079975128173828, -0.054229736328125, 0.0469970703125, -0.034576416015625, -0.006229400634765625, -0.00771331787109375, -0.017333984375, 0.026275634765625, -0.01261138916015625, 0.00731658935546875, -0.028961181640625, 0.01080322265625, -0.02020263671875, 0.0267181396484375, 0.01983642578125, 0.032867431640625, -0.04302978515625, 0.0312347412109375, -0.0103912353515625, 0.0330810546875, -0.0275115966796875, 0.021026611328125, -0.01177978515625, 0.0213470458984375, 0.0010824203491210938, 0.004932403564453125, 0.01145172119140625, -0.01398468017578125, -0.0125579833984375, 0.001377105712890625, 0.01479339599609375, 0.045623779296875, -0.03204345703125, 0.023193359375, 0.003986358642578125, 0.019073486328125, -0.0325927734375, 0.035919189453125, -0.059661865234375, 0.0179290771484375, -0.02081298828125, 0.001346588134765625, 0.033172607421875, 0.01299285888671875, 0.021453857421875, -0.001430511474609375, 0.006633758544921875, 0.010711669921875, 0.050201416015625, -0.0007104873657226562, -0.025390625, -0.0079193115234375, 0.06256103515625, 0.00046634674072265625, 0.0212249755859375, 0.02325439453125, -0.0103607177734375, 0.025390625, 0.00811004638671875, -0.033721923828125, 0.0307159423828125, 0.04571533203125, -0.0152740478515625, -0.03509521484375, -0.0149078369140625, 0.042236328125, 0.0022678375244140625, 0.006214141845703125, 0.004314422607421875, -0.010894775390625, 0.060943603515625, 0.028289794921875, -0.01351165771484375, -0.018341064453125, -0.01959228515625, 0.0155487060546875, 0.004650115966796875, -0.00759124755859375, -0.0123748779296875, -0.040740966796875, 0.0138092041015625, -0.0265655517578125, -0.0157928466796875, -0.0014133453369140625, 0.00746917724609375, -0.0108184814453125, 0.0206451416015625, 0.0535888671875, 0.08941650390625, 0.0267486572265625, 0.02374267578125, -0.0148773193359375, -0.054168701171875, 0.0162200927734375, -0.051605224609375, 0.0185546875, 0.02899169921875, 0.014801025390625, 0.044525146484375, 0.05810546875, -0.01373291015625, -0.01146697998046875, 0.051300048828125, 0.00368499755859375, -0.0281219482421875, -0.0121917724609375, 0.0282135009765625, 0.0181121826171875, -0.018096923828125, 0.021453857421875, -0.0181732177734375, 0.0137939453125, 0.0313720703125, -0.055908203125, -0.0103607177734375, 0.01381683349609375, 0.0024509429931640625, 0.0024433135986328125, -0.0010042190551757812, 0.01409912109375, 0.005596160888671875, -0.0244598388671875, 0.0228118896484375, 0.0533447265625, 0.0067138671875, -0.00018024444580078125, -0.0158843994140625, 0.0276947021484375, 0.00321197509765625, -0.03155517578125, 0.0223236083984375, -0.02166748046875, -0.01165771484375, -0.0035724639892578125, -0.050689697265625, 0.0104217529296875, 0.009857177734375, 0.00789642333984375, 0.027435302734375, -0.0007352828979492188, -0.0038623809814453125, 0.006992340087890625, -0.036834716796875, 0.044525146484375, 0.0092926025390625, -0.046356201171875, -0.039520263671875, -0.00887298583984375, -0.0487060546875, 0.0187530517578125, -0.0333251953125, 0.01904296875, -0.0025005340576171875, -0.01062774658203125, -0.047698974609375, -0.052581787109375, -0.01300811767578125, -0.06304931640625, -0.0030689239501953125, 0.017242431640625, 0.025238037109375, -0.0208892822265625, 0.03411865234375, 0.01366424560546875, -0.006221771240234375, -0.0167999267578125, 0.005359649658203125, -0.018463134765625, 0.020965576171875, 0.01322174072265625, 0.048614501953125, 0.0382080078125, -0.008575439453125, 0.04522705078125, 0.0197601318359375, -0.0609130859375, 0.046295166015625, 0.00681304931640625, 0.0116729736328125, -0.001338958740234375, -0.017578125, 0.07373046875, 0.053009033203125, -0.0212249755859375, 0.0240936279296875, 0.01541900634765625, -0.03887939453125, 0.0159759521484375, -0.011138916015625, 0.0045928955078125, -0.01464080810546875, -0.040557861328125, 0.032958984375, -0.030181884765625, 0.044769287109375, -0.0092315673828125, -0.0013141632080078125, -0.0115509033203125, 0.0246734619140625, 0.0157928466796875, 0.0291290283203125, 0.00730133056640625, 0.01043701171875, -0.044036865234375, -0.014495849609375, -0.045074462890625, 0.008392333984375, -0.03802490234375, 0.0178070068359375, -0.024688720703125, 0.05462646484375, -0.036712646484375, -0.01490020751953125, -0.03204345703125, -0.03314208984375, 0.0328369140625, -0.03582763671875, -0.0176239013671875, -0.04388427734375, -0.01059722900390625, -0.00693511962890625, -0.06890869140625, 0.07781982421875, -0.021697998046875, 0.046966552734375, 0.0283660888671875, 0.007694244384765625, -0.0180816650390625, -0.0853271484375, 0.0162353515625, 0.0243377685546875, 0.01947021484375, 0.0258636474609375, -0.01119232177734375, 0.00910186767578125, -0.0201263427734375, -0.05633544921875, 0.005161285400390625, -0.00983428955078125, -0.003803253173828125, 0.058807373046875, 0.049713134765625, 0.03900146484375, -0.0187530517578125, 0.023040771484375, -0.01515960693359375, 0.0238037109375, -0.032623291015625, -0.0154876708984375, 0.0135345458984375, 0.005641937255859375, -0.007595062255859375, -0.0034942626953125, 0.021148681640625, -0.0162811279296875, -0.032073974609375, -0.0030517578125, 0.005947113037109375, 0.0216064453125, 0.0152587890625, -0.028106689453125, 0.0088348388671875, -0.030670166015625, 0.00899505615234375, 0.0271453857421875, 0.03155517578125, -0.034149169921875, -0.033905029296875, -0.00946044921875, 0.04022216796875, 0.008148193359375, -0.01861572265625, -0.01197052001953125, 0.02667236328125, -0.01268768310546875, -0.013519287109375, -0.025604248046875, 0.048828125, -0.0010843276977539062, -0.0153961181640625, -0.035003662109375, -0.0012922286987304688, 0.021942138671875, -0.031524658203125, 0.01776123046875, 0.030029296875, -0.0374755859375, 0.016021728515625, -0.01230621337890625, 0.028045654296875, -0.0188751220703125, 0.0090789794921875, 0.0545654296875, 0.0016651153564453125, 0.0153656005859375, -0.010894775390625, 0.0022983551025390625, -0.0186920166015625, 0.018585205078125, -0.01068115234375, -0.013580322265625, -0.05450439453125, 0.003078460693359375, 0.041961669921875, 0.030853271484375, 0.0458984375, -0.0025691986083984375, 0.0193939208984375, 0.044342041015625, -0.0296783447265625, -0.06488037109375, -0.038848876953125, 0.0176849365234375, -0.0196990966796875, 0.06268310546875, 0.01617431640625, 0.002780914306640625, 0.04315185546875, 0.0021762847900390625, 0.0162353515625, -0.0239410400390625, -0.051544189453125, -0.054473876953125, -0.06256103515625, -0.053070068359375, -0.00927734375, 0.005756378173828125, 0.00995635986328125, 0.0667724609375, 0.0085906982421875, -0.06732177734375, -0.0086669921875, 0.0439453125, -0.007198333740234375, 0.028778076171875, -0.026702880859375, 0.004436492919921875, 0.03448486328125, -0.0100555419921875, 0.061737060546875, 0.051605224609375, -0.03814697265625, 0.0149993896484375, -0.0098724365234375, -0.00417327880859375, -0.01309967041015625, 0.059417724609375, 0.038848876953125, 0.007183074951171875, 0.0174407958984375, -0.044677734375, -0.00708770751953125, -0.0175018310546875, -0.033966064453125, 0.049163818359375, 0.0224761962890625, -0.01061248779296875, -0.0188446044921875, 0.0233306884765625, -0.032958984375, -0.006656646728515625, 0.00759124755859375, -0.0271453857421875, -0.024261474609375, -0.0244903564453125, -0.020477294921875, 0.01080322265625, 0.0284576416015625, -0.00501251220703125, 0.01386260986328125, 0.0203704833984375, 0.0087738037109375, 0.0201568603515625, 0.0085296630859375, 0.008087158203125, -0.059417724609375, 0.01873779296875, -0.089599609375, -0.0007662773132324219, -0.054229736328125, 0.00994110107421875, -0.01284027099609375, 0.058807373046875, -0.01995849609375, -0.0374755859375, -0.0247344970703125, 0.01904296875, 0.00006461143493652344, -0.047576904296875, 0.0231170654296875, -0.035308837890625, -0.0288543701171875, 0.00713348388671875, -0.007354736328125, -0.00905609130859375, -0.024078369140625, 0.020355224609375, 0.005985260009765625, -0.026458740234375, 0.0465087890625, -0.031768798828125, 0.007904052734375, 0.022979736328125, 0.0022487640380859375, -0.016082763671875, -0.0364990234375, -0.004802703857421875, -0.09613037109375, -0.03790283203125, 0.04913330078125, 0.07867431640625, -0.029815673828125, -0.04766845703125, -0.0462646484375, 0.0391845703125, 0.0153045654296875, 0.0227508544921875, -0.0130462646484375, -0.022674560546875, -0.01102447509765625, 0.0287017822265625, 0.0013980865478515625, 0.0061492919921875, 0.01290130615234375, -0.0006284713745117188, 0.002796173095703125, 0.057464599609375, -0.0167388916015625, 0.01280975341796875, 0.00018978118896484375, -0.0212554931640625, -0.0230560302734375, -0.0215911865234375, 0.027374267578125, 0.04681396484375, 0.011322021484375, 0.0195465087890625, -0.049896240234375, -0.0166015625, 0.032440185546875, -0.0234527587890625, -0.004833221435546875, 0.0235137939453125, 0.07843017578125, -0.0024814605712890625, -0.0250244140625, -0.06549072265625, -0.01116943359375, 0.04290771484375, 0.0008473396301269531, 0.035003662109375, 0.01227569580078125, -0.0205841064453125, 0.044097900390625, 0.00836181640625, 0.01922607421875, -0.003749847412109375, -0.0006208419799804688, -0.003032684326171875, -0.032379150390625, 0.0188751220703125, 0.000025987625122070312, 0.031524658203125, 0.059783935546875, -0.028228759765625, -0.01214599609375, -0.0078887939453125, 0.054718017578125, -0.0278472900390625, 0.01470947265625, -0.06451416015625, -0.02154541015625, 0.014892578125, -0.028045654296875, 0.024627685546875, -0.0264739990234375, 0.0247344970703125, -0.02081298828125, -0.01103973388671875, -0.0122528076171875, 0.032135009765625, 0.02520751953125, -0.038543701171875, 0.007755279541015625, 0.002422332763671875, -0.04852294921875, 0.032257080078125, -0.01690673828125, 0.045989990234375, 0.039459228515625, -0.0241241455078125, 0.0178985595703125, -0.01849365234375, 0.01406097412109375, -0.0270538330078125, 0.006053924560546875, 0.0280914306640625, 0.049774169921875, 0.03680419921875, 0.0308685302734375, -0.0034275054931640625, 0.057647705078125, -0.01629638671875, -0.0154571533203125, 0.0022430419921875, -0.02935791015625, 0.01033782958984375, 0.011199951171875, 0.0361328125, -0.0205230712890625, -0.025634765625, 0.0016832351684570312, 0.00754547119140625, 0.0204315185546875, 0.0215606689453125, 0.0012683868408203125, -0.0205078125, 0.009796142578125, -0.001239776611328125, -0.032257080078125, -0.00734710693359375, 0.0274658203125, 0.045501708984375, -0.0173797607421875, -0.0294647216796875, 0.0127105712890625, -0.011474609375, -0.00713348388671875, 0.0158843994140625, 0.0176544189453125, -0.007045745849609375, -0.0095672607421875, -0.0182647705078125, 0.01020050048828125, -0.0013217926025390625, -0.01294708251953125, -0.0279693603515625, -0.04742431640625, -0.01453399658203125, 0.041229248046875, -0.00270843505859375, -0.035675048828125, -0.05377197265625, 0.01087188720703125, -0.047454833984375, -0.00914764404296875, 0.007434844970703125, 0.051605224609375, -0.044677734375, -0.022705078125, 0.0450439453125, 0.0022678375244140625, 0.07861328125, -0.00618743896484375, -0.0655517578125, 0.04693603515625, 0.011077880859375, 0.0297393798828125, 0.004180908203125, -0.024658203125, -0.0002834796905517578, -0.03125, -0.0249786376953125, 0.04193115234375, 0.01468658447265625, -0.02239990234375, -0.0245819091796875, 0.011444091796875, 0.036407470703125, -0.0489501953125, -0.0401611328125, 0.0277252197265625, 0.0190277099609375, -0.0110626220703125, 0.047454833984375, -0.0260467529296875, 0.034149169921875, -0.0013303756713867188, 0.025360107421875, -0.02264404296875, -0.01093292236328125, 0.0028057098388671875, -0.014617919921875, 0.01324462890625, -0.041900634765625, -0.042449951171875, -0.021209716796875, -0.04376220703125, 0.03375244140625, 0.030975341796875, -0.01323699951171875, 0.004993438720703125, -0.002941131591796875, 0.0132904052734375, -0.02752685546875, 0.0205078125, -0.019775390625, 0.0005002021789550781, 0.0006728172302246094, -0.011444091796875, 0.0555419921875, 0.0177001953125, -0.00008755922317504883, -0.004970550537109375, -0.0198516845703125, 0.0262908935546875, 0.026123046875, -0.0256805419921875, 0.0253448486328125, 0.050537109375, 0.01448822021484375, 0.03863525390625, -0.0006389617919921875, 0.03997802734375, 0.01971435546875, -0.007694244384765625, -0.023284912109375, -0.00762176513671875, 0.05157470703125, 0.00878143310546875, -0.0291748046875, 0.0289459228515625, -0.038665771484375, 0.00782012939453125, 0.06500244140625, 0.0216827392578125, -0.108642578125, -0.006496429443359375, -0.00853729248046875, 0.018218994140625, 0.028045654296875, -0.0187835693359375, 0.021270751953125, 0.0156707763671875, 0.04449462890625, -0.00350189208984375, -0.01383209228515625, 0.0285797119140625, -0.007564544677734375, -0.017486572265625, 0.0055389404296875, 0.0264892578125, 0.004871368408203125, 0.0018301010131835938, -0.0036144256591796875, -0.0230865478515625, 0.0229034423828125, -0.0430908203125, -0.01346588134765625, 0.027557373046875, -0.0183258056640625, -0.04132080078125, 0.042999267578125, -0.041839599609375, 0.0380859375, 0.0081939697265625, 0.008636474609375, 0.02850341796875, 0.021026611328125, 0.005954742431640625, -0.0235595703125, 0.0015697479248046875, -0.01348114013671875, 0.06561279296875, -0.0089111328125, -0.0179290771484375, -0.01290130615234375, 0.034576416015625, -0.0175628662109375, 0.016632080078125, -0.032501220703125, -0.003467559814453125, -0.035064697265625, 0.034454345703125, -0.004039764404296875, -0.0323486328125, 0.0010652542114257812, -0.003726959228515625, 0.0115966796875, 0.04241943359375, -0.037109375, -0.0022735595703125, -0.01560211181640625, 0.0202178955078125, -0.05328369140625, 0.03472900390625, 0.049285888671875, -0.08941650390625, 0.10003662109375, 0.0183868408203125, 0.035491943359375, -0.0185394287109375, 0.035888671875, -0.0215301513671875, 0.00940704345703125, -0.044921875, 0.048675537109375, 0.0357666015625, 0.046600341796875, -0.0333251953125, 0.0022869110107421875, 0.003978729248046875, 0.01068115234375, 0.047332763671875, 0.00275421142578125, -0.0042724609375, 0.0009794235229492188, 0.07586669921875, 0.0291290283203125, -0.0039215087890625, 0.013763427734375, 0.00159454345703125, -0.0266571044921875, 0.004375457763671875, 0.01763916015625, 0.0189361572265625, 0.004100799560546875, -0.043914794921875, 0.038726806640625, -0.01395416259765625, -0.033782958984375, 0.01105499267578125, 0.027099609375, 0.00872039794921875, -0.01153564453125, -0.016143798828125, -0.04400634765625, -0.0168609619140625, 0.034515380859375, 0.0267486572265625, -0.0260467529296875, -0.050445556640625, -0.01568603515625, 0.042816162109375, 0.03515625, -0.0083465576171875, 0.02362060546875, 0.00948333740234375, -0.0181427001953125, -0.026214599609375, -0.0211639404296875, 0.01702880859375, -0.01178741455078125, 0.056976318359375, 0.042236328125, 0.00955963134765625, -0.04840087890625, -0.0248260498046875, 0.09698486328125, 0.09710693359375, -0.055084228515625, -0.0200958251953125, -0.0014829635620117188, -0.0287628173828125, -0.01031494140625, -0.028839111328125, -0.0198822021484375, -0.00775146484375, -0.00739288330078125, -0.0445556640625, 0.0164031982421875, 0.028106689453125, 0.033416748046875, -0.009429931640625, -0.0013418197631835938, -0.049346923828125, 0.004871368408203125, -0.05328369140625, 0.031494140625, -0.00107574462890625, 0.06695556640625, 0.00047659873962402344, 0.07183837890625, -0.0223236083984375, -0.010894775390625, -0.00563812255859375, 0.0204925537109375, -0.00466156005859375, 0.01248931884765625, -0.048492431640625, -0.0408935546875, 0.03521728515625, 0.041290283203125, -0.0026721954345703125, 0.0526123046875, 0.04571533203125, 0.01763916015625, -0.034210205078125, -0.0161895751953125, 0.03082275390625, -0.05029296875, 0.030426025390625, -0.0233917236328125, 0.037078857421875, 0.00923919677734375, -0.0181884765625, -0.042999267578125, 0.0192108154296875, 0.045013427734375, 0.006114959716796875, -0.0250701904296875, 0.0161285400390625, -0.040283203125, 0.07183837890625, 0.00815582275390625, 0.053863525390625, 0.031890869140625, -0.08837890625, -0.0274810791015625, -0.04608154296875, -0.0190277099609375, 0.032379150390625, 0.039306640625, 0.01227569580078125, -0.01271820068359375, -0.026092529296875, -0.00896453857421875, 0.00943756103515625, 0.01174163818359375, -0.00920867919921875, 0.033660888671875, 0.0228271484375, 0.004978179931640625, -0.0285797119140625, -0.00972747802734375, 0.0045013427734375, 0.011688232421875, -0.02581787109375, 0.10760498046875, -0.0295562744140625, -0.03155517578125, -0.01035308837890625, 0.00789642333984375, -0.002147674560546875, -0.006328582763671875, -0.007114410400390625, 0.0276641845703125, 0.0206756591796875, -0.0152587890625, -0.060577392578125, 0.02386474609375, 0.0115203857421875, -0.025390625, 0.00708770751953125, -0.00711822509765625, 0.007343292236328125, 0.01739501953125, 0.0009737014770507812, -0.02093505859375, -0.0022983551025390625, 0.025360107421875, 0.007320404052734375, 0.00656890869140625, -0.00876617431640625, -0.015960693359375, 0.0269622802734375, 0.004978179931640625, -0.030517578125, 0.02081298828125, -0.045318603515625, 0.01446533203125, 0.017730712890625, 0.01227569580078125, -0.005023956298828125, -0.01308441162109375, -0.012847900390625, -0.004116058349609375, 0.01143646240234375, 0.0156707763671875, 0.007549285888671875, 0.03515625, -0.00705718994140625, -0.032318115234375, 0.0055999755859375, -0.0195465087890625, -0.01087188720703125, 0.00946044921875, 0.00844573974609375, -0.035247802734375, -0.0181732177734375, -0.033599853515625, -0.041961669921875, -0.01404571533203125, 0.01421356201171875, -0.041900634765625, -0.01424407958984375, -0.05303955078125, 0.0288543701171875, -0.0255126953125, 0.015838623046875, -0.09710693359375, 0.0899658203125, -0.005496978759765625, 0.003452301025390625, -0.033233642578125, -0.03131103515625, 0.010223388671875, 0.00016748905181884766, -0.0670166015625, 0.0171051025390625, -0.032379150390625, -0.04937744140625, -0.01357269287109375, -0.0019121170043945312, 0.031890869140625, -0.0096893310546875, -0.0421142578125, -0.041046142578125, -0.00982666015625, 0.01227569580078125, -0.00936126708984375, -0.00923919677734375, 0.026031494140625, -0.0007719993591308594, -0.039031982421875, -0.087890625, 0.02764892578125, -0.08013916015625, -0.00011295080184936523, 0.0130615234375, -0.0246124267578125, -0.0172271728515625, -0.041595458984375, -0.032470703125, 0.016387939453125, 0.041168212890625, -0.032318115234375, -0.07000732421875, -0.004405975341796875, -0.029022216796875, 0.07037353515625, -0.000713348388671875, -0.0318603515625, -0.00289154052734375, 0.071533203125, 0.00876617431640625, 0.047027587890625, -0.03985595703125, 0.050048828125, -0.0159149169921875, 0.0606689453125, 0.0239715576171875, -0.01708984375, 0.07080078125, -0.021148681640625, 0.04644775390625, 0.0499267578125, -0.077880859375, 0.04254150390625, -0.046173095703125, -0.00687408447265625, -0.013763427734375, -0.037567138671875, -0.057891845703125, -0.04315185546875, 0.06915283203125, 0.06842041015625, 0.033203125, -0.0199127197265625, -0.0139617919921875, -0.07073974609375, -0.048492431640625, -0.028564453125, 0.022705078125, -0.0618896484375, 0.0081329345703125, 0.0220489501953125, -0.01131439208984375, 0.037109375, 0.008636474609375, -0.00751495361328125, 0.0124359130859375, 0.0229949951171875, -0.023834228515625, -0.0196685791015625, 0.0298004150390625, 0.04876708984375, -0.0506591796875, -0.015167236328125, 0.002750396728515625, -0.0063629150390625, -0.0023899078369140625, -0.03704833984375, -0.03033447265625, 0.0034198760986328125, -0.031951904296875, 0.0243072509765625, -0.027923583984375, 0.02252197265625, -0.05572509765625, 0.0128631591796875, 0.02874755859375, -0.00028395652770996094, -0.0157012939453125, 0.004627227783203125, 0.0028171539306640625, 0.046844482421875, -0.038909912109375, 0.00574493408203125, 0.03570556640625, 0.0155181884765625, 0.00704193115234375, 0.06689453125, 0.016998291015625, -0.058990478515625, 0.01537322998046875, -0.05938720703125, 0.0000718235969543457, -0.038909912109375, -0.00531005859375, -0.050933837890625, 0.013092041015625, -0.043670654296875, -0.01983642578125, 0.0204315185546875 ]
9f272cd77e23f69d59ccf79ae4c6af208f01a4a0
Wordpress Stackexchange Q: How to change author base without front I am currently using this code: function change_author_permalinks() { global $wp_rewrite; $wp_rewrite->author_base = 'connect/member'; } add_action('init','change_author_permalinks'); but my current front set on my blog is: share So the above generates a URL like so: http://example.com/share/connect/member/john-smith But I don't want /share/ as part of this author URL. I cannot remove the /share/ front as it is needed for other parts of the site. How do I set the author URL to not use front? A: This is the best solution I have come up with but I welcome better ways: function change_author_permalinks() { global $wp_rewrite; $wp_rewrite->author_base = 'connect/member'; $wp_rewrite->author_structure = "/" . $wp_rewrite->author_base . '/%author%'; add_rewrite_rule('connect/member/([^/]+)/?$', 'index.php?author_name=$matches[1]', 'top'); } add_action('init','change_author_permalinks');
Q: How to change author base without front I am currently using this code: function change_author_permalinks() { global $wp_rewrite; $wp_rewrite->author_base = 'connect/member'; } add_action('init','change_author_permalinks'); but my current front set on my blog is: share So the above generates a URL like so: http://example.com/share/connect/member/john-smith But I don't want /share/ as part of this author URL. I cannot remove the /share/ front as it is needed for other parts of the site. How do I set the author URL to not use front? A: This is the best solution I have come up with but I welcome better ways: function change_author_permalinks() { global $wp_rewrite; $wp_rewrite->author_base = 'connect/member'; $wp_rewrite->author_structure = "/" . $wp_rewrite->author_base . '/%author%'; add_rewrite_rule('connect/member/([^/]+)/?$', 'index.php?author_name=$matches[1]', 'top'); } add_action('init','change_author_permalinks');
wordpress
{ "language": "en", "length": 117, "provenance": "stackexchange_00019.jsonl.gz:413939", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31418" }
[ 0.033233642578125, 0.0112762451171875, 0.01270294189453125, -0.0246734619140625, 0.0101318359375, -0.00921630859375, -0.0007123947143554688, -0.043121337890625, 0.003170013427734375, 0.0142822265625, -0.0013742446899414062, 0.039276123046875, -0.015869140625, -0.026763916015625, 0.01580810546875, 0.00775146484375, 0.0276641845703125, -0.014984130859375, 0.0308990478515625, -0.0011320114135742188, 0.035675048828125, -0.004913330078125, 0.042755126953125, -0.0305023193359375, 0.043487548828125, -0.036834716796875, 0.09661865234375, -0.053985595703125, 0.03955078125, -0.04931640625, 0.0260467529296875, -0.0104827880859375, 0.0045013427734375, 0.03533935546875, -0.028228759765625, 0.053924560546875, -0.025604248046875, 0.0277862548828125, 0.019134521484375, 0.0177459716796875, 0.037078857421875, -0.0214080810546875, -0.06854248046875, 0.0275726318359375, -0.0223236083984375, -0.059173583984375, 0.046234130859375, -0.044891357421875, 0.03369140625, -0.02294921875, -0.02447509765625, 0.043853759765625, -0.01409149169921875, 0.0080413818359375, -0.02899169921875, -0.02545166015625, 0.036041259765625, -0.038909912109375, 0.03240966796875, 0.0018854141235351562, -0.0116729736328125, 0.008392333984375, 0.0231781005859375, 0.0004949569702148438, -0.0025482177734375, -0.0079345703125, -0.01116180419921875, 0.017852783203125, -0.00540924072265625, 0.0243072509765625, 0.01264190673828125, -0.0272216796875, -0.0240325927734375, -0.006683349609375, -0.06640625, -0.003025054931640625, -0.0173187255859375, -0.0677490234375, 0.0184783935546875, 0.0006690025329589844, -0.0081024169921875, -0.014923095703125, 0.0254364013671875, -0.0513916015625, 0.0161590576171875, -0.0182037353515625, -0.004016876220703125, 0.019012451171875, -0.041656494140625, 0.0159149169921875, -0.02301025390625, -0.00042819976806640625, -0.010986328125, -0.0085296630859375, 0.0114898681640625, -0.0115966796875, 0.030670166015625, 0.0256195068359375, 0.0177154541015625, -0.0099639892578125, 0.020843505859375, -0.052734375, 0.0282135009765625, -0.03863525390625, 0.019012451171875, 0.078857421875, 0.035614013671875, 0.0164794921875, 0.0306396484375, -0.018951416015625, 0.0179443359375, 0.041839599609375, -0.03802490234375, 0.011993408203125, -0.039093017578125, -0.0163726806640625, -0.08721923828125, 0.0264434814453125, -0.0110321044921875, 0.04913330078125, -0.0309295654296875, -0.01194000244140625, -0.0208892822265625, 0.0195465087890625, 0.039337158203125, 0.016937255859375, 0.00855255126953125, 0.0033740997314453125, 0.0012941360473632812, 0.030548095703125, -0.054962158203125, 0.01116180419921875, 0.09881591796875, 0.029937744140625, 0.031707763671875, -0.0450439453125, 0.01279449462890625, -0.00763702392578125, -0.00717926025390625, 0.020111083984375, -0.00940704345703125, -0.050933837890625, -0.012298583984375, -0.024169921875, 0.0160675048828125, 0.01215362548828125, 0.01375579833984375, 0.025848388671875, -0.0244598388671875, -0.0110015869140625, 0.03173828125, -0.024505615234375, 0.0190582275390625, 0.01357269287109375, 0.0035305023193359375, -0.01479339599609375, 0.046539306640625, -0.03399658203125, -0.0156707763671875, -0.03936767578125, 0.043853759765625, -0.0016164779663085938, -0.028717041015625, -0.0168609619140625, -0.03790283203125, -0.0307464599609375, -0.00499725341796875, 0.0006899833679199219, 0.0117645263671875, -0.01232147216796875, 0.0178985595703125, 0.0029430389404296875, 0.0156097412109375, 0.03167724609375, 0.01152801513671875, 0.0258026123046875, -0.004894256591796875, 0.033905029296875, -0.0182342529296875, 0.07562255859375, 0.0478515625, -0.029296875, 0.014068603515625, 0.00628662109375, -0.07623291015625, 0.0718994140625, 0.01561737060546875, 0.091552734375, 0.000865936279296875, -0.0021343231201171875, 0.0325927734375, 0.03094482421875, -0.032806396484375, 0.0164947509765625, -0.01519012451171875, -0.0237579345703125, 0.027008056640625, 0.00604248046875, -0.0175933837890625, 0.00997161865234375, 0.0017843246459960938, 0.03411865234375, -0.00428009033203125, 0.0176239013671875, -0.019134521484375, 0.0208740234375, -0.01422882080078125, 0.0294342041015625, 0.0175018310546875, 0.01751708984375, 0.023529052734375, 0.028411865234375, -0.0278167724609375, -0.0254364013671875, -0.0238494873046875, 0.049041748046875, 0.018402099609375, 0.0107879638671875, 0.010772705078125, 0.01320648193359375, 0.037750244140625, -0.00437164306640625, 0.01409912109375, 0.01291656494140625, 0.036773681640625, -0.050262451171875, -0.01403045654296875, -0.05828857421875, -0.024169921875, -0.031280517578125, -0.059844970703125, 0.0823974609375, 0.05010986328125, -0.01336669921875, -0.052490234375, 0.0203094482421875, 0.02276611328125, -0.01800537109375, -0.031890869140625, 0.046600341796875, 0.04522705078125, -0.01995849609375, -0.0242767333984375, -0.019744873046875, 0.00656890869140625, -0.00025963783264160156, 0.029876708984375, -0.030670166015625, -0.0011930465698242188, 0.011810302734375, 0.0000021457672119140625, -0.01145172119140625, 0.02215576171875, -0.0697021484375, 0.005680084228515625, 0.0269012451171875, -0.006816864013671875, -0.0211944580078125, -0.00154876708984375, 0.012298583984375, 0.025604248046875, -0.033355712890625, -0.052337646484375, -0.01480865478515625, -0.0010232925415039062, -0.00734710693359375, -0.005222320556640625, 0.0055694580078125, -0.03204345703125, -0.003818511962890625, 0.0272979736328125, 0.009063720703125, -0.0184173583984375, 0.05780029296875, 0.034820556640625, -0.0460205078125, -0.004741668701171875, -0.005069732666015625, -0.061981201171875, 0.0140228271484375, -0.0141754150390625, 0.025146484375, 0.014862060546875, -0.01274871826171875, -0.01515960693359375, 0.01352691650390625, 0.014129638671875, -0.0164031982421875, 0.00533294677734375, -0.014923095703125, 0.01412200927734375, 0.00569915771484375, -0.0240020751953125, 0.017608642578125, 0.00713348388671875, -0.026153564453125, -0.01302337646484375, -0.05072021484375, 0.056640625, -0.0215606689453125, 0.060791015625, 0.079345703125, -0.0020923614501953125, 0.0303802490234375, 0.00640869140625, -0.035552978515625, 0.00775909423828125, 0.0282440185546875, 0.00015282630920410156, -0.0094451904296875, -0.058197021484375, -0.0081329345703125, 0.0189361572265625, 0.0191802978515625, 0.0030536651611328125, -0.031951904296875, -0.00528717041015625, 0.024566650390625, -0.01287841796875, 0.00604248046875, 0.00402069091796875, -0.048553466796875, -0.01103973388671875, 0.0010700225830078125, -0.0297088623046875, -0.01593017578125, 0.020721435546875, 0.0013189315795898438, 0.0247802734375, -0.0279388427734375, -0.0516357421875, -0.03692626953125, -0.08306884765625, -0.0085601806640625, -0.0020084381103515625, 0.01251983642578125, 0.01385498046875, 0.0005640983581542969, -0.0094757080078125, -0.032470703125, 0.007366180419921875, 0.00666046142578125, 0.0097198486328125, -0.0279083251953125, -0.01168060302734375, -0.0193939208984375, -0.01654052734375, -0.00418853759765625, 0.07318115234375, 0.0305938720703125, -0.0288238525390625, 0.01430511474609375, 0.01123046875, -0.002162933349609375, 0.0273590087890625, 0.052276611328125, -0.01453399658203125, -0.007537841796875, 0.046478271484375, -0.044830322265625, -0.0362548828125, 0.0254364013671875, -0.018280029296875, -0.00966644287109375, 0.004199981689453125, -0.01593017578125, -0.0011510848999023438, 0.0122528076171875, 0.046600341796875, 0.027252197265625, 0.034820556640625, 0.005115509033203125, 0.00665283203125, 0.014892578125, 0.028167724609375, -0.053955078125, 0.0004279613494873047, -0.03411865234375, 0.002407073974609375, -0.005126953125, -0.017059326171875, -0.01079559326171875, -0.0008683204650878906, -0.006999969482421875, -0.0367431640625, 0.03155517578125, -0.09002685546875, -0.0235595703125, -0.04425048828125, 0.0092315673828125, -0.0298614501953125, 0.04669189453125, 0.0025234222412109375, -0.0139923095703125, 0.0159759521484375, 0.0018863677978515625, -0.048004150390625, -0.049468994140625, -0.03717041015625, -0.003459930419921875, -0.01371002197265625, -0.0263519287109375, -0.01318359375, -0.0312347412109375, 0.00272369384765625, 0.01219940185546875, 0.0222320556640625, -0.0120849609375, 0.014556884765625, 0.053070068359375, -0.0438232421875, 0.040863037109375, -0.06292724609375, 0.0465087890625, -0.01995849609375, 0.01000213623046875, -0.1029052734375, -0.0232696533203125, -0.00789642333984375, 0.0748291015625, -0.02288818359375, 0.050140380859375, -0.022216796875, 0.072509765625, 0.000057220458984375, -0.01323699951171875, 0.01061248779296875, 0.013336181640625, -0.036590576171875, 0.027862548828125, 0.01392364501953125, -0.0176849365234375, 0.006359100341796875, 0.0219879150390625, -0.028594970703125, 0.0174102783203125, -0.02783203125, -0.0217132568359375, 0.017364501953125, -0.050506591796875, -0.07183837890625, -0.0640869140625, -0.01187896728515625, 0.05816650390625, -0.0022735595703125, 0.027740478515625, -0.11175537109375, -0.08709716796875, 0.044097900390625, -0.041961669921875, -0.01519775390625, -0.0089263916015625, 0.07879638671875, 0.0284881591796875, -0.022369384765625, 0.06634521484375, 0.010772705078125, 0.01464080810546875, -0.020050048828125, 0.0009226799011230469, -0.01140594482421875, -0.0234222412109375, 0.039306640625, -0.037750244140625, 0.00339508056640625, 0.0007944107055664062, 0.0265350341796875, 0.0088043212890625, -0.002651214599609375, 0.005397796630859375, -0.02301025390625, 0.006931304931640625, 0.01120758056640625, -0.01264190673828125, 0.04327392578125, 0.022735595703125, -0.007564544677734375, -0.0120391845703125, -0.0167083740234375, -0.006198883056640625, -0.0213775634765625, 0.01218414306640625, -0.00878143310546875, 0.04718017578125, -0.011444091796875, 0.01800537109375, -0.005435943603515625, 0.00969696044921875, -0.01364898681640625, 0.005031585693359375, -0.050079345703125, 0.00701141357421875, 0.0126495361328125, -0.02337646484375, -0.024169921875, 0.0115509033203125, -0.00902557373046875, 0.09014892578125, 0.030670166015625, -0.0241851806640625, 0.0308990478515625, -0.033660888671875, -0.00414276123046875, -0.01373291015625, 0.012359619140625, 0.061187744140625, 0.00015985965728759766, -0.01180267333984375, -0.005130767822265625, -0.0149993896484375, 0.006740570068359375, -0.050872802734375, 0.07080078125, -0.00897216796875, 0.02740478515625, -0.0108184814453125, 0.09222412109375, 0.03399658203125, 0.031494140625, -0.0197601318359375, 0.025360107421875, 0.0191497802734375, 0.0053253173828125, 0.0225677490234375, 0.02630615234375, 0.01349639892578125, -0.02349853515625, 0.032073974609375, -0.041107177734375, -0.0013456344604492188, 0.0428466796875, 0.03594970703125, 0.03985595703125, -0.0019550323486328125, -0.0335693359375, -0.016326904296875, -0.015625, 0.03753662109375, 0.004665374755859375, -0.035858154296875, -0.017303466796875, 0.0130767822265625, 0.032135009765625, -0.042694091796875, 0.00838470458984375, -0.038421630859375, -0.0181121826171875, -0.04095458984375, -0.00980377197265625, -0.03753662109375, -0.019775390625, 0.00804901123046875, 0.01451873779296875, -0.0282440185546875, -0.0031566619873046875, -0.0379638671875, 0.01253509521484375, -0.042938232421875, 0.0005583763122558594, 0.069091796875, -0.0014133453369140625, 0.034393310546875, -0.0305633544921875, 0.003509521484375, 0.029449462890625, -0.0192718505859375, 0.05462646484375, 0.0064239501953125, -0.06390380859375, 0.03302001953125, -0.050018310546875, 0.0227508544921875, -0.0113983154296875, -0.0251922607421875, -0.031402587890625, -0.015228271484375, -0.016632080078125, 0.0011959075927734375, -0.0245513916015625, 0.004505157470703125, 0.028717041015625, 0.03662109375, -0.0118560791015625, 0.027618408203125, -0.0233306884765625, 0.0621337890625, 0.008453369140625, 0.0251922607421875, 0.004428863525390625, 0.03631591796875, -0.0116424560546875, -0.0196075439453125, -0.0204620361328125, -0.037322998046875, -0.001247406005859375, 0.037841796875, -0.0221710205078125, 0.0102996826171875, 0.034759521484375, 0.001674652099609375, -0.007274627685546875, -0.000946044921875, 0.010101318359375, -0.040069580078125, -0.00656890869140625, -0.0221710205078125, 0.0445556640625, -0.06243896484375, 0.0234222412109375, 0.047515869140625, -0.039825439453125, -0.0163726806640625, -0.039306640625, 0.01355743408203125, -0.0300445556640625, 0.0178070068359375, -0.0421142578125, 0.007038116455078125, 0.0838623046875, 0.0362548828125, 0.055328369140625, 0.036346435546875, 0.025360107421875, 0.0262298583984375, 0.003879547119140625, 0.0014257431030273438, 0.0055999755859375, 0.026641845703125, 0.022125244140625, 0.04168701171875, 0.058746337890625, 0.0010223388671875, 0.0259552001953125, 0.025604248046875, 0.0963134765625, -0.0638427734375, 0.02569580078125, 0.037384033203125, 0.0213775634765625, 0.056793212890625, 0.02435302734375, 0.00832366943359375, 0.00778961181640625, 0.03369140625, -0.04034423828125, 0.0024089813232421875, 0.02581787109375, -0.01404571533203125, -0.0143585205078125, -0.041351318359375, -0.0082550048828125, -0.003688812255859375, 0.0082550048828125, -0.007312774658203125, 0.004039764404296875, -0.0215911865234375, -0.00787353515625, 0.0159912109375, -0.00395965576171875, -0.005126953125, -0.0208282470703125, 0.03887939453125, -0.0173797607421875, 0.003498077392578125, 0.003322601318359375, -0.0021686553955078125, -0.00971221923828125, 0.0088043212890625, -0.0242156982421875, 0.011627197265625, -0.017120361328125, -0.0172576904296875, 0.0205841064453125, -0.028594970703125, -0.012054443359375, 0.035736083984375, -0.004405975341796875, 0.0181427001953125, 0.0160980224609375, -0.0256805419921875, -0.006214141845703125, -0.0164794921875, 0.0638427734375, -0.05743408203125, -0.01105499267578125, 0.004611968994140625, -0.0227508544921875, 0.016632080078125, 0.03167724609375, -0.00811004638671875, -0.033935546875, -0.0567626953125, 0.00933074951171875, -0.0933837890625, 0.0249176025390625, 0.0175628662109375, -0.04302978515625, 0.102294921875, -0.01071929931640625, 0.0128173828125, 0.0215606689453125, 0.04583740234375, -0.016510009765625, 0.01053619384765625, -0.0231781005859375, 0.042205810546875, 0.041900634765625, 0.0321044921875, -0.0175628662109375, -0.02471923828125, 0.01427459716796875, 0.053131103515625, 0.0972900390625, 0.017730712890625, -0.0164794921875, 0.008636474609375, 0.0241851806640625, 0.00595855712890625, -0.04345703125, 0.0311126708984375, -0.011444091796875, 0.005886077880859375, 0.00580596923828125, -0.0197906494140625, 0.018463134765625, -0.01226043701171875, -0.0452880859375, 0.00717926025390625, 0.0260467529296875, 0.046112060546875, -0.01428985595703125, 0.03582763671875, -0.0399169921875, -0.0244903564453125, 0.05364990234375, -0.01377105712890625, -0.006160736083984375, 0.024017333984375, 0.00860595703125, -0.0156707763671875, 0.01033782958984375, -0.032440185546875, 0.048980712890625, 0.00612640380859375, 0.0078582763671875, 0.042022705078125, 0.0198516845703125, 0.056427001953125, -0.0169677734375, 0.0047454833984375, 0.025909423828125, -0.0225830078125, 0.05535888671875, 0.042327880859375, 0.031890869140625, 0.005458831787109375, 0.01522064208984375, 0.00855255126953125, 0.057525634765625, -0.042266845703125, -0.01123046875, 0.00762939453125, 0.0089263916015625, 0.004703521728515625, -0.050384521484375, -0.0160064697265625, -0.0126190185546875, -0.01023101806640625, -0.046112060546875, 0.0122528076171875, 0.01715087890625, 0.0246124267578125, -0.0184478759765625, -0.01529693603515625, -0.032501220703125, 0.01934814453125, -0.040863037109375, 0.0005502700805664062, -0.0209197998046875, 0.0298004150390625, 0.03271484375, 0.01071929931640625, 0.0382080078125, -0.005306243896484375, -0.01309967041015625, 0.0236358642578125, -0.01433563232421875, 0.008575439453125, -0.03277587890625, -0.0413818359375, 0.007778167724609375, 0.045013427734375, 0.038604736328125, 0.014923095703125, 0.0283355712890625, -0.0054931640625, -0.0159759521484375, 0.031219482421875, 0.05816650390625, -0.00868988037109375, 0.0291748046875, -0.035675048828125, 0.0046539306640625, -0.0179901123046875, -0.00091552734375, -0.0075531005859375, 0.00925445556640625, 0.01175689697265625, -0.02734375, 0.024078369140625, 0.00666046142578125, -0.0269317626953125, 0.032073974609375, 0.0274200439453125, 0.0538330078125, 0.01214599609375, -0.007598876953125, 0.01464080810546875, -0.0279541015625, -0.04327392578125, 0.005252838134765625, 0.0243377685546875, -0.024444580078125, 0.03314208984375, -0.0180206298828125, 0.048004150390625, -0.00927734375, -0.034759521484375, -0.014373779296875, 0.0243988037109375, 0.048919677734375, 0.01416015625, -0.0501708984375, -0.021575927734375, -0.0181121826171875, 0.0161590576171875, 0.018280029296875, 0.09320068359375, -0.026336669921875, 0.00433349609375, -0.0015382766723632812, 0.005084991455078125, -0.0140380859375, -0.033447265625, 0.0306854248046875, -0.060546875, -0.01047515869140625, 0.0177154541015625, -0.0164337158203125, 0.01401519775390625, 0.041900634765625, -0.04156494140625, 0.0239410400390625, -0.0183868408203125, 0.018096923828125, -0.037994384765625, -0.02178955078125, -0.04022216796875, -0.059356689453125, -0.03558349609375, 0.00533294677734375, -0.00009369850158691406, -0.039337158203125, -0.047882080078125, 0.02587890625, 0.02801513671875, -0.02227783203125, 0.00861358642578125, -0.00373077392578125, 0.01885986328125, 0.0219268798828125, 0.01690673828125, -0.04754638671875, 0.049774169921875, -0.001056671142578125, 0.0259857177734375, 0.00516510009765625, 0.05810546875, 0.02740478515625, -0.04815673828125, -0.00463104248046875, -0.02789306640625, 0.019744873046875, -0.0004432201385498047, -0.0047607421875, -0.004413604736328125, -0.00841522216796875, -0.058013916015625, 0.0245513916015625, -0.00984954833984375, -0.0221099853515625, 0.00363922119140625, -0.00595855712890625, -0.00464630126953125, -0.044158935546875, 0.021484375, 0.033538818359375, 0.03216552734375, -0.01366424560546875, -0.0655517578125, 0.057891845703125, -0.06585693359375, 0.0538330078125, -0.027801513671875, -0.0187530517578125, 0.01092529296875, 0.00838470458984375, -0.05816650390625, -0.01560211181640625, -0.0667724609375, -0.0190582275390625, -0.05322265625, 0.01134490966796875, 0.0675048828125, -0.010040283203125, -0.0185699462890625, -0.042694091796875, -0.0167999267578125, 0.0391845703125, -0.10430908203125, -0.030426025390625, -0.003803253173828125, 0.011688232421875, -0.016632080078125, -0.056610107421875, -0.0008516311645507812, -0.06585693359375, -0.006988525390625, -0.0309906005859375, -0.01256561279296875, -0.0213165283203125, -0.033447265625, -0.004886627197265625, 0.00885009765625, 0.007564544677734375, -0.018341064453125, -0.052581787109375, -0.0034942626953125, -0.010162353515625, 0.0689697265625, 0.00623321533203125, -0.016845703125, -0.0278472900390625, 0.014434814453125, -0.013427734375, 0.0599365234375, -0.0019445419311523438, -0.00489044189453125, 0.003009796142578125, 0.01242828369140625, 0.0161285400390625, -0.0124664306640625, 0.03924560546875, 0.0017995834350585938, 0.037445068359375, 0.07391357421875, -0.018707275390625, 0.07275390625, -0.037353515625, -0.021453857421875, -0.01788330078125, -0.052642822265625, -0.003093719482421875, -0.01018524169921875, 0.05609130859375, -0.0133514404296875, 0.00313568115234375, -0.0289306640625, -0.02691650390625, 0.00777435302734375, 0.0384521484375, 0.03009033203125, -0.00319671630859375, -0.035736083984375, -0.0034275054931640625, 0.0252685546875, -0.0335693359375, -0.019866943359375, 0.006267547607421875, -0.059295654296875, 0.016143798828125, -0.00977325439453125, -0.0126800537109375, 0.00693511962890625, 0.0266571044921875, 0.01788330078125, -0.03277587890625, 0.004932403564453125, 0.0015668869018554688, -0.0031375885009765625, 0.000026226043701171875, 0.0124969482421875, 0.00579833984375, 0.0216064453125, -0.0195770263671875, 0.007678985595703125, 0.019378662109375, 0.0260162353515625, -0.0303192138671875, -0.0094757080078125, -0.031524658203125, 0.0137176513671875, -0.0011167526245117188, -0.01153564453125, 0.00836181640625, 0.0279998779296875, 0.00799560546875, 0.07275390625, -0.0259552001953125, -0.0015325546264648438, -0.0212249755859375, 0.029052734375, -0.050201416015625, 0.01434326171875, 0.0101776123046875, -0.0261993408203125, -0.01081085205078125, 0.018951416015625, -0.0005116462707519531, -0.039947509765625, 0.006282806396484375, -0.0210723876953125, 0.02252197265625, 0.01535797119140625 ]
5d3860a42dbeb329e7dfb30ad0faf2b2435f15a4
Wordpress Stackexchange Q: How to create a clone role in wordpress How to create new role with same capabilities of existing role. Eg: I would like to create a new role with same capabilities of administrator or editor and so on.. A: Try this... This should work. <?php add_action('init', 'cloneRole'); function cloneRole() { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); $adm = $wp_roles->get_role('administrator'); //Adding a 'new_role' with all admin caps $wp_roles->add_role('new_role', 'My Custom Role', $adm->capabilities); } ?> Check it.
Q: How to create a clone role in wordpress How to create new role with same capabilities of existing role. Eg: I would like to create a new role with same capabilities of administrator or editor and so on.. A: Try this... This should work. <?php add_action('init', 'cloneRole'); function cloneRole() { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); $adm = $wp_roles->get_role('administrator'); //Adding a 'new_role' with all admin caps $wp_roles->add_role('new_role', 'My Custom Role', $adm->capabilities); } ?> Check it. A: You could always use the User Role Editor plugin; * *Install the plugin *Go to Users > User Role Editor *Click "Add Role" to the right *Choose the role you wish to duplicate from the "Make copy of" dropdown in the dialogue box *Click "Add Role" in the dialogue box A: suppose you want to clone the editor. $edr = $wp_roles->get_role('Editor'); add_role('clonerole', 'clone roles', $edr->capabilities); A: the system that worked in my case is this: <?php add_action('init', 'cloneRole'); function cloneRole() { $adm = get_role('administrator'); $adm_cap= array_keys( $adm->capabilities ); //get administator capabilities add_role('new_role', 'My Custom Role'); //create new role $new_role = get_role('new_role'); foreach ( $adm_cap as $cap ) { $new_role->add_cap( $cap ); //clone administrator capabilities to new role } } ?>
wordpress
{ "language": "en", "length": 204, "provenance": "stackexchange_00019.jsonl.gz:413955", "question_score": "28", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31471" }
[ 0.055023193359375, -0.0269927978515625, 0.02056884765625, -0.04339599609375, 0.0022640228271484375, -0.031463623046875, 0.0242462158203125, -0.005786895751953125, -0.0273590087890625, 0.047332763671875, 0.04083251953125, 0.004909515380859375, 0.0285797119140625, -0.04217529296875, -0.00070953369140625, 0.0025577545166015625, 0.0225372314453125, 0.0004987716674804688, 0.0236358642578125, -0.01776123046875, 0.0182037353515625, -0.01495361328125, 0.013336181640625, 0.06573486328125, 0.0247039794921875, -0.04541015625, 0.0153656005859375, -0.0157928466796875, 0.01291656494140625, -0.01158905029296875, 0.01259613037109375, 0.0043792724609375, 0.0156707763671875, -0.0208282470703125, 0.01537322998046875, -0.03668212890625, -0.01082611083984375, -0.00507354736328125, -0.0011119842529296875, -0.003749847412109375, 0.013336181640625, 0.008026123046875, 0.05126953125, 0.014129638671875, 0.0147705078125, -0.04107666015625, 0.0038127899169921875, -0.062225341796875, -0.001194000244140625, -0.0124969482421875, 0.01439666748046875, -0.02056884765625, 0.0293731689453125, -0.004001617431640625, -0.006931304931640625, -0.0190277099609375, -0.00327301025390625, 0.02294921875, 0.030029296875, 0.00421142578125, -0.0293121337890625, 0.00881195068359375, 0.00701904296875, -0.032806396484375, -0.0180511474609375, 0.01873779296875, 0.037994384765625, -0.00006324052810668945, -0.0535888671875, -0.037567138671875, -0.0061187744140625, -0.0230560302734375, 0.0008664131164550781, -0.0131683349609375, 0.004558563232421875, -0.00016498565673828125, -0.0208892822265625, -0.022552490234375, 0.0233154296875, 0.010101318359375, 0.01531982421875, 0.0023956298828125, 0.0396728515625, -0.020660400390625, -0.006023406982421875, -0.019378662109375, -0.01146697998046875, -0.004741668701171875, -0.00394439697265625, 0.00836944580078125, -0.022735595703125, -0.054412841796875, 0.018280029296875, 0.0204315185546875, -0.0122528076171875, -0.026275634765625, 0.04510498046875, 0.048248291015625, 0.014892578125, 0.0129547119140625, -0.005222320556640625, -0.045135498046875, 0.0193328857421875, -0.035430908203125, 0.024139404296875, 0.063232421875, 0.01450347900390625, -0.042449951171875, 0.00782012939453125, -0.0080108642578125, -0.009796142578125, 0.043731689453125, 0.00653839111328125, -0.0255889892578125, 0.0018453598022460938, 0.01323699951171875, -0.02008056640625, 0.0333251953125, -0.005046844482421875, 0.0159912109375, -0.020904541015625, -0.0046844482421875, 0.037872314453125, -0.007656097412109375, 0.00899505615234375, 0.01171875, -0.01280975341796875, -0.044158935546875, 0.0469970703125, -0.01727294921875, -0.051849365234375, 0.015899658203125, 0.0870361328125, 0.031005859375, 0.0357666015625, -0.005573272705078125, 0.00632476806640625, -0.0084991455078125, -0.00437164306640625, 0.003536224365234375, 0.034393310546875, -0.003612518310546875, 0.015869140625, 0.01416778564453125, 0.0245513916015625, 0.02178955078125, -0.0152587890625, 0.0162811279296875, 0.048370361328125, 0.00818634033203125, -0.00547027587890625, -0.051849365234375, -0.0136260986328125, -0.005550384521484375, 0.043182373046875, -0.01497650146484375, -0.010955810546875, 0.0027008056640625, 0.04193115234375, 0.01031494140625, 0.039825439453125, 0.028472900390625, 0.00939178466796875, 0.0022869110107421875, -0.0177154541015625, -0.039093017578125, -0.040252685546875, -0.004322052001953125, 0.0228118896484375, -0.0242767333984375, 0.036407470703125, -0.048248291015625, 0.0105438232421875, -0.01297760009765625, -0.0120697021484375, 0.02996826171875, 0.006591796875, -0.042877197265625, 0.035064697265625, -0.0266571044921875, -0.0391845703125, -0.025177001953125, -0.005664825439453125, -0.0014667510986328125, -0.0236968994140625, -0.035858154296875, -0.003116607666015625, -0.0020351409912109375, 0.038787841796875, 0.022125244140625, -0.0135345458984375, -0.0213775634765625, -0.016387939453125, -0.007236480712890625, -0.0135345458984375, -0.031280517578125, 0.03472900390625, 0.0110626220703125, -0.00954437255859375, 0.038299560546875, 0.03253173828125, 0.01629638671875, -0.002414703369140625, -0.018524169921875, -0.051727294921875, 0.0148162841796875, -0.0218048095703125, 0.025360107421875, 0.00421142578125, -0.017669677734375, 0.00463104248046875, -0.00762176513671875, 0.01540374755859375, -0.0762939453125, -0.04620361328125, 0.00574493408203125, 0.00817108154296875, 0.00838470458984375, 0.0016489028930664062, -0.0033283233642578125, -0.00217437744140625, -0.01403045654296875, -0.0157928466796875, 0.0164031982421875, 0.015899658203125, -0.019927978515625, 0.0142669677734375, -0.00978851318359375, 0.03411865234375, 0.003780364990234375, 0.00994110107421875, 0.005916595458984375, 0.059722900390625, 0.04156494140625, -0.0042572021484375, -0.0071563720703125, 0.0023136138916015625, -0.093994140625, 0.0021839141845703125, 0.0616455078125, 0.045867919921875, 0.03973388671875, 0.022369384765625, 0.01125335693359375, 0.03936767578125, -0.038421630859375, 0.0361328125, -0.0236663818359375, -0.03704833984375, 0.033966064453125, 0.012054443359375, 0.0210113525390625, 0.0122833251953125, 0.0019407272338867188, -0.046051025390625, 0.040435791015625, -0.033050537109375, 0.018096923828125, -0.0154571533203125, -0.01348876953125, -0.00518798828125, -0.04998779296875, -0.00885772705078125, -0.03656005859375, -0.001247406005859375, 0.02191162109375, 0.0103759765625, 0.00469207763671875, -0.046539306640625, 0.015411376953125, 0.02984619140625, 0.0263824462890625, 0.0097198486328125, 0.02264404296875, -0.001010894775390625, -0.002288818359375, -0.039581298828125, 0.0002675056457519531, 0.0114898681640625, 0.01187896728515625, -0.006633758544921875, 0.06549072265625, -0.0195770263671875, -0.031097412109375, -0.030487060546875, -0.0235443115234375, -0.024322509765625, -0.01043701171875, 0.030181884765625, -0.018218994140625, 0.015960693359375, -0.0219879150390625, -0.048858642578125, 0.042755126953125, 0.0164947509765625, -0.05438232421875, -0.00580596923828125, -0.0672607421875, 0.034423828125, -0.0261077880859375, 0.043487548828125, 0.07110595703125, 0.0242919921875, -0.0150299072265625, -0.01215362548828125, -0.0189056396484375, -0.00716400146484375, 0.033203125, 0.003849029541015625, -0.0408935546875, -0.00007367134094238281, 0.032623291015625, 0.037994384765625, 0.01436614990234375, 0.045867919921875, -0.0093231201171875, 0.0058441162109375, 0.036376953125, -0.0001239776611328125, 0.007843017578125, 0.0281982421875, -0.05377197265625, 0.0213165283203125, 0.0085296630859375, -0.0285491943359375, -0.032501220703125, 0.038726806640625, 0.00748443603515625, 0.04144287109375, -0.015899658203125, -0.01666259765625, 0.00823974609375, -0.041046142578125, -0.052459716796875, -0.0080108642578125, -0.02252197265625, 0.005641937255859375, 0.033843994140625, 0.01432037353515625, -0.0273895263671875, 0.0188140869140625, 0.031341552734375, -0.01788330078125, -0.00212860107421875, 0.03778076171875, -0.033477783203125, 0.015350341796875, 0.005245208740234375, 0.022552490234375, 0.02349853515625, -0.0103759765625, -0.0203704833984375, 0.00624847412109375, -0.00440216064453125, 0.0262451171875, 0.01041412353515625, -0.037384033203125, -0.0017900466918945312, 0.03533935546875, -0.02703857421875, -0.038818359375, 0.004268646240234375, -0.035430908203125, 0.0231475830078125, -0.0087890625, -0.006072998046875, 0.0221099853515625, 0.0101318359375, 0.00916290283203125, 0.020751953125, -0.00856781005859375, -0.00487518310546875, -0.01519012451171875, 0.0206298828125, 0.00415802001953125, 0.0221405029296875, -0.022308349609375, -0.03912353515625, 0.0261688232421875, -0.01898193359375, -0.0014982223510742188, -0.013214111328125, 0.010162353515625, 0.0031833648681640625, -0.1265869140625, 0.064208984375, -0.071533203125, -0.02264404296875, -0.06048583984375, -0.0218658447265625, 0.0220947265625, 0.15478515625, -0.03570556640625, 0.0011835098266601562, 0.01430511474609375, -0.006374359130859375, -0.02459716796875, 0.004184722900390625, -0.07037353515625, -0.0025119781494140625, -0.04071044921875, 0.0045623779296875, 0.0003082752227783203, -0.0123748779296875, -0.05401611328125, 0.0225982666015625, -0.058502197265625, -0.0112457275390625, 0.050018310546875, -0.0767822265625, 0.007480621337890625, 0.0181121826171875, 0.009796142578125, -0.03277587890625, -0.0341796875, -0.03082275390625, -0.0921630859375, -0.00455474853515625, -0.0665283203125, 0.079833984375, 0.0165252685546875, 0.041046142578125, -0.03173828125, 0.042266845703125, -0.0191802978515625, 0.0231475830078125, 0.0035228729248046875, 0.0361328125, 0.0097808837890625, 0.00426483154296875, 0.01328277587890625, -0.028106689453125, -0.038360595703125, -0.0516357421875, 0.00995635986328125, -0.0233612060546875, -0.06439208984375, -0.03955078125, -0.045074462890625, 0.0026702880859375, -0.038360595703125, -0.0168609619140625, -0.022552490234375, -0.0306243896484375, -0.014373779296875, -0.01123046875, 0.0147705078125, -0.028167724609375, 0.033233642578125, -0.023468017578125, -0.0255889892578125, 0.00067901611328125, 0.072021484375, 0.0247344970703125, -0.00611114501953125, 0.01033782958984375, -0.047637939453125, 0.0138702392578125, -0.01435089111328125, 0.030975341796875, 0.0601806640625, 0.01020050048828125, -0.0267181396484375, -0.01507568359375, -0.0011625289916992188, -0.0081939697265625, 0.0078125, 0.03021240234375, 0.004238128662109375, -0.0146636962890625, 0.01535797119140625, 0.00844573974609375, -0.016632080078125, -0.0064697265625, -0.004627227783203125, 0.0010967254638671875, 0.032867431640625, -0.001903533935546875, 0.00502777099609375, -0.01496124267578125, -0.0455322265625, 0.0177154541015625, -0.0362548828125, 0.00513458251953125, 0.023406982421875, -0.004314422607421875, -0.00307464599609375, -0.0235443115234375, 0.01525115966796875, -0.017730712890625, 0.03271484375, -0.037353515625, 0.060821533203125, -0.03277587890625, -0.01556396484375, -0.0237579345703125, -0.01264190673828125, 0.04534912109375, 0.0263671875, -0.065185546875, 0.04248046875, -0.019561767578125, 0.022216796875, 0.0006008148193359375, -0.046783447265625, 0.005401611328125, 0.01739501953125, -0.01230621337890625, 0.01071929931640625, -0.021240234375, -0.0091552734375, -0.0182342529296875, 0.006183624267578125, 0.0181427001953125, -0.018646240234375, 0.052764892578125, 0.00861358642578125, 0.02752685546875, 0.021331787109375, -0.0335693359375, 0.07745361328125, 0.0645751953125, -0.002780914306640625, -0.00547027587890625, 0.01313018798828125, 0.0096588134765625, -0.033905029296875, -0.0017347335815429688, -0.051300048828125, -0.005802154541015625, 0.056365966796875, 0.054351806640625, -0.00476837158203125, -0.04034423828125, -0.0008854866027832031, -0.01568603515625, -0.01052093505859375, 0.031097412109375, 0.007656097412109375, -0.043853759765625, -0.01087188720703125, 0.017974853515625, 0.029083251953125, -0.022216796875, -0.015899658203125, 0.03643798828125, -0.043670654296875, 0.0243072509765625, -0.0225830078125, 0.001293182373046875, -0.018463134765625, -0.00812530517578125, -0.0447998046875, -0.015655517578125, -0.0111846923828125, 0.0033779144287109375, -0.02532958984375, -0.0040740966796875, -0.0202178955078125, 0.0258026123046875, -0.002971649169921875, 0.005222320556640625, -0.037109375, 0.02435302734375, -0.07257080078125, -0.00262451171875, 0.033935546875, 0.0033779144287109375, -0.01174163818359375, -0.019683837890625, -0.02996826171875, -0.0355224609375, -0.0364990234375, -0.0302276611328125, -0.0222320556640625, 0.01151275634765625, -0.01505279541015625, -0.009765625, 0.0152435302734375, -0.004825592041015625, -0.037933349609375, 0.036163330078125, 0.044036865234375, -0.0169830322265625, -0.0086212158203125, 0.033294677734375, 0.00930023193359375, 0.00667572021484375, 0.00806427001953125, 0.0031280517578125, -0.0276947021484375, -0.00002753734588623047, -0.01285552978515625, -0.0042572021484375, -0.0030078887939453125, -0.0194854736328125, 0.0004134178161621094, 0.018096923828125, 0.06292724609375, -0.0096588134765625, 0.0595703125, -0.01030731201171875, 0.0158843994140625, -0.020477294921875, -0.05615234375, -0.0628662109375, 0.0299224853515625, 0.0073699951171875, -0.06573486328125, 0.018280029296875, -0.0009093284606933594, 0.032501220703125, 0.01806640625, -0.06610107421875, 0.023162841796875, 0.0577392578125, -0.017547607421875, 0.0280303955078125, 0.04852294921875, -0.0135345458984375, 0.033966064453125, 0.0215301513671875, 0.0172119140625, 0.0247344970703125, 0.0086517333984375, 0.01154327392578125, 0.0106201171875, 0.044769287109375, -0.0023345947265625, -0.0290069580078125, 0.00806427001953125, -0.036712646484375, 0.0174560546875, 0.03973388671875, 0.0452880859375, -0.0701904296875, 0.0159149169921875, -0.0172271728515625, -0.0017175674438476562, 0.050994873046875, -0.0087432861328125, -0.042083740234375, -0.10308837890625, 0.05975341796875, -0.02276611328125, -0.021209716796875, -0.0014486312866210938, -0.013824462890625, -0.031402587890625, -0.017181396484375, -0.006107330322265625, 0.036956787109375, 0.020263671875, 0.057769775390625, -0.0301971435546875, 0.058502197265625, 0.0111541748046875, 0.013916015625, -0.0231170654296875, -0.006862640380859375, -0.03253173828125, -0.003459930419921875, -0.036956787109375, -0.0197601318359375, 0.0084228515625, 0.0300445556640625, 0.0489501953125, 0.04278564453125, 0.01091766357421875, -0.01239776611328125, 0.0311431884765625, -0.01038360595703125, -0.05059814453125, -0.05596923828125, 0.027740478515625, 0.0103302001953125, -0.02484130859375, 0.033447265625, -0.0042572021484375, -0.071533203125, -0.0202484130859375, -0.0150604248046875, 0.06658935546875, -0.009002685546875, -0.02667236328125, 0.03228759765625, 0.0167236328125, -0.012298583984375, 0.006298065185546875, -0.00858306884765625, -0.0721435546875, -0.032623291015625, -0.0025997161865234375, -0.021331787109375, 0.055755615234375, 0.036376953125, -0.0633544921875, 0.11407470703125, 0.0186767578125, 0.01654052734375, 0.0255889892578125, 0.031707763671875, -0.05828857421875, 0.004650115966796875, -0.030914306640625, 0.0374755859375, -0.00847625732421875, 0.011749267578125, -0.04119873046875, 0.00847625732421875, -0.01409912109375, 0.0254974365234375, 0.06536865234375, 0.026275634765625, -0.01190185546875, -0.000827789306640625, 0.041015625, -0.007579803466796875, -0.04071044921875, 0.058258056640625, -0.01520538330078125, 0.001842498779296875, 0.0069427490234375, -0.046966552734375, 0.02276611328125, -0.0333251953125, -0.0182647705078125, 0.0128631591796875, -0.0018291473388671875, -0.01678466796875, -0.005527496337890625, 0.00814056396484375, -0.08349609375, 0.0135040283203125, 0.0335693359375, 0.002838134765625, 0.0179290771484375, -0.00926971435546875, 0.01389312744140625, 0.0103607177734375, 0.041259765625, -0.018524169921875, 0.052978515625, 0.0216064453125, 0.0035076141357421875, 0.008758544921875, 0.01389312744140625, 0.00270843505859375, -0.003406524658203125, 0.0007977485656738281, 0.037322998046875, -0.034423828125, 0.0004482269287109375, 0.042236328125, 0.0243682861328125, 0.0016326904296875, 0.058441162109375, 0.036651611328125, 0.01245880126953125, -0.038543701171875, -0.04559326171875, -0.005947113037109375, 0.01068878173828125, 0.026763916015625, 0.0028591156005859375, 0.0278778076171875, -0.01389312744140625, 0.030914306640625, -0.04412841796875, 0.005523681640625, 0.0294647216796875, -0.0148162841796875, -0.007740020751953125, 0.0027904510498046875, 0.00884246826171875, 0.0321044921875, -0.024169921875, -0.0147857666015625, -0.0007891654968261719, 0.027496337890625, 0.03997802734375, -0.009765625, 0.0298919677734375, -0.00594329833984375, -0.006008148193359375, 0.039154052734375, 0.0033740997314453125, -0.0105743408203125, -0.03875732421875, -0.05926513671875, 0.0135040283203125, 0.03790283203125, -0.037750244140625, 0.01003265380859375, -0.0156097412109375, 0.0249176025390625, 0.01904296875, -0.0171051025390625, 0.03399658203125, -0.0159912109375, 0.01480865478515625, -0.0294647216796875, 0.0029582977294921875, -0.0021839141845703125, 0.0009126663208007812, -0.0261688232421875, 0.0162353515625, 0.032470703125, 0.0082244873046875, 0.0273284912109375, -0.004215240478515625, -0.01311492919921875, -0.022552490234375, -0.044219970703125, 0.03118896484375, 0.014190673828125, -0.07159423828125, 0.0190277099609375, -0.062408447265625, -0.09869384765625, 0.036407470703125, 0.05169677734375, -0.04058837890625, 0.009521484375, 0.0139007568359375, -0.00591278076171875, -0.000762939453125, 0.0019311904907226562, 0.01480865478515625, -0.005771636962890625, 0.0177459716796875, 0.0042266845703125, -0.0216217041015625, -0.01019287109375, -0.02630615234375, 0.03204345703125, 0.055755615234375, 0.0258026123046875, -0.00366973876953125, 0.042938232421875, -0.031524658203125, 0.057342529296875, -0.06414794921875, -0.0452880859375, 0.056304931640625, 0.014404296875, -0.0020427703857421875, -0.00714111328125, 0.007541656494140625, 0.022552490234375, 0.00347900390625, -0.0183563232421875, -0.00969696044921875, -0.015960693359375, 0.022430419921875, 0.025604248046875, 0.031524658203125, -0.0229339599609375, -0.0178985595703125, -0.046295166015625, -0.0265350341796875, 0.023895263671875, -0.009857177734375, -0.0279388427734375, 0.03955078125, -0.004230499267578125, -0.0186309814453125, -0.0175018310546875, -0.01296234130859375, -0.057464599609375, 0.011016845703125, 0.035614013671875, -0.0531005859375, 0.0170745849609375, 0.006805419921875, -0.013519287109375, 0.0218658447265625, 0.0199432373046875, 0.028778076171875, -0.0618896484375, 0.0196380615234375, 0.015350341796875, 0.04437255859375, -0.01079559326171875, 0.01448822021484375, 0.018829345703125, -0.003726959228515625, 0.006267547607421875, -0.039337158203125, -0.044952392578125, -0.052001953125, 0.0009641647338867188, 0.032684326171875, -0.0229949951171875, -0.0672607421875, -0.06292724609375, -0.007080078125, 0.066650390625, 0.0574951171875, -0.11376953125, 0.06072998046875, 0.003948211669921875, 0.02227783203125, 0.043182373046875, -0.008880615234375, 0.02691650390625, 0.050201416015625, -0.0273284912109375, 0.00415802001953125, -0.0139617919921875, -0.026519775390625, -0.01267242431640625, 0.033660888671875, 0.039398193359375, -0.023651123046875, -0.0260772705078125, 0.0273895263671875, 0.01898193359375, 0.06622314453125, -0.0242156982421875, 0.0007348060607910156, 0.0015125274658203125, 0.00652313232421875, -0.053802490234375, -0.043121337890625, 0.039398193359375, -0.045654296875, -0.043853759765625, -0.038177490234375, 0.0210113525390625, 0.0214996337890625, -0.0174713134765625, -0.0147552490234375, -0.00872039794921875, 0.004161834716796875, -0.0156097412109375, -0.038543701171875, 0.01476287841796875, 0.005290985107421875, -0.00431060791015625, -0.0218658447265625, 0.017242431640625, -0.0096588134765625, 0.030670166015625, -0.006183624267578125, -0.00376129150390625, -0.0030670166015625, 0.003017425537109375, 0.0145721435546875, 0.051727294921875, 0.06884765625, -0.048187255859375, -0.0121612548828125, 0.018768310546875, -0.009765625, 0.0595703125, 0.0225830078125, -0.1087646484375, -0.0034656524658203125, -0.07904052734375, -0.01137542724609375, -0.033538818359375, 0.0135955810546875, 0.002712249755859375, 0.036529541015625, 0.040771484375, -0.001529693603515625, -0.04827880859375, -0.01255035400390625, -0.0292510986328125, -0.052581787109375, -0.01461029052734375, 0.026153564453125, -0.0635986328125, -0.003162384033203125, 0.01169586181640625, -0.00244903564453125, -0.01171112060546875, -0.0018310546875, -0.019073486328125, -0.0200347900390625, -0.01357269287109375, 0.0017271041870117188, -0.036041259765625, 0.046875, 0.068359375, -0.06427001953125, -0.00913238525390625, -0.019012451171875, -0.003997802734375, 0.02288818359375, -0.060638427734375, -0.0233001708984375, -0.00010758638381958008, -0.03582763671875, 0.031768798828125, -0.0179901123046875, 0.03521728515625, -0.052978515625, 0.002521514892578125, 0.0213775634765625, 0.0443115234375, -0.0079345703125, 0.0377197265625, -0.0234832763671875, 0.10418701171875, -0.003215789794921875, 0.036163330078125, 0.00734710693359375, 0.010498046875, -0.0159912109375, 0.060943603515625, 0.006755828857421875, -0.033172607421875, 0.039154052734375, -0.03826904296875, 0.015106201171875, 0.037078857421875, 0.01264190673828125, -0.0216522216796875, 0.01274871826171875, 0.032623291015625, 0.0073394775390625, 0.01690673828125 ]
8a0739a6494f6f15855b98b24acda63d0bc20fd8
Wordpress Stackexchange Q: The correct way of adding TinyMCE editor to custom meta box textarea? Since Wp 3.2 a lot of changed to TinyMCE and Wordpress and ow I can not find out how to add the Tiny MCE to meta box in Page. This is how it looks when I am not firing up the MCE http://screencast.com/t/ECQeyvJYC And this is when I fire up the Tiny MCE if ( typeof( tinyMCE ) == "object" && typeof( tinyMCE.execCommand ) == "function" ) { tinyMCE.execCommand("mceAddControl", false, "templatetext"); } http://screencast.com/t/muvuD0esJW So everything is messed up somewhow. Do you know the solution? A: Not sure if this helps but 3.3 introduced wp_editor() for displaying editors.
Q: The correct way of adding TinyMCE editor to custom meta box textarea? Since Wp 3.2 a lot of changed to TinyMCE and Wordpress and ow I can not find out how to add the Tiny MCE to meta box in Page. This is how it looks when I am not firing up the MCE http://screencast.com/t/ECQeyvJYC And this is when I fire up the Tiny MCE if ( typeof( tinyMCE ) == "object" && typeof( tinyMCE.execCommand ) == "function" ) { tinyMCE.execCommand("mceAddControl", false, "templatetext"); } http://screencast.com/t/muvuD0esJW So everything is messed up somewhow. Do you know the solution? A: Not sure if this helps but 3.3 introduced wp_editor() for displaying editors. A: To add TinyMCE editor please follow below given steps: 1. Add following function to your plugins file or the functions.php of your theme: function addtinymce() { echo '<script language="javascript" type="text/javascript" src="'.site_url().'/wp-includes/js/tinymce/tiny_mce.js"></script>'; echo '<script language="javascript" type="text/javascript">'; echo 'tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Skin options skin : "o2k7", skin_variant : "silver", // Example content CSS (should be your site CSS) content_css : "'.site_url().'/wp-content/themes/astoria/style.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "js/template_list.js", external_link_list_url : "js/link_list.js", external_image_list_url : "js/image_list.js", media_external_list_url : "js/media_list.js" });'; echo '</script>'; } 2. Now at the page where you want to use TinyMCE editor, simply call the function as: addtinymce(); It will automatically convert your textarea to the editor. Hope it works for you:)
wordpress
{ "language": "en", "length": 262, "provenance": "stackexchange_00019.jsonl.gz:413979", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31551" }
[ 0.0174407958984375, -0.0035762786865234375, 0.0012578964233398438, -0.00010776519775390625, -0.00363922119140625, -0.0160369873046875, 0.056915283203125, -0.01227569580078125, 0.004425048828125, 0.06744384765625, 0.00508880615234375, -0.0123138427734375, 0.032012939453125, -0.0102081298828125, -0.037994384765625, 0.00034046173095703125, 0.038238525390625, -0.01143646240234375, 0.031005859375, 0.01189422607421875, -0.0118560791015625, 0.037322998046875, 0.016448974609375, -0.05145263671875, 0.0214691162109375, -0.00441741943359375, 0.061798095703125, -0.02569580078125, 0.004364013671875, -0.0242156982421875, 0.0217437744140625, 0.00958251953125, 0.0204010009765625, 0.0726318359375, -0.08251953125, 0.041900634765625, 0.01403045654296875, 0.0252532958984375, 0.0130615234375, 0.0293731689453125, 0.023773193359375, -0.0128173828125, -0.02069091796875, 0.033203125, -0.0217132568359375, -0.037261962890625, 0.01047515869140625, -0.045654296875, 0.01396942138671875, -0.042510986328125, -0.0215606689453125, 0.0129852294921875, 0.0122833251953125, -0.06060791015625, -0.0058441162109375, -0.007366180419921875, -0.041290283203125, 0.016143798828125, -0.01018524169921875, 0.050384521484375, 0.038665771484375, 0.048431396484375, -0.022918701171875, 0.0127105712890625, 0.0006561279296875, -0.01020050048828125, -0.051544189453125, 0.01378631591796875, 0.0233306884765625, -0.00873565673828125, -0.0141143798828125, -0.0175628662109375, 0.02679443359375, -0.03662109375, 0.0208740234375, 0.01342010498046875, -0.026824951171875, -0.0201263427734375, 0.023284912109375, -0.0108184814453125, -0.01192474365234375, -0.0002332925796508789, -0.01486968994140625, -0.0290069580078125, 0.0218048095703125, 0.013702392578125, -0.0203399658203125, -0.01446533203125, -0.01512908935546875, -0.015167236328125, -0.00545501708984375, -0.076904296875, -0.0131378173828125, 0.037353515625, 0.018768310546875, -0.032257080078125, 0.01157379150390625, 0.0233001708984375, -0.016693115234375, -0.00347137451171875, 0.0102386474609375, -0.043487548828125, 0.03155517578125, -0.0183258056640625, -0.001003265380859375, -0.013946533203125, -0.0215911865234375, -0.026885986328125, 0.0303802490234375, 0.0438232421875, -0.0201416015625, 0.0116729736328125, 0.018768310546875, -0.012847900390625, 0.00850677490234375, 0.010711669921875, 0.0011816024780273438, 0.038299560546875, -0.01178741455078125, 0.02252197265625, -0.00251007080078125, 0.00830078125, 0.0289764404296875, -0.0272979736328125, -0.00925445556640625, -0.0296630859375, -0.027801513671875, -0.0120086669921875, -0.01480865478515625, 0.0097198486328125, -0.03564453125, 0.00850677490234375, 0.05377197265625, 0.06024169921875, 0.021392822265625, -0.0246429443359375, 0.01267242431640625, -0.01059722900390625, 0.00879669189453125, 0.0081329345703125, -0.005657196044921875, -0.0272064208984375, -0.004978179931640625, 0.00414276123046875, -0.040802001953125, 0.0552978515625, 0.0206756591796875, -0.0202484130859375, -0.03277587890625, -0.07452392578125, -0.02520751953125, -0.043426513671875, 0.031646728515625, 0.0217742919921875, -0.007049560546875, -0.034637451171875, 0.053253173828125, -0.0628662109375, -0.00975799560546875, -0.0682373046875, -0.01263427734375, 0.0167999267578125, 0.0389404296875, -0.042266845703125, 0.0023288726806640625, -0.043121337890625, -0.04833984375, 0.00766754150390625, 0.0176239013671875, 0.034027099609375, 0.007232666015625, -0.0018892288208007812, -0.00826263427734375, 0.007080078125, -0.0098724365234375, 0.005107879638671875, 0.001369476318359375, 0.0823974609375, 0.006999969482421875, 0.005702972412109375, 0.032562255859375, -0.039581298828125, 0.10650634765625, -0.01947021484375, -0.0279541015625, 0.016204833984375, 0.010101318359375, 0.060760498046875, -0.0016775131225585938, 0.02252197265625, -0.0133514404296875, 0.0234832763671875, 0.0259857177734375, -0.0288238525390625, 0.019256591796875, -0.0232391357421875, -0.0341796875, -0.02630615234375, -0.01216888427734375, 0.01203155517578125, 0.00037169456481933594, 0.0040740966796875, 0.029510498046875, -0.01555633544921875, -0.040557861328125, 0.03851318359375, -0.0272216796875, 0.047698974609375, 0.045135498046875, -0.03839111328125, -0.0183563232421875, -0.041839599609375, 0.0233612060546875, -0.0145721435546875, -0.053070068359375, 0.059417724609375, -0.005645751953125, 0.05352783203125, 0.0125274658203125, 0.031158447265625, 0.035888671875, -0.037384033203125, 0.023345947265625, 0.01114654541015625, 0.01043701171875, -0.020416259765625, -0.0232086181640625, -0.0164642333984375, 0.00809478759765625, -0.0015716552734375, 0.00275421142578125, 0.018646240234375, -0.0233154296875, 0.0164642333984375, -0.019256591796875, -0.0263519287109375, -0.032135009765625, -0.06549072265625, 0.0264129638671875, 0.054229736328125, 0.010162353515625, 0.050933837890625, -0.0028934478759765625, 0.04949951171875, 0.0362548828125, -0.037261962890625, 0.0018749237060546875, 0.0218658447265625, 0.0275726318359375, 0.05828857421875, 0.01425933837890625, -0.036346435546875, -0.0007977485656738281, -0.046173095703125, 0.0266876220703125, 0.0079193115234375, 0.00814056396484375, 0.027435302734375, 0.01064300537109375, -0.0267181396484375, 0.0172576904296875, 0.017578125, -0.0166473388671875, 0.007450103759765625, 0.01904296875, 0.041656494140625, 0.061187744140625, 0.07366943359375, -0.01183319091796875, 0.01009368896484375, -0.01303863525390625, 0.026611328125, 0.00783538818359375, 0.0171051025390625, 0.011932373046875, 0.0311279296875, -0.056396484375, 0.002666473388671875, 0.0513916015625, 0.0291748046875, -0.0079803466796875, 0.0295257568359375, -0.0281524658203125, -0.0135650634765625, 0.0013580322265625, -0.04931640625, -0.0132598876953125, -0.018035888671875, 0.03973388671875, -0.01143646240234375, 0.038970947265625, -0.01480865478515625, -0.024200439453125, 0.035614013671875, -0.0160064697265625, -0.049896240234375, 0.0645751953125, 0.00255584716796875, 0.02386474609375, 0.008392333984375, 0.0333251953125, 0.041839599609375, -0.03155517578125, 0.016387939453125, 0.004100799560546875, -0.0018835067749023438, -0.031524658203125, 0.04681396484375, 0.0179290771484375, -0.021331787109375, -0.0478515625, -0.018524169921875, 0.011444091796875, 0.014801025390625, -0.0034236907958984375, -0.01377105712890625, -0.0012636184692382812, 0.01194000244140625, 0.0030956268310546875, 0.00434112548828125, 0.045196533203125, -0.04510498046875, -0.049652099609375, -0.0251922607421875, -0.047760009765625, 0.003025054931640625, -0.006351470947265625, -0.01262664794921875, -0.021087646484375, 0.0013608932495117188, 0.012664794921875, -0.01508331298828125, -0.0196075439453125, -0.036895751953125, -0.0022296905517578125, -0.01404571533203125, 0.00864410400390625, 0.05572509765625, 0.0136871337890625, -0.036651611328125, 0.0242919921875, -0.030670166015625, -0.0198516845703125, 0.039520263671875, 0.0301513671875, -0.0399169921875, 0.0043182373046875, -0.006549835205078125, -0.00835418701171875, 0.024627685546875, -0.0218658447265625, -0.0015115737915039062, -0.01873779296875, -0.00921630859375, 0.00286865234375, 0.00998687744140625, 0.014068603515625, 0.0229644775390625, 0.058013916015625, -0.020355224609375, -0.0018444061279296875, 0.0325927734375, 0.00467681884765625, -0.0016269683837890625, -0.045013427734375, -0.0310211181640625, -0.00225067138671875, 0.048095703125, -0.00420379638671875, 0.0364990234375, 0.06298828125, -0.0030307769775390625, -0.0030231475830078125, -0.0281982421875, -0.055389404296875, -0.047088623046875, -0.0027027130126953125, -0.0240936279296875, 0.035675048828125, -0.0096282958984375, 0.00939178466796875, -0.023529052734375, 0.0347900390625, -0.03985595703125, -0.004238128662109375, 0.0296630859375, -0.0129547119140625, 0.05792236328125, -0.049896240234375, -0.029052734375, -0.036407470703125, 0.07696533203125, 0.007442474365234375, -0.019378662109375, 0.003955841064453125, 0.0032520294189453125, -0.0161590576171875, -0.0038356781005859375, -0.014312744140625, -0.01380157470703125, -0.0280609130859375, 0.01457977294921875, 0.01493072509765625, -0.01264190673828125, -0.037200927734375, 0.063232421875, -0.0384521484375, -0.00397491455078125, 0.0270843505859375, -0.05792236328125, -0.0003218650817871094, 0.017852783203125, -0.02886962890625, -0.0167236328125, -0.01180267333984375, -0.06292724609375, -0.103759765625, -0.0164337158203125, -0.052093505859375, 0.08880615234375, 0.028106689453125, -0.01560211181640625, -0.018951416015625, 0.053375244140625, 0.0205078125, 0.01546478271484375, 0.024017333984375, 0.01262664794921875, 0.0124359130859375, -0.0264739990234375, 0.0207366943359375, -0.048858642578125, 0.00015413761138916016, 0.0238494873046875, -0.04034423828125, -0.0055389404296875, -0.019866943359375, -0.058258056640625, 0.045501708984375, -0.05499267578125, -0.033935546875, -0.044921875, -0.0253448486328125, 0.018829345703125, -0.017730712890625, -0.007572174072265625, -0.034515380859375, -0.0390625, 0.0293121337890625, -0.00830841064453125, -0.0101470947265625, 0.007617950439453125, 0.0478515625, 0.021453857421875, -0.0201568603515625, -0.0200347900390625, -0.03759765625, 0.03826904296875, 0.0179901123046875, -0.0096282958984375, 0.00009948015213012695, -0.038909912109375, 0.0254974365234375, 0.01409149169921875, 0.03363037109375, -0.0645751953125, 0.08294677734375, -0.00516510009765625, -0.005916595458984375, 0.035308837890625, -0.0015802383422851562, -0.0129547119140625, -0.0082244873046875, -0.031494140625, 0.018646240234375, -0.0002989768981933594, 0.0258026123046875, -0.01387786865234375, 0.0208740234375, -0.03778076171875, -0.0171966552734375, -0.00768280029296875, 0.033111572265625, 0.0521240234375, 0.0213775634765625, 0.01236724853515625, -0.003337860107421875, 0.0201873779296875, -0.0225372314453125, 0.033843994140625, -0.0171966552734375, 0.0394287109375, 0.0009717941284179688, 0.03057861328125, -0.0196533203125, 0.0113067626953125, -0.00492095947265625, 0.032379150390625, 0.0299835205078125, -0.01450347900390625, -0.0286407470703125, 0.011138916015625, 0.082275390625, -0.0246124267578125, -0.0033092498779296875, 0.028533935546875, 0.029327392578125, -0.0345458984375, 0.0128326416015625, 0.002620697021484375, -0.006378173828125, -0.0496826171875, -0.0360107421875, -0.025054931640625, -0.00582122802734375, -0.012054443359375, 0.08331298828125, -0.05804443359375, 0.051300048828125, -0.0002319812774658203, 0.011474609375, -0.00897979736328125, 0.047760009765625, 0.036865234375, -0.015777587890625, -0.007038116455078125, 0.021942138671875, -0.0211334228515625, -0.01309967041015625, -0.00780487060546875, 0.0105133056640625, 0.00727081298828125, 0.005619049072265625, -0.00411224365234375, 0.00287628173828125, -0.0209808349609375, -0.00555419921875, -0.0187835693359375, -0.03814697265625, -0.04132080078125, 0.007122039794921875, 0.007404327392578125, -0.01047515869140625, -0.0255279541015625, -0.0118255615234375, 0.01071929931640625, -0.044281005859375, 0.0276947021484375, -0.01123809814453125, 0.001953125, -0.0145721435546875, -0.0255126953125, -0.0020294189453125, 0.00362396240234375, -0.01139068603515625, -0.0523681640625, -0.051239013671875, 0.0032558441162109375, -0.000044286251068115234, 0.0245819091796875, -0.01708984375, 0.000675201416015625, -0.025146484375, 0.0212860107421875, -0.05224609375, 0.031341552734375, -0.014251708984375, -0.020965576171875, 0.0188140869140625, -0.0202178955078125, -0.03369140625, -0.033935546875, -0.0026092529296875, -0.048919677734375, -0.0237884521484375, -0.01468658447265625, 0.004817962646484375, 0.037933349609375, -0.0234527587890625, -0.04559326171875, 0.01336669921875, -0.00449371337890625, -0.007671356201171875, 0.0419921875, 0.004852294921875, 0.045654296875, -0.0330810546875, 0.09832763671875, 0.005275726318359375, 0.01293182373046875, 0.005908966064453125, -0.043426513671875, 0.0213470458984375, -0.04388427734375, -0.0244903564453125, -0.00884246826171875, -0.006420135498046875, -0.004070281982421875, -0.0124664306640625, -0.01392364501953125, 0.0133514404296875, -0.010589599609375, -0.00975799560546875, -0.0118865966796875, 0.040374755859375, 0.019683837890625, 0.031463623046875, 0.0198516845703125, -0.063720703125, -0.004184722900390625, 0.0168304443359375, 0.0285491943359375, 0.03387451171875, -0.048065185546875, 0.003662109375, 0.036041259765625, -0.067626953125, 0.07769775390625, 0.059112548828125, 0.0034332275390625, 0.0284423828125, 0.00484466552734375, -0.0106201171875, -0.018463134765625, -0.00951385498046875, 0.00910186767578125, 0.013885498046875, 0.0115203857421875, -0.018463134765625, 0.004085540771484375, 0.0047760009765625, -0.0039043426513671875, 0.0266571044921875, 0.06292724609375, 0.099609375, -0.06768798828125, -0.002979278564453125, 0.0277557373046875, -0.031463623046875, 0.0242156982421875, -0.0218658447265625, -0.0174560546875, -0.057708740234375, 0.08966064453125, -0.0138092041015625, 0.01458740234375, 0.047271728515625, -0.037109375, -0.010498046875, -0.0096588134765625, 0.01247406005859375, 0.006130218505859375, 0.037353515625, -0.00823974609375, -0.01531219482421875, 0.022552490234375, 0.0233612060546875, 0.0195159912109375, -0.0106658935546875, -0.006805419921875, -0.01953125, 0.0011682510375976562, -0.03302001953125, -0.036285400390625, 0.029296875, 0.0200042724609375, -0.00991058349609375, 0.06353759765625, -0.046051025390625, 0.0731201171875, 0.0226593017578125, -0.01268768310546875, 0.0168914794921875, -0.02557373046875, 0.0215911865234375, -0.003459930419921875, -0.0225372314453125, 0.017242431640625, -0.002727508544921875, -0.036346435546875, 0.0188751220703125, 0.05548095703125, 0.015350341796875, 0.0157470703125, -0.040069580078125, 0.04632568359375, -0.0118255615234375, -0.02569580078125, -0.03851318359375, -0.03302001953125, -0.09881591796875, -0.0198822021484375, -0.032012939453125, -0.006374359130859375, 0.0232391357421875, -0.021270751953125, -0.074951171875, 0.1109619140625, 0.01415252685546875, 0.004352569580078125, -0.01523590087890625, 0.05914306640625, -0.056396484375, 0.0146942138671875, -0.01068878173828125, 0.0161895751953125, -0.01139068603515625, -0.002532958984375, -0.0621337890625, -0.00908660888671875, -0.0224609375, 0.059173583984375, 0.00305938720703125, -0.004756927490234375, -0.0235137939453125, -0.020294189453125, 0.02001953125, 0.063720703125, 0.0212860107421875, 0.006168365478515625, 0.0290679931640625, -0.03765869140625, 0.005413055419921875, 0.045623779296875, 0.040771484375, -0.019439697265625, -0.0266265869140625, 0.043243408203125, -0.00884246826171875, -0.013336181640625, 0.002704620361328125, -0.004566192626953125, 0.015106201171875, -0.0114593505859375, -0.01380157470703125, -0.0732421875, -0.022369384765625, 0.036712646484375, -0.007015228271484375, -0.0041351318359375, -0.032379150390625, -0.01561737060546875, 0.011016845703125, -0.006099700927734375, -0.0023345947265625, -0.024871826171875, -0.00018680095672607422, 0.0192413330078125, -0.015625, -0.01427459716796875, 0.04901123046875, -0.00782012939453125, 0.020965576171875, -0.028045654296875, -0.00833892822265625, -0.06390380859375, 0.0225067138671875, 0.070556640625, 0.0271759033203125, -0.041656494140625, -0.03155517578125, 0.00453948974609375, -0.004840850830078125, -0.0023593902587890625, -0.022369384765625, -0.0239715576171875, 0.010711669921875, 0.032196044921875, 0.00980377197265625, -0.01239776611328125, -0.01959228515625, 0.01036834716796875, -0.00832366943359375, 0.02215576171875, 0.0206756591796875, -0.0038890838623046875, -0.056182861328125, 0.0162353515625, -0.0094146728515625, 0.0614013671875, 0.04364013671875, 0.05169677734375, -0.00478363037109375, -0.0266876220703125, -0.03265380859375, 0.0216217041015625, 0.01910400390625, 0.03326416015625, -0.029541015625, -0.00007063150405883789, 0.046417236328125, 0.0194854736328125, 0.0117950439453125, 0.0809326171875, 0.050872802734375, 0.005428314208984375, -0.021453857421875, 0.0035724639892578125, 0.01441192626953125, -0.0391845703125, -0.0169830322265625, -0.039154052734375, -0.01282501220703125, 0.017608642578125, -0.0033969879150390625, 0.002658843994140625, -0.00954437255859375, 0.047271728515625, -0.0142974853515625, -0.01125335693359375, 0.008209228515625, -0.06622314453125, 0.005950927734375, -0.00537109375, 0.04913330078125, 0.01195526123046875, -0.00835418701171875, 0.0024127960205078125, 0.007358551025390625, -0.041961669921875, -0.0092010498046875, 0.038665771484375, -0.003173828125, 0.009857177734375, -0.03497314453125, -0.01678466796875, 0.0223541259765625, -0.00421142578125, 0.0017976760864257812, 0.01096343994140625, 0.0019054412841796875, -0.0240020751953125, -0.04620361328125, -0.00957489013671875, 0.0078582763671875, 0.018341064453125, 0.01995849609375, 0.04156494140625, 0.01425933837890625, 0.02191162109375, -0.049774169921875, 0.003429412841796875, -0.02252197265625, -0.03857421875, 0.013092041015625, 0.04290771484375, -0.0057830810546875, -0.021240234375, -0.038116455078125, 0.055450439453125, 0.00963592529296875, 0.0007543563842773438, 0.021453857421875, 0.0204925537109375, -0.004604339599609375, -0.004215240478515625, 0.019744873046875, -0.03912353515625, -0.03662109375, -0.0498046875, -0.0313720703125, 0.0143585205078125, -0.0013875961303710938, 0.0099945068359375, -0.0113525390625, 0.035736083984375, -0.038970947265625, 0.02386474609375, -0.0009660720825195312, 0.0390625, 0.035125732421875, 0.02923583984375, -0.035858154296875, 0.045654296875, 0.0041656494140625, 0.00530242919921875, 0.0159759521484375, 0.041778564453125, 0.03924560546875, -0.1015625, 0.055938720703125, 0.0211181640625, 0.05535888671875, -0.0333251953125, 0.0027866363525390625, 0.034881591796875, 0.022796630859375, 0.0238189697265625, 0.01003265380859375, -0.03387451171875, -0.030975341796875, 0.017425537109375, 0.036468505859375, -0.007167816162109375, -0.00695037841796875, -0.10821533203125, -0.0207672119140625, 0.035614013671875, 0.027984619140625, -0.0738525390625, 0.0518798828125, -0.0014781951904296875, -0.004924774169921875, 0.0225677490234375, -0.00482940673828125, 0.0066070556640625, 0.03472900390625, -0.00702667236328125, -0.01776123046875, -0.02825927734375, 0.02008056640625, -0.0206756591796875, 0.033477783203125, 0.0506591796875, -0.036407470703125, -0.007579803466796875, -0.00390625, 0.028289794921875, 0.04083251953125, -0.012054443359375, 0.0024318695068359375, 0.06793212890625, -0.0303955078125, -0.027557373046875, -0.0743408203125, -0.01097869873046875, -0.0582275390625, 0.0164031982421875, -0.01087188720703125, 0.012664794921875, 0.0172271728515625, -0.040924072265625, -0.07806396484375, 0.0194854736328125, -0.0005583763122558594, -0.03155517578125, -0.007198333740234375, -0.02178955078125, -0.0032596588134765625, -0.00846099853515625, -0.0147247314453125, -0.0003466606140136719, -0.01470947265625, 0.0164337158203125, 0.0179595947265625, 0.03179931640625, 0.013824462890625, 0.01049041748046875, -0.048431396484375, -0.004058837890625, -0.0277557373046875, -0.0020084381103515625, -0.013458251953125, 0.0014400482177734375, 0.0073089599609375, 0.037445068359375, -0.0213470458984375, -0.0699462890625, -0.001262664794921875, -0.023681640625, -0.0091400146484375, -0.05841064453125, -0.05242919921875, -0.047210693359375, 0.0941162109375, 0.04058837890625, 0.027679443359375, -0.01049041748046875, 0.0214385986328125, -0.0143280029296875, -0.04541015625, -0.00800323486328125, 0.019256591796875, -0.054168701171875, -0.0119171142578125, 0.0164031982421875, -0.0124664306640625, -0.01334381103515625, 0.0219879150390625, -0.03265380859375, 0.0009756088256835938, 0.013092041015625, -0.021240234375, -0.031097412109375, 0.00024068355560302734, 0.10687255859375, -0.06341552734375, -0.0281829833984375, 0.038055419921875, -0.00348663330078125, 0.0141448974609375, 0.00325775146484375, 0.00289154052734375, -0.0117950439453125, -0.03619384765625, 0.035858154296875, -0.0101318359375, 0.026702880859375, -0.05841064453125, -0.0239105224609375, 0.0013990402221679688, 0.01337432861328125, 0.000009894371032714844, 0.03009033203125, -0.005893707275390625, -0.00347137451171875, 0.006053924560546875, -0.0303192138671875, -0.045135498046875, -0.006130218505859375, -0.047698974609375, 0.00943756103515625, 0.00571441650390625, 0.035400390625, 0.037261962890625, 0.02801513671875, 0.0311737060546875, -0.00037360191345214844, 0.0051727294921875, 0.0243377685546875, -0.0274810791015625, -0.00957489013671875, -0.027496337890625, -0.01258087158203125 ]
04b6ee709dca20961026e23816e1e050d1ae594b
Wordpress Stackexchange Q: Get users with atleast one post How can I get all users with atleast one post? I don't think it's possible with get_users function. A: global $wpdb; $min_posts = 5; // Make sure it's int, it's not escaped in the query $author_ids = $wpdb->get_col("SELECT `post_author` FROM (SELECT `post_author`, COUNT(*) AS `count` FROM {$wpdb->posts} WHERE `post_status`='publish' GROUP BY `post_author`) AS `stats` WHERE `count` >= {$min_posts} ORDER BY `count` DESC;"); // Do what you want to $author_ids from here on... This will return the User IDs of the Authors with 5+ published posts and orders them descending, by post counts.
Q: Get users with atleast one post How can I get all users with atleast one post? I don't think it's possible with get_users function. A: global $wpdb; $min_posts = 5; // Make sure it's int, it's not escaped in the query $author_ids = $wpdb->get_col("SELECT `post_author` FROM (SELECT `post_author`, COUNT(*) AS `count` FROM {$wpdb->posts} WHERE `post_status`='publish' GROUP BY `post_author`) AS `stats` WHERE `count` >= {$min_posts} ORDER BY `count` DESC;"); // Do what you want to $author_ids from here on... This will return the User IDs of the Authors with 5+ published posts and orders them descending, by post counts.
wordpress
{ "language": "en", "length": 99, "provenance": "stackexchange_00019.jsonl.gz:414023", "question_score": "4", "source": "stackexchange", "timestamp": "2023-03-29", "url": "https://wordpress.stackexchange.com/questions/31722" }
[ 0.0615234375, -0.005245208740234375, -0.0007534027099609375, -0.01062774658203125, 0.01013946533203125, -0.031768798828125, 0.06280517578125, -0.0291290283203125, 0.00383758544921875, 0.0271759033203125, -0.0173187255859375, 0.0158843994140625, -0.01258087158203125, -0.0224609375, -0.00878143310546875, -0.0218658447265625, 0.0323486328125, -0.037994384765625, -0.01049041748046875, -0.01654052734375, 0.00745391845703125, -0.00365447998046875, -0.0007176399230957031, 0.0474853515625, -0.0079193115234375, -0.0101165771484375, 0.073486328125, -0.0416259765625, 0.00791168212890625, -0.037109375, 0.0044708251953125, 0.0268096923828125, -0.0111083984375, 0.006214141845703125, 0.0225982666015625, 0.0255279541015625, -0.003192901611328125, 0.026153564453125, 0.034759521484375, -0.00090789794921875, 0.0303497314453125, -0.022186279296875, -0.05072021484375, 0.037872314453125, -0.035247802734375, -0.0460205078125, 0.056640625, -0.004245758056640625, 0.048980712890625, -0.037750244140625, -0.0191650390625, 0.0186614990234375, -0.005641937255859375, -0.04412841796875, -0.0270233154296875, 0.01177978515625, 0.034912109375, -0.0175628662109375, 0.0704345703125, -0.09686279296875, -0.07708740234375, -0.05706787109375, 0.07562255859375, -0.00504302978515625, -0.004302978515625, 0.0240936279296875, 0.01061248779296875, -0.0026645660400390625, -0.018798828125, -0.01312255859375, -0.0054473876953125, -0.0301361083984375, -0.0186767578125, 0.0125732421875, -0.0236968994140625, -0.034698486328125, -0.0008559226989746094, -0.048980712890625, 0.00356292724609375, 0.052825927734375, -0.04217529296875, -0.02783203125, -0.0902099609375, 0.0205078125, -0.036712646484375, 0.0186004638671875, -0.01519012451171875, -0.00244903564453125, -0.057525634765625, -0.0042877197265625, -0.0293121337890625, -0.04217529296875, -0.05987548828125, 0.03326416015625, 0.01471710205078125, -0.0204925537109375, 0.05078125, 0.05914306640625, -0.0161285400390625, -0.045562744140625, 0.00357818603515625, -0.0274658203125, -0.0684814453125, -0.005962371826171875, 0.02679443359375, 0.01247406005859375, -0.01453399658203125, 0.023834228515625, 0.061187744140625, 0.0382080078125, 0.00311279296875, 0.0245361328125, -0.01367950439453125, -0.0155181884765625, -0.03851318359375, 0.0207977294921875, -0.035736083984375, -0.004367828369140625, -0.0029277801513671875, -0.023773193359375, 0.0186614990234375, 0.046112060546875, -0.03466796875, -0.006984710693359375, -0.043609619140625, -0.04071044921875, -0.016998291015625, 0.00495147705078125, 0.0139617919921875, 0.0357666015625, -0.0237274169921875, 0.006435394287109375, 0.044281005859375, 0.0010547637939453125, -0.01345062255859375, -0.0243988037109375, -0.01351165771484375, -0.022369384765625, 0.005908966064453125, 0.0194854736328125, -0.026031494140625, -0.030059814453125, 0.0309600830078125, -0.005237579345703125, -0.01447296142578125, 0.0157470703125, 0.016754150390625, 0.0021209716796875, -0.004489898681640625, -0.0262298583984375, -0.0245513916015625, 0.027191162109375, -0.0204925537109375, 0.0121612548828125, 0.046905517578125, -0.01556396484375, 0.002948760986328125, -0.0110931396484375, 0.04443359375, 0.005695343017578125, 0.07696533203125, 0.007358551025390625, -0.0069580078125, 0.0303955078125, -0.032958984375, -0.0146026611328125, -0.0298919677734375, -0.0166778564453125, 0.0179901123046875, 0.0328369140625, -0.0178680419921875, 0.002742767333984375, 0.046478271484375, 0.0128173828125, -0.01885986328125, 0.017486572265625, -0.0241241455078125, 0.0062103271484375, 0.00440216064453125, 0.01544952392578125, -0.006519317626953125, -0.0223541259765625, 0.01021575927734375, 0.0203857421875, -0.0305023193359375, 0.044525146484375, 0.0137176513671875, 0.061004638671875, 0.01201629638671875, 0.0165252685546875, -0.0136260986328125, 0.041717529296875, 0.00864410400390625, -0.00710296630859375, -0.01422882080078125, -0.037109375, -0.00043463706970214844, -0.00263214111328125, -0.0176239013671875, 0.030120849609375, 0.06561279296875, -0.02557373046875, 0.03692626953125, -0.04034423828125, -0.0621337890625, 0.0007638931274414062, -0.0192718505859375, 0.007328033447265625, 0.0026950836181640625, 0.0021915435791015625, 0.02032470703125, 0.020904541015625, -0.0394287109375, -0.025787353515625, -0.048675537109375, -0.0260772705078125, 0.0087738037109375, 0.00720977783203125, 0.0006093978881835938, 0.0181121826171875, -0.011688232421875, -0.00341796875, -0.032562255859375, 0.019256591796875, 0.062744140625, -0.0489501953125, 0.00799560546875, -0.052886962890625, 0.047119140625, -0.013885498046875, -0.01554107666015625, 0.041595458984375, 0.007678985595703125, 0.01203155517578125, -0.034271240234375, 0.0018720626831054688, -0.0047760009765625, -0.01229095458984375, 0.005931854248046875, 0.041351318359375, 0.0350341796875, -0.0088958740234375, 0.0186767578125, 0.01558685302734375, 0.024444580078125, -0.022979736328125, 0.01494598388671875, -0.004016876220703125, 0.020355224609375, 0.07159423828125, 0.01027679443359375, 0.0226593017578125, -0.00295257568359375, -0.044891357421875, 0.0274810791015625, 0.040008544921875, 0.00146484375, 0.0556640625, -0.063232421875, 0.0164947509765625, -0.012054443359375, -0.048492431640625, 0.00443267822265625, -0.03887939453125, -0.0284576416015625, 0.003574371337890625, 0.00672149658203125, 0.0121612548828125, 0.00262451171875, -0.0350341796875, 0.01320648193359375, -0.003627777099609375, 0.004261016845703125, 0.0309600830078125, -0.07684326171875, 0.025848388671875, -0.0088043212890625, 0.0065765380859375, -0.0022563934326171875, -0.0003502368927001953, 0.005962371826171875, -0.0032291412353515625, 0.048797607421875, -0.0012941360473632812, 0.036102294921875, -0.005634307861328125, 0.04656982421875, 0.0230712890625, -0.005126953125, -0.0213470458984375, 0.01190185546875, 0.04583740234375, -0.016204833984375, 0.04864501953125, -0.0198974609375, 0.0008382797241210938, -0.0233306884765625, -0.09033203125, 0.05426025390625, -0.0440673828125, 0.06573486328125, 0.084716796875, 0.02264404296875, 0.027435302734375, -0.01496124267578125, 0.010498046875, -0.00806427001953125, -0.0028553009033203125, -0.0160980224609375, -0.0240936279296875, -0.009246826171875, 0.040252685546875, 0.0170440673828125, 0.0697021484375, -0.005458831787109375, -0.043914794921875, 0.0033359527587890625, 0.0270233154296875, -0.041595458984375, -0.061187744140625, -0.0221710205078125, -0.05828857421875, -0.005680084228515625, -0.01043701171875, -0.0255889892578125, 0.006038665771484375, 0.003444671630859375, 0.01100921630859375, -0.024383544921875, 0.01171875, -0.056365966796875, -0.00864410400390625, -0.053924560546875, 0.036224365234375, -0.01361083984375, 0.01641845703125, 0.0076904296875, 0.056732177734375, 0.003391265869140625, -0.0660400390625, -0.0159149169921875, 0.044219970703125, -0.03424072265625, -0.006175994873046875, 0.012542724609375, 0.00713348388671875, -0.037261962890625, 0.0192413330078125, -0.022796630859375, 0.0027141571044921875, -0.030517578125, -0.0254669189453125, 0.011383056640625, -0.005977630615234375, 0.054473876953125, 0.0198822021484375, -0.048095703125, 0.025421142578125, 0.073486328125, -0.015655517578125, 0.00537872314453125, 0.0015821456909179688, -0.017547607421875, -0.01399993896484375, -0.03106689453125, -0.0078887939453125, 0.0016393661499023438, 0.01103973388671875, 0.036285400390625, 0.0184173583984375, -0.0274658203125, 0.01141357421875, 0.040069580078125, 0.0214385986328125, 0.038055419921875, -0.0051116943359375, -0.004695892333984375, -0.01024627685546875, -0.0072174072265625, -0.0190582275390625, 0.0158233642578125, -0.019866943359375, 0.0198516845703125, -0.029998779296875, -0.042999267578125, 0.060791015625, 0.03204345703125, 0.0247955322265625, -0.032684326171875, -0.048248291015625, -0.01413726806640625, 0.0908203125, -0.0144195556640625, -0.039947509765625, -0.0014514923095703125, 0.0261993408203125, -0.03814697265625, -0.046356201171875, -0.0054168701171875, -0.00795745849609375, 0.00753021240234375, -0.042633056640625, -0.034332275390625, -0.01038360595703125, -0.01568603515625, -0.0211029052734375, -0.0007534027099609375, -0.025604248046875, 0.0262603759765625, 0.00815582275390625, 0.0263671875, -0.0035762786865234375, -0.0023441314697265625, 0.01157379150390625, -0.00994110107421875, -0.019683837890625, -0.043212890625, -0.02587890625, 0.005794525146484375, 0.0279541015625, -0.0069122314453125, 0.006855010986328125, 0.0029392242431640625, 0.0516357421875, -0.016845703125, 0.041351318359375, -0.0020599365234375, 0.0190277099609375, -0.01203155517578125, -0.0222625732421875, 0.005977630615234375, -0.0343017578125, -0.0135650634765625, -0.0426025390625, 0.0009469985961914062, -0.01180267333984375, -0.0596923828125, -0.00009393692016601562, -0.05999755859375, 0.0036182403564453125, -0.03265380859375, -0.035003662109375, -0.01343536376953125, 0.04144287109375, -0.021636962890625, 0.00814056396484375, -0.05908203125, -0.052947998046875, 0.0265350341796875, 0.03387451171875, -0.0016698837280273438, 0.0018739700317382812, 0.07879638671875, 0.00989532470703125, -0.030029296875, -0.0418701171875, -0.018829345703125, 0.0229339599609375, -0.00870513916015625, 0.0276031494140625, 0.0274200439453125, -0.0164337158203125, 0.00432586669921875, 0.0012989044189453125, -0.00478363037109375, 0.001678466796875, 0.0352783203125, -0.0230712890625, -0.023040771484375, 0.0113983154296875, -0.0286407470703125, 0.01092529296875, 0.0175018310546875, -0.01209259033203125, 0.0037212371826171875, 0.0321044921875, 0.02850341796875, -0.020111083984375, -0.01385498046875, -0.01558685302734375, -0.060546875, 0.0029239654541015625, -0.00018739700317382812, 0.002193450927734375, 0.000028848648071289062, 0.0176544189453125, 0.0184173583984375, 0.03863525390625, -0.007343292236328125, 0.0120391845703125, 0.01593017578125, 0.005527496337890625, 0.040771484375, -0.01245880126953125, -0.01030731201171875, 0.004070281982421875, -0.0158843994140625, 0.0675048828125, 0.042877197265625, -0.047393798828125, 0.064697265625, -0.0201416015625, 0.0361328125, -0.01056671142578125, -0.002872467041015625, 0.05584716796875, 0.004421234130859375, -0.0247955322265625, -0.0262451171875, -0.0611572265625, 0.0010080337524414062, -0.0693359375, 0.00040459632873535156, -0.0237579345703125, 0.0149383544921875, 0.0169525146484375, 0.07464599609375, 0.0049591064453125, 0.05670166015625, -0.0237579345703125, 0.0867919921875, 0.042694091796875, 0.0289306640625, -0.004856109619140625, 0.008148193359375, 0.00716400146484375, 0.007213592529296875, -0.0279693603515625, -0.032440185546875, -0.0018129348754882812, 0.04302978515625, 0.03509521484375, 0.050994873046875, 0.004673004150390625, -0.021209716796875, -0.003925323486328125, -0.0306854248046875, 0.028961181640625, 0.04083251953125, -0.0116729736328125, -0.03326416015625, -0.004497528076171875, 0.0105133056640625, 0.03765869140625, -0.00337982177734375, -0.021820068359375, -0.00567626953125, -0.012115478515625, 0.0108489990234375, -0.03753662109375, -0.00951385498046875, 0.004810333251953125, -0.0027141571044921875, -0.035797119140625, -0.0216827392578125, 0.034210205078125, 0.017852783203125, -0.0316162109375, -0.036834716796875, 0.052276611328125, 0.00021660327911376953, 0.0222015380859375, -0.04486083984375, 0.00579071044921875, -0.04583740234375, -0.004299163818359375, 0.0640869140625, 0.034820556640625, -0.0033168792724609375, -0.022796630859375, -0.033477783203125, -0.031341552734375, 0.05047607421875, -0.00592041015625, -0.02105712890625, -0.004177093505859375, 0.0101165771484375, 0.0139312744140625, 0.01065826416015625, -0.037384033203125, -0.01412200927734375, -0.01263427734375, 0.0101776123046875, -0.014312744140625, -0.027862548828125, 0.07855224609375, -0.01367950439453125, 0.02850341796875, -0.000029921531677246094, 0.057647705078125, 0.0176239013671875, -0.00930023193359375, 0.024566650390625, -0.0181121826171875, -0.0214080810546875, -0.025634765625, 0.01143646240234375, -0.050506591796875, -0.016265869140625, -0.0127716064453125, -0.00846099853515625, 0.0080718994140625, 0.00994110107421875, -0.01251220703125, -0.04437255859375, 0.035003662109375, -0.0418701171875, 0.021759033203125, 0.00901031494140625, 0.03839111328125, -0.003993988037109375, -0.031646728515625, 0.006046295166015625, 0.00345611572265625, 0.00463104248046875, -0.002391815185546875, -0.0148162841796875, 0.0269927978515625, 0.05621337890625, 0.01096343994140625, 0.0294189453125, 0.008575439453125, 0.0165863037109375, -0.0220794677734375, -0.01513671875, -0.0140533447265625, -0.005214691162109375, 0.0323486328125, -0.0059661865234375, 0.004734039306640625, 0.03955078125, -0.0182647705078125, -0.0076446533203125, -0.0022487640380859375, 0.017822265625, -0.01421356201171875, 0.0196685791015625, -0.0017404556274414062, -0.0013942718505859375, 0.0079193115234375, -0.01192474365234375, -0.00913238525390625, -0.058502197265625, 0.07611083984375, 0.0011129379272460938, 0.0011386871337890625, 0.0088348388671875, -0.038482666015625, -0.00681304931640625, -0.0406494140625, 0.032257080078125, 0.0023670196533203125, -0.0009007453918457031, 0.0010128021240234375, -0.00021350383758544922, -0.0012483596801757812, -0.007450103759765625, -0.00646209716796875, 0.013580322265625, 0.00731658935546875, -0.042236328125, 0.0203399658203125, -0.03753662109375, -0.00331878662109375, -0.00510406494140625, 0.029327392578125, 0.0146484375, 0.04107666015625, 0.0089569091796875, -0.0115509033203125, 0.041351318359375, -0.05316162109375, -0.07769775390625, -0.01357269287109375, 0.01537322998046875, 0.0496826171875, -0.00870513916015625, 0.050262451171875, -0.00789642333984375, -0.023284912109375, 0.000850677490234375, -0.014434814453125, 0.06427001953125, -0.030731201171875, -0.0233306884765625, 0.0136260986328125, 0.016693115234375, 0.0100555419921875, 0.0256195068359375, 0.0081939697265625, -0.0242767333984375, 0.002197265625, 0.0214385986328125, -0.00928497314453125, -0.007572174072265625, 0.0135040283203125, -0.0743408203125, 0.06011962890625, -0.020111083984375, 0.035614013671875, 0.0211029052734375, 0.01666259765625, -0.020965576171875, -0.021728515625, -0.059600830078125, 0.07940673828125, -0.0080718994140625, 0.0667724609375, -0.046905517578125, 0.00390625, 0.0172576904296875, 0.00547027587890625, 0.12005615234375, 0.01206207275390625, -0.037384033203125, -0.020660400390625, 0.044891357421875, 0.020965576171875, -0.041778564453125, 0.06170654296875, 0.027435302734375, 0.044952392578125, 0.09332275390625, -0.0234527587890625, 0.0517578125, 0.01284027099609375, 0.00704193115234375, 0.029937744140625, -0.0003333091735839844, -0.0026988983154296875, 0.0207977294921875, -0.018157958984375, -0.036376953125, 0.00414276123046875, 0.021026611328125, -0.006145477294921875, -0.0038967132568359375, 0.0606689453125, 0.056182861328125, -0.01436614990234375, -0.01000213623046875, -0.033294677734375, 0.05157470703125, 0.030914306640625, -0.006092071533203125, 0.052215576171875, 0.0250701904296875, 0.0430908203125, 0.005615234375, 0.00836181640625, -0.0105438232421875, 0.015655517578125, 0.06756591796875, 0.0175323486328125, 0.033050537109375, -0.059356689453125, -0.0355224609375, 0.052642822265625, 0.08905029296875, -0.03875732421875, -0.0216064453125, 0.0285797119140625, -0.00020956993103027344, -0.0225372314453125, 0.01198577880859375, 0.00800323486328125, 0.04681396484375, 0.053375244140625, -0.043426513671875, -0.02410888671875, 0.02142333984375, 0.030364990234375, 0.0016994476318359375, -0.004032135009765625, -0.01169586181640625, -0.052093505859375, -0.025634765625, -0.0182037353515625, 0.007568359375, 0.0070953369140625, 0.0269012451171875, 0.0008111000061035156, 0.0258636474609375, 0.002956390380859375, 0.0296173095703125, -0.010528564453125, -0.00653839111328125, -0.033477783203125, 0.004383087158203125, -0.036224365234375, -0.0209808349609375, 0.0180816650390625, 0.008392333984375, -0.044158935546875, 0.0011892318725585938, 0.039947509765625, -0.0284423828125, -0.0249481201171875, 0.060943603515625, 0.0002613067626953125, -0.04522705078125, -0.0066680908203125, -0.0265045166015625, 0.00759124755859375, -0.001712799072265625, 0.0223846435546875, 0.052947998046875, -0.01041412353515625, 0.0001838207244873047, 0.00458526611328125, 0.00016319751739501953, -0.0080718994140625, 0.015869140625, 0.00685882568359375, 0.0188446044921875, 0.01148223876953125, -0.0780029296875, 0.01392364501953125, -0.0477294921875, -0.045440673828125, 0.0228118896484375, 0.0240478515625, -0.047821044921875, 0.03607177734375, -0.0012454986572265625, -0.0112457275390625, 0.0202484130859375, -0.0124359130859375, -0.0014410018920898438, 0.0311431884765625, 0.030853271484375, 0.0020275115966796875, -0.05255126953125, -0.057373046875, -0.006656646728515625, 0.03759765625, 0.008941650390625, 0.003192901611328125, 0.0233001708984375, 0.0157623291015625, -0.022216796875, 0.0220489501953125, -0.06256103515625, -0.04949951171875, 0.054931640625, -0.04296875, -0.039825439453125, 0.013275146484375, -0.0299835205078125, -0.0167083740234375, 0.0513916015625, -0.00574493408203125, -0.0012102127075195312, -0.00830078125, 0.0274505615234375, -0.0166168212890625, 0.004058837890625, -0.0333251953125, -0.00644683837890625, -0.0736083984375, -0.04437255859375, 0.053375244140625, 0.01265716552734375, -0.0236358642578125, 0.0235595703125, -0.01061248779296875, -0.066162109375, 0.00954437255859375, -0.035491943359375, -0.007617950439453125, 0.01313018798828125, 0.0245513916015625, 0.02716064453125, -0.00751495361328125, -0.024078369140625, 0.0190887451171875, 0.01035308837890625, -0.0171661376953125, 0.0216522216796875, -0.03338623046875, 0.021881103515625, 0.0109710693359375, 0.0311126708984375, -0.00946044921875, -0.0100250244140625, 0.034576416015625, -0.032684326171875, -0.04412841796875, 0.0123443603515625, -0.0047760009765625, 0.01372528076171875, -0.0310211181640625, -0.0088958740234375, -0.0022449493408203125, -0.04864501953125, -0.03167724609375, -0.01428985595703125, -0.016937255859375, -0.0244903564453125, -0.0107421875, 0.0288848876953125, -0.030548095703125, -0.01849365234375, -0.0660400390625, -0.00913238525390625, 0.0276336669921875, 0.046600341796875, -0.050018310546875, -0.0007233619689941406, -0.00943756103515625, -0.03192138671875, -0.0196380615234375, 0.01103973388671875, 0.023284912109375, -0.0074920654296875, 0.0163421630859375, 0.035400390625, 0.007076263427734375, 0.06268310546875, -0.03033447265625, -0.003391265869140625, 0.0036163330078125, 0.00421905517578125, -0.0231475830078125, -0.09014892578125, 0.0225372314453125, -0.09063720703125, -0.01849365234375, -0.019012451171875, 0.041656494140625, 0.060577392578125, -0.01183319091796875, -0.06439208984375, 0.1104736328125, -0.04901123046875, -0.0177459716796875, -0.03240966796875, -0.01366424560546875, 0.0028591156005859375, 0.01081085205078125, -0.006206512451171875, 0.00594329833984375, -0.043914794921875, 0.019989013671875, 0.01129913330078125, -0.02398681640625, 0.072265625, -0.0295257568359375, -0.06805419921875, -0.021636962890625, -0.01354217529296875, 0.01074981689453125, 0.0278472900390625, -0.00600433349609375, 0.03521728515625, 0.062042236328125, -0.01461029052734375, 0.01166534423828125, -0.01117706298828125, -0.0406494140625, -0.0099334716796875, -0.0276947021484375, -0.02349853515625, -0.0234222412109375, 0.0299224853515625, 0.0537109375, 0.01568603515625, -0.0200653076171875, -0.006046295166015625, -0.042388916015625, -0.0218658447265625, 0.0008068084716796875, 0.0178985595703125, -0.062744140625, 0.004909515380859375, 0.044219970703125, -0.03106689453125, 0.00632476806640625, -0.0023441314697265625, -0.036102294921875, 0.003215789794921875, -0.0183868408203125, -0.0243072509765625, -0.028076171875, 0.0289459228515625, -0.0284576416015625, -0.01462554931640625, -0.04644775390625, 0.0021991729736328125, -0.007038116455078125, -0.058563232421875, -0.00577545166015625, 0.0218505859375, 0.0249786376953125, -0.0106964111328125, 0.007022857666015625, 0.04071044921875, 0.0045318603515625, -0.0018720626831054688, -0.005878448486328125, -0.0214080810546875, 0.0120849609375, 0.02276611328125, 0.007007598876953125, 0.0140533447265625, 0.0004978179931640625, 0.01922607421875, 0.008270263671875, -0.027313232421875, 0.016693115234375, -0.0214385986328125, 0.0293731689453125, 0.003498077392578125, -0.0028667449951171875, 0.047607421875, -0.0084991455078125, -0.010772705078125, 0.04400634765625, 0.0009479522705078125, -0.0462646484375, 0.0251922607421875, 0.07257080078125, 0.045867919921875, 0.007358551025390625 ]