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
|
---|---|---|---|---|---|
8450a986d9b53612a1778b7e9cbcfb7c938f7ece
|
Wordpress Stackexchange
Q: Insert a span inside widget title to give a different color to the second word I'm trying to make my widget titles two-colored; the first word white and the second one yellow. I have no idea how I can insert a span before the second word of every widget title so that I can put a color to the span.
A: /**
* Wraps the first half of the provided string inside a span with the class lol_class.
*
* @param string $title The string.
* @return string The modified string.
*/
function wpsa_82312_widget_title($title) {
// Cut the title into two halves.
$halves = explode(' ', $title, 2);
// Throw first word inside a span.
$title = '<span class="lol_class">' . $halves[0] . '</span>';
// Add the remaining words if any.
if (isset($halves[1])) {
$title = $title . ' ' . $halves[1];
}
return $title;
}
// Hook our function into the WordPress system.
add_filter('widget_title', 'wpsa_82312_widget_title');
On a recent project, my client wanted graphical headers for the widgets on her WordPress blog. Unfortunately, widgets are not that easily themed. Nor can you do this in CSS.
|
Q: Insert a span inside widget title to give a different color to the second word I'm trying to make my widget titles two-colored; the first word white and the second one yellow. I have no idea how I can insert a span before the second word of every widget title so that I can put a color to the span.
A: /**
* Wraps the first half of the provided string inside a span with the class lol_class.
*
* @param string $title The string.
* @return string The modified string.
*/
function wpsa_82312_widget_title($title) {
// Cut the title into two halves.
$halves = explode(' ', $title, 2);
// Throw first word inside a span.
$title = '<span class="lol_class">' . $halves[0] . '</span>';
// Add the remaining words if any.
if (isset($halves[1])) {
$title = $title . ' ' . $halves[1];
}
return $title;
}
// Hook our function into the WordPress system.
add_filter('widget_title', 'wpsa_82312_widget_title');
On a recent project, my client wanted graphical headers for the widgets on her WordPress blog. Unfortunately, widgets are not that easily themed. Nor can you do this in CSS.
A: If it is a text widget, it supports HTML tags (like span). You can use span and other tags in the heading of that widget. Just declare the span CSS of that heading tag in your stylesheet/CSS file.
A: For just the page title, edit page.php and replace the_title(); with:
$words = explode(' ', the_title('', '', false));
$words[0] = '<span>'.$words[0].'</span>';
$title = implode(' ', $words);
echo $title;
or for generally all titles (this will add the span around the first word in any title, such as post titles, page titles, and the_title is also used for instance in page lists) -
add something like this to functions.php of your theme:
add_filter('the_title', 'span_first_word');
function span_first_word($title) {
$words = explode(' ', $title);
$words[0] = '<span>'.$words[0].'</span>';
$title = implode(' ', $words);
return $title;
}
|
wordpress
|
{
"language": "en",
"length": 318,
"provenance": "stackexchange_00019.jsonl.gz:428033",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82312"
}
|
[
-0.01238250732421875,
-0.03704833984375,
0.01324462890625,
0.00713348388671875,
-0.03814697265625,
-0.00986480712890625,
0.0095062255859375,
-0.01462554931640625,
-0.021728515625,
0.0171661376953125,
-0.040863037109375,
0.01270294189453125,
-0.0338134765625,
-0.0089874267578125,
0.00885772705078125,
-0.05633544921875,
0.00901031494140625,
-0.01047515869140625,
0.00579071044921875,
-0.007793426513671875,
0.00789642333984375,
-0.02215576171875,
0.0311126708984375,
-0.00897979736328125,
0.021942138671875,
-0.0899658203125,
0.09613037109375,
-0.032135009765625,
0.027496337890625,
-0.042083740234375,
0.045166015625,
-0.006084442138671875,
0.0172119140625,
0.00797271728515625,
-0.014801025390625,
-0.0030651092529296875,
-0.00212860107421875,
-0.0047607421875,
0.006038665771484375,
0.00475311279296875,
0.01177978515625,
0.0087127685546875,
0.0036449432373046875,
0.0003802776336669922,
-0.026123046875,
-0.019012451171875,
0.0209197998046875,
0.001987457275390625,
0.0181732177734375,
-0.041107177734375,
0.01995849609375,
0.012969970703125,
0.044464111328125,
-0.034912109375,
-0.032989501953125,
0.0150299072265625,
-0.025543212890625,
-0.005344390869140625,
0.03253173828125,
0.0022029876708984375,
-0.0014848709106445312,
-0.033660888671875,
0.008331298828125,
-0.0205841064453125,
-0.00003629922866821289,
-0.024749755859375,
0.047760009765625,
0.016357421875,
0.0019502639770507812,
-0.0118865966796875,
0.029266357421875,
0.0206451416015625,
0.005889892578125,
-0.0780029296875,
0.0194549560546875,
0.0654296875,
-0.0333251953125,
-0.0205230712890625,
0.0074310302734375,
-0.0226593017578125,
0.048858642578125,
0.037841796875,
0.06304931640625,
-0.03375244140625,
0.041717529296875,
-0.00865936279296875,
-0.01271820068359375,
-0.0247039794921875,
0.002704620361328125,
-0.0086212158203125,
-0.00762939453125,
0.030914306640625,
0.0053558349609375,
-0.02569580078125,
-0.019683837890625,
-0.05621337890625,
0.006046295166015625,
0.051422119140625,
-0.04266357421875,
0.044097900390625,
-0.0310211181640625,
0.00030803680419921875,
0.043212890625,
-0.054595947265625,
0.0276336669921875,
-0.006069183349609375,
-0.05029296875,
-0.0242767333984375,
0.057647705078125,
0.044952392578125,
-0.0006585121154785156,
0.0292510986328125,
0.032623291015625,
-0.0282135009765625,
-0.033233642578125,
0.00616455078125,
0.0202178955078125,
-0.0024051666259765625,
0.048553466796875,
-0.02569580078125,
-0.01934814453125,
-0.021270751953125,
0.0556640625,
0.027801513671875,
0.0005016326904296875,
0.01538848876953125,
-0.0281829833984375,
-0.0259246826171875,
0.011688232421875,
-0.03375244140625,
-0.026214599609375,
0.038848876953125,
0.059722900390625,
0.030853271484375,
0.0145721435546875,
0.0015039443969726562,
0.0217132568359375,
0.000732421875,
0.00687408447265625,
-0.000028073787689208984,
0.004119873046875,
-0.000339508056640625,
0.051513671875,
-0.01068115234375,
0.00789642333984375,
0.0218353271484375,
-0.00740814208984375,
-0.00904083251953125,
0.017425537109375,
-0.0406494140625,
0.033355712890625,
-0.0755615234375,
0.01507568359375,
0.01617431640625,
-0.046173095703125,
-0.016937255859375,
-0.0210113525390625,
-0.0167083740234375,
0.011077880859375,
-0.0268096923828125,
-0.01861572265625,
-0.0101318359375,
0.01316070556640625,
-0.05029296875,
-0.03863525390625,
0.006374359130859375,
-0.003833770751953125,
0.007488250732421875,
0.01485443115234375,
0.00919342041015625,
-0.0184478759765625,
0.06512451171875,
-0.0028705596923828125,
0.018402099609375,
0.00887298583984375,
-0.0174102783203125,
0.01146697998046875,
-0.0007557868957519531,
0.0243072509765625,
0.0170135498046875,
-0.0433349609375,
-0.036346435546875,
0.0584716796875,
-0.049896240234375,
-0.0092926025390625,
-0.0223388671875,
0.0191650390625,
0.05426025390625,
0.01509857177734375,
0.041900634765625,
-0.030731201171875,
-0.043853759765625,
0.0026531219482421875,
-0.0347900390625,
-0.016510009765625,
-0.023284912109375,
0.0234375,
-0.0007610321044921875,
-0.01218414306640625,
0.0322265625,
0.0216522216796875,
0.0005950927734375,
0.0226593017578125,
0.010528564453125,
-0.0272064208984375,
0.0199432373046875,
-0.0277557373046875,
0.0265655517578125,
0.002162933349609375,
-0.00716400146484375,
0.005405426025390625,
-0.005260467529296875,
0.0110931396484375,
-0.059295654296875,
-0.030853271484375,
-0.0157928466796875,
0.035614013671875,
0.055084228515625,
0.0179443359375,
-0.0078277587890625,
0.06268310546875,
-0.0138092041015625,
0.052520751953125,
0.06341552734375,
0.0816650390625,
-0.0158843994140625,
-0.01128387451171875,
-0.037261962890625,
0.07037353515625,
0.00365447998046875,
-0.034149169921875,
0.041656494140625,
0.0306243896484375,
0.026123046875,
-0.02606201171875,
-0.0009169578552246094,
0.0213470458984375,
-0.0364990234375,
-0.0012311935424804688,
0.036407470703125,
0.033905029296875,
0.00786590576171875,
0.02099609375,
0.032073974609375,
0.06427001953125,
-0.038818359375,
0.006381988525390625,
-0.0081024169921875,
0.038421630859375,
0.0657958984375,
-0.0222625732421875,
-0.026611328125,
0.034271240234375,
-0.07916259765625,
0.01123809814453125,
0.037506103515625,
-0.00009679794311523438,
0.021942138671875,
-0.00998687744140625,
-0.00183868408203125,
-0.00899505615234375,
-0.02191162109375,
-0.006000518798828125,
-0.0258636474609375,
0.05462646484375,
-0.0164031982421875,
0.04364013671875,
0.03741455078125,
-0.01202392578125,
-0.010223388671875,
0.01239776611328125,
0.01042938232421875,
0.01049041748046875,
0.005512237548828125,
0.0276031494140625,
0.00970458984375,
-0.004566192626953125,
-0.004543304443359375,
-0.0187530517578125,
0.00067138671875,
0.0182647705078125,
0.0792236328125,
-0.018829345703125,
-0.0156402587890625,
-0.03668212890625,
-0.09112548828125,
-0.0224609375,
0.0303955078125,
0.02276611328125,
-0.01125335693359375,
-0.0079498291015625,
0.054931640625,
-0.007724761962890625,
0.0765380859375,
0.00928497314453125,
-0.007442474365234375,
0.0157928466796875,
0.003276824951171875,
-0.0003249645233154297,
-0.00849151611328125,
0.022125244140625,
0.044158935546875,
0.01454925537109375,
-0.028106689453125,
-0.01446533203125,
-0.005680084228515625,
-0.014434814453125,
-0.01036834716796875,
-0.0150299072265625,
-0.01078033447265625,
-0.028106689453125,
0.06585693359375,
0.0360107421875,
0.08721923828125,
0.0033245086669921875,
-0.034027099609375,
0.0135345458984375,
0.049072265625,
-0.028900146484375,
-0.07659912109375,
0.03564453125,
-0.05316162109375,
-0.022003173828125,
0.034759521484375,
-0.03936767578125,
-0.015716552734375,
0.0697021484375,
-0.0184173583984375,
-0.050933837890625,
-0.0265350341796875,
-0.02386474609375,
-0.042999267578125,
-0.029754638671875,
0.0308837890625,
-0.00994110107421875,
-0.0187225341796875,
0.0186920166015625,
0.0121917724609375,
0.03179931640625,
-0.0167388916015625,
0.054107666015625,
0.056854248046875,
-0.0177459716796875,
0.007656097412109375,
0.00241851806640625,
0.00023174285888671875,
-0.03289794921875,
0.021087646484375,
0.0093536376953125,
-0.0041351318359375,
-0.00872039794921875,
-0.00982666015625,
0.0200958251953125,
0.021392822265625,
0.01971435546875,
0.00868988037109375,
-0.0053863525390625,
0.051422119140625,
0.005374908447265625,
-0.020111083984375,
-0.007061004638671875,
0.0096282958984375,
-0.0232391357421875,
-0.019622802734375,
-0.006862640380859375,
-0.0208282470703125,
-0.00514984130859375,
-0.0101318359375,
-0.0235748291015625,
-0.015838623046875,
-0.034393310546875,
-0.045257568359375,
0.06005859375,
0.0179290771484375,
0.00940704345703125,
0.03228759765625,
-0.0374755859375,
-0.0277099609375,
0.0120086669921875,
-0.03179931640625,
0.0295867919921875,
-0.0357666015625,
0.063720703125,
-0.047027587890625,
0.01329803466796875,
-0.0038585662841796875,
-0.0655517578125,
0.05487060546875,
-0.026947021484375,
0.01189422607421875,
-0.009246826171875,
0.0262603759765625,
-0.12451171875,
-0.0132904052734375,
0.0180511474609375,
0.055572509765625,
-0.05157470703125,
-0.11492919921875,
-0.048858642578125,
-0.025299072265625,
-0.12371826171875,
0.0194549560546875,
-0.01055145263671875,
-0.0216217041015625,
-0.031982421875,
0.044403076171875,
-0.07196044921875,
-0.043548583984375,
0.00643157958984375,
0.020538330078125,
0.00421142578125,
-0.005092620849609375,
-0.0140228271484375,
-0.00370025634765625,
0.00855255126953125,
-0.0308837890625,
-0.044769287109375,
0.011138916015625,
-0.031158447265625,
0.023834228515625,
0.002593994140625,
-0.0011472702026367188,
-0.0155487060546875,
0.026458740234375,
-0.006900787353515625,
0.01116943359375,
-0.0129852294921875,
0.0063018798828125,
-0.01715087890625,
0.0159759521484375,
-0.03167724609375,
-0.0038585662841796875,
0.0062103271484375,
0.001781463623046875,
-0.0648193359375,
0.019775390625,
0.01325225830078125,
0.04296875,
0.05780029296875,
-0.040069580078125,
-0.01471710205078125,
-0.0302581787109375,
0.022003173828125,
0.020263671875,
0.007228851318359375,
0.0160675048828125,
-0.028045654296875,
-0.01019287109375,
-0.0003910064697265625,
0.0202789306640625,
-0.0243682861328125,
0.00783538818359375,
0.0239105224609375,
0.01451873779296875,
-0.025970458984375,
0.01837158203125,
-0.028411865234375,
0.038482666015625,
-0.01277923583984375,
-0.0196990966796875,
-0.00490570068359375,
-0.0574951171875,
0.03936767578125,
-0.0014677047729492188,
0.01462554931640625,
-0.00756072998046875,
0.041107177734375,
0.017547607421875,
-0.04290771484375,
0.0308074951171875,
0.022857666015625,
-0.048583984375,
0.0050201416015625,
0.0029697418212890625,
0.035491943359375,
0.022674560546875,
-0.0075531005859375,
0.012969970703125,
-0.03289794921875,
-0.009124755859375,
0.0032558441162109375,
0.00038313865661621094,
-0.013458251953125,
0.0011148452758789062,
0.01099395751953125,
0.01279449462890625,
-0.061187744140625,
-0.0380859375,
0.0016040802001953125,
0.0240325927734375,
-0.007366180419921875,
-0.01041412353515625,
0.0181121826171875,
-0.004638671875,
-0.03851318359375,
0.022369384765625,
-0.01007843017578125,
0.06524658203125,
0.015777587890625,
-0.044952392578125,
-0.001293182373046875,
0.0012311935424804688,
0.0164031982421875,
-0.00843048095703125,
0.051971435546875,
-0.00238800048828125,
0.01152801513671875,
0.0064697265625,
0.003047943115234375,
0.06695556640625,
0.0230865478515625,
0.006107330322265625,
-0.017669677734375,
0.03564453125,
-0.029449462890625,
0.0038509368896484375,
0.0264892578125,
0.05889892578125,
-0.02154541015625,
-0.03948974609375,
0.01108551025390625,
-0.036865234375,
0.05499267578125,
-0.00027251243591308594,
-0.033905029296875,
0.029693603515625,
0.007732391357421875,
0.0236358642578125,
-0.03472900390625,
0.0224151611328125,
0.0247650146484375,
0.00827789306640625,
-0.018218994140625,
-0.0504150390625,
0.02996826171875,
-0.0090789794921875,
0.007518768310546875,
0.00260162353515625,
0.03668212890625,
0.01540374755859375,
0.0029296875,
0.00797271728515625,
0.0210418701171875,
0.0049285888671875,
0.0111083984375,
-0.033172607421875,
-0.055755615234375,
-0.02032470703125,
-0.005123138427734375,
0.01322174072265625,
-0.01500701904296875,
-0.038238525390625,
-0.0426025390625,
-0.0286865234375,
-0.008331298828125,
-0.0016727447509765625,
-0.0018262863159179688,
-0.005794525146484375,
-0.034759521484375,
-0.01123046875,
-0.035797119140625,
0.06097412109375,
-0.059112548828125,
0.01276397705078125,
-0.06182861328125,
0.01087188720703125,
0.029022216796875,
0.041412353515625,
-0.041900634765625,
-0.0013780593872070312,
-0.02911376953125,
-0.00948333740234375,
-0.043243408203125,
-0.061309814453125,
-0.029754638671875,
-0.0191497802734375,
0.047576904296875,
0.036224365234375,
0.001148223876953125,
-0.05712890625,
-0.01503753662109375,
0.007434844970703125,
0.041015625,
0.06158447265625,
-0.056884765625,
0.056915283203125,
0.02886962890625,
0.07061767578125,
-0.021392822265625,
0.0189208984375,
0.00237274169921875,
-0.018218994140625,
0.01363372802734375,
-0.01418304443359375,
-0.0015106201171875,
-0.0248260498046875,
0.017059326171875,
0.0014982223510742188,
0.0447998046875,
-0.00449371337890625,
0.028106689453125,
-0.008453369140625,
0.0150909423828125,
0.007022857666015625,
-0.034149169921875,
-0.006793975830078125,
-0.030364990234375,
0.0810546875,
-0.0204315185546875,
0.00007265806198120117,
-0.0190582275390625,
-0.0209503173828125,
0.0043487548828125,
0.0101165771484375,
0.007297515869140625,
0.0153350830078125,
-0.035919189453125,
-0.003643035888671875,
0.000507354736328125,
-0.0015869140625,
0.02520751953125,
-0.01971435546875,
0.0386962890625,
0.0192718505859375,
-0.0330810546875,
-0.0089111328125,
0.0311279296875,
0.051025390625,
-0.022064208984375,
-0.0106658935546875,
0.033966064453125,
-0.02606201171875,
0.004974365234375,
0.0207061767578125,
0.027069091796875,
-0.023101806640625,
-0.0019197463989257812,
-0.01177215576171875,
-0.0249786376953125,
0.04315185546875,
0.018951416015625,
0.0086517333984375,
0.0018835067749023438,
0.06610107421875,
0.01560211181640625,
0.0262603759765625,
0.06524658203125,
0.002105712890625,
-0.0086669921875,
-0.0300445556640625,
-0.004901885986328125,
0.006969451904296875,
-0.05340576171875,
0.005001068115234375,
0.0207366943359375,
-0.001445770263671875,
0.0091705322265625,
-0.0052032470703125,
0.042724609375,
-0.031829833984375,
-0.0648193359375,
0.0116729736328125,
-0.007266998291015625,
-0.06640625,
0.021942138671875,
0.025115966796875,
0.0675048828125,
0.0311279296875,
0.0206451416015625,
-0.0223388671875,
0.004673004150390625,
0.0290374755859375,
0.0214691162109375,
0.029632568359375,
-0.0016832351684570312,
0.0139923095703125,
0.0035228729248046875,
-0.00782012939453125,
-0.0310516357421875,
0.0297393798828125,
-0.006771087646484375,
0.00920867919921875,
0.048919677734375,
-0.0246734619140625,
-0.0118560791015625,
0.041351318359375,
0.00981903076171875,
0.00044465065002441406,
-0.005359649658203125,
0.002590179443359375,
-0.055999755859375,
-0.0159454345703125,
-0.0003886222839355469,
-0.041473388671875,
0.003177642822265625,
-0.01222991943359375,
-0.03564453125,
0.099853515625,
0.0129852294921875,
0.011474609375,
0.041412353515625,
0.03826904296875,
-0.064697265625,
0.007549285888671875,
-0.0133209228515625,
-0.006099700927734375,
-0.033416748046875,
-0.017242431640625,
-0.01325225830078125,
0.01036834716796875,
-0.03363037109375,
0.02105712890625,
-0.00911712646484375,
-0.0193023681640625,
0.0203704833984375,
-0.032745361328125,
0.0076141357421875,
0.058563232421875,
0.006191253662109375,
-0.023834228515625,
0.004322052001953125,
-0.0164642333984375,
-0.01412200927734375,
0.04791259765625,
0.044769287109375,
-0.0253448486328125,
-0.06256103515625,
0.0237884521484375,
0.01519012451171875,
0.0085296630859375,
0.007572174072265625,
-0.004913330078125,
-0.037200927734375,
0.0003178119659423828,
0.028228759765625,
-0.0218963623046875,
-0.011993408203125,
0.0712890625,
0.001911163330078125,
0.023040771484375,
-0.04150390625,
-0.0391845703125,
0.021697998046875,
0.0054473876953125,
0.0178375244140625,
0.034149169921875,
0.01490020751953125,
0.0267791748046875,
0.0130157470703125,
0.005931854248046875,
0.01264190673828125,
0.004608154296875,
0.0198974609375,
0.01221466064453125,
0.03338623046875,
-0.0041046142578125,
0.0008764266967773438,
0.0201873779296875,
0.026275634765625,
-0.0173187255859375,
0.007770538330078125,
0.024932861328125,
0.01508331298828125,
-0.02337646484375,
-0.0146942138671875,
0.0112152099609375,
-0.053863525390625,
-0.00909423828125,
-0.0199432373046875,
-0.0226593017578125,
-0.0031986236572265625,
0.020050048828125,
-0.005096435546875,
0.0020236968994140625,
0.018402099609375,
-0.020233154296875,
-0.0634765625,
0.04278564453125,
0.0185089111328125,
0.0682373046875,
-0.00984954833984375,
0.08111572265625,
-0.02239990234375,
-0.044677734375,
0.01442718505859375,
0.026336669921875,
0.044158935546875,
-0.034576416015625,
-0.01025390625,
-0.04815673828125,
0.061309814453125,
0.01380157470703125,
-0.0007152557373046875,
0.015228271484375,
0.044097900390625,
0.03790283203125,
-0.00836181640625,
-0.0171051025390625,
-0.041107177734375,
-0.01557159423828125,
0.040679931640625,
-0.055450439453125,
0.03863525390625,
-0.0072784423828125,
-0.0229339599609375,
-0.014739990234375,
0.0234832763671875,
0.0150146484375,
-0.0268707275390625,
0.003955841064453125,
-0.0002703666687011719,
0.02740478515625,
0.03814697265625,
-0.0036602020263671875,
-0.0228118896484375,
-0.0105438232421875,
-0.1361083984375,
-0.020111083984375,
-0.01427459716796875,
-0.059356689453125,
0.0345458984375,
0.048614501953125,
-0.049407958984375,
0.0037059783935546875,
-0.015899658203125,
-0.01012420654296875,
0.01018524169921875,
-0.01282501220703125,
0.0257415771484375,
0.0172882080078125,
-0.00069427490234375,
0.007610321044921875,
-0.027984619140625,
-0.0102996826171875,
-0.00640869140625,
0.030853271484375,
0.055084228515625,
-0.0178985595703125,
0.041656494140625,
0.048065185546875,
0.00274658203125,
0.0015134811401367188,
-0.00445556640625,
-0.0258941650390625,
0.04071044921875,
-0.02423095703125,
0.0026683807373046875,
-0.0151214599609375,
-0.02593994140625,
-0.0014142990112304688,
0.0308837890625,
-0.00868988037109375,
0.00652313232421875,
-0.032806396484375,
0.0170745849609375,
-0.012298583984375,
0.060943603515625,
-0.01161956787109375,
-0.00719451904296875,
-0.060882568359375,
-0.04620361328125,
0.05712890625,
0.0187530517578125,
-0.01226043701171875,
0.059600830078125,
0.013214111328125,
0.008941650390625,
0.018646240234375,
-0.0411376953125,
0.0257720947265625,
0.033355712890625,
-0.0321044921875,
-0.0225982666015625,
0.0107574462890625,
-0.0046539306640625,
-0.00894927978515625,
0.02734375,
0.0191497802734375,
0.011871337890625,
-0.00173187255859375,
0.023590087890625,
0.0157470703125,
0.0113372802734375,
-0.021820068359375,
0.005298614501953125,
0.0333251953125,
-0.0226898193359375,
-0.017852783203125,
-0.0211181640625,
-0.0270843505859375,
-0.04388427734375,
-0.004711151123046875,
0.030914306640625,
-0.00905609130859375,
-0.014373779296875,
-0.042144775390625,
-0.0196990966796875,
0.019866943359375,
0.005016326904296875,
0.00099945068359375,
-0.0151824951171875,
-0.0307464599609375,
-0.021026611328125,
0.01392364501953125,
-0.0426025390625,
0.0029315948486328125,
0.014190673828125,
-0.039093017578125,
-0.0465087890625,
-0.0576171875,
0.005184173583984375,
-0.048797607421875,
-0.0141143798828125,
-0.003803253173828125,
-0.0007114410400390625,
0.0438232421875,
-0.02239990234375,
0.018463134765625,
0.01557159423828125,
0.0011577606201171875,
-0.004688262939453125,
0.0285797119140625,
-0.001369476318359375,
-0.024810791015625,
-0.0841064453125,
0.0049896240234375,
-0.07354736328125,
0.021148681640625,
0.056640625,
-0.07513427734375,
-0.061981201171875,
-0.060821533203125,
-0.0396728515625,
0.083984375,
0.04296875,
-0.0179443359375,
-0.0018968582153320312,
-0.02423095703125,
-0.016510009765625,
-0.00901031494140625,
-0.0041351318359375,
-0.021331787109375,
-0.011444091796875,
0.0241851806640625,
0.017974853515625,
0.0242919921875,
0.0093231201171875,
0.020111083984375,
-0.0611572265625,
0.0159149169921875,
-0.01296234130859375,
-0.0031681060791015625,
-0.044158935546875,
0.02825927734375,
-0.04022216796875,
0.00576019287109375,
-0.0308380126953125,
-0.0284271240234375,
-0.0014982223510742188,
0.038787841796875,
0.0086822509765625,
-0.04559326171875,
-0.0112762451171875,
-0.012908935546875,
0.0017080307006835938,
0.01497650146484375,
-0.007366180419921875,
-0.0187835693359375,
-0.0203399658203125,
0.01482391357421875,
0.03680419921875,
0.01227569580078125,
-0.0221405029296875,
-0.0236358642578125,
0.0028514862060546875,
-0.00975799560546875,
-0.00970458984375,
0.03131103515625,
0.005855560302734375,
-0.0167694091796875,
-0.007122039794921875,
0.0211029052734375,
0.007720947265625,
-0.0810546875,
-0.0123291015625,
0.08453369140625,
-0.042724609375,
0.035186767578125,
-0.017974853515625,
0.0245208740234375,
0.061431884765625,
-0.022216796875,
-0.03021240234375,
-0.04046630859375,
-0.0069732666015625,
0.03326416015625,
-0.00919342041015625,
0.03350830078125,
-0.040679931640625,
-0.0104827880859375,
-0.0355224609375,
-0.0267791748046875,
0.0182037353515625,
-0.0648193359375,
-0.021209716796875,
-0.00034546852111816406,
0.002048492431640625,
0.054931640625,
-0.001583099365234375,
0.04425048828125,
-0.00841522216796875,
0.035491943359375,
0.0029239654541015625,
-0.0184478759765625,
0.0174560546875,
-0.01125335693359375,
0.0168914794921875,
0.041839599609375,
0.0254364013671875,
-0.0221710205078125,
0.0013132095336914062,
0.005992889404296875,
0.0284576416015625,
-0.0096588134765625
] |
6f795cbff1d6635ad27afe12cdd05ebafebd9103
|
Wordpress Stackexchange
Q: How to remove the Theme Customization Button from the dashboard and themes options page? In my Wordpress theme that I've currently been building I do not take advantage of the Wordpress Theme Customization API. As much as I would like too, I've invested far too much time into my own personal theme options framework for changing things.
This leads me to my question. How do I remove the blue, "Customize Your Site" button from the dashboard as well as link shown when viewing Appearance > Themes? I did some Googling, but my Google-Fu failed and couldn't find a solution that didn't use CSS or Javascript.
Ideally a hook to remove it would be best. But if there is no clean way to do so, a JS and or CSS solution would be fine.
A: With the lastest version of WordPress (4.3) you can now natively remove the customizer's theme switch setting without resorting to CSS hacks.
/**
* Remove customizer options.
*
* @since 1.0.0
* @param object $wp_customize
*/
function ja_remove_customizer_options( $wp_customize ) {
//$wp_customize->remove_section( 'static_front_page' );
//$wp_customize->remove_section( 'title_tagline' );
//$wp_customize->remove_section( 'nav' );
$wp_customize->remove_section( 'themes' );
}
add_action( 'customize_register', 'ja_remove_customizer_options', 30 );
|
Q: How to remove the Theme Customization Button from the dashboard and themes options page? In my Wordpress theme that I've currently been building I do not take advantage of the Wordpress Theme Customization API. As much as I would like too, I've invested far too much time into my own personal theme options framework for changing things.
This leads me to my question. How do I remove the blue, "Customize Your Site" button from the dashboard as well as link shown when viewing Appearance > Themes? I did some Googling, but my Google-Fu failed and couldn't find a solution that didn't use CSS or Javascript.
Ideally a hook to remove it would be best. But if there is no clean way to do so, a JS and or CSS solution would be fine.
A: With the lastest version of WordPress (4.3) you can now natively remove the customizer's theme switch setting without resorting to CSS hacks.
/**
* Remove customizer options.
*
* @since 1.0.0
* @param object $wp_customize
*/
function ja_remove_customizer_options( $wp_customize ) {
//$wp_customize->remove_section( 'static_front_page' );
//$wp_customize->remove_section( 'title_tagline' );
//$wp_customize->remove_section( 'nav' );
$wp_customize->remove_section( 'themes' );
}
add_action( 'customize_register', 'ja_remove_customizer_options', 30 );
A: In the latest version of WordPress, the themes section is a panel, so it must be removed as follows:
add_action( 'customize_register', 'prefix_remove_customizer_options', 30 );
/**
* Remove customizer options.
*
* @since 1.0.0
* @param object $wp_customize The current WordPress customizer object.
*/
function prefix_remove_customizer_options( $wp_customize ) {
$wp_customize->remove_panel( 'themes' );
}
A: This will fully remove the menu option:
add_action('admin_menu', function () {
global $submenu;
foreach ($submenu as $name => $items) {
if ($name === 'themes.php') {
foreach ($items as $i => $data) {
if (in_array('customize', $data, true)) {
unset($submenu[$name][$i]);
return;
}
}
}
}
});
Other answers don't remove it if you are on another subpage + you hover themes menu (you'll see it in submenus)
A: There are no hooks to that part of the Dashboard.
It has to be done with CSS (or jQuery if you want to convert it in another thing).
add_action( 'admin_head-index.php', 'hide_customize_button_wpse_82424' );
function hide_customize_button_wpse_82424(){
?>
<style type="text/css">div.welcome-panel-column:first-child {display:none;} </style>
<?php
}
[update]
As pointed by @helenhousandi in a comment:
the wp_welcome_panel() function is added on the welcome_panel hook, but no, there are (purposefully) no hooks inside that function.
So, another approach is to remove the action hook and recreate the wp_welcome_panel() function, like so:
add_action( 'load-index.php', 'remove_welcome_panel' );
function remove_welcome_panel()
{
remove_action( 'welcome_panel', 'wp_welcome_panel' );
add_action( 'welcome_panel', 'my_welcome_panel' );
}
And my_welcome_panel is a replica of wp_welcome_panel() adapted as one wishes.
Please, also note her observation: my emphasis
I would suggest against having a publicly distributed theme remove it, though, because a user may come to expect that it's there. We found in user testing that many new users returned to that welcome panel even after getting acquainted.
A: You need to Pass the following code at function.php
function theme_option_remove( $wp_customize ) {
$wp_customize->remove_section("themes");
}
add_action( 'customize_register', 'theme_option_remove' ,20 );
|
wordpress
|
{
"language": "en",
"length": 494,
"provenance": "stackexchange_00019.jsonl.gz:428071",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82424"
}
|
[
0.0106658935546875,
0.0006814002990722656,
-0.002140045166015625,
0.00237274169921875,
0.021270751953125,
-0.0246429443359375,
0.04327392578125,
-0.0400390625,
-0.050384521484375,
0.0192718505859375,
0.06024169921875,
-0.00606536865234375,
-0.06500244140625,
-0.04180908203125,
-0.01050567626953125,
-0.047271728515625,
0.021270751953125,
0.007183074951171875,
0.048797607421875,
-0.00350189208984375,
0.01522064208984375,
0.001178741455078125,
0.055419921875,
0.053497314453125,
0.0218505859375,
-0.0183868408203125,
0.0214996337890625,
-0.003726959228515625,
0.01038360595703125,
-0.01149749755859375,
0.0193328857421875,
-0.005443572998046875,
-0.01523590087890625,
0.045135498046875,
0.01311492919921875,
0.0102081298828125,
-0.0057525634765625,
0.0309600830078125,
0.0416259765625,
-0.00441741943359375,
0.030914306640625,
-0.018218994140625,
-0.01137542724609375,
0.01479339599609375,
-0.029205322265625,
-0.0087127685546875,
0.02008056640625,
-0.030792236328125,
0.0199127197265625,
-0.036773681640625,
-0.004421234130859375,
-0.004657745361328125,
0.01922607421875,
-0.0489501953125,
-0.040252685546875,
-0.06488037109375,
-0.0015230178833007812,
0.002346038818359375,
0.021270751953125,
0.0467529296875,
-0.0069732666015625,
0.021942138671875,
-0.015594482421875,
-0.053924560546875,
0.00850677490234375,
0.00930023193359375,
-0.0247955322265625,
0.01053619384765625,
-0.04473876953125,
0.0217437744140625,
0.02642822265625,
-0.060882568359375,
0.00307464599609375,
-0.021636962890625,
-0.005550384521484375,
0.01007080078125,
-0.03656005859375,
-0.014801025390625,
0.056427001953125,
-0.01593017578125,
0.03485107421875,
-0.00858306884765625,
-0.00879669189453125,
-0.0252838134765625,
0.048553466796875,
0.006237030029296875,
0.00600433349609375,
-0.0160064697265625,
-0.0195770263671875,
-0.031463623046875,
-0.007617950439453125,
-0.050384521484375,
-0.0239410400390625,
0.0237274169921875,
0.004451751708984375,
-0.0130615234375,
0.01128387451171875,
0.0323486328125,
-0.01512908935546875,
-0.0010852813720703125,
-0.003879547119140625,
-0.0274505615234375,
0.02679443359375,
-0.0301971435546875,
0.01439666748046875,
0.01078033447265625,
-0.0017566680908203125,
0.0205078125,
0.051513671875,
0.0272674560546875,
-0.0048675537109375,
0.001544952392578125,
-0.015960693359375,
-0.029052734375,
-0.039703369140625,
0.0023937225341796875,
-0.034027099609375,
-0.01385498046875,
0.0154571533203125,
-0.0232391357421875,
-0.01406097412109375,
-0.003204345703125,
-0.01537322998046875,
-0.017059326171875,
0.0068817138671875,
-0.0196990966796875,
-0.03460693359375,
0.01456451416015625,
-0.0006804466247558594,
-0.0133209228515625,
-0.050384521484375,
-0.005889892578125,
0.08837890625,
0.08612060546875,
0.062103271484375,
-0.0323486328125,
0.0389404296875,
-0.027099609375,
0.01157379150390625,
0.022003173828125,
0.0267333984375,
-0.0384521484375,
-0.02642822265625,
-0.0005788803100585938,
0.01189422607421875,
-0.0094146728515625,
0.01904296875,
0.0241546630859375,
0.0109405517578125,
-0.04638671875,
0.043426513671875,
-0.00473785400390625,
0.037994384765625,
0.034454345703125,
-0.0181732177734375,
-0.0032749176025390625,
0.049163818359375,
-0.031402587890625,
-0.029083251953125,
-0.06103515625,
-0.00690460205078125,
-0.016754150390625,
-0.005580902099609375,
0.0159454345703125,
-0.01070404052734375,
0.0279388427734375,
0.015167236328125,
0.006923675537109375,
0.00821685791015625,
0.0161895751953125,
-0.009429931640625,
-0.0170745849609375,
0.0297393798828125,
0.018951416015625,
0.0003676414489746094,
0.0218963623046875,
0.00220489501953125,
0.016937255859375,
-0.0033626556396484375,
0.05059814453125,
0.01190185546875,
-0.03155517578125,
0.020263671875,
-0.0034618377685546875,
-0.07275390625,
0.0272674560546875,
0.032318115234375,
0.08038330078125,
-0.004486083984375,
0.0193328857421875,
0.10186767578125,
0.00801849365234375,
0.0014162063598632812,
0.0253143310546875,
0.0053558349609375,
-0.0268402099609375,
-0.041900634765625,
0.00421905517578125,
-0.0247802734375,
-0.00296783447265625,
0.0017547607421875,
0.0148162841796875,
0.02154541015625,
-0.0075836181640625,
-0.06292724609375,
0.030029296875,
-0.035186767578125,
0.05267333984375,
-0.020904541015625,
-0.0128936767578125,
0.028076171875,
-0.0254669189453125,
-0.0295867919921875,
0.01058197021484375,
-0.0289154052734375,
0.002490997314453125,
-0.0188140869140625,
0.0200958251953125,
0.01029205322265625,
0.05224609375,
0.03240966796875,
-0.01006317138671875,
0.01369476318359375,
0.0095672607421875,
0.09088134765625,
-0.0036029815673828125,
-0.0225677490234375,
-0.051116943359375,
0.06793212890625,
-0.017181396484375,
-0.029449462890625,
0.07574462890625,
0.04876708984375,
0.00981903076171875,
-0.023040771484375,
0.017578125,
0.03900146484375,
-0.056671142578125,
-0.0142974853515625,
0.042327880859375,
0.03350830078125,
0.019256591796875,
-0.016876220703125,
0.0001970529556274414,
0.0091400146484375,
-0.0188140869140625,
0.0170745849609375,
-0.007610321044921875,
0.0255889892578125,
0.02191162109375,
0.0148468017578125,
-0.0122833251953125,
0.0249176025390625,
0.0146331787109375,
0.0408935546875,
0.00972747802734375,
-0.04638671875,
-0.0438232421875,
0.019622802734375,
0.0010528564453125,
0.0088653564453125,
-0.011138916015625,
-0.0013637542724609375,
-0.018646240234375,
0.057220458984375,
-0.0022830963134765625,
0.039215087890625,
0.035614013671875,
-0.039764404296875,
-0.01207733154296875,
0.0258941650390625,
0.04229736328125,
-0.017333984375,
0.0273284912109375,
0.013641357421875,
0.0065155029296875,
-0.041717529296875,
0.00506591796875,
-0.016937255859375,
0.0186309814453125,
-0.0171966552734375,
0.01177978515625,
-0.005474090576171875,
-0.010711669921875,
0.0236053466796875,
-0.0543212890625,
-0.004718780517578125,
-0.0195770263671875,
-0.0152740478515625,
-0.007328033447265625,
-0.0072784423828125,
0.0498046875,
-0.0241241455078125,
0.038238525390625,
0.0172119140625,
0.0016069412231445312,
0.0007710456848144531,
-0.029510498046875,
0.018035888671875,
0.002899169921875,
0.032470703125,
0.0755615234375,
0.0299224853515625,
-0.000591278076171875,
0.0182647705078125,
-0.0223846435546875,
0.03717041015625,
-0.0088043212890625,
0.00888824462890625,
0.0212554931640625,
-0.045928955078125,
0.05426025390625,
0.019073486328125,
-0.007541656494140625,
0.01178741455078125,
-0.018310546875,
-0.007190704345703125,
0.0183868408203125,
-0.07171630859375,
-0.06280517578125,
0.034912109375,
-0.0217132568359375,
-0.035003662109375,
0.002880096435546875,
-0.03424072265625,
-0.0031948089599609375,
0.0211029052734375,
-0.018310546875,
0.004146575927734375,
-0.0218963623046875,
-0.02862548828125,
-0.017669677734375,
-0.043853759765625,
-0.03118896484375,
-0.0032291412353515625,
0.0006289482116699219,
0.018310546875,
0.063232421875,
0.01235198974609375,
-0.04541015625,
0.039703369140625,
-0.011871337890625,
-0.0111541748046875,
0.037445068359375,
0.040863037109375,
-0.023101806640625,
0.023345947265625,
0.00897979736328125,
0.02252197265625,
0.033721923828125,
-0.028533935546875,
-0.03253173828125,
-0.029754638671875,
-0.01551055908203125,
-0.044708251953125,
0.0543212890625,
0.0638427734375,
-0.05462646484375,
-0.026458740234375,
-0.07110595703125,
-0.0257568359375,
0.00185394287109375,
-0.03460693359375,
0.0299835205078125,
-0.0007891654968261719,
-0.014251708984375,
0.03411865234375,
0.00836181640625,
0.05145263671875,
-0.01153564453125,
-0.02178955078125,
0.0208587646484375,
0.047637939453125,
0.0226287841796875,
0.05108642578125,
-0.032257080078125,
0.01152801513671875,
-0.0408935546875,
0.03277587890625,
0.00630950927734375,
-0.0111846923828125,
0.0063629150390625,
-0.05712890625,
-0.007354736328125,
-0.04107666015625,
0.0411376953125,
-0.0177764892578125,
0.0086212158203125,
0.01383209228515625,
-0.00804901123046875,
0.037567138671875,
0.077392578125,
-0.06683349609375,
0.0023670196533203125,
-0.006229400634765625,
-0.0218658447265625,
0.00235748291015625,
-0.00098419189453125,
-0.08233642578125,
-0.021270751953125,
-0.1627197265625,
-0.0152740478515625,
-0.0207977294921875,
-0.059173583984375,
-0.037872314453125,
0.01513671875,
-0.1181640625,
-0.049713134765625,
0.0300750732421875,
0.019287109375,
-0.0163726806640625,
0.00618743896484375,
-0.0162811279296875,
-0.0196533203125,
-0.01023101806640625,
0.0115814208984375,
-0.040130615234375,
-0.00772857666015625,
-0.0164031982421875,
0.0026721954345703125,
0.0010805130004882812,
0.01499176025390625,
-0.01461029052734375,
0.0255584716796875,
0.024627685546875,
-0.0227508544921875,
0.007965087890625,
-0.007808685302734375,
0.0035495758056640625,
0.0207672119140625,
-0.010162353515625,
-0.00569915771484375,
0.01445770263671875,
0.020843505859375,
-0.0299072265625,
0.05462646484375,
-0.024139404296875,
0.0236663818359375,
0.025665283203125,
-0.04351806640625,
-0.0496826171875,
-0.01175689697265625,
-0.032958984375,
-0.02166748046875,
-0.032958984375,
0.0169525146484375,
-0.002277374267578125,
-0.0509033203125,
0.052276611328125,
-0.0031337738037109375,
-0.00879669189453125,
-0.01024627685546875,
0.05694580078125,
0.0179901123046875,
-0.0350341796875,
0.00597381591796875,
-0.02044677734375,
0.0225830078125,
-0.0184326171875,
0.0244598388671875,
-0.003238677978515625,
-0.020538330078125,
0.052154541015625,
-0.0181884765625,
-0.0071868896484375,
-0.0191192626953125,
0.04949951171875,
-0.011810302734375,
-0.0338134765625,
0.0151214599609375,
-0.033447265625,
0.0162200927734375,
0.00873565673828125,
0.01514434814453125,
0.0015268325805664062,
0.022430419921875,
-0.01184844970703125,
0.0194549560546875,
-0.05078125,
0.0005354881286621094,
-0.033203125,
0.0207977294921875,
0.02374267578125,
0.02130126953125,
-0.0037441253662109375,
0.016265869140625,
-0.0003399848937988281,
-0.01493072509765625,
0.0022869110107421875,
-0.014404296875,
0.006519317626953125,
-0.057281494140625,
0.0296783447265625,
-0.01837158203125,
-0.020355224609375,
0.0165557861328125,
0.00905609130859375,
0.007785797119140625,
-0.0138092041015625,
-0.041778564453125,
-0.064453125,
0.004520416259765625,
0.032196044921875,
-0.00955963134765625,
0.00543975830078125,
0.060272216796875,
0.00665283203125,
-0.0091094970703125,
-0.0232391357421875,
-0.0220489501953125,
-0.009307861328125,
-0.05889892578125,
0.02166748046875,
0.009429931640625,
-0.01371002197265625,
0.0191497802734375,
0.0102691650390625,
0.03497314453125,
-0.0041656494140625,
-0.0279541015625,
-0.00823974609375,
-0.0026302337646484375,
0.03131103515625,
-0.010162353515625,
0.00823974609375,
0.027801513671875,
-0.00930023193359375,
0.05035400390625,
-0.037139892578125,
-0.027069091796875,
0.0305328369140625,
0.037445068359375,
0.0028972625732421875,
-0.011016845703125,
-0.001010894775390625,
0.0124359130859375,
-0.035552978515625,
0.06024169921875,
-0.00878143310546875,
-0.08013916015625,
-0.0279083251953125,
0.041168212890625,
0.02874755859375,
-0.0071563720703125,
0.00988006591796875,
0.01100921630859375,
-0.0041961669921875,
-0.01319122314453125,
0.037261962890625,
-0.0285186767578125,
-0.034393310546875,
-0.01788330078125,
-0.025909423828125,
0.022735595703125,
0.0155029296875,
-0.1103515625,
-0.0902099609375,
0.00847625732421875,
-0.00981903076171875,
0.049835205078125,
0.005596160888671875,
0.01177978515625,
-0.044219970703125,
0.0097503662109375,
-0.0137481689453125,
0.0035495758056640625,
0.030792236328125,
-0.020111083984375,
-0.055816650390625,
0.010101318359375,
-0.0276336669921875,
0.0108489990234375,
-0.0105133056640625,
-0.06207275390625,
-0.05224609375,
-0.021270751953125,
0.0027141571044921875,
0.0015354156494140625,
-0.007572174072265625,
-0.001049041748046875,
-0.0299530029296875,
0.04449462890625,
0.0318603515625,
0.057891845703125,
-0.00896453857421875,
0.027618408203125,
-0.004436492919921875,
0.0164642333984375,
0.00043892860412597656,
0.0103912353515625,
0.01381683349609375,
-0.019989013671875,
0.0228424072265625,
0.0024738311767578125,
-0.027099609375,
-0.03411865234375,
-0.007259368896484375,
0.01166534423828125,
0.06854248046875,
-0.0201873779296875,
0.0121307373046875,
-0.034210205078125,
0.015960693359375,
-0.03106689453125,
0.01271820068359375,
-0.042877197265625,
-0.025970458984375,
0.028778076171875,
-0.0155181884765625,
-0.0026874542236328125,
0.00011134147644042969,
0.003978729248046875,
-0.0059661865234375,
-0.0057830810546875,
0.001575469970703125,
-0.0197601318359375,
-0.058563232421875,
0.0694580078125,
0.066650390625,
0.01244354248046875,
0.048919677734375,
-0.0006351470947265625,
0.0120391845703125,
-0.0027141571044921875,
0.01517486572265625,
-0.03985595703125,
0.0119476318359375,
0.018310546875,
0.0167999267578125,
0.0062255859375,
0.0250396728515625,
0.003055572509765625,
0.0230255126953125,
0.04388427734375,
0.061737060546875,
-0.0784912109375,
0.01454925537109375,
0.0199737548828125,
0.0250091552734375,
0.07958984375,
-0.00695037841796875,
-0.00661468505859375,
-0.0245819091796875,
0.01038360595703125,
0.01422882080078125,
-0.01120758056640625,
0.01175689697265625,
0.00742340087890625,
0.0016956329345703125,
-0.0109710693359375,
0.054229736328125,
0.0096893310546875,
-0.0455322265625,
-0.0010890960693359375,
0.0263519287109375,
-0.024505615234375,
-0.01355743408203125,
0.0003521442413330078,
-0.000850677490234375,
-0.046905517578125,
-0.096435546875,
-0.031341552734375,
-0.008392333984375,
-0.0309600830078125,
0.02325439453125,
-0.038970947265625,
0.002452850341796875,
0.04364013671875,
-0.049652099609375,
0.031097412109375,
-0.003971099853515625,
-0.0092315673828125,
0.00627899169921875,
-0.0262298583984375,
0.03125,
0.004917144775390625,
-0.08294677734375,
0.023895263671875,
-0.032135009765625,
-0.0182647705078125,
-0.0145263671875,
0.020660400390625,
0.121826171875,
-0.0628662109375,
-0.0216217041015625,
0.0203704833984375,
0.007534027099609375,
-0.019744873046875,
-0.03619384765625,
0.0233917236328125,
-0.06524658203125,
-0.02899169921875,
-0.0140380859375,
-0.0266876220703125,
0.0129547119140625,
-0.0183563232421875,
-0.081787109375,
0.1082763671875,
0.0164794921875,
0.042266845703125,
-0.02386474609375,
0.051788330078125,
-0.014862060546875,
0.0210418701171875,
0.00496673583984375,
0.03924560546875,
0.051116943359375,
-0.0002598762512207031,
0.037841796875,
0.0010824203491210938,
0.01383209228515625,
0.0239715576171875,
0.017913818359375,
0.0023021697998046875,
0.054656982421875,
0.00608062744140625,
0.0254058837890625,
0.044769287109375,
-0.01617431640625,
-0.0205078125,
-0.01494598388671875,
0.0014982223510742188,
-0.013763427734375,
-0.03985595703125,
0.01386260986328125,
-0.02752685546875,
-0.03179931640625,
0.01018524169921875,
0.0201873779296875,
0.0176849365234375,
0.0207061767578125,
0.06878662109375,
-0.0304412841796875,
0.0129241943359375,
0.033203125,
0.005855560302734375,
-0.0198516845703125,
0.0181732177734375,
-0.0191192626953125,
-0.0285491943359375,
0.0147857666015625,
-0.031829833984375,
0.02447509765625,
0.01375579833984375,
0.03155517578125,
-0.067626953125,
0.0120086669921875,
-0.0291900634765625,
-0.04510498046875,
-0.002285003662109375,
0.0631103515625,
-0.096435546875,
0.037811279296875,
0.018463134765625,
0.048553466796875,
-0.01517486572265625,
-0.031829833984375,
-0.0027446746826171875,
0.045135498046875,
-0.0019378662109375,
-0.053985595703125,
0.0186614990234375,
-0.004276275634765625,
-0.004383087158203125,
-0.01480865478515625,
-0.0017795562744140625,
-0.06103515625,
-0.00952911376953125,
-0.044647216796875,
0.0240478515625,
0.0374755859375,
0.029388427734375,
-0.00691986083984375,
0.031494140625,
-0.07452392578125,
-0.00008535385131835938,
-0.02130126953125,
-0.008880615234375,
-0.0025272369384765625,
0.021697998046875,
0.030792236328125,
0.0246734619140625,
-0.006450653076171875,
-0.01207733154296875,
-0.019775390625,
0.0250091552734375,
-0.0199737548828125,
0.0272979736328125,
-0.07696533203125,
-0.04327392578125,
-0.029022216796875,
0.04730224609375,
0.03143310546875,
-0.0379638671875,
0.01177215576171875,
0.046539306640625,
0.037445068359375,
-0.002681732177734375,
0.00823974609375,
0.02203369140625,
-0.0185699462890625,
-0.01157379150390625,
0.0009284019470214844,
0.01316070556640625,
0.00724029541015625,
0.0092315673828125,
0.028564453125,
0.033355712890625,
-0.02691650390625,
-0.0126495361328125,
0.004215240478515625,
-0.0272369384765625,
0.0161285400390625,
0.03558349609375,
0.002643585205078125,
0.015411376953125,
-0.0195465087890625,
0.000576019287109375,
-0.023651123046875,
-0.02728271484375,
-0.004390716552734375,
0.0224151611328125,
-0.0250396728515625,
0.03900146484375,
-0.0299835205078125,
-0.0141754150390625,
0.01462554931640625,
-0.0090484619140625,
-0.0250396728515625,
-0.0002753734588623047,
0.02655029296875,
-0.0235595703125,
-0.07275390625,
-0.042938232421875,
-0.0241851806640625,
0.053497314453125,
-0.004337310791015625,
0.050048828125,
-0.00670623779296875,
0.029449462890625,
-0.0228424072265625,
0.0158538818359375,
-0.022003173828125,
-0.005840301513671875,
0.01422882080078125,
0.015045166015625,
0.00007075071334838867,
-0.027740478515625,
-0.07513427734375,
0.0264892578125,
0.03192138671875,
-0.0128326416015625,
0.032623291015625,
0.003368377685546875,
0.007251739501953125,
-0.0202178955078125,
-0.01181793212890625,
-0.0256195068359375,
0.0002512931823730469,
-0.0168609619140625,
-0.00555419921875,
0.02166748046875,
-0.012847900390625,
-0.018157958984375,
0.0118255615234375,
0.031982421875,
0.0211334228515625,
0.021759033203125,
0.03485107421875,
0.0277862548828125,
0.035736083984375,
-0.0311126708984375,
-0.036407470703125,
0.0187835693359375,
-0.00598907470703125,
0.01233673095703125,
0.0083465576171875,
0.0271148681640625,
0.0303955078125,
-0.0270538330078125,
0.0020313262939453125,
0.03375244140625,
0.0355224609375,
-0.01324462890625,
-0.002155303955078125,
0.037353515625,
-0.0042266845703125,
-0.0287322998046875,
-0.0071868896484375,
-0.016937255859375,
-0.048126220703125,
-0.005710601806640625,
0.03924560546875,
-0.039031982421875,
-0.00894927978515625,
-0.08880615234375,
0.0278167724609375,
0.03155517578125,
0.0012731552124023438,
-0.07275390625,
0.0537109375,
-0.048309326171875,
0.054473876953125,
-0.0241546630859375,
0.00534820556640625,
-0.0277252197265625,
-0.0213165283203125,
-0.0011491775512695312,
-0.012420654296875,
-0.0288543701171875,
0.054656982421875,
0.0194091796875,
-0.0161895751953125,
-0.006557464599609375,
0.0250396728515625,
0.0033397674560546875,
-0.0030994415283203125,
-0.03765869140625,
0.052581787109375,
-0.0328369140625,
-0.0201568603515625,
0.021728515625,
-0.0016641616821289062,
-0.00823974609375,
-0.056549072265625,
-0.0257415771484375,
-0.02935791015625,
0.01690673828125,
0.001434326171875,
-0.021148681640625,
-0.014923095703125,
-0.041717529296875,
-0.070068359375,
0.03271484375,
-0.00284576416015625,
-0.042022705078125,
0.005237579345703125,
0.022308349609375,
0.00027561187744140625,
-0.028717041015625,
0.003814697265625,
-0.021636962890625,
0.009490966796875,
-0.0005116462707519531,
0.023834228515625,
0.0501708984375,
-0.01385498046875,
0.0120849609375,
-0.0313720703125,
0.05242919921875,
0.0243988037109375,
0.03302001953125,
-0.0166778564453125,
0.004695892333984375,
0.0154266357421875,
0.033477783203125,
-0.0283966064453125,
-0.01114654541015625,
0.00469207763671875,
0.0100860595703125,
0.0109100341796875,
-0.0318603515625,
-0.0016775131225585938,
-0.014984130859375,
0.0105438232421875,
0.01568603515625,
-0.006031036376953125,
0.001415252685546875,
-0.006298065185546875,
-0.0097198486328125,
0.024322509765625,
-0.0244598388671875,
0.00913238525390625,
-0.06353759765625,
-0.038543701171875,
0.0179901123046875,
-0.01204681396484375,
-0.0177154541015625,
-0.006557464599609375,
-0.049102783203125,
-0.017852783203125,
-0.033935546875,
0.013824462890625,
-0.07049560546875,
0.0078277587890625,
-0.01003265380859375,
-0.01366424560546875,
0.011810302734375,
-0.029998779296875,
0.0229034423828125,
0.005100250244140625,
0.02203369140625,
-0.008697509765625,
-0.0286102294921875,
-0.0153656005859375,
0.04254150390625,
-0.022613525390625,
0.06976318359375,
-0.06646728515625,
-0.0213470458984375,
-0.002910614013671875,
0.006534576416015625,
-0.0033588409423828125,
-0.0024967193603515625,
-0.012725830078125,
0.034210205078125,
-0.007770538330078125,
0.0226593017578125,
0.0173492431640625,
0.0445556640625,
-0.010833740234375,
0.047149658203125,
-0.003173828125,
-0.0238189697265625,
-0.0013332366943359375,
-0.0095977783203125,
0.0064849853515625,
-0.0079803466796875,
0.021453857421875,
-0.04998779296875,
0.0295257568359375,
0.00731658935546875,
-0.000690460205078125,
0.0396728515625
] |
4de921088558aab32be510fb97eb61bf56e10791
|
Wordpress Stackexchange
Q: Is there any central control/access panel for several WordPress sites? We have many WordPress sites on different hosts with different domain names.
Is there any solution for accessing all posts and settings with a central management tool?
It's been very hard for us to open 10 sites in 10 tabs and set one desired
configuration in all of them.
I know that WordPress has a version for Multisite, but this is this useful for multi site on one domain? Or can we use it to host different sites on one host?
A: For remote management of many installations of WordPress, I know of two options, one paid, one free.
ManageWP
ManageWP is a WordPress management console that gives users full power and complete control in managing virtually any number of WordPress sites in the easiest way possible.
InfiniteWP
Manage multiple WordPress installations from a single dashboard using our free self hosted software.
As for WordPress Multisite, two references:
*
*Don’t Use WordPress MultiSite - making the right choice
*and, from the same author, a very fine eBook for when you are going to use MS:
WordPress Multisite 101
|
Q: Is there any central control/access panel for several WordPress sites? We have many WordPress sites on different hosts with different domain names.
Is there any solution for accessing all posts and settings with a central management tool?
It's been very hard for us to open 10 sites in 10 tabs and set one desired
configuration in all of them.
I know that WordPress has a version for Multisite, but this is this useful for multi site on one domain? Or can we use it to host different sites on one host?
A: For remote management of many installations of WordPress, I know of two options, one paid, one free.
ManageWP
ManageWP is a WordPress management console that gives users full power and complete control in managing virtually any number of WordPress sites in the easiest way possible.
InfiniteWP
Manage multiple WordPress installations from a single dashboard using our free self hosted software.
As for WordPress Multisite, two references:
*
*Don’t Use WordPress MultiSite - making the right choice
*and, from the same author, a very fine eBook for when you are going to use MS:
WordPress Multisite 101
|
wordpress
|
{
"language": "en",
"length": 189,
"provenance": "stackexchange_00019.jsonl.gz:428078",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82446"
}
|
[
0.038330078125,
-0.0186309814453125,
0.005725860595703125,
-0.00957489013671875,
-0.00872039794921875,
-0.02490234375,
0.046844482421875,
0.0037899017333984375,
0.008453369140625,
0.0011587142944335938,
-0.01477813720703125,
-0.003681182861328125,
-0.01537322998046875,
-0.0305633544921875,
0.007526397705078125,
-0.028350830078125,
0.0176239013671875,
0.00036072731018066406,
0.00635528564453125,
-0.0009655952453613281,
-0.01093292236328125,
0.006927490234375,
0.0165863037109375,
0.017364501953125,
0.00939178466796875,
-0.007080078125,
0.0026836395263671875,
-0.00885772705078125,
0.0008096694946289062,
-0.016265869140625,
0.01474761962890625,
0.0133209228515625,
0.0279998779296875,
-0.005420684814453125,
-0.0242156982421875,
-0.0196380615234375,
0.0088043212890625,
-0.00974273681640625,
-0.01398468017578125,
0.046173095703125,
-0.0138397216796875,
0.01690673828125,
0.033111572265625,
0.051605224609375,
-0.003997802734375,
-0.047332763671875,
-0.007762908935546875,
-0.0657958984375,
0.005298614501953125,
-0.0266265869140625,
-0.006488800048828125,
-0.006793975830078125,
0.0234375,
-0.0516357421875,
-0.0157012939453125,
-0.022979736328125,
0.0826416015625,
-0.07586669921875,
0.03350830078125,
-0.051116943359375,
-0.057708740234375,
-0.00930023193359375,
0.0343017578125,
-0.01535797119140625,
-0.0007033348083496094,
-0.00965118408203125,
-0.0246429443359375,
0.023284912109375,
-0.031829833984375,
0.0052337646484375,
0.0307159423828125,
-0.0242156982421875,
0.0237274169921875,
-0.00716400146484375,
0.034027099609375,
-0.019134521484375,
-0.05987548828125,
-0.045135498046875,
0.05560302734375,
0.003292083740234375,
0.0186004638671875,
-0.047515869140625,
-0.049041748046875,
-0.0014896392822265625,
0.0031452178955078125,
0.02569580078125,
0.01468658447265625,
0.0004413127899169922,
-0.028106689453125,
0.0012750625610351562,
-0.0198822021484375,
0.00542449951171875,
-0.076904296875,
0.044219970703125,
0.02264404296875,
0.00095367431640625,
0.030517578125,
-0.00559234619140625,
-0.0078125,
-0.035675048828125,
0.00003224611282348633,
-0.040374755859375,
-0.010589599609375,
0.02203369140625,
-0.0294952392578125,
0.045257568359375,
0.0191650390625,
0.05816650390625,
0.00496673583984375,
0.0287628173828125,
0.005947113037109375,
-0.050567626953125,
0.00868988037109375,
-0.00252532958984375,
-0.017852783203125,
-0.0289154052734375,
-0.0202178955078125,
0.0079803466796875,
-0.01203155517578125,
-0.026947021484375,
-0.02679443359375,
0.01727294921875,
-0.04473876953125,
-0.0041961669921875,
-0.015167236328125,
-0.0246734619140625,
0.00687408447265625,
0.00545501708984375,
-0.035064697265625,
0.0295562744140625,
-0.030853271484375,
-0.01348876953125,
0.032684326171875,
0.04132080078125,
0.01560211181640625,
-0.0308685302734375,
0.0276031494140625,
0.013916015625,
0.01496124267578125,
-0.006534576416015625,
0.02215576171875,
-0.0227813720703125,
-0.0242919921875,
0.0011777877807617188,
-0.009063720703125,
0.0255584716796875,
0.032470703125,
-0.00307464599609375,
-0.032562255859375,
-0.0234527587890625,
-0.0252685546875,
0.00933074951171875,
0.0282135009765625,
0.0013408660888671875,
-0.00363922119140625,
-0.030120849609375,
0.028717041015625,
-0.03472900390625,
-0.002620697021484375,
-0.0289459228515625,
0.0163116455078125,
-0.018829345703125,
0.0245208740234375,
0.002422332763671875,
-0.0185394287109375,
0.01171875,
-0.0419921875,
-0.0011568069458007812,
0.0198211669921875,
-0.0261688232421875,
-0.037811279296875,
-0.0242462158203125,
0.042083740234375,
0.00881195068359375,
0.0006422996520996094,
0.061737060546875,
-0.00395965576171875,
0.0217132568359375,
0.0186920166015625,
0.0121307373046875,
0.01404571533203125,
-0.0172119140625,
0.0712890625,
0.0042877197265625,
-0.052520751953125,
0.033111572265625,
-0.01129913330078125,
0.05230712890625,
0.032958984375,
0.022064208984375,
0.019775390625,
-0.0243988037109375,
-0.0225372314453125,
0.039154052734375,
-0.0264129638671875,
-0.015533447265625,
-0.018829345703125,
0.04168701171875,
-0.0286865234375,
-0.04364013671875,
-0.00365447998046875,
-0.0160980224609375,
0.0174407958984375,
-0.01197052001953125,
-0.00555419921875,
-0.0218963623046875,
-0.0024318695068359375,
0.016357421875,
-0.006622314453125,
-0.0235443115234375,
0.00896453857421875,
-0.009124755859375,
0.0316162109375,
-0.08685302734375,
-0.0582275390625,
0.02056884765625,
-0.01137542724609375,
0.06207275390625,
-0.01055145263671875,
0.0102081298828125,
0.011566162109375,
-0.04693603515625,
0.023651123046875,
0.0295257568359375,
0.049041748046875,
-0.00914764404296875,
-0.0096893310546875,
-0.019287109375,
0.018829345703125,
0.00839996337890625,
-0.02423095703125,
0.00984954833984375,
-0.00004655122756958008,
0.0116424560546875,
-0.0092010498046875,
0.0034809112548828125,
0.004730224609375,
-0.051666259765625,
0.0005841255187988281,
0.0400390625,
0.027313232421875,
0.016448974609375,
-0.0127716064453125,
0.0130157470703125,
-0.010101318359375,
-0.091552734375,
-0.003997802734375,
0.01427459716796875,
0.0018396377563476562,
0.04449462890625,
-0.00461578369140625,
-0.00708770751953125,
0.01544189453125,
-0.0191650390625,
-0.023773193359375,
0.0249786376953125,
-0.0104827880859375,
-0.025543212890625,
-0.01287078857421875,
0.006816864013671875,
0.0005826950073242188,
-0.07220458984375,
-0.0297393798828125,
-0.027130126953125,
0.00948333740234375,
0.00833892822265625,
0.0278167724609375,
0.02838134765625,
0.004894256591796875,
0.00820159912109375,
0.01141357421875,
-0.041473388671875,
-0.00559234619140625,
0.00750732421875,
0.048614501953125,
-0.0155029296875,
-0.033477783203125,
-0.012115478515625,
0.0005311965942382812,
0.002231597900390625,
-0.04351806640625,
0.005401611328125,
-0.08233642578125,
-0.0249481201171875,
-0.0226287841796875,
-0.01435089111328125,
-0.024688720703125,
-0.027862548828125,
0.01233673095703125,
-0.01947021484375,
0.0051116943359375,
-0.014251708984375,
-0.041595458984375,
0.0501708984375,
-0.0214996337890625,
-0.0556640625,
0.0205230712890625,
-0.038604736328125,
0.0303192138671875,
-0.0254669189453125,
0.03350830078125,
0.064453125,
-0.00598907470703125,
0.0126800537109375,
0.0012502670288085938,
0.02740478515625,
0.001861572265625,
0.0068511962890625,
-0.00429534912109375,
0.02886962890625,
-0.0948486328125,
-0.004024505615234375,
-0.01441192626953125,
0.007747650146484375,
-0.05047607421875,
-0.05322265625,
-0.0196380615234375,
-0.0533447265625,
-0.0950927734375,
-0.051483154296875,
-0.03558349609375,
-0.06451416015625,
0.0161895751953125,
-0.01593017578125,
-0.016082763671875,
0.00270843505859375,
0.0202484130859375,
0.0205230712890625,
-0.01514434814453125,
-0.0156097412109375,
-0.0017557144165039062,
-0.03460693359375,
-0.03900146484375,
-0.038909912109375,
0.005870819091796875,
-0.0063934326171875,
-0.004459381103515625,
0.07049560546875,
0.005252838134765625,
-0.0311279296875,
-0.0216217041015625,
0.0025539398193359375,
-0.0249786376953125,
-0.039154052734375,
-0.01525115966796875,
-0.029541015625,
0.035064697265625,
-0.0034351348876953125,
-0.005828857421875,
0.01287841796875,
0.019287109375,
-0.03448486328125,
0.013214111328125,
-0.0070953369140625,
0.01255035400390625,
-0.00473785400390625,
-0.01030731201171875,
-0.01605224609375,
-0.0217132568359375,
-0.06439208984375,
0.001926422119140625,
-0.030609130859375,
-0.031890869140625,
0.01016998291015625,
0.03436279296875,
-0.0155792236328125,
-0.0003566741943359375,
-0.0189361572265625,
0.0340576171875,
0.0144500732421875,
0.0091552734375,
-0.004703521728515625,
0.03399658203125,
-0.0001995563507080078,
0.006656646728515625,
-0.0323486328125,
-0.0187225341796875,
-0.055633544921875,
-0.011993408203125,
-0.0283660888671875,
-0.0543212890625,
-0.04351806640625,
0.0384521484375,
0.0119476318359375,
-0.027191162109375,
0.0263214111328125,
-0.0261383056640625,
0.04205322265625,
-0.0614013671875,
-0.02410888671875,
-0.037872314453125,
0.08203125,
-0.06512451171875,
0.0027523040771484375,
0.04815673828125,
0.0338134765625,
-0.0178680419921875,
-0.050384521484375,
-0.069580078125,
-0.02886962890625,
-0.05511474609375,
-0.0118408203125,
-0.02691650390625,
-0.01580810546875,
-0.0046844482421875,
-0.01364898681640625,
-0.03656005859375,
-0.03857421875,
0.00982666015625,
0.006439208984375,
0.0225677490234375,
-0.0399169921875,
0.028289794921875,
-0.0665283203125,
0.029937744140625,
-0.0361328125,
-0.06524658203125,
-0.0175933837890625,
0.006664276123046875,
0.044189453125,
0.0176849365234375,
-0.036590576171875,
0.016693115234375,
0.049713134765625,
-0.01506805419921875,
0.062103271484375,
-0.045135498046875,
0.007843017578125,
-0.0187225341796875,
-0.0869140625,
-0.0262603759765625,
-0.0401611328125,
-0.020416259765625,
-0.0347900390625,
-0.029541015625,
-0.064697265625,
-0.015838623046875,
-0.04766845703125,
0.018341064453125,
-0.0179595947265625,
-0.0657958984375,
-0.00975799560546875,
-0.01125335693359375,
-0.01953125,
-0.02154541015625,
-0.018951416015625,
0.0022754669189453125,
-0.05194091796875,
0.033905029296875,
-0.0188446044921875,
-0.032745361328125,
0.0220489501953125,
0.046600341796875,
0.01418304443359375,
-0.0142059326171875,
-0.06488037109375,
0.0224609375,
0.028228759765625,
0.023193359375,
0.0308990478515625,
0.00643157958984375,
-0.00983428955078125,
0.0245208740234375,
0.01230621337890625,
0.01264190673828125,
0.01325225830078125,
-0.00640106201171875,
0.0413818359375,
0.01166534423828125,
-0.0269775390625,
0.047943115234375,
0.0052337646484375,
0.036407470703125,
-0.00576019287109375,
-0.0234527587890625,
0.004791259765625,
0.055572509765625,
0.01023101806640625,
-0.039093017578125,
-0.07403564453125,
-0.0219879150390625,
0.0206146240234375,
-0.051727294921875,
0.041748046875,
0.01342010498046875,
0.004543304443359375,
0.017333984375,
0.014068603515625,
-0.015411376953125,
0.0277862548828125,
0.030914306640625,
0.014068603515625,
0.01401519775390625,
0.03363037109375,
-0.013946533203125,
-0.0202789306640625,
-0.008514404296875,
0.08636474609375,
-0.02093505859375,
-0.068359375,
0.021697998046875,
-0.03143310546875,
0.029571533203125,
0.0576171875,
-0.03515625,
0.039306640625,
0.0171051025390625,
-0.05560302734375,
-0.00957489013671875,
-0.01467132568359375,
-0.0474853515625,
-0.0670166015625,
-0.01849365234375,
-0.034912109375,
0.004558563232421875,
0.03802490234375,
0.03350830078125,
-0.03607177734375,
0.050018310546875,
-0.0222930908203125,
0.023956298828125,
0.0357666015625,
-0.0026493072509765625,
-0.0048980712890625,
0.002544403076171875,
0.01514434814453125,
-0.01071929931640625,
0.030792236328125,
-0.0192108154296875,
-0.0222625732421875,
0.0265350341796875,
0.040863037109375,
0.05999755859375,
0.0283050537109375,
-0.046295166015625,
-0.00899505615234375,
-0.0129241943359375,
0.03912353515625,
-0.004894256591796875,
-0.06414794921875,
0.0090179443359375,
0.04180908203125,
0.012847900390625,
-0.04656982421875,
0.015869140625,
-0.03204345703125,
-0.01068878173828125,
-0.01885986328125,
-0.016082763671875,
-0.041717529296875,
-0.002285003662109375,
0.0172576904296875,
0.0142974853515625,
0.00469970703125,
0.01421356201171875,
-0.06549072265625,
-0.0247039794921875,
-0.015960693359375,
-0.00366973876953125,
0.0433349609375,
0.00594329833984375,
0.029632568359375,
-0.0517578125,
0.005588531494140625,
-0.044464111328125,
0.003971099853515625,
0.043182373046875,
0.0162811279296875,
-0.01788330078125,
0.0195465087890625,
-0.0259552001953125,
-0.0222015380859375,
-0.0005145072937011719,
-0.042816162109375,
-0.042755126953125,
-0.01666259765625,
-0.005016326904296875,
-0.0213165283203125,
0.014007568359375,
0.0179901123046875,
-0.024993896484375,
0.052398681640625,
0.014495849609375,
-0.012298583984375,
-0.027069091796875,
0.055023193359375,
0.01128387451171875,
0.042388916015625,
0.0181121826171875,
0.0518798828125,
0.0226898193359375,
-0.032745361328125,
0.028564453125,
-0.04205322265625,
-0.041778564453125,
-0.01259613037109375,
-0.0286102294921875,
0.02850341796875,
0.0213165283203125,
-0.01445770263671875,
0.0294189453125,
-0.0257110595703125,
0.007068634033203125,
-0.0157470703125,
-0.0007228851318359375,
-0.042266845703125,
0.004619598388671875,
0.0234527587890625,
-0.033050537109375,
0.055023193359375,
0.0090179443359375,
-0.01690673828125,
0.039306640625,
-0.032196044921875,
0.036956787109375,
0.03070068359375,
-0.031951904296875,
0.046539306640625,
0.07672119140625,
-0.0025196075439453125,
0.0306854248046875,
0.0302276611328125,
0.002719879150390625,
-0.00717926025390625,
-0.01491546630859375,
0.002132415771484375,
-0.0016918182373046875,
0.01117706298828125,
-0.01029205322265625,
0.036895751953125,
0.00423431396484375,
0.0047607421875,
-0.03436279296875,
0.024383544921875,
0.035064697265625,
-0.0304412841796875,
-0.016571044921875,
0.013763427734375,
0.0027637481689453125,
-0.051177978515625,
-0.009674072265625,
0.00426483154296875,
0.0033283233642578125,
0.03955078125,
-0.01324462890625,
-0.01253509521484375,
0.01270294189453125,
-0.00623321533203125,
-0.0053253173828125,
-0.00039768218994140625,
0.06756591796875,
0.00740814208984375,
-0.018890380859375,
-0.0297698974609375,
0.007534027099609375,
-0.01146697998046875,
0.0005397796630859375,
-0.0171661376953125,
0.0143585205078125,
-0.05059814453125,
-0.0736083984375,
-0.01346588134765625,
-0.0185699462890625,
-0.029632568359375,
-0.00888824462890625,
-0.0091552734375,
-0.03680419921875,
0.04571533203125,
-0.060211181640625,
0.062744140625,
0.005924224853515625,
-0.002552032470703125,
-0.01561737060546875,
-0.0209808349609375,
0.03753662109375,
-0.0018520355224609375,
-0.040771484375,
0.0283660888671875,
-0.022674560546875,
-0.03857421875,
0.00296783447265625,
0.0457763671875,
0.0070037841796875,
-0.00823211669921875,
-0.01044464111328125,
0.0645751953125,
0.01528167724609375,
-0.045928955078125,
0.039276123046875,
-0.0024623870849609375,
-0.071533203125,
-0.08294677734375,
0.029754638671875,
-0.09283447265625,
-0.0005784034729003906,
0.0445556640625,
-0.040985107421875,
0.09564208984375,
-0.01430511474609375,
0.0107421875,
0.034942626953125,
0.0523681640625,
-0.038482666015625,
0.0309295654296875,
-0.0228424072265625,
0.051300048828125,
0.0026073455810546875,
0.028900146484375,
-0.05194091796875,
-0.0010204315185546875,
0.00411224365234375,
0.0233612060546875,
0.032379150390625,
0.003910064697265625,
-0.044708251953125,
-0.019439697265625,
0.02459716796875,
0.01406097412109375,
-0.0007863044738769531,
0.0572509765625,
-0.0182647705078125,
0.00922393798828125,
0.0124053955078125,
-0.0369873046875,
0.03472900390625,
-0.0279541015625,
-0.018646240234375,
-0.004016876220703125,
-0.004955291748046875,
-0.02838134765625,
-0.00806427001953125,
0.0070343017578125,
-0.052886962890625,
0.00600433349609375,
0.02178955078125,
0.0400390625,
-0.0096588134765625,
-0.002105712890625,
-0.01047515869140625,
-0.0189056396484375,
0.05828857421875,
-0.039825439453125,
0.03924560546875,
-0.0202484130859375,
-0.03924560546875,
0.061004638671875,
0.0247802734375,
-0.0474853515625,
0.03082275390625,
-0.0094757080078125,
0.01253509521484375,
0.01861572265625,
-0.0016803741455078125,
-0.00353240966796875,
0.0229339599609375,
-0.048583984375,
-0.0019321441650390625,
0.05645751953125,
0.0139617919921875,
-0.00897216796875,
-0.0517578125,
0.006198883056640625,
0.0123138427734375,
0.01357269287109375,
0.029052734375,
0.0225677490234375,
0.0391845703125,
0.0714111328125,
-0.03460693359375,
0.01200103759765625,
0.0304412841796875,
-0.0145721435546875,
-0.007572174072265625,
0.042022705078125,
-0.0278778076171875,
0.02630615234375,
-0.01091766357421875,
-0.0167388916015625,
-0.01453399658203125,
0.04296875,
0.0110931396484375,
0.07965087890625,
-0.054168701171875,
-0.025970458984375,
-0.0308685302734375,
0.0601806640625,
-0.01399993896484375,
0.032440185546875,
-0.07940673828125,
-0.0806884765625,
0.01512908935546875,
0.056365966796875,
0.042816162109375,
0.01385498046875,
0.05426025390625,
0.0738525390625,
0.0013027191162109375,
0.00733184814453125,
0.06390380859375,
0.0111846923828125,
0.0362548828125,
-0.0170135498046875,
-0.035736083984375,
-0.040252685546875,
-0.053009033203125,
-0.0232086181640625,
0.02197265625,
-0.0144500732421875,
-0.0159149169921875,
0.005168914794921875,
-0.0028171539306640625,
0.0009012222290039062,
0.007793426513671875,
-0.015716552734375,
-0.0241546630859375,
0.0011091232299804688,
-0.0640869140625,
-0.022369384765625,
-0.02264404296875,
0.005218505859375,
0.007694244384765625,
0.0281829833984375,
0.00261688232421875,
0.00615692138671875,
-0.015289306640625,
-0.01287841796875,
0.0234527587890625,
0.003387451171875,
-0.0270233154296875,
-0.0297698974609375,
0.0212860107421875,
-0.038421630859375,
-0.0206146240234375,
-0.0189361572265625,
-0.007228851318359375,
0.050811767578125,
0.0279541015625,
0.0540771484375,
-0.008941650390625,
0.0260009765625,
0.0288238525390625,
-0.00746917724609375,
0.0302734375,
0.006999969482421875,
-0.0162353515625,
0.0058135986328125,
0.0280609130859375,
-0.023773193359375,
-0.021392822265625,
0.03521728515625,
0.0016937255859375,
-0.0290985107421875,
0.006534576416015625,
-0.02288818359375,
0.0130767822265625,
0.02142333984375,
0.0283203125,
-0.0256500244140625,
-0.033599853515625,
-0.059967041015625,
-0.02252197265625,
0.04107666015625,
0.02386474609375,
0.0000928640365600586,
0.048126220703125,
0.0007777214050292969,
0.0128936767578125,
0.00861358642578125,
-0.0274505615234375,
-0.006282806396484375,
0.0198516845703125,
-0.02239990234375,
-0.06707763671875,
0.01311492919921875,
0.00244140625,
-0.05859375,
0.047119140625,
-0.0011091232299804688,
0.01290130615234375,
-0.032379150390625,
-0.0156707763671875,
0.037322998046875,
0.039703369140625,
0.0019969940185546875,
0.027374267578125,
-0.0034198760986328125,
-0.019256591796875,
0.00606536865234375,
-0.025482177734375,
-0.030487060546875,
-0.032928466796875,
-0.0001773834228515625,
0.0091705322265625,
-0.0233001708984375,
-0.0433349609375,
-0.053375244140625,
-0.017120361328125,
0.040374755859375,
-0.0034542083740234375,
-0.02423095703125,
0.0156402587890625,
-0.033843994140625,
-0.006755828857421875,
0.0105743408203125,
-0.040069580078125,
0.0066070556640625,
0.015899658203125,
0.00397491455078125,
-0.0130615234375,
-0.044525146484375,
0.0016069412231445312,
-0.0145721435546875,
0.0176239013671875,
0.0264892578125,
-0.01461029052734375,
0.00873565673828125,
0.004787445068359375,
0.00981903076171875,
0.03924560546875,
-0.033905029296875,
-0.0060577392578125,
0.03765869140625,
-0.039581298828125,
-0.0017871856689453125,
-0.0260162353515625,
-0.01116943359375,
-0.051788330078125,
-0.0009198188781738281,
-0.048065185546875,
0.005001068115234375,
-0.000579833984375,
-0.040863037109375,
-0.03759765625,
0.00122833251953125,
-0.002079010009765625,
-0.0179443359375,
-0.060089111328125,
0.0077056884765625,
-0.00266265869140625,
0.022216796875,
-0.02569580078125,
0.00568389892578125,
-0.02337646484375,
0.0401611328125,
0.0008959770202636719,
0.033843994140625,
-0.014404296875,
0.007083892822265625,
-0.026763916015625,
0.030303955078125,
0.01275634765625,
0.001056671142578125,
0.041015625,
-0.021728515625,
0.03466796875,
0.048583984375,
-0.03192138671875,
-0.055816650390625,
-0.0214996337890625,
-0.044403076171875,
-0.017059326171875,
0.0080108642578125,
-0.06103515625,
-0.027557373046875,
0.0286102294921875,
0.11883544921875,
0.02398681640625,
-0.024383544921875,
-0.02423095703125,
-0.0189208984375,
-0.04150390625,
-0.0159912109375,
0.042877197265625,
-0.08013916015625,
0.002620697021484375,
0.01399993896484375,
-0.04095458984375,
0.01861572265625,
0.011444091796875,
-0.054046630859375,
0.02978515625,
0.008087158203125,
-0.0200958251953125,
-0.038787841796875,
0.0171051025390625,
0.042572021484375,
-0.028594970703125,
-0.01222991943359375,
0.0100250244140625,
-0.0009984970092773438,
0.0010585784912109375,
0.01024627685546875,
-0.0623779296875,
0.018157958984375,
-0.038787841796875,
0.005077362060546875,
-0.035003662109375,
0.04498291015625,
-0.035736083984375,
0.038238525390625,
-0.005527496337890625,
0.0191650390625,
-0.0159759521484375,
0.0248565673828125,
0.0097198486328125,
0.0221099853515625,
0.0031280517578125,
0.039398193359375,
0.00734710693359375,
-0.01068878173828125,
-0.044036865234375,
0.058197021484375,
-0.050201416015625,
-0.00542449951171875,
-0.03265380859375,
-0.0242767333984375,
0.00540924072265625,
0.037078857421875,
-0.000045239925384521484,
-0.0380859375,
0.0223541259765625,
0.033935546875,
0.0191497802734375,
0.0006432533264160156
] |
028caed10e48546bb61452bb804fe77b324a0da9
|
Wordpress Stackexchange
Q: Add whitespace between Chinese and other letters I want to add a space between a Chinese character and a letter or a number to make the article more readable.
For example:
Google与Apple展开的专利大战在2天之前结束。
Google 与 Apple 展开的专利大战在 2 天之前结束。
But add the space manually is a hard work. How can I do it automatically? Maybe with CSS?
A: Interesting question. This could be a useful part of a specific language file. It cannot be done in CSS, because CSS is (mostly) character agnostic. But using a filter and PHP it is possible and on topic:
add_filter( 'the_content', 't5_chinese_spacing' );
function t5_chinese_spacing( $content )
{
return preg_replace(
'~([^\p{Han}]*)(\p{Han}+)([^\p{Han}])~imUxu',
'\1 \2 \3',
$content
);
}
Be aware your internal encoding has to be UTF-8 to make that work. While WordPress works with other encodings too, PHP needs UTF-8 for this. Read WordPress Database Charset and Collation Configuration to make sure everything is set up properly.
Also note I am using PHP’s character class for Han unification here. This is not perfect, some punctuation marks Chinese writers might use are not included.
|
Q: Add whitespace between Chinese and other letters I want to add a space between a Chinese character and a letter or a number to make the article more readable.
For example:
Google与Apple展开的专利大战在2天之前结束。
Google 与 Apple 展开的专利大战在 2 天之前结束。
But add the space manually is a hard work. How can I do it automatically? Maybe with CSS?
A: Interesting question. This could be a useful part of a specific language file. It cannot be done in CSS, because CSS is (mostly) character agnostic. But using a filter and PHP it is possible and on topic:
add_filter( 'the_content', 't5_chinese_spacing' );
function t5_chinese_spacing( $content )
{
return preg_replace(
'~([^\p{Han}]*)(\p{Han}+)([^\p{Han}])~imUxu',
'\1 \2 \3',
$content
);
}
Be aware your internal encoding has to be UTF-8 to make that work. While WordPress works with other encodings too, PHP needs UTF-8 for this. Read WordPress Database Charset and Collation Configuration to make sure everything is set up properly.
Also note I am using PHP’s character class for Han unification here. This is not perfect, some punctuation marks Chinese writers might use are not included.
|
wordpress
|
{
"language": "en",
"length": 179,
"provenance": "stackexchange_00019.jsonl.gz:428079",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82456"
}
|
[
0.0047607421875,
-0.0057220458984375,
-0.01044464111328125,
0.036590576171875,
-0.0034999847412109375,
-0.035491943359375,
0.04058837890625,
-0.027252197265625,
-0.0034542083740234375,
0.0034637451171875,
-0.03472900390625,
0.0018978118896484375,
0.0221405029296875,
-0.024658203125,
0.036834716796875,
-0.00504302978515625,
0.0146942138671875,
-0.04083251953125,
-0.028350830078125,
-0.0191650390625,
0.01255035400390625,
-0.01230621337890625,
-0.0189361572265625,
-0.0074005126953125,
0.002643585205078125,
-0.06365966796875,
0.09765625,
-0.0020389556884765625,
-0.0194549560546875,
-0.03106689453125,
0.01480865478515625,
0.01153564453125,
-0.005161285400390625,
0.037384033203125,
0.0131988525390625,
0.039703369140625,
0.00954437255859375,
0.0275421142578125,
0.0450439453125,
-0.006153106689453125,
0.0168304443359375,
-0.02581787109375,
0.0190582275390625,
0.021881103515625,
-0.005611419677734375,
-0.01207733154296875,
0.00809478759765625,
-0.03436279296875,
0.0158233642578125,
-0.0246124267578125,
0.0311737060546875,
0.01160430908203125,
0.04290771484375,
-0.01019287109375,
-0.0301513671875,
-0.022918701171875,
-0.01187896728515625,
0.036712646484375,
0.01904296875,
0.035186767578125,
-0.018402099609375,
0.0098876953125,
-0.0186309814453125,
-0.056182861328125,
0.002735137939453125,
0.01251220703125,
0.0694580078125,
-0.0034503936767578125,
-0.054962158203125,
-0.028778076171875,
0.0256500244140625,
-0.016326904296875,
-0.0020923614501953125,
-0.04071044921875,
0.016937255859375,
0.037811279296875,
-0.053955078125,
0.00130462646484375,
0.01309967041015625,
0.014739990234375,
0.003997802734375,
0.01366424560546875,
-0.0125885009765625,
-0.0193023681640625,
-0.02203369140625,
-0.0311737060546875,
-0.0114898681640625,
0.001789093017578125,
-0.05157470703125,
-0.0595703125,
-0.02325439453125,
-0.0855712890625,
-0.09033203125,
0.020721435546875,
0.0207977294921875,
-0.06317138671875,
0.002651214599609375,
-0.0004534721374511719,
0.0286865234375,
0.029693603515625,
0.05517578125,
-0.08843994140625,
0.07000732421875,
-0.046661376953125,
0.0010290145874023438,
0.03277587890625,
-0.028472900390625,
0.01291656494140625,
0.04718017578125,
0.045501708984375,
0.01084136962890625,
-0.0011653900146484375,
-0.006999969482421875,
-0.05792236328125,
0.0082855224609375,
0.05572509765625,
0.007190704345703125,
0.015960693359375,
0.0273895263671875,
-0.01953125,
-0.0010223388671875,
0.019195556640625,
-0.0116729736328125,
0.027618408203125,
-0.0241241455078125,
-0.006343841552734375,
0.004199981689453125,
-0.039398193359375,
-0.00574493408203125,
0.01514434814453125,
-0.016357421875,
0.0153961181640625,
0.047637939453125,
0.0186004638671875,
-0.020599365234375,
-0.0189056396484375,
-0.0023632049560546875,
-0.005802154541015625,
-0.01055145263671875,
0.027862548828125,
0.0018301010131835938,
-0.033203125,
0.024383544921875,
0.01470184326171875,
-0.0003266334533691406,
0.043243408203125,
0.03094482421875,
-0.024200439453125,
-0.026275634765625,
-0.0621337890625,
-0.0023250579833984375,
-0.032257080078125,
0.05877685546875,
-0.0151214599609375,
-0.07830810546875,
-0.0137481689453125,
0.007083892822265625,
-0.01082611083984375,
-0.0260162353515625,
-0.0599365234375,
-0.0235595703125,
-0.01934814453125,
0.0182342529296875,
-0.044708251953125,
-0.038787841796875,
-0.00035691261291503906,
-0.0071258544921875,
0.001678466796875,
0.01148223876953125,
-0.0109710693359375,
-0.0401611328125,
0.0560302734375,
0.057464599609375,
-0.006160736083984375,
-0.006679534912109375,
-0.01154327392578125,
0.01617431640625,
-0.0270843505859375,
0.0211029052734375,
0.08221435546875,
0.044586181640625,
0.004180908203125,
0.047332763671875,
0.0033054351806640625,
0.0019550323486328125,
-0.01328277587890625,
0.040374755859375,
0.08428955078125,
-0.014404296875,
0.046722412109375,
-0.041168212890625,
-0.005718231201171875,
-0.054443359375,
0.031524658203125,
-0.013641357421875,
0.002410888671875,
0.0247344970703125,
0.0263214111328125,
-0.003307342529296875,
-0.02130126953125,
0.050018310546875,
-0.0112152099609375,
-0.005641937255859375,
-0.02490234375,
-0.08050537109375,
-0.0026645660400390625,
-0.0206756591796875,
0.0245208740234375,
-0.039794921875,
-0.0162811279296875,
0.0159454345703125,
-0.044403076171875,
0.00612640380859375,
-0.005374908447265625,
-0.008392333984375,
0.007061004638671875,
0.01629638671875,
0.06494140625,
0.019927978515625,
0.03564453125,
0.041168212890625,
-0.01268768310546875,
0.027252197265625,
-0.0093231201171875,
0.01526641845703125,
-0.0254974365234375,
-0.0147552490234375,
-0.0217742919921875,
-0.0225830078125,
-0.01068115234375,
-0.019744873046875,
0.0498046875,
0.10101318359375,
0.063232421875,
-0.0132293701171875,
0.027740478515625,
0.043304443359375,
-0.0241241455078125,
-0.029998779296875,
0.0205078125,
0.046875,
0.03900146484375,
0.006542205810546875,
-0.0447998046875,
0.006290435791015625,
-0.057891845703125,
0.022186279296875,
-0.050567626953125,
-0.01250457763671875,
0.0281829833984375,
0.038482666015625,
0.004871368408203125,
-0.00197601318359375,
-0.04296875,
-0.0027523040771484375,
0.0225982666015625,
-0.040618896484375,
-0.0220489501953125,
-0.022308349609375,
0.00597381591796875,
0.01277923583984375,
-0.04473876953125,
-0.019927978515625,
-0.0284881591796875,
-0.041778564453125,
0.004306793212890625,
-0.0232391357421875,
-0.0230712890625,
-0.01474761962890625,
0.0035686492919921875,
0.0278778076171875,
0.001918792724609375,
0.01068878173828125,
-0.0037689208984375,
-0.1309814453125,
-0.039306640625,
0.01800537109375,
0.0435791015625,
-0.0223541259765625,
-0.03912353515625,
-0.0152130126953125,
0.058868408203125,
0.00823974609375,
-0.0286865234375,
-0.00414276123046875,
0.0218505859375,
-0.0029087066650390625,
-0.0599365234375,
-0.04736328125,
-0.0229644775390625,
0.004795074462890625,
0.02044677734375,
-0.034454345703125,
0.031707763671875,
0.032470703125,
-0.01534271240234375,
-0.0006351470947265625,
0.00649261474609375,
0.02630615234375,
-0.038665771484375,
-0.003368377685546875,
0.039276123046875,
-0.00872802734375,
-0.005023956298828125,
0.005512237548828125,
0.01169586181640625,
-0.00901031494140625,
0.01446533203125,
-0.0023956298828125,
-0.0030841827392578125,
-0.0243072509765625,
0.024627685546875,
0.00791168212890625,
0.004131317138671875,
-0.009765625,
-0.0205535888671875,
-0.0127716064453125,
-0.01396942138671875,
-0.06280517578125,
-0.0697021484375,
0.03515625,
-0.0157012939453125,
-0.04461669921875,
0.04083251953125,
-0.0380859375,
-0.005565643310546875,
0.063720703125,
-0.0182037353515625,
0.01031494140625,
-0.018890380859375,
-0.02703857421875,
-0.03857421875,
-0.0592041015625,
-0.007488250732421875,
0.0222625732421875,
0.005420684814453125,
0.0155487060546875,
-0.00708770751953125,
-0.015289306640625,
-0.00919342041015625,
0.0206298828125,
0.043853759765625,
-0.00432586669921875,
-0.020599365234375,
-0.0244293212890625,
0.00605010986328125,
-0.00562286376953125,
-0.01568603515625,
0.041107177734375,
0.026947021484375,
-0.00971221923828125,
0.0323486328125,
0.0027008056640625,
0.0163726806640625,
0.0012254714965820312,
0.0400390625,
0.0011577606201171875,
0.012054443359375,
0.0148773193359375,
-0.041748046875,
0.0167694091796875,
0.0114288330078125,
0.02191162109375,
0.0173797607421875,
-0.031280517578125,
-0.027191162109375,
-0.021240234375,
0.05908203125,
-0.0131683349609375,
-0.00930023193359375,
0.01995849609375,
-0.0298309326171875,
0.0198822021484375,
-0.0223236083984375,
-0.0245513916015625,
0.005718231201171875,
-0.004039764404296875,
-0.022705078125,
0.062408447265625,
0.00589752197265625,
-0.01364898681640625,
-0.00875091552734375,
0.0022792816162109375,
0.008331298828125,
-0.004364013671875,
0.0243072509765625,
-0.0189361572265625,
0.0538330078125,
-0.024078369140625,
-0.0209808349609375,
-0.0306854248046875,
0.05535888671875,
-0.057342529296875,
-0.0121307373046875,
0.01116180419921875,
0.0226898193359375,
-0.03228759765625,
-0.05242919921875,
-0.0310821533203125,
-0.0293121337890625,
-0.01189422607421875,
-0.007396697998046875,
-0.0072479248046875,
-0.024871826171875,
-0.05194091796875,
-0.0031108856201171875,
-0.044952392578125,
-0.0019121170043945312,
0.017791748046875,
-0.0212554931640625,
-0.017669677734375,
0.0230255126953125,
-0.0055084228515625,
-0.00543212890625,
-0.000316619873046875,
-0.013641357421875,
0.0193939208984375,
0.008148193359375,
-0.04107666015625,
-0.00756072998046875,
0.056549072265625,
-0.0445556640625,
0.0104827880859375,
0.00521087646484375,
-0.01297760009765625,
0.0216827392578125,
0.034576416015625,
0.07318115234375,
-0.002269744873046875,
0.004520416259765625,
0.0386962890625,
-0.035980224609375,
-0.0091094970703125,
0.0241546630859375,
0.00507354736328125,
0.045013427734375,
0.00423431396484375,
-0.0211334228515625,
0.0465087890625,
-0.04815673828125,
-0.03265380859375,
-0.00970458984375,
0.0472412109375,
0.040771484375,
-0.006107330322265625,
0.031280517578125,
-0.0018663406372070312,
-0.0421142578125,
0.021942138671875,
0.024749755859375,
-0.0167083740234375,
0.0159454345703125,
-0.0070648193359375,
0.007587432861328125,
-0.041595458984375,
-0.0304412841796875,
0.00943756103515625,
0.0235748291015625,
-0.0017328262329101562,
0.0306854248046875,
0.0191650390625,
-0.00873565673828125,
0.0187225341796875,
0.0126495361328125,
0.0002510547637939453,
0.0017108917236328125,
0.01552581787109375,
0.006984710693359375,
-0.02020263671875,
0.0146331787109375,
-0.00211334228515625,
-0.002338409423828125,
0.04254150390625,
0.010345458984375,
-0.00710296630859375,
0.02825927734375,
0.0207977294921875,
-0.028076171875,
0.00894927978515625,
0.0026531219482421875,
0.0069732666015625,
0.007427215576171875,
-0.042236328125,
0.049041748046875,
0.036834716796875,
0.0011129379272460938,
-0.007503509521484375,
0.0024700164794921875,
-0.034576416015625,
0.0012693405151367188,
-0.0092926025390625,
-0.003879547119140625,
0.0256805419921875,
-0.059967041015625,
-0.0504150390625,
-0.0033588409423828125,
-0.005603790283203125,
0.044677734375,
0.04669189453125,
-0.010528564453125,
-0.015838623046875,
0.0364990234375,
0.0039825439453125,
-0.046783447265625,
0.03741455078125,
0.0050811767578125,
0.01605224609375,
-0.00021719932556152344,
0.02166748046875,
0.078369140625,
-0.02667236328125,
-0.01024627685546875,
0.0270233154296875,
0.0251007080078125,
-0.0218048095703125,
-0.00428009033203125,
0.03973388671875,
0.0297393798828125,
-0.00395965576171875,
-0.0101318359375,
-0.006450653076171875,
-0.01494598388671875,
0.0760498046875,
0.032196044921875,
-0.07794189453125,
-0.026702880859375,
0.08709716796875,
-0.03375244140625,
-0.005977630615234375,
-0.0122833251953125,
-0.002841949462890625,
-0.0005984306335449219,
-0.00397491455078125,
0.025238037109375,
0.045440673828125,
0.0137939453125,
-0.004032135009765625,
0.00897216796875,
0.0179443359375,
0.006649017333984375,
-0.0240631103515625,
-0.0295562744140625,
0.019775390625,
0.0014600753784179688,
-0.0144805908203125,
0.01433563232421875,
-0.0202178955078125,
0.030181884765625,
0.0516357421875,
0.0092620849609375,
-0.009002685546875,
-0.037994384765625,
-0.012542724609375,
-0.0121307373046875,
-0.019439697265625,
-0.0042266845703125,
-0.0060272216796875,
0.004192352294921875,
-0.0146636962890625,
0.002655029296875,
-0.0390625,
0.0171356201171875,
-0.00482177734375,
0.0181427001953125,
-0.004756927490234375,
0.0265960693359375,
0.003955841064453125,
-0.00740814208984375,
-0.01611328125,
-0.00836181640625,
-0.05596923828125,
-0.034881591796875,
-0.0265960693359375,
0.0018377304077148438,
-0.0192718505859375,
0.0133819580078125,
0.0401611328125,
0.0042724609375,
-0.01010894775390625,
-0.0777587890625,
-0.02886962890625,
0.043426513671875,
0.09716796875,
0.047119140625,
-0.0301055908203125,
0.048431396484375,
-0.0017366409301757812,
0.0256500244140625,
-0.0014019012451171875,
0.06976318359375,
0.0684814453125,
-0.0279083251953125,
0.031982421875,
-0.0192718505859375,
-0.032012939453125,
-0.031829833984375,
0.0219573974609375,
0.0054473876953125,
0.032012939453125,
0.0026569366455078125,
0.0233917236328125,
-0.01629638671875,
0.01212310791015625,
-0.01434326171875,
0.026397705078125,
-0.0535888671875,
-0.0220184326171875,
0.0178680419921875,
0.0236968994140625,
0.07373046875,
-0.0445556640625,
-0.0221710205078125,
0.03790283203125,
0.003078460693359375,
0.06707763671875,
-0.021148681640625,
0.019683837890625,
-0.007129669189453125,
0.0107879638671875,
0.020599365234375,
0.0218048095703125,
0.01023101806640625,
0.022064208984375,
-0.0506591796875,
-0.037933349609375,
-0.0498046875,
0.0379638671875,
0.01953125,
-0.018218994140625,
0.0205230712890625,
0.03399658203125,
0.0012788772583007812,
0.006618499755859375,
0.0899658203125,
0.049774169921875,
-0.08428955078125,
-0.0149688720703125,
-0.0218505859375,
-0.0438232421875,
0.014129638671875,
0.045867919921875,
0.000022113323211669922,
0.00699615478515625,
-0.0007734298706054688,
-0.057830810546875,
0.0010099411010742188,
0.03466796875,
-0.001903533935546875,
0.0063934326171875,
-0.0044708251953125,
0.008758544921875,
-0.0007424354553222656,
0.0035648345947265625,
-0.01470184326171875,
-0.00843048095703125,
0.0197601318359375,
-0.005710601806640625,
-0.0005478858947753906,
0.0172882080078125,
-0.0254974365234375,
-0.044281005859375,
0.01364898681640625,
-0.031951904296875,
-0.00131988525390625,
-0.013275146484375,
-0.005641937255859375,
0.02520751953125,
0.04180908203125,
-0.005115509033203125,
-0.036163330078125,
0.028839111328125,
-0.0153656005859375,
0.0284271240234375,
-0.0234527587890625,
0.01873779296875,
0.01371002197265625,
-0.0155181884765625,
0.0003707408905029297,
0.007328033447265625,
-0.02264404296875,
0.02142333984375,
0.01096343994140625,
0.003475189208984375,
-0.004596710205078125,
-0.0209197998046875,
0.033721923828125,
-0.033538818359375,
0.01300048828125,
0.024078369140625,
0.025909423828125,
-0.075439453125,
-0.062744140625,
0.036376953125,
-0.07562255859375,
0.0041351318359375,
0.0283966064453125,
-0.05242919921875,
0.052276611328125,
0.01511383056640625,
0.006679534912109375,
0.032073974609375,
0.018768310546875,
-0.06890869140625,
-0.047210693359375,
-0.0157470703125,
0.0401611328125,
-0.0222015380859375,
0.028045654296875,
-0.048187255859375,
-0.0265350341796875,
0.01184844970703125,
0.056884765625,
0.0021076202392578125,
-0.009796142578125,
0.0053253173828125,
0.0087432861328125,
0.04034423828125,
0.0234832763671875,
0.01146697998046875,
0.009979248046875,
0.0098876953125,
0.0045013427734375,
0.03619384765625,
-0.00991058349609375,
0.037109375,
-0.027496337890625,
-0.006298065185546875,
0.01214599609375,
-0.0006928443908691406,
-0.0271759033203125,
0.01435089111328125,
0.00992584228515625,
-0.0251312255859375,
0.01428985595703125,
0.00417327880859375,
0.00284576416015625,
0.00814056396484375,
0.0267181396484375,
0.002384185791015625,
-0.03912353515625,
-0.04193115234375,
-0.026702880859375,
0.028900146484375,
-0.0248260498046875,
0.08917236328125,
0.021392822265625,
0.032073974609375,
0.016143798828125,
-0.01114654541015625,
0.059967041015625,
0.018035888671875,
-0.06671142578125,
-0.0102386474609375,
0.041534423828125,
0.04144287109375,
0.039093017578125,
0.005084991455078125,
0.00899505615234375,
0.0017595291137695312,
-0.00731658935546875,
-0.035614013671875,
0.0001863241195678711,
-0.00676727294921875,
0.0176239013671875,
-0.00376129150390625,
0.00909423828125,
-0.017486572265625,
0.0020198822021484375,
-0.0271453857421875,
-0.006450653076171875,
0.022247314453125,
0.015533447265625,
0.0160064697265625,
0.04034423828125,
-0.04022216796875,
-0.00934600830078125,
-0.0474853515625,
-0.0013980865478515625,
0.0250244140625,
0.06292724609375,
0.0160675048828125,
0.062286376953125,
0.0248870849609375,
-0.023956298828125,
0.0289154052734375,
0.0006976127624511719,
0.0255126953125,
-0.064697265625,
0.03955078125,
-0.0189361572265625,
-0.00586700439453125,
0.0036563873291015625,
-0.0222015380859375,
-0.01306915283203125,
0.05462646484375,
0.0477294921875,
-0.0787353515625,
-0.0254974365234375,
0.005283355712890625,
-0.0242156982421875,
0.023956298828125,
-0.01430511474609375,
0.051971435546875,
0.040252685546875,
0.01398468017578125,
-0.043701171875,
0.0277557373046875,
0.05914306640625,
0.012481689453125,
0.02777099609375,
0.01580810546875,
0.0007481575012207031,
0.0047760009765625,
0.005168914794921875,
0.027862548828125,
0.0307159423828125,
-0.02496337890625,
-0.0127105712890625,
0.0209808349609375,
-0.0452880859375,
-0.0006952285766601562,
0.029052734375,
-0.0170745849609375,
0.02978515625,
0.0589599609375,
-0.0188751220703125,
-0.00899505615234375,
0.022064208984375,
0.032440185546875,
0.0345458984375,
0.033660888671875,
0.04937744140625,
-0.03204345703125,
-0.0251922607421875,
-0.01331329345703125,
0.057464599609375,
0.004444122314453125,
0.01715087890625,
-0.0034885406494140625,
0.039459228515625,
-0.0195159912109375,
-0.0343017578125,
0.0024967193603515625,
-0.023406982421875,
0.0287628173828125,
0.00475311279296875,
-0.0217742919921875,
-0.0177764892578125,
0.02752685546875,
0.038330078125,
0.021209716796875,
-0.038665771484375,
0.00344085693359375,
-0.014068603515625,
-0.0031147003173828125,
-0.01482391357421875,
-0.0196380615234375,
-0.035308837890625,
-0.06591796875,
-0.037384033203125,
0.0179595947265625,
0.0083770751953125,
0.01514434814453125,
-0.042449951171875,
0.04681396484375,
-0.038970947265625,
-0.025177001953125,
0.04052734375,
-0.061065673828125,
0.0264434814453125,
0.0156707763671875,
-0.048309326171875,
-0.026092529296875,
-0.0229644775390625,
-0.040679931640625,
-0.0126800537109375,
0.00928497314453125,
0.00951385498046875,
-0.0181884765625,
-0.002338409423828125,
-0.00540924072265625,
0.06549072265625,
0.0377197265625,
-0.004070281982421875,
0.0283966064453125,
0.022003173828125,
-0.00015735626220703125,
0.0038013458251953125,
0.0192413330078125,
0.011474609375,
0.0081024169921875,
-0.010101318359375,
0.01415252685546875,
0.0250701904296875,
0.042449951171875,
0.0067291259765625,
-0.0206298828125,
0.00007170438766479492,
-0.005603790283203125,
-0.0066986083984375,
-0.0034465789794921875,
-0.007228851318359375,
-0.0029201507568359375,
-0.0181427001953125,
-0.0002837181091308594,
-0.01270294189453125,
0.0106658935546875,
-0.06195068359375,
-0.08203125,
-0.029144287109375,
0.053680419921875,
-0.083984375,
0.0165557861328125,
0.06292724609375,
-0.01904296875,
-0.065185546875,
0.01064300537109375,
0.01806640625,
0.03955078125,
-0.0193634033203125,
-0.0194549560546875,
0.045379638671875,
-0.04278564453125,
-0.017913818359375,
-0.0406494140625,
0.00893402099609375,
-0.08062744140625,
-0.0140533447265625,
-0.02886962890625,
0.0221099853515625,
0.021240234375,
-0.040252685546875,
-0.05181884765625,
-0.07427978515625,
0.0178375244140625,
-0.039947509765625,
-0.01236724853515625,
0.00453948974609375,
-0.0109710693359375,
0.00978851318359375,
0.000009834766387939453,
-0.009490966796875,
0.005489349365234375,
0.0214996337890625,
-0.01561737060546875,
0.058319091796875,
0.005649566650390625,
0.004421234130859375,
0.05499267578125,
0.0330810546875,
0.0298614501953125,
-0.042327880859375,
0.050872802734375,
-0.034912109375,
0.0271453857421875,
0.028076171875,
-0.054046630859375,
-0.0638427734375,
-0.021240234375,
-0.034271240234375,
-0.02166748046875,
-0.053375244140625,
-0.0252532958984375,
-0.03436279296875,
0.049957275390625,
0.0204620361328125,
0.00420379638671875,
-0.014129638671875,
0.034820556640625,
0.004856109619140625,
0.061004638671875,
0.004364013671875,
-0.0333251953125,
-0.0005564689636230469,
-0.02032470703125,
-0.01148223876953125,
0.0310211181640625,
-0.0017194747924804688,
-0.0206756591796875,
0.007030487060546875,
-0.027679443359375,
0.0135955810546875,
0.012603759765625,
-0.01267242431640625,
-0.02392578125,
0.08160400390625,
-0.048919677734375,
-0.006885528564453125,
0.016937255859375,
0.0261993408203125,
0.045196533203125,
-0.005992889404296875,
-0.044677734375,
-0.0291290283203125,
-0.0074615478515625,
0.0222625732421875,
-0.025054931640625,
0.036163330078125,
-0.0295562744140625,
0.0157318115234375,
-0.027496337890625,
0.02105712890625,
0.00960540771484375,
0.037261962890625,
0.0081634521484375,
-0.025909423828125,
0.02642822265625,
-0.04302978515625,
-0.038665771484375,
-0.0263824462890625,
-0.006290435791015625,
0.000362396240234375,
-0.018585205078125,
0.016754150390625,
0.048828125,
-0.044677734375,
0.0173797607421875,
-0.047271728515625,
0.010040283203125,
-0.07916259765625,
0.03955078125,
0.0172576904296875,
-0.004150390625,
0.038848876953125
] |
04ab5561c575e5b21a56780461f25b5064c2c979
|
Wordpress Stackexchange
Q: Add tag to post api wordpress I have been googling around but could not find the "add tag to post" api/codex. Does anyone know what it is ? Also, the "delete tag from post".
Thanks.
A: You would use the wp_insert_term() function to insert a new tag:
wp_insert_term( 'post_tag', 'happy' );
Then after creating your terms, you would add them to the post of your choice using the wp_set_post_terms() function, like so:
wp_set_post_terms( $post_id, 'happy', 'post_tag', true);
|
Q: Add tag to post api wordpress I have been googling around but could not find the "add tag to post" api/codex. Does anyone know what it is ? Also, the "delete tag from post".
Thanks.
A: You would use the wp_insert_term() function to insert a new tag:
wp_insert_term( 'post_tag', 'happy' );
Then after creating your terms, you would add them to the post of your choice using the wp_set_post_terms() function, like so:
wp_set_post_terms( $post_id, 'happy', 'post_tag', true);
A: You'll find an index of a good chunk of the WordPress API here on codex. The function you want is wp_set_post_tags(), but follow the links from that page to related functions.
Edit: this should remove a tag from a post, per comment below
// $post is your post object, e.g. from: global $post;
// $target is tag you want to remove
// get an array of current tags on post
$tags = wp_get_post_tags($post->ID, array('fields' => 'names'));
// remove selected tag from array
$key = array_search($target, $tags);
if ($key !== false) {
unset($tags[$key]);
}
// set new list of tags, without $target
wp_set_post_tags($post->ID, $tags, false);
A: Google Knows it.
If you wanted to add a categories to a post with the ID of 42:
$cat_ids = array( 6,8 );
//to make sure the terms IDs is integers:
//$cat_ids = array_map('intval', $cat_ids);
//$cat_ids = array_unique( $cat_ids );
wp_set_object_terms( '42', $cat_ids, 'category' );
If you wanted to clear/remove all categories from a post with the ID of 42:
wp_set_object_terms( '42', NULL, 'category' );
read more about wp_set_object_terms
|
wordpress
|
{
"language": "en",
"length": 253,
"provenance": "stackexchange_00019.jsonl.gz:428083",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82467"
}
|
[
0.078857421875,
0.01303863525390625,
-0.0220489501953125,
-0.00603485107421875,
0.05584716796875,
-0.0650634765625,
0.10174560546875,
-0.039093017578125,
-0.006450653076171875,
0.0157012939453125,
-0.029541015625,
-0.0162353515625,
0.01082611083984375,
-0.0175323486328125,
-0.00746917724609375,
-0.03326416015625,
0.04095458984375,
-0.039642333984375,
0.021270751953125,
0.0008172988891601562,
-0.0080413818359375,
0.031585693359375,
0.0418701171875,
-0.0018939971923828125,
0.01251983642578125,
0.032501220703125,
-0.010345458984375,
-0.01552581787109375,
-0.01349639892578125,
-0.0123291015625,
0.0168914794921875,
0.00839996337890625,
0.00940704345703125,
0.028076171875,
-0.04229736328125,
-0.00754547119140625,
0.01404571533203125,
0.0011453628540039062,
0.007472991943359375,
0.01470947265625,
0.02618408203125,
-0.002033233642578125,
-0.0179443359375,
0.015869140625,
-0.00798797607421875,
-0.0379638671875,
0.0406494140625,
-0.0247802734375,
-0.0000826716423034668,
-0.041961669921875,
0.026336669921875,
-0.0219573974609375,
0.053985595703125,
-0.07000732421875,
-0.037872314453125,
-0.0043487548828125,
0.0190887451171875,
-0.0211181640625,
0.03570556640625,
-0.0203704833984375,
-0.04034423828125,
-0.00885009765625,
0.029205322265625,
-0.0087738037109375,
0.0230560302734375,
0.01104736328125,
0.04779052734375,
0.0180206298828125,
-0.053863525390625,
0.0207061767578125,
0.041656494140625,
-0.03466796875,
-0.00899505615234375,
-0.01108551025390625,
0.00977325439453125,
-0.00820159912109375,
0.0279388427734375,
-0.0013904571533203125,
-0.0123443603515625,
0.0214385986328125,
0.03765869140625,
0.00720977783203125,
0.019256591796875,
-0.028656005859375,
0.002063751220703125,
-0.0183563232421875,
-0.0028553009033203125,
-0.00359344482421875,
-0.0215911865234375,
-0.03155517578125,
-0.023193359375,
-0.04296875,
-0.023406982421875,
0.0039215087890625,
-0.010528564453125,
-0.0231170654296875,
0.00037741661071777344,
0.0082244873046875,
0.00955963134765625,
0.048492431640625,
0.0086212158203125,
-0.061492919921875,
0.0858154296875,
-0.036163330078125,
0.015777587890625,
0.01412200927734375,
-0.020965576171875,
-0.00402069091796875,
0.04376220703125,
0.0321044921875,
-0.0025691986083984375,
0.0286407470703125,
0.0281982421875,
0.01611328125,
-0.0484619140625,
-0.034332275390625,
-0.0198974609375,
0.0035305023193359375,
-0.0146026611328125,
0.0034770965576171875,
-0.0202178955078125,
0.0170745849609375,
-0.049591064453125,
0.0172576904296875,
0.0166778564453125,
0.0161590576171875,
0.0114898681640625,
0.0017232894897460938,
-0.0185394287109375,
-0.0113525390625,
-0.0116424560546875,
0.0513916015625,
0.0594482421875,
-0.0002918243408203125,
-0.0271148681640625,
0.0036106109619140625,
0.0004723072052001953,
-0.04498291015625,
-0.03680419921875,
0.03717041015625,
0.0011920928955078125,
-0.055816650390625,
-0.00843048095703125,
-0.025665283203125,
0.0911865234375,
0.0244598388671875,
0.01837158203125,
0.005222320556640625,
0.037750244140625,
-0.0198822021484375,
0.054443359375,
-0.01528167724609375,
0.00186920166015625,
0.022186279296875,
-0.004474639892578125,
0.005977630615234375,
-0.005733489990234375,
-0.011566162109375,
0.0249481201171875,
-0.005992889404296875,
0.0230865478515625,
-0.0001430511474609375,
0.0206298828125,
0.0163116455078125,
-0.006015777587890625,
0.0072479248046875,
-0.05181884765625,
-0.004055023193359375,
0.0228118896484375,
0.043121337890625,
0.005664825439453125,
-0.0029296875,
0.01361846923828125,
0.010589599609375,
-0.01033782958984375,
-0.00958251953125,
0.00704193115234375,
0.0113372802734375,
0.016998291015625,
0.039215087890625,
0.01073455810546875,
-0.01934814453125,
0.056243896484375,
-0.01087188720703125,
-0.05419921875,
0.0394287109375,
0.020355224609375,
0.06658935546875,
0.001323699951171875,
0.0168609619140625,
0.053314208984375,
0.021026611328125,
-0.00818634033203125,
-0.005924224853515625,
0.00009864568710327148,
-0.03009033203125,
-0.02398681640625,
-0.015594482421875,
-0.01425933837890625,
0.022491455078125,
-0.039215087890625,
0.030670166015625,
-0.0137939453125,
0.006999969482421875,
-0.036346435546875,
0.01322174072265625,
-0.02484130859375,
0.061248779296875,
-0.00704193115234375,
-0.018035888671875,
0.01131439208984375,
-0.0556640625,
0.01358795166015625,
-0.018310546875,
-0.0243377685546875,
0.00867462158203125,
-0.027557373046875,
0.0176849365234375,
0.00946044921875,
0.016571044921875,
0.0073089599609375,
0.00872039794921875,
-0.0033664703369140625,
-0.0276336669921875,
0.061614990234375,
-0.0026092529296875,
-0.0279388427734375,
-0.0328369140625,
0.0150299072265625,
0.0008330345153808594,
-0.0341796875,
0.0552978515625,
0.01068878173828125,
0.0209503173828125,
-0.01334381103515625,
-0.01256561279296875,
0.039703369140625,
-0.048736572265625,
0.021697998046875,
0.049591064453125,
0.00905609130859375,
0.05322265625,
-0.00511932373046875,
0.0240936279296875,
0.06195068359375,
0.0013227462768554688,
0.0110626220703125,
-0.0099029541015625,
0.0283355712890625,
0.0701904296875,
-0.0206451416015625,
0.01434326171875,
0.0137939453125,
-0.0682373046875,
0.0184478759765625,
0.042083740234375,
-0.0274810791015625,
-0.01922607421875,
0.01183319091796875,
-0.020751953125,
0.005283355712890625,
-0.066162109375,
-0.028564453125,
-0.0374755859375,
0.05682373046875,
0.00266265869140625,
0.05303955078125,
0.036651611328125,
-0.03240966796875,
0.004718780517578125,
0.01555633544921875,
0.0135650634765625,
-0.00652313232421875,
0.00887298583984375,
-0.0013532638549804688,
0.03533935546875,
-0.05560302734375,
0.004329681396484375,
0.0435791015625,
0.0151519775390625,
-0.0192718505859375,
0.055908203125,
0.005706787109375,
-0.0201568603515625,
-0.036163330078125,
-0.06121826171875,
-0.00003802776336669922,
-0.00902557373046875,
-0.00759124755859375,
-0.01456451416015625,
-0.00238800048828125,
0.051666259765625,
-0.0016508102416992188,
0.0220794677734375,
0.0418701171875,
0.005550384521484375,
-0.035736083984375,
-0.036651611328125,
0.024566650390625,
-0.01507568359375,
0.0450439453125,
0.0697021484375,
0.013275146484375,
0.0101776123046875,
0.025543212890625,
0.01264190673828125,
0.008392333984375,
0.0240325927734375,
0.02197265625,
-0.00047850608825683594,
-0.006061553955078125,
0.045745849609375,
0.0150299072265625,
0.0047607421875,
-0.0141754150390625,
-0.042388916015625,
-0.01303863525390625,
0.0032291412353515625,
-0.0753173828125,
-0.051971435546875,
0.03948974609375,
-0.038604736328125,
-0.024932861328125,
-0.0011701583862304688,
-0.044342041015625,
-0.0128936767578125,
0.0235443115234375,
-0.0174102783203125,
-0.055755615234375,
0.00661468505859375,
0.00742340087890625,
-0.0390625,
-0.029510498046875,
-0.0077972412109375,
-0.00287628173828125,
0.01473236083984375,
0.01390838623046875,
0.07330322265625,
0.0010776519775390625,
-0.044158935546875,
0.0019588470458984375,
-0.02813720703125,
-0.024169921875,
0.0010738372802734375,
0.0194549560546875,
-0.0128021240234375,
0.0225067138671875,
0.0006017684936523438,
0.01525115966796875,
0.048828125,
-0.038818359375,
-0.01320648193359375,
-0.039306640625,
0.01204681396484375,
-0.01399993896484375,
0.005908966064453125,
0.0433349609375,
0.00634002685546875,
0.0005154609680175781,
-0.0254974365234375,
0.026336669921875,
0.0149383544921875,
0.007640838623046875,
-0.045166015625,
-0.0662841796875,
-0.00939178466796875,
0.01091766357421875,
0.013641357421875,
0.004390716552734375,
0.023284912109375,
0.058441162109375,
0.01248931884765625,
0.01605224609375,
-0.0411376953125,
-0.0673828125,
-0.05780029296875,
-0.007266998291015625,
-0.01512908935546875,
0.0305938720703125,
-0.0018758773803710938,
0.0213775634765625,
-0.0180206298828125,
0.01033782958984375,
-0.0556640625,
-0.039031982421875,
0.025146484375,
-0.01031494140625,
0.045684814453125,
-0.0272979736328125,
-0.032958984375,
-0.00867462158203125,
0.077880859375,
-0.004482269287109375,
-0.002109527587890625,
-0.03375244140625,
-0.0109405517578125,
-0.006862640380859375,
-0.035247802734375,
-0.03985595703125,
-0.00390625,
0.0106353759765625,
0.01219940185546875,
0.001064300537109375,
0.006046295166015625,
-0.051116943359375,
0.07843017578125,
-0.01629638671875,
0.01544952392578125,
0.04095458984375,
-0.07891845703125,
0.0193939208984375,
0.0240631103515625,
-0.011505126953125,
-0.0028209686279296875,
-0.0290679931640625,
-0.038238525390625,
-0.0350341796875,
0.01026153564453125,
-0.040252685546875,
-0.0059356689453125,
0.0237579345703125,
-0.034698486328125,
0.0127410888671875,
0.02081298828125,
0.0237884521484375,
-0.0010824203491210938,
-0.0107574462890625,
-0.005229949951171875,
-0.0052642822265625,
-0.023223876953125,
-0.0252227783203125,
-0.020172119140625,
-0.03143310546875,
-0.00948333740234375,
0.0081329345703125,
0.077880859375,
-0.002315521240234375,
0.034698486328125,
0.0013399124145507812,
0.006649017333984375,
-0.029937744140625,
-0.025665283203125,
-0.016326904296875,
0.001682281494140625,
-0.0143890380859375,
-0.005496978759765625,
-0.005779266357421875,
-0.0223388671875,
0.0180206298828125,
-0.0160064697265625,
0.0011663436889648438,
0.0299835205078125,
0.0887451171875,
0.009796142578125,
0.00981903076171875,
-0.1162109375,
0.034271240234375,
0.037628173828125,
0.02301025390625,
0.05572509765625,
0.0211334228515625,
-0.0199737548828125,
0.04156494140625,
0.01708984375,
0.006587982177734375,
-0.0643310546875,
0.060821533203125,
-0.0053558349609375,
0.01154327392578125,
0.004573822021484375,
-0.00972747802734375,
0.053131103515625,
-0.0159912109375,
-0.044464111328125,
0.0006990432739257812,
0.005340576171875,
0.046356201171875,
-0.040374755859375,
0.061065673828125,
-0.027984619140625,
-0.032684326171875,
0.02020263671875,
0.04571533203125,
-0.03759765625,
0.0200958251953125,
0.00759124755859375,
-0.0179290771484375,
-0.06109619140625,
0.019287109375,
-0.058135986328125,
-0.0283355712890625,
-0.0252227783203125,
0.0255584716796875,
-0.023681640625,
0.0092010498046875,
-0.01265716552734375,
-0.007396697998046875,
0.032440185546875,
0.00806427001953125,
-0.037933349609375,
0.0015382766723632812,
0.003368377685546875,
0.0283660888671875,
0.00904083251953125,
-0.008087158203125,
0.019195556640625,
0.0244293212890625,
0.00023937225341796875,
0.01061248779296875,
-0.005558013916015625,
-0.0090484619140625,
-0.025543212890625,
-0.0044097900390625,
-0.003082275390625,
-0.0035953521728515625,
0.01250457763671875,
0.039825439453125,
-0.032379150390625,
0.04351806640625,
-0.0136871337890625,
0.0184478759765625,
-0.020721435546875,
0.0423583984375,
0.0166778564453125,
-0.0087127685546875,
-0.00012874603271484375,
0.0165252685546875,
-0.01091766357421875,
-0.04132080078125,
-0.0177764892578125,
0.0035762786865234375,
0.04437255859375,
-0.0248565673828125,
-0.0259246826171875,
0.041778564453125,
-0.01611328125,
-0.0196685791015625,
-0.0003190040588378906,
-0.00316619873046875,
-0.0229339599609375,
-0.0202789306640625,
0.02020263671875,
0.0240020751953125,
0.01320648193359375,
0.005748748779296875,
0.0243072509765625,
-0.00844573974609375,
0.023712158203125,
0.00861358642578125,
0.0273284912109375,
-0.035888671875,
-0.04876708984375,
-0.044158935546875,
-0.0299224853515625,
-0.021575927734375,
0.03875732421875,
0.01009368896484375,
-0.031768798828125,
-0.04412841796875,
0.030853271484375,
-0.00640869140625,
0.0249176025390625,
-0.00054168701171875,
-0.0211639404296875,
0.00734710693359375,
-0.0016145706176757812,
0.056182861328125,
0.0154876708984375,
0.01114654541015625,
-0.03277587890625,
-0.0253448486328125,
-0.0313720703125,
0.01531219482421875,
0.0005602836608886719,
-0.02923583984375,
0.0004763603210449219,
0.0239105224609375,
0.037628173828125,
-0.0173797607421875,
-0.04327392578125,
-0.002750396728515625,
-0.001384735107421875,
-0.002117156982421875,
0.02294921875,
0.005680084228515625,
0.0198516845703125,
-0.01088714599609375,
0.045623779296875,
0.0168609619140625,
0.0092010498046875,
-0.0007581710815429688,
-0.04156494140625,
-0.00998687744140625,
-0.103515625,
-0.0177764892578125,
0.00832366943359375,
-0.00952911376953125,
0.0650634765625,
0.004940032958984375,
0.00974273681640625,
0.0285797119140625,
-0.0157470703125,
0.00919342041015625,
-0.0028228759765625,
0.0107269287109375,
-0.01239776611328125,
-0.0226593017578125,
0.0791015625,
-0.0070343017578125,
0.0246429443359375,
-0.01293182373046875,
0.0196533203125,
-0.013824462890625,
-0.01480865478515625,
0.00786590576171875,
0.01026153564453125,
-0.0115814208984375,
0.0183258056640625,
0.05078125,
0.0084381103515625,
0.035247802734375,
-0.0038909912109375,
0.0185546875,
0.01438140869140625,
0.005222320556640625,
-0.047119140625,
-0.02496337890625,
0.0202178955078125,
0.006977081298828125,
-0.01467132568359375,
0.0304718017578125,
-0.0198516845703125,
-0.029754638671875,
-0.00463104248046875,
0.0135650634765625,
-0.00820159912109375,
-0.0035991668701171875,
-0.0007796287536621094,
-0.008697509765625,
-0.0009307861328125,
0.0015439987182617188,
-0.00469207763671875,
-0.0213470458984375,
0.0445556640625,
-0.0012836456298828125,
0.0095062255859375,
0.0253143310546875,
0.00661468505859375,
-0.0012416839599609375,
-0.0364990234375,
0.01502227783203125,
0.01357269287109375,
-0.0273590087890625,
0.04339599609375,
0.00027298927307128906,
0.01172637939453125,
-0.0175323486328125,
0.002590179443359375,
0.0295867919921875,
-0.0306854248046875,
-0.07147216796875,
0.032257080078125,
-0.0115966796875,
-0.007663726806640625,
0.01126861572265625,
-0.0279083251953125,
0.03302001953125,
0.04071044921875,
-0.0196380615234375,
-0.0181884765625,
0.0178680419921875,
-0.03887939453125,
-0.05511474609375,
-0.02923583984375,
0.03729248046875,
0.00931549072265625,
-0.0309295654296875,
0.0408935546875,
-0.0242767333984375,
-0.0584716796875,
-0.01244354248046875,
-0.0357666015625,
0.03472900390625,
-0.032012939453125,
-0.007354736328125,
0.0175933837890625,
0.034515380859375,
0.0171051025390625,
-0.0162353515625,
-0.01113128662109375,
-0.026092529296875,
-0.0088653564453125,
-0.0099639892578125,
-0.038299560546875,
0.0224761962890625,
-0.00597381591796875,
-0.092041015625,
0.1485595703125,
0.042083740234375,
0.00931549072265625,
-0.0079345703125,
0.07220458984375,
-0.0875244140625,
0.0191650390625,
-0.045806884765625,
0.03924560546875,
-0.01160430908203125,
0.01263427734375,
-0.0399169921875,
0.01024627685546875,
-0.0113525390625,
0.0140838623046875,
0.08984375,
0.01348114013671875,
0.00653839111328125,
-0.0382080078125,
0.0142974853515625,
0.022369384765625,
-0.04510498046875,
0.025909423828125,
-0.0030364990234375,
0.00394439697265625,
-0.0014104843139648438,
-0.0195770263671875,
0.03472900390625,
-0.02972412109375,
-0.022979736328125,
0.032501220703125,
0.0061798095703125,
0.006908416748046875,
-0.0079498291015625,
-0.0139312744140625,
0.0036334991455078125,
-0.0167083740234375,
-0.0021514892578125,
-0.0242919921875,
-0.006298065185546875,
0.021881103515625,
0.0104522705078125,
-0.054595947265625,
-0.044952392578125,
-0.0248870849609375,
0.0179443359375,
0.00893402099609375,
0.06854248046875,
0.0234222412109375,
0.033721923828125,
0.051971435546875,
-0.01727294921875,
0.03961181640625,
0.019775390625,
-0.046905517578125,
0.0457763671875,
0.0018892288208007812,
0.01294708251953125,
-0.074462890625,
0.002750396728515625,
0.041290283203125,
0.06536865234375,
-0.054473876953125,
-0.004230499267578125,
0.01258087158203125,
0.0117034912109375,
-0.0050506591796875,
-0.020904541015625,
0.0139312744140625,
-0.0261077880859375,
-0.0022296905517578125,
-0.0528564453125,
0.0011072158813476562,
0.039276123046875,
0.0516357421875,
0.00881195068359375,
0.029693603515625,
-0.08087158203125,
-0.03436279296875,
-0.049591064453125,
0.0193023681640625,
-0.0012035369873046875,
0.044830322265625,
0.0175933837890625,
0.06005859375,
0.0236053466796875,
-0.01258087158203125,
0.00914764404296875,
0.0032253265380859375,
0.0191802978515625,
-0.0196533203125,
0.01690673828125,
-0.03143310546875,
0.03924560546875,
0.0028133392333984375,
0.01180267333984375,
0.0382080078125,
0.047332763671875,
0.04327392578125,
-0.02349853515625,
-0.0144500732421875,
0.0670166015625,
-0.0267333984375,
-0.021575927734375,
-0.0474853515625,
0.00913238525390625,
0.017486572265625,
0.0016050338745117188,
0.0302734375,
0.009246826171875,
0.023895263671875,
-0.03155517578125,
0.0015716552734375,
-0.0026836395263671875,
-0.0196380615234375,
0.07989501953125,
0.0045166015625,
0.0301971435546875,
-0.0022525787353515625,
-0.07220458984375,
0.014678955078125,
-0.09759521484375,
-0.05657958984375,
0.034698486328125,
0.034454345703125,
-0.01499176025390625,
0.0187835693359375,
0.0191802978515625,
-0.01064300537109375,
0.036224365234375,
-0.002696990966796875,
-0.00022459030151367188,
0.0614013671875,
0.032684326171875,
0.0181121826171875,
-0.0672607421875,
-0.02264404296875,
-0.004322052001953125,
0.0244140625,
-0.0073699951171875,
0.0232086181640625,
0.013916015625,
0.0126190185546875,
-0.05279541015625,
0.0251922607421875,
-0.048736572265625,
-0.03448486328125,
0.0423583984375,
0.0343017578125,
-0.006805419921875,
-0.0166473388671875,
-0.0260772705078125,
0.01534271240234375,
0.04156494140625,
0.005359649658203125,
0.036895751953125,
-0.0218353271484375,
0.00940704345703125,
-0.03460693359375,
0.07403564453125,
-0.0030918121337890625,
-0.0026264190673828125,
-0.035125732421875,
-0.017242431640625,
0.0479736328125,
0.06494140625,
0.010284423828125,
0.0482177734375,
0.016693115234375,
0.0213623046875,
0.0179290771484375,
-0.0284423828125,
0.00039577484130859375,
0.0277099609375,
0.005420684814453125,
-0.0069122314453125,
0.0090179443359375,
-0.0264434814453125,
0.006969451904296875,
0.01389312744140625,
0.003963470458984375,
0.011260986328125,
-0.046142578125,
-0.01007843017578125,
0.026153564453125,
0.039886474609375,
-0.00386810302734375,
0.031341552734375,
-0.02423095703125,
-0.01355743408203125,
0.030059814453125,
0.0172119140625,
-0.03448486328125,
-0.0498046875,
-0.0035839080810546875,
0.01494598388671875,
-0.044036865234375,
-0.050750732421875,
-0.10089111328125,
-0.026397705078125,
0.032684326171875,
-0.00797271728515625,
0.01220703125,
-0.0211181640625,
-0.0204620361328125,
-0.0102081298828125,
0.010498046875,
-0.0199127197265625,
0.01171875,
0.03887939453125,
-0.0594482421875,
-0.0241851806640625,
-0.032012939453125,
-0.00800323486328125,
-0.0440673828125,
0.04144287109375,
0.04742431640625,
-0.0479736328125,
-0.0160064697265625,
0.031280517578125,
0.042083740234375,
0.07012939453125,
0.04083251953125,
-0.01104736328125,
0.01206207275390625,
-0.005191802978515625,
-0.01395416259765625,
-0.07293701171875,
0.027374267578125,
-0.09954833984375,
-0.00797271728515625,
-0.041015625,
0.00351715087890625,
-0.0014715194702148438,
-0.053436279296875,
-0.11669921875,
0.0202789306640625,
-0.035858154296875,
-0.04302978515625,
-0.0090484619140625,
-0.021240234375,
-0.005039215087890625,
0.0017547607421875,
-0.004795074462890625,
-0.023406982421875,
-0.0355224609375,
0.01416015625,
-0.0141448974609375,
0.050506591796875,
0.01517486572265625,
-0.03155517578125,
0.0084381103515625,
-0.009613037109375,
0.0006356239318847656,
-0.00021374225616455078,
0.052398681640625,
-0.048980712890625,
0.051666259765625,
0.053741455078125,
-0.056182861328125,
-0.0188140869140625,
-0.035736083984375,
-0.02252197265625,
0.010223388671875,
-0.03607177734375,
-0.01194000244140625,
-0.0274658203125,
0.052215576171875,
-0.009735107421875,
0.017181396484375,
-0.005096435546875,
-0.01415252685546875,
-0.0262603759765625,
-0.045440673828125,
0.005985260009765625,
0.00799560546875,
-0.034881591796875,
0.0195159912109375,
-0.0018711090087890625,
0.01096343994140625,
-0.02020263671875,
-0.02001953125,
-0.01141357421875,
-0.01959228515625,
-0.015380859375,
0.00787353515625,
-0.0267333984375,
-0.0151519775390625,
0.0489501953125,
-0.03216552734375,
-0.0198974609375,
-0.01500701904296875,
0.0299224853515625,
0.00656890869140625,
-0.0254058837890625,
0.038787841796875,
-0.024139404296875,
0.01387786865234375,
0.01947021484375,
0.044525146484375,
-0.0265045166015625,
0.02020263671875,
-0.03631591796875,
-0.031585693359375,
0.02105712890625,
0.006938934326171875,
0.01155853271484375,
-0.017913818359375,
0.059967041015625,
0.0256805419921875,
0.070068359375,
-0.0167694091796875,
0.00876617431640625,
-0.00649261474609375,
0.0160369873046875,
-0.032501220703125,
0.0037288665771484375,
0.0012683868408203125,
-0.0198211669921875,
-0.00031185150146484375,
0.006961822509765625,
0.0101318359375,
-0.03497314453125,
0.0192108154296875,
-0.00909423828125,
0.0246429443359375,
0.0220184326171875
] |
1d5a879f0c2185f82cc63ea3e295e6a9d8efce27
|
Wordpress Stackexchange
Q: How to add add_meta_box to specific Page Template? I want to add add_meta_box to specific page type like Page Template, Like Product Template.
I am using this article http://wp.smashingmagazine.com/2011/10/04/create-custom-post-meta-boxes-wordpress/ to try it.
A: If your custom page template filename is foobar.php, you can use get_post_meta():
global $post;
if ( 'foobar.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ) {
// The current page has the foobar template assigned
// do something
}
Personally, I like calling this inside my add_meta_boxes_page callback, and wrapping it around the add_meta_box() call itself.
function wpse82477_add_meta_boxes_page() {
global $post;
if ( 'foobar.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ) {
add_meta_box( $args );
}
}
add_action( 'add_meta_boxes_page', 'wpse82477_add_meta_boxes_page' );
You'll just need to instruct users to save the page after assigning the template, so that the meta box appears.
|
Q: How to add add_meta_box to specific Page Template? I want to add add_meta_box to specific page type like Page Template, Like Product Template.
I am using this article http://wp.smashingmagazine.com/2011/10/04/create-custom-post-meta-boxes-wordpress/ to try it.
A: If your custom page template filename is foobar.php, you can use get_post_meta():
global $post;
if ( 'foobar.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ) {
// The current page has the foobar template assigned
// do something
}
Personally, I like calling this inside my add_meta_boxes_page callback, and wrapping it around the add_meta_box() call itself.
function wpse82477_add_meta_boxes_page() {
global $post;
if ( 'foobar.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ) {
add_meta_box( $args );
}
}
add_action( 'add_meta_boxes_page', 'wpse82477_add_meta_boxes_page' );
You'll just need to instruct users to save the page after assigning the template, so that the meta box appears.
A: I found a few bugs with the answer above option above but I customized this option below and it helped - no bugs at all.
add_action('add_meta_boxes', 'add_product_meta');
function add_product_meta()
{
global $post;
if(!empty($post))
{
$pageTemplate = get_post_meta($post->ID, '_wp_page_template', true);
if($pageTemplate == 'page-templates/product-page.php' )
{
add_meta_box(
'product_meta', // $id
'Product Information', // $title
'display_product_information', // $callback
'page', // $page
'normal', // $context
'high'); // $priority
}
}
}
function display_product_information()
{
// Add the HTML for the post meta
}
https://paulund.co.uk/display-post-meta-box-specific-page-templates
It's clean
A: This is a solution with name of the page :
Accueil is the name of the page.
$screens = ['Accueil'];
foreach ($screens as $screen) {
if ( get_the_title() == $screen ) {//condition
add_meta_box(
'accueil_données',
'Informations sur Orchestre',
'metabox_accueil_infos',
'page',
'normal',
'high'
);
}
}
A: function mcf_add_custom_metabox() {
global $post;
if ( $_REQUEST['post'] == 30 ) {
add_meta_box( 'shop_editor', ' ', 'mcf_callback', 'page' );
}
}
add_action( 'add_meta_boxes_page', 'mcf_add_custom_metabox' );
I got a way to add metabox in specific page using page id.
|
wordpress
|
{
"language": "en",
"length": 301,
"provenance": "stackexchange_00019.jsonl.gz:428086",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82477"
}
|
[
0.0212249755859375,
0.0013036727905273438,
0.0007152557373046875,
-0.035614013671875,
0.008758544921875,
-0.0013608932495117188,
0.00969696044921875,
-0.0237579345703125,
-0.00811004638671875,
0.02191162109375,
-0.0221710205078125,
-0.0035152435302734375,
-0.0175933837890625,
-0.01557159423828125,
-0.01013946533203125,
-0.039794921875,
0.03167724609375,
0.019287109375,
0.06329345703125,
-0.0026149749755859375,
0.004566192626953125,
0.01200103759765625,
0.0293731689453125,
0.045654296875,
0.033782958984375,
-0.0799560546875,
0.060882568359375,
0.0080718994140625,
0.0256500244140625,
-0.01038360595703125,
0.0295257568359375,
0.0065155029296875,
0.031951904296875,
0.00005424022674560547,
-0.020660400390625,
0.0258026123046875,
-0.00983428955078125,
-0.000026404857635498047,
-0.004726409912109375,
0.01303863525390625,
0.005748748779296875,
0.01009368896484375,
0.01123046875,
0.0065765380859375,
-0.017303466796875,
-0.0270843505859375,
0.011932373046875,
-0.041595458984375,
0.0310211181640625,
-0.0169525146484375,
-0.00021982192993164062,
-0.0270233154296875,
0.01087188720703125,
-0.0379638671875,
-0.0234832763671875,
-0.03582763671875,
-0.0303955078125,
-0.013214111328125,
0.03448486328125,
0.0225372314453125,
-0.01018524169921875,
-0.02508544921875,
0.00925445556640625,
-0.03961181640625,
0.0105743408203125,
-0.00945281982421875,
-0.0263671875,
0.03802490234375,
-0.05328369140625,
0.001857757568359375,
0.03955078125,
-0.058685302734375,
-0.0233612060546875,
-0.0084381103515625,
0.0038089752197265625,
0.01409912109375,
0.01690673828125,
-0.004001617431640625,
-0.0153656005859375,
0.041961669921875,
0.0296630859375,
0.025970458984375,
0.037689208984375,
-0.0506591796875,
0.03338623046875,
-0.01739501953125,
-0.021514892578125,
-0.01483154296875,
-0.029693603515625,
-0.048004150390625,
-0.028106689453125,
-0.09649658203125,
-0.022491455078125,
-0.0089569091796875,
0.0037822723388671875,
-0.035919189453125,
-0.0008339881896972656,
0.044769287109375,
-0.0189971923828125,
-0.00423431396484375,
0.007747650146484375,
-0.035919189453125,
0.01076507568359375,
-0.033477783203125,
0.00473785400390625,
0.027191162109375,
-0.0180511474609375,
-0.035430908203125,
0.022979736328125,
0.0240325927734375,
0.012298583984375,
-0.0207672119140625,
0.005672454833984375,
-0.0153656005859375,
-0.030059814453125,
-0.0026416778564453125,
-0.017974853515625,
-0.004405975341796875,
0.0099639892578125,
-0.017364501953125,
0.01140594482421875,
0.03955078125,
0.048065185546875,
-0.047271728515625,
0.01038360595703125,
0.0025920867919921875,
-0.032928466796875,
-0.07208251953125,
-0.0183563232421875,
-0.005077362060546875,
-0.0273895263671875,
0.0019063949584960938,
0.057159423828125,
0.0716552734375,
0.0265960693359375,
-0.00909423828125,
0.01140594482421875,
-0.0229034423828125,
-0.00814056396484375,
0.020660400390625,
-0.001804351806640625,
-0.04876708984375,
-0.005901336669921875,
-0.00412750244140625,
-0.03875732421875,
0.0184478759765625,
0.0145111083984375,
0.01171875,
-0.005767822265625,
-0.050994873046875,
-0.0135498046875,
-0.02130126953125,
0.023406982421875,
0.01511383056640625,
0.0189056396484375,
0.005962371826171875,
0.0382080078125,
-0.0225677490234375,
-0.0252685546875,
-0.0161590576171875,
-0.0218353271484375,
0.00322723388671875,
0.0128021240234375,
-0.007488250732421875,
-0.0054779052734375,
-0.00678253173828125,
0.00028252601623535156,
0.00469970703125,
0.01206207275390625,
0.035064697265625,
0.01070404052734375,
0.015045166015625,
0.0017805099487304688,
-0.0211944580078125,
-0.02734375,
-0.0193634033203125,
0.007404327392578125,
0.060760498046875,
0.01210784912109375,
0.002941131591796875,
-0.01110076904296875,
-0.045684814453125,
0.07769775390625,
-0.028961181640625,
-0.046905517578125,
0.04351806640625,
0.0035724639892578125,
0.03314208984375,
-0.006710052490234375,
0.002132415771484375,
0.04888916015625,
0.032867431640625,
-0.053253173828125,
-0.004039764404296875,
0.027587890625,
-0.002288818359375,
-0.002971649169921875,
-0.0134124755859375,
0.0116119384765625,
0.0022373199462890625,
0.00511932373046875,
-0.019256591796875,
0.01479339599609375,
0.0256500244140625,
-0.0193939208984375,
0.0088348388671875,
-0.022003173828125,
0.02252197265625,
-0.0027065277099609375,
-0.031463623046875,
0.006011962890625,
-0.06097412109375,
0.025390625,
-0.03607177734375,
-0.064453125,
0.00475311279296875,
0.00794219970703125,
0.046112060546875,
0.00603485107421875,
0.0084381103515625,
0.0091400146484375,
-0.013092041015625,
0.0097503662109375,
0.028167724609375,
0.0587158203125,
0.0196685791015625,
-0.042877197265625,
-0.00931549072265625,
-0.0024547576904296875,
0.045257568359375,
-0.09661865234375,
0.056396484375,
-0.0244293212890625,
-0.0183868408203125,
-0.042999267578125,
-0.0017290115356445312,
-0.02764892578125,
-0.0499267578125,
-0.0010929107666015625,
0.046966552734375,
0.002223968505859375,
0.0352783203125,
0.01184844970703125,
0.0804443359375,
0.0382080078125,
-0.013153076171875,
0.0026340484619140625,
0.048370361328125,
-0.0159454345703125,
0.024322509765625,
0.003566741943359375,
0.01477813720703125,
0.0007047653198242188,
-0.0712890625,
-0.00015974044799804688,
0.02593994140625,
-0.049835205078125,
0.006351470947265625,
0.0181427001953125,
-0.02685546875,
-0.0186920166015625,
-0.0016107559204101562,
0.037445068359375,
-0.03082275390625,
0.0631103515625,
-0.001110076904296875,
0.054229736328125,
0.032318115234375,
-0.00592041015625,
-0.013275146484375,
-0.00936126708984375,
-0.0196075439453125,
-0.00771331787109375,
-0.0026454925537109375,
0.0164031982421875,
0.043731689453125,
-0.07879638671875,
0.0214996337890625,
0.0278167724609375,
0.016937255859375,
0.01103973388671875,
0.04193115234375,
-0.0250701904296875,
-0.0151519775390625,
0.0131683349609375,
-0.053955078125,
-0.0187225341796875,
0.016357421875,
0.01078033447265625,
-0.011627197265625,
0.01062774658203125,
0.023712158203125,
-0.035736083984375,
0.057647705078125,
0.00722503662109375,
-0.0283203125,
0.040008544921875,
-0.044891357421875,
0.043701171875,
-0.032989501953125,
0.0511474609375,
0.0643310546875,
-0.050872802734375,
0.044281005859375,
-0.0189971923828125,
0.0125885009765625,
-0.0262451171875,
0.004161834716796875,
-0.019775390625,
-0.0499267578125,
-0.01371002197265625,
-0.003444671630859375,
0.0234375,
0.0217132568359375,
0.0269622802734375,
-0.0206451416015625,
0.0238494873046875,
0.022552490234375,
-0.00644683837890625,
-0.0168609619140625,
0.07391357421875,
-0.0384521484375,
-0.0294036865234375,
-0.0282440185546875,
-0.03643798828125,
-0.0173492431640625,
-0.0098724365234375,
-0.0105133056640625,
-0.030242919921875,
-0.03271484375,
-0.01751708984375,
-0.06866455078125,
-0.0304718017578125,
-0.059295654296875,
-0.003826141357421875,
-0.031707763671875,
-0.0032558441162109375,
0.0775146484375,
0.00019311904907226562,
-0.064697265625,
-0.010223388671875,
0.021881103515625,
-0.0026416778564453125,
0.00678253173828125,
0.035614013671875,
-0.0298309326171875,
0.0171356201171875,
-0.0010013580322265625,
-0.0049285888671875,
0.0288238525390625,
-0.018646240234375,
-0.01251220703125,
-0.041229248046875,
-0.0209503173828125,
-0.00494384765625,
0.009765625,
0.042022705078125,
0.0010585784912109375,
0.02178955078125,
-0.03717041015625,
-0.025909423828125,
0.01654052734375,
-0.0186920166015625,
0.028472900390625,
-0.0034542083740234375,
-0.00951385498046875,
-0.00865936279296875,
0.0499267578125,
0.021728515625,
0.035247802734375,
0.058380126953125,
0.01861572265625,
-0.0266265869140625,
-0.014801025390625,
-0.0302734375,
-0.057342529296875,
0.03948974609375,
-0.007305145263671875,
0.043609619140625,
0.0235137939453125,
0.02362060546875,
-0.003780364990234375,
0.006862640380859375,
-0.04254150390625,
-0.06512451171875,
0.051605224609375,
-0.0307769775390625,
0.0262908935546875,
-0.057586669921875,
-0.0261688232421875,
-0.00870513916015625,
0.107421875,
-0.054107666015625,
-0.0309600830078125,
-0.0159149169921875,
0.0138092041015625,
0.024627685546875,
-0.005718231201171875,
0.0014238357543945312,
-0.03387451171875,
-0.06982421875,
0.010894775390625,
-0.0100860595703125,
-0.03912353515625,
0.0017957687377929688,
0.004398345947265625,
-0.02764892578125,
-0.031280517578125,
0.048736572265625,
-0.034912109375,
0.0105133056640625,
0.039031982421875,
0.00786590576171875,
-0.0096435546875,
-0.03173828125,
-0.0202178955078125,
-0.10369873046875,
-0.00655364990234375,
0.0107421875,
0.046112060546875,
-0.0289764404296875,
-0.007610321044921875,
-0.0238494873046875,
0.04266357421875,
0.046722412109375,
0.017852783203125,
0.0165252685546875,
-0.0016355514526367188,
0.0181121826171875,
-0.06427001953125,
0.018218994140625,
-0.042388916015625,
0.0026493072509765625,
0.0139312744140625,
-0.01715087890625,
0.065673828125,
-0.02923583984375,
0.0013055801391601562,
0.01401519775390625,
-0.037078857421875,
-0.02960205078125,
-0.050537109375,
-0.0082550048828125,
0.00740814208984375,
-0.004001617431640625,
-0.0022449493408203125,
-0.064453125,
-0.03485107421875,
-0.047119140625,
-0.00014889240264892578,
-0.030975341796875,
0.0435791015625,
0.01493072509765625,
0.035369873046875,
-0.007724761962890625,
-0.04046630859375,
0.01873779296875,
0.0384521484375,
0.03240966796875,
0.0087738037109375,
0.0207672119140625,
-0.0142364501953125,
-0.0183868408203125,
0.0242462158203125,
0.02276611328125,
-0.06890869140625,
0.06890869140625,
-0.0191802978515625,
-0.021881103515625,
0.032806396484375,
-0.051544189453125,
0.040557861328125,
0.03668212890625,
-0.03143310546875,
-0.0188140869140625,
-0.033935546875,
0.04473876953125,
-0.0160064697265625,
0.0269012451171875,
-0.051361083984375,
0.01241302490234375,
-0.0167694091796875,
0.0143585205078125,
0.028472900390625,
0.043121337890625,
-0.01194000244140625,
-0.0095367431640625,
-0.0201263427734375,
-0.0215606689453125,
0.03289794921875,
0.005649566650390625,
0.010894775390625,
-0.01097869873046875,
0.041748046875,
-0.033203125,
0.003082275390625,
0.0153656005859375,
0.0129852294921875,
0.00885009765625,
-0.0256195068359375,
-0.049163818359375,
0.0035190582275390625,
0.05816650390625,
-0.0010232925415039062,
0.0258636474609375,
0.044189453125,
-0.00785064697265625,
-0.0139923095703125,
-0.02301025390625,
-0.0105743408203125,
-0.0174102783203125,
-0.061065673828125,
-0.0030460357666015625,
0.025177001953125,
-0.0292816162109375,
-0.01271820068359375,
0.0455322265625,
-0.0142364501953125,
0.0167694091796875,
0.00418853759765625,
0.04071044921875,
0.028656005859375,
0.0504150390625,
0.0166015625,
-0.035003662109375,
-0.0064544677734375,
0.01554107666015625,
-0.02398681640625,
-0.0173492431640625,
0.01506805419921875,
0.0142669677734375,
0.0260467529296875,
-0.00896453857421875,
-0.0250244140625,
0.0167999267578125,
-0.04815673828125,
-0.0001989603042602539,
-0.01180267333984375,
-0.01959228515625,
-0.0158538818359375,
0.0024318695068359375,
-0.0107421875,
-0.0111541748046875,
-0.004199981689453125,
0.0089111328125,
0.01348876953125,
0.0072021484375,
0.026519775390625,
-0.02166748046875,
-0.0042724609375,
-0.013824462890625,
-0.0029888153076171875,
-0.04827880859375,
-0.0165557861328125,
0.0253448486328125,
-0.04827880859375,
-0.03106689453125,
-0.01303863525390625,
-0.0240478515625,
0.017333984375,
-0.037933349609375,
0.04400634765625,
-0.0400390625,
0.00980377197265625,
-0.030975341796875,
0.032745361328125,
-0.00588226318359375,
-0.004451751708984375,
0.01605224609375,
-0.0136260986328125,
-0.055511474609375,
-0.02447509765625,
-0.00775146484375,
-0.0217132568359375,
-0.0006723403930664062,
-0.00379180908203125,
-0.0132904052734375,
0.051361083984375,
-0.037872314453125,
-0.005161285400390625,
-0.0165863037109375,
-0.0141448974609375,
-0.0195159912109375,
0.07861328125,
0.0010967254638671875,
0.0562744140625,
-0.0152587890625,
0.0693359375,
0.012664794921875,
0.0019464492797851562,
-0.020660400390625,
-0.020416259765625,
-0.01232147216796875,
-0.034942626953125,
-0.003543853759765625,
-0.017333984375,
-0.01171875,
0.051177978515625,
0.07794189453125,
0.0009965896606445312,
-0.0069732666015625,
-0.034088134765625,
-0.0004973411560058594,
-0.02484130859375,
0.048675537109375,
-0.0260162353515625,
-0.027496337890625,
0.017547607421875,
-0.05230712890625,
-0.016937255859375,
0.0035305023193359375,
0.01104736328125,
0.051513671875,
-0.03814697265625,
0.038330078125,
0.006328582763671875,
-0.1004638671875,
0.10894775390625,
0.05108642578125,
0.040008544921875,
0.0560302734375,
-0.030426025390625,
0.020355224609375,
-0.00791168212890625,
0.003787994384765625,
0.00229644775390625,
-0.006237030029296875,
0.07037353515625,
0.0135650634765625,
-0.031646728515625,
0.06756591796875,
-0.030731201171875,
0.04803466796875,
0.058135986328125,
0.07037353515625,
-0.082275390625,
0.0157012939453125,
0.001377105712890625,
-0.004180908203125,
0.0523681640625,
-0.03778076171875,
0.0094451904296875,
-0.0380859375,
0.07489013671875,
0.0196075439453125,
-0.013824462890625,
0.0202789306640625,
-0.014007568359375,
-0.006832122802734375,
-0.040771484375,
0.0088653564453125,
-0.00366973876953125,
-0.0020275115966796875,
0.024017333984375,
-0.00777435302734375,
0.0023441314697265625,
0.01139068603515625,
-0.0177764892578125,
-0.018585205078125,
-0.0171966552734375,
-0.0157318115234375,
0.01485443115234375,
-0.05596923828125,
0.035125732421875,
0.027435302734375,
0.0260009765625,
0.053436279296875,
0.050445556640625,
-0.001873016357421875,
0.0105743408203125,
0.010894775390625,
0.0172119140625,
-0.0306243896484375,
-0.030975341796875,
0.0026836395263671875,
-0.01290130615234375,
-0.0204315185546875,
0.01141357421875,
-0.0111236572265625,
-0.041534423828125,
0.004932403564453125,
0.04315185546875,
0.07568359375,
0.0033721923828125,
-0.04888916015625,
0.0364990234375,
-0.0032958984375,
-0.02935791015625,
0.03143310546875,
0.0052337646484375,
-0.0242919921875,
-0.0045318603515625,
0.025054931640625,
-0.040740966796875,
-0.01898193359375,
0.031036376953125,
-0.09515380859375,
0.0997314453125,
0.00189208984375,
0.03826904296875,
-0.0175018310546875,
0.036102294921875,
-0.0178375244140625,
0.007648468017578125,
-0.0222015380859375,
0.05718994140625,
0.051727294921875,
0.036224365234375,
-0.0462646484375,
-0.0262298583984375,
0.0009794235229492188,
0.07171630859375,
0.03240966796875,
0.01453399658203125,
-0.0253143310546875,
-0.01519775390625,
0.01203155517578125,
0.0270843505859375,
-0.006046295166015625,
0.025390625,
-0.0144500732421875,
0.0253753662109375,
0.02069091796875,
-0.04547119140625,
0.0201263427734375,
-0.007770538330078125,
-0.034576416015625,
-0.003662109375,
0.0007977485656738281,
-0.01221466064453125,
-0.031829833984375,
0.0297393798828125,
-0.0178070068359375,
-0.029541015625,
0.0079345703125,
-0.041412353515625,
0.006313323974609375,
0.002872467041015625,
-0.0118865966796875,
0.039886474609375,
-0.020233154296875,
-0.00463104248046875,
0.016693115234375,
0.019622802734375,
0.041717529296875,
0.0313720703125,
0.0164642333984375,
0.0254364013671875,
0.021240234375,
0.021484375,
0.0249176025390625,
-0.01006317138671875,
0.07904052734375,
0.01187896728515625,
0.0105743408203125,
-0.051910400390625,
0.0269775390625,
0.010009765625,
0.061981201171875,
-0.0633544921875,
-0.03167724609375,
0.00963592529296875,
-0.0084381103515625,
-0.0005650520324707031,
-0.0026531219482421875,
0.02587890625,
-0.0159759521484375,
0.0000034570693969726562,
-0.040740966796875,
0.0031566619873046875,
-0.005565643310546875,
0.0055389404296875,
-0.03704833984375,
-0.02557373046875,
0.0182037353515625,
0.01629638671875,
-0.054351806640625,
0.0134735107421875,
0.022216796875,
0.059661865234375,
0.03759765625,
0.0269775390625,
0.004673004150390625,
-0.0305328369140625,
-0.0116729736328125,
0.0037746429443359375,
-0.0115966796875,
0.0180511474609375,
-0.0254974365234375,
-0.019866943359375,
0.0232391357421875,
0.033233642578125,
0.00453948974609375,
0.039886474609375,
0.04071044921875,
0.039154052734375,
0.01395416259765625,
-0.01116943359375,
0.0257415771484375,
-0.0238189697265625,
0.0084228515625,
-0.041259765625,
0.02294921875,
-0.008148193359375,
-0.0014629364013671875,
-0.015655517578125,
0.0214996337890625,
0.01526641845703125,
-0.02734375,
0.036590576171875,
-0.00812530517578125,
-0.0170440673828125,
0.05035400390625,
0.0093536376953125,
0.073974609375,
0.01245880126953125,
-0.048004150390625,
0.00444793701171875,
-0.03277587890625,
-0.0653076171875,
0.019927978515625,
0.0400390625,
-0.035247802734375,
0.02752685546875,
0.0178985595703125,
0.019287109375,
0.034454345703125,
-0.0178375244140625,
-0.004589080810546875,
0.032470703125,
0.042938232421875,
0.0263519287109375,
-0.0458984375,
-0.024993896484375,
-0.0027828216552734375,
0.0386962890625,
-0.012542724609375,
0.06781005859375,
-0.0264892578125,
0.0004973411560058594,
-0.028900146484375,
-0.008758544921875,
-0.0028934478759765625,
-0.044830322265625,
0.049163818359375,
0.04217529296875,
0.0079498291015625,
-0.0252227783203125,
0.0017948150634765625,
0.033905029296875,
0.044891357421875,
-0.0202789306640625,
0.004547119140625,
0.0075836181640625,
0.0131988525390625,
-0.00762939453125,
0.0157928466796875,
-0.0207061767578125,
0.013946533203125,
-0.023101806640625,
-0.02838134765625,
0.05108642578125,
0.015380859375,
-0.005596160888671875,
0.0394287109375,
0.0240325927734375,
-0.0030727386474609375,
-0.0013647079467773438,
-0.0025501251220703125,
0.0011043548583984375,
0.0277862548828125,
-0.003459930419921875,
-0.019805908203125,
0.01873779296875,
-0.01067352294921875,
0.025970458984375,
-0.01195526123046875,
0.045867919921875,
0.030029296875,
-0.0697021484375,
0.0176544189453125,
0.016204833984375,
0.01409149169921875,
-0.039031982421875,
-0.018463134765625,
0.041900634765625,
-0.00653076171875,
-0.0207366943359375,
0.007610321044921875,
-0.023223876953125,
-0.022216796875,
0.0015611648559570312,
0.027587890625,
-0.01119232177734375,
0.0016307830810546875,
-0.0732421875,
0.0181427001953125,
0.0306854248046875,
0.01038360595703125,
-0.038543701171875,
0.04248046875,
-0.025146484375,
0.01532745361328125,
0.00774383544921875,
-0.03009033203125,
0.018890380859375,
0.07147216796875,
0.004974365234375,
0.01873779296875,
-0.0279998779296875,
-0.0208282470703125,
-0.0084991455078125,
0.005092620849609375,
0.0034465789794921875,
-0.01971435546875,
0.0216064453125,
0.0220947265625,
0.0264892578125,
0.0572509765625,
0.005298614501953125,
-0.0302886962890625,
0.010528564453125,
-0.00437164306640625,
0.00795745849609375,
-0.0198211669921875,
-0.007259368896484375,
-0.0212860107421875,
0.0083770751953125,
0.0015707015991210938,
0.01255035400390625,
0.0364990234375,
-0.01187896728515625,
-0.045806884765625,
0.0087890625,
0.01183319091796875,
-0.0347900390625,
-0.062042236328125,
0.0132598876953125,
0.00583648681640625,
0.04437255859375,
-0.0117950439453125,
-0.005710601806640625,
-0.0195465087890625,
0.0166015625,
0.01235198974609375,
-0.008819580078125,
0.05157470703125,
-0.006229400634765625,
-0.05804443359375,
-0.0274505615234375,
-0.032684326171875,
-0.0198974609375,
-0.0169677734375,
-0.01666259765625,
0.0189971923828125,
0.01273345947265625,
-0.03851318359375,
-0.039520263671875,
0.01293182373046875,
0.036041259765625,
0.0020542144775390625,
-0.01326751708984375,
-0.018341064453125,
-0.0018796920776367188,
0.0660400390625,
0.02606201171875,
0.0212249755859375,
-0.0307159423828125,
0.037567138671875,
-0.05426025390625,
-0.06170654296875,
-0.00536346435546875,
0.01202392578125,
-0.03411865234375,
0.005832672119140625,
0.0187225341796875,
-0.01568603515625,
0.0068511962890625,
0.01389312744140625,
-0.016693115234375,
0.01479339599609375,
0.041778564453125,
-0.0029926300048828125,
-0.05279541015625,
-0.01334381103515625,
0.0865478515625,
-0.047454833984375,
0.00628662109375,
-0.0026836395263671875,
0.018768310546875,
0.037200927734375,
-0.016693115234375,
-0.00583648681640625,
0.0270538330078125,
-0.06689453125,
0.0072174072265625,
-0.03338623046875,
0.048980712890625,
-0.061279296875,
-0.004680633544921875,
-0.0095672607421875,
0.025848388671875,
-0.004726409912109375,
0.0270233154296875,
-0.021759033203125,
0.0732421875,
0.0236053466796875,
0.06158447265625,
-0.0161590576171875,
-0.006992340087890625,
-0.01800537109375,
0.0229339599609375,
0.0290069580078125,
0.000980377197265625,
0.06488037109375,
-0.0274505615234375,
-0.0055999755859375,
-0.043060302734375,
-0.032135009765625,
-0.043670654296875,
0.015289306640625,
-0.0108642578125,
-0.034210205078125,
0.031707763671875
] |
25016079b5ab716979461f5a7b00eb5048ca454a
|
Wordpress Stackexchange
Q: Add Commas Between Menu Items? I created a menu in wordpress in the Menus section of the backend is there any way to display the menu links with commas so it displays as Link1, Link2, Link3, Link4?
A: Yes you can, when declaring your wp_nav_menu function you do it like so;
$defaults = array(
//for a full list of parameters see codex link below
'before' => '',
'after' => '<span class="comma">,</span>',
);
wp_nav_menu( $defaults );
Then in your WordPress menu under Appearance -> Menus, you will add a class name such as nocomma to the last menu item, in your case, Link 4...
...and in your CSS file you add,
.nocomma .comma {display:none;}
That's why we wrap the comma in a <span> tag. Of course there are other ways you could go about achieving your outcome but this is one of the more simple approaches to an equally simple problem.
Codex references:
http://codex.wordpress.org/Function_Reference/wp_nav_menu
|
Q: Add Commas Between Menu Items? I created a menu in wordpress in the Menus section of the backend is there any way to display the menu links with commas so it displays as Link1, Link2, Link3, Link4?
A: Yes you can, when declaring your wp_nav_menu function you do it like so;
$defaults = array(
//for a full list of parameters see codex link below
'before' => '',
'after' => '<span class="comma">,</span>',
);
wp_nav_menu( $defaults );
Then in your WordPress menu under Appearance -> Menus, you will add a class name such as nocomma to the last menu item, in your case, Link 4...
...and in your CSS file you add,
.nocomma .comma {display:none;}
That's why we wrap the comma in a <span> tag. Of course there are other ways you could go about achieving your outcome but this is one of the more simple approaches to an equally simple problem.
Codex references:
http://codex.wordpress.org/Function_Reference/wp_nav_menu
A: Use a very simple custom walker …
class WPSE_82726_Comma_Walker extends Walker
{
public function walk( $elements, $max_depth )
{
$list = array ();
foreach ( $elements as $item )
$list[] = "<a href='$item->url'>$item->title</a>";
return join( ', ', $list );
}
}
… and call your menu like this:
wp_nav_menu(
array (
'theme_location' => 'your_registered_theme_location',
'walker' => new WPSE_82726_Comma_Walker,
'items_wrap' => '<p class="menu">%3$s</p>'
)
);
Fast and efficient. :)
|
wordpress
|
{
"language": "en",
"length": 223,
"provenance": "stackexchange_00019.jsonl.gz:428154",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82726"
}
|
[
0.05804443359375,
0.00933074951171875,
0.01678466796875,
-0.01392364501953125,
0.038421630859375,
-0.0192718505859375,
0.06439208984375,
-0.04010009765625,
-0.0270538330078125,
0.01824951171875,
-0.0142822265625,
0.0021533966064453125,
-0.0218048095703125,
-0.03131103515625,
0.006198883056640625,
-0.043975830078125,
0.0038471221923828125,
0.0196533203125,
0.0242462158203125,
-0.0021076202392578125,
-0.01302337646484375,
-0.005931854248046875,
0.023406982421875,
0.0262908935546875,
0.0003998279571533203,
0.0018939971923828125,
0.05487060546875,
-0.032623291015625,
0.0028400421142578125,
-0.0161590576171875,
-0.00434112548828125,
-0.01320648193359375,
0.0171966552734375,
0.006336212158203125,
0.003936767578125,
0.0010442733764648438,
-0.0013828277587890625,
-0.0005006790161132812,
0.013214111328125,
0.0014400482177734375,
0.01617431640625,
-0.002895355224609375,
0.0312042236328125,
0.02105712890625,
-0.00537872314453125,
-0.00189971923828125,
0.003231048583984375,
-0.04443359375,
0.013427734375,
-0.043060302734375,
0.0302734375,
0.02325439453125,
0.04193115234375,
-0.0012922286987304688,
-0.01312255859375,
0.004550933837890625,
-0.0170135498046875,
-0.004459381103515625,
0.023284912109375,
0.038177490234375,
0.004241943359375,
-0.0014820098876953125,
-0.0006799697875976562,
-0.051605224609375,
0.0083160400390625,
0.0172576904296875,
0.002410888671875,
0.0133056640625,
-0.03350830078125,
0.0160064697265625,
0.0142974853515625,
-0.037109375,
-0.0006985664367675781,
-0.024139404296875,
0.0173797607421875,
0.0004706382751464844,
-0.02313232421875,
-0.025726318359375,
0.03582763671875,
0.00855255126953125,
0.023040771484375,
0.04156494140625,
-0.00754547119140625,
-0.02923583984375,
0.031829833984375,
0.00047278404235839844,
-0.007781982421875,
-0.020111083984375,
0.00640869140625,
-0.04132080078125,
-0.00646209716796875,
-0.007755279541015625,
-0.032562255859375,
0.03179931640625,
-0.0247955322265625,
-0.00594329833984375,
-0.0059814453125,
0.01320648193359375,
-0.0033931732177734375,
0.0224456787109375,
-0.017486572265625,
-0.018402099609375,
0.025146484375,
-0.0325927734375,
0.0008363723754882812,
0.027069091796875,
0.0062408447265625,
0.04541015625,
0.045806884765625,
0.04443359375,
0.01169586181640625,
0.0247802734375,
-0.0008521080017089844,
-0.049163818359375,
-0.00707244873046875,
0.0227508544921875,
-0.01184844970703125,
0.024383544921875,
0.024139404296875,
-0.0212860107421875,
-0.0276031494140625,
0.00522613525390625,
-0.0133819580078125,
0.03802490234375,
0.01236724853515625,
0.02532958984375,
0.0262451171875,
-0.025115966796875,
-0.044830322265625,
0.052520751953125,
-0.015716552734375,
0.00983428955078125,
0.041961669921875,
0.04052734375,
-0.01422119140625,
-0.0260772705078125,
0.00789642333984375,
-0.05853271484375,
-0.03155517578125,
0.03912353515625,
-0.03753662109375,
-0.0166473388671875,
0.01111602783203125,
-0.04833984375,
0.055877685546875,
0.014862060546875,
0.029815673828125,
0.010772705078125,
0.0135498046875,
-0.044158935546875,
0.052093505859375,
-0.01139068603515625,
0.0645751953125,
-0.0149078369140625,
-0.0975341796875,
-0.0155487060546875,
-0.050384521484375,
-0.0036792755126953125,
-0.050384521484375,
-0.0300140380859375,
-0.024871826171875,
-0.027191162109375,
0.005626678466796875,
-0.0902099609375,
-0.093994140625,
0.040985107421875,
-0.058349609375,
-0.0175323486328125,
0.0305023193359375,
0.0178070068359375,
0.019378662109375,
0.006313323974609375,
0.003459930419921875,
0.01366424560546875,
-0.0028667449951171875,
-0.0008568763732910156,
0.0260467529296875,
-0.0012445449829101562,
0.01432037353515625,
0.049072265625,
0.00986480712890625,
-0.02117919921875,
0.03826904296875,
-0.00901031494140625,
-0.09405517578125,
0.04583740234375,
0.0031337738037109375,
0.1204833984375,
0.0401611328125,
0.0265960693359375,
0.033721923828125,
-0.038238525390625,
-0.0254058837890625,
0.0251007080078125,
-0.0139007568359375,
-0.035491943359375,
-0.0038013458251953125,
-0.0016412734985351562,
-0.020477294921875,
-0.0009164810180664062,
-0.03338623046875,
0.049713134765625,
-0.0161590576171875,
0.02294921875,
-0.06280517578125,
0.042388916015625,
-0.03436279296875,
0.06182861328125,
-0.0285797119140625,
0.01293182373046875,
0.01263427734375,
0.0095062255859375,
0.00026488304138183594,
-0.042938232421875,
0.0233154296875,
0.041778564453125,
-0.0061187744140625,
0.0662841796875,
0.0028133392333984375,
-0.007198333740234375,
0.0227508544921875,
-0.0156402587890625,
0.03955078125,
0.0301666259765625,
0.0230560302734375,
-0.019134521484375,
-0.034820556640625,
-0.034271240234375,
-0.02581787109375,
0.0004429817199707031,
-0.03936767578125,
0.0660400390625,
0.025848388671875,
0.0270843505859375,
-0.032806396484375,
0.01023101806640625,
0.006328582763671875,
-0.0283355712890625,
0.006816864013671875,
0.035552978515625,
0.03326416015625,
0.0091552734375,
-0.00849151611328125,
-0.046722412109375,
0.025970458984375,
-0.043243408203125,
0.026336669921875,
-0.053009033203125,
-0.037384033203125,
-0.027435302734375,
0.0406494140625,
-0.010162353515625,
0.0236053466796875,
-0.00431060791015625,
0.00791168212890625,
0.018035888671875,
-0.0106964111328125,
0.0079498291015625,
0.0198974609375,
-0.01451873779296875,
-0.002758026123046875,
0.0006508827209472656,
0.00872039794921875,
-0.022613525390625,
0.02020263671875,
-0.01407623291015625,
0.0010509490966796875,
-0.002895355224609375,
-0.0330810546875,
0.00809478759765625,
0.039794921875,
0.004505157470703125,
0.0080718994140625,
0.00670623779296875,
-0.051788330078125,
-0.0005049705505371094,
-0.0137481689453125,
0.0243377685546875,
-0.0036773681640625,
-0.02880859375,
-0.02154541015625,
0.02490234375,
0.0318603515625,
-0.017913818359375,
-0.00769805908203125,
-0.007343292236328125,
0.0299530029296875,
-0.0222015380859375,
-0.0238494873046875,
-0.0028438568115234375,
0.042266845703125,
0.0132904052734375,
-0.031097412109375,
0.0027866363525390625,
-0.023284912109375,
-0.01549530029296875,
0.01459503173828125,
0.026397705078125,
-0.0002586841583251953,
0.004886627197265625,
0.01092529296875,
0.031951904296875,
-0.023223876953125,
-0.0094757080078125,
-0.0011796951293945312,
0.0303497314453125,
0.006988525390625,
0.010711669921875,
-0.0078125,
-0.031280517578125,
-0.00774383544921875,
0.01116943359375,
-0.0079498291015625,
0.00925445556640625,
-0.0256195068359375,
-0.043853759765625,
-0.0216217041015625,
-0.01971435546875,
-0.08294677734375,
-0.04644775390625,
0.04046630859375,
-0.017791748046875,
-0.01361846923828125,
0.062225341796875,
-0.0257415771484375,
-0.029815673828125,
0.08636474609375,
-0.01708984375,
0.0099334716796875,
-0.04656982421875,
-0.0134735107421875,
-0.04315185546875,
-0.053070068359375,
-0.002422332763671875,
0.014892578125,
0.0010309219360351562,
-0.00548553466796875,
0.035064697265625,
0.001796722412109375,
-0.0074920654296875,
0.02496337890625,
-0.0185089111328125,
0.004039764404296875,
-0.0131378173828125,
0.01641845703125,
-0.0182037353515625,
-0.006328582763671875,
-0.002788543701171875,
0.02935791015625,
0.032562255859375,
-0.02398681640625,
0.026092529296875,
0.002422332763671875,
0.0618896484375,
0.032958984375,
0.00669097900390625,
0.0015592575073242188,
0.076171875,
0.0258331298828125,
0.00672149658203125,
-0.055755615234375,
0.005588531494140625,
-0.0310516357421875,
0.041412353515625,
0.0182952880859375,
-0.005001068115234375,
-0.032928466796875,
0.048095703125,
0.0025501251220703125,
-0.0148162841796875,
0.06195068359375,
-0.037322998046875,
-0.007122039794921875,
-0.0125579833984375,
-0.01271820068359375,
-0.044769287109375,
0.0447998046875,
-0.00328826904296875,
0.03436279296875,
0.02471923828125,
-0.000579833984375,
-0.0215606689453125,
0.0201568603515625,
-0.045989990234375,
-0.05023193359375,
0.030242919921875,
-0.041290283203125,
0.033447265625,
-0.036865234375,
-0.0171661376953125,
-0.0112457275390625,
0.0936279296875,
-0.033203125,
-0.029541015625,
-0.00882720947265625,
0.029144287109375,
0.0080108642578125,
-0.0428466796875,
0.0017461776733398438,
-0.0255126953125,
-0.049407958984375,
0.060821533203125,
0.01129913330078125,
0.00421142578125,
-0.036590576171875,
0.01273345947265625,
-0.036407470703125,
-0.0214080810546875,
0.026611328125,
-0.027130126953125,
-0.03656005859375,
0.0283660888671875,
-0.0498046875,
-0.02008056640625,
-0.0135650634765625,
-0.0161285400390625,
-0.06591796875,
-0.036590576171875,
-0.0019521713256835938,
0.0943603515625,
0.0263671875,
-0.042755126953125,
0.0279388427734375,
0.0799560546875,
0.01558685302734375,
0.019866943359375,
0.021270751953125,
0.0193023681640625,
-0.0293426513671875,
-0.031097412109375,
0.0176239013671875,
-0.049835205078125,
-0.0035114288330078125,
-0.0254364013671875,
-0.01983642578125,
0.01126861572265625,
-0.0195159912109375,
0.009979248046875,
0.0096893310546875,
-0.008636474609375,
-0.04400634765625,
-0.043182373046875,
-0.01287078857421875,
0.02191162109375,
0.0068817138671875,
0.005035400390625,
-0.049072265625,
-0.06878662109375,
-0.0037975311279296875,
-0.04833984375,
-0.027740478515625,
0.032012939453125,
0.02911376953125,
0.0222625732421875,
0.0001233816146850586,
-0.0418701171875,
0.0287628173828125,
0.04620361328125,
-0.0177459716796875,
0.0195465087890625,
-0.001953125,
-0.0399169921875,
0.06256103515625,
0.007904052734375,
0.01428985595703125,
-0.00707244873046875,
0.057952880859375,
0.01056671142578125,
-0.0002218484878540039,
0.024139404296875,
0.01312255859375,
-0.054412841796875,
0.00827789306640625,
0.0133209228515625,
-0.0258331298828125,
0.0060577392578125,
0.054656982421875,
0.036041259765625,
-0.04052734375,
-0.0640869140625,
-0.00605010986328125,
-0.00237274169921875,
-0.01357269287109375,
0.05792236328125,
0.027496337890625,
0.0045166015625,
0.0156707763671875,
0.058135986328125,
-0.0111236572265625,
0.0076141357421875,
-0.022979736328125,
0.009735107421875,
0.043304443359375,
-0.0421142578125,
-0.0117645263671875,
0.0130462646484375,
-0.0034122467041015625,
0.06005859375,
0.0107421875,
-0.00762176513671875,
-0.0714111328125,
-0.01479339599609375,
-0.0099945068359375,
-0.01087188720703125,
0.0447998046875,
0.02667236328125,
-0.0240478515625,
0.00531005859375,
-0.0098876953125,
0.0013685226440429688,
-0.027496337890625,
-0.035491943359375,
0.04241943359375,
0.027435302734375,
-0.0033473968505859375,
0.0168609619140625,
0.07305908203125,
0.0355224609375,
0.0276336669921875,
-0.019561767578125,
-0.0189971923828125,
-0.030059814453125,
0.050262451171875,
0.03118896484375,
-0.02056884765625,
-0.0091552734375,
0.047821044921875,
0.0252838134765625,
-0.0270233154296875,
-0.02801513671875,
0.0261077880859375,
0.038177490234375,
-0.00536346435546875,
-0.00388336181640625,
-0.0158843994140625,
-0.01276397705078125,
-0.005832672119140625,
0.04852294921875,
-0.0237579345703125,
-0.04278564453125,
-0.05767822265625,
-0.025360107421875,
0.046295166015625,
-0.0191497802734375,
-0.01519012451171875,
0.010833740234375,
-0.007434844970703125,
0.05426025390625,
-0.028167724609375,
0.0146942138671875,
0.00579071044921875,
-0.00106048583984375,
0.001739501953125,
0.00603485107421875,
0.01666259765625,
-0.085205078125,
-0.021514892578125,
-0.031707763671875,
-0.0191802978515625,
0.058990478515625,
-0.056549072265625,
0.0182647705078125,
-0.0171356201171875,
0.0192718505859375,
-0.034210205078125,
0.0237579345703125,
0.01428985595703125,
0.0246124267578125,
-0.017608642578125,
-0.0125579833984375,
-0.02508544921875,
-0.018951416015625,
0.003955841064453125,
-0.005023956298828125,
-0.0188751220703125,
-0.021453857421875,
-0.0149688720703125,
-0.004215240478515625,
0.0126800537109375,
0.017578125,
-0.03179931640625,
0.041656494140625,
0.0258941650390625,
0.02056884765625,
0.025360107421875,
0.0372314453125,
-0.0306243896484375,
0.040557861328125,
0.017974853515625,
0.014923095703125,
-0.01910400390625,
-0.03338623046875,
0.0306549072265625,
-0.00830078125,
-0.052154541015625,
-0.0140228271484375,
-0.03485107421875,
-0.0055694580078125,
0.0396728515625,
-0.0242462158203125,
0.0248565673828125,
-0.00861358642578125,
0.0185546875,
-0.0085296630859375,
0.0008311271667480469,
-0.02667236328125,
-0.0150299072265625,
0.046630859375,
-0.0016765594482421875,
0.06439208984375,
-0.00412750244140625,
0.00009548664093017578,
0.01213836669921875,
-0.01520538330078125,
0.0360107421875,
0.01338958740234375,
-0.0706787109375,
0.0372314453125,
0.04888916015625,
0.02532958984375,
0.0426025390625,
-0.0008878707885742188,
0.0176849365234375,
0.02880859375,
-0.0304412841796875,
0.0242462158203125,
0.0478515625,
0.038299560546875,
-0.016815185546875,
0.0164337158203125,
0.02880859375,
-0.0166778564453125,
0.031707763671875,
0.052215576171875,
0.0849609375,
-0.07208251953125,
0.0117950439453125,
0.019561767578125,
-0.025299072265625,
0.060546875,
0.0117645263671875,
-0.0028476715087890625,
0.0008153915405273438,
0.0026397705078125,
-0.0171661376953125,
-0.0178070068359375,
0.00830841064453125,
0.02325439453125,
0.005397796630859375,
-0.0036373138427734375,
0.0009284019470214844,
-0.004016876220703125,
-0.028564453125,
-0.0234222412109375,
0.019805908203125,
-0.004726409912109375,
-0.0183868408203125,
-0.0178375244140625,
0.0224456787109375,
-0.03265380859375,
-0.05364990234375,
0.0270843505859375,
-0.053802490234375,
0.0260162353515625,
0.016815185546875,
0.0013418197631835938,
-0.01061248779296875,
0.04241943359375,
-0.029541015625,
0.0246124267578125,
0.0127716064453125,
-0.020751953125,
0.01470947265625,
-0.0152435302734375,
0.0096282958984375,
0.019073486328125,
-0.03997802734375,
0.00463104248046875,
-0.003543853759765625,
-0.005184173583984375,
-0.005336761474609375,
-0.0018491744995117188,
0.1004638671875,
-0.033416748046875,
-0.038299560546875,
-0.0063629150390625,
-0.016845703125,
0.01226806640625,
-0.00905609130859375,
0.0232696533203125,
-0.034912109375,
-0.0171051025390625,
-0.01044464111328125,
-0.040771484375,
0.005130767822265625,
-0.026214599609375,
-0.0119781494140625,
0.0789794921875,
-0.033599853515625,
-0.023773193359375,
0.01904296875,
0.056793212890625,
0.0118865966796875,
0.05560302734375,
-0.0296783447265625,
0.04998779296875,
0.0194091796875,
0.0533447265625,
-0.031707763671875,
-0.0197906494140625,
0.04052734375,
0.053436279296875,
-0.024749755859375,
-0.01273345947265625,
0.0222625732421875,
0.031158447265625,
0.0626220703125,
0.0256805419921875,
0.007022857666015625,
-0.0031795501708984375,
-0.00301361083984375,
-0.054229736328125,
0.0018587112426757812,
0.037445068359375,
0.03179931640625,
-0.0182342529296875,
-0.0279541015625,
0.0078277587890625,
0.01385498046875,
0.0303497314453125,
-0.06524658203125,
0.01800537109375,
0.0034542083740234375,
-0.040313720703125,
-0.0112457275390625,
0.0005731582641601562,
0.00505828857421875,
0.0268096923828125,
-0.01187896728515625,
-0.038543701171875,
-0.040985107421875,
-0.026458740234375,
0.0182037353515625,
-0.0191650390625,
0.01007843017578125,
0.04400634765625,
-0.0017366409301757812,
0.0243377685546875,
0.0110015869140625,
-0.001758575439453125,
-0.0012521743774414062,
0.006893157958984375,
0.059112548828125,
0.031951904296875,
0.03948974609375,
-0.042236328125,
-0.0633544921875,
0.05029296875,
0.097900390625,
-0.01763916015625,
-0.040557861328125,
0.00044155120849609375,
0.01142120361328125,
0.0018529891967773438,
0.0082244873046875,
0.0091552734375,
0.004238128662109375,
0.045318603515625,
0.03839111328125,
-0.01409912109375,
-0.0011548995971679688,
-0.0024242401123046875,
0.0277862548828125,
0.0762939453125,
0.00020325183868408203,
-0.00028514862060546875,
-0.07989501953125,
0.0299835205078125,
0.026611328125,
0.06768798828125,
0.01540374755859375,
0.06622314453125,
0.0257110595703125,
-0.025848388671875,
0.02044677734375,
0.01107025146484375,
0.0218353271484375,
-0.03289794921875,
0.041046142578125,
0.0198211669921875,
-0.01323699951171875,
-0.01424407958984375,
0.0147705078125,
0.0154571533203125,
0.050994873046875,
0.0323486328125,
-0.032958984375,
-0.0193328857421875,
0.018402099609375,
-0.0218505859375,
-0.034088134765625,
-0.0266571044921875,
0.00980377197265625,
0.0400390625,
0.0143890380859375,
0.007801055908203125,
0.020721435546875,
0.045989990234375,
-0.021026611328125,
0.0205535888671875,
-0.005260467529296875,
0.01332855224609375,
0.0291595458984375,
-0.01151275634765625,
-0.016693115234375,
0.0034542083740234375,
-0.07305908203125,
-0.0153656005859375,
-0.021942138671875,
-0.046112060546875,
0.048492431640625,
0.050567626953125,
-0.01398468017578125,
0.0186767578125,
0.0028858184814453125,
-0.0189208984375,
-0.024871826171875,
0.0161895751953125,
0.0175628662109375,
0.0203857421875,
0.0288848876953125,
0.0245819091796875,
-0.0509033203125,
0.001506805419921875,
-0.02947998046875,
-0.0110015869140625,
0.05908203125,
-0.01537322998046875,
0.0538330078125,
0.03466796875,
-0.006580352783203125,
0.0208892822265625,
-0.0297393798828125,
-0.0157623291015625,
0.01537322998046875,
0.0069580078125,
0.005023956298828125,
-0.00843048095703125,
-0.0105133056640625,
0.0291595458984375,
0.0361328125,
-0.045684814453125,
0.0209197998046875,
0.005619049072265625,
0.003879547119140625,
-0.035980224609375,
0.050872802734375,
0.0140228271484375,
0.0016918182373046875,
-0.0038928985595703125,
0.0074920654296875,
0.051361083984375,
0.06622314453125,
-0.01837158203125,
0.0206451416015625,
-0.0030765533447265625,
-0.035369873046875,
0.03240966796875,
-0.0379638671875,
0.0501708984375,
0.02447509765625,
-0.01507568359375,
0.033599853515625,
0.0136260986328125,
-0.02008056640625,
0.01580810546875,
0.00780487060546875,
-0.014404296875,
0.00955963134765625,
-0.01385498046875,
0.0179901123046875,
0.045654296875,
0.07421875,
-0.005046844482421875,
0.036346435546875,
0.005161285400390625,
0.00354766845703125,
0.03411865234375,
-0.004810333251953125,
-0.052764892578125,
-0.0799560546875,
0.00884246826171875,
0.0264739990234375,
-0.06634521484375,
-0.029632568359375,
-0.129638671875,
-0.0100555419921875,
0.0249481201171875,
0.008758544921875,
-0.0256805419921875,
0.0225830078125,
-0.0062103271484375,
0.0013246536254882812,
-0.0101470947265625,
0.01267242431640625,
-0.001468658447265625,
-0.01690673828125,
-0.032958984375,
-0.039886474609375,
-0.0225372314453125,
0.0567626953125,
-0.0148162841796875,
-0.00882720947265625,
-0.0047607421875,
-0.003757476806640625,
-0.00537872314453125,
-0.00911712646484375,
0.006984710693359375,
0.0355224609375,
0.0311126708984375,
-0.01021575927734375,
-0.0215606689453125,
0.017333984375,
-0.0246429443359375,
-0.052978515625,
0.0093231201171875,
-0.0518798828125,
-0.02105712890625,
0.038421630859375,
-0.036865234375,
-0.01446533203125,
-0.06158447265625,
-0.09033203125,
0.075439453125,
-0.00839996337890625,
-0.033843994140625,
0.0311279296875,
-0.0416259765625,
-0.04718017578125,
0.00893402099609375,
0.0093994140625,
-0.026092529296875,
0.01546478271484375,
0.0556640625,
-0.001934051513671875,
0.042266845703125,
-0.01494598388671875,
0.0286865234375,
0.014862060546875,
0.03411865234375,
0.015838623046875,
-0.0275726318359375,
0.038238525390625,
-0.0377197265625,
0.04925537109375,
0.058441162109375,
-0.05072021484375,
-0.0096893310546875,
-0.0298614501953125,
-0.0096282958984375,
0.004695892333984375,
-0.026702880859375,
-0.00440216064453125,
-0.0215606689453125,
0.0175628662109375,
0.0131072998046875,
-0.0096282958984375,
0.00022292137145996094,
-0.0136871337890625,
0.006328582763671875,
0.0007905960083007812,
0.0083160400390625,
0.00994110107421875,
-0.02197265625,
-0.002277374267578125,
-0.0114288330078125,
-0.033355712890625,
0.00614166259765625,
0.00452423095703125,
-0.051239013671875,
0.0166473388671875,
0.0189666748046875,
0.0116119384765625,
-0.0574951171875,
-0.03363037109375,
0.040985107421875,
-0.0242156982421875,
-0.0024566650390625,
-0.0191497802734375,
0.03656005859375,
-0.0021610260009765625,
-0.017486572265625,
-0.034576416015625,
-0.0212249755859375,
-0.003021240234375,
0.028472900390625,
-0.019195556640625,
0.07196044921875,
-0.0247650146484375,
-0.01001739501953125,
-0.0238494873046875,
0.0328369140625,
-0.00592803955078125,
0.05767822265625,
0.01180267333984375,
0.03204345703125,
0.0249176025390625,
0.044708251953125,
-0.0212860107421875,
0.0455322265625,
-0.00484466552734375,
0.0389404296875,
-0.017364501953125,
0.005275726318359375,
0.01195526123046875,
-0.03564453125,
0.002742767333984375,
-0.0253753662109375,
-0.01214599609375,
-0.0584716796875,
0.01085662841796875,
-0.00020360946655273438,
-0.0002243518829345703,
0.037445068359375
] |
c769a07981f14072dba3cdacbd12771b50bae3f3
|
Wordpress Stackexchange
Q: Get categories for a specific post - Custom post type I'm trying to retrieve all the categories which are related to a specific post, using the wp_get_post_categories() function. The problem is that it is a custom post type, so I tried sending it in the $args array :
wp_get_post_categories($id,array('post_type'=>'product'));
but that returned an empty array as well.
What is the correct way of doing it?
A: Are you sure it a category, and not a custom taxonomy?
If it is a category try:
var_dump( wp_get_post_categories( $id ) );
or its equivalent since category is a taxonomy:
var_dump( wp_get_object_terms( $id, 'category' ) );
|
Q: Get categories for a specific post - Custom post type I'm trying to retrieve all the categories which are related to a specific post, using the wp_get_post_categories() function. The problem is that it is a custom post type, so I tried sending it in the $args array :
wp_get_post_categories($id,array('post_type'=>'product'));
but that returned an empty array as well.
What is the correct way of doing it?
A: Are you sure it a category, and not a custom taxonomy?
If it is a category try:
var_dump( wp_get_post_categories( $id ) );
or its equivalent since category is a taxonomy:
var_dump( wp_get_object_terms( $id, 'category' ) );
A: Your post-type product has probably it's own "category" taxonomy. Try:
wp_get_object_terms( $id, '<your-custom-product-category-taxonomy>', array( 'fields' => 'ids' ) );
|
wordpress
|
{
"language": "en",
"length": 123,
"provenance": "stackexchange_00019.jsonl.gz:428156",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82738"
}
|
[
0.032470703125,
-0.0160064697265625,
-0.0184478759765625,
-0.041046142578125,
0.01495361328125,
-0.03399658203125,
0.0433349609375,
0.0252685546875,
-0.040252685546875,
0.01203155517578125,
-0.006763458251953125,
0.00661468505859375,
-0.0311126708984375,
-0.032745361328125,
0.0166473388671875,
-0.0478515625,
0.03466796875,
0.004596710205078125,
0.0614013671875,
-0.0048675537109375,
0.030731201171875,
0.007598876953125,
0.045867919921875,
0.0218963623046875,
0.0296478271484375,
0.00025463104248046875,
0.034942626953125,
-0.0285186767578125,
0.0215301513671875,
-0.0215911865234375,
0.0305938720703125,
-0.00797271728515625,
0.00193023681640625,
0.004276275634765625,
0.04119873046875,
0.0133514404296875,
0.0159454345703125,
-0.002338409423828125,
0.041290283203125,
0.0084381103515625,
0.028839111328125,
-0.01490020751953125,
0.03753662109375,
0.01422882080078125,
0.00212860107421875,
-0.0172271728515625,
0.00531768798828125,
-0.056549072265625,
0.0189361572265625,
-0.03997802734375,
0.01503753662109375,
-0.006256103515625,
0.03875732421875,
-0.07049560546875,
-0.0310211181640625,
-0.0228118896484375,
-0.01544952392578125,
-0.0007462501525878906,
0.055267333984375,
-0.03546142578125,
-0.05828857421875,
-0.046234130859375,
0.050048828125,
-0.01412200927734375,
-0.009674072265625,
0.024200439453125,
0.04693603515625,
0.01114654541015625,
-0.042205810546875,
-0.03741455078125,
0.0245513916015625,
-0.01360321044921875,
0.0026569366455078125,
0.01145172119140625,
-0.01190948486328125,
-0.07208251953125,
0.040924072265625,
-0.0386962890625,
-0.0196075439453125,
0.0489501953125,
-0.021331787109375,
-0.0206146240234375,
-0.03375244140625,
0.0028018951416015625,
-0.021026611328125,
0.004467010498046875,
-0.027557373046875,
-0.0027904510498046875,
-0.019500732421875,
-0.0487060546875,
-0.0181427001953125,
-0.0386962890625,
-0.0662841796875,
0.0305938720703125,
0.007495880126953125,
-0.033203125,
0.0278167724609375,
0.036895751953125,
-0.01146697998046875,
0.0029811859130859375,
0.0005307197570800781,
-0.04766845703125,
0.0277862548828125,
-0.028717041015625,
0.0302276611328125,
0.00458526611328125,
-0.0294189453125,
-0.006862640380859375,
0.08074951171875,
0.04705810546875,
0.0167083740234375,
0.06158447265625,
0.00806427001953125,
-0.004119873046875,
-0.0282745361328125,
0.0310821533203125,
-0.011444091796875,
0.00811767578125,
-0.0011415481567382812,
0.0262451171875,
0.0145111083984375,
0.048675537109375,
0.0296783447265625,
-0.036376953125,
0.005886077880859375,
0.0192108154296875,
-0.0145263671875,
-0.06781005859375,
0.01462554931640625,
0.00283050537109375,
-0.0562744140625,
0.01250457763671875,
0.046142578125,
0.01137542724609375,
0.0123291015625,
-0.018035888671875,
-0.0005412101745605469,
-0.01319122314453125,
-0.0010519027709960938,
0.0071563720703125,
0.030670166015625,
-0.0024623870849609375,
0.0214080810546875,
-0.0055999755859375,
0.015228271484375,
-0.001216888427734375,
0.00417327880859375,
0.0229949951171875,
0.01332855224609375,
0.00701141357421875,
0.0082855224609375,
-0.00554656982421875,
0.03173828125,
0.0257720947265625,
-0.0022411346435546875,
0.01271820068359375,
0.06695556640625,
-0.037200927734375,
-0.06182861328125,
-0.05828857421875,
0.03326416015625,
0.0008664131164550781,
-0.005279541015625,
0.01751708984375,
-0.01219940185546875,
0.01299285888671875,
-0.0294952392578125,
-0.00914764404296875,
0.0160980224609375,
0.0234832763671875,
0.0030879974365234375,
-0.024993896484375,
0.01212310791015625,
0.019256591796875,
0.0048980712890625,
0.01727294921875,
-0.02716064453125,
-0.01320648193359375,
0.039947509765625,
0.01849365234375,
-0.029449462890625,
-0.043487548828125,
-0.00701141357421875,
0.00024390220642089844,
-0.0430908203125,
0.039825439453125,
0.0141754150390625,
0.0687255859375,
0.00527191162109375,
0.00835418701171875,
0.0267333984375,
0.0229949951171875,
-0.05389404296875,
-0.0014982223510742188,
-0.005092620849609375,
0.0105133056640625,
-0.0223236083984375,
0.0012111663818359375,
-0.0136260986328125,
0.018218994140625,
0.00494384765625,
-0.0146484375,
-0.00453948974609375,
0.0024890899658203125,
-0.045166015625,
-0.00397491455078125,
-0.00327301025390625,
0.0296783447265625,
-0.00533294677734375,
0.0185394287109375,
0.02001953125,
0.00830078125,
-0.0242462158203125,
-0.037384033203125,
-0.02532958984375,
0.0232696533203125,
-0.0040130615234375,
0.00203704833984375,
-0.0273590087890625,
-0.023590087890625,
-0.034820556640625,
-0.02490234375,
-0.025848388671875,
0.059600830078125,
0.039886474609375,
0.045135498046875,
-0.0263671875,
0.0180816650390625,
0.035430908203125,
0.055267333984375,
-0.06689453125,
-0.031524658203125,
0.0204925537109375,
0.0289306640625,
-0.01389312744140625,
0.0033817291259765625,
0.059783935546875,
-0.021087646484375,
0.0181732177734375,
0.0295562744140625,
0.0239105224609375,
-0.0013113021850585938,
-0.0018815994262695312,
-0.003631591796875,
0.06280517578125,
-0.03466796875,
-0.0109100341796875,
-0.007320404052734375,
0.026336669921875,
0.040069580078125,
0.041900634765625,
0.01532745361328125,
0.020660400390625,
0.0169219970703125,
0.036224365234375,
0.031585693359375,
-0.01496124267578125,
0.008270263671875,
-0.0153961181640625,
0.007595062255859375,
-0.00838470458984375,
-0.04327392578125,
-0.01995849609375,
-0.0243682861328125,
0.050567626953125,
0.01445770263671875,
0.05023193359375,
0.0301971435546875,
-0.0253143310546875,
0.007495880126953125,
-0.002288818359375,
-0.0173797607421875,
-0.00711822509765625,
0.0180206298828125,
0.0287933349609375,
0.003177642822265625,
-0.03472900390625,
-0.00543975830078125,
0.02264404296875,
0.0030364990234375,
0.0116119384765625,
0.04248046875,
0.0155181884765625,
-0.005886077880859375,
-0.020477294921875,
-0.066650390625,
0.01131439208984375,
0.036590576171875,
-0.04510498046875,
-0.00559234619140625,
0.0196685791015625,
0.031524658203125,
-0.0089569091796875,
-0.003437042236328125,
-0.0205841064453125,
0.0216217041015625,
-0.0000972747802734375,
-0.06488037109375,
0.047882080078125,
-0.036041259765625,
0.042724609375,
0.08306884765625,
0.005809783935546875,
0.0154876708984375,
0.013031005859375,
-0.0114898681640625,
0.01641845703125,
0.0294952392578125,
0.0005097389221191406,
-0.0014238357543945312,
-0.0635986328125,
0.00699615478515625,
0.034393310546875,
0.0814208984375,
0.0030364990234375,
-0.04376220703125,
0.028411865234375,
0.055511474609375,
-0.04608154296875,
-0.05548095703125,
0.056304931640625,
-0.02264404296875,
0.004482269287109375,
-0.040496826171875,
-0.006557464599609375,
-0.0229034423828125,
-0.042449951171875,
-0.010833740234375,
0.032440185546875,
-0.01142120361328125,
-0.06317138671875,
-0.02520751953125,
-0.0797119140625,
-0.01824951171875,
-0.007415771484375,
0.0173797607421875,
0.01482391357421875,
0.077392578125,
0.0234527587890625,
-0.0450439453125,
0.0241241455078125,
0.042327880859375,
-0.03173828125,
-0.002376556396484375,
0.017333984375,
-0.005462646484375,
0.0196533203125,
0.012725830078125,
0.0040740966796875,
0.02374267578125,
-0.02520751953125,
-0.0289154052734375,
-0.00628662109375,
0.0338134765625,
0.029571533203125,
0.0236663818359375,
0.0021114349365234375,
0.06597900390625,
0.0513916015625,
-0.005649566650390625,
-0.003871917724609375,
-0.00676727294921875,
-0.00945281982421875,
0.00594329833984375,
-0.013580322265625,
-0.01210784912109375,
-0.02862548828125,
0.044677734375,
0.002593994140625,
0.01031494140625,
-0.019134521484375,
-0.036376953125,
0.050689697265625,
0.0174407958984375,
0.037445068359375,
0.00858306884765625,
-0.0230712890625,
-0.042938232421875,
0.027862548828125,
-0.0147552490234375,
-0.005405426025390625,
-0.03668212890625,
0.0222015380859375,
-0.051025390625,
-0.0875244140625,
0.042388916015625,
-0.052703857421875,
-0.012939453125,
-0.0305633544921875,
-0.0190582275390625,
0.02569580078125,
0.110107421875,
-0.0019512176513671875,
-0.019683837890625,
-0.0452880859375,
-0.001255035400390625,
-0.00304412841796875,
-0.0389404296875,
-0.0245361328125,
-0.0171356201171875,
-0.07257080078125,
-0.005756378173828125,
-0.0031070709228515625,
-0.0433349609375,
-0.0151824951171875,
0.042816162109375,
-0.0799560546875,
-0.0196685791015625,
0.047821044921875,
-0.064697265625,
0.0250701904296875,
0.0006837844848632812,
0.0235748291015625,
-0.038970947265625,
-0.037689208984375,
-0.009002685546875,
-0.040069580078125,
-0.000598907470703125,
0.020843505859375,
-0.0003750324249267578,
-0.0221405029296875,
0.0194854736328125,
0.006046295166015625,
0.04522705078125,
0.044158935546875,
0.01406097412109375,
0.0051116943359375,
-0.0100555419921875,
-0.0212554931640625,
-0.01763916015625,
0.0048370361328125,
-0.031341552734375,
-0.0172882080078125,
-0.0308990478515625,
0.0023403167724609375,
0.02728271484375,
-0.0256195068359375,
0.0077056884765625,
-0.0290679931640625,
-0.0121307373046875,
-0.03192138671875,
-0.00537109375,
-0.00615692138671875,
-0.0032863616943359375,
-0.016754150390625,
0.00693511962890625,
-0.003108978271484375,
-0.03167724609375,
0.045196533203125,
0.040557861328125,
-0.026702880859375,
-0.005176544189453125,
0.050048828125,
0.00829315185546875,
-0.046539306640625,
-0.07196044921875,
-0.0010280609130859375,
0.035675048828125,
-0.04412841796875,
0.043060302734375,
0.00374603271484375,
-0.033203125,
0.09332275390625,
-0.0104217529296875,
0.01137542724609375,
-0.0293121337890625,
0.0645751953125,
0.00342559814453125,
0.00931549072265625,
0.0079498291015625,
-0.0270843505859375,
0.01507568359375,
0.038360595703125,
-0.0218353271484375,
-0.030853271484375,
0.0205230712890625,
0.0604248046875,
-0.030426025390625,
0.007568359375,
-0.04296875,
-0.0225372314453125,
0.014190673828125,
0.0266265869140625,
0.0156707763671875,
0.0389404296875,
-0.0200653076171875,
0.0248565673828125,
-0.0047760009765625,
0.0008349418640136719,
-0.01323699951171875,
0.0228118896484375,
-0.01276397705078125,
0.019256591796875,
0.006900787353515625,
-0.0116119384765625,
-0.015655517578125,
0.0193328857421875,
-0.01261138916015625,
-0.01377105712890625,
-0.042144775390625,
-0.01593017578125,
-0.006603240966796875,
-0.0021820068359375,
0.0265045166015625,
-0.031768798828125,
0.050872802734375,
0.03802490234375,
0.004791259765625,
-0.0046234130859375,
-0.06854248046875,
0.005828857421875,
-0.04052734375,
-0.0183563232421875,
0.004238128662109375,
-0.018310546875,
0.00926971435546875,
0.050140380859375,
-0.024810791015625,
0.045135498046875,
-0.00862884521484375,
0.01812744140625,
0.029022216796875,
0.03863525390625,
0.024383544921875,
-0.0282745361328125,
-0.0235443115234375,
-0.00492095947265625,
-0.007289886474609375,
-0.05572509765625,
-0.00469970703125,
-0.01018524169921875,
0.060546875,
0.0004935264587402344,
-0.036346435546875,
0.041748046875,
-0.026824951171875,
-0.0162200927734375,
0.0192108154296875,
0.0193634033203125,
-0.014617919921875,
-0.0252227783203125,
-0.0159454345703125,
0.02252197265625,
0.018096923828125,
-0.0306396484375,
0.0149688720703125,
-0.037322998046875,
0.01385498046875,
0.01158905029296875,
-0.016265869140625,
0.0125579833984375,
0.017547607421875,
-0.07330322265625,
-0.0390625,
0.02362060546875,
-0.04107666015625,
0.006496429443359375,
-0.004627227783203125,
-0.058929443359375,
-0.013427734375,
-0.003055572509765625,
0.060546875,
-0.03204345703125,
-0.034454345703125,
-0.008819580078125,
-0.00736236572265625,
0.07122802734375,
0.0360107421875,
-0.041595458984375,
0.001773834228515625,
-0.037628173828125,
-0.0009112358093261719,
0.00768280029296875,
-0.047821044921875,
-0.027862548828125,
-0.019744873046875,
-0.0007977485656738281,
0.0158233642578125,
0.00644683837890625,
0.0083160400390625,
-0.034637451171875,
0.006923675537109375,
0.00402069091796875,
-0.00942230224609375,
-0.019927978515625,
0.0303192138671875,
0.01371002197265625,
0.049163818359375,
-0.01885986328125,
-0.01209259033203125,
-0.0218963623046875,
-0.01070404052734375,
-0.0233001708984375,
-0.06756591796875,
-0.0022983551025390625,
0.0188751220703125,
-0.018157958984375,
0.030914306640625,
0.026702880859375,
0.0136566162109375,
0.00455474853515625,
-0.0217742919921875,
-0.0009627342224121094,
-0.018768310546875,
0.0031299591064453125,
-0.017364501953125,
0.0005946159362792969,
0.0196990966796875,
-0.02117919921875,
0.003803253173828125,
0.0101776123046875,
-0.0036411285400390625,
0.0188751220703125,
-0.034698486328125,
0.03350830078125,
0.0236968994140625,
-0.005115509033203125,
0.0221099853515625,
0.03033447265625,
0.021820068359375,
0.03607177734375,
0.017974853515625,
0.041046142578125,
-0.0029506683349609375,
0.0374755859375,
0.0131683349609375,
-0.036102294921875,
0.03570556640625,
-0.0006909370422363281,
-0.0244293212890625,
-0.0013790130615234375,
-0.037261962890625,
-0.026092529296875,
0.020263671875,
0.041717529296875,
-0.050872802734375,
0.0097198486328125,
0.0343017578125,
0.01012420654296875,
-0.01027679443359375,
0.036163330078125,
-0.035797119140625,
-0.011993408203125,
-0.014068603515625,
-0.0550537109375,
-0.03533935546875,
-0.0180206298828125,
-0.003322601318359375,
0.00890350341796875,
-0.0125579833984375,
0.05584716796875,
0.01349639892578125,
-0.0238800048828125,
-0.022369384765625,
0.0177154541015625,
-0.0126190185546875,
-0.021087646484375,
0.0023441314697265625,
-0.000015735626220703125,
-0.013763427734375,
-0.0675048828125,
0.034881591796875,
-0.005542755126953125,
0.002635955810546875,
0.0030422210693359375,
-0.0292205810546875,
0.0130157470703125,
0.042724609375,
-0.01178741455078125,
0.0019817352294921875,
0.0232086181640625,
-0.054107666015625,
-0.0094146728515625,
-0.007244110107421875,
-0.001094818115234375,
0.056243896484375,
-0.050048828125,
0.01520538330078125,
-0.0207366943359375,
0.020416259765625,
-0.0178680419921875,
-0.023712158203125,
0.059478759765625,
-0.04058837890625,
0.0116424560546875,
0.0296173095703125,
0.05938720703125,
0.0012760162353515625,
-0.0016002655029296875,
0.0198822021484375,
-0.0018663406372070312,
0.0303497314453125,
0.004070281982421875,
0.031524658203125,
-0.004505157470703125,
0.01010894775390625,
-0.050140380859375,
0.01641845703125,
0.00380706787109375,
0.0191802978515625,
0.03155517578125,
-0.01236724853515625,
-0.0166778564453125,
-0.0247955322265625,
-0.0731201171875,
0.053314208984375,
0.045166015625,
0.0291595458984375,
-0.07220458984375,
-0.03192138671875,
-0.01137542724609375,
0.0389404296875,
0.0478515625,
0.0081329345703125,
-0.031707763671875,
-0.0166473388671875,
0.03204345703125,
0.054351806640625,
0.01372528076171875,
0.022064208984375,
0.01560211181640625,
0.0229339599609375,
0.0794677734375,
-0.01360321044921875,
0.058258056640625,
0.02203369140625,
-0.00052642822265625,
0.0124359130859375,
0.0275726318359375,
0.03704833984375,
-0.0106353759765625,
-0.0095977783203125,
-0.0285186767578125,
-0.00626373291015625,
0.024658203125,
-0.0274810791015625,
0.0229644775390625,
0.05474853515625,
0.0545654296875,
-0.04022216796875,
-0.01050567626953125,
-0.0306854248046875,
0.056732177734375,
-0.0169525146484375,
0.0171051025390625,
0.0186767578125,
0.0234527587890625,
0.04412841796875,
-0.01812744140625,
0.00795745849609375,
-0.0015716552734375,
-0.0029125213623046875,
0.07220458984375,
0.01503753662109375,
0.0054931640625,
-0.052703857421875,
0.0067138671875,
0.02423095703125,
0.0703125,
-0.0662841796875,
-0.09539794921875,
0.01898193359375,
0.01479339599609375,
0.017120361328125,
0.0279388427734375,
0.018035888671875,
0.01494598388671875,
0.09112548828125,
-0.06756591796875,
0.002834320068359375,
0.034576416015625,
0.054443359375,
-0.0081329345703125,
-0.04644775390625,
-0.0628662109375,
-0.031097412109375,
-0.050811767578125,
0.027435302734375,
0.008636474609375,
0.052459716796875,
0.027862548828125,
0.05029296875,
-0.040771484375,
-0.033843994140625,
0.041229248046875,
0.0014829635620117188,
-0.01776123046875,
-0.040740966796875,
0.034088134765625,
-0.03924560546875,
-0.0196533203125,
0.0120086669921875,
0.0171051025390625,
-0.016326904296875,
0.034759521484375,
0.03472900390625,
-0.01555633544921875,
-0.02166748046875,
0.0361328125,
0.004154205322265625,
-0.0033740997314453125,
-0.035308837890625,
0.01255035400390625,
0.0225830078125,
-0.005771636962890625,
0.01580810546875,
-0.0200042724609375,
0.058258056640625,
0.0187225341796875,
0.05810546875,
0.01235198974609375,
-0.0145721435546875,
0.037628173828125,
-0.01396942138671875,
0.07415771484375,
0.03289794921875,
-0.0667724609375,
-0.0099945068359375,
-0.063232421875,
-0.0173492431640625,
0.03997802734375,
0.0345458984375,
0.006336212158203125,
0.0105438232421875,
0.0080718994140625,
-0.04705810546875,
0.0250091552734375,
0.0296783447265625,
0.01026153564453125,
-0.0144805908203125,
-0.0050048828125,
-0.0198211669921875,
-0.016204833984375,
-0.00867462158203125,
0.00902557373046875,
0.01419830322265625,
0.033233642578125,
-0.0232086181640625,
0.0274810791015625,
0.02032470703125,
-0.0338134765625,
0.0780029296875,
-0.09881591796875,
-0.04766845703125,
0.05340576171875,
-0.01096343994140625,
0.0135345458984375,
0.002285003662109375,
0.0103302001953125,
0.001316070556640625,
0.06365966796875,
-0.042633056640625,
-0.01157379150390625,
0.0003619194030761719,
0.0226898193359375,
-0.037628173828125,
0.00649261474609375,
-0.0322265625,
-0.014923095703125,
-0.06390380859375,
-0.06036376953125,
0.040069580078125,
0.0216217041015625,
0.03662109375,
0.01181793212890625,
-0.006824493408203125,
-0.0208892822265625,
0.006877899169921875,
-0.00011092424392700195,
0.0031108856201171875,
0.03076171875,
-0.0012073516845703125,
-0.029876708984375,
0.00359344482421875,
-0.0180816650390625,
0.0096282958984375,
-0.000006735324859619141,
0.04833984375,
-0.0030364990234375,
0.0014619827270507812,
-0.03302001953125,
0.0248565673828125,
0.03485107421875,
-0.0203857421875,
0.0224609375,
-0.00347900390625,
-0.01727294921875,
-0.00806427001953125,
-0.041839599609375,
-0.044830322265625,
-0.0298919677734375,
0.006008148193359375,
0.0265655517578125,
0.00717926025390625,
-0.01287078857421875,
-0.042816162109375,
-0.0123748779296875,
0.034942626953125,
-0.01186370849609375,
-0.00434112548828125,
0.021392822265625,
-0.0474853515625,
-0.00617218017578125,
-0.0094757080078125,
-0.046234130859375,
0.035491943359375,
0.04766845703125,
-0.034332275390625,
0.02618408203125,
-0.00653076171875,
-0.0594482421875,
-0.0096282958984375,
0.0289306640625,
0.02777099609375,
-0.045623779296875,
-0.038726806640625,
0.078857421875,
0.03662109375,
0.10723876953125,
0.030181884765625,
-0.01309967041015625,
-0.0011034011840820312,
0.0338134765625,
-0.050628662109375,
-0.023529052734375,
0.048828125,
-0.0261077880859375,
-0.02630615234375,
0.0016336441040039062,
0.019256591796875,
0.051422119140625,
-0.00972747802734375,
-0.050750732421875,
0.037628173828125,
-0.0193023681640625,
-0.0347900390625,
-0.06854248046875,
0.033172607421875,
0.01274871826171875,
-0.0237274169921875,
-0.026214599609375,
-0.02435302734375,
-0.026031494140625,
0.0283355712890625,
0.0195770263671875,
0.00013566017150878906,
0.035125732421875,
0.0231170654296875,
-0.06500244140625,
0.0011606216430664062,
-0.0204620361328125,
-0.0013027191162109375,
-0.017120361328125,
0.011016845703125,
-0.0108795166015625,
0.0269317626953125,
-0.04278564453125,
-0.0157928466796875,
-0.00954437255859375,
0.0269012451171875,
0.0255126953125,
-0.04339599609375,
-0.05145263671875,
-0.06414794921875,
0.003124237060546875,
0.016387939453125,
0.0179443359375,
0.01342010498046875,
-0.040374755859375,
-0.0099945068359375,
-0.0177154541015625,
-0.01476287841796875,
0.0239410400390625,
-0.0535888671875,
0.00876617431640625,
-0.00507354736328125,
-0.00628662109375,
0.0164794921875,
-0.0016078948974609375,
-0.01340484619140625,
-0.00200653076171875,
-0.0018224716186523438,
-0.030731201171875,
-0.01995849609375,
0.05645751953125,
-0.046142578125,
0.00008231401443481445,
-0.0244598388671875,
-0.0162353515625,
-0.0206146240234375,
-0.032745361328125,
0.01050567626953125,
-0.007160186767578125,
0.002574920654296875,
-0.0009374618530273438,
-0.0053558349609375,
0.00992584228515625,
0.002948760986328125,
0.0246734619140625,
0.007305145263671875,
-0.00669097900390625,
0.021392822265625,
-0.0177001953125,
0.010650634765625,
0.002735137939453125,
0.043182373046875,
0.0269927978515625,
0.04718017578125,
0.016082763671875,
-0.01534271240234375,
-0.00772857666015625,
0.04998779296875,
0.01010894775390625,
-0.04248046875,
0.04034423828125,
-0.06488037109375,
-0.0007925033569335938,
0.0034656524658203125,
-0.0249786376953125,
-0.0030040740966796875,
0.005901336669921875,
0.0222625732421875,
-0.0173492431640625,
-0.00499725341796875
] |
b0c09d1ae9af99419d3b0be9ea2349183fd8c564
|
Wordpress Stackexchange
Q: Hide main div if wp_nav_menu is empty I want to hide the div class "navmain2" if the menu is empty. See code below:
<!-- Start main navigation -->
<div class="navmain2">
<div id="logo"></div>
<!-- Gets main menu by id -->
<span></span>
<?php
wp_nav_menu( array(
'menu' => 11,
'container' =>false,
'menu_class' => 'nav',
'echo' => true,
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'depth' => 0,
'walker' => new description_walker())
);
?>
<!-- /main menu -->
<div id="klicka">Click here! Click here! Click here</div>
</div><!-- /main navigation -->-->
I have a logo and a div with text inside navmain2 as you can see.
The question is:
Is it possible to hide the whole navmain2 div if the wp_nav_menu is empty?
A: If you wanted to check there is a menu assigned you could use has_nav_menu(). Passing through the registered menu id as registered via register_nav_menu()
<?php if ( has_nav_menu( 'primary' ) ) { ?>
<div class="navmain2">
</div>
<?php }
Note: This function will output the div if the location primary has a menu assigned, it will also output the div if the menu is assigned and empty
|
Q: Hide main div if wp_nav_menu is empty I want to hide the div class "navmain2" if the menu is empty. See code below:
<!-- Start main navigation -->
<div class="navmain2">
<div id="logo"></div>
<!-- Gets main menu by id -->
<span></span>
<?php
wp_nav_menu( array(
'menu' => 11,
'container' =>false,
'menu_class' => 'nav',
'echo' => true,
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'depth' => 0,
'walker' => new description_walker())
);
?>
<!-- /main menu -->
<div id="klicka">Click here! Click here! Click here</div>
</div><!-- /main navigation -->-->
I have a logo and a div with text inside navmain2 as you can see.
The question is:
Is it possible to hide the whole navmain2 div if the wp_nav_menu is empty?
A: If you wanted to check there is a menu assigned you could use has_nav_menu(). Passing through the registered menu id as registered via register_nav_menu()
<?php if ( has_nav_menu( 'primary' ) ) { ?>
<div class="navmain2">
</div>
<?php }
Note: This function will output the div if the location primary has a menu assigned, it will also output the div if the menu is assigned and empty
A: Assign the menu to a string:
$menu = wp_nav_menu(
array (
'echo' => FALSE,
'fallback_cb' => '__return_false'
)
);
if ( ! empty ( $menu ) )
{
echo '<div class="navmain2">' . $menu . '</div>';
}
A: Determines whether a registered nav menu location has a menu assigned to it. know more
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu( array( 'theme_location' => 'primary' ) );
}
A: Solution nr 2:
Is to hide the div thru Js.
$('#jqm-home').live("pagecreate", function () {
$(".navmain2").each(function () {
if ($(this).children("ul").length == 0) {
$(this).hide();
}
});
});
|
wordpress
|
{
"language": "en",
"length": 285,
"provenance": "stackexchange_00019.jsonl.gz:428180",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82800"
}
|
[
0.007587432861328125,
0.00365447998046875,
-0.0083160400390625,
0.035430908203125,
0.01561737060546875,
-0.0308074951171875,
0.06488037109375,
-0.0399169921875,
-0.0008158683776855469,
-0.01413726806640625,
-0.05120849609375,
0.0119171142578125,
-0.055511474609375,
-0.0223236083984375,
-0.0003464221954345703,
-0.06378173828125,
0.026123046875,
0.004467010498046875,
0.0333251953125,
-0.0033435821533203125,
0.007541656494140625,
0.0038299560546875,
0.0264129638671875,
0.0499267578125,
0.021820068359375,
-0.0887451171875,
0.043548583984375,
-0.0155029296875,
0.00458526611328125,
-0.022308349609375,
0.01294708251953125,
0.0264434814453125,
0.0030574798583984375,
-0.0028209686279296875,
0.049468994140625,
0.0183258056640625,
0.01485443115234375,
-0.002201080322265625,
0.05279541015625,
-0.03631591796875,
0.0264739990234375,
0.0010967254638671875,
0.013214111328125,
-0.026214599609375,
-0.00616455078125,
-0.0244903564453125,
0.0224761962890625,
-0.01702880859375,
-0.00118255615234375,
-0.0260467529296875,
0.032684326171875,
0.022308349609375,
0.03240966796875,
0.0111236572265625,
-0.0167083740234375,
0.0198974609375,
-0.0291595458984375,
-0.03729248046875,
0.0033016204833984375,
0.084716796875,
0.01904296875,
-0.01107025146484375,
0.0035305023193359375,
-0.052520751953125,
-0.01190948486328125,
0.01561737060546875,
0.01763916015625,
0.0096588134765625,
-0.036651611328125,
-0.004261016845703125,
0.02008056640625,
-0.026580810546875,
-0.0308685302734375,
0.01079559326171875,
-0.047119140625,
-0.00811004638671875,
0.027740478515625,
-0.0238494873046875,
0.0022678375244140625,
0.0252685546875,
-0.0089569091796875,
0.029449462890625,
-0.08563232421875,
0.0231781005859375,
0.002124786376953125,
0.043243408203125,
-0.0209808349609375,
-0.033782958984375,
0.0123291015625,
0.002063751220703125,
-0.00396728515625,
0.03271484375,
0.0014276504516601562,
-0.01263427734375,
-0.019622802734375,
-0.048309326171875,
0.0213775634765625,
0.1005859375,
-0.049468994140625,
0.0093841552734375,
-0.01458740234375,
-0.02899169921875,
0.0182952880859375,
-0.062744140625,
0.0107421875,
0.071044921875,
0.0223236083984375,
0.016357421875,
0.030975341796875,
-0.017547607421875,
0.01523590087890625,
0.03240966796875,
-0.0272216796875,
-0.029815673828125,
-0.0343017578125,
0.01474761962890625,
-0.0207672119140625,
-0.03564453125,
0.005603790283203125,
-0.01203155517578125,
-0.01922607421875,
0.0117645263671875,
0.034881591796875,
0.004680633544921875,
0.0101776123046875,
0.01171875,
-0.0161285400390625,
-0.0335693359375,
0.01149749755859375,
0.032073974609375,
-0.0426025390625,
-0.0250091552734375,
0.051788330078125,
0.04937744140625,
0.0357666015625,
-0.039794921875,
-0.002147674560546875,
0.0232391357421875,
0.003047943115234375,
-0.00792694091796875,
0.025543212890625,
0.0111236572265625,
0.01171112060546875,
-0.0005521774291992188,
-0.0249481201171875,
0.0311737060546875,
0.01947021484375,
0.002227783203125,
-0.026947021484375,
-0.061187744140625,
0.0257415771484375,
-0.045623779296875,
0.0509033203125,
0.0026531219482421875,
-0.03240966796875,
0.03912353515625,
0.035003662109375,
-0.0079498291015625,
-0.0828857421875,
-0.0257568359375,
-0.013824462890625,
0.001556396484375,
0.0364990234375,
-0.050994873046875,
-0.048919677734375,
-0.0182952880859375,
-0.0377197265625,
-0.004962921142578125,
0.017333984375,
0.0242767333984375,
-0.0025272369384765625,
-0.033599853515625,
-0.01082611083984375,
0.0186004638671875,
-0.0120086669921875,
0.046234130859375,
0.0211181640625,
-0.037872314453125,
0.040130615234375,
0.03277587890625,
-0.0313720703125,
-0.0283966064453125,
0.053741455078125,
-0.043609619140625,
-0.06842041015625,
0.0606689453125,
-0.008575439453125,
0.051727294921875,
0.0180206298828125,
-0.0063323974609375,
0.0416259765625,
0.0278778076171875,
-0.05926513671875,
-0.0236663818359375,
0.00021779537200927734,
0.0021514892578125,
0.029541015625,
0.0008344650268554688,
0.01293182373046875,
0.0106353759765625,
-0.00997161865234375,
0.01522064208984375,
-0.0213165283203125,
-0.025482177734375,
-0.08233642578125,
-0.005374908447265625,
-0.0154266357421875,
0.047760009765625,
-0.00848388671875,
0.0599365234375,
0.00885772705078125,
0.038970947265625,
-0.014404296875,
-0.0460205078125,
0.0000030994415283203125,
-0.016510009765625,
-0.006504058837890625,
0.06988525390625,
-0.01021575927734375,
0.0135650634765625,
-0.0172576904296875,
-0.00698089599609375,
-0.009063720703125,
0.01629638671875,
0.047637939453125,
-0.019439697265625,
-0.0034847259521484375,
-0.0233001708984375,
0.057464599609375,
0.0034351348876953125,
-0.00363922119140625,
0.0049285888671875,
0.06982421875,
0.03607177734375,
-0.049591064453125,
-0.00872802734375,
0.0238189697265625,
-0.042205810546875,
0.0025882720947265625,
0.044036865234375,
0.00846099853515625,
0.0254058837890625,
-0.0242156982421875,
-0.0007462501525878906,
0.06585693359375,
-0.051055908203125,
-0.0272674560546875,
0.03106689453125,
-0.0386962890625,
-0.037353515625,
0.039825439453125,
0.01152801513671875,
0.036346435546875,
0.05450439453125,
0.00872802734375,
0.016448974609375,
-0.0153045654296875,
-0.0154876708984375,
-0.01495361328125,
-0.0034465789794921875,
0.01212310791015625,
0.02899169921875,
0.006832122802734375,
0.00580596923828125,
0.0158843994140625,
0.003936767578125,
0.00626373291015625,
0.00022399425506591797,
-0.0232391357421875,
0.01397705078125,
0.0182952880859375,
0.004489898681640625,
-0.005565643310546875,
0.0201568603515625,
0.0301666259765625,
0.0234375,
-0.031005859375,
-0.01222991943359375,
0.0067901611328125,
0.01812744140625,
-0.039947509765625,
0.0181427001953125,
0.015594482421875,
-0.01611328125,
-0.004184722900390625,
-0.01172637939453125,
0.0234527587890625,
-0.05560302734375,
0.00732421875,
0.003444671630859375,
0.020965576171875,
0.0005159378051757812,
-0.01392364501953125,
0.01526641845703125,
0.01413726806640625,
-0.02166748046875,
0.02960205078125,
0.0189208984375,
0.00363922119140625,
-0.01422882080078125,
0.03271484375,
0.037078857421875,
-0.024444580078125,
0.01438140869140625,
0.01221466064453125,
0.0015621185302734375,
-0.0177154541015625,
0.034759521484375,
0.0238494873046875,
0.001354217529296875,
-0.01392364501953125,
0.06268310546875,
0.0026073455810546875,
0.01328277587890625,
-0.036224365234375,
-0.040802001953125,
-0.0209808349609375,
-0.014404296875,
-0.041259765625,
-0.00911712646484375,
-0.0521240234375,
-0.004627227783203125,
0.033050537109375,
0.02899169921875,
0.022705078125,
-0.0152435302734375,
0.050140380859375,
0.01496124267578125,
-0.0484619140625,
-0.021484375,
-0.0653076171875,
-0.076416015625,
-0.07452392578125,
0.0261688232421875,
-0.0106048583984375,
0.017791748046875,
-0.014404296875,
0.05712890625,
0.0225372314453125,
0.004291534423828125,
0.04937744140625,
0.024139404296875,
0.0143585205078125,
0.021270751953125,
-0.035736083984375,
-0.0006837844848632812,
-0.0001354217529296875,
0.0010776519775390625,
-0.00450897216796875,
-0.0191650390625,
0.033538818359375,
-0.01380157470703125,
0.01268768310546875,
0.0018091201782226562,
0.0179290771484375,
0.029296875,
-0.0026187896728515625,
0.0292816162109375,
0.035736083984375,
-0.01300048828125,
-0.020751953125,
-0.05364990234375,
-0.086181640625,
0.013763427734375,
0.058135986328125,
0.02764892578125,
0.0000171661376953125,
-0.040283203125,
0.01256561279296875,
-0.0027408599853515625,
0.0027866363525390625,
-0.01580810546875,
0.033233642578125,
-0.00501251220703125,
0.01071929931640625,
-0.025421142578125,
0.057952880859375,
-0.00833892822265625,
-0.0092620849609375,
0.0133209228515625,
0.01065826416015625,
0.0022068023681640625,
-0.0295867919921875,
-0.039306640625,
-0.0023555755615234375,
0.039520263671875,
0.018585205078125,
-0.006755828857421875,
0.0081024169921875,
-0.0306396484375,
0.0029430389404296875,
0.05096435546875,
-0.058685302734375,
-0.0119781494140625,
-0.01428985595703125,
0.01169586181640625,
0.006259918212890625,
-0.057037353515625,
-0.006610870361328125,
-0.00809478759765625,
-0.11224365234375,
0.0196380615234375,
-0.00934600830078125,
-0.0279998779296875,
-0.03509521484375,
-0.0183258056640625,
-0.0845947265625,
-0.048431396484375,
0.03985595703125,
-0.027435302734375,
0.016204833984375,
0.0230865478515625,
0.0173187255859375,
-0.013397216796875,
-0.0238189697265625,
-0.01352691650390625,
-0.038055419921875,
0.0062408447265625,
-0.035552978515625,
0.012603759765625,
-0.000225067138671875,
0.035675048828125,
-0.01369476318359375,
0.00959014892578125,
0.034149169921875,
0.016326904296875,
-0.0019130706787109375,
-0.0267333984375,
0.019561767578125,
0.00601959228515625,
-0.00543975830078125,
-0.007068634033203125,
-0.00954437255859375,
-0.00981903076171875,
-0.02728271484375,
-0.0196075439453125,
-0.0199432373046875,
-0.0423583984375,
0.0272674560546875,
-0.0258941650390625,
-0.027130126953125,
-0.023468017578125,
-0.0017528533935546875,
0.001552581787109375,
-0.00710296630859375,
0.009552001953125,
-0.0082855224609375,
-0.045867919921875,
-0.0037670135498046875,
-0.046234130859375,
-0.0189056396484375,
0.0167694091796875,
0.023040771484375,
0.01873779296875,
0.00255584716796875,
0.016998291015625,
0.0308837890625,
0.0218963623046875,
0.03363037109375,
0.034942626953125,
-0.00963592529296875,
-0.0236663818359375,
0.0369873046875,
0.007320404052734375,
0.0029506683349609375,
0.0189208984375,
0.012115478515625,
0.0106658935546875,
-0.02154541015625,
0.01197052001953125,
0.0018720626831054688,
-0.01044464111328125,
0.042266845703125,
0.00732421875,
-0.0268707275390625,
-0.0019369125366210938,
0.04364013671875,
0.00829315185546875,
-0.019195556640625,
-0.03387451171875,
0.032867431640625,
-0.022796630859375,
0.02874755859375,
0.08355712890625,
0.044647216796875,
0.00391387939453125,
0.0083465576171875,
0.0557861328125,
-0.019439697265625,
-0.0041961669921875,
-0.0016622543334960938,
0.0004603862762451172,
0.028076171875,
-0.0077056884765625,
-0.0028324127197265625,
0.002201080322265625,
-0.0137176513671875,
0.059967041015625,
0.01611328125,
-0.035003662109375,
-0.0251617431640625,
0.00951385498046875,
0.05987548828125,
-0.00020241737365722656,
-0.00331878662109375,
0.0189361572265625,
-0.03326416015625,
0.00405120849609375,
-0.00012481212615966797,
-0.0154876708984375,
-0.05657958984375,
-0.0224456787109375,
-0.00638580322265625,
0.0277862548828125,
-0.025665283203125,
-0.01364898681640625,
0.051727294921875,
0.03131103515625,
-0.003414154052734375,
-0.0191497802734375,
-0.0267181396484375,
-0.01253509521484375,
0.05859375,
0.0297393798828125,
-0.03179931640625,
-0.0092010498046875,
0.044891357421875,
0.0196990966796875,
-0.0003178119659423828,
-0.0083160400390625,
0.043853759765625,
0.019134521484375,
0.0013179779052734375,
0.00127410888671875,
-0.00433349609375,
0.0112152099609375,
-0.0160369873046875,
0.057647705078125,
-0.03802490234375,
-0.0709228515625,
-0.05963134765625,
0.035888671875,
0.07391357421875,
-0.035064697265625,
-0.0214385986328125,
-0.039031982421875,
-0.0187225341796875,
-0.01055908203125,
0.035614013671875,
-0.055755615234375,
0.0323486328125,
0.0290374755859375,
-0.0107574462890625,
-0.024932861328125,
0.0174102783203125,
-0.08306884765625,
0.011962890625,
-0.04278564453125,
-0.01995849609375,
0.0307159423828125,
-0.0274505615234375,
-0.007778167724609375,
-0.03546142578125,
0.0115814208984375,
-0.047821044921875,
-0.0006661415100097656,
0.04736328125,
0.023712158203125,
-0.01123809814453125,
-0.000005543231964111328,
-0.0105133056640625,
-0.004680633544921875,
0.050628662109375,
-0.0123443603515625,
-0.0035343170166015625,
-0.0241546630859375,
-0.004608154296875,
0.0257720947265625,
0.0027446746826171875,
-0.0235595703125,
-0.0026798248291015625,
0.004741668701171875,
0.0052642822265625,
0.0245819091796875,
-0.019561767578125,
0.0765380859375,
0.00861358642578125,
-0.0005593299865722656,
0.01702880859375,
0.043701171875,
0.0094146728515625,
-0.015777587890625,
0.0166778564453125,
-0.007740020751953125,
-0.0198516845703125,
-0.0194091796875,
-0.0006513595581054688,
-0.01532745361328125,
0.002056121826171875,
-0.01137542724609375,
0.03155517578125,
0.012451171875,
-0.00121307373046875,
-0.007965087890625,
-0.0340576171875,
0.01352691650390625,
0.01898193359375,
0.04736328125,
-0.00311279296875,
0.01226043701171875,
0.005374908447265625,
-0.017578125,
0.0284423828125,
-0.00043845176696777344,
0.022064208984375,
-0.0155792236328125,
-0.03070068359375,
0.07281494140625,
0.07098388671875,
-0.0243988037109375,
0.04852294921875,
0.037872314453125,
0.008209228515625,
0.034942626953125,
-0.0226287841796875,
-0.0198516845703125,
0.0496826171875,
0.06768798828125,
0.006946563720703125,
-0.0045166015625,
0.06689453125,
-0.0101776123046875,
0.00016009807586669922,
0.0364990234375,
0.0675048828125,
-0.04083251953125,
-0.002170562744140625,
0.023590087890625,
-0.021728515625,
0.00859832763671875,
0.00989532470703125,
-0.0172271728515625,
-0.0088653564453125,
0.0107574462890625,
-0.0269012451171875,
-0.0191497802734375,
0.00901031494140625,
0.0086212158203125,
-0.019378662109375,
-0.01629638671875,
0.025665283203125,
0.0211181640625,
-0.0263671875,
0.0104827880859375,
0.02655029296875,
0.0077667236328125,
-0.0313720703125,
0.00566864013671875,
0.00469207763671875,
-0.034210205078125,
-0.0576171875,
0.00960540771484375,
0.01247406005859375,
0.01284027099609375,
0.02484130859375,
-0.008331298828125,
-0.0135955810546875,
0.0229339599609375,
-0.040557861328125,
0.04351806640625,
-0.00322723388671875,
-0.04931640625,
0.0024394989013671875,
-0.03570556640625,
0.040008544921875,
-0.00027108192443847656,
-0.058990478515625,
0.028594970703125,
0.0020427703857421875,
-0.04827880859375,
-0.02154541015625,
-0.0182037353515625,
0.09124755859375,
-0.0298309326171875,
-0.01959228515625,
-0.0103912353515625,
0.01016998291015625,
0.0164947509765625,
-0.0163726806640625,
0.0740966796875,
-0.064208984375,
-0.0220794677734375,
0.0189208984375,
0.01285552978515625,
-0.020599365234375,
-0.011138916015625,
-0.035064697265625,
0.0784912109375,
-0.0046234130859375,
-0.017486572265625,
-0.002056121826171875,
0.048614501953125,
-0.01166534423828125,
0.033721923828125,
-0.01543426513671875,
0.095703125,
-0.003139495849609375,
0.00814056396484375,
-0.0390625,
-0.00914764404296875,
0.0286865234375,
0.01319122314453125,
-0.0528564453125,
-0.00016295909881591797,
0.00649261474609375,
0.03436279296875,
0.057281494140625,
0.0218505859375,
0.01401519775390625,
0.0021572113037109375,
-0.052947998046875,
-0.017486572265625,
-0.0169219970703125,
-0.040740966796875,
0.01218414306640625,
-0.03106689453125,
-0.0703125,
-0.03692626953125,
0.019256591796875,
0.035797119140625,
-0.01012420654296875,
0.06475830078125,
-0.03289794921875,
0.00977325439453125,
0.039581298828125,
0.006072998046875,
-0.0168609619140625,
0.02301025390625,
0.0206756591796875,
-0.04022216796875,
0.005615234375,
-0.0153045654296875,
0.031982421875,
0.007122039794921875,
0.005619049072265625,
0.0212249755859375,
0.0147857666015625,
0.036468505859375,
0.0129852294921875,
0.004924774169921875,
0.0271148681640625,
-0.00989532470703125,
0.0205841064453125,
0.01006317138671875,
0.045501708984375,
-0.0252532958984375,
-0.0352783203125,
0.05548095703125,
0.04766845703125,
-0.0022296905517578125,
0.0029296875,
0.0007047653198242188,
-0.002166748046875,
0.0013246536254882812,
-0.02325439453125,
0.0265045166015625,
0.00511932373046875,
0.01416015625,
-0.0049591064453125,
-0.01343536376953125,
0.037322998046875,
0.003536224365234375,
0.0006017684936523438,
-0.0172119140625,
0.0181121826171875,
0.0230712890625,
-0.059661865234375,
0.0255279541015625,
0.01081085205078125,
0.0531005859375,
0.0011425018310546875,
0.05328369140625,
-0.00949859619140625,
-0.0221405029296875,
0.01160430908203125,
-0.02655029296875,
-0.038543701171875,
0.01097869873046875,
-0.051483154296875,
-0.0628662109375,
0.01300048828125,
0.046417236328125,
0.01934814453125,
0.04351806640625,
0.046722412109375,
0.0034008026123046875,
-0.045989990234375,
0.00014543533325195312,
0.0198822021484375,
-0.043243408203125,
-0.0123138427734375,
0.005435943603515625,
-0.028228759765625,
0.005435943603515625,
-0.01006317138671875,
-0.01288604736328125,
0.0299835205078125,
0.01331329345703125,
-0.023895263671875,
0.033477783203125,
0.0014247894287109375,
-0.012664794921875,
0.00789642333984375,
0.0036067962646484375,
0.01800537109375,
0.01446533203125,
-0.10833740234375,
-0.046142578125,
-0.0016946792602539062,
-0.00975799560546875,
0.0394287109375,
0.041015625,
-0.0277252197265625,
0.032989501953125,
0.030487060546875,
0.00876617431640625,
-0.0205078125,
-0.006153106689453125,
0.0179290771484375,
0.0171661376953125,
0.0289154052734375,
0.035064697265625,
-0.07464599609375,
-0.03314208984375,
-0.0364990234375,
-0.002796173095703125,
0.0093536376953125,
-0.00445556640625,
0.042816162109375,
0.0259246826171875,
-0.044586181640625,
0.0253448486328125,
-0.05181884765625,
-0.039459228515625,
-0.01666259765625,
-0.0085906982421875,
0.030853271484375,
0.02813720703125,
-0.083984375,
0.01432037353515625,
0.044219970703125,
-0.0087890625,
0.062255859375,
-0.0101470947265625,
0.01702880859375,
-0.06573486328125,
-0.0213470458984375,
-0.02880859375,
-0.0506591796875,
-0.01508331298828125,
0.0226898193359375,
-0.018096923828125,
0.0229339599609375,
-0.007785797119140625,
0.0236358642578125,
-0.015960693359375,
-0.04107666015625,
0.0088043212890625,
-0.0311126708984375,
0.01143646240234375,
0.0191650390625,
0.00994873046875,
-0.01548004150390625,
-0.02935791015625,
-0.0134735107421875,
-0.003993988037109375,
0.00937652587890625,
-0.0142822265625,
-0.000789642333984375,
0.0023403167724609375,
0.05010986328125,
0.039794921875,
0.042449951171875,
-0.04620361328125,
0.0213775634765625,
0.038818359375,
-0.0008373260498046875,
0.046905517578125,
-0.03277587890625,
-0.03240966796875,
-0.044281005859375,
-0.01454925537109375,
0.00955963134765625,
-0.0234222412109375,
-0.0238189697265625,
-0.031005859375,
0.0016660690307617188,
0.0195159912109375,
-0.0133209228515625,
-0.040496826171875,
0.01885986328125,
-0.0166473388671875,
0.057403564453125,
-0.050567626953125,
0.0369873046875,
-0.0265960693359375,
-0.0633544921875,
-0.027313232421875,
0.02008056640625,
-0.02392578125,
0.0294036865234375,
0.033660888671875,
-0.010040283203125,
0.0288543701171875,
-0.01654052734375,
-0.0033969879150390625,
-0.0308074951171875,
-0.00487518310546875,
0.019775390625,
-0.0167083740234375,
-0.03662109375,
-0.045318603515625,
-0.00835418701171875,
0.01413726806640625,
0.038055419921875,
0.0221710205078125,
-0.0014677047729492188,
-0.060272216796875,
0.0142822265625,
-0.015594482421875,
0.01036834716796875,
-0.043609619140625,
-0.0863037109375,
0.03851318359375,
0.0043487548828125,
-0.049163818359375,
0.0281524658203125,
0.03369140625,
-0.034271240234375,
0.03289794921875,
0.04180908203125,
-0.06414794921875,
0.0440673828125,
-0.0005741119384765625,
-0.010467529296875,
0.0684814453125,
-0.004589080810546875,
-0.01505279541015625,
-0.036376953125,
-0.03997802734375,
-0.05950927734375,
0.00209808349609375,
-0.0156707763671875,
0.022064208984375,
0.0048675537109375,
0.0411376953125,
-0.0280609130859375,
0.01029205322265625,
-0.007965087890625,
-0.0163116455078125,
0.01192474365234375,
-0.03375244140625,
-0.035980224609375,
-0.03912353515625,
0.07867431640625,
-0.018768310546875,
0.0218048095703125,
0.0079803466796875,
-0.05596923828125,
-0.0279388427734375,
-0.0203094482421875,
-0.01512908935546875,
0.0304412841796875,
-0.07843017578125,
-0.0022258758544921875,
-0.0080718994140625,
-0.01214599609375,
-0.03240966796875,
0.0244598388671875,
-0.060455322265625,
-0.00800323486328125,
-0.0244903564453125,
-0.0034580230712890625,
-0.068359375,
0.003871917724609375,
0.006610870361328125,
-0.0133056640625,
0.011016845703125,
-0.022064208984375,
0.004863739013671875,
0.00992584228515625,
0.0150299072265625,
0.0003688335418701172,
-0.0330810546875,
-0.051788330078125,
0.00921630859375,
-0.0273284912109375,
0.0487060546875,
-0.03741455078125,
-0.029876708984375,
-0.025665283203125,
0.0105133056640625,
0.0271453857421875,
0.03277587890625,
-0.0300750732421875,
-0.0303802490234375,
0.017059326171875,
-0.05474853515625,
-0.00888824462890625,
0.0748291015625,
0.02618408203125,
0.024017333984375,
-0.00251007080078125,
-0.0162353515625,
0.040924072265625,
-0.065185546875,
-0.0111236572265625,
-0.007381439208984375,
-0.01361846923828125,
-0.09375,
0.05535888671875,
-0.006832122802734375,
0.03515625,
0.046112060546875
] |
5cdb857f1b45de3cf2747397592eb4ac0a9cc411
|
Wordpress Stackexchange
Q: remove_filter( 'the_content', 'wpautop' ); only for certain post types I want to try and remove automatic <p> tag and <br> tag addition for my custom post type.
It looks like
remove_filter( 'the_content', 'wpautop' );
will do this, but how would I make the change only for my chosen post type I've tried writing a function for this, but it doesn't seem to work:
function remove_tags() {
global $post_type;
if ( 'client' == $post_type ) {
remove_filter( 'the_content', 'wpautop' );
}
}
A: remove_filter('the_content','wpautop');
//decide when you want to apply the auto paragraph
add_filter('the_content','my_custom_formatting');
function my_custom_formatting($content){
if(get_post_type()=='my_custom_post') //if it does not work, you may want to pass the current post object to get_post_type
return $content;//no autop
else
return wpautop($content);
}
found this code on stackoverflow - looks to do the trick.
|
Q: remove_filter( 'the_content', 'wpautop' ); only for certain post types I want to try and remove automatic <p> tag and <br> tag addition for my custom post type.
It looks like
remove_filter( 'the_content', 'wpautop' );
will do this, but how would I make the change only for my chosen post type I've tried writing a function for this, but it doesn't seem to work:
function remove_tags() {
global $post_type;
if ( 'client' == $post_type ) {
remove_filter( 'the_content', 'wpautop' );
}
}
A: remove_filter('the_content','wpautop');
//decide when you want to apply the auto paragraph
add_filter('the_content','my_custom_formatting');
function my_custom_formatting($content){
if(get_post_type()=='my_custom_post') //if it does not work, you may want to pass the current post object to get_post_type
return $content;//no autop
else
return wpautop($content);
}
found this code on stackoverflow - looks to do the trick.
A: Hook into the_content before the wpautop filter has been called, check the post type, and remove the wpautop filter, which is added in wp-includes/default-filters.php with the default priority 10:
add_filter( 'the_content', 'wpse_82860_remove_autop_for_posttype', 0 );
function wpse_82860_remove_autop_for_posttype( $content )
{
# edit the post type here
'post' === get_post_type() && remove_filter( 'the_content', 'wpautop' );
return $content;
}
|
wordpress
|
{
"language": "en",
"length": 188,
"provenance": "stackexchange_00019.jsonl.gz:428199",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82860"
}
|
[
0.01395416259765625,
0.0232086181640625,
-0.032745361328125,
-0.0021076202392578125,
0.045013427734375,
-0.060516357421875,
0.06927490234375,
-0.02117919921875,
0.003551483154296875,
0.016937255859375,
-0.00943756103515625,
-0.040130615234375,
0.00445556640625,
-0.046600341796875,
0.0105743408203125,
-0.0322265625,
0.0107269287109375,
-0.0012083053588867188,
0.01513671875,
-0.0228118896484375,
0.0062408447265625,
-0.0170135498046875,
0.0200653076171875,
0.01160430908203125,
0.007129669189453125,
0.007427215576171875,
0.066650390625,
-0.01209259033203125,
0.01418304443359375,
-0.0032634735107421875,
0.0232086181640625,
-0.0286407470703125,
0.021636962890625,
0.051177978515625,
-0.08441162109375,
0.0108795166015625,
-0.01406097412109375,
0.020111083984375,
-0.01116943359375,
0.0180816650390625,
-0.01503753662109375,
0.016693115234375,
-0.0026493072509765625,
0.0158843994140625,
-0.033203125,
0.00382232666015625,
-0.0226898193359375,
-0.03106689453125,
-0.01340484619140625,
-0.0140533447265625,
0.0225830078125,
-0.044342041015625,
0.043701171875,
-0.058319091796875,
-0.003597259521484375,
-0.0021419525146484375,
-0.035186767578125,
-0.0081787109375,
0.038818359375,
0.008819580078125,
-0.01003265380859375,
-0.02191162109375,
0.0055389404296875,
-0.0238494873046875,
-0.0186004638671875,
0.02154541015625,
0.01128387451171875,
-0.00579833984375,
-0.058868408203125,
-0.039947509765625,
0.024627685546875,
-0.04010009765625,
-0.0050048828125,
0.0004780292510986328,
-0.0139923095703125,
-0.03948974609375,
0.0146942138671875,
-0.0172271728515625,
-0.00177001953125,
0.0167236328125,
0.01491546630859375,
0.017303466796875,
-0.01134490966796875,
-0.0091400146484375,
0.01629638671875,
0.021453857421875,
-0.01114654541015625,
-0.01303863525390625,
-0.0146026611328125,
-0.027618408203125,
-0.01488494873046875,
-0.0428466796875,
-0.020294189453125,
0.0008993148803710938,
-0.0020122528076171875,
-0.040069580078125,
0.016693115234375,
-0.0125885009765625,
-0.010284423828125,
0.02178955078125,
0.03155517578125,
-0.06988525390625,
0.09033203125,
-0.04058837890625,
0.0279083251953125,
0.00963592529296875,
-0.057159423828125,
0.0080718994140625,
0.09869384765625,
0.053924560546875,
0.0227203369140625,
-0.0167236328125,
0.0138702392578125,
0.0027103424072265625,
-0.020965576171875,
-0.01372528076171875,
-0.0085906982421875,
-0.006076812744140625,
-0.017486572265625,
-0.0023746490478515625,
-0.01239776611328125,
-0.004100799560546875,
-0.01806640625,
-0.03985595703125,
0.0241546630859375,
0.003124237060546875,
-0.0179901123046875,
0.00899505615234375,
0.0149078369140625,
0.0016002655029296875,
-0.021697998046875,
-0.01036834716796875,
0.031280517578125,
0.0491943359375,
0.029205322265625,
-0.020843505859375,
0.0276641845703125,
-0.03717041015625,
-0.01678466796875,
0.0286102294921875,
-0.006725311279296875,
-0.0214385986328125,
-0.001399993896484375,
-0.0120697021484375,
0.038818359375,
0.0249786376953125,
0.015899658203125,
0.0157928466796875,
0.01070404052734375,
-0.048919677734375,
0.06512451171875,
-0.034698486328125,
0.0650634765625,
-0.012725830078125,
-0.0556640625,
-0.0290069580078125,
0.031402587890625,
-0.044281005859375,
-0.053192138671875,
-0.06689453125,
0.04193115234375,
-0.0253448486328125,
-0.0196533203125,
-0.0034656524658203125,
-0.050201416015625,
0.029510498046875,
-0.0726318359375,
-0.019287109375,
0.0195770263671875,
-0.0189361572265625,
-0.005390167236328125,
-0.03009033203125,
-0.01251220703125,
-0.0024890899658203125,
-0.001476287841796875,
0.038421630859375,
-0.005939483642578125,
0.049530029296875,
0.0078887939453125,
0.045745849609375,
0.0017843246459960938,
-0.03643798828125,
0.0802001953125,
-0.03204345703125,
-0.0904541015625,
0.0147705078125,
0.039764404296875,
0.09149169921875,
0.01285552978515625,
0.0212860107421875,
0.0562744140625,
-0.0115509033203125,
-0.051025390625,
-0.0104217529296875,
0.007328033447265625,
-0.0291900634765625,
-0.0242919921875,
-0.03656005859375,
0.0014333724975585938,
0.04852294921875,
-0.005504608154296875,
-0.005237579345703125,
0.0071258544921875,
0.0083770751953125,
-0.050689697265625,
0.00927734375,
-0.0248870849609375,
0.0400390625,
-0.048553466796875,
-0.01422882080078125,
0.0242156982421875,
-0.0345458984375,
-0.0218963623046875,
0.024017333984375,
-0.01131439208984375,
0.0004265308380126953,
-0.0211181640625,
-0.003879547119140625,
-0.019561767578125,
0.02520751953125,
-0.0084686279296875,
-0.0281219482421875,
-0.0196990966796875,
0.003631591796875,
0.0693359375,
-0.00408935546875,
-0.017730712890625,
-0.0026454925537109375,
0.0247344970703125,
0.0145111083984375,
-0.048370361328125,
0.032470703125,
0.03448486328125,
0.02337646484375,
-0.0445556640625,
-0.0118865966796875,
-0.00572967529296875,
-0.06805419921875,
-0.0160675048828125,
0.06829833984375,
0.03759765625,
0.0732421875,
0.00501251220703125,
0.00021314620971679688,
0.10205078125,
-0.010894775390625,
0.017364501953125,
-0.0204315185546875,
0.018463134765625,
0.0198974609375,
-0.01496124267578125,
-0.02484130859375,
0.046356201171875,
-0.04736328125,
0.025909423828125,
0.0285186767578125,
-0.01392364501953125,
-0.0007605552673339844,
0.0131072998046875,
-0.022186279296875,
0.01374053955078125,
-0.00003814697265625,
-0.01178741455078125,
-0.00969696044921875,
0.06201171875,
0.0031032562255859375,
0.07373046875,
0.05340576171875,
-0.00954437255859375,
-0.029022216796875,
0.0096282958984375,
0.05303955078125,
-0.02093505859375,
0.043548583984375,
0.0178985595703125,
0.00891876220703125,
-0.04034423828125,
0.00482177734375,
-0.020751953125,
0.0166168212890625,
-0.002758026123046875,
0.077880859375,
0.0011091232299804688,
-0.024749755859375,
-0.0223236083984375,
-0.05889892578125,
-0.02301025390625,
-0.0141448974609375,
-0.0258941650390625,
-0.048248291015625,
-0.0201568603515625,
0.04376220703125,
-0.0102386474609375,
0.017333984375,
0.041015625,
-0.0003619194030761719,
0.0020999908447265625,
-0.036590576171875,
0.048126220703125,
-0.05743408203125,
0.0260009765625,
0.059112548828125,
-0.01267242431640625,
-0.00009775161743164062,
0.0146331787109375,
0.007595062255859375,
0.020751953125,
0.006366729736328125,
0.0149993896484375,
0.019927978515625,
-0.038330078125,
0.01751708984375,
0.01004791259765625,
0.01192474365234375,
-0.017913818359375,
-0.042266845703125,
-0.014892578125,
0.0037288665771484375,
-0.0655517578125,
0.0018863677978515625,
0.07476806640625,
-0.05120849609375,
-0.048492431640625,
-0.0012407302856445312,
-0.05535888671875,
0.0037479400634765625,
0.0185394287109375,
-0.03228759765625,
-0.030548095703125,
-0.0127105712890625,
-0.05279541015625,
-0.02325439453125,
-0.042816162109375,
0.053436279296875,
-0.01210784912109375,
0.03021240234375,
0.0120391845703125,
0.10125732421875,
0.036285400390625,
-0.064453125,
0.02593994140625,
0.00809478759765625,
-0.020477294921875,
0.05523681640625,
0.0189208984375,
-0.0066986083984375,
0.018646240234375,
0.0124359130859375,
-0.00605010986328125,
0.0269317626953125,
-0.02593994140625,
-0.03741455078125,
-0.004367828369140625,
0.006622314453125,
0.022705078125,
0.005100250244140625,
0.005504608154296875,
0.02294921875,
0.030426025390625,
-0.034454345703125,
0.005512237548828125,
0.0211639404296875,
0.0078277587890625,
0.058197021484375,
-0.0204620361328125,
-0.041961669921875,
0.011962890625,
0.046783447265625,
0.006481170654296875,
0.0096588134765625,
0.041259765625,
0.0013523101806640625,
0.03558349609375,
-0.006771087646484375,
-0.0121612548828125,
-0.03985595703125,
0.0024566650390625,
-0.033843994140625,
0.04705810546875,
0.0030059814453125,
-0.004863739013671875,
0.00908660888671875,
-0.018463134765625,
-0.0211029052734375,
-0.027740478515625,
0.04119873046875,
-0.0245513916015625,
-0.0298309326171875,
-0.003787994384765625,
-0.00725555419921875,
0.00530242919921875,
0.056304931640625,
-0.04827880859375,
-0.00467681884765625,
0.005855560302734375,
0.0264739990234375,
0.0030536651611328125,
-0.044830322265625,
-0.0267791748046875,
-0.032867431640625,
-0.0699462890625,
-0.0278778076171875,
-0.0360107421875,
-0.0200958251953125,
-0.0239410400390625,
0.0235137939453125,
-0.0374755859375,
-0.0294952392578125,
0.06024169921875,
-0.026611328125,
0.0143585205078125,
0.0196380615234375,
0.0030975341796875,
-0.02410888671875,
-0.04986572265625,
0.0198974609375,
-0.0426025390625,
0.016357421875,
-0.041656494140625,
0.02105712890625,
0.01318359375,
0.009735107421875,
0.0020732879638671875,
0.022491455078125,
0.0291595458984375,
-0.0246429443359375,
-0.016937255859375,
-0.0204315185546875,
-0.0186920166015625,
-0.0017948150634765625,
-0.006359100341796875,
-0.0231781005859375,
-0.0076141357421875,
-0.020416259765625,
-0.035064697265625,
0.065185546875,
-0.016815185546875,
0.06744384765625,
-0.01493072509765625,
-0.003368377685546875,
-0.0201263427734375,
-0.0211029052734375,
-0.054840087890625,
-0.0029201507568359375,
-0.06488037109375,
0.0247650146484375,
-0.01605224609375,
-0.0183258056640625,
0.026123046875,
0.00977325439453125,
-0.0235748291015625,
0.00894927978515625,
0.024810791015625,
0.02130126953125,
-0.026458740234375,
-0.005710601806640625,
-0.0168304443359375,
0.034423828125,
-0.0263671875,
0.05255126953125,
0.0408935546875,
-0.037445068359375,
0.0699462890625,
0.0023975372314453125,
0.016754150390625,
-0.0325927734375,
0.09527587890625,
-0.0005469322204589844,
0.01531982421875,
0.01418304443359375,
-0.0245208740234375,
0.0178680419921875,
0.00720977783203125,
0.00492095947265625,
-0.026336669921875,
0.057647705078125,
0.0220947265625,
-0.01282501220703125,
-0.002689361572265625,
-0.021148681640625,
-0.0166015625,
0.0240478515625,
0.052337646484375,
-0.022216796875,
-0.01247406005859375,
0.014068603515625,
-0.03277587890625,
-0.044342041015625,
0.041778564453125,
-0.004550933837890625,
0.050537109375,
-0.03741455078125,
0.068115234375,
0.00536346435546875,
0.0158233642578125,
-0.0303497314453125,
0.004558563232421875,
-0.0228271484375,
-0.005069732666015625,
-0.02142333984375,
-0.0127716064453125,
0.00809478759765625,
0.049072265625,
0.013214111328125,
0.0052490234375,
0.038665771484375,
0.0213775634765625,
-0.004566192626953125,
0.00916290283203125,
0.0177459716796875,
-0.00274658203125,
-0.044525146484375,
-0.0169219970703125,
0.0064544677734375,
-0.014984130859375,
0.02508544921875,
-0.0222320556640625,
-0.00899505615234375,
-0.00017464160919189453,
-0.0120086669921875,
0.0016469955444335938,
0.0193634033203125,
0.01322174072265625,
0.0085296630859375,
0.00640869140625,
-0.0156707763671875,
0.010223388671875,
0.030914306640625,
-0.031951904296875,
-0.05157470703125,
0.0248260498046875,
0.06329345703125,
-0.035064697265625,
0.0022430419921875,
0.005474090576171875,
-0.00905609130859375,
0.005123138427734375,
0.0204620361328125,
0.01776123046875,
-0.02423095703125,
-0.007289886474609375,
0.04644775390625,
0.026092529296875,
-0.005710601806640625,
-0.0252838134765625,
0.0012845993041992188,
-0.0183258056640625,
-0.0026149749755859375,
0.037750244140625,
-0.057037353515625,
0.0236663818359375,
0.0238037109375,
-0.0029392242431640625,
-0.031463623046875,
-0.00252532958984375,
-0.043365478515625,
0.01529693603515625,
-0.0216827392578125,
-0.00424957275390625,
0.0167083740234375,
-0.033905029296875,
0.0291595458984375,
-0.0265655517578125,
0.0064849853515625,
-0.01485443115234375,
0.006381988525390625,
0.06103515625,
0.039306640625,
-0.01468658447265625,
-0.0015306472778320312,
-0.041900634765625,
-0.0144195556640625,
-0.06390380859375,
-0.06927490234375,
-0.0159759521484375,
-0.003719329833984375,
-0.00609588623046875,
0.005229949951171875,
-0.021514892578125,
0.0021457672119140625,
0.0205841064453125,
0.0303497314453125,
-0.0039043426513671875,
0.04998779296875,
-0.038604736328125,
0.07879638671875,
0.01727294921875,
0.059661865234375,
0.01303863525390625,
0.035125732421875,
0.0217742919921875,
-0.0293731689453125,
0.00846099853515625,
-0.0889892578125,
-0.04168701171875,
-0.00434112548828125,
-0.032745361328125,
0.09100341796875,
0.0161285400390625,
-0.0015115737915039062,
0.029876708984375,
0.00873565673828125,
-0.000354766845703125,
-0.0306854248046875,
-0.0278167724609375,
-0.0012292861938476562,
0.042266845703125,
-0.029998779296875,
-0.01175689697265625,
0.042633056640625,
0.0177154541015625,
-0.004886627197265625,
0.01947021484375,
-0.007549285888671875,
0.033538818359375,
0.0178375244140625,
0.0272674560546875,
-0.01258087158203125,
-0.007228851318359375,
-0.0159759521484375,
0.0213470458984375,
-0.004711151123046875,
0.01067352294921875,
0.03314208984375,
-0.0113677978515625,
0.0101776123046875,
-0.00528717041015625,
0.01171875,
-0.0006732940673828125,
0.033233642578125,
0.0281982421875,
0.0023441314697265625,
0.0191802978515625,
0.0570068359375,
0.054443359375,
-0.08404541015625,
-0.004840850830078125,
0.0179595947265625,
-0.009674072265625,
0.02490234375,
0.01157379150390625,
-0.01128387451171875,
-0.0084381103515625,
0.0228729248046875,
-0.0134429931640625,
-0.02032470703125,
0.0214691162109375,
0.0103912353515625,
-0.0254669189453125,
0.018310546875,
0.03546142578125,
0.0023708343505859375,
-0.0298919677734375,
-0.0046844482421875,
0.005710601806640625,
-0.02264404296875,
-0.0224151611328125,
0.0084686279296875,
-0.016571044921875,
-0.04974365234375,
-0.08441162109375,
-0.038482666015625,
0.02215576171875,
-0.032562255859375,
0.0262451171875,
-0.0189666748046875,
0.0343017578125,
0.07049560546875,
-0.03582763671875,
0.041839599609375,
0.025787353515625,
-0.0279693603515625,
-0.059356689453125,
-0.0347900390625,
0.013031005859375,
0.03271484375,
-0.053009033203125,
0.04193115234375,
-0.0188140869140625,
-0.04638671875,
0.0057830810546875,
-0.0303497314453125,
-0.005390167236328125,
0.00820159912109375,
-0.023712158203125,
0.02362060546875,
0.0025730133056640625,
0.005126953125,
-0.0229339599609375,
0.00873565673828125,
-0.05535888671875,
-0.031524658203125,
-0.0309600830078125,
-0.04345703125,
0.0199737548828125,
-0.037933349609375,
-0.07867431640625,
0.11712646484375,
0.0198822021484375,
0.040313720703125,
-0.00431060791015625,
0.0211181640625,
-0.045654296875,
-0.00501251220703125,
-0.037872314453125,
0.07537841796875,
0.0435791015625,
0.0059356689453125,
-0.041412353515625,
-0.008392333984375,
-0.00421905517578125,
0.025970458984375,
0.00908660888671875,
-0.0038547515869140625,
-0.0022602081298828125,
-0.0213470458984375,
0.0160369873046875,
0.02105712890625,
-0.0012578964233398438,
0.004749298095703125,
0.002643585205078125,
0.00733184814453125,
-0.00823211669921875,
-0.021820068359375,
0.047576904296875,
-0.08258056640625,
-0.020477294921875,
0.00405120849609375,
0.03497314453125,
0.050933837890625,
-0.0187225341796875,
0.0218048095703125,
0.01073455810546875,
-0.0261688232421875,
0.007640838623046875,
-0.0111083984375,
0.0169525146484375,
0.043975830078125,
0.0518798828125,
-0.0906982421875,
-0.049560546875,
-0.037261962890625,
0.052154541015625,
-0.0010995864868164062,
0.06866455078125,
0.03179931640625,
0.026123046875,
0.04620361328125,
0.01020050048828125,
0.04217529296875,
0.01219940185546875,
-0.0123138427734375,
-0.005657196044921875,
0.01560211181640625,
-0.0166015625,
-0.038726806640625,
0.049835205078125,
0.0253143310546875,
0.0019779205322265625,
-0.032867431640625,
-0.044097900390625,
0.0250091552734375,
-0.0026531219482421875,
-0.01079559326171875,
-0.006603240966796875,
-0.004055023193359375,
-0.0628662109375,
-0.02752685546875,
-0.06573486328125,
0.00853729248046875,
0.033477783203125,
0.0167236328125,
-0.0102996826171875,
0.018829345703125,
-0.0379638671875,
-0.0261077880859375,
-0.047515869140625,
0.0005130767822265625,
0.048126220703125,
0.0421142578125,
-0.004207611083984375,
0.0711669921875,
0.038726806640625,
-0.01499176025390625,
-0.0105743408203125,
0.015716552734375,
-0.00992584228515625,
0.007320404052734375,
-0.0171661376953125,
-0.000015079975128173828,
-0.0170135498046875,
0.0164337158203125,
0.024932861328125,
-0.037109375,
0.0243682861328125,
0.0322265625,
-0.035491943359375,
-0.004192352294921875,
0.022979736328125,
-0.0048980712890625,
-0.0276947021484375,
-0.038543701171875,
-0.03497314453125,
0.0147247314453125,
0.0039520263671875,
0.034454345703125,
-0.032470703125,
0.0198974609375,
0.017547607421875,
-0.01035308837890625,
0.006927490234375,
-0.03369140625,
0.030303955078125,
0.028472900390625,
0.01067352294921875,
0.0253448486328125,
-0.073974609375,
0.0051116943359375,
-0.0838623046875,
-0.06365966796875,
0.0494384765625,
0.04071044921875,
-0.0198516845703125,
0.0121612548828125,
-0.006366729736328125,
-0.006809234619140625,
0.00833892822265625,
-0.0139617919921875,
0.0113372802734375,
0.007251739501953125,
-0.0024700164794921875,
0.0017518997192382812,
-0.01514434814453125,
-0.025238037109375,
0.01479339599609375,
0.051300048828125,
-0.004627227783203125,
0.07415771484375,
-0.03692626953125,
0.0240936279296875,
-0.024566650390625,
0.03790283203125,
-0.0298919677734375,
-0.0027828216552734375,
0.009918212890625,
0.04437255859375,
0.034210205078125,
-0.0296783447265625,
-0.006107330322265625,
-0.0191192626953125,
0.0704345703125,
-0.041046142578125,
0.0115814208984375,
0.0029239654541015625,
0.00766754150390625,
-0.06622314453125,
0.05316162109375,
-0.005397796630859375,
0.0335693359375,
-0.0301666259765625,
-0.05059814453125,
0.084716796875,
0.036468505859375,
0.0281829833984375,
0.032562255859375,
-0.00045990943908691406,
-0.0011386871337890625,
0.0247650146484375,
-0.0201873779296875,
0.022247314453125,
0.03759765625,
-0.02447509765625,
-0.03955078125,
0.0187225341796875,
-0.005420684814453125,
-0.0175933837890625,
0.027862548828125,
0.027130126953125,
0.03680419921875,
-0.03662109375,
-0.053131103515625,
-0.018524169921875,
0.0272979736328125,
0.00860595703125,
0.019195556640625,
-0.037567138671875,
-0.005504608154296875,
-0.024078369140625,
0.0465087890625,
-0.01250457763671875,
0.012969970703125,
-0.0252227783203125,
-0.007030487060546875,
0.018310546875,
-0.0548095703125,
-0.07122802734375,
0.01282501220703125,
0.037994384765625,
0.01010894775390625,
-0.034637451171875,
0.023284912109375,
-0.03155517578125,
0.0214385986328125,
0.01259613037109375,
-0.034698486328125,
0.0010204315185546875,
0.006893157958984375,
-0.00821685791015625,
-0.04937744140625,
-0.0667724609375,
0.05267333984375,
-0.045745849609375,
-0.01126861572265625,
0.0010042190551757812,
-0.0007491111755371094,
-0.0253753662109375,
0.0023555755615234375,
-0.0284423828125,
0.054229736328125,
0.004421234130859375,
-0.00882720947265625,
0.029815673828125,
-0.0113677978515625,
-0.01532745361328125,
-0.0303497314453125,
0.0001976490020751953,
-0.03057861328125,
-0.0081329345703125,
0.032379150390625,
-0.0003635883331298828,
0.0105438232421875,
-0.0208587646484375,
-0.07061767578125,
0.00742340087890625,
0.00154876708984375,
-0.028717041015625,
-0.006000518798828125,
0.031768798828125,
0.0020008087158203125,
-0.025360107421875,
-0.0015058517456054688,
-0.00873565673828125,
-0.004985809326171875,
-0.004306793212890625,
-0.0006918907165527344,
0.058990478515625,
-0.01280975341796875,
-0.007251739501953125,
-0.005374908447265625,
0.009063720703125,
0.0159759521484375,
0.0010280609130859375,
-0.005718231201171875,
-0.0139617919921875,
0.0207977294921875,
0.0116119384765625,
-0.03173828125,
0.0153656005859375,
0.008270263671875,
-0.00254058837890625,
0.003627777099609375,
-0.00855255126953125,
-0.03631591796875,
-0.036376953125,
0.0247039794921875,
0.056732177734375,
0.01451873779296875,
-0.0018186569213867188,
0.0003609657287597656,
0.0192718505859375,
-0.0092315673828125,
-0.010711669921875,
-0.001689910888671875,
-0.01873779296875,
-0.027496337890625,
-0.0308074951171875,
-0.008453369140625,
-0.00164794921875,
-0.039642333984375,
-0.031646728515625,
-0.01235198974609375,
-0.019989013671875,
0.033905029296875,
-0.0213623046875,
-0.007610321044921875,
-0.0017566680908203125,
-0.0213775634765625,
-0.0175323486328125,
-0.00835418701171875,
0.0111541748046875,
-0.02020263671875,
0.0194854736328125,
-0.0110321044921875,
-0.01055908203125,
-0.004791259765625,
0.0201873779296875,
0.005523681640625,
0.021514892578125,
-0.0145111083984375,
0.004791259765625,
-0.014373779296875,
0.00048351287841796875,
-0.0018014907836914062,
0.00861358642578125,
0.01471710205078125,
0.01200103759765625,
0.0015058517456054688,
0.00879669189453125,
-0.0017881393432617188,
0.0279388427734375,
-0.01317596435546875,
0.0135498046875,
-0.00852203369140625,
-0.0139617919921875,
0.0188751220703125,
-0.00812530517578125,
-0.006359100341796875,
-0.0245513916015625,
-0.00801849365234375,
-0.08245849609375,
0.043853759765625,
-0.01233673095703125,
0.01605224609375,
0.037567138671875
] |
fb9076b06c96685cb270bcd6f18824f037304983
|
Wordpress Stackexchange
Q: How Can I remove or hide the export page in WordPress menu? I'm trying to remove the export.php page from WordPress admin menu -> tools
for a multisite so only the network admin could see it
I have the following code so far but can't get it to work.
//***************************************************
// Remove export Page
//***************************************************
function remove_menu_export_pages() {
remove_menu_page('export.php');
}
add_action( 'admin_init', 'remove_menu_export_pages' );
How can I solve this?
A: Whenever in doubt about a WordPress function, consult the Codex: Function_Reference/remove_menu_page.
The correct function is remove_submenu_page hooked into admin_menu.
add_action( 'admin_menu', 'remove_submenu_wpse_82873' );
function remove_submenu_wpse_82873()
{
global $current_user;
get_currentuserinfo();
// If user not Super Admin remove export page
if ( !is_super_admin() )
{
remove_submenu_page( 'tools.php', 'export.php' );
}
}
And then you'd probably would like to also block the direct access to that page through the URL address (http://example.com/wp-admin/export.php):
add_action( 'admin_head-export.php', 'prevent_url_access_wpse_82873' );
function prevent_url_access_wpse_82873()
{
global $current_user;
// Only Super Admin Authorized, exit if user not
if ( !is_super_admin() ) {
// User not authorized to access page, redirect to dashboard
wp_redirect( admin_url( 'index.php' ) );
exit;
}
}
|
Q: How Can I remove or hide the export page in WordPress menu? I'm trying to remove the export.php page from WordPress admin menu -> tools
for a multisite so only the network admin could see it
I have the following code so far but can't get it to work.
//***************************************************
// Remove export Page
//***************************************************
function remove_menu_export_pages() {
remove_menu_page('export.php');
}
add_action( 'admin_init', 'remove_menu_export_pages' );
How can I solve this?
A: Whenever in doubt about a WordPress function, consult the Codex: Function_Reference/remove_menu_page.
The correct function is remove_submenu_page hooked into admin_menu.
add_action( 'admin_menu', 'remove_submenu_wpse_82873' );
function remove_submenu_wpse_82873()
{
global $current_user;
get_currentuserinfo();
// If user not Super Admin remove export page
if ( !is_super_admin() )
{
remove_submenu_page( 'tools.php', 'export.php' );
}
}
And then you'd probably would like to also block the direct access to that page through the URL address (http://example.com/wp-admin/export.php):
add_action( 'admin_head-export.php', 'prevent_url_access_wpse_82873' );
function prevent_url_access_wpse_82873()
{
global $current_user;
// Only Super Admin Authorized, exit if user not
if ( !is_super_admin() ) {
// User not authorized to access page, redirect to dashboard
wp_redirect( admin_url( 'index.php' ) );
exit;
}
}
A: the simple working code is here:
add_filter( 'bp_settings_show_user_data_page', 'logan_plz_remove_export_data_tab_from_myprofile' );
function logan_plz_remove_export_data_tab_from_myprofile($filter) {
return false;
}
please write this code in your functions.php.
refer: http://prntscr.com/ojcxut
|
wordpress
|
{
"language": "en",
"length": 207,
"provenance": "stackexchange_00019.jsonl.gz:428203",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82873"
}
|
[
0.073486328125,
0.0015420913696289062,
0.022125244140625,
0.019989013671875,
0.031341552734375,
-0.058746337890625,
0.09478759765625,
-0.06396484375,
-0.0037975311279296875,
-0.004608154296875,
0.01323699951171875,
-0.046417236328125,
-0.037872314453125,
-0.053741455078125,
-0.007259368896484375,
-0.0526123046875,
0.01824951171875,
0.0213623046875,
0.037689208984375,
0.005352020263671875,
0.0005903244018554688,
0.0308990478515625,
-0.01434326171875,
-0.011016845703125,
0.0068206787109375,
-0.0301971435546875,
0.04656982421875,
0.004611968994140625,
0.000015914440155029297,
-0.0107879638671875,
0.013824462890625,
-0.004108428955078125,
-0.01270294189453125,
0.0556640625,
-0.02716064453125,
-0.01030731201171875,
-0.05230712890625,
0.046142578125,
0.022491455078125,
-0.021026611328125,
-0.01161956787109375,
0.0224761962890625,
-0.03509521484375,
0.00891876220703125,
-0.044403076171875,
-0.0523681640625,
-0.0011777877807617188,
-0.0009450912475585938,
-0.003692626953125,
0.038360595703125,
0.03643798828125,
0.0015163421630859375,
0.0301055908203125,
0.03375244140625,
-0.01117706298828125,
-0.0035419464111328125,
-0.0247039794921875,
0.01422882080078125,
0.0328369140625,
0.03753662109375,
-0.0164947509765625,
-0.0193023681640625,
-0.001495361328125,
-0.056671142578125,
0.0108184814453125,
0.0012607574462890625,
-0.003963470458984375,
0.021331787109375,
-0.0806884765625,
0.01070404052734375,
0.039093017578125,
-0.047027587890625,
0.0184783935546875,
0.005565643310546875,
-0.040069580078125,
-0.043548583984375,
0.034515380859375,
-0.004375457763671875,
0.030426025390625,
-0.01727294921875,
-0.01136016845703125,
0.0269927978515625,
-0.1031494140625,
0.01458740234375,
0.0026912689208984375,
0.049774169921875,
-0.024871826171875,
-0.039031982421875,
0.0011262893676757812,
0.019805908203125,
-0.01221466064453125,
-0.006267547607421875,
0.0340576171875,
0.019866943359375,
-0.0079345703125,
-0.0175018310546875,
0.050445556640625,
0.06243896484375,
-0.0182342529296875,
-0.00652313232421875,
0.009368896484375,
-0.0313720703125,
-0.00701904296875,
-0.0272064208984375,
0.0053558349609375,
0.06097412109375,
-0.00493621826171875,
-0.019805908203125,
0.02471923828125,
0.0026149749755859375,
-0.006732940673828125,
-0.0044097900390625,
-0.01432037353515625,
-0.018463134765625,
-0.0010366439819335938,
0.0241851806640625,
-0.018280029296875,
-0.00872039794921875,
-0.00789642333984375,
-0.0045318603515625,
-0.044891357421875,
-0.021331787109375,
-0.02349853515625,
-0.01125335693359375,
0.04046630859375,
0.01192474365234375,
-0.0175628662109375,
0.037078857421875,
0.021209716796875,
0.037109375,
-0.047454833984375,
-0.025146484375,
0.064697265625,
0.041351318359375,
0.035797119140625,
-0.033111572265625,
0.0097503662109375,
-0.0200958251953125,
-0.0009541511535644531,
0.028900146484375,
-0.003047943115234375,
-0.03961181640625,
-0.01312255859375,
-0.0193939208984375,
-0.0212860107421875,
-0.0057830810546875,
0.007640838623046875,
0.035858154296875,
0.0269622802734375,
-0.02618408203125,
-0.0257110595703125,
-0.0221710205078125,
0.03204345703125,
0.00591278076171875,
-0.00946044921875,
-0.01410675048828125,
0.058349609375,
-0.0276641845703125,
-0.031402587890625,
-0.034515380859375,
-0.0158233642578125,
-0.0216522216796875,
0.0093994140625,
-0.021240234375,
-0.048095703125,
0.028656005859375,
-0.0297088623046875,
-0.017547607421875,
0.02337646484375,
0.0016012191772460938,
0.0204315185546875,
-0.018951416015625,
0.019744873046875,
0.03070068359375,
0.006603240966796875,
0.0295562744140625,
-0.0227813720703125,
-0.020263671875,
0.041229248046875,
0.027130126953125,
-0.0306243896484375,
-0.0303192138671875,
0.03302001953125,
-0.01175689697265625,
-0.04931640625,
0.01349639892578125,
-0.0009093284606933594,
0.0180816650390625,
0.0272369384765625,
0.0033111572265625,
0.04425048828125,
0.00946807861328125,
-0.0009264945983886719,
-0.0283355712890625,
0.0028743743896484375,
-0.01110076904296875,
0.0123291015625,
-0.003955841064453125,
-0.0112762451171875,
0.01401519775390625,
0.0019216537475585938,
0.0028934478759765625,
-0.00867462158203125,
0.007053375244140625,
-0.06231689453125,
0.01047515869140625,
-0.01959228515625,
0.0186920166015625,
-0.001232147216796875,
0.0165252685546875,
0.00978851318359375,
0.0025882720947265625,
-0.017486572265625,
-0.0303497314453125,
-0.0166778564453125,
-0.020172119140625,
-0.0092010498046875,
0.04925537109375,
0.004241943359375,
0.043365478515625,
0.007843017578125,
-0.040557861328125,
0.01166534423828125,
0.007297515869140625,
0.0159454345703125,
0.0185699462890625,
-0.032989501953125,
0.003719329833984375,
0.00933074951171875,
-0.007160186767578125,
0.01139068603515625,
0.06024169921875,
0.048004150390625,
0.037506103515625,
-0.034332275390625,
0.005519866943359375,
-0.0164947509765625,
-0.050689697265625,
-0.022491455078125,
0.03546142578125,
0.045562744140625,
0.03973388671875,
-0.00044536590576171875,
-0.0212554931640625,
0.06915283203125,
-0.06561279296875,
-0.00396728515625,
-0.017578125,
-0.01229095458984375,
0.0020084381103515625,
0.0175933837890625,
0.001674652099609375,
0.0229949951171875,
0.01293182373046875,
0.0261993408203125,
0.02789306640625,
-0.011077880859375,
-0.0227813720703125,
0.0221405029296875,
-0.018707275390625,
0.01348876953125,
-0.00797271728515625,
-0.00876617431640625,
0.00447845458984375,
-0.0147247314453125,
-0.009307861328125,
0.00064849853515625,
0.006351470947265625,
0.00771331787109375,
-0.03271484375,
0.032623291015625,
0.02325439453125,
-0.01435089111328125,
0.0071258544921875,
0.070556640625,
-0.0175323486328125,
-0.04779052734375,
-0.007556915283203125,
-0.007183074951171875,
0.0013437271118164062,
-0.0261077880859375,
0.01303863525390625,
0.035308837890625,
-0.004749298095703125,
-0.005878448486328125,
-0.03668212890625,
0.0501708984375,
-0.01438140869140625,
0.0008082389831542969,
-0.0167694091796875,
0.023040771484375,
-0.0020732879638671875,
-0.013519287109375,
0.015838623046875,
-0.0201568603515625,
-0.02392578125,
0.047607421875,
-0.00574493408203125,
0.0241546630859375,
-0.019317626953125,
0.078125,
0.051605224609375,
-0.0318603515625,
0.0131378173828125,
-0.02069091796875,
-0.0222015380859375,
-0.033782958984375,
0.0074615478515625,
-0.0251617431640625,
-0.00925445556640625,
-0.0714111328125,
0.00798797607421875,
-0.00783538818359375,
-0.009063720703125,
-0.0399169921875,
-0.046661376953125,
-0.0306396484375,
-0.049591064453125,
-0.083740234375,
-0.033721923828125,
0.00982666015625,
-0.056488037109375,
0.035369873046875,
0.0217132568359375,
-0.022125244140625,
-0.0288848876953125,
0.05999755859375,
0.018402099609375,
0.0308990478515625,
-0.038726806640625,
-0.05859375,
-0.0284271240234375,
-0.049102783203125,
-0.01398468017578125,
-0.017822265625,
-0.039764404296875,
0.00815582275390625,
0.06646728515625,
0.0005588531494140625,
-0.0775146484375,
-0.00751495361328125,
0.0300750732421875,
-0.0108642578125,
0.0156707763671875,
-0.01535797119140625,
0.0169677734375,
-0.00958251953125,
0.01727294921875,
0.0276031494140625,
-0.00612640380859375,
0.0010366439819335938,
-0.011688232421875,
-0.0024051666259765625,
-0.0079803466796875,
0.01348876953125,
-0.026153564453125,
-0.005077362060546875,
0.0030059814453125,
-0.01502227783203125,
-0.04119873046875,
-0.012359619140625,
-0.0016946792602539062,
-0.0296478271484375,
0.045013427734375,
0.0051116943359375,
-0.0212860107421875,
0.03759765625,
0.0021266937255859375,
0.039581298828125,
0.0295562744140625,
0.004451751708984375,
0.03497314453125,
-0.0267791748046875,
-0.0224761962890625,
0.00896453857421875,
-0.0169525146484375,
0.07855224609375,
0.0016031265258789062,
-0.01200103759765625,
0.028350830078125,
-0.02008056640625,
-0.00003612041473388672,
-0.0478515625,
0.005496978759765625,
-0.04669189453125,
0.04962158203125,
-0.0205078125,
0.007381439208984375,
-0.042572021484375,
-0.0110321044921875,
-0.020721435546875,
0.06585693359375,
-0.056671142578125,
-0.0197906494140625,
-0.02215576171875,
-0.0057373046875,
0.02618408203125,
-0.0011796951293945312,
-0.032470703125,
-0.01204681396484375,
-0.10015869140625,
-0.004974365234375,
-0.0165863037109375,
-0.046112060546875,
-0.019683837890625,
-0.0350341796875,
-0.0650634765625,
-0.051788330078125,
0.0186920166015625,
0.01090240478515625,
-0.00899505615234375,
0.00939178466796875,
-0.0213470458984375,
-0.04510498046875,
-0.00843048095703125,
0.005542755126953125,
-0.052978515625,
-0.0026264190673828125,
-0.039215087890625,
0.031463623046875,
0.01751708984375,
0.0013360977172851562,
-0.02862548828125,
0.005489349365234375,
0.011077880859375,
-0.0002887248992919922,
-0.0237579345703125,
-0.0205078125,
-0.01003265380859375,
0.0263519287109375,
-0.01959228515625,
0.008544921875,
0.006420135498046875,
0.0036373138427734375,
-0.0584716796875,
-0.008026123046875,
-0.02166748046875,
0.0074005126953125,
0.04400634765625,
-0.046539306640625,
-0.05859375,
-0.033050537109375,
0.0013322830200195312,
-0.01477813720703125,
-0.00756072998046875,
0.00040531158447265625,
0.006504058837890625,
-0.058441162109375,
-0.0222015380859375,
-0.0018606185913085938,
-0.062164306640625,
0.0228729248046875,
-0.027801513671875,
0.0323486328125,
-0.00977325439453125,
-0.004367828369140625,
0.0167236328125,
0.0285797119140625,
-0.0562744140625,
0.0745849609375,
0.055023193359375,
-0.006587982177734375,
0.03045654296875,
-0.007747650146484375,
0.0197906494140625,
-0.0421142578125,
0.0094757080078125,
-0.016082763671875,
-0.02777099609375,
0.0308074951171875,
-0.024261474609375,
0.034393310546875,
-0.0225372314453125,
0.0033111572265625,
-0.0401611328125,
-0.041229248046875,
0.05523681640625,
0.071044921875,
-0.0299224853515625,
-0.06512451171875,
-0.01427459716796875,
-0.008026123046875,
-0.00738525390625,
0.0287017822265625,
0.0296630859375,
-0.014984130859375,
-0.005207061767578125,
0.0127716064453125,
-0.0026836395263671875,
-0.00543975830078125,
0.04168701171875,
-0.0215606689453125,
0.0618896484375,
-0.0391845703125,
-0.01264190673828125,
-0.0150299072265625,
-0.01035308837890625,
0.04791259765625,
0.0233001708984375,
-0.0171051025390625,
-0.036468505859375,
0.00910186767578125,
0.055145263671875,
-0.022003173828125,
0.00177001953125,
0.039886474609375,
0.0137481689453125,
-0.049102783203125,
-0.028106689453125,
-0.021331787109375,
-0.030426025390625,
-0.06573486328125,
0.0074005126953125,
-0.005733489990234375,
-0.000133514404296875,
0.0278167724609375,
0.0577392578125,
-0.00489044189453125,
0.059600830078125,
-0.0235748291015625,
0.00015985965728759766,
0.007450103759765625,
0.0220794677734375,
0.01123046875,
-0.0032291412353515625,
0.01421356201171875,
-0.00873565673828125,
0.0379638671875,
-0.004047393798828125,
0.00603485107421875,
0.031707763671875,
0.0245361328125,
0.0200347900390625,
0.0039215087890625,
-0.0321044921875,
-0.024810791015625,
-0.00948333740234375,
0.08856201171875,
0.006526947021484375,
-0.08685302734375,
-0.02752685546875,
0.0192413330078125,
0.018768310546875,
-0.0626220703125,
-0.01654052734375,
0.0165863037109375,
-0.016082763671875,
-0.005184173583984375,
0.0194549560546875,
-0.04296875,
0.0138092041015625,
0.015960693359375,
-0.023712158203125,
-0.0024261474609375,
0.0098876953125,
-0.061370849609375,
-0.0209503173828125,
-0.0242156982421875,
-0.0208282470703125,
0.06439208984375,
-0.0011692047119140625,
-0.003978729248046875,
-0.038848876953125,
0.01284027099609375,
-0.015655517578125,
-0.028076171875,
0.089599609375,
0.03936767578125,
-0.05517578125,
0.0276336669921875,
-0.055206298828125,
-0.01183319091796875,
0.04217529296875,
-0.01702880859375,
-0.035430908203125,
-0.0335693359375,
-0.0129241943359375,
-0.01751708984375,
0.009521484375,
0.01227569580078125,
0.0088653564453125,
0.040924072265625,
0.018890380859375,
0.006214141845703125,
-0.00875091552734375,
0.10552978515625,
-0.006259918212890625,
0.04534912109375,
0.0311431884765625,
0.0684814453125,
-0.0004723072052001953,
-0.021697998046875,
0.0038280487060546875,
0.003650665283203125,
-0.0123291015625,
-0.02313232421875,
0.004119873046875,
-0.01178741455078125,
0.038665771484375,
-0.01242828369140625,
-0.005962371826171875,
0.0093536376953125,
0.006465911865234375,
-0.048126220703125,
-0.01161956787109375,
-0.003993988037109375,
-0.01006317138671875,
-0.0430908203125,
-0.033111572265625,
0.039764404296875,
-0.01422882080078125,
-0.01441192626953125,
0.028594970703125,
-0.032196044921875,
0.0260467529296875,
0.04498291015625,
-0.0164642333984375,
0.05328369140625,
0.0849609375,
-0.033721923828125,
0.039031982421875,
0.0235137939453125,
-0.00801849365234375,
0.031158447265625,
-0.0127105712890625,
0.01233673095703125,
0.058013916015625,
0.042816162109375,
-0.00927734375,
-0.00505828857421875,
0.0228271484375,
-0.0284576416015625,
0.0374755859375,
0.0775146484375,
0.052764892578125,
-0.10906982421875,
0.009521484375,
0.005039215087890625,
0.0098724365234375,
0.052825927734375,
-0.00890350341796875,
-0.0229949951171875,
-0.071044921875,
0.042755126953125,
-0.016693115234375,
-0.00836944580078125,
0.0035457611083984375,
-0.0117950439453125,
-0.0343017578125,
-0.007495880126953125,
0.0167388916015625,
0.0201873779296875,
0.0049285888671875,
0.0089111328125,
-0.0241546630859375,
0.0013761520385742188,
-0.01085662841796875,
0.0030879974365234375,
0.005924224853515625,
-0.0157318115234375,
-0.053985595703125,
0.0096282958984375,
-0.0184326171875,
-0.012115478515625,
0.0086517333984375,
0.0008935928344726562,
0.02349853515625,
0.0455322265625,
-0.0236053466796875,
0.03765869140625,
0.01629638671875,
0.031707763671875,
0.004726409912109375,
-0.023101806640625,
0.020416259765625,
0.00302886962890625,
-0.038330078125,
0.019256591796875,
-0.026885986328125,
-0.0263671875,
-0.0210418701171875,
-0.0131988525390625,
0.14306640625,
-0.00975799560546875,
-0.04937744140625,
0.00994110107421875,
-0.0085906982421875,
-0.0307464599609375,
0.0013608932495117188,
0.055572509765625,
-0.01255035400390625,
-0.0182952880859375,
0.009735107421875,
-0.040008544921875,
-0.0161285400390625,
-0.01300048828125,
-0.070068359375,
0.06048583984375,
-0.04296875,
0.058746337890625,
0.0198974609375,
0.0128936767578125,
0.0074920654296875,
0.00043892860412597656,
-0.029998779296875,
0.058258056640625,
0.07403564453125,
0.002918243408203125,
-0.0100860595703125,
-0.0186767578125,
-0.004638671875,
0.03912353515625,
-0.0015878677368164062,
0.0184173583984375,
0.005748748779296875,
0.017333984375,
0.0258941650390625,
-0.01381683349609375,
-0.0100860595703125,
0.0517578125,
0.00569915771484375,
-0.0253143310546875,
0.0146484375,
-0.0345458984375,
0.0200653076171875,
-0.051422119140625,
0.00316619873046875,
0.0107421875,
0.00782012939453125,
0.0052032470703125,
-0.023162841796875,
0.0146942138671875,
-0.0452880859375,
0.0069427490234375,
0.02093505859375,
0.0171661376953125,
-0.0191497802734375,
0.005001068115234375,
-0.0274810791015625,
-0.007015228271484375,
0.050994873046875,
-0.031219482421875,
0.03753662109375,
0.00930023193359375,
0.0286407470703125,
0.041015625,
0.030059814453125,
0.00528717041015625,
0.0005393028259277344,
0.0142364501953125,
0.00988006591796875,
-0.028839111328125,
0.0162811279296875,
0.026123046875,
0.0386962890625,
0.007007598876953125,
0.021697998046875,
0.02301025390625,
0.0218963623046875,
-0.00567626953125,
-0.05712890625,
0.0133819580078125,
0.00823974609375,
-0.0110321044921875,
0.037841796875,
0.003299713134765625,
0.03826904296875,
0.08251953125,
-0.026947021484375,
0.0112152099609375,
0.0300750732421875,
-0.0018939971923828125,
0.0095977783203125,
0.030364990234375,
-0.0143890380859375,
0.0181427001953125,
-0.043609619140625,
-0.0162353515625,
0.0304107666015625,
0.054473876953125,
0.0263214111328125,
0.0212554931640625,
0.0106048583984375,
-0.02935791015625,
-0.017181396484375,
0.032379150390625,
-0.01483917236328125,
0.00572967529296875,
-0.06280517578125,
-0.0809326171875,
0.01056671142578125,
0.047576904296875,
-0.0013170242309570312,
0.030792236328125,
0.013275146484375,
0.0169219970703125,
-0.004558563232421875,
-0.01534271240234375,
0.00439453125,
-0.022430419921875,
-0.031524658203125,
-0.0170135498046875,
-0.01120758056640625,
-0.0022945404052734375,
0.00016129016876220703,
0.00732421875,
0.0178070068359375,
0.01033782958984375,
-0.027069091796875,
0.049285888671875,
-0.0023136138916015625,
0.003269195556640625,
0.0224609375,
0.01025390625,
0.005100250244140625,
0.002056121826171875,
-0.071533203125,
-0.019378662109375,
-0.0186614990234375,
0.015411376953125,
-0.0010366439819335938,
0.017364501953125,
-0.028717041015625,
0.0638427734375,
0.052001953125,
0.0055999755859375,
0.006031036376953125,
-0.0279693603515625,
0.0174407958984375,
0.00235748291015625,
0.0279998779296875,
0.0350341796875,
-0.0258636474609375,
-0.016571044921875,
-0.0239410400390625,
0.04180908203125,
0.038970947265625,
0.034423828125,
0.003498077392578125,
0.033538818359375,
-0.004947662353515625,
0.01154327392578125,
-0.020355224609375,
-0.025787353515625,
0.00689697265625,
-0.003795623779296875,
0.0025501251220703125,
-0.005405426025390625,
-0.04638671875,
0.0017404556274414062,
0.057220458984375,
-0.01611328125,
0.00958251953125,
0.021209716796875,
0.01558685302734375,
-0.031463623046875,
0.01056671142578125,
-0.01293182373046875,
-0.004734039306640625,
0.01300048828125,
0.0018825531005859375,
0.0177764892578125,
0.0285797119140625,
-0.00029158592224121094,
0.00984954833984375,
0.006725311279296875,
-0.0273590087890625,
0.017974853515625,
-0.0028514862060546875,
0.01093292236328125,
0.0212860107421875,
-0.0207061767578125,
-0.004001617431640625,
0.034332275390625,
-0.01324462890625,
0.0128021240234375,
0.01018524169921875,
0.033172607421875,
0.032623291015625,
-0.004497528076171875,
0.0011148452758789062,
-0.044586181640625,
-0.005283355712890625,
-0.0136566162109375,
-0.0160980224609375,
-0.0174560546875,
-0.0006365776062011719,
-0.034759521484375,
0.016357421875,
-0.044891357421875,
-0.0177154541015625,
0.0027828216552734375,
0.0268402099609375,
-0.006832122802734375,
-0.0222015380859375,
-0.0980224609375,
0.010467529296875,
0.0301971435546875,
0.0215301513671875,
-0.0843505859375,
0.055084228515625,
-0.01125335693359375,
0.04766845703125,
-0.0121002197265625,
0.0721435546875,
-0.0489501953125,
-0.0312347412109375,
-0.039093017578125,
-0.0149688720703125,
-0.035797119140625,
0.05963134765625,
-0.0034084320068359375,
-0.0097808837890625,
0.024322509765625,
0.00321197509765625,
-0.006229400634765625,
-0.0137939453125,
-0.031707763671875,
0.029693603515625,
-0.03619384765625,
-0.021942138671875,
-0.023406982421875,
0.01430511474609375,
0.0252685546875,
-0.01369476318359375,
-0.01474761962890625,
0.00991058349609375,
0.002490997314453125,
0.0538330078125,
-0.011505126953125,
0.02642822265625,
-0.02813720703125,
-0.05322265625,
0.0259552001953125,
0.02032470703125,
-0.052978515625,
0.01163482666015625,
0.0242919921875,
-0.010345458984375,
-0.0148773193359375,
-0.0049591064453125,
-0.0015554428100585938,
0.02471923828125,
0.01666259765625,
0.0123748779296875,
0.0372314453125,
-0.024810791015625,
0.0489501953125,
-0.0423583984375,
0.0295562744140625,
-0.0024967193603515625,
0.0009784698486328125,
-0.0125732421875,
0.01313018798828125,
0.0328369140625,
0.044158935546875,
-0.0119476318359375,
0.05230712890625,
0.01428985595703125,
-0.01507568359375,
-0.022308349609375,
0.01497650146484375,
-0.04095458984375,
0.0222625732421875,
0.06610107421875,
0.10986328125,
0.023773193359375,
-0.04949951171875,
-0.041290283203125,
-0.04132080078125,
-0.0161590576171875,
-0.0310516357421875,
0.021759033203125,
-0.07818603515625,
-0.01629638671875,
0.01461029052734375,
-0.02471923828125,
0.00522613525390625,
0.0008997917175292969,
-0.03143310546875,
-0.0017337799072265625,
0.0207672119140625,
0.0135650634765625,
-0.05615234375,
-0.0183563232421875,
0.020599365234375,
-0.039703369140625,
-0.04571533203125,
0.0028629302978515625,
0.0086822509765625,
-0.039764404296875,
-0.026458740234375,
-0.048828125,
0.01409912109375,
-0.037078857421875,
0.009521484375,
-0.0111846923828125,
0.043853759765625,
-0.0283355712890625,
0.0303192138671875,
-0.007801055908203125,
0.026123046875,
0.00994110107421875,
0.03521728515625,
-0.04608154296875,
0.0372314453125,
0.00372314453125,
0.0012760162353515625,
-0.040557861328125,
0.07904052734375,
-0.02685546875,
0.03033447265625,
0.0169677734375,
0.006221771240234375,
0.08270263671875,
-0.0205841064453125,
-0.0146484375,
0.016571044921875,
-0.0262603759765625,
-0.06695556640625,
0.0386962890625,
0.028076171875,
0.031951904296875,
0.0244598388671875
] |
c1cc51c122c1e35de089ae3240bf7346f31b9c2e
|
Wordpress Stackexchange
Q: how to force caching of wordpress admin Because of using slow connection these days, I would like to force WordPress's Admin section to be cached in browser (FF,IE) so that it it takes less time to load admin pages (because in fact, most of items never change.). Is there any way to do that?
A: your problem is not with the admin pages themself, they are simply not big enough to be hugely impacted by slow connection, but with JS and CSS files. You can set an expiry date for them which will signal to the browser it may cache them until that time.
To cache them for a week in your .htaccess file add (idea taken from askapache)
# 1 WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf|js|css)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
The max age parameter specifies the time in seconds after which the url have to be fetched again.
If this is not good enough, maybe because your browser cache is full with other files which you access more frequently, then you should install a caching proxy on your PC, configure it to always cache JS and CSS from your site, and configure the browser to use the proxy.
|
Q: how to force caching of wordpress admin Because of using slow connection these days, I would like to force WordPress's Admin section to be cached in browser (FF,IE) so that it it takes less time to load admin pages (because in fact, most of items never change.). Is there any way to do that?
A: your problem is not with the admin pages themself, they are simply not big enough to be hugely impacted by slow connection, but with JS and CSS files. You can set an expiry date for them which will signal to the browser it may cache them until that time.
To cache them for a week in your .htaccess file add (idea taken from askapache)
# 1 WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf|js|css)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
The max age parameter specifies the time in seconds after which the url have to be fetched again.
If this is not good enough, maybe because your browser cache is full with other files which you access more frequently, then you should install a caching proxy on your PC, configure it to always cache JS and CSS from your site, and configure the browser to use the proxy.
|
wordpress
|
{
"language": "en",
"length": 199,
"provenance": "stackexchange_00019.jsonl.gz:428204",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82884"
}
|
[
0.0498046875,
0.0131072998046875,
0.005859375,
-0.035125732421875,
0.0128936767578125,
-0.0276947021484375,
0.01187896728515625,
-0.04693603515625,
-0.010894775390625,
0.01247406005859375,
-0.0166015625,
-0.0214080810546875,
0.00797271728515625,
-0.032196044921875,
0.006603240966796875,
-0.040283203125,
0.0423583984375,
0.01421356201171875,
0.02984619140625,
0.00997161865234375,
0.0023670196533203125,
0.045654296875,
-0.01284027099609375,
-0.006866455078125,
0.011016845703125,
-0.031768798828125,
0.07244873046875,
-0.02911376953125,
0.01605224609375,
-0.017333984375,
0.017913818359375,
-0.0018024444580078125,
0.0284423828125,
0.024993896484375,
-0.051300048828125,
-0.048431396484375,
-0.03741455078125,
0.0241241455078125,
-0.0245208740234375,
0.011383056640625,
-0.0014314651489257812,
0.0080108642578125,
0.0237579345703125,
0.0595703125,
-0.021820068359375,
-0.0313720703125,
-0.0231475830078125,
-0.06683349609375,
0.0026836395263671875,
-0.013519287109375,
0.00008130073547363281,
-0.00510406494140625,
0.018524169921875,
-0.003536224365234375,
-0.01120758056640625,
-0.01035308837890625,
0.00732421875,
-0.005504608154296875,
0.0379638671875,
-0.053253173828125,
-0.04937744140625,
-0.0190887451171875,
0.02764892578125,
0.004497528076171875,
-0.0086822509765625,
-0.03369140625,
0.0362548828125,
0.024688720703125,
-0.08465576171875,
-0.0263214111328125,
0.06219482421875,
-0.023345947265625,
0.005100250244140625,
-0.00377655029296875,
0.00997161865234375,
-0.01435089111328125,
-0.00885772705078125,
0.00392913818359375,
0.0218505859375,
0.01451873779296875,
0.0175933837890625,
0.02679443359375,
-0.022857666015625,
-0.024566650390625,
0.020050048828125,
0.01163482666015625,
-0.01100921630859375,
-0.023468017578125,
0.004085540771484375,
-0.050079345703125,
-0.006866455078125,
-0.05889892578125,
-0.0169830322265625,
0.00235748291015625,
-0.007579803466796875,
-0.0528564453125,
0.0035247802734375,
0.03289794921875,
-0.000054895877838134766,
0.00400543212890625,
-0.036468505859375,
-0.0070648193359375,
-0.0167388916015625,
-0.0156707763671875,
0.0047149658203125,
0.0181427001953125,
-0.0491943359375,
0.015899658203125,
0.05596923828125,
0.05291748046875,
0.01166534423828125,
-0.00844573974609375,
-0.01145172119140625,
-0.0033817291259765625,
-0.0219879150390625,
0.00818634033203125,
-0.031097412109375,
-0.0250091552734375,
-0.0192718505859375,
-0.0197906494140625,
-0.001194000244140625,
0.0043182373046875,
-0.0157623291015625,
0.01329803466796875,
-0.006175994873046875,
-0.0135040283203125,
-0.025390625,
0.00525665283203125,
-0.0303802490234375,
-0.0008401870727539062,
-0.0242919921875,
0.006610870361328125,
0.062469482421875,
0.072998046875,
0.05352783203125,
-0.01386260986328125,
0.0206756591796875,
0.00444793701171875,
-0.005298614501953125,
0.01141357421875,
-0.005889892578125,
-0.0206146240234375,
0.0140533447265625,
-0.026763916015625,
0.0116119384765625,
0.0085601806640625,
-0.006988525390625,
0.01145172119140625,
0.037139892578125,
-0.033905029296875,
0.00798797607421875,
-0.034271240234375,
0.0511474609375,
0.00341033935546875,
-0.0306396484375,
-0.0091552734375,
0.0321044921875,
-0.0118560791015625,
-0.04486083984375,
-0.050933837890625,
0.00010496377944946289,
-0.0084686279296875,
0.01666259765625,
-0.01383209228515625,
-0.01354217529296875,
0.0012044906616210938,
-0.01248931884765625,
0.006465911865234375,
0.03814697265625,
-0.011444091796875,
0.0439453125,
-0.01552581787109375,
0.013671875,
0.0189971923828125,
0.006988525390625,
0.01416015625,
0.0181121826171875,
0.006504058837890625,
0.00655364990234375,
-0.00215911865234375,
-0.014068603515625,
-0.0226287841796875,
0.048919677734375,
-0.015045166015625,
-0.0010356903076171875,
-0.0178070068359375,
-0.0006546974182128906,
-0.0000438690185546875,
0.0145721435546875,
0.019195556640625,
0.0012044906616210938,
0.0198211669921875,
-0.01995849609375,
0.043670654296875,
-0.0012664794921875,
-0.018646240234375,
-0.0100555419921875,
0.029327392578125,
-0.017181396484375,
-0.048919677734375,
0.028594970703125,
0.00543212890625,
-0.02178955078125,
-0.024871826171875,
-0.0308074951171875,
-0.022003173828125,
-0.002529144287109375,
0.0177001953125,
0.014190673828125,
0.04949951171875,
-0.00994110107421875,
0.00543975830078125,
-0.0014009475708007812,
-0.05804443359375,
-0.020111083984375,
-0.040863037109375,
0.00304412841796875,
0.044464111328125,
0.0021915435791015625,
0.040191650390625,
0.0157012939453125,
-0.03564453125,
0.01177978515625,
-0.00994110107421875,
-0.0215606689453125,
0.018280029296875,
-0.0277862548828125,
0.024566650390625,
-0.01059722900390625,
0.0002167224884033203,
0.0338134765625,
0.0273590087890625,
0.046600341796875,
0.060455322265625,
-0.0224761962890625,
-0.022003173828125,
-0.033355712890625,
-0.08587646484375,
0.00617218017578125,
0.0643310546875,
0.031341552734375,
-0.0318603515625,
-0.020111083984375,
-0.00379180908203125,
-0.016326904296875,
-0.036651611328125,
0.0221405029296875,
-0.00577545166015625,
0.006908416748046875,
-0.024017333984375,
0.00745391845703125,
-0.052764892578125,
0.047943115234375,
-0.060394287109375,
0.0280609130859375,
0.011566162109375,
0.0103912353515625,
-0.023834228515625,
0.021209716796875,
-0.009307861328125,
0.0235443115234375,
0.04034423828125,
-0.03143310546875,
0.02764892578125,
0.033782958984375,
-0.0008225440979003906,
0.02947998046875,
0.026153564453125,
-0.0028362274169921875,
0.01009368896484375,
-0.003017425537109375,
-0.054168701171875,
0.0006666183471679688,
0.007472991943359375,
0.022613525390625,
-0.0218048095703125,
-0.05169677734375,
0.006748199462890625,
0.04571533203125,
0.0000019073486328125,
0.004863739013671875,
0.0267333984375,
-0.014495849609375,
0.0035228729248046875,
-0.01445770263671875,
-0.00959014892578125,
0.019134521484375,
0.042449951171875,
0.04437255859375,
0.0263214111328125,
0.04779052734375,
0.003307342529296875,
-0.017181396484375,
0.0631103515625,
-0.0265960693359375,
-0.037445068359375,
0.0269622802734375,
-0.037139892578125,
0.038543701171875,
-0.013458251953125,
0.08502197265625,
0.07305908203125,
-0.0029449462890625,
0.040496826171875,
-0.0024433135986328125,
0.0205078125,
0.01366424560546875,
0.00714874267578125,
0.00594329833984375,
-0.0255584716796875,
-0.0160675048828125,
0.0128173828125,
0.034210205078125,
0.0012378692626953125,
0.0239715576171875,
-0.0288238525390625,
-0.015960693359375,
0.02099609375,
-0.11669921875,
-0.1085205078125,
-0.06500244140625,
-0.01324462890625,
-0.016021728515625,
0.054229736328125,
-0.0033321380615234375,
0.01409912109375,
0.05291748046875,
0.0144500732421875,
-0.0253753662109375,
-0.02191162109375,
-0.0280914306640625,
-0.044464111328125,
-0.042633056640625,
-0.0322265625,
-0.0145263671875,
-0.0153350830078125,
-0.0022830963134765625,
0.053466796875,
-0.00539398193359375,
-0.09368896484375,
-0.046844482421875,
-0.0182037353515625,
0.002872467041015625,
0.0096893310546875,
0.01035308837890625,
-0.0731201171875,
0.01258087158203125,
-0.00952911376953125,
0.04150390625,
0.01479339599609375,
0.00768280029296875,
0.00220489501953125,
-0.024658203125,
-0.0175933837890625,
0.0089569091796875,
-0.030059814453125,
0.004673004150390625,
0.002017974853515625,
-0.00731658935546875,
-0.038116455078125,
-0.04681396484375,
0.031005859375,
-0.032440185546875,
-0.01421356201171875,
0.00867462158203125,
-0.027313232421875,
0.0160980224609375,
0.006134033203125,
0.0240936279296875,
0.00354766845703125,
0.01064300537109375,
-0.02813720703125,
0.019134521484375,
0.011016845703125,
0.022857666015625,
-0.0171356201171875,
0.042816162109375,
-0.02294921875,
0.038604736328125,
0.0238037109375,
-0.006839752197265625,
0.0213623046875,
-0.0081024169921875,
0.00908660888671875,
-0.06353759765625,
0.023040771484375,
-0.0296173095703125,
0.053009033203125,
-0.06182861328125,
-0.0258026123046875,
-0.023956298828125,
0.10125732421875,
-0.01568603515625,
-0.0168609619140625,
-0.0152740478515625,
0.019134521484375,
-0.0239715576171875,
-0.06219482421875,
0.00018715858459472656,
-0.016143798828125,
-0.06878662109375,
0.0014505386352539062,
0.00594329833984375,
-0.043548583984375,
0.004337310791015625,
-0.018218994140625,
-0.0229034423828125,
-0.04388427734375,
0.012603759765625,
-0.053863525390625,
0.0027332305908203125,
0.0064697265625,
0.0015573501586914062,
-0.03228759765625,
0.022430419921875,
-0.0596923828125,
-0.054290771484375,
-0.0179595947265625,
-0.033050537109375,
0.070068359375,
0.0423583984375,
-0.036163330078125,
0.00567626953125,
0.048675537109375,
0.022613525390625,
0.00891876220703125,
0.0177001953125,
-0.01390838623046875,
-0.0035533905029296875,
-0.008941650390625,
0.025634765625,
-0.03802490234375,
-0.01268768310546875,
0.00341796875,
-0.04107666015625,
-0.0121002197265625,
0.003448486328125,
-0.0254974365234375,
0.051177978515625,
-0.035675048828125,
-0.038421630859375,
-0.03363037109375,
-0.046478271484375,
-0.0229949951171875,
-0.0231170654296875,
-0.0019292831420898438,
-0.0234832763671875,
-0.021942138671875,
0.043914794921875,
-0.0004420280456542969,
0.01483917236328125,
-0.004276275634765625,
0.07403564453125,
0.00856781005859375,
-0.0279083251953125,
-0.0036296844482421875,
0.023101806640625,
0.04595947265625,
-0.0280914306640625,
0.046112060546875,
0.0189361572265625,
-0.0243377685546875,
0.08221435546875,
-0.0023040771484375,
0.021728515625,
-0.018096923828125,
0.0634765625,
0.0022335052490234375,
-0.01328277587890625,
0.03167724609375,
0.006500244140625,
-0.05914306640625,
0.0163421630859375,
0.01430511474609375,
0.0020771026611328125,
-0.0081634521484375,
0.0289764404296875,
0.036834716796875,
-0.058502197265625,
-0.053009033203125,
-0.0305023193359375,
0.007587432861328125,
-0.0288543701171875,
0.0631103515625,
0.028839111328125,
-0.0051116943359375,
0.0697021484375,
0.06683349609375,
0.0024242401123046875,
0.004638671875,
-0.004383087158203125,
-0.0007758140563964844,
0.0221405029296875,
0.0273590087890625,
0.002590179443359375,
0.001621246337890625,
-0.01404571533203125,
0.03570556640625,
0.003875732421875,
-0.0667724609375,
0.010284423828125,
0.004608154296875,
-0.00608062744140625,
0.0438232421875,
-0.023956298828125,
0.01395416259765625,
-0.0168304443359375,
0.005565643310546875,
0.0167388916015625,
-0.0281219482421875,
-0.03851318359375,
-0.0166473388671875,
0.05487060546875,
0.004543304443359375,
0.006195068359375,
0.00948333740234375,
0.060272216796875,
0.0036163330078125,
0.0158843994140625,
-0.007167816162109375,
0.066162109375,
0.021209716796875,
0.03955078125,
-0.0002281665802001953,
0.0168914794921875,
0.004138946533203125,
0.0017881393432617188,
-0.0080413818359375,
-0.0211334228515625,
0.00402069091796875,
0.021270751953125,
0.025604248046875,
0.03277587890625,
-0.0014009475708007812,
-0.006805419921875,
-0.0185546875,
-0.005847930908203125,
0.00673675537109375,
-0.029144287109375,
-0.0166168212890625,
-0.0430908203125,
-0.03533935546875,
0.0390625,
-0.007678985595703125,
-0.033416748046875,
0.0611572265625,
-0.0333251953125,
0.02850341796875,
0.045806884765625,
-0.0259246826171875,
-0.00942230224609375,
-0.00901031494140625,
0.0184478759765625,
-0.0229034423828125,
-0.01241302490234375,
-0.038360595703125,
-0.0003008842468261719,
-0.0159149169921875,
0.0111846923828125,
0.019073486328125,
-0.01222991943359375,
-0.0035152435302734375,
-0.031829833984375,
0.036468505859375,
-0.016448974609375,
0.0186614990234375,
0.0200653076171875,
0.001251220703125,
-0.04400634765625,
-0.01165008544921875,
-0.0587158203125,
-0.0269775390625,
-0.068115234375,
-0.0276336669921875,
-0.041778564453125,
0.0243072509765625,
0.0150146484375,
0.0007257461547851562,
-0.0005135536193847656,
-0.007587432861328125,
-0.022735595703125,
0.052581787109375,
0.03912353515625,
0.05908203125,
-0.0296173095703125,
0.048065185546875,
-0.021728515625,
0.010772705078125,
-0.031402587890625,
-0.0109405517578125,
-0.01348876953125,
0.021484375,
0.00890350341796875,
-0.0248565673828125,
-0.023193359375,
0.0128326416015625,
-0.034515380859375,
-0.01861572265625,
0.0023136138916015625,
-0.01009368896484375,
0.036468505859375,
-0.00713348388671875,
0.00925445556640625,
-0.0297088623046875,
-0.01107025146484375,
-0.049407958984375,
0.030029296875,
-0.046051025390625,
0.017578125,
0.051605224609375,
-0.0031528472900390625,
-0.08929443359375,
0.05743408203125,
0.02105712890625,
0.053863525390625,
-0.0016889572143554688,
-0.0117340087890625,
-0.00907135009765625,
0.056640625,
0.06793212890625,
0.08380126953125,
0.0029506683349609375,
0.06982421875,
0.046295166015625,
0.020263671875,
0.001678466796875,
-0.019805908203125,
0.004077911376953125,
-0.01087188720703125,
0.00846099853515625,
-0.004528045654296875,
-0.006725311279296875,
-0.0095672607421875,
0.07330322265625,
0.042633056640625,
-0.06451416015625,
-0.0151519775390625,
-0.045501708984375,
-0.0275726318359375,
0.0203857421875,
-0.00615692138671875,
-0.027496337890625,
-0.0732421875,
0.038665771484375,
0.0018491744995117188,
-0.0077972412109375,
0.0106353759765625,
0.0057830810546875,
0.0191192626953125,
0.0231781005859375,
0.0210418701171875,
-0.0222015380859375,
-0.035919189453125,
-0.049072265625,
0.01413726806640625,
-0.026611328125,
0.00380706787109375,
0.0330810546875,
-0.00539398193359375,
-0.016632080078125,
-0.034088134765625,
-0.01509857177734375,
0.0064544677734375,
-0.031585693359375,
0.054412841796875,
0.0263824462890625,
0.03753662109375,
0.051788330078125,
0.00807952880859375,
0.0221099853515625,
0.0028705596923828125,
0.0291900634765625,
0.003688812255859375,
-0.0267333984375,
-0.005584716796875,
0.005565643310546875,
-0.004703521728515625,
0.016357421875,
-0.00701904296875,
-0.041778564453125,
-0.0016231536865234375,
0.0164031982421875,
0.0372314453125,
-0.033447265625,
-0.0030956268310546875,
0.035736083984375,
0.0219573974609375,
-0.006092071533203125,
-0.0159912109375,
0.0159149169921875,
-0.0004801750183105469,
0.035400390625,
-0.01099395751953125,
0.0023479461669921875,
-0.01038360595703125,
-0.03350830078125,
-0.055450439453125,
0.08843994140625,
-0.0039520263671875,
0.03466796875,
0.01485443115234375,
0.0352783203125,
-0.031036376953125,
0.00818634033203125,
-0.004817962646484375,
0.01520538330078125,
-0.005767822265625,
-0.003688812255859375,
-0.058624267578125,
-0.0239410400390625,
-0.0192413330078125,
0.07379150390625,
0.0009455680847167969,
0.0231170654296875,
-0.08782958984375,
0.01788330078125,
0.0511474609375,
0.039459228515625,
0.0416259765625,
0.0859375,
-0.0222625732421875,
0.01372528076171875,
-0.0115966796875,
-0.0285186767578125,
0.0240478515625,
-0.027679443359375,
-0.058380126953125,
0.0034160614013671875,
0.005504608154296875,
0.00251007080078125,
0.001251220703125,
0.0545654296875,
-0.078369140625,
0.00705718994140625,
0.06829833984375,
-0.0335693359375,
-0.0030307769775390625,
-0.0121612548828125,
-0.0003192424774169922,
-0.02508544921875,
-0.032958984375,
-0.00774383544921875,
0.0221710205078125,
0.022308349609375,
-0.01190185546875,
-0.009307861328125,
0.0013065338134765625,
-0.004863739013671875,
-0.007366180419921875,
-0.005779266357421875,
0.037200927734375,
-0.03399658203125,
0.019622802734375,
0.0264434814453125,
0.050933837890625,
-0.01238250732421875,
-0.050506591796875,
0.006061553955078125,
0.0367431640625,
0.005466461181640625,
-0.056640625,
0.00946807861328125,
0.013397216796875,
0.0156097412109375,
0.01885986328125,
0.0243377685546875,
-0.0574951171875,
-0.0003190040588378906,
0.039794921875,
0.006649017333984375,
-0.0001671314239501953,
-0.044525146484375,
0.01125335693359375,
0.0643310546875,
0.01519775390625,
0.06304931640625,
-0.01036834716796875,
-0.013885498046875,
-0.0088043212890625,
0.038909912109375,
0.03643798828125,
-0.002445220947265625,
-0.029937744140625,
-0.0138702392578125,
-0.006893157958984375,
0.0162811279296875,
-0.005615234375,
-0.00940704345703125,
-0.0154266357421875,
-0.0367431640625,
0.0286102294921875,
0.0304412841796875,
-0.0121612548828125,
-0.028228759765625,
0.0272369384765625,
0.045654296875,
-0.03021240234375,
-0.031982421875,
0.031524658203125,
-0.0064697265625,
0.032958984375,
-0.01678466796875,
0.025390625,
0.0099029541015625,
-0.012481689453125,
-0.020416259765625,
-0.0058135986328125,
0.06005859375,
-0.0244293212890625,
-0.0175933837890625,
-0.002227783203125,
-0.054595947265625,
0.02801513671875,
-0.025177001953125,
0.0281524658203125,
-0.00542449951171875,
-0.0159912109375,
-0.008148193359375,
0.003326416015625,
-0.01837158203125,
0.017608642578125,
0.03594970703125,
-0.039276123046875,
0.05767822265625,
0.005046844482421875,
-0.01421356201171875,
-0.021697998046875,
0.03228759765625,
-0.007747650146484375,
-0.0264892578125,
0.03387451171875,
-0.02130126953125,
-0.046234130859375,
-0.0316162109375,
-0.04833984375,
0.04241943359375,
0.0234222412109375,
0.06890869140625,
-0.00885009765625,
0.048431396484375,
0.022003173828125,
-0.0302886962890625,
0.035186767578125,
0.035308837890625,
-0.05419921875,
-0.01788330078125,
-0.007740020751953125,
-0.004940032958984375,
-0.07086181640625,
0.0018815994262695312,
0.0157012939453125,
-0.0350341796875,
-0.0019969940185546875,
0.004795074462890625,
0.0197906494140625,
-0.0121612548828125,
-0.004802703857421875,
-0.049530029296875,
-0.057861328125,
-0.0179595947265625,
0.0108184814453125,
-0.020050048828125,
-0.036773681640625,
-0.018218994140625,
0.032012939453125,
0.023040771484375,
-0.01512908935546875,
0.0230255126953125,
-0.0241851806640625,
0.05743408203125,
0.030731201171875,
-0.015533447265625,
-0.0004215240478515625,
0.00865936279296875,
-0.0305633544921875,
0.0264434814453125,
-0.0043487548828125,
0.0190277099609375,
-0.00844573974609375,
-0.004940032958984375,
0.01641845703125,
0.0269317626953125,
0.033660888671875,
-0.03436279296875,
0.020599365234375,
0.022918701171875,
0.007640838623046875,
0.016815185546875,
-0.020843505859375,
-0.0297698974609375,
-0.0186309814453125,
-0.01361846923828125,
0.01052093505859375,
-0.0167999267578125,
-0.07342529296875,
-0.07489013671875,
0.045867919921875,
0.058685302734375,
0.0161590576171875,
-0.08050537109375,
0.074462890625,
-0.05963134765625,
0.061676025390625,
0.03240966796875,
0.005340576171875,
-0.0199127197265625,
-0.00443267822265625,
-0.000049114227294921875,
-0.036834716796875,
-0.0562744140625,
0.050018310546875,
-0.0338134765625,
-0.0267791748046875,
0.013580322265625,
0.0280303955078125,
0.0341796875,
-0.05572509765625,
-0.05548095703125,
0.003055572509765625,
-0.0645751953125,
0.024017333984375,
0.051239013671875,
0.0133056640625,
-0.05377197265625,
-0.091796875,
-0.00934600830078125,
-0.005832672119140625,
0.034881591796875,
-0.032745361328125,
0.0263214111328125,
0.0286865234375,
-0.0224609375,
-0.05767822265625,
-0.002109527587890625,
-0.01386260986328125,
-0.0216827392578125,
-0.055511474609375,
-0.0159759521484375,
-0.01275634765625,
0.016845703125,
-0.022247314453125,
-0.02496337890625,
-0.0184478759765625,
0.061309814453125,
0.0264129638671875,
0.0106201171875,
0.01557159423828125,
0.037322998046875,
-0.039947509765625,
0.043731689453125,
0.0263824462890625,
0.0172119140625,
0.0010766983032226562,
0.0192413330078125,
0.0254364013671875,
0.08294677734375,
0.004718780517578125,
0.0258636474609375,
0.004810333251953125,
-0.06268310546875,
-0.0144805908203125,
-0.032257080078125,
-0.0031223297119140625,
0.007709503173828125,
0.03314208984375,
0.06396484375,
-0.007144927978515625,
-0.046417236328125,
-0.0167694091796875,
0.021697998046875,
-0.0357666015625,
-0.01245880126953125,
0.02667236328125,
-0.050048828125,
-0.0009236335754394531,
-0.0269622802734375,
-0.007480621337890625,
0.035186767578125,
0.012847900390625,
-0.00885009765625,
0.0202178955078125,
0.05242919921875,
-0.0269622802734375,
-0.0360107421875,
-0.0036678314208984375,
0.037567138671875,
-0.036224365234375,
-0.026641845703125,
0.0007853507995605469,
0.0275726318359375,
-0.006496429443359375,
-0.0299530029296875,
0.019866943359375,
0.032806396484375,
-0.01384735107421875,
0.0104827880859375,
0.0263519287109375,
-0.0033111572265625,
-0.01629638671875,
-0.00543975830078125,
-0.0066375732421875,
-0.0042572021484375,
0.00251007080078125,
-0.00547027587890625,
0.0010585784912109375,
-0.02642822265625,
-0.019439697265625,
0.01261138916015625,
-0.01239776611328125,
-0.0222930908203125,
-0.01910400390625,
0.0303955078125,
-0.0012683868408203125,
-0.011383056640625,
0.030548095703125,
-0.019012451171875,
-0.005889892578125,
0.0100555419921875,
0.0122222900390625,
-0.0211181640625,
0.0140228271484375,
-0.04931640625,
0.0044097900390625,
-0.0026149749755859375
] |
e9138e97fa9569af418b230964fcdc4ea02ef2d3
|
Wordpress Stackexchange
Q: wp_insert_post() Callback? After I added a post by wp_insert_post();
Any callback after I added ? I need permalink of added post.
I have idea only search by title and post-type (I use custom post-type in my case), But any better function ?
A: $post_id = wp_insert_post( $arg ); #returns post ID
$permalink = get_permalink( $post_id ); #returns the permalink
Codex:
http://codex.wordpress.org/Function_Reference/wp_insert_post
|
Q: wp_insert_post() Callback? After I added a post by wp_insert_post();
Any callback after I added ? I need permalink of added post.
I have idea only search by title and post-type (I use custom post-type in my case), But any better function ?
A: $post_id = wp_insert_post( $arg ); #returns post ID
$permalink = get_permalink( $post_id ); #returns the permalink
Codex:
http://codex.wordpress.org/Function_Reference/wp_insert_post
A: Oh I found !
$post_id = wp_insert_post($arg); // return post ID
|
wordpress
|
{
"language": "en",
"length": 74,
"provenance": "stackexchange_00019.jsonl.gz:428209",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82905"
}
|
[
0.07861328125,
0.009613037109375,
0.020599365234375,
0.0007882118225097656,
0.0266265869140625,
-0.0279998779296875,
0.08636474609375,
-0.066162109375,
-0.0106048583984375,
0.005512237548828125,
-0.036285400390625,
0.031402587890625,
-0.01523590087890625,
-0.02703857421875,
0.01776123046875,
-0.022064208984375,
0.03204345703125,
-0.01468658447265625,
0.041290283203125,
-0.00394439697265625,
0.012420654296875,
0.003978729248046875,
0.039031982421875,
0.007610321044921875,
0.02020263671875,
0.041900634765625,
0.01763916015625,
-0.030303955078125,
0.01361846923828125,
-0.00046563148498535156,
0.0158843994140625,
-0.03509521484375,
-0.0011205673217773438,
0.0188446044921875,
0.0154876708984375,
0.042816162109375,
0.0116424560546875,
0.01277923583984375,
0.0438232421875,
0.0096435546875,
0.025665283203125,
0.0005931854248046875,
0.017547607421875,
0.0379638671875,
-0.0066986083984375,
-0.045379638671875,
0.03680419921875,
-0.041961669921875,
0.0137176513671875,
-0.0305633544921875,
0.01776123046875,
0.0146331787109375,
0.0272979736328125,
-0.0194091796875,
-0.0152740478515625,
0.0089111328125,
0.007720947265625,
0.0032196044921875,
0.0555419921875,
-0.029388427734375,
-0.07330322265625,
-0.03887939453125,
0.0272064208984375,
-0.04266357421875,
-0.0151519775390625,
0.0118255615234375,
0.0030040740966796875,
0.01561737060546875,
-0.07379150390625,
-0.016021728515625,
0.042694091796875,
-0.054473876953125,
-0.026123046875,
0.01517486572265625,
-0.030548095703125,
-0.01551055908203125,
0.037078857421875,
-0.0143890380859375,
-0.011138916015625,
0.03594970703125,
0.0088958740234375,
-0.0218353271484375,
0.01227569580078125,
-0.04736328125,
0.0191497802734375,
-0.038421630859375,
0.001392364501953125,
0.01043701171875,
-0.033416748046875,
-0.0428466796875,
-0.046630859375,
-0.03729248046875,
-0.0003809928894042969,
-0.0164947509765625,
-0.0360107421875,
0.0005025863647460938,
0.00412750244140625,
0.062255859375,
-0.0229949951171875,
0.034942626953125,
-0.0110931396484375,
-0.0229949951171875,
0.03753662109375,
-0.05743408203125,
-0.01424407958984375,
-0.0156402587890625,
-0.0085601806640625,
-0.045440673828125,
-0.003055572509765625,
0.041961669921875,
-0.037109375,
-0.00696563720703125,
0.02813720703125,
-0.01219940185546875,
-0.0088043212890625,
0.0025577545166015625,
-0.01052093505859375,
0.0310516357421875,
0.00652313232421875,
0.0146484375,
0.007259368896484375,
0.020751953125,
-0.01348114013671875,
-0.0011281967163085938,
-0.00986480712890625,
-0.01407623291015625,
-0.0147705078125,
-0.01727294921875,
-0.018524169921875,
0.025787353515625,
-0.02081298828125,
0.00734710693359375,
0.10577392578125,
0.040313720703125,
-0.0014810562133789062,
-0.03131103515625,
0.0009555816650390625,
-0.01495361328125,
0.0055999755859375,
-0.00585174560546875,
0.004150390625,
-0.039306640625,
-0.01436614990234375,
0.01216888427734375,
0.035736083984375,
0.0218048095703125,
-0.0020751953125,
0.01226043701171875,
0.0299835205078125,
-0.04058837890625,
0.03857421875,
-0.0248260498046875,
-0.009613037109375,
0.024139404296875,
0.0181427001953125,
-0.006191253662109375,
-0.00970458984375,
-0.01476287841796875,
0.045654296875,
-0.007106781005859375,
-0.004364013671875,
-0.006103515625,
0.0185089111328125,
-0.00666046142578125,
-0.05194091796875,
0.0289764404296875,
-0.037353515625,
-0.00806427001953125,
0.01535797119140625,
0.07501220703125,
-0.0105743408203125,
0.0086517333984375,
-0.017852783203125,
-0.0171661376953125,
-0.02423095703125,
-0.0452880859375,
0.036712646484375,
0.01374053955078125,
0.0016183853149414062,
0.05377197265625,
-0.002841949462890625,
-0.0210113525390625,
0.050750732421875,
-0.0299072265625,
-0.041107177734375,
0.050140380859375,
0.049774169921875,
0.072509765625,
-0.0391845703125,
0.038665771484375,
0.03759765625,
0.06549072265625,
-0.049652099609375,
0.0024242401123046875,
-0.0184173583984375,
-0.01032257080078125,
-0.0185546875,
0.003993988037109375,
-0.033477783203125,
0.0240631103515625,
-0.004608154296875,
0.01190948486328125,
-0.0022830963134765625,
0.04888916015625,
-0.0487060546875,
0.02197265625,
-0.024627685546875,
0.02276611328125,
0.0400390625,
0.022308349609375,
-0.0080108642578125,
0.00079345703125,
0.0167999267578125,
-0.06512451171875,
-0.0452880859375,
0.013763427734375,
-0.04425048828125,
-0.006244659423828125,
-0.0443115234375,
0.0255889892578125,
-0.05999755859375,
0.004791259765625,
-0.057586669921875,
0.00971221923828125,
0.0665283203125,
0.0151214599609375,
-0.0288543701171875,
-0.0217132568359375,
0.0164642333984375,
0.026458740234375,
-0.07720947265625,
0.03387451171875,
0.03125,
0.0244293212890625,
-0.0156097412109375,
0.0010128021240234375,
0.00937652587890625,
-0.0731201171875,
0.01218414306640625,
0.051300048828125,
0.036712646484375,
0.037322998046875,
0.032073974609375,
0.027923583984375,
0.044219970703125,
0.00608062744140625,
0.03961181640625,
-0.0261077880859375,
0.0228271484375,
0.09552001953125,
-0.00435638427734375,
0.04266357421875,
-0.0093994140625,
-0.05828857421875,
0.016571044921875,
0.04443359375,
-0.024200439453125,
0.01934814453125,
-0.0206756591796875,
-0.0173797607421875,
-0.003055572509765625,
-0.057891845703125,
-0.00482940673828125,
-0.043121337890625,
0.0171356201171875,
0.0034923553466796875,
0.0243072509765625,
0.0279541015625,
-0.005237579345703125,
-0.01274871826171875,
0.00887298583984375,
-0.0159149169921875,
-0.00368499755859375,
0.022491455078125,
0.0245819091796875,
-0.0000870823860168457,
-0.0246429443359375,
0.0018415451049804688,
-0.0019741058349609375,
-0.002460479736328125,
-0.01004791259765625,
0.039276123046875,
-0.0006756782531738281,
-0.0224151611328125,
-0.0145111083984375,
-0.045166015625,
-0.0048828125,
0.0029888153076171875,
-0.00927734375,
-0.0220947265625,
0.00832366943359375,
0.0172882080078125,
-0.035888671875,
0.0275726318359375,
0.0151214599609375,
-0.02496337890625,
0.0162506103515625,
-0.031707763671875,
0.027313232421875,
-0.01800537109375,
0.00931549072265625,
0.050048828125,
-0.006435394287109375,
0.01513671875,
0.0003590583801269531,
-0.00543975830078125,
-0.0151519775390625,
-0.003368377685546875,
-0.034881591796875,
-0.019927978515625,
-0.05792236328125,
0.01556396484375,
0.0311279296875,
0.0732421875,
-0.0211029052734375,
-0.04150390625,
-0.0008749961853027344,
0.035369873046875,
-0.0550537109375,
-0.07781982421875,
-0.02655029296875,
-0.072265625,
-0.01380157470703125,
-0.0174560546875,
-0.032928466796875,
0.016082763671875,
-0.01104736328125,
0.004459381103515625,
-0.014678955078125,
-0.0301971435546875,
-0.06439208984375,
-0.0628662109375,
-0.0731201171875,
-0.005435943603515625,
-0.0006804466247558594,
0.00731658935546875,
0.0040435791015625,
0.06768798828125,
0.0166015625,
-0.0177154541015625,
-0.000016808509826660156,
0.005153656005859375,
-0.04461669921875,
-0.046630859375,
-0.0367431640625,
0.005481719970703125,
0.03228759765625,
-0.01129913330078125,
0.0194091796875,
0.0267791748046875,
-0.0122833251953125,
0.01255035400390625,
-0.00881195068359375,
-0.0183868408203125,
0.0177154541015625,
0.04443359375,
0.00948333740234375,
0.006389617919921875,
0.040313720703125,
-0.0386962890625,
0.0277862548828125,
-0.0170745849609375,
-0.0246734619140625,
-0.01532745361328125,
-0.017120361328125,
0.0026187896728515625,
0.0014753341674804688,
-0.00702667236328125,
0.01071929931640625,
0.0100860595703125,
0.023193359375,
-0.0032482147216796875,
0.049713134765625,
-0.007495880126953125,
-0.004161834716796875,
-0.041015625,
0.009246826171875,
-0.0172119140625,
0.00818634033203125,
-0.00545501708984375,
0.0196685791015625,
0.0038604736328125,
-0.0100555419921875,
-0.053436279296875,
-0.041656494140625,
0.040252685546875,
-0.036712646484375,
0.0269012451171875,
-0.04974365234375,
-0.040008544921875,
-0.002437591552734375,
0.10009765625,
-0.00629425048828125,
0.0066986083984375,
-0.0247344970703125,
-0.00942230224609375,
-0.01219940185546875,
-0.05078125,
-0.050048828125,
-0.002864837646484375,
0.01337432861328125,
-0.01036834716796875,
-0.0205535888671875,
0.01128387451171875,
-0.031402587890625,
0.0673828125,
0.0049285888671875,
-0.0025272369384765625,
0.0263824462890625,
-0.043609619140625,
-0.004180908203125,
0.03375244140625,
0.004886627197265625,
-0.01197052001953125,
-0.0100555419921875,
-0.025726318359375,
-0.101318359375,
-0.006542205810546875,
-0.0073699951171875,
0.04437255859375,
-0.004100799560546875,
-0.048492431640625,
-0.022430419921875,
0.026641845703125,
0.01537322998046875,
0.0218353271484375,
0.00811004638671875,
0.01715087890625,
-0.02728271484375,
-0.0338134765625,
0.0090179443359375,
-0.034515380859375,
-0.007598876953125,
-0.01177215576171875,
-0.0183868408203125,
0.036376953125,
-0.021636962890625,
0.01349639892578125,
-0.00621795654296875,
-0.0198822021484375,
-0.019989013671875,
-0.006191253662109375,
0.005054473876953125,
0.053131103515625,
-0.0126190185546875,
0.0206298828125,
-0.04327392578125,
-0.045379638671875,
0.01910400390625,
-0.0103607177734375,
0.00930023193359375,
0.002696990966796875,
0.058135986328125,
0.0115966796875,
-0.01395416259765625,
-0.021484375,
0.0178375244140625,
0.0288543701171875,
0.00811767578125,
0.034271240234375,
0.0159759521484375,
-0.0078277587890625,
-0.0020160675048828125,
0.0007047653198242188,
-0.005645751953125,
-0.0243072509765625,
0.037261962890625,
0.006175994873046875,
-0.0037841796875,
0.0010995864868164062,
-0.0158843994140625,
0.0440673828125,
0.040374755859375,
-0.043609619140625,
-0.0173797607421875,
-0.0167694091796875,
0.04913330078125,
-0.06182861328125,
0.0802001953125,
-0.04150390625,
-0.04437255859375,
0.0249481201171875,
-0.01326751708984375,
0.00783538818359375,
0.005207061767578125,
0.00003260374069213867,
0.0035400390625,
-0.031524658203125,
0.01349639892578125,
0.01319122314453125,
0.0250701904296875,
0.0208740234375,
0.04620361328125,
0.01415252685546875,
0.01873779296875,
-0.0135040283203125,
0.007335662841796875,
0.04656982421875,
0.0185089111328125,
0.00799560546875,
-0.037841796875,
-0.036468505859375,
-0.00470733642578125,
-0.01145172119140625,
0.0236358642578125,
0.0291290283203125,
0.0308074951171875,
0.017425537109375,
0.00827789306640625,
-0.002262115478515625,
0.021942138671875,
-0.0208282470703125,
-0.0021152496337890625,
-0.007476806640625,
-0.00799560546875,
-0.01001739501953125,
0.06317138671875,
-0.01053619384765625,
0.038909912109375,
-0.0116729736328125,
0.032318115234375,
0.01739501953125,
0.03216552734375,
0.00473785400390625,
-0.0198822021484375,
0.01397705078125,
0.01065826416015625,
0.03265380859375,
-0.0352783203125,
0.007770538330078125,
0.0028228759765625,
0.0419921875,
-0.0097198486328125,
-0.020111083984375,
0.050140380859375,
-0.0113677978515625,
-0.051483154296875,
0.04266357421875,
0.0487060546875,
-0.04254150390625,
-0.005718231201171875,
0.00008314847946166992,
-0.00698089599609375,
0.005710601806640625,
0.01152801513671875,
-0.000553131103515625,
-0.0123138427734375,
-0.0152740478515625,
-0.0245513916015625,
-0.005512237548828125,
-0.0374755859375,
-0.0237884521484375,
-0.0097503662109375,
-0.05999755859375,
0.0008344650268554688,
0.01204681396484375,
0.03662109375,
-0.0306854248046875,
-0.03936767578125,
0.01546478271484375,
0.01690673828125,
0.0634765625,
-0.023895263671875,
-0.036895751953125,
-0.0020236968994140625,
0.006092071533203125,
0.0095367431640625,
-0.0261688232421875,
0.0174102783203125,
-0.01904296875,
-0.015899658203125,
-0.00930023193359375,
0.0125274658203125,
-0.0241851806640625,
-0.0091705322265625,
-0.0213165283203125,
0.0184478759765625,
0.0082855224609375,
-0.0113067626953125,
-0.024322509765625,
0.01357269287109375,
0.01427459716796875,
0.0020904541015625,
0.00351715087890625,
0.016387939453125,
0.07281494140625,
-0.01092529296875,
0.04229736328125,
0.03143310546875,
0.036895751953125,
-0.01013946533203125,
-0.032623291015625,
0.015472412109375,
-0.04058837890625,
-0.019073486328125,
-0.0200042724609375,
-0.0122528076171875,
0.01535797119140625,
0.0275726318359375,
-0.0032062530517578125,
-0.0082244873046875,
0.011871337890625,
0.010009765625,
-0.013824462890625,
-0.0171661376953125,
0.01145172119140625,
-0.04693603515625,
0.0263671875,
-0.0189666748046875,
-0.004886627197265625,
-0.007663726806640625,
0.016326904296875,
0.00438690185546875,
-0.029510498046875,
-0.01397705078125,
0.0167999267578125,
-0.0293426513671875,
0.0175933837890625,
0.08599853515625,
0.054718017578125,
0.07598876953125,
0.005649566650390625,
0.0362548828125,
0.0311126708984375,
0.0241546630859375,
-0.0163726806640625,
-0.0269012451171875,
0.07537841796875,
0.03045654296875,
-0.0048065185546875,
0.06719970703125,
-0.0267791748046875,
0.017669677734375,
0.01494598388671875,
0.057220458984375,
-0.0077667236328125,
0.004177093505859375,
0.016204833984375,
-0.04443359375,
0.0165252685546875,
-0.0006093978881835938,
-0.01006317138671875,
-0.016937255859375,
0.048431396484375,
0.0011472702026367188,
-0.00539398193359375,
0.02117919921875,
-0.00658416748046875,
0.0135650634765625,
-0.032196044921875,
0.0032901763916015625,
0.003810882568359375,
-0.0187225341796875,
0.0184478759765625,
0.00787353515625,
0.036590576171875,
-0.03204345703125,
0.00940704345703125,
-0.006351470947265625,
-0.0014905929565429688,
-0.0526123046875,
0.029998779296875,
-0.015106201171875,
0.0191650390625,
0.034393310546875,
0.00034546852111816406,
0.03363037109375,
0.037200927734375,
-0.0013151168823242188,
0.0204010009765625,
0.006500244140625,
0.0174713134765625,
-0.03857421875,
-0.028076171875,
0.0152587890625,
0.05023193359375,
-0.01446533203125,
0.0270843505859375,
-0.0028533935546875,
-0.033416748046875,
0.0220794677734375,
0.0377197265625,
0.072509765625,
-0.07110595703125,
0.00643157958984375,
0.01334381103515625,
-0.006397247314453125,
0.022491455078125,
-0.0197296142578125,
0.01044464111328125,
-0.033355712890625,
-0.007076263427734375,
-0.0279541015625,
-0.007049560546875,
0.015106201171875,
-0.043212890625,
-0.0802001953125,
0.150390625,
0.01385498046875,
0.0509033203125,
0.014923095703125,
0.046112060546875,
-0.03326416015625,
0.028961181640625,
-0.043243408203125,
0.07647705078125,
0.0171356201171875,
0.03533935546875,
-0.07049560546875,
-0.019378662109375,
-0.0029582977294921875,
0.051605224609375,
0.070556640625,
0.00905609130859375,
-0.021820068359375,
-0.028472900390625,
0.047576904296875,
0.06402587890625,
0.01141357421875,
-0.000720977783203125,
0.0074462890625,
0.06842041015625,
0.060150146484375,
-0.04180908203125,
0.04095458984375,
-0.009552001953125,
-0.0172882080078125,
0.0248260498046875,
0.0216827392578125,
0.039520263671875,
0.0212860107421875,
-0.0290679931640625,
0.026519775390625,
0.0082244873046875,
0.002109527587890625,
-0.038604736328125,
0.00545501708984375,
0.007843017578125,
0.0019683837890625,
-0.020782470703125,
-0.01873779296875,
-0.02825927734375,
0.034393310546875,
0.010284423828125,
0.01084136962890625,
0.036376953125,
0.0184173583984375,
0.037628173828125,
-0.005023956298828125,
0.0006775856018066406,
0.035400390625,
0.003833770751953125,
0.08746337890625,
0.033660888671875,
0.03076171875,
-0.04437255859375,
-0.04571533203125,
0.041656494140625,
0.10882568359375,
-0.05303955078125,
-0.0021877288818359375,
0.024261474609375,
0.03753662109375,
-0.0032405853271484375,
-0.0238037109375,
0.02166748046875,
-0.03448486328125,
0.0028533935546875,
0.00678253173828125,
-0.0291595458984375,
-0.007251739501953125,
0.043060302734375,
0.0079345703125,
-0.0236358642578125,
-0.003620147705078125,
-0.0192718505859375,
-0.021759033203125,
0.019073486328125,
0.0153961181640625,
0.0263671875,
0.0030269622802734375,
0.0592041015625,
-0.0261993408203125,
0.0077667236328125,
0.00763702392578125,
0.0123138427734375,
0.0145416259765625,
0.0120849609375,
0.01340484619140625,
-0.02008056640625,
0.019073486328125,
0.006343841552734375,
0.0208892822265625,
0.0626220703125,
0.05194091796875,
-0.007762908935546875,
-0.051666259765625,
0.0016040802001953125,
0.01412200927734375,
-0.05047607421875,
0.0169677734375,
-0.0430908203125,
0.032745361328125,
0.004909515380859375,
-0.007762908935546875,
0.00005829334259033203,
0.007526397705078125,
0.0295867919921875,
-0.0113372802734375,
0.0087890625,
0.005588531494140625,
-0.0269775390625,
0.05108642578125,
0.0282440185546875,
0.047027587890625,
0.00679779052734375,
-0.050506591796875,
-0.0028209686279296875,
-0.0031833648681640625,
-0.07373046875,
0.01512908935546875,
0.041961669921875,
-0.0172271728515625,
-0.0074005126953125,
0.03277587890625,
-0.029510498046875,
0.028656005859375,
0.0032596588134765625,
0.01519012451171875,
0.044586181640625,
0.032135009765625,
0.0218963623046875,
-0.061309814453125,
-0.0186614990234375,
-0.00974273681640625,
0.017822265625,
0.00701904296875,
0.0272979736328125,
0.0098114013671875,
0.00801849365234375,
-0.01340484619140625,
-0.01261138916015625,
-0.0036106109619140625,
-0.032073974609375,
0.050811767578125,
-0.007602691650390625,
-0.004856109619140625,
-0.0015439987182617188,
-0.042755126953125,
0.0037479400634765625,
0.035614013671875,
0.005855560302734375,
0.0108795166015625,
-0.04986572265625,
0.0390625,
-0.0047454833984375,
0.045196533203125,
-0.029327392578125,
-0.002040863037109375,
-0.04791259765625,
-0.043487548828125,
0.046295166015625,
-0.002132415771484375,
0.005611419677734375,
0.01395416259765625,
-0.00203704833984375,
-0.0230712890625,
0.015777587890625,
-0.02996826171875,
0.03253173828125,
0.025909423828125,
-0.0137786865234375,
0.0152740478515625,
-0.02313232421875,
-0.0204620361328125,
-0.0034580230712890625,
0.00530242919921875,
-0.0168609619140625,
0.0005450248718261719,
-0.0192108154296875,
-0.0264892578125,
-0.005771636962890625,
0.045074462890625,
-0.00946044921875,
0.0230560302734375,
-0.04693603515625,
0.007904052734375,
0.0005273818969726562,
-0.01107025146484375,
-0.0252532958984375,
-0.064208984375,
0.0005316734313964844,
0.01123809814453125,
-0.050628662109375,
-0.026580810546875,
-0.04876708984375,
-0.003482818603515625,
0.043212890625,
-0.003589630126953125,
-0.029144287109375,
0.026947021484375,
-0.04656982421875,
0.0258331298828125,
-0.012603759765625,
-0.0285797119140625,
0.01461029052734375,
0.0792236328125,
-0.034393310546875,
-0.03582763671875,
-0.022796630859375,
-0.007659912109375,
-0.053558349609375,
0.033203125,
0.055145263671875,
-0.051055908203125,
-0.033172607421875,
0.0275421142578125,
0.045867919921875,
0.0648193359375,
0.0143890380859375,
0.0015535354614257812,
0.01439666748046875,
0.02642822265625,
-0.037506103515625,
-0.0848388671875,
0.0218353271484375,
-0.038909912109375,
-0.000034928321838378906,
-0.043731689453125,
0.032745361328125,
0.04327392578125,
-0.016510009765625,
-0.046051025390625,
0.040924072265625,
-0.02630615234375,
-0.0276947021484375,
-0.054534912109375,
-0.01331329345703125,
-0.0106201171875,
0.01934814453125,
-0.021209716796875,
0.006000518798828125,
-0.0297698974609375,
0.055328369140625,
0.00519561767578125,
0.0013074874877929688,
0.06695556640625,
-0.0309906005859375,
0.003849029541015625,
-0.021484375,
-0.01132965087890625,
-0.012481689453125,
0.035797119140625,
-0.026580810546875,
0.039825439453125,
0.046661376953125,
-0.0523681640625,
-0.0297088623046875,
-0.0276641845703125,
0.01010894775390625,
-0.0140838623046875,
-0.04150390625,
0.0029735565185546875,
0.0167236328125,
0.0838623046875,
0.002536773681640625,
0.01690673828125,
-0.044769287109375,
-0.00634765625,
-0.017120361328125,
-0.053192138671875,
0.006877899169921875,
0.0164794921875,
-0.01386260986328125,
0.03094482421875,
-0.03076171875,
0.006237030029296875,
-0.02752685546875,
-0.005390167236328125,
-0.0075531005859375,
-0.01291656494140625,
0.015167236328125,
0.0162200927734375,
-0.035186767578125,
0.00445556640625,
0.0697021484375,
-0.04156494140625,
-0.004062652587890625,
0.016204833984375,
0.0015468597412109375,
0.01715087890625,
-0.016326904296875,
0.03045654296875,
0.038238525390625,
-0.01276397705078125,
-0.017730712890625,
0.051177978515625,
0.02764892578125,
0.00649261474609375,
-0.023712158203125,
-0.0019664764404296875,
0.0318603515625,
-0.0142059326171875,
0.0220184326171875,
0.0208892822265625,
0.06671142578125,
-0.0099945068359375,
0.11114501953125,
-0.004039764404296875,
0.042327880859375,
0.008758544921875,
0.0297088623046875,
-0.03955078125,
-0.0013437271118164062,
0.0062255859375,
-0.037017822265625,
-0.01287078857421875,
0.0033721923828125,
-0.01093292236328125,
-0.03485107421875,
0.01275634765625,
0.011627197265625,
0.004032135009765625,
0.0197296142578125
] |
90995c3694a5f7e43c6cc47a06aa3272df851e48
|
Wordpress Stackexchange
Q: How can I enqueue protocol relative external (//ajax.googleapis.com/...) scripts? According to the Codex, wp_enqueue_script supports protocol relative, or protocol agnostic external links: "Remote assets can be specified with a protocol-agnostic URL, i.e. '//otherdomain.com/js/theirscript.js'."
But I'm not seeing it:
wp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?&sensor=false', array(), '3', true);
Output:
<script type='text/javascript' src='http://localhost:25898//maps.googleapis.com/maps/api/js?sensor=false&ver=3'></script>
Notice that the protocol relative URL is appended to the site URL.
A: The code you posted works fine and results in this in the HTML output:
<script type='text/javascript' src='//maps.googleapis.com/maps/api/js?sensor=false&ver=3'></script>
Tested on WordPress 3.5 with this code snippet:
add_action('wp_enqueue_scripts', 'test');
function test() {
wp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?&sensor=false', array(), '3', true);
}
|
Q: How can I enqueue protocol relative external (//ajax.googleapis.com/...) scripts? According to the Codex, wp_enqueue_script supports protocol relative, or protocol agnostic external links: "Remote assets can be specified with a protocol-agnostic URL, i.e. '//otherdomain.com/js/theirscript.js'."
But I'm not seeing it:
wp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?&sensor=false', array(), '3', true);
Output:
<script type='text/javascript' src='http://localhost:25898//maps.googleapis.com/maps/api/js?sensor=false&ver=3'></script>
Notice that the protocol relative URL is appended to the site URL.
A: The code you posted works fine and results in this in the HTML output:
<script type='text/javascript' src='//maps.googleapis.com/maps/api/js?sensor=false&ver=3'></script>
Tested on WordPress 3.5 with this code snippet:
add_action('wp_enqueue_scripts', 'test');
function test() {
wp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?&sensor=false', array(), '3', true);
}
|
wordpress
|
{
"language": "en",
"length": 97,
"provenance": "stackexchange_00019.jsonl.gz:428219",
"question_score": "14",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82940"
}
|
[
0.026885986328125,
-0.0015935897827148438,
-0.01145172119140625,
0.01187896728515625,
0.0028591156005859375,
-0.04168701171875,
0.0595703125,
-0.003772735595703125,
-0.0285186767578125,
0.007686614990234375,
-0.0517578125,
-0.0079803466796875,
-0.0283050537109375,
-0.00970458984375,
0.015594482421875,
-0.0701904296875,
0.05450439453125,
-0.05242919921875,
-0.00508880615234375,
-0.014801025390625,
0.0041351318359375,
0.02679443359375,
-0.0016307830810546875,
0.07183837890625,
-0.00428009033203125,
-0.0201568603515625,
0.06756591796875,
-0.00371551513671875,
-0.0145111083984375,
-0.0160064697265625,
0.01392364501953125,
0.0013370513916015625,
0.01358795166015625,
0.04400634765625,
-0.04913330078125,
-0.05242919921875,
0.0195159912109375,
0.01378631591796875,
-0.00823974609375,
0.03216552734375,
0.004467010498046875,
0.0067291259765625,
0.00023031234741210938,
0.008544921875,
-0.0164642333984375,
-0.0411376953125,
-0.003871917724609375,
-0.03851318359375,
0.01148223876953125,
0.06103515625,
0.018096923828125,
-0.01763916015625,
0.0071563720703125,
0.05255126953125,
0.0007348060607910156,
0.0091705322265625,
-0.023223876953125,
-0.0261688232421875,
0.0157470703125,
0.04730224609375,
0.01036834716796875,
-0.00553131103515625,
-0.0018224716186523438,
-0.0298004150390625,
-0.0256500244140625,
-0.00440216064453125,
-0.0076904296875,
0.022003173828125,
-0.0106201171875,
-0.03240966796875,
0.0001208186149597168,
-0.0013723373413085938,
-0.005832672119140625,
-0.01338958740234375,
-0.032012939453125,
-0.0099945068359375,
0.005401611328125,
0.000957489013671875,
0.0019483566284179688,
-0.004039764404296875,
0.056060791015625,
0.0267333984375,
-0.0080413818359375,
-0.00373077392578125,
0.01264190673828125,
0.00616455078125,
0.00899505615234375,
-0.0296173095703125,
-0.062469482421875,
-0.0258026123046875,
-0.032684326171875,
-0.05694580078125,
-0.06243896484375,
-0.0020599365234375,
-0.01473236083984375,
-0.01050567626953125,
0.056884765625,
0.0249176025390625,
0.050079345703125,
0.0165557861328125,
0.036895751953125,
-0.0755615234375,
0.04315185546875,
-0.031707763671875,
-0.020294189453125,
-0.0019197463989257812,
0.015777587890625,
-0.02960205078125,
0.01110076904296875,
0.0178375244140625,
-0.03173828125,
0.0172576904296875,
0.032958984375,
0.061859130859375,
-0.054718017578125,
-0.058807373046875,
-0.049285888671875,
0.0002675056457519531,
-0.035797119140625,
0.00545501708984375,
-0.0238800048828125,
-0.0035953521728515625,
-0.033294677734375,
0.024993896484375,
0.016693115234375,
0.0114593505859375,
0.00467681884765625,
0.0157012939453125,
0.010101318359375,
0.0545654296875,
-0.005764007568359375,
-0.01861572265625,
-0.0061187744140625,
0.0179443359375,
-0.005767822265625,
-0.0197601318359375,
0.05194091796875,
-0.020660400390625,
-0.01177215576171875,
-0.01715087890625,
0.023345947265625,
0.0012636184692382812,
-0.0004203319549560547,
-0.01145172119140625,
0.001434326171875,
-0.00966644287109375,
0.0218963623046875,
0.04351806640625,
-0.008514404296875,
-0.03155517578125,
0.0390625,
-0.0186309814453125,
0.0162506103515625,
0.00591278076171875,
0.0233917236328125,
-0.0208892822265625,
0.057281494140625,
-0.04266357421875,
0.0014820098876953125,
-0.02618408203125,
-0.003574371337890625,
0.004058837890625,
0.0024890899658203125,
-0.0310516357421875,
-0.037872314453125,
-0.0236358642578125,
-0.020294189453125,
0.0003085136413574219,
0.0241546630859375,
0.083740234375,
-0.03045654296875,
0.00736236572265625,
-0.032440185546875,
0.029876708984375,
-0.0031909942626953125,
0.0045013427734375,
0.024078369140625,
0.0506591796875,
0.00391387939453125,
0.011688232421875,
0.0104522705078125,
-0.037353515625,
0.08404541015625,
-0.033111572265625,
-0.04498291015625,
0.08392333984375,
0.0143280029296875,
0.07000732421875,
-0.006694793701171875,
0.003345489501953125,
0.05810546875,
0.042755126953125,
-0.0263519287109375,
0.004367828369140625,
-0.010528564453125,
-0.01509857177734375,
-0.0054779052734375,
0.0031948089599609375,
-0.006191253662109375,
0.01557159423828125,
0.01378631591796875,
0.00331878662109375,
0.02838134765625,
0.0018482208251953125,
0.0096282958984375,
0.0305938720703125,
-0.01201629638671875,
0.031280517578125,
-0.019927978515625,
0.0220947265625,
-0.007404327392578125,
0.0206451416015625,
-0.012237548828125,
-0.04510498046875,
-0.00730133056640625,
0.02032470703125,
-0.0134735107421875,
0.0753173828125,
-0.0009379386901855469,
0.0298919677734375,
-0.002811431884765625,
-0.046905517578125,
0.0180816650390625,
-0.00992584228515625,
-0.006175994873046875,
-0.04522705078125,
-0.003932952880859375,
-0.0304718017578125,
0.007114410400390625,
-0.0278472900390625,
0.0251007080078125,
0.04071044921875,
0.002410888671875,
0.04150390625,
0.0128173828125,
-0.0099639892578125,
0.027313232421875,
-0.042449951171875,
0.034149169921875,
0.019378662109375,
0.03436279296875,
0.0443115234375,
-0.0104827880859375,
-0.0224761962890625,
0.0257110595703125,
-0.0230255126953125,
0.031951904296875,
-0.048828125,
-0.0042572021484375,
-0.0262298583984375,
-0.01323699951171875,
-0.020355224609375,
0.055267333984375,
-0.05078125,
0.01617431640625,
0.034576416015625,
-0.01690673828125,
0.005035400390625,
-0.004146575927734375,
-0.01413726806640625,
0.00794219970703125,
0.0325927734375,
0.0014400482177734375,
-0.00017452239990234375,
0.044403076171875,
0.003387451171875,
0.04052734375,
0.04071044921875,
-0.0142669677734375,
-0.0147857666015625,
0.016326904296875,
0.02783203125,
-0.01122283935546875,
0.053863525390625,
0.0811767578125,
-0.01528167724609375,
-0.039703369140625,
-0.021026611328125,
-0.0033092498779296875,
0.034759521484375,
-0.0161285400390625,
0.002902984619140625,
-0.019989013671875,
-0.0097198486328125,
0.0012063980102539062,
-0.05462646484375,
0.01250457763671875,
0.0018310546875,
0.03802490234375,
0.005401611328125,
0.0489501953125,
-0.016876220703125,
0.005657196044921875,
0.0193328857421875,
0.0033740997314453125,
-0.031951904296875,
0.0158538818359375,
-0.0278778076171875,
0.0301971435546875,
-0.037139892578125,
0.01149749755859375,
0.040191650390625,
-0.0170135498046875,
0.00861358642578125,
-0.0084381103515625,
0.004817962646484375,
-0.0016374588012695312,
-0.0027866363525390625,
-0.005146026611328125,
-0.0250091552734375,
-0.0268707275390625,
-0.002201080322265625,
0.005771636962890625,
-0.0572509765625,
0.0117034912109375,
-0.0082855224609375,
-0.0147705078125,
-0.016876220703125,
-0.134033203125,
-0.08660888671875,
0.04315185546875,
-0.0318603515625,
0.026824951171875,
0.0017061233520507812,
-0.00504302978515625,
-0.042236328125,
0.03375244140625,
0.0020351409912109375,
-0.0203704833984375,
-0.04150390625,
-0.07525634765625,
-0.0743408203125,
-0.07830810546875,
0.036865234375,
-0.005645751953125,
0.0019426345825195312,
0.016387939453125,
-0.004344940185546875,
0.032135009765625,
0.016815185546875,
0.0745849609375,
0.037506103515625,
-0.00736236572265625,
0.005031585693359375,
-0.010406494140625,
-0.0237884521484375,
-0.033111572265625,
-0.010955810546875,
-0.0133056640625,
-0.01303863525390625,
0.01316070556640625,
0.01047515869140625,
0.01313018798828125,
0.0169219970703125,
0.0262451171875,
-0.0005793571472167969,
-0.021453857421875,
0.0249786376953125,
0.01091766357421875,
-0.031646728515625,
-0.03961181640625,
0.0322265625,
-0.039306640625,
-0.0205841064453125,
0.01385498046875,
-0.0222015380859375,
0.009796142578125,
0.00002014636993408203,
0.02783203125,
-0.007129669189453125,
0.00397491455078125,
-0.002593994140625,
0.0220489501953125,
0.004669189453125,
0.042877197265625,
-0.025970458984375,
0.01373291015625,
-0.028778076171875,
0.01666259765625,
-0.0009274482727050781,
0.003177642822265625,
0.014434814453125,
-0.0296783447265625,
-0.00982666015625,
0.049346923828125,
0.00795745849609375,
-0.0113983154296875,
0.05474853515625,
-0.003742218017578125,
-0.005847930908203125,
-0.01311492919921875,
0.03436279296875,
-0.022491455078125,
-0.02001953125,
0.020751953125,
0.04754638671875,
-0.0777587890625,
-0.04095458984375,
-0.0277252197265625,
-0.007259368896484375,
0.0165557861328125,
-0.00995635986328125,
-0.0333251953125,
-0.00467681884765625,
-0.0033245086669921875,
-0.037017822265625,
0.00817108154296875,
-0.023162841796875,
0.03863525390625,
-0.0250091552734375,
-0.01010894775390625,
0.02886962890625,
-0.0182647705078125,
-0.0023288726806640625,
-0.045379638671875,
0.006023406982421875,
-0.05181884765625,
-0.0196075439453125,
-0.0080413818359375,
0.05389404296875,
0.0189208984375,
-0.0281219482421875,
-0.0005211830139160156,
0.062286376953125,
0.006671905517578125,
-0.0083160400390625,
0.01517486572265625,
-0.0076904296875,
0.005992889404296875,
0.0303192138671875,
0.01093292236328125,
-0.004497528076171875,
-0.0092926025390625,
0.018829345703125,
-0.0362548828125,
-0.01494598388671875,
-0.00264739990234375,
-0.049407958984375,
0.048797607421875,
-0.055816650390625,
-0.03887939453125,
-0.0008697509765625,
0.0248260498046875,
-0.01549530029296875,
-0.00350189208984375,
-0.00801849365234375,
0.0272979736328125,
-0.017608642578125,
0.0027904510498046875,
-0.035858154296875,
0.0020656585693359375,
0.0097198486328125,
0.02581787109375,
0.03253173828125,
0.0013027191162109375,
0.02313232421875,
0.041351318359375,
-0.00350189208984375,
0.022735595703125,
0.044586181640625,
-0.0216064453125,
0.0158538818359375,
0.007549285888671875,
-0.0166168212890625,
0.046142578125,
0.0169525146484375,
0.0237579345703125,
0.025360107421875,
0.01953125,
0.0134429931640625,
0.07928466796875,
-0.1002197265625,
-0.0028438568115234375,
-0.01161956787109375,
-0.01934814453125,
-0.0180816650390625,
0.0276641845703125,
-0.01654052734375,
0.020233154296875,
-0.0294952392578125,
-0.01300811767578125,
0.0010385513305664062,
-0.02581787109375,
0.0400390625,
0.0303802490234375,
-0.006351470947265625,
-0.0013570785522460938,
0.0184173583984375,
0.0015554428100585938,
0.032318115234375,
0.0784912109375,
-0.03656005859375,
0.044158935546875,
0.02667236328125,
-0.0276336669921875,
-0.0260467529296875,
0.005718231201171875,
0.0311126708984375,
0.0022945404052734375,
-0.0517578125,
-0.0399169921875,
0.0202178955078125,
0.043914794921875,
0.010345458984375,
-0.010894775390625,
0.0206451416015625,
0.044708251953125,
-0.006504058837890625,
-0.002712249755859375,
-0.0034160614013671875,
0.0158843994140625,
-0.0260009765625,
0.040557861328125,
-0.01093292236328125,
-0.0004572868347167969,
-0.060028076171875,
0.056976318359375,
-0.01294708251953125,
0.0067138671875,
0.007568359375,
0.0012874603271484375,
-0.01812744140625,
0.057586669921875,
0.0259857177734375,
-0.038421630859375,
0.01898193359375,
0.031585693359375,
0.01611328125,
-0.034698486328125,
-0.0261383056640625,
0.0289154052734375,
0.020538330078125,
0.0110015869140625,
0.019744873046875,
-0.004489898681640625,
0.032318115234375,
-0.006649017333984375,
0.055023193359375,
0.03997802734375,
-0.0208587646484375,
-0.037078857421875,
-0.035369873046875,
0.03594970703125,
0.0012273788452148438,
0.03460693359375,
0.013214111328125,
0.045928955078125,
0.021087646484375,
0.01140594482421875,
0.00106048583984375,
-0.026763916015625,
-0.0239105224609375,
-0.01678466796875,
-0.01617431640625,
-0.00975799560546875,
0.0028247833251953125,
-0.00748443603515625,
-0.00872802734375,
-0.0163421630859375,
0.0127105712890625,
-0.033416748046875,
-0.01058197021484375,
0.005931854248046875,
0.023193359375,
-0.01085662841796875,
0.0293731689453125,
0.01513671875,
0.00849151611328125,
0.0245208740234375,
-0.01291656494140625,
-0.061981201171875,
-0.04388427734375,
-0.01873779296875,
-0.01485443115234375,
-0.0139007568359375,
-0.015625,
-0.0142974853515625,
0.043975830078125,
-0.0321044921875,
-0.0019283294677734375,
-0.00743865966796875,
0.0014667510986328125,
-0.0153961181640625,
0.0701904296875,
-0.0258941650390625,
0.08282470703125,
-0.024566650390625,
0.01849365234375,
-0.01727294921875,
0.040771484375,
-0.025848388671875,
0.01172637939453125,
0.006824493408203125,
-0.119140625,
-0.01488494873046875,
-0.0110626220703125,
-0.046783447265625,
0.04278564453125,
-0.0025768280029296875,
0.0101776123046875,
0.0491943359375,
0.00555419921875,
0.0012969970703125,
0.0010976791381835938,
0.019805908203125,
0.0244140625,
0.051177978515625,
0.060302734375,
-0.0028133392333984375,
0.0328369140625,
-0.005706787109375,
-0.0167083740234375,
0.0189666748046875,
-0.00666046142578125,
0.0170135498046875,
0.010986328125,
-0.04974365234375,
0.0172119140625,
0.09979248046875,
0.043182373046875,
0.07330322265625,
0.01235198974609375,
0.032073974609375,
0.0435791015625,
0.0216217041015625,
-0.051055908203125,
-0.035980224609375,
-0.0374755859375,
-0.0191192626953125,
-0.032989501953125,
-0.043975830078125,
-0.007350921630859375,
0.01180267333984375,
-0.0037975311279296875,
0.0284881591796875,
-0.02142333984375,
0.01959228515625,
-0.01300048828125,
-0.03436279296875,
0.01009368896484375,
-0.0133819580078125,
0.01178741455078125,
0.0180511474609375,
-0.0005764961242675781,
0.0305328369140625,
-0.037200927734375,
-0.002857208251953125,
0.004940032958984375,
-0.01751708984375,
0.0020236968994140625,
-0.00279998779296875,
0.0207061767578125,
-0.0230560302734375,
0.03839111328125,
0.02105712890625,
0.0188140869140625,
0.01247406005859375,
-0.0181427001953125,
0.00799560546875,
-0.049957275390625,
-0.0374755859375,
-0.003505706787109375,
-0.04327392578125,
-0.0133819580078125,
-0.042999267578125,
-0.02880859375,
0.056365966796875,
0.024932861328125,
-0.01154327392578125,
-0.03076171875,
0.01087188720703125,
0.01641845703125,
0.0389404296875,
-0.0467529296875,
0.030975341796875,
0.047271728515625,
-0.061920166015625,
0.016265869140625,
0.00511932373046875,
-0.0311737060546875,
-0.011627197265625,
0.007152557373046875,
0.061187744140625,
-0.0137176513671875,
-0.024383544921875,
0.031890869140625,
0.023345947265625,
-0.03076171875,
0.01092529296875,
0.050872802734375,
-0.0721435546875,
-0.06878662109375,
0.035980224609375,
-0.07904052734375,
-0.044158935546875,
-0.021484375,
-0.0093994140625,
0.09326171875,
-0.036376953125,
-0.0141143798828125,
0.025604248046875,
0.04449462890625,
-0.016571044921875,
0.0261688232421875,
-0.0081939697265625,
0.0211944580078125,
0.004489898681640625,
0.01108551025390625,
-0.0180206298828125,
-0.0187225341796875,
0.013336181640625,
0.058685302734375,
-0.0028400421142578125,
0.0002884864807128906,
-0.0078887939453125,
-0.0279541015625,
-0.03192138671875,
0.0044708251953125,
-0.01044464111328125,
0.02252197265625,
0.0019359588623046875,
-0.0283660888671875,
0.0198516845703125,
-0.01232147216796875,
0.0233306884765625,
-0.055511474609375,
0.0184173583984375,
0.017120361328125,
0.005588531494140625,
0.0212249755859375,
-0.0057830810546875,
-0.00786590576171875,
-0.02777099609375,
0.0027866363525390625,
0.0159759521484375,
0.007556915283203125,
0.002513885498046875,
0.00914764404296875,
-0.028900146484375,
0.007762908935546875,
-0.061431884765625,
-0.0012750625610351562,
-0.0005459785461425781,
-0.0203704833984375,
-0.0290679931640625,
0.00228118896484375,
0.013519287109375,
-0.00038743019104003906,
-0.0037841796875,
-0.027099609375,
0.0290985107421875,
-0.006816864013671875,
0.051422119140625,
0.054443359375,
0.01425933837890625,
-0.00902557373046875,
0.0019388198852539062,
0.0423583984375,
0.0634765625,
-0.0469970703125,
0.01187896728515625,
0.0015516281127929688,
0.003780364990234375,
0.02801513671875,
-0.042388916015625,
0.0416259765625,
-0.025054931640625,
-0.041412353515625,
-0.02337646484375,
0.00794219970703125,
0.0227508544921875,
0.0167083740234375,
0.0167236328125,
0.049530029296875,
-0.052001953125,
0.0080413818359375,
-0.058135986328125,
0.0166015625,
0.0382080078125,
0.082275390625,
0.03277587890625,
0.04156494140625,
-0.024383544921875,
-0.0355224609375,
0.0016307830810546875,
-0.00994110107421875,
-0.00861358642578125,
0.0114898681640625,
-0.018280029296875,
-0.0008211135864257812,
-0.002010345458984375,
0.045379638671875,
0.024078369140625,
0.0167694091796875,
0.045257568359375,
0.0238189697265625,
-0.0309906005859375,
0.0091400146484375,
0.0865478515625,
-0.01334381103515625,
0.01824951171875,
-0.00833892822265625,
-0.0207366943359375,
0.01326751708984375,
-0.0169219970703125,
0.03155517578125,
0.00788116455078125,
0.0301361083984375,
-0.0134429931640625,
0.05572509765625,
-0.004535675048828125,
0.004421234130859375,
0.051513671875,
0.005359649658203125,
0.06494140625,
0.00994110107421875,
-0.0206756591796875,
-0.007450103759765625,
0.01143646240234375,
-0.00574493408203125,
-0.0187530517578125,
0.00888824462890625,
-0.042694091796875,
0.084228515625,
0.033477783203125,
-0.0025348663330078125,
-0.0169219970703125,
0.01395416259765625,
0.01422119140625,
0.0022563934326171875,
0.05230712890625,
0.01430511474609375,
0.0048828125,
-0.0002715587615966797,
0.00856781005859375,
0.0099639892578125,
0.01087188720703125,
0.05645751953125,
-0.0224151611328125,
0.00031375885009765625,
0.0660400390625,
-0.0011091232299804688,
0.0171966552734375,
0.036468505859375,
-0.006580352783203125,
-0.0309295654296875,
0.0234527587890625,
-0.00980377197265625,
0.00860595703125,
0.01081085205078125,
0.018951416015625,
-0.0248870849609375,
0.010986328125,
-0.022735595703125,
0.01192474365234375,
-0.023468017578125,
-0.0234832763671875,
-0.051544189453125,
-0.063720703125,
-0.056915283203125,
0.004405975341796875,
-0.0032634735107421875,
-0.01043701171875,
-0.011199951171875,
0.017791748046875,
0.00710296630859375,
-0.02093505859375,
0.024749755859375,
-0.037628173828125,
0.050750732421875,
0.029388427734375,
-0.0124359130859375,
0.0599365234375,
0.0247955322265625,
-0.0201416015625,
0.049560546875,
-0.00940704345703125,
0.00936126708984375,
0.002117156982421875,
-0.006771087646484375,
-0.013397216796875,
0.00974273681640625,
0.002407073974609375,
-0.016021728515625,
-0.0033206939697265625,
0.024749755859375,
-0.041656494140625,
-0.01031494140625,
0.007617950439453125,
-0.0350341796875,
-0.0202789306640625,
0.00754547119140625,
0.001056671142578125,
0.004657745361328125,
-0.0310516357421875,
-0.0279388427734375,
0.002841949462890625,
0.060943603515625,
0.006916046142578125,
-0.06390380859375,
0.025390625,
-0.033538818359375,
0.06256103515625,
0.0157012939453125,
0.07684326171875,
-0.03753662109375,
-0.047760009765625,
-0.054168701171875,
-0.047119140625,
-0.01335906982421875,
0.08099365234375,
0.004520416259765625,
0.01239776611328125,
0.034942626953125,
-0.021759033203125,
-0.0056915283203125,
0.0093994140625,
0.0158843994140625,
0.058135986328125,
-0.0286407470703125,
0.0000013709068298339844,
0.0121917724609375,
0.0135650634765625,
-0.035369873046875,
-0.017333984375,
0.010467529296875,
-0.0206146240234375,
-0.010711669921875,
-0.015899658203125,
-0.019775390625,
-0.00473785400390625,
-0.04150390625,
-0.06353759765625,
0.049072265625,
0.005222320556640625,
-0.0281219482421875,
-0.035797119140625,
-0.01617431640625,
0.017730712890625,
-0.0224761962890625,
-0.0238037109375,
-0.0220489501953125,
-0.04779052734375,
0.0285797119140625,
0.0135345458984375,
0.08880615234375,
-0.038421630859375,
-0.01177978515625,
-0.0009217262268066406,
0.035797119140625,
0.0380859375,
0.03778076171875,
0.004032135009765625,
-0.00308990478515625,
0.0499267578125,
0.043670654296875,
0.01117706298828125,
0.0682373046875,
0.0236053466796875,
-0.060760498046875,
-0.036102294921875,
0.00745391845703125,
-0.032928466796875,
0.020477294921875,
0.0914306640625,
0.07501220703125,
0.019439697265625,
-0.06707763671875,
-0.024017333984375,
-0.01508331298828125,
0.025054931640625,
0.0012111663818359375,
-0.0024166107177734375,
-0.040313720703125,
0.01480865478515625,
-0.006072998046875,
0.0083160400390625,
-0.0189666748046875,
-0.0211181640625,
-0.0099029541015625,
-0.022979736328125,
0.03240966796875,
-0.00926971435546875,
0.03973388671875,
-0.0465087890625,
0.11016845703125,
-0.0657958984375,
-0.005168914794921875,
0.0290069580078125,
0.037017822265625,
0.044189453125,
-0.014556884765625,
-0.01415252685546875,
0.055755615234375,
-0.0382080078125,
0.01262664794921875,
0.00827789306640625,
-0.014984130859375,
-0.03521728515625,
0.0194549560546875,
-0.033203125,
0.00980377197265625,
0.023712158203125,
0.021697998046875,
-0.049652099609375,
0.0286865234375,
0.037750244140625,
-0.01387786865234375,
-0.044189453125,
0.0225372314453125,
-0.03240966796875,
0.013519287109375,
-0.001911163330078125,
0.0125579833984375,
0.06439208984375,
-0.03680419921875,
0.0092926025390625,
0.010284423828125,
-0.05120849609375,
-0.0005788803100585938,
-0.0033359527587890625,
0.00933837890625,
-0.03131103515625,
-0.0101318359375
] |
e9370097a660a8c14212e42f07a788eadf50331a
|
Wordpress Stackexchange
Q: Perform action on WPMU blog deletion Hi guys :) I know there is the wpmu_new_blog action hook which enables us to perform an action when a new WPMU blog is created. Is there something similar to this which enables us to perform an action when a WPMU blog is deleted? Something which looks like this:
add_action('blog_deletion_hook', 'function_to_perform')
A: Yes, inside /wp-admin/includes/ms.php there is the action hook delete_blog.
This test prevents a blog deletion:
add_action( 'delete_blog', 'prevent_blog_delete_wpse_82961', 10, 2 );
/**
* @param int $blog_id Blog ID
* @param bool $drop True if blog's table should be dropped. Default is false.
*/
function prevent_blog_delete_wpse_82961( $blog_id, $drop )
{
wp_die( 'aborting delete_blog' );
}
|
Q: Perform action on WPMU blog deletion Hi guys :) I know there is the wpmu_new_blog action hook which enables us to perform an action when a new WPMU blog is created. Is there something similar to this which enables us to perform an action when a WPMU blog is deleted? Something which looks like this:
add_action('blog_deletion_hook', 'function_to_perform')
A: Yes, inside /wp-admin/includes/ms.php there is the action hook delete_blog.
This test prevents a blog deletion:
add_action( 'delete_blog', 'prevent_blog_delete_wpse_82961', 10, 2 );
/**
* @param int $blog_id Blog ID
* @param bool $drop True if blog's table should be dropped. Default is false.
*/
function prevent_blog_delete_wpse_82961( $blog_id, $drop )
{
wp_die( 'aborting delete_blog' );
}
A: WordPress use since version 5.1 a new hook.
do_action( 'wp_delete_site', $old_site );
The var $old_site is the deleted site object.
If you need a hook before the blog will delete, use the hook below.
* Fires before a site should be deleted from the database.
*
* Plugins should amend the `$errors` object via its `WP_Error::add()` method. If any errors
* are present, the site will not be deleted.
*
* @since 5.1.0
*
* @param WP_Error $errors Error object to add validation errors to.
* @param WP_Site $old_site The site object to be deleted.
*/
do_action( 'wp_validate_site_deletion', $errors, $old_site );
You should use a hook from this two options because the hook delete_blog is deprecated.
A: FYI this is now deprecated. I haven't found a substitute yet, unfortunately :(
https://developer.wordpress.org/reference/hooks/delete_blog/
|
wordpress
|
{
"language": "en",
"length": 245,
"provenance": "stackexchange_00019.jsonl.gz:428228",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82961"
}
|
[
0.01385498046875,
0.013092041015625,
-0.031463623046875,
0.027801513671875,
0.0282135009765625,
-0.053619384765625,
0.07769775390625,
-0.0322265625,
0.0116424560546875,
0.00911712646484375,
-0.0281219482421875,
0.00405120849609375,
0.0287017822265625,
-0.0140533447265625,
0.03436279296875,
-0.0195465087890625,
0.048736572265625,
-0.03021240234375,
0.066162109375,
0.0270843505859375,
-0.01270294189453125,
0.042938232421875,
0.0634765625,
-0.037689208984375,
0.006839752197265625,
-0.023193359375,
0.0648193359375,
0.01351165771484375,
-0.00040078163146972656,
-0.02813720703125,
0.0204620361328125,
0.00521087646484375,
-0.01447296142578125,
0.043212890625,
-0.0065765380859375,
0.024993896484375,
0.0012378692626953125,
0.0293731689453125,
0.0097808837890625,
0.0214691162109375,
0.0172271728515625,
-0.004299163818359375,
-0.022125244140625,
-0.0008516311645507812,
-0.0177459716796875,
-0.0626220703125,
0.0267791748046875,
-0.03271484375,
0.020751953125,
0.01312255859375,
0.0179290771484375,
0.00022268295288085938,
0.0239715576171875,
-0.022369384765625,
-0.0194244384765625,
-0.0101165771484375,
-0.04144287109375,
0.0540771484375,
0.0237579345703125,
0.0312042236328125,
-0.01107025146484375,
0.016571044921875,
0.00339508056640625,
-0.043853759765625,
0.0310821533203125,
0.01352691650390625,
0.0215606689453125,
0.0293426513671875,
-0.041595458984375,
0.01934814453125,
0.0024566650390625,
-0.043212890625,
-0.034149169921875,
0.00640106201171875,
0.017608642578125,
-0.0208587646484375,
0.049652099609375,
0.004245758056640625,
-0.02679443359375,
0.06317138671875,
0.03460693359375,
-0.00890350341796875,
0.0214691162109375,
-0.049285888671875,
0.0252838134765625,
-0.0150909423828125,
-0.002727508544921875,
-0.0016546249389648438,
-0.04534912109375,
-0.032318115234375,
-0.038848876953125,
-0.0273590087890625,
-0.0260772705078125,
-0.01763916015625,
-0.0278778076171875,
-0.0230865478515625,
-0.0080413818359375,
0.06475830078125,
-0.01221466064453125,
0.0035839080810546875,
-0.0178985595703125,
-0.0246734619140625,
-0.0264129638671875,
-0.02581787109375,
-0.011260986328125,
0.0518798828125,
0.0309906005859375,
-0.0271148681640625,
-0.0222930908203125,
-0.006404876708984375,
-0.013824462890625,
-0.025604248046875,
-0.01971435546875,
-0.04833984375,
0.00830841064453125,
0.005237579345703125,
-0.044952392578125,
0.0302581787109375,
0.014892578125,
-0.029876708984375,
-0.0296783447265625,
-0.0298919677734375,
0.01248931884765625,
0.0035858154296875,
0.00897216796875,
-0.0045318603515625,
-0.00933837890625,
-0.00518035888671875,
0.031585693359375,
-0.026397705078125,
-0.038543701171875,
0.050994873046875,
0.038665771484375,
-0.0203857421875,
-0.0130767822265625,
-0.0018634796142578125,
0.04339599609375,
0.011474609375,
0.0095367431640625,
-0.00921630859375,
0.041015625,
-0.0136260986328125,
-0.0399169921875,
0.0163726806640625,
0.053497314453125,
0.04150390625,
0.0236968994140625,
-0.011627197265625,
0.031707763671875,
-0.004276275634765625,
-0.02056884765625,
0.005725860595703125,
0.0289764404296875,
0.010528564453125,
0.033538818359375,
-0.051513671875,
0.061767578125,
-0.057281494140625,
0.01495361328125,
-0.07489013671875,
0.0185394287109375,
0.0013589859008789062,
-0.00946044921875,
-0.053985595703125,
-0.07342529296875,
-0.0183868408203125,
-0.02703857421875,
-0.0169525146484375,
0.040679931640625,
0.0049896240234375,
0.001194000244140625,
-0.057342529296875,
0.0293731689453125,
0.0469970703125,
-0.0023517608642578125,
0.059814453125,
-0.01076507568359375,
-0.0051116943359375,
0.0360107421875,
0.0216522216796875,
0.0005784034729003906,
-0.0234527587890625,
0.04742431640625,
0.0026378631591796875,
-0.03167724609375,
0.006305694580078125,
0.0268096923828125,
0.0618896484375,
-0.0012083053588867188,
0.031341552734375,
0.0135650634765625,
-0.0036106109619140625,
0.0153350830078125,
-0.01122283935546875,
0.02081298828125,
-0.04541015625,
-0.03143310546875,
-0.031585693359375,
-0.0011186599731445312,
0.01039886474609375,
0.022613525390625,
0.05194091796875,
-0.0182342529296875,
0.005123138427734375,
-0.060028076171875,
0.048858642578125,
-0.0256805419921875,
0.04486083984375,
-0.0199432373046875,
0.0004608631134033203,
0.03289794921875,
-0.00025725364685058594,
-0.006191253662109375,
-0.045501708984375,
-0.0256195068359375,
0.0194854736328125,
-0.0316162109375,
0.02691650390625,
-0.02703857421875,
0.0271453857421875,
-0.045196533203125,
-0.0287017822265625,
-0.0352783203125,
-0.0171356201171875,
0.0311431884765625,
-0.08349609375,
0.0010042190551757812,
-0.061859130859375,
-0.018402099609375,
-0.004451751708984375,
-0.0718994140625,
0.04681396484375,
0.035888671875,
0.028533935546875,
-0.005390167236328125,
-0.00888824462890625,
-0.0005745887756347656,
-0.10345458984375,
0.01102447509765625,
0.055023193359375,
0.011444091796875,
0.0171966552734375,
-0.0149078369140625,
0.01556396484375,
0.00396728515625,
-0.00583648681640625,
0.0270538330078125,
0.001895904541015625,
-0.01271820068359375,
0.061981201171875,
-0.022430419921875,
0.017730712890625,
0.001667022705078125,
-0.0235443115234375,
-0.0239410400390625,
0.031341552734375,
-0.013824462890625,
-0.017242431640625,
-0.01023101806640625,
-0.02178955078125,
0.03485107421875,
-0.04351806640625,
-0.068115234375,
0.0115814208984375,
0.047393798828125,
-0.00927734375,
0.039031982421875,
0.0245513916015625,
-0.0091705322265625,
-0.004138946533203125,
0.01291656494140625,
-0.0222320556640625,
0.00222015380859375,
0.039215087890625,
0.002178192138671875,
0.00653076171875,
0.0222930908203125,
-0.027740478515625,
-0.014251708984375,
0.006015777587890625,
-0.0122528076171875,
0.0623779296875,
0.0009784698486328125,
-0.01617431640625,
0.0086822509765625,
-0.00008368492126464844,
-0.0185089111328125,
-0.04010009765625,
-0.0174407958984375,
-0.032958984375,
-0.0012044906616210938,
0.01197052001953125,
-0.0089263916015625,
0.0155181884765625,
0.047760009765625,
-0.0272064208984375,
0.003093719482421875,
-0.0244293212890625,
0.044647216796875,
-0.023406982421875,
0.01161956787109375,
0.08050537109375,
-0.0032291412353515625,
0.0199432373046875,
0.0037403106689453125,
-0.0302581787109375,
0.005733489990234375,
0.02203369140625,
0.01450347900390625,
-0.006378173828125,
-0.0271148681640625,
0.043243408203125,
0.0208282470703125,
0.027679443359375,
0.0005350112915039062,
-0.0217132568359375,
-0.0116424560546875,
0.0192413330078125,
-0.018341064453125,
-0.005374908447265625,
0.0019445419311523438,
-0.07080078125,
0.06793212890625,
-0.03570556640625,
-0.01428985595703125,
-0.059539794921875,
0.0182647705078125,
0.0150909423828125,
-0.0191192626953125,
0.01338958740234375,
-0.00678253173828125,
-0.0309600830078125,
-0.036773681640625,
-0.018341064453125,
0.0015726089477539062,
0.022918701171875,
0.0071563720703125,
0.0498046875,
-0.0083770751953125,
-0.0704345703125,
0.01169586181640625,
-0.056793212890625,
-0.009124755859375,
0.040313720703125,
0.0181732177734375,
-0.004085540771484375,
-0.032379150390625,
-0.00316619873046875,
0.0711669921875,
0.05267333984375,
-0.058624267578125,
0.01558685302734375,
-0.0268096923828125,
-0.053955078125,
0.0129241943359375,
0.00010532140731811523,
-0.0119781494140625,
-0.0140533447265625,
0.01506805419921875,
-0.06268310546875,
0.0005631446838378906,
-0.02392578125,
-0.039093017578125,
-0.01026153564453125,
0.01369476318359375,
0.0006794929504394531,
-0.0157623291015625,
-0.003162384033203125,
0.028717041015625,
0.024322509765625,
0.013153076171875,
0.047576904296875,
-0.036468505859375,
-0.01369476318359375,
-0.0017271041870117188,
-0.022003173828125,
0.04461669921875,
-0.006694793701171875,
-0.025146484375,
-0.00585174560546875,
-0.00489044189453125,
-0.056610107421875,
0.0157623291015625,
-0.0877685546875,
0.01354217529296875,
0.028411865234375,
-0.0157470703125,
0.033294677734375,
-0.0185089111328125,
-0.01062774658203125,
-0.0082855224609375,
0.038177490234375,
-0.052978515625,
-0.04608154296875,
-0.01366424560546875,
0.02935791015625,
-0.0117645263671875,
-0.034637451171875,
0.0280914306640625,
-0.01317596435546875,
-0.09912109375,
0.031585693359375,
0.006134033203125,
-0.03173828125,
-0.0145721435546875,
0.0198974609375,
-0.03826904296875,
-0.04925537109375,
0.0204315185546875,
-0.036895751953125,
0.01186370849609375,
0.036773681640625,
-0.028289794921875,
0.022308349609375,
-0.0109710693359375,
-0.0288543701171875,
-0.038543701171875,
0.0020599365234375,
-0.06195068359375,
0.01189422607421875,
0.04052734375,
-0.006099700927734375,
-0.005096435546875,
0.0246734619140625,
-0.0172882080078125,
0.0288848876953125,
-0.0078125,
0.028411865234375,
-0.025482177734375,
-0.03631591796875,
-0.00925445556640625,
-0.037841796875,
0.003810882568359375,
-0.0204010009765625,
-0.03765869140625,
-0.00522613525390625,
-0.0211181640625,
0.01641845703125,
0.007144927978515625,
-0.0204620361328125,
-0.0177001953125,
-0.0521240234375,
-0.0399169921875,
0.0245361328125,
-0.01751708984375,
0.007045745849609375,
-0.06689453125,
-0.047119140625,
-0.01116943359375,
-0.0653076171875,
0.0155487060546875,
0.0162811279296875,
0.08184814453125,
0.020172119140625,
0.0233917236328125,
0.0128631591796875,
-0.00037550926208496094,
0.0011625289916992188,
-0.0306396484375,
0.0582275390625,
0.01204681396484375,
0.0037059783935546875,
0.032318115234375,
-0.030975341796875,
-0.007228851318359375,
-0.0411376953125,
0.032257080078125,
0.02593994140625,
0.047515869140625,
-0.032196044921875,
-0.0018625259399414062,
0.0379638671875,
0.0265350341796875,
-0.0022945404052734375,
-0.046356201171875,
0.0252838134765625,
0.0677490234375,
-0.038726806640625,
0.03704833984375,
-0.03985595703125,
-0.010040283203125,
0.0074310302734375,
-0.0753173828125,
0.00821685791015625,
0.003986358642578125,
0.00940704345703125,
-0.033935546875,
-0.01007080078125,
-0.003704071044921875,
-0.024383544921875,
-0.033905029296875,
-0.00274658203125,
0.033294677734375,
-0.043548583984375,
-0.0218505859375,
0.01457977294921875,
-0.0206298828125,
0.0452880859375,
0.024139404296875,
-0.0306243896484375,
0.004177093505859375,
0.01216888427734375,
0.049163818359375,
-0.00753021240234375,
-0.0262298583984375,
0.0416259765625,
0.06689453125,
-0.035858154296875,
-0.022247314453125,
-0.0411376953125,
0.0165557861328125,
-0.07293701171875,
-0.01532745361328125,
-0.0193939208984375,
0.0057220458984375,
0.05096435546875,
-0.01041412353515625,
0.0024013519287109375,
0.02581787109375,
-0.035736083984375,
0.0753173828125,
0.048919677734375,
0.034881591796875,
0.0244293212890625,
-0.0243988037109375,
-0.0016841888427734375,
0.00176239013671875,
-0.04803466796875,
-0.0270233154296875,
0.00589752197265625,
0.028900146484375,
0.0181732177734375,
-0.017059326171875,
-0.028656005859375,
0.0306549072265625,
-0.0108642578125,
-0.0081024169921875,
0.0186614990234375,
0.039703369140625,
-0.00693511962890625,
0.0020580291748046875,
0.02667236328125,
0.015899658203125,
0.0119476318359375,
0.0254058837890625,
-0.0306854248046875,
0.0170440673828125,
0.0254058837890625,
0.0086669921875,
0.033660888671875,
-0.02392578125,
-0.047760009765625,
-0.0008630752563476562,
-0.0284423828125,
0.01605224609375,
-0.01105499267578125,
0.0114593505859375,
-0.025482177734375,
-0.0284271240234375,
0.025421142578125,
-0.041412353515625,
0.01373291015625,
-0.045379638671875,
0.0367431640625,
-0.0062103271484375,
0.0102996826171875,
0.06878662109375,
0.05902099609375,
-0.01525115966796875,
-0.005168914794921875,
-0.0023593902587890625,
-0.026031494140625,
-0.027191162109375,
-0.0140533447265625,
-0.058074951171875,
0.009124755859375,
0.0165557861328125,
0.0003647804260253906,
0.019073486328125,
0.0236358642578125,
0.0035724639892578125,
0.0289154052734375,
-0.0126190185546875,
0.005237579345703125,
-0.0228729248046875,
0.050933837890625,
0.023773193359375,
0.01032257080078125,
0.0399169921875,
0.05096435546875,
-0.0048675537109375,
-0.0210113525390625,
0.020904541015625,
-0.00847625732421875,
-0.0125732421875,
-0.0259857177734375,
-0.0295867919921875,
-0.01070404052734375,
0.06671142578125,
-0.0101776123046875,
-0.01702880859375,
0.0000712275505065918,
-0.0014591217041015625,
-0.0186767578125,
0.0102386474609375,
0.02532958984375,
-0.0010881423950195312,
-0.00936126708984375,
-0.05145263671875,
0.0213623046875,
0.0018205642700195312,
0.0218505859375,
-0.00482940673828125,
-0.043701171875,
0.004581451416015625,
0.031402587890625,
-0.0171356201171875,
0.049591064453125,
0.037139892578125,
-0.0235137939453125,
0.022125244140625,
-0.002849578857421875,
-0.01334381103515625,
0.01375579833984375,
-0.00458526611328125,
-0.01560211181640625,
-0.0240478515625,
0.038421630859375,
0.0122222900390625,
-0.0014104843139648438,
0.050811767578125,
-0.021331787109375,
0.044189453125,
0.0472412109375,
0.07196044921875,
-0.08465576171875,
0.0364990234375,
0.03515625,
0.009429931640625,
0.06939697265625,
-0.0119476318359375,
0.030364990234375,
0.0032024383544921875,
0.03594970703125,
0.013092041015625,
-0.002315521240234375,
0.0081634521484375,
-0.0199432373046875,
-0.0105438232421875,
-0.025421142578125,
-0.0200347900390625,
0.0190277099609375,
0.014678955078125,
0.048126220703125,
-0.01207733154296875,
0.057373046875,
-0.039031982421875,
-0.001132965087890625,
0.04150390625,
-0.014312744140625,
-0.05230712890625,
0.04315185546875,
-0.00864410400390625,
0.00223541259765625,
-0.0105133056640625,
-0.0271453857421875,
0.01554107666015625,
0.043701171875,
-0.0289306640625,
0.0196075439453125,
0.0190887451171875,
-0.007686614990234375,
-0.1087646484375,
-0.0253143310546875,
0.042510986328125,
0.0073699951171875,
-0.033782958984375,
0.059906005859375,
-0.045166015625,
-0.0574951171875,
0.01043701171875,
-0.036895751953125,
0.046783447265625,
-0.06085205078125,
0.006603240966796875,
0.0416259765625,
-0.036285400390625,
-0.0245208740234375,
-0.02398681640625,
0.01403045654296875,
-0.05767822265625,
-0.034515380859375,
-0.01096343994140625,
-0.030426025390625,
0.0126953125,
-0.0102081298828125,
-0.03021240234375,
0.061065673828125,
0.004680633544921875,
0.004505157470703125,
-0.0074005126953125,
0.023284912109375,
-0.003559112548828125,
0.0301361083984375,
-0.0494384765625,
0.057708740234375,
-0.01708984375,
0.00897216796875,
-0.027923583984375,
0.0178680419921875,
-0.007293701171875,
-0.0204315185546875,
0.04345703125,
0.002910614013671875,
-0.00328826904296875,
-0.03875732421875,
0.002593994140625,
0.014617919921875,
-0.0193023681640625,
0.0273590087890625,
-0.029083251953125,
-0.00565338134765625,
0.00376129150390625,
-0.038482666015625,
0.0227203369140625,
-0.0141448974609375,
-0.03778076171875,
-0.021453857421875,
-0.006458282470703125,
-0.0219573974609375,
0.00994110107421875,
0.03369140625,
0.0203399658203125,
-0.015106201171875,
-0.023956298828125,
-0.01496124267578125,
-0.007701873779296875,
0.034088134765625,
0.032318115234375,
-0.051513671875,
0.00846099853515625,
-0.03857421875,
0.04376220703125,
0.01172637939453125,
0.0142669677734375,
0.04962158203125,
0.02691650390625,
-0.01332855224609375,
-0.000044345855712890625,
0.0233001708984375,
0.01482391357421875,
-0.04473876953125,
0.0733642578125,
0.040740966796875,
0.03564453125,
-0.00875091552734375,
0.0279083251953125,
0.0215301513671875,
0.0594482421875,
-0.043365478515625,
-0.03411865234375,
-0.00769805908203125,
0.0158538818359375,
0.0305633544921875,
-0.0093994140625,
0.0299530029296875,
-0.04254150390625,
-0.005512237548828125,
-0.01479339599609375,
-0.0183868408203125,
0.01380157470703125,
0.004444122314453125,
0.00608062744140625,
0.02593994140625,
-0.002960205078125,
-0.01157379150390625,
-0.0001093745231628418,
0.00514984130859375,
-0.0123291015625,
0.023193359375,
-0.0263824462890625,
0.045440673828125,
-0.029571533203125,
0.0027523040771484375,
-0.0006723403930664062,
0.01605224609375,
-0.0293426513671875,
0.00980377197265625,
-0.05780029296875,
-0.0638427734375,
0.01186370849609375,
0.0643310546875,
0.031768798828125,
0.01329803466796875,
0.049774169921875,
0.032135009765625,
-0.0234375,
-0.01155853271484375,
0.024688720703125,
-0.0164642333984375,
-0.020416259765625,
-0.0279693603515625,
-0.0384521484375,
-0.00946807861328125,
-0.0256195068359375,
-0.004924774169921875,
0.02593994140625,
-0.0078887939453125,
-0.0340576171875,
0.0009717941284179688,
-0.01360321044921875,
-0.00864410400390625,
0.0654296875,
-0.0252532958984375,
0.020263671875,
-0.018310546875,
-0.07940673828125,
-0.006855010986328125,
-0.049346923828125,
-0.007328033447265625,
0.007656097412109375,
0.022491455078125,
-0.006198883056640625,
0.03509521484375,
0.006519317626953125,
0.00914764404296875,
-0.0028438568115234375,
-0.00005704164505004883,
0.0012836456298828125,
0.0218353271484375,
0.0504150390625,
0.0195159912109375,
-0.0538330078125,
-0.029541015625,
-0.00396728515625,
0.024505615234375,
-0.0157928466796875,
0.0968017578125,
-0.0292510986328125,
-0.0067596435546875,
-0.02044677734375,
0.0019550323486328125,
0.0022640228271484375,
-0.01282501220703125,
-0.0037689208984375,
0.01331329345703125,
0.003101348876953125,
-0.01114654541015625,
-0.06280517578125,
0.008209228515625,
0.0207672119140625,
0.003177642822265625,
-0.001567840576171875,
-0.0294342041015625,
0.030059814453125,
0.0245513916015625,
0.021881103515625,
-0.02484130859375,
-0.029266357421875,
-0.03741455078125,
-0.0133819580078125,
0.0309600830078125,
0.043792724609375,
-0.01325225830078125,
0.042510986328125,
-0.048858642578125,
-0.0281982421875,
0.00061798095703125,
-0.0391845703125,
-0.0302276611328125,
0.0159149169921875,
0.0019855499267578125,
0.005199432373046875,
0.03350830078125,
0.0004100799560546875,
-0.0025196075439453125,
0.03607177734375,
-0.01381683349609375,
0.0180816650390625,
-0.01482391357421875,
-0.0291748046875,
-0.05816650390625,
0.0095367431640625,
-0.006168365478515625,
-0.01056671142578125,
-0.05841064453125,
0.03228759765625,
-0.006473541259765625,
0.0212249755859375,
-0.033172607421875,
-0.0173492431640625,
-0.0093536376953125,
-0.01184844970703125,
-0.01097869873046875,
-0.06787109375,
-0.048004150390625,
-0.001678466796875,
0.032958984375,
0.02447509765625,
-0.05914306640625,
0.044952392578125,
-0.01171112060546875,
-0.0105133056640625,
0.019805908203125,
0.006778717041015625,
0.00983428955078125,
0.039337158203125,
-0.057220458984375,
-0.0723876953125,
-0.009674072265625,
0.047882080078125,
-0.050262451171875,
-0.00759124755859375,
-0.0005578994750976562,
-0.01849365234375,
-0.042572021484375,
-0.0045318603515625,
0.0184478759765625,
0.02264404296875,
0.057464599609375,
-0.0218505859375,
0.0142669677734375,
0.00092315673828125,
-0.0085296630859375,
-0.040557861328125,
0.01187896728515625,
-0.04547119140625,
-0.006137847900390625,
-0.01313018798828125,
0.007537841796875,
0.0229949951171875,
-0.032501220703125,
-0.09234619140625,
0.04718017578125,
-0.010345458984375,
-0.029693603515625,
-0.041229248046875,
0.03570556640625,
0.0009684562683105469,
0.01178741455078125,
-0.0015745162963867188,
-0.004795074462890625,
-0.0008344650268554688,
0.0108184814453125,
0.0003521442413330078,
0.040740966796875,
-0.00765228271484375,
-0.0032501220703125,
-0.0008463859558105469,
0.019500732421875,
0.0269622802734375,
-0.0036983489990234375,
0.016845703125,
-0.045166015625,
0.05792236328125,
0.050201416015625,
-0.0216064453125,
0.0016880035400390625,
0.0252227783203125,
-0.033843994140625,
-0.0158843994140625,
-0.0281829833984375,
-0.015655517578125,
-0.0031757354736328125,
0.0906982421875,
0.031036376953125,
0.0294952392578125,
-0.042144775390625,
-0.006900787353515625,
-0.0044097900390625,
-0.0628662109375,
-0.0266265869140625,
0.04119873046875,
-0.07275390625,
-0.01313018798828125,
-0.0036563873291015625,
0.00664520263671875,
-0.00850677490234375,
-0.02081298828125,
-0.0220947265625,
-0.033355712890625,
-0.006771087646484375,
0.01485443115234375,
-0.0340576171875,
-0.00350189208984375,
0.050689697265625,
-0.034393310546875,
0.01374053955078125,
0.0016326904296875,
0.01230621337890625,
0.0195770263671875,
0.009857177734375,
-0.023223876953125,
0.011871337890625,
-0.019866943359375,
0.02093505859375,
-0.004749298095703125,
0.0158843994140625,
-0.01209259033203125,
0.02020263671875,
-0.002147674560546875,
-0.010986328125,
-0.00766754150390625,
-0.00850677490234375,
0.0283966064453125,
0.00719451904296875,
-0.011749267578125,
-0.006931304931640625,
-0.004154205322265625,
0.07110595703125,
-0.0103912353515625,
0.04296875,
0.0201263427734375,
-0.017364501953125,
0.04461669921875,
-0.01220703125,
-0.01551055908203125,
0.034271240234375,
0.01241302490234375,
-0.07757568359375,
0.08099365234375,
0.07476806640625,
0.047760009765625,
0.03814697265625
] |
537e10c2c60e800f37584d4811659b93375db0f8
|
Wordpress Stackexchange
Q: Target all posts that are NOT aside or link post formats I want to add a post title to all of my posts apart from those that are marked as "aside" or "link" post formats.
I'm currently using this code to hide the post title for aside posts;
<?php if (! has_post_format('aside')) { ?>
<?php the_title();?>
<?php } ?>
How can I target the "link" post format aswell using this method?
A: Edited:
Now that I understand your question, try this...
Place this above your title to enable the post_class function.
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Then add </div> below your title (or excerpt, or wherever you want this special styling to end).
Now, a special class will be added in which you can use the classes for post formats. for example, you may now use .format-aside in your CSS to style the aside.
|
Q: Target all posts that are NOT aside or link post formats I want to add a post title to all of my posts apart from those that are marked as "aside" or "link" post formats.
I'm currently using this code to hide the post title for aside posts;
<?php if (! has_post_format('aside')) { ?>
<?php the_title();?>
<?php } ?>
How can I target the "link" post format aswell using this method?
A: Edited:
Now that I understand your question, try this...
Place this above your title to enable the post_class function.
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Then add </div> below your title (or excerpt, or wherever you want this special styling to end).
Now, a special class will be added in which you can use the classes for post formats. for example, you may now use .format-aside in your CSS to style the aside.
|
wordpress
|
{
"language": "en",
"length": 147,
"provenance": "stackexchange_00019.jsonl.gz:428235",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/82986"
}
|
[
0.05389404296875,
-0.007427215576171875,
-0.008056640625,
0.0135498046875,
0.0010938644409179688,
-0.0562744140625,
0.053436279296875,
-0.026580810546875,
-0.0235748291015625,
0.0185546875,
0.0068206787109375,
0.0303497314453125,
-0.0023136138916015625,
-0.038543701171875,
0.028717041015625,
-0.01158905029296875,
0.01364898681640625,
0.034515380859375,
0.06329345703125,
-0.004119873046875,
0.00026106834411621094,
-0.0063934326171875,
0.0531005859375,
0.019500732421875,
0.03057861328125,
-0.016693115234375,
0.09375,
-0.036468505859375,
0.037841796875,
-0.012451171875,
0.036407470703125,
-0.046905517578125,
0.0548095703125,
-0.00928497314453125,
-0.034210205078125,
0.051025390625,
0.0171356201171875,
-0.031829833984375,
-0.016876220703125,
0.0224151611328125,
0.005100250244140625,
0.01611328125,
-0.01093292236328125,
0.0016050338745117188,
-0.03350830078125,
-0.01038360595703125,
-0.00740814208984375,
-0.00832366943359375,
0.05621337890625,
-0.018798828125,
-0.01953125,
0.00704193115234375,
-0.0138397216796875,
-0.0015974044799804688,
-0.02154541015625,
-0.005451202392578125,
-0.01285552978515625,
0.039520263671875,
0.038238525390625,
-0.01123046875,
-0.03857421875,
-0.00897216796875,
0.0025081634521484375,
-0.03997802734375,
0.00965118408203125,
0.0092926025390625,
0.04852294921875,
0.005786895751953125,
-0.0163116455078125,
0.033599853515625,
0.05340576171875,
-0.0238037109375,
0.01094818115234375,
-0.023162841796875,
-0.0287322998046875,
0.0007672309875488281,
0.00908660888671875,
-0.0281219482421875,
0.0117034912109375,
-0.0305328369140625,
0.00855255126953125,
0.01110076904296875,
0.0065460205078125,
-0.04473876953125,
0.0015859603881835938,
-0.036285400390625,
-0.00922393798828125,
-0.0017986297607421875,
-0.01143646240234375,
-0.032470703125,
-0.013458251953125,
-0.042205810546875,
-0.045745849609375,
0.01148223876953125,
0.0185546875,
-0.04486083984375,
0.025115966796875,
0.05950927734375,
-0.035064697265625,
-0.0031833648681640625,
-0.0164947509765625,
-0.020477294921875,
0.016998291015625,
-0.0252227783203125,
0.000560760498046875,
0.046875,
0.007381439208984375,
-0.049285888671875,
-0.0100860595703125,
0.00010228157043457031,
-0.009735107421875,
-0.0175018310546875,
0.00893402099609375,
0.06085205078125,
-0.06500244140625,
-0.0255126953125,
-0.044769287109375,
-0.01062774658203125,
-0.04522705078125,
0.0105743408203125,
-0.0010852813720703125,
0.01456451416015625,
0.023193359375,
-0.0287933349609375,
0.0168914794921875,
0.0142974853515625,
-0.0189056396484375,
-0.0357666015625,
0.048065185546875,
0.0224151611328125,
-0.0234832763671875,
-0.0157623291015625,
0.055938720703125,
0.0282135009765625,
0.01177978515625,
-0.0300750732421875,
0.0092620849609375,
-0.0259246826171875,
-0.05316162109375,
-0.0073089599609375,
0.0455322265625,
-0.03228759765625,
-0.033447265625,
0.0108184814453125,
0.0016937255859375,
0.018524169921875,
0.01190185546875,
0.00835418701171875,
0.004375457763671875,
-0.048126220703125,
0.0220794677734375,
-0.04962158203125,
0.019378662109375,
0.03546142578125,
-0.0252685546875,
0.0135498046875,
0.04364013671875,
-0.00852203369140625,
-0.02874755859375,
-0.038726806640625,
0.002712249755859375,
0.00428009033203125,
0.019805908203125,
-0.02447509765625,
-0.035675048828125,
-0.00966644287109375,
-0.03875732421875,
-0.007640838623046875,
0.0235137939453125,
0.01837158203125,
0.008026123046875,
0.00856781005859375,
0.0251007080078125,
0.0160980224609375,
-0.0128173828125,
0.0037994384765625,
-0.0274658203125,
-0.03619384765625,
0.0325927734375,
0.0426025390625,
-0.0160064697265625,
-0.0254974365234375,
-0.010162353515625,
0.007965087890625,
-0.04638671875,
0.00016379356384277344,
0.0104522705078125,
0.024139404296875,
0.01763916015625,
0.022369384765625,
0.049407958984375,
0.025238037109375,
-0.027679443359375,
-0.035888671875,
-0.00830841064453125,
-0.01275634765625,
0.0257110595703125,
-0.0038661956787109375,
0.004306793212890625,
0.0362548828125,
0.0009889602661132812,
0.007396697998046875,
-0.0296478271484375,
0.027435302734375,
-0.03887939453125,
-0.022857666015625,
0.00003045797348022461,
0.0154571533203125,
-0.05438232421875,
0.01407623291015625,
0.03997802734375,
0.0113983154296875,
-0.033966064453125,
-0.00991058349609375,
-0.006221771240234375,
-0.0247650146484375,
0.00826263427734375,
-0.01120758056640625,
-0.01763916015625,
-0.02752685546875,
0.0172271728515625,
-0.0095977783203125,
0.0010356903076171875,
0.07489013671875,
0.072265625,
-0.021026611328125,
-0.01116180419921875,
-0.041595458984375,
0.02392578125,
0.01371002197265625,
-0.073486328125,
0.037445068359375,
0.00873565673828125,
0.017303466796875,
-0.052764892578125,
-0.02203369140625,
-0.01268768310546875,
-0.020751953125,
0.0069732666015625,
0.046051025390625,
0.037322998046875,
0.0305633544921875,
-0.01218414306640625,
-0.004680633544921875,
0.055419921875,
-0.006237030029296875,
0.02740478515625,
-0.012847900390625,
0.00409698486328125,
0.02581787109375,
-0.01788330078125,
0.0007753372192382812,
0.028411865234375,
-0.032684326171875,
-0.004802703857421875,
0.053253173828125,
-0.0128326416015625,
-0.022216796875,
0.00829315185546875,
-0.0029964447021484375,
0.0182647705078125,
-0.03759765625,
-0.041290283203125,
0.0002655982971191406,
0.07781982421875,
-0.0304412841796875,
0.049041748046875,
0.02630615234375,
-0.0186614990234375,
-0.00263214111328125,
0.00463104248046875,
0.0010843276977539062,
0.00601959228515625,
0.03875732421875,
0.0277099609375,
0.02105712890625,
-0.02587890625,
-0.037994384765625,
0.01390838623046875,
0.027008056640625,
-0.02667236328125,
0.018157958984375,
0.0572509765625,
-0.0131988525390625,
0.022003173828125,
-0.07330322265625,
0.033447265625,
-0.041656494140625,
-0.01035308837890625,
-0.01885986328125,
-0.00872802734375,
0.033416748046875,
-0.0033435821533203125,
0.0229949951171875,
0.01224517822265625,
-0.006832122802734375,
-0.05609130859375,
-0.06884765625,
0.050384521484375,
-0.053680419921875,
0.006107330322265625,
0.068603515625,
-0.0047760009765625,
-0.002391815185546875,
-0.00433349609375,
0.02227783203125,
-0.0030612945556640625,
0.01149749755859375,
-0.01580810546875,
-0.0291595458984375,
-0.044586181640625,
-0.027252197265625,
0.0206298828125,
0.057098388671875,
-0.032196044921875,
-0.048583984375,
-0.0033779144287109375,
0.015655517578125,
-0.055084228515625,
-0.029693603515625,
0.006229400634765625,
-0.0804443359375,
0.007648468017578125,
-0.00444793701171875,
-0.045745849609375,
-0.0267486572265625,
0.035369873046875,
0.0056610107421875,
0.004364013671875,
-0.00223541259765625,
0.00238037109375,
-0.0249176025390625,
-0.0433349609375,
-0.05352783203125,
0.007442474365234375,
-0.00646209716796875,
0.0233612060546875,
0.052398681640625,
0.04486083984375,
-0.01177978515625,
0.04156494140625,
0.050994873046875,
-0.0235595703125,
0.01000213623046875,
-0.0268096923828125,
0.0198211669921875,
-0.0095672607421875,
0.01163482666015625,
0.002574920654296875,
-0.01800537109375,
0.00968170166015625,
-0.01006317138671875,
0.00074005126953125,
0.015838623046875,
0.0021152496337890625,
0.003376007080078125,
0.0030689239501953125,
0.0195770263671875,
-0.00223541259765625,
-0.02935791015625,
-0.0266265869140625,
-0.020721435546875,
-0.0555419921875,
0.0186767578125,
0.042266845703125,
-0.0082550048828125,
-0.022369384765625,
0.00962066650390625,
0.01495361328125,
0.004474639892578125,
0.04364013671875,
-0.0224151611328125,
0.01611328125,
0.0025634765625,
0.0191650390625,
-0.03790283203125,
-0.034881591796875,
-0.026214599609375,
0.032440185546875,
-0.03369140625,
0.01273345947265625,
-0.01020050048828125,
0.034210205078125,
-0.02191162109375,
-0.03521728515625,
0.035247802734375,
-0.0105438232421875,
0.032745361328125,
-0.0238037109375,
-0.028350830078125,
0.0020122528076171875,
0.09014892578125,
-0.0855712890625,
-0.0187530517578125,
-0.018890380859375,
0.007495880126953125,
0.028533935546875,
-0.0711669921875,
-0.006954193115234375,
-0.0203399658203125,
-0.0943603515625,
0.02813720703125,
-0.00826263427734375,
-0.009735107421875,
-0.032745361328125,
0.064453125,
-0.052825927734375,
-0.032806396484375,
0.00949859619140625,
0.031463623046875,
0.004119873046875,
0.01708984375,
-0.03082275390625,
0.027740478515625,
-0.00994110107421875,
-0.02496337890625,
-0.04486083984375,
-0.0196075439453125,
0.023834228515625,
0.01371002197265625,
-0.0309295654296875,
0.00797271728515625,
-0.00327301025390625,
0.03179931640625,
0.01763916015625,
-0.0147247314453125,
-0.00873565673828125,
-0.0178070068359375,
-0.00249481201171875,
0.01275634765625,
-0.0286102294921875,
-0.0125732421875,
-0.0219573974609375,
0.01837158203125,
-0.040924072265625,
0.0748291015625,
0.001743316650390625,
0.0113067626953125,
0.04302978515625,
-0.03179931640625,
-0.0504150390625,
-0.0241546630859375,
0.0323486328125,
0.03082275390625,
-0.0119781494140625,
0.020416259765625,
-0.0599365234375,
-0.048309326171875,
0.060546875,
0.0321044921875,
-0.0238189697265625,
-0.00827789306640625,
0.05999755859375,
0.016876220703125,
-0.04461669921875,
-0.0328369140625,
0.005359649658203125,
0.038360595703125,
-0.026580810546875,
0.0224456787109375,
0.0008463859558105469,
-0.046600341796875,
0.0865478515625,
0.0017652511596679688,
-0.0433349609375,
-0.0108642578125,
0.039093017578125,
-0.00946044921875,
-0.049591064453125,
0.0106048583984375,
-0.04046630859375,
0.050384521484375,
0.00034499168395996094,
0.037811279296875,
-0.03192138671875,
0.060699462890625,
0.016876220703125,
0.01027679443359375,
-0.0065765380859375,
0.00955963134765625,
0.01555633544921875,
-0.0178375244140625,
0.0155029296875,
0.0194244384765625,
0.038482666015625,
0.006855010986328125,
-0.031585693359375,
-0.006305694580078125,
0.00423431396484375,
0.006870269775390625,
0.0203704833984375,
-0.01528167724609375,
0.052978515625,
-0.01519775390625,
-0.0141448974609375,
0.001983642578125,
-0.005756378173828125,
0.03424072265625,
0.017852783203125,
-0.035430908203125,
-0.0282745361328125,
-0.00513458251953125,
0.0124053955078125,
-0.030029296875,
0.0265960693359375,
0.04315185546875,
0.030609130859375,
0.0226898193359375,
-0.0181427001953125,
-0.00408935546875,
0.027099609375,
-0.031951904296875,
0.0218505859375,
0.041961669921875,
-0.01129150390625,
0.038818359375,
0.046356201171875,
0.04449462890625,
0.0250091552734375,
-0.046630859375,
0.02288818359375,
0.007167816162109375,
0.040802001953125,
0.0219573974609375,
-0.016510009765625,
-0.006702423095703125,
0.0249786376953125,
0.007965087890625,
-0.0186767578125,
0.00212860107421875,
0.043701171875,
0.0382080078125,
0.0330810546875,
-0.00023043155670166016,
-0.033660888671875,
-0.014984130859375,
-0.065185546875,
0.045440673828125,
0.05389404296875,
-0.046783447265625,
-0.036956787109375,
0.00603485107421875,
0.0090484619140625,
0.045196533203125,
-0.0097808837890625,
-0.000164031982421875,
0.0019016265869140625,
-0.003021240234375,
0.00255584716796875,
-0.07305908203125,
0.00997161865234375,
0.03253173828125,
-0.0270233154296875,
0.00812530517578125,
-0.011383056640625,
0.01207733154296875,
-0.0555419921875,
0.0142059326171875,
-0.00868988037109375,
0.006938934326171875,
-0.02398681640625,
0.0229339599609375,
-0.038238525390625,
0.01338958740234375,
-0.035614013671875,
0.015106201171875,
0.034637451171875,
0.0215606689453125,
-0.07208251953125,
0.023101806640625,
-0.032989501953125,
0.00138092041015625,
-0.034820556640625,
-0.06787109375,
-0.04962158203125,
-0.03082275390625,
0.01131439208984375,
-0.01055908203125,
0.004024505615234375,
-0.001232147216796875,
-0.0311279296875,
0.06964111328125,
0.032989501953125,
0.045501708984375,
-0.0233612060546875,
0.04730224609375,
-0.01038360595703125,
0.039215087890625,
-0.00445556640625,
0.006198883056640625,
0.01224517822265625,
-0.022979736328125,
-0.0017795562744140625,
-0.09619140625,
-0.0142974853515625,
0.0166473388671875,
0.004352569580078125,
0.031982421875,
-0.0310211181640625,
0.00543975830078125,
-0.007488250732421875,
0.00643157958984375,
0.005523681640625,
-0.027923583984375,
0.00815582275390625,
0.0052337646484375,
-0.0247955322265625,
0.010772705078125,
0.0009946823120117188,
0.06707763671875,
-0.0267486572265625,
-0.0007977485656738281,
0.01470947265625,
-0.02197265625,
0.033233642578125,
-0.0003705024719238281,
-0.00821685791015625,
0.03240966796875,
0.03094482421875,
-0.009002685546875,
0.0164947509765625,
0.031890869140625,
0.01155853271484375,
-0.0112152099609375,
-0.012603759765625,
0.0216217041015625,
-0.0015726089477539062,
0.0880126953125,
0.00872802734375,
-0.022003173828125,
0.06182861328125,
-0.051605224609375,
0.039581298828125,
0.03546142578125,
0.058990478515625,
-0.07305908203125,
0.02764892578125,
0.00848388671875,
-0.00638580322265625,
0.07818603515625,
-0.005298614501953125,
0.0196990966796875,
0.02423095703125,
-0.00311279296875,
0.0134429931640625,
-0.0297393798828125,
-0.00408172607421875,
-0.0064239501953125,
-0.005283355712890625,
-0.022918701171875,
0.04400634765625,
0.002197265625,
-0.077392578125,
0.001220703125,
0.03399658203125,
-0.01776123046875,
-0.038482666015625,
-0.0258941650390625,
0.00731658935546875,
-0.039306640625,
-0.05914306640625,
0.0049591064453125,
-0.0226593017578125,
0.0268402099609375,
0.0394287109375,
0.039520263671875,
-0.01287841796875,
0.048736572265625,
-0.0254669189453125,
0.05328369140625,
0.00287628173828125,
-0.0148468017578125,
-0.044281005859375,
-0.038360595703125,
-0.0003247261047363281,
0.035919189453125,
0.00920867919921875,
0.0247955322265625,
0.013702392578125,
-0.0526123046875,
-0.0131988525390625,
-0.032012939453125,
0.08819580078125,
-0.02667236328125,
-0.033416748046875,
-0.003536224365234375,
-0.0082550048828125,
0.016937255859375,
-0.01183319091796875,
0.0181884765625,
-0.02191162109375,
0.0186614990234375,
-0.01078033447265625,
-0.01062774658203125,
-0.0258331298828125,
-0.045318603515625,
-0.06878662109375,
0.0860595703125,
-0.0213623046875,
0.04248046875,
0.00951385498046875,
0.0245819091796875,
-0.0088348388671875,
0.016754150390625,
-0.03564453125,
0.06610107421875,
-0.022064208984375,
0.0234375,
-0.0172576904296875,
0.00528717041015625,
0.005584716796875,
0.01436614990234375,
0.02801513671875,
0.005695343017578125,
0.01248931884765625,
0.0011148452758789062,
0.055908203125,
0.035614013671875,
-0.00846099853515625,
0.004955291748046875,
-0.0177459716796875,
-0.003734588623046875,
-0.002841949462890625,
-0.006855010986328125,
0.03814697265625,
-0.0296478271484375,
-0.03955078125,
0.010223388671875,
0.039794921875,
0.05322265625,
0.01337432861328125,
0.02618408203125,
-0.007167816162109375,
0.0112457275390625,
0.021392822265625,
0.00446319580078125,
0.02862548828125,
0.03277587890625,
0.057525634765625,
-0.09185791015625,
-0.0345458984375,
-0.041229248046875,
0.05584716796875,
0.0019741058349609375,
0.0282745361328125,
0.005985260009765625,
0.0006999969482421875,
0.0423583984375,
0.0161590576171875,
0.01065826416015625,
0.0225982666015625,
0.0153961181640625,
0.027740478515625,
0.0131683349609375,
0.01522064208984375,
-0.036712646484375,
0.04632568359375,
0.0311279296875,
0.0308380126953125,
-0.0400390625,
0.0222625732421875,
0.026824951171875,
0.00836944580078125,
-0.038970947265625,
-0.050048828125,
-0.03887939453125,
-0.033416748046875,
0.007755279541015625,
-0.025146484375,
-0.006618499755859375,
0.032501220703125,
0.0401611328125,
0.0028209686279296875,
-0.028564453125,
-0.029144287109375,
-0.00788116455078125,
-0.0323486328125,
-0.0163421630859375,
0.0021648406982421875,
0.03485107421875,
0.0231170654296875,
0.06494140625,
0.016693115234375,
-0.005176544189453125,
0.0250091552734375,
-0.0038356781005859375,
-0.0045623779296875,
-0.039642333984375,
0.00504302978515625,
-0.01177215576171875,
-0.016815185546875,
0.007518768310546875,
0.03857421875,
0.01364898681640625,
0.039703369140625,
0.035858154296875,
0.001979827880859375,
0.002285003662109375,
0.0125274658203125,
-0.00922393798828125,
0.00946807861328125,
-0.00341033935546875,
-0.0164642333984375,
0.021331787109375,
-0.02783203125,
0.0167083740234375,
0.015289306640625,
0.045196533203125,
-0.048980712890625,
0.04791259765625,
-0.0004627704620361328,
0.002109527587890625,
0.0274810791015625,
0.024139404296875,
-0.0057373046875,
0.003528594970703125,
-0.0877685546875,
-0.034759521484375,
-0.0017185211181640625,
-0.002140045166015625,
0.00872039794921875,
0.0155792236328125,
-0.037750244140625,
0.044097900390625,
0.04315185546875,
0.0283355712890625,
0.01154327392578125,
-0.0576171875,
0.039764404296875,
0.027099609375,
0.0176239013671875,
0.05169677734375,
-0.0173187255859375,
-0.04095458984375,
-0.0091400146484375,
0.0767822265625,
0.01296234130859375,
0.0452880859375,
-0.039276123046875,
0.03558349609375,
0.0011167526245117188,
0.042510986328125,
-0.045440673828125,
-0.03656005859375,
0.0274658203125,
-0.02313232421875,
0.027557373046875,
0.005657196044921875,
-0.0345458984375,
0.00499725341796875,
0.0401611328125,
-0.02117919921875,
0.033416748046875,
-0.0270233154296875,
0.0006170272827148438,
-0.059234619140625,
0.022918701171875,
-0.01361846923828125,
0.01336669921875,
-0.0013837814331054688,
-0.0168304443359375,
0.033599853515625,
0.005626678466796875,
-0.0149383544921875,
0.032379150390625,
0.04534912109375,
-0.0228729248046875,
0.038421630859375,
-0.0323486328125,
0.06634521484375,
0.033966064453125,
-0.002620697021484375,
-0.023712158203125,
0.04443359375,
0.01078033447265625,
0.00725555419921875,
0.052825927734375,
0.01245880126953125,
0.03460693359375,
-0.007457733154296875,
-0.027374267578125,
0.01788330078125,
0.0528564453125,
0.0026683807373046875,
0.0269012451171875,
-0.006267547607421875,
-0.0186004638671875,
-0.022796630859375,
-0.017333984375,
-0.0233154296875,
-0.0576171875,
-0.0120391845703125,
0.03204345703125,
-0.040252685546875,
-0.035247802734375,
-0.054443359375,
-0.046356201171875,
-0.00299072265625,
-0.008270263671875,
-0.017120361328125,
-0.006374359130859375,
0.016204833984375,
0.0057525634765625,
-0.03472900390625,
0.01422119140625,
0.01087188720703125,
0.034912109375,
-0.00733184814453125,
-0.037872314453125,
-0.01171112060546875,
0.044708251953125,
-0.0269622802734375,
0.0164794921875,
0.04998779296875,
-0.028594970703125,
-0.0245208740234375,
0.0113677978515625,
0.0240478515625,
0.05084228515625,
-0.0281829833984375,
-0.03192138671875,
-0.018035888671875,
0.00402069091796875,
-0.01123809814453125,
-0.0462646484375,
0.034515380859375,
-0.078125,
-0.04266357421875,
0.0149993896484375,
-0.046142578125,
-0.0311431884765625,
-0.051971435546875,
-0.0458984375,
0.07891845703125,
0.0003750324249267578,
-0.03082275390625,
-0.01465606689453125,
0.0264129638671875,
-0.01654052734375,
0.038970947265625,
0.0110015869140625,
-0.0103302001953125,
0.0011501312255859375,
0.01172637939453125,
-0.0021419525146484375,
0.01509857177734375,
-0.00682830810546875,
-0.011566162109375,
-0.0325927734375,
0.0189056396484375,
0.0158233642578125,
-0.01511383056640625,
-0.0031070709228515625,
-0.0206298828125,
0.017822265625,
0.0103302001953125,
-0.06842041015625,
0.005001068115234375,
-0.0015392303466796875,
0.0703125,
0.0184478759765625,
-0.005878448486328125,
-0.08807373046875,
-0.056488037109375,
0.0762939453125,
0.042877197265625,
0.03564453125,
-0.00007355213165283203,
0.00782012939453125,
-0.0276336669921875,
-0.04071044921875,
-0.0156707763671875,
0.01171875,
-0.01959228515625,
-0.0011205673217773438,
-0.00797271728515625,
-0.0158843994140625,
-0.0196533203125,
-0.002140045166015625,
-0.04632568359375,
-0.01457977294921875,
0.00140380859375,
0.0374755859375,
-0.069091796875,
0.0226898193359375,
0.0592041015625,
-0.04229736328125,
-0.0154876708984375,
0.030364990234375,
-0.0138092041015625,
0.0247802734375,
0.0306243896484375,
-0.05474853515625,
-0.038299560546875,
-0.005329132080078125,
0.038909912109375,
-0.026153564453125,
0.04400634765625,
-0.0179443359375,
0.010101318359375,
-0.052947998046875,
0.0094451904296875,
0.02984619140625,
-0.01184844970703125,
-0.0073699951171875,
0.0272674560546875,
0.044647216796875,
0.04522705078125,
-0.00304412841796875,
0.030914306640625,
0.0015411376953125,
0.025482177734375,
0.018798828125,
-0.031341552734375,
0.043426513671875,
-0.0157012939453125,
-0.00734710693359375,
-0.01251220703125,
-0.004222869873046875,
-0.047698974609375,
0.0196380615234375,
0.038543701171875,
0.0089111328125,
0.017974853515625
] |
c58cee4d01502420466688b8a9943c73d27e3c03
|
Wordpress Stackexchange
Q: prepare() not working When I do this:
$transients = $wpdb->get_col(
"
SELECT option_name
FROM $wpdb->options
WHERE option_name
LIKE '_transient_wb_tt_%'
"
);
It works fine, but when I use prepare like so:
$transients = $wpdb->get_col( $wpdb->prepare(
"
SELECT option_name
FROM %s
WHERE option_name
LIKE '_transient_wb_tt_%'
",
$wpdb->options
) );
It doesn't work, what am I doing wrong here?
A: I agree with @bainternet. You don't need $wpdb->prepare. There isn't any user supplied content.
The answer to the question is that to get a wildcard % to pass through prepare you need to double it in your code.
LIKE '_transient_wb_tt_%%'
Try that or this if you want a good look at the generated query:
var_dump($wpdb->prepare("
SELECT option_name
FROM %s
WHERE option_name
LIKE '_transient_wb_tt_%%'
",
'abc'));
die;
Other than being unnecessary, using $wpdb->prepare like this won't work. The attempt to use prepare to swap in the tablename will result in a tablename with quotes around it. That is invalid SQL. The query should be simple:
SELECT option_name
FROM {$wpdb->options}
WHERE option_name
LIKE '_transient_wb_tt_%%'
|
Q: prepare() not working When I do this:
$transients = $wpdb->get_col(
"
SELECT option_name
FROM $wpdb->options
WHERE option_name
LIKE '_transient_wb_tt_%'
"
);
It works fine, but when I use prepare like so:
$transients = $wpdb->get_col( $wpdb->prepare(
"
SELECT option_name
FROM %s
WHERE option_name
LIKE '_transient_wb_tt_%'
",
$wpdb->options
) );
It doesn't work, what am I doing wrong here?
A: I agree with @bainternet. You don't need $wpdb->prepare. There isn't any user supplied content.
The answer to the question is that to get a wildcard % to pass through prepare you need to double it in your code.
LIKE '_transient_wb_tt_%%'
Try that or this if you want a good look at the generated query:
var_dump($wpdb->prepare("
SELECT option_name
FROM %s
WHERE option_name
LIKE '_transient_wb_tt_%%'
",
'abc'));
die;
Other than being unnecessary, using $wpdb->prepare like this won't work. The attempt to use prepare to swap in the tablename will result in a tablename with quotes around it. That is invalid SQL. The query should be simple:
SELECT option_name
FROM {$wpdb->options}
WHERE option_name
LIKE '_transient_wb_tt_%%'
A: From Codex
$wild = '%';
$find = 'only 43% of planets';
$like = $wild . $wpdb->esc_like( $find ) . $wild;
$sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content LIKE %s", $like );
The essential part is -> "$like = $wild . $wpdb->esc_like( $find ) . $wild;"
|
wordpress
|
{
"language": "en",
"length": 219,
"provenance": "stackexchange_00019.jsonl.gz:428239",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83005"
}
|
[
0.021331787109375,
0.0023345947265625,
0.007793426513671875,
-0.0235595703125,
0.0203704833984375,
-0.015960693359375,
0.05419921875,
-0.0167694091796875,
0.01500701904296875,
0.03912353515625,
-0.02325439453125,
-0.0200347900390625,
-0.0526123046875,
-0.01036834716796875,
-0.059814453125,
-0.053192138671875,
0.023162841796875,
-0.0102386474609375,
0.01200103759765625,
-0.003276824951171875,
0.0128936767578125,
0.0165863037109375,
-0.0060577392578125,
-0.0128326416015625,
0.0743408203125,
-0.08380126953125,
0.058868408203125,
-0.0285797119140625,
0.08184814453125,
0.006103515625,
0.044342041015625,
-0.046539306640625,
0.0160675048828125,
0.0235748291015625,
-0.0100555419921875,
0.059783935546875,
0.07177734375,
-0.016357421875,
-0.01313018798828125,
0.07379150390625,
0.005046844482421875,
-0.000019729137420654297,
-0.01491546630859375,
0.007579803466796875,
-0.0249176025390625,
-0.0322265625,
0.01514434814453125,
-0.0247802734375,
0.01151275634765625,
0.006511688232421875,
0.0061492919921875,
0.0025424957275390625,
0.0034885406494140625,
0.001983642578125,
-0.01190185546875,
-0.01512908935546875,
-0.039093017578125,
0.009307861328125,
0.0025424957275390625,
0.0716552734375,
0.03729248046875,
0.03900146484375,
-0.0256805419921875,
-0.02593994140625,
-0.0035381317138671875,
-0.0110931396484375,
0.0762939453125,
0.0020580291748046875,
0.037109375,
-0.00962066650390625,
0.011016845703125,
0.0421142578125,
0.0091094970703125,
-0.0127716064453125,
-0.037841796875,
-0.00168609619140625,
0.021392822265625,
-0.0170440673828125,
0.008514404296875,
-0.01105499267578125,
0.0197906494140625,
-0.043853759765625,
-0.01222991943359375,
-0.0242767333984375,
0.059661865234375,
0.0269927978515625,
0.007686614990234375,
-0.0149078369140625,
-0.035736083984375,
-0.00940704345703125,
-0.01312255859375,
-0.036407470703125,
-0.04180908203125,
0.0167999267578125,
0.0163116455078125,
-0.0377197265625,
-0.0202178955078125,
0.0225067138671875,
0.0152435302734375,
0.022064208984375,
0.034027099609375,
-0.040435791015625,
0.006504058837890625,
-0.0413818359375,
0.02471923828125,
0.02752685546875,
0.0008878707885742188,
0.01396942138671875,
0.050201416015625,
0.01462554931640625,
0.005893707275390625,
0.04058837890625,
-0.02215576171875,
-0.034637451171875,
-0.0196533203125,
0.00421905517578125,
-0.044281005859375,
-0.01788330078125,
0.0118408203125,
-0.04833984375,
0.035003662109375,
0.04925537109375,
-0.07293701171875,
-0.035980224609375,
-0.0130157470703125,
-0.03948974609375,
-0.02398681640625,
0.027435302734375,
-0.0631103515625,
-0.0019435882568359375,
-0.0147857666015625,
0.0159149169921875,
0.058349609375,
0.050445556640625,
0.00954437255859375,
-0.0015850067138671875,
0.03826904296875,
-0.004344940185546875,
0.0221405029296875,
-0.0188751220703125,
0.0292205810546875,
-0.0029754638671875,
-0.0019855499267578125,
0.0171966552734375,
0.01934814453125,
0.0206756591796875,
0.0243377685546875,
0.00029778480529785156,
-0.0233154296875,
-0.020721435546875,
-0.0010890960693359375,
-0.0065155029296875,
0.0017404556274414062,
0.02362060546875,
-0.034088134765625,
-0.00363922119140625,
0.00949859619140625,
-0.025634765625,
-0.0237274169921875,
-0.034088134765625,
-0.02923583984375,
-0.03802490234375,
-0.0017795562744140625,
-0.017578125,
-0.00989532470703125,
0.048095703125,
-0.0264129638671875,
-0.0012025833129882812,
0.036163330078125,
0.07965087890625,
-0.0013132095336914062,
-0.010711669921875,
0.05584716796875,
0.038848876953125,
-0.007396697998046875,
0.01983642578125,
-0.041259765625,
-0.001979827880859375,
0.056060791015625,
-0.0625,
-0.04278564453125,
-0.0272979736328125,
0.050750732421875,
0.01073455810546875,
-0.046173095703125,
0.02764892578125,
0.0181427001953125,
0.045928955078125,
-0.0025310516357421875,
0.01467132568359375,
0.0413818359375,
0.0266571044921875,
-0.022918701171875,
0.0104217529296875,
0.0104217529296875,
-0.0303802490234375,
-0.01326751708984375,
-0.0182647705078125,
0.003238677978515625,
-0.00011295080184936523,
0.0260772705078125,
-0.006641387939453125,
0.004405975341796875,
-0.01561737060546875,
-0.035369873046875,
-0.0157318115234375,
-0.00916290283203125,
0.0243072509765625,
0.0207977294921875,
0.02716064453125,
0.005352020263671875,
0.0027027130126953125,
-0.04144287109375,
0.060089111328125,
-0.0186309814453125,
-0.03155517578125,
-0.0065460205078125,
0.045654296875,
0.0006346702575683594,
0.040924072265625,
0.0096435546875,
-0.033416748046875,
0.01372528076171875,
-0.00902557373046875,
0.0130615234375,
-0.036651611328125,
0.006927490234375,
-0.00732421875,
0.0263671875,
-0.004383087158203125,
-0.0037250518798828125,
-0.003208160400390625,
-0.0089874267578125,
-0.01727294921875,
-0.05755615234375,
0.01366424560546875,
-0.0236053466796875,
0.0006933212280273438,
-0.01212310791015625,
0.036163330078125,
0.041107177734375,
0.031707763671875,
-0.01560211181640625,
-0.01617431640625,
0.0477294921875,
-0.03289794921875,
0.00720977783203125,
-0.0289306640625,
0.019744873046875,
0.025238037109375,
-0.006938934326171875,
-0.00743865966796875,
0.01160430908203125,
0.00493621826171875,
0.0068817138671875,
0.0250244140625,
-0.0058746337890625,
-0.009307861328125,
0.039459228515625,
0.004909515380859375,
-0.007472991943359375,
0.0268707275390625,
0.018218994140625,
0.01123809814453125,
0.034881591796875,
0.024688720703125,
0.04058837890625,
0.035308837890625,
0.0195465087890625,
0.0237579345703125,
-0.03515625,
-0.07122802734375,
-0.011016845703125,
0.00206756591796875,
-0.0043182373046875,
0.01415252685546875,
-0.01139068603515625,
0.01462554931640625,
0.0008215904235839844,
0.00036835670471191406,
0.013702392578125,
0.083984375,
0.00997161865234375,
-0.02606201171875,
-0.03546142578125,
-0.0207061767578125,
-0.01617431640625,
-0.01534271240234375,
-0.00997161865234375,
-0.021240234375,
-0.010467529296875,
0.0623779296875,
-0.0017261505126953125,
0.037078857421875,
0.021148681640625,
-0.0006299018859863281,
0.06402587890625,
0.0012798309326171875,
-0.0123138427734375,
-0.00966644287109375,
0.032135009765625,
0.0438232421875,
0.0073699951171875,
-0.0369873046875,
0.007099151611328125,
0.02410888671875,
0.032196044921875,
-0.007568359375,
-0.01001739501953125,
-0.004886627197265625,
-0.038116455078125,
-0.0209808349609375,
0.03912353515625,
0.10443115234375,
-0.013427734375,
-0.039794921875,
0.0037364959716796875,
0.06378173828125,
-0.0101470947265625,
-0.04254150390625,
0.0322265625,
0.009033203125,
-0.00699615478515625,
-0.0201263427734375,
0.004730224609375,
-0.00797271728515625,
-0.03350830078125,
-0.012420654296875,
0.0167236328125,
-0.003520965576171875,
-0.034027099609375,
-0.042144775390625,
-0.0830078125,
-0.06622314453125,
-0.007045745849609375,
0.030487060546875,
0.0028095245361328125,
0.018218994140625,
0.006221771240234375,
-0.019378662109375,
0.01479339599609375,
0.00567626953125,
-0.00009340047836303711,
0.00659942626953125,
0.0099639892578125,
-0.029876708984375,
-0.017669677734375,
-0.01311492919921875,
0.06689453125,
0.025543212890625,
-0.022308349609375,
0.0270843505859375,
0.0236663818359375,
0.049102783203125,
0.0748291015625,
-0.054901123046875,
-0.059906005859375,
0.0748291015625,
0.0364990234375,
-0.004077911376953125,
0.0184783935546875,
-0.021636962890625,
-0.01049041748046875,
-0.0057525634765625,
-0.0182952880859375,
-0.0010223388671875,
-0.004486083984375,
0.00884246826171875,
0.019989013671875,
0.0270843505859375,
0.0017604827880859375,
-0.0152740478515625,
0.0178070068359375,
0.00013387203216552734,
0.015777587890625,
-0.0196380615234375,
0.017822265625,
-0.033660888671875,
0.052276611328125,
0.026275634765625,
-0.011962890625,
0.0191802978515625,
-0.033111572265625,
0.02880859375,
-0.09368896484375,
0.0528564453125,
-0.0498046875,
-0.047607421875,
-0.02850341796875,
-0.01178741455078125,
0.010711669921875,
0.08929443359375,
-0.045379638671875,
-0.026214599609375,
-0.03204345703125,
0.0156707763671875,
-0.048309326171875,
-0.029296875,
-0.00579833984375,
0.00872039794921875,
-0.09735107421875,
-0.01068115234375,
0.0016031265258789062,
-0.059906005859375,
0.0155029296875,
-0.0736083984375,
-0.047760009765625,
-0.055389404296875,
0.03338623046875,
-0.006603240966796875,
0.0139312744140625,
-0.01617431640625,
-0.0204620361328125,
-0.0231475830078125,
-0.01532745361328125,
-0.01215362548828125,
-0.07281494140625,
-0.0301971435546875,
0.016265869140625,
0.05523681640625,
0.003276824951171875,
-0.00864410400390625,
-0.01097869873046875,
0.056732177734375,
0.0186920166015625,
0.01065826416015625,
0.01727294921875,
-0.0036869049072265625,
0.0217437744140625,
-0.0024814605712890625,
0.016082763671875,
-0.02191162109375,
-0.00998687744140625,
-0.056396484375,
-0.036956787109375,
-0.0239715576171875,
-0.030548095703125,
0.0285491943359375,
-0.03363037109375,
-0.0074462890625,
0.00591278076171875,
0.00543212890625,
-0.00200653076171875,
0.04791259765625,
-0.05389404296875,
0.024261474609375,
-0.016510009765625,
-0.00524139404296875,
0.0579833984375,
0.01454925537109375,
0.031951904296875,
-0.006107330322265625,
0.054168701171875,
-0.0012483596801757812,
-0.047515869140625,
-0.006038665771484375,
-0.02886962890625,
0.0165557861328125,
0.0140228271484375,
0.01019287109375,
-0.0100860595703125,
-0.026824951171875,
0.0533447265625,
0.0189056396484375,
-0.0179290771484375,
-0.0254058837890625,
0.0338134765625,
0.005016326904296875,
-0.01255035400390625,
0.011688232421875,
-0.0143890380859375,
0.0430908203125,
0.052154541015625,
0.0172882080078125,
0.00988006591796875,
0.0080413818359375,
0.0156707763671875,
0.013824462890625,
-0.057708740234375,
-0.042724609375,
-0.045257568359375,
0.017242431640625,
-0.06439208984375,
0.04449462890625,
-0.0102386474609375,
0.0181732177734375,
0.01297760009765625,
0.0003993511199951172,
0.0068359375,
0.0123138427734375,
0.057403564453125,
0.0001615285873413086,
0.064453125,
-0.01287078857421875,
0.0004563331604003906,
-0.03997802734375,
-0.00921630859375,
0.0196990966796875,
-0.01453399658203125,
-0.037750244140625,
-0.017852783203125,
-0.0268707275390625,
0.053009033203125,
0.0026416778564453125,
0.006381988525390625,
-0.006954193115234375,
0.004024505615234375,
-0.00128173828125,
0.0158233642578125,
0.0053558349609375,
0.00791168212890625,
-0.00936126708984375,
0.039154052734375,
0.024932861328125,
-0.0124664306640625,
-0.0021514892578125,
0.046783447265625,
-0.001384735107421875,
0.0179290771484375,
-0.019073486328125,
0.0625,
0.033599853515625,
0.036285400390625,
-0.00665283203125,
-0.0286102294921875,
0.0250244140625,
-0.0006937980651855469,
-0.007343292236328125,
-0.050811767578125,
0.01214599609375,
0.0302581787109375,
0.05926513671875,
-0.013153076171875,
-0.047515869140625,
0.029937744140625,
-0.0283355712890625,
-0.029083251953125,
0.038360595703125,
0.0035152435302734375,
-0.0306549072265625,
-0.0599365234375,
-0.020263671875,
0.03997802734375,
0.02239990234375,
-0.013916015625,
0.0736083984375,
-0.002712249755859375,
0.05841064453125,
0.0208282470703125,
0.01434326171875,
-0.021728515625,
-0.02001953125,
-0.005306243896484375,
-0.0244293212890625,
-0.059417724609375,
0.00740814208984375,
-0.017181396484375,
0.0186767578125,
-0.0005216598510742188,
0.006603240966796875,
-0.005252838134765625,
-0.00016367435455322266,
-0.0274505615234375,
-0.0010852813720703125,
-0.02264404296875,
-0.01363372802734375,
0.0810546875,
0.027618408203125,
0.024658203125,
0.01232147216796875,
-0.029022216796875,
-0.03265380859375,
0.0155792236328125,
-0.0227203369140625,
-0.0108184814453125,
-0.0419921875,
-0.0072174072265625,
-0.00946807861328125,
0.02362060546875,
0.01242828369140625,
-0.007152557373046875,
0.0247955322265625,
0.001987457275390625,
-0.029998779296875,
-0.0209503173828125,
0.01222991943359375,
0.0254669189453125,
-0.0192108154296875,
0.01494598388671875,
0.023345947265625,
0.029052734375,
-0.032073974609375,
0.0190887451171875,
-0.008544921875,
-0.041900634765625,
-0.017974853515625,
-0.014984130859375,
-0.008270263671875,
0.046051025390625,
-0.0159149169921875,
0.058380126953125,
-0.018463134765625,
-0.0011930465698242188,
-0.002197265625,
-0.0352783203125,
-0.058441162109375,
-0.01568603515625,
0.03302001953125,
-0.04449462890625,
0.00777435302734375,
-0.029144287109375,
0.027984619140625,
0.00989532470703125,
-0.0577392578125,
0.004314422607421875,
0.0496826171875,
-0.057098388671875,
0.048370361328125,
0.07452392578125,
0.0533447265625,
0.051239013671875,
-0.012298583984375,
0.0216217041015625,
-0.015960693359375,
0.0306396484375,
-0.00923919677734375,
0.0025196075439453125,
0.061279296875,
0.01447296142578125,
-0.0235137939453125,
0.0300445556640625,
-0.027435302734375,
0.02392578125,
0.07269287109375,
0.0830078125,
-0.052398681640625,
-0.025421142578125,
0.01470184326171875,
-0.0721435546875,
-0.0007081031799316406,
0.0310211181640625,
-0.007190704345703125,
-0.0230712890625,
-0.050689697265625,
-0.008026123046875,
-0.025634765625,
-0.02825927734375,
0.0128021240234375,
-0.007740020751953125,
-0.0281982421875,
-0.010772705078125,
-0.0162200927734375,
-0.01079559326171875,
0.0026035308837890625,
0.006397247314453125,
-0.0028285980224609375,
0.0082244873046875,
0.01372528076171875,
0.0000324249267578125,
-0.0082550048828125,
-0.031585693359375,
-0.0009593963623046875,
-0.034637451171875,
-0.0343017578125,
0.0041046142578125,
0.05084228515625,
0.0265045166015625,
0.023040771484375,
0.0234222412109375,
-0.0075531005859375,
-0.0102386474609375,
0.032867431640625,
0.01678466796875,
-0.01163482666015625,
-0.034088134765625,
0.05902099609375,
-0.0214385986328125,
0.015716552734375,
-0.0017156600952148438,
0.0306854248046875,
-0.0182647705078125,
-0.067626953125,
0.04852294921875,
-0.038909912109375,
0.0200958251953125,
0.032318115234375,
0.0251617431640625,
-0.0100860595703125,
0.020751953125,
-0.04443359375,
-0.0391845703125,
-0.042816162109375,
-0.01983642578125,
-0.0740966796875,
0.0144195556640625,
-0.0101318359375,
-0.04998779296875,
0.052154541015625,
0.0238494873046875,
0.00904083251953125,
0.037628173828125,
0.006114959716796875,
-0.06610107421875,
-0.031768798828125,
-0.06292724609375,
0.034393310546875,
0.005840301513671875,
0.06817626953125,
-0.038330078125,
0.0054779052734375,
0.0291290283203125,
0.00701904296875,
-0.008026123046875,
-0.00804901123046875,
-0.0323486328125,
0.0012950897216796875,
0.042327880859375,
0.0171051025390625,
0.0090484619140625,
0.038055419921875,
0.003719329833984375,
0.044586181640625,
0.07666015625,
-0.04034423828125,
0.0280914306640625,
-0.0110626220703125,
0.01788330078125,
0.01482391357421875,
0.02520751953125,
0.037322998046875,
-0.039764404296875,
0.042755126953125,
-0.0038204193115234375,
-0.032135009765625,
0.024017333984375,
-0.04058837890625,
0.0107879638671875,
0.0211181640625,
0.014984130859375,
-0.0073394775390625,
-0.03399658203125,
-0.0069427490234375,
0.0239410400390625,
0.021820068359375,
-0.01200103759765625,
0.038116455078125,
0.007648468017578125,
0.00695037841796875,
0.0037326812744140625,
-0.012237548828125,
-0.0111846923828125,
0.04046630859375,
0.037811279296875,
0.03375244140625,
0.024871826171875,
-0.0037841796875,
0.0247039794921875,
0.0224761962890625,
0.0419921875,
-0.041046142578125,
-0.039154052734375,
0.01457977294921875,
0.002742767333984375,
-0.008453369140625,
-0.0030918121337890625,
-0.0123443603515625,
0.0157623291015625,
0.0266876220703125,
0.01377105712890625,
0.0209503173828125,
0.00994110107421875,
-0.0201416015625,
0.007678985595703125,
0.0367431640625,
-0.05438232421875,
0.044464111328125,
0.01436614990234375,
-0.02288818359375,
0.043731689453125,
0.06298828125,
-0.0164642333984375,
0.06732177734375,
-0.06622314453125,
-0.0228729248046875,
-0.02435302734375,
0.04779052734375,
-0.00885009765625,
0.03729248046875,
-0.052642822265625,
-0.0305328369140625,
-0.004909515380859375,
0.03924560546875,
-0.0079803466796875,
0.0208587646484375,
0.02777099609375,
0.006206512451171875,
-0.0283660888671875,
-0.00339508056640625,
0.01251220703125,
-0.0382080078125,
0.007205963134765625,
-0.0291900634765625,
0.015838623046875,
0.0035152435302734375,
0.0135498046875,
-0.0217132568359375,
0.043853759765625,
0.0156707763671875,
-0.0220947265625,
0.07733154296875,
-0.0159149169921875,
-0.0003135204315185547,
0.003986358642578125,
-0.0194091796875,
0.048828125,
0.005222320556640625,
-0.0280303955078125,
-0.007129669189453125,
-0.022247314453125,
-0.01068878173828125,
-0.0062713623046875,
0.0299530029296875,
0.0286865234375,
0.01293182373046875,
-0.055511474609375,
0.0095367431640625,
-0.007587432861328125,
0.01308441162109375,
-0.0308074951171875,
0.00498199462890625,
0.03717041015625,
-0.0217132568359375,
0.002574920654296875,
-0.0040130615234375,
0.0283660888671875,
0.034332275390625,
-0.0311126708984375,
0.0833740234375,
-0.056549072265625,
0.01169586181640625,
-0.0101470947265625,
0.0169677734375,
-0.0187835693359375,
0.0005846023559570312,
0.0275421142578125,
-0.01297760009765625,
-0.00833892822265625,
-0.0146026611328125,
0.0513916015625,
0.00772857666015625,
0.02862548828125,
-0.03399658203125,
-0.0230865478515625,
-0.01214599609375,
0.0297088623046875,
-0.0003426074981689453,
0.0160369873046875,
-0.0084686279296875,
-0.0034770965576171875,
0.0294036865234375,
0.0040283203125,
0.025238037109375,
0.05902099609375,
0.0264434814453125,
0.01175689697265625,
0.02801513671875,
0.00859832763671875,
0.019256591796875,
0.00980377197265625,
0.056915283203125,
0.038360595703125,
-0.01511383056640625,
-0.01116943359375,
-0.0008831024169921875,
-0.017822265625,
0.00455474853515625,
0.0207672119140625,
0.01849365234375,
0.0018854141235351562,
0.03094482421875,
-0.018798828125,
0.0120391845703125,
0.033660888671875,
0.007404327392578125,
0.01404571533203125,
-0.006591796875,
-0.002132415771484375,
-0.002391815185546875,
0.0146331787109375,
-0.00655364990234375,
0.01019287109375,
-0.0253753662109375,
0.0008387565612792969,
0.01971435546875,
0.00201416015625,
-0.0196380615234375,
-0.003692626953125,
-0.0120391845703125,
-0.0006685256958007812,
-0.013519287109375,
-0.006439208984375,
0.005950927734375,
0.014862060546875,
-0.0092315673828125,
-0.0271759033203125,
0.021331787109375,
0.056121826171875,
-0.01276397705078125,
-0.0428466796875,
-0.00824737548828125,
0.0169677734375,
-0.034698486328125,
-0.014892578125,
0.035400390625,
0.007843017578125,
-0.0352783203125,
-0.0111541748046875,
-0.01953125,
0.0156707763671875,
-0.0657958984375,
-0.0169525146484375,
0.0396728515625,
0.004276275634765625,
-0.06475830078125,
-0.0950927734375,
0.01416015625,
-0.06890869140625,
0.0162200927734375,
0.0135345458984375,
0.005931854248046875,
0.01297760009765625,
-0.042755126953125,
-0.08807373046875,
0.09820556640625,
-0.01611328125,
-0.0202789306640625,
-0.044219970703125,
0.0055084228515625,
-0.004398345947265625,
0.035888671875,
-0.020599365234375,
-0.0015230178833007812,
-0.0269622802734375,
0.0251007080078125,
0.00807952880859375,
0.049896240234375,
-0.007511138916015625,
-0.01215362548828125,
-0.04669189453125,
0.00472259521484375,
-0.007617950439453125,
0.035736083984375,
-0.03729248046875,
0.0170745849609375,
0.010589599609375,
0.039642333984375,
0.01806640625,
-0.003482818603515625,
0.03314208984375,
-0.05364990234375,
0.0048980712890625,
0.0020427703857421875,
-0.04327392578125,
0.01190185546875,
0.0037517547607421875,
0.10321044921875,
0.01580810546875,
-0.044219970703125,
-0.028106689453125,
-0.0236053466796875,
0.0108795166015625,
0.0038013458251953125,
0.01242828369140625,
-0.034820556640625,
0.00882720947265625,
-0.00026226043701171875,
-0.0031681060791015625,
-0.017578125,
0.0269927978515625,
-0.0180511474609375,
-0.01424407958984375,
0.032684326171875,
-0.0216827392578125,
0.005924224853515625,
-0.002048492431640625,
0.034088134765625,
-0.0452880859375,
-0.08087158203125,
0.001171112060546875,
0.0280609130859375,
-0.047332763671875,
-0.05859375,
-0.048492431640625,
-0.051544189453125,
0.04345703125,
0.0282745361328125,
-0.01372528076171875,
0.042694091796875,
0.004299163818359375,
0.01212310791015625,
-0.03521728515625,
-0.004795074462890625,
0.0146484375,
-0.0207366943359375,
-0.00893402099609375,
0.0052032470703125,
0.0133819580078125,
0.0194549560546875,
-0.0035076141357421875,
0.030548095703125,
-0.010009765625,
0.04656982421875,
0.02850341796875,
-0.03533935546875,
0.0733642578125,
-0.043304443359375,
-0.01464080810546875,
0.00920867919921875,
-0.0494384765625,
-0.040679931640625,
-0.006191253662109375,
-0.058807373046875,
-0.005290985107421875,
0.01038360595703125
] |
2cf1e9ee5f714029975f9a741d07dbe4f2266ffb
|
Wordpress Stackexchange
Q: Is Git/GitHub a good WordPress deployment solution? I'm currently developing my WordPress locally, committing my code to GitHub with Git and then SSHing into my server and doing a "git pull" to update my code. Is this a good option for code deployment onto a WordPress site (I obviously have root level access to my server in this case.) I know of things like Capistrano, but would that be overkill for deployment to a WordPress site? How can I make the most of Git/GitHub in this case?
A: I actually did a WordCamp presentation on this topic. Rather than repeat myself, here's a screencast of it and here's a very simple deployment script to accompany what I discussed.
In short, I use GitHub to host the repo, and use a webhook to deploy changes based on the git ref. This allows you to use Vincent Driessen's git branching model and opens you up to having unlimited webheads, staging servers, testing servers, etc., all with automated deployment. I also cover keeping wp-config.php under version control while maintaining separate dev/production versions (by renaming the files and symlinking).
|
Q: Is Git/GitHub a good WordPress deployment solution? I'm currently developing my WordPress locally, committing my code to GitHub with Git and then SSHing into my server and doing a "git pull" to update my code. Is this a good option for code deployment onto a WordPress site (I obviously have root level access to my server in this case.) I know of things like Capistrano, but would that be overkill for deployment to a WordPress site? How can I make the most of Git/GitHub in this case?
A: I actually did a WordCamp presentation on this topic. Rather than repeat myself, here's a screencast of it and here's a very simple deployment script to accompany what I discussed.
In short, I use GitHub to host the repo, and use a webhook to deploy changes based on the git ref. This allows you to use Vincent Driessen's git branching model and opens you up to having unlimited webheads, staging servers, testing servers, etc., all with automated deployment. I also cover keeping wp-config.php under version control while maintaining separate dev/production versions (by renaming the files and symlinking).
A: I use git for this and find it works really well. A few suggestions:
*
*Add your uploads directory (wp-content/uploads) directory to your .gitignore file.
*Run a web server and database server on your development system so you can test changes locally before pushing them to production.
*Keep your database connection settings consistent beween dev and prod, or add wp-config.php to your .gitignore file to prevent your development wordpress settings overwriting your production ones.
*Avoid updating plugins on your production system using the admin interface of Wordpress - as at best, your git copy will overwrite any plugins you update as soon as you push/checkout, at worst you'll get conflicts. Do your updates using the the admin interface on your development system, commit, push and checkout in production.
*Consider adding a git post-receive hook to checkout your updates automatically into the directory you use to publish wordpress via your web server (e.g. /var/www). This allows you to only check out the files themselves, avoiding any git metadata finding it's way into your web server's document root, and also means you can add any permission changes into the post-receive hook so your permissions stay consistent every time. An example is included below:
#!/bin/sh
unset GIT_INDEX_FILE
# the directory your web server serves wordpress from
export GIT_WORK_TREE=/var/www/example.com/
# the local directory where your remote git repository sites
export GIT_DIR=/home/git/repos/example.com.git/
# below user is for debain - you want the user and group your webserver uses
sudo git checkout -f
sudo chown -R www-data:www-data $GIT_WORK_TREE
sudo chmod -R 755 $GIT_WORK_TREE
sudo chmod 600 $GIT_WORK_TREE/wp-config.php
sudo chmod -R 775 $GIT_WORK_TREE/wp-content
A: I know this question is a little older however as I've not seen this as answer here, I'd like to share what I normally do for single-site git based setups and deployments and it's working really well, also with working from multiple devices, locations and with multiple developers (all having their own local repos they operate in as it is common for git).
I can warm-heartedly suggest the following setup:
*
*A web-focused Git workflow (by Joe Maller; Nov 2008)
It is also outlined in (if you need a second resource to wrap your head around it):
*
*Using Git for Deployment (by Dan Barber; Apr 2011)
It basically works (with at least three repos) by:
*
*putting the website on the live-host under git,
*create a new bare git repository on the live host.
*And then fork from the bare repository to your local development git repo(s).
When the work is done you push against the remote bare repo you've cloned from. The bare repo has hooks to sync with the live repo (in the codes above called prime).
As Wordpress specific settings in the repo I have this .gitignore:
# uploads are data, excluded from source tree
wp-content/uploads/
The rest incl. the plugin and theme configuration I keep under version/configuration control. This allows me to easily track changes and review code before using it live. I can also more easily merge against remote trees with my own changes. That is especially useful against the Wordpress core which is available on Github.
This works pretty well for most of my Wordpress needs. The bare repo prevents you from pushing conflicting changes. It also syncs to a remote copy first before updating the live-site. That means, updating the live-site is normally pretty fast. Because of the hooks you can even call Wordpress update hooks afterwards if you like.
If have not experimented how much this can be improved with Github hooks, but I normally do not need them as the code is under local version control, not Github.
To set such a system up for the first time, you should take some time to evaluate if you've got all the tools available on your remote host:
*
*SSH access
*GIT
*A private directory you can put files and sub-directories in (e.g. for your bare git repo)
The setup-time for the first time should be possible within one two hours incl. the whole environment and you first publish push.
Depending on your host, you might also want to shield the .git directory from web-access. Here is some example .htaccess code that even does so having Wordpress placed inside a sub-directory, which leaves space in the repo not published online (useful):
Options -Indexes
# fix trailing slash for .git / make it disappear + .gitignore and similar files.
RedirectMatch 404 ^/\.git(.*)$
# mask 403 on .ht* as 404
<Files ~ "^\.ht">
Order Deny,Allow
Allow from all
Satisfy All
Redirect 404 /
</Files>
RewriteEngine On
RewriteBase /
# map everything into public and set environment var
# to tag the request being valid
RewriteCond %{ENV:REDIRECT_sitealias} !set
RewriteRule ^(.*)$ /public/$1 [E=sitealias:set,L]
In short, everything not inside the public directory is not online. Inside the public directory can be the wordpress codebase for example, for the .htaccess there you need then:
RewriteEngine On
# mask as 404 if directly accessed
RewriteCond %{ENV:REDIRECT_sitealias} !set
RewriteRule .* - [L,R=404]
This prevents direct access to public. Part of this .htaccess-foo you can find outlined here: Requests to .htaccess should return 404 instead of 403. For the environment variables you need to test if that works in your environment. Also you need to decide if you put that under version control or not.
If you have more control on the hosting, you can do more stuff here (and differently / more optimized), the examples above are targeted for typical shared-hosting environments (that offer GIT, some users say you can easily install it your own as well, I normally ask my hosters to provide such because I prefer if they take care that's what I pay them for).
On the negative side, this has some of the common problems also outlined in the other answers. One thing I'm not proud of but what works is to give the development host a change to it's host file to have the database server point to the development copy. So you can keep one database configuration. Not really cool esp. because of the credentials.
Automatic Backups
However I normally don't care much here but instead have daily backups run on the remote systems which are incrementally which themselves are stored in another remote location then. That's easy and cheap and allows you to restore both the Wordpress install as well as the file-uploads, the database and the git repo. Also for my backup commands I might not be perfectly alright, but those work for me:
mysql: mysqldump --host=%s -u %s --password=%s %s| gzip > %s
git : git gc
git bundle
files: tar --force-local -czf %s %s
What I do suggest here is that you keep the processes around your Wordpress installation out of Wordpress. They need to run on a specific system, so you normally do not have them inside the application (e.g. application can go down but you need to have these continue to work).
Enabled for Teamwork
Another nice benefit is that you site is enabled for team-work already. Thanks to the additional bare repo you can't do much wrong and you can even share remote branches apart from a master or live branch with your colleagues.
A: I would highly recommend setting up Capistrano - it's a little bit of upfront work the first time, but after that you can easily use it for new setups.
The main advantages are
*
*being able to deploy from your desktop. It may not sound like much, but ssh-ing into the your remote server, and doing a git pull is still a pain in the ass.
*easy rollback to a previous version if you need to
*able to do cool things like setup deployment to staging/production environments.
I'm adding a set of capistrano scripts to show you how I set things up.
Capfile
require 'railsless-deploy'
load 'config/deploy'`
deploy.rb
set :stages, %w(production staging local)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
set :application, "" # your application name - used to set directory name
set :scm, :git
set :repository, "" # use the ssh repo access line you get from the provider eg [email protected]:name/repo.git
set :deploy_to, "/var/www/#{application}" #this is the root site folder on the remote server
set :deploy_via, :remote_cache # get directly from repo
set :copy_exclude, [".git", ".DS_Store", ".gitignore", ".gitmodules", "wp-config.php"]
# makes capistrano ask for sudo password or other remote inputs
default_run_options[:pty] = true
namespace :tasks do
task :fix_links do
run "ln -nfs #{shared_path}/uploads #{release_path}/wp-content/uploads"
run "ln -nfs #{shared_path}/wp-config.php #{release_path}/wp-config.php"
run "ln -nfs #{shared_path}/blogs.dir #{release_path}/wp-content/blogs.dir"
run "ln -nfs #{shared_path}/.htaccess #{release_path}/.htaccess"
run "sudo chown -R www-data.www-data #{release_path}/"
end
end
after "deploy", "tasks:fix_links"
and finally, a sample environment file (if you use the multistage gem, then you can have one of these for each stage of your environment, eg local, staging, production)
config/local.rb
server "", :app #hostname
set :branch, 'develop' #choose branch to deploy
set :use_sudo, false #don't use sudo
set :deploy_to, "/var/www/#{application}" #overwrite default path to deploy to
These files might not work without tweaking, and you'll need some basic Capistrano knowledge, but hopefully will help some people.
This was the first tutorial I used that got me going with Capistrano and WordPress: http://theme.fm/2011/08/tutorial-deploying-wordpress-with-capistrano-2082/
|
wordpress
|
{
"language": "en",
"length": 1704,
"provenance": "stackexchange_00019.jsonl.gz:428248",
"question_score": "69",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83046"
}
|
[
0.00020015239715576172,
-0.00516510009765625,
-0.01611328125,
-0.01479339599609375,
-0.006282806396484375,
-0.0160675048828125,
-0.0010156631469726562,
-0.01323699951171875,
0.015411376953125,
0.0139312744140625,
-0.017364501953125,
0.01537322998046875,
-0.034942626953125,
-0.0184478759765625,
-0.012115478515625,
-0.0182952880859375,
0.0294952392578125,
-0.0252532958984375,
0.0063323974609375,
-0.018341064453125,
-0.007843017578125,
-0.00875091552734375,
0.05303955078125,
0.04180908203125,
0.03485107421875,
-0.01253509521484375,
0.0094146728515625,
-0.0160064697265625,
0.01375579833984375,
-0.0015573501586914062,
0.019287109375,
-0.0305938720703125,
0.035247802734375,
-0.001312255859375,
-0.012542724609375,
-0.0218963623046875,
0.032073974609375,
-0.019317626953125,
-0.027313232421875,
0.05352783203125,
0.006717681884765625,
0.014801025390625,
0.0821533203125,
-0.020111083984375,
0.022674560546875,
-0.0182342529296875,
0.00901031494140625,
-0.052642822265625,
0.0087432861328125,
-0.0175018310546875,
0.01194000244140625,
0.0208740234375,
0.013641357421875,
0.01427459716796875,
0.00576019287109375,
0.034088134765625,
0.006725311279296875,
-0.022491455078125,
0.0258636474609375,
-0.02899169921875,
-0.032073974609375,
-0.00717926025390625,
0.0300750732421875,
0.00968170166015625,
-0.004482269287109375,
-0.003612518310546875,
-0.031158447265625,
0.0298309326171875,
-0.07757568359375,
-0.0169219970703125,
0.0401611328125,
-0.05804443359375,
-0.0233612060546875,
-0.0112152099609375,
-0.0017480850219726562,
0.018218994140625,
0.02398681640625,
0.01282501220703125,
-0.0053558349609375,
0.0188446044921875,
0.00287628173828125,
-0.01104736328125,
-0.01258087158203125,
-0.07330322265625,
0.020843505859375,
-0.045196533203125,
-0.0001550912857055664,
0.0110931396484375,
-0.04254150390625,
-0.0268096923828125,
-0.0160064697265625,
-0.0157318115234375,
-0.0982666015625,
0.0239105224609375,
0.017791748046875,
-0.008056640625,
-0.010101318359375,
-0.00814056396484375,
-0.026702880859375,
0.016845703125,
0.032958984375,
-0.043365478515625,
0.07208251953125,
-0.0222930908203125,
-0.018402099609375,
0.07183837890625,
0.0011653900146484375,
-0.0113525390625,
-0.01177978515625,
-0.005817413330078125,
-0.0020542144775390625,
-0.06719970703125,
-0.039337158203125,
-0.05731201171875,
0.032257080078125,
0.053558349609375,
-0.03961181640625,
0.046417236328125,
0.0067291259765625,
0.0235748291015625,
0.00048613548278808594,
0.0229644775390625,
-0.005367279052734375,
0.007049560546875,
-0.0005083084106445312,
0.016204833984375,
0.0171051025390625,
-0.0421142578125,
-0.0416259765625,
0.0099945068359375,
-0.0166473388671875,
0.0372314453125,
0.033203125,
0.010772705078125,
-0.026153564453125,
-0.0018625259399414062,
0.0178680419921875,
0.01552581787109375,
0.00942230224609375,
0.02349853515625,
-0.03448486328125,
-0.006572723388671875,
0.05438232421875,
-0.0246734619140625,
0.0115966796875,
0.0199737548828125,
0.0170135498046875,
0.0086212158203125,
0.006732940673828125,
-0.006595611572265625,
-0.004184722900390625,
-0.0266571044921875,
0.01544189453125,
0.00632476806640625,
0.047119140625,
-0.0258331298828125,
0.0552978515625,
-0.051544189453125,
0.00476837158203125,
-0.024688720703125,
-0.0175628662109375,
-0.0128021240234375,
0.0487060546875,
-0.0300140380859375,
-0.032989501953125,
0.02880859375,
-0.057769775390625,
-0.0113067626953125,
0.02960205078125,
-0.0458984375,
0.00815582275390625,
-0.0236968994140625,
0.0670166015625,
0.011383056640625,
0.0010395050048828125,
0.046661376953125,
0.04168701171875,
0.023529052734375,
0.019927978515625,
0.006671905517578125,
-0.0164031982421875,
-0.0230560302734375,
0.0948486328125,
-0.05438232421875,
-0.008941650390625,
0.000004231929779052734,
0.022064208984375,
0.04150390625,
-0.000058531761169433594,
0.038360595703125,
-0.000545501708984375,
0.006282806396484375,
-0.042083740234375,
0.06304931640625,
-0.0004954338073730469,
-0.0222625732421875,
0.00867462158203125,
0.0097198486328125,
-0.003475189208984375,
-0.0404052734375,
-0.0192108154296875,
0.0019054412841796875,
0.0166168212890625,
0.0121612548828125,
0.0130767822265625,
0.00738525390625,
-0.00856781005859375,
0.01373291015625,
-0.0088653564453125,
-0.0129852294921875,
-0.0013628005981445312,
-0.024749755859375,
0.0108795166015625,
-0.033355712890625,
-0.03546142578125,
0.0198974609375,
-0.014251708984375,
0.0491943359375,
-0.01873779296875,
0.02813720703125,
-0.0244140625,
-0.0244598388671875,
-0.0219268798828125,
0.011016845703125,
0.008575439453125,
-0.0044097900390625,
-0.005405426025390625,
-0.00948333740234375,
-0.01082611083984375,
0.018310546875,
-0.032989501953125,
0.0266571044921875,
-0.027923583984375,
-0.003444671630859375,
-0.0223236083984375,
0.01490020751953125,
-0.0002486705780029297,
-0.01227569580078125,
0.0190277099609375,
0.0181121826171875,
0.026763916015625,
0.01319122314453125,
-0.02020263671875,
-0.027801513671875,
0.061004638671875,
-0.0127105712890625,
0.01108551025390625,
-0.027862548828125,
0.0026721954345703125,
0.047821044921875,
0.015350341796875,
-0.0035610198974609375,
-0.002117156982421875,
-0.032928466796875,
-0.0179290771484375,
0.02545166015625,
-0.028594970703125,
-0.00787353515625,
0.005062103271484375,
-0.046112060546875,
0.02227783203125,
-0.072998046875,
-0.047393798828125,
-0.0220947265625,
-0.017303466796875,
-0.002750396728515625,
0.023101806640625,
0.0241851806640625,
0.019439697265625,
-0.0240631103515625,
-0.0005636215209960938,
-0.0180511474609375,
0.016571044921875,
0.048248291015625,
0.043212890625,
0.052032470703125,
-0.00722503662109375,
-0.05108642578125,
0.0231170654296875,
0.059417724609375,
-0.0205841064453125,
0.020660400390625,
0.03521728515625,
-0.01160430908203125,
-0.000055730342864990234,
0.028289794921875,
0.0285491943359375,
-0.034149169921875,
-0.0242156982421875,
0.011993408203125,
0.0252685546875,
0.0400390625,
0.00983428955078125,
0.0039215087890625,
0.0160675048828125,
0.02130126953125,
0.0755615234375,
0.004207611083984375,
-0.003063201904296875,
0.0028896331787109375,
0.04058837890625,
0.0241241455078125,
0.0121002197265625,
-0.04168701171875,
-0.005573272705078125,
-0.005054473876953125,
0.00269317626953125,
0.01538848876953125,
-0.01158905029296875,
-0.023895263671875,
-0.05615234375,
-0.025115966796875,
0.0079498291015625,
0.0419921875,
-0.0202484130859375,
-0.05487060546875,
-0.0015964508056640625,
0.0077056884765625,
-0.061553955078125,
-0.041778564453125,
-0.0007495880126953125,
-0.058258056640625,
0.0560302734375,
0.0192108154296875,
-0.00567626953125,
-0.04644775390625,
0.06463623046875,
0.0174560546875,
-0.042938232421875,
-0.0242767333984375,
-0.04754638671875,
-0.072021484375,
-0.08905029296875,
0.00954437255859375,
0.00460052490234375,
0.03582763671875,
0.016845703125,
0.0014886856079101562,
0.00164031982421875,
-0.035736083984375,
0.025726318359375,
0.0343017578125,
-0.0012903213500976562,
0.000682830810546875,
0.01800537109375,
-0.040191650390625,
0.03692626953125,
0.004352569580078125,
0.03753662109375,
0.01177215576171875,
-0.0007314682006835938,
-0.02606201171875,
-0.0120086669921875,
-0.03497314453125,
-0.011474609375,
-0.0014972686767578125,
0.006656646728515625,
-0.045928955078125,
-0.019927978515625,
-0.07568359375,
0.01496124267578125,
0.026947021484375,
0.0181427001953125,
-0.0301361083984375,
-0.02581787109375,
-0.039825439453125,
-0.0191802978515625,
0.00897216796875,
0.0168914794921875,
0.0272369384765625,
0.03924560546875,
0.0248870849609375,
-0.01468658447265625,
-0.035919189453125,
-0.033111572265625,
-0.050537109375,
0.002079010009765625,
-0.028411865234375,
-0.0041046142578125,
-0.02191162109375,
0.004001617431640625,
-0.0367431640625,
0.039581298828125,
-0.056671142578125,
-0.03607177734375,
0.039886474609375,
0.02618408203125,
0.029815673828125,
-0.005222320556640625,
-0.02947998046875,
0.016357421875,
0.1044921875,
-0.034881591796875,
-0.004608154296875,
0.02264404296875,
0.0189056396484375,
-0.0516357421875,
-0.034515380859375,
-0.06634521484375,
0.005458831787109375,
-0.03314208984375,
0.020477294921875,
-0.0188140869140625,
-0.0002467632293701172,
-0.00262451171875,
-0.01202392578125,
0.0050048828125,
-0.036407470703125,
0.025390625,
0.00506591796875,
0.032958984375,
-0.018310546875,
0.0240478515625,
-0.040802001953125,
0.00927734375,
-0.0318603515625,
-0.0313720703125,
-0.007781982421875,
0.02587890625,
0.0150299072265625,
-0.0240631103515625,
-0.007427215576171875,
-0.032501220703125,
0.0035266876220703125,
-0.0026378631591796875,
0.03875732421875,
-0.003437042236328125,
0.00946044921875,
-0.0229644775390625,
0.0052490234375,
0.0189056396484375,
-0.026458740234375,
-0.0020046234130859375,
-0.0105743408203125,
-0.052337646484375,
-0.00466156005859375,
-0.0255584716796875,
0.0128631591796875,
0.0028095245361328125,
-0.0225830078125,
-0.047027587890625,
-0.024566650390625,
0.0002627372741699219,
-0.004070281982421875,
-0.0386962890625,
0.01462554931640625,
-0.01187896728515625,
-0.04937744140625,
0.072509765625,
0.01415252685546875,
0.01140594482421875,
-0.006175994873046875,
0.0767822265625,
0.00518798828125,
-0.043060302734375,
-0.0225982666015625,
0.01293182373046875,
0.031585693359375,
0.006397247314453125,
0.0128936767578125,
0.0167999267578125,
-0.00901031494140625,
0.0006198883056640625,
0.006572723388671875,
-0.0157928466796875,
0.032867431640625,
-0.03277587890625,
0.040496826171875,
-0.0089111328125,
-0.006374359130859375,
0.043487548828125,
-0.005374908447265625,
0.030914306640625,
-0.0083770751953125,
-0.025604248046875,
0.0209808349609375,
0.019744873046875,
-0.0281524658203125,
0.026458740234375,
-0.020111083984375,
-0.05950927734375,
0.029510498046875,
-0.0948486328125,
0.059356689453125,
0.0024166107177734375,
0.00015091896057128906,
0.053466796875,
0.0274810791015625,
-0.0064239501953125,
-0.0169830322265625,
-0.035797119140625,
-0.000934600830078125,
0.01322174072265625,
-0.0035457611083984375,
-0.004817962646484375,
-0.003421783447265625,
-0.0131988525390625,
0.102783203125,
0.0244140625,
-0.0228729248046875,
-0.0154571533203125,
-0.010467529296875,
0.0297088623046875,
-0.0006389617919921875,
0.007518768310546875,
0.061676025390625,
-0.0114593505859375,
-0.0361328125,
-0.009063720703125,
-0.040771484375,
-0.054840087890625,
-0.06500244140625,
-0.00640106201171875,
0.0023097991943359375,
-0.0205841064453125,
0.025909423828125,
-0.01401519775390625,
0.014617919921875,
-0.01320648193359375,
-0.01617431640625,
0.07464599609375,
0.0849609375,
-0.046539306640625,
0.004261016845703125,
0.027984619140625,
0.0233612060546875,
-0.0819091796875,
0.0030059814453125,
-0.045623779296875,
-0.0142669677734375,
-0.0025310516357421875,
0.035797119140625,
-0.02532958984375,
-0.0253143310546875,
0.0516357421875,
-0.0008831024169921875,
-0.0080108642578125,
0.01543426513671875,
-0.0107879638671875,
-0.0164337158203125,
-0.02032470703125,
-0.00801849365234375,
0.03265380859375,
-0.007694244384765625,
-0.01261138916015625,
0.01155853271484375,
-0.0195159912109375,
0.0124969482421875,
-0.0220489501953125,
-0.0152130126953125,
-0.00734710693359375,
-0.0114593505859375,
-0.0162506103515625,
-0.0194244384765625,
-0.01165008544921875,
-0.004886627197265625,
-0.022430419921875,
0.00020051002502441406,
-0.01488494873046875,
0.02630615234375,
-0.03448486328125,
-0.01446533203125,
-0.03582763671875,
0.0136566162109375,
-0.08251953125,
0.0023899078369140625,
0.049041748046875,
0.048553466796875,
-0.060577392578125,
0.0005407333374023438,
-0.0307464599609375,
-0.01068115234375,
0.00392913818359375,
-0.035858154296875,
-0.03948974609375,
-0.0225372314453125,
0.00600433349609375,
-0.00885009765625,
-0.0034351348876953125,
-0.0029239654541015625,
-0.0288238525390625,
0.052398681640625,
0.0234527587890625,
0.0242462158203125,
0.0236053466796875,
-0.01221466064453125,
-0.009490966796875,
0.033447265625,
0.018310546875,
-0.01274871826171875,
-0.01422882080078125,
-0.036224365234375,
0.0355224609375,
-0.0166778564453125,
-0.02679443359375,
-0.0438232421875,
0.011871337890625,
-0.03271484375,
-0.011993408203125,
-0.0198211669921875,
0.02789306640625,
-0.01140594482421875,
-0.005695343017578125,
-0.01218414306640625,
0.01308441162109375,
0.0039005279541015625,
-0.0015621185302734375,
0.0399169921875,
0.011444091796875,
0.045013427734375,
-0.013946533203125,
-0.0257415771484375,
-0.004924774169921875,
0.0013828277587890625,
0.002895355224609375,
0.0081329345703125,
-0.00494384765625,
0.05474853515625,
0.09429931640625,
-0.008148193359375,
0.04644775390625,
0.0279693603515625,
-0.001094818115234375,
0.01412200927734375,
0.0548095703125,
-0.06829833984375,
-0.050079345703125,
-0.009063720703125,
0.0090179443359375,
-0.04998779296875,
-0.030670166015625,
-0.029449462890625,
0.0221710205078125,
0.037628173828125,
0.046875,
-0.056884765625,
0.004688262939453125,
-0.00007009506225585938,
-0.041351318359375,
-0.0020732879638671875,
0.0128936767578125,
-0.047760009765625,
-0.039337158203125,
-0.0200958251953125,
-0.035247802734375,
-0.041717529296875,
-0.02520751953125,
0.020416259765625,
-0.0207061767578125,
-0.007015228271484375,
0.01059722900390625,
0.0343017578125,
-0.032562255859375,
0.0438232421875,
0.0178680419921875,
0.035003662109375,
-0.028228759765625,
-0.01296234130859375,
0.01214599609375,
-0.008453369140625,
-0.031005859375,
0.03466796875,
-0.0295562744140625,
0.033294677734375,
0.004329681396484375,
-0.0131378173828125,
-0.005950927734375,
0.03338623046875,
-0.0304412841796875,
0.0224609375,
0.027099609375,
-0.037322998046875,
-0.04425048828125,
-0.0158843994140625,
0.0224151611328125,
0.0181427001953125,
-0.0352783203125,
0.0413818359375,
-0.0253143310546875,
-0.0230255126953125,
0.020111083984375,
0.0286407470703125,
0.0426025390625,
-0.06903076171875,
-0.006317138671875,
0.0289154052734375,
-0.016998291015625,
0.01214599609375,
-0.01520538330078125,
0.0048828125,
-0.0716552734375,
-0.047882080078125,
0.001628875732421875,
-0.038116455078125,
0.0269317626953125,
-0.005832672119140625,
0.0073089599609375,
0.07708740234375,
0.01300811767578125,
-0.049774169921875,
0.040924072265625,
0.0516357421875,
-0.053802490234375,
0.033843994140625,
-0.023284912109375,
0.06292724609375,
-0.01751708984375,
0.007122039794921875,
-0.0218505859375,
0.0181427001953125,
0.001842498779296875,
-0.017425537109375,
0.0394287109375,
0.0250396728515625,
-0.088623046875,
0.01012420654296875,
0.0892333984375,
0.0269317626953125,
0.0345458984375,
0.08905029296875,
-0.016082763671875,
-0.02545166015625,
-0.0297393798828125,
-0.0031871795654296875,
0.024139404296875,
-0.0352783203125,
-0.036041259765625,
0.002986907958984375,
0.00565338134765625,
-0.0184173583984375,
-0.004108428955078125,
0.030517578125,
-0.08319091796875,
0.02764892578125,
0.051422119140625,
0.03314208984375,
0.0391845703125,
0.0009512901306152344,
0.02142333984375,
-0.01171875,
0.00174713134765625,
-0.00946044921875,
0.039520263671875,
-0.01959228515625,
-0.0007433891296386719,
0.0151824951171875,
0.00925445556640625,
-0.00893402099609375,
0.0163421630859375,
-0.005489349365234375,
0.0219879150390625,
-0.01538848876953125,
0.07965087890625,
0.021881103515625,
0.0443115234375,
-0.025421142578125,
-0.02264404296875,
0.008514404296875,
0.08221435546875,
-0.04473876953125,
-0.00572967529296875,
0.01381683349609375,
-0.0115814208984375,
-0.003444671630859375,
-0.0322265625,
0.007579803466796875,
0.006198883056640625,
-0.01031494140625,
0.0119171142578125,
-0.004688262939453125,
-0.0260162353515625,
-0.00005447864532470703,
-0.00006496906280517578,
0.038482666015625,
0.0086822509765625,
0.019256591796875,
-0.0328369140625,
-0.0010738372802734375,
0.0105743408203125,
0.0137786865234375,
0.0217437744140625,
0.02667236328125,
0.03076171875,
-0.006175994873046875,
-0.003734588623046875,
0.051727294921875,
0.03619384765625,
-0.020904541015625,
-0.0079345703125,
-0.046356201171875,
0.0447998046875,
0.0171051025390625,
0.01800537109375,
0.048828125,
0.06707763671875,
0.05584716796875,
-0.00930023193359375,
-0.01458740234375,
0.046142578125,
-0.0189208984375,
0.02166748046875,
0.007343292236328125,
-0.046966552734375,
-0.04010009765625,
-0.043243408203125,
-0.04425048828125,
0.01136016845703125,
-0.0021991729736328125,
-0.00702667236328125,
0.01531982421875,
0.006256103515625,
-0.0242767333984375,
0.0251922607421875,
-0.01080322265625,
0.03619384765625,
0.024688720703125,
0.0025615692138671875,
-0.01470947265625,
0.001674652099609375,
0.029693603515625,
-0.0245208740234375,
0.021087646484375,
0.0196533203125,
0.0137939453125,
0.031890869140625,
0.002468109130859375,
0.00368499755859375,
-0.0173492431640625,
0.00424957275390625,
-0.0699462890625,
0.0176849365234375,
-0.0240631103515625,
-0.0010442733764648438,
-0.01503753662109375,
0.00551605224609375,
0.059906005859375,
0.0159759521484375,
0.055816650390625,
-0.031707763671875,
0.0182647705078125,
-0.0117034912109375,
-0.03497314453125,
0.0202178955078125,
0.0206298828125,
-0.051239013671875,
0.02410888671875,
-0.0029506683349609375,
-0.0019702911376953125,
-0.00801849365234375,
-0.00614166259765625,
0.00978851318359375,
-0.032989501953125,
-0.010528564453125,
-0.054718017578125,
0.041290283203125,
0.032257080078125,
-0.0188446044921875,
-0.0433349609375,
-0.0238037109375,
0.0032215118408203125,
0.00955963134765625,
-0.006626129150390625,
-0.0267486572265625,
-0.002429962158203125,
0.017425537109375,
-0.0157928466796875,
-0.035980224609375,
0.0206298828125,
-0.01116943359375,
0.0096435546875,
0.01468658447265625,
-0.0031452178955078125,
-0.03045654296875,
-0.0013790130615234375,
-0.00978851318359375,
-0.038970947265625,
0.023468017578125,
-0.0024776458740234375,
0.003459930419921875,
-0.06451416015625,
0.0169830322265625,
0.047271728515625,
0.0301666259765625,
-0.0146026611328125,
0.007080078125,
0.0269012451171875,
-0.024200439453125,
0.032318115234375,
-0.0028438568115234375,
-0.003833770751953125,
-0.02197265625,
-0.0130767822265625,
0.0225677490234375,
-0.0036792755126953125,
-0.004070281982421875,
-0.007343292236328125,
-0.004611968994140625,
0.039215087890625,
-0.02294921875,
0.004405975341796875,
0.0203094482421875,
-0.042510986328125,
0.010009765625,
0.00738525390625,
0.0247650146484375,
-0.019287109375,
-0.0022716522216796875,
-0.026885986328125,
-0.0679931640625,
-0.016754150390625,
0.09088134765625,
-0.0266571044921875,
0.019744873046875,
0.02801513671875,
-0.018280029296875,
-0.032257080078125,
0.020355224609375,
0.00490570068359375,
0.060333251953125,
0.0115814208984375,
0.006134033203125,
0.01016998291015625,
-0.0049896240234375,
-0.0230255126953125,
-0.0577392578125,
0.01361083984375,
-0.0662841796875,
-0.0249786376953125,
-0.050048828125,
0.01125335693359375,
0.0144500732421875,
-0.053497314453125,
-0.1304931640625,
0.039276123046875,
-0.044158935546875,
-0.055145263671875,
-0.006412506103515625,
-0.032928466796875,
-0.0357666015625,
0.09765625,
0.01519012451171875,
-0.0171966552734375,
-0.0181884765625,
0.0250701904296875,
-0.038299560546875,
0.07952880859375,
-0.03558349609375,
0.002895355224609375,
0.034698486328125,
0.025390625,
0.0210723876953125,
-0.044708251953125,
-0.020660400390625,
0.01959228515625,
0.003971099853515625,
0.047637939453125,
-0.0079803466796875,
0.003429412841796875,
0.005565643310546875,
-0.0219573974609375,
-0.007724761962890625,
0.0010356903076171875,
-0.03912353515625,
0.0030975341796875,
0.06451416015625,
0.06781005859375,
0.032257080078125,
-0.029510498046875,
-0.036590576171875,
-0.0335693359375,
-0.056793212890625,
-0.03271484375,
0.037261962890625,
-0.08526611328125,
0.00012362003326416016,
-0.00989532470703125,
-0.01043701171875,
0.029052734375,
-0.03875732421875,
-0.0075836181640625,
0.0006437301635742188,
-0.021148681640625,
-0.01349639892578125,
0.002803802490234375,
-0.02197265625,
0.073974609375,
-0.02276611328125,
0.043121337890625,
0.019744873046875,
0.00316619873046875,
0.07305908203125,
0.07818603515625,
-0.009490966796875,
0.01506805419921875,
-0.03997802734375,
0.016326904296875,
-0.00858306884765625,
0.00746917724609375,
-0.0304107666015625,
0.0064697265625,
-0.0034427642822265625,
0.01305389404296875,
-0.001277923583984375,
0.009857177734375,
-0.020782470703125,
0.03192138671875,
-0.0029010772705078125,
0.052886962890625,
-0.0117034912109375,
-0.050994873046875,
-0.0194244384765625,
0.00970458984375,
-0.050872802734375,
0.011322021484375,
-0.01806640625,
-0.01172637939453125,
0.007720947265625,
-0.01629638671875,
0.0391845703125,
-0.042724609375,
0.047698974609375,
0.0175323486328125,
0.0016765594482421875,
0.0305938720703125
] |
dc0a5e31c8dadc052257bff5788b4c0b59edfd38
|
Wordpress Stackexchange
Q: Image Upload "exceeds the maximum upload size for this site", but php.ini is correct I'm getting an "file.png exceeds the maximum upload size for this site" error. It's saying the upload limit is 1MB when trying to upload an image that is 2.5M on WP 3.5. It is setup in multi-blog mode (if that matters).
I have set my php.ini file to 64M for post_max_size and upload_max_size, and it's working for other (non WordPress) sites on my server. I have no idea where the 1MB limit is coming from. I don't have a host, we run out own servers. Any ideas?
From phpinfo(); :
upload_max_filesize 64M 64M
post_max_size 65M 65M
A:
It is setup in multi-blog mode (if that matters)
That will matter a lot. you probably need to ask the super admin to change the upload setting for your site https://codex.wordpress.org/Network_Admin_Settings_Screen#Upload_Settings
|
Q: Image Upload "exceeds the maximum upload size for this site", but php.ini is correct I'm getting an "file.png exceeds the maximum upload size for this site" error. It's saying the upload limit is 1MB when trying to upload an image that is 2.5M on WP 3.5. It is setup in multi-blog mode (if that matters).
I have set my php.ini file to 64M for post_max_size and upload_max_size, and it's working for other (non WordPress) sites on my server. I have no idea where the 1MB limit is coming from. I don't have a host, we run out own servers. Any ideas?
From phpinfo(); :
upload_max_filesize 64M 64M
post_max_size 65M 65M
A:
It is setup in multi-blog mode (if that matters)
That will matter a lot. you probably need to ask the super admin to change the upload setting for your site https://codex.wordpress.org/Network_Admin_Settings_Screen#Upload_Settings
A: this may help - add in .htacess
<IfModule mod_php5.c>
php_value post_max_size 80M
php_value upload_max_filesize 80M
</IfModule>
|
wordpress
|
{
"language": "en",
"length": 160,
"provenance": "stackexchange_00019.jsonl.gz:428261",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83088"
}
|
[
0.031829833984375,
-0.031341552734375,
0.041656494140625,
0.0185699462890625,
-0.0247802734375,
-0.005451202392578125,
0.0545654296875,
-0.048095703125,
0.038299560546875,
0.005359649658203125,
-0.055938720703125,
0.0167236328125,
-0.01056671142578125,
-0.0128631591796875,
0.0141754150390625,
-0.0034732818603515625,
0.037841796875,
-0.015838623046875,
0.030670166015625,
0.0130157470703125,
-0.0096588134765625,
0.046051025390625,
0.037139892578125,
-0.0001533031463623047,
-0.0189056396484375,
0.05126953125,
0.007190704345703125,
-0.03472900390625,
-0.037567138671875,
-0.052154541015625,
-0.00821685791015625,
0.06683349609375,
0.02276611328125,
0.0146942138671875,
-0.0204925537109375,
-0.01473236083984375,
-0.00533294677734375,
0.003963470458984375,
0.007720947265625,
0.01470184326171875,
0.00836181640625,
-0.01520538330078125,
0.04534912109375,
0.006732940673828125,
0.0031299591064453125,
-0.01120758056640625,
0.0003371238708496094,
-0.06146240234375,
0.034820556640625,
-0.02392578125,
-0.00899505615234375,
0.0394287109375,
0.0056304931640625,
-0.0280914306640625,
-0.018890380859375,
-0.021942138671875,
0.004100799560546875,
0.0648193359375,
0.040435791015625,
-0.01959228515625,
-0.07330322265625,
0.0084228515625,
0.01666259765625,
-0.034393310546875,
-0.0199737548828125,
-0.00417327880859375,
-0.02777099609375,
0.024688720703125,
0.00004118680953979492,
-0.03631591796875,
-0.0169219970703125,
-0.01015472412109375,
-0.007633209228515625,
-0.033843994140625,
-0.057586669921875,
0.036834716796875,
0.022491455078125,
-0.0211639404296875,
0.02197265625,
-0.04010009765625,
0.016937255859375,
-0.03143310546875,
-0.01873779296875,
0.012481689453125,
0.007556915283203125,
0.0303192138671875,
0.00362396240234375,
-0.0173187255859375,
0.001861572265625,
-0.01181793212890625,
-0.007556915283203125,
-0.030059814453125,
0.01537322998046875,
0.02728271484375,
-0.0254669189453125,
-0.031707763671875,
-0.0003325939178466797,
0.00861358642578125,
-0.004718780517578125,
0.01021575927734375,
0.01849365234375,
-0.047454833984375,
0.056427001953125,
-0.044403076171875,
0.0023097991943359375,
-0.00959014892578125,
-0.012481689453125,
-0.044891357421875,
0.0186767578125,
0.0301513671875,
-0.0145721435546875,
0.01166534423828125,
-0.026336669921875,
-0.04901123046875,
-0.0026493072509765625,
0.0401611328125,
-0.0255126953125,
0.03118896484375,
0.01552581787109375,
0.025665283203125,
-0.0208740234375,
0.019195556640625,
-0.0284881591796875,
-0.0379638671875,
0.0182647705078125,
-0.0124664306640625,
-0.00760650634765625,
0.011474609375,
-0.01265716552734375,
0.066162109375,
-0.039154052734375,
0.009246826171875,
0.01534271240234375,
-0.0211944580078125,
-0.0211944580078125,
-0.034698486328125,
0.0399169921875,
-0.034210205078125,
-0.01393890380859375,
0.036651611328125,
-0.01403045654296875,
-0.032928466796875,
0.0058746337890625,
-0.01384735107421875,
-0.050445556640625,
0.0191497802734375,
-0.000736236572265625,
0.028076171875,
-0.01091766357421875,
-0.0946044921875,
0.0362548828125,
-0.033111572265625,
0.03924560546875,
0.005886077880859375,
-0.0232086181640625,
-0.04345703125,
0.031280517578125,
-0.039886474609375,
-0.002643585205078125,
-0.04705810546875,
0.00543212890625,
-0.00511932373046875,
0.033843994140625,
-0.02117919921875,
-0.02276611328125,
-0.0294952392578125,
-0.046783447265625,
-0.0091094970703125,
0.0291900634765625,
0.014892578125,
-0.013153076171875,
-0.0305938720703125,
0.03863525390625,
0.0033664703369140625,
-0.0207366943359375,
0.0310211181640625,
0.0362548828125,
0.0194244384765625,
-0.007099151611328125,
0.079833984375,
0.04327392578125,
-0.007015228271484375,
0.054962158203125,
-0.007740020751953125,
-0.03155517578125,
-0.05364990234375,
0.02471923828125,
0.01270294189453125,
0.01256561279296875,
0.0269012451171875,
0.07952880859375,
-0.017364501953125,
-0.03656005859375,
0.0026378631591796875,
-0.04833984375,
-0.024871826171875,
-0.0211639404296875,
0.005435943603515625,
-0.03753662109375,
0.04876708984375,
0.0195465087890625,
0.005481719970703125,
-0.01007843017578125,
-0.00728607177734375,
-0.026580810546875,
-0.0097503662109375,
-0.009307861328125,
0.0181884765625,
-0.0164031982421875,
0.0081329345703125,
0.0258941650390625,
0.0189056396484375,
-0.017333984375,
-0.028564453125,
-0.007266998291015625,
0.03271484375,
-0.028961181640625,
0.034393310546875,
-0.01248931884765625,
0.068603515625,
-0.03466796875,
-0.045654296875,
-0.0447998046875,
-0.03778076171875,
0.0287017822265625,
0.029327392578125,
-0.0413818359375,
0.008697509765625,
0.0198211669921875,
0.021514892578125,
-0.029205322265625,
0.014434814453125,
0.001789093017578125,
0.0185089111328125,
-0.01727294921875,
-0.023193359375,
-0.022430419921875,
-0.07891845703125,
0.0166015625,
0.057220458984375,
0.0301971435546875,
-0.0019321441650390625,
0.023468017578125,
0.06353759765625,
0.028778076171875,
-0.006717681884765625,
0.02984619140625,
0.0114288330078125,
0.0126190185546875,
-0.0019512176513671875,
0.009429931640625,
-0.0299072265625,
0.029693603515625,
-0.0496826171875,
0.01537322998046875,
0.03369140625,
-0.03729248046875,
-0.050445556640625,
-0.020477294921875,
0.0236663818359375,
0.0234222412109375,
-0.0101165771484375,
-0.0311126708984375,
-0.0174407958984375,
-0.0372314453125,
0.032806396484375,
-0.0084991455078125,
0.01018524169921875,
-0.04669189453125,
0.038665771484375,
0.0338134765625,
-0.02117919921875,
-0.0005183219909667969,
0.0036716461181640625,
0.0144805908203125,
0.0189361572265625,
-0.0052947998046875,
-0.00039386749267578125,
0.00730133056640625,
0.005748748779296875,
-0.03216552734375,
-0.0219573974609375,
-0.00008374452590942383,
0.0012063980102539062,
0.0032634735107421875,
-0.017333984375,
0.04254150390625,
0.0054931640625,
0.004016876220703125,
-0.0009698867797851562,
0.02520751953125,
0.034149169921875,
-0.0033397674560546875,
0.0340576171875,
0.0171356201171875,
-0.00536346435546875,
0.03466796875,
-0.06610107421875,
0.0701904296875,
-0.0418701171875,
0.07940673828125,
0.06842041015625,
-0.07666015625,
0.0738525390625,
0.0043182373046875,
-0.01898193359375,
-0.002941131591796875,
0.03753662109375,
0.0017538070678710938,
-0.027984619140625,
-0.03167724609375,
-0.004085540771484375,
0.00787353515625,
-0.0294952392578125,
-0.00457763671875,
-0.00485992431640625,
-0.02886962890625,
-0.0020046234130859375,
-0.041534423828125,
-0.018341064453125,
-0.0679931640625,
-0.0816650390625,
0.00997161865234375,
-0.0012445449829101562,
-0.031402587890625,
0.0054168701171875,
0.043060302734375,
0.0226287841796875,
-0.039520263671875,
-0.03045654296875,
0.0177764892578125,
-0.047882080078125,
-0.018646240234375,
-0.03460693359375,
0.01183319091796875,
-0.007221221923828125,
0.01090240478515625,
0.03387451171875,
-0.0022068023681640625,
-0.0775146484375,
-0.0191802978515625,
-0.0008106231689453125,
-0.0187835693359375,
0.024993896484375,
0.001941680908203125,
-0.01806640625,
0.0218658447265625,
-0.01393890380859375,
-0.0007033348083496094,
0.044464111328125,
-0.0167388916015625,
-0.005321502685546875,
-0.035186767578125,
-0.04583740234375,
-0.04022216796875,
0.05804443359375,
0.048248291015625,
-0.10211181640625,
-0.032684326171875,
-0.08734130859375,
0.00014317035675048828,
-0.0261993408203125,
-0.042022705078125,
-0.01082611083984375,
0.043731689453125,
-0.011688232421875,
-0.005840301513671875,
-0.029144287109375,
-0.00794219970703125,
0.0124664306640625,
-0.022247314453125,
-0.03680419921875,
0.07171630859375,
-0.002437591552734375,
-0.01111602783203125,
-0.0037975311279296875,
0.0278778076171875,
-0.0028743743896484375,
0.023681640625,
0.0138702392578125,
0.035736083984375,
-0.0004458427429199219,
0.0025157928466796875,
-0.053466796875,
-0.03448486328125,
0.03533935546875,
-0.02679443359375,
0.045745849609375,
-0.060699462890625,
-0.0210113525390625,
-0.031890869140625,
0.07220458984375,
0.01971435546875,
-0.024261474609375,
-0.038726806640625,
0.00344085693359375,
-0.027679443359375,
-0.03656005859375,
0.01264190673828125,
0.01264190673828125,
0.0147705078125,
0.01041412353515625,
0.002437591552734375,
0.00901031494140625,
0.003082275390625,
-0.0212554931640625,
0.0219268798828125,
-0.0171356201171875,
0.019073486328125,
-0.021331787109375,
0.013031005859375,
0.005962371826171875,
0.01142120361328125,
-0.0258941650390625,
0.00711822509765625,
-0.038726806640625,
-0.099609375,
-0.01163482666015625,
-0.033660888671875,
0.06988525390625,
-0.022857666015625,
0.0660400390625,
-0.07501220703125,
0.042755126953125,
0.0006384849548339844,
0.01093292236328125,
-0.0040435791015625,
-0.0022525787353515625,
-0.009857177734375,
0.00901031494140625,
-0.000499725341796875,
-0.01503753662109375,
-0.005115509033203125,
-0.0380859375,
-0.049224853515625,
-0.059478759765625,
-0.0343017578125,
-0.04510498046875,
-0.0012636184692382812,
-0.01377105712890625,
-0.0267181396484375,
-0.028045654296875,
-0.035858154296875,
0.00464630126953125,
-0.04693603515625,
0.003631591796875,
-0.0229339599609375,
-0.03497314453125,
0.061920166015625,
0.01030731201171875,
0.01416015625,
0.017669677734375,
0.11041259765625,
-0.0027713775634765625,
-0.019439697265625,
-0.1402587890625,
-0.00893402099609375,
0.006229400634765625,
-0.017547607421875,
0.025726318359375,
-0.01097869873046875,
0.00159454345703125,
0.014678955078125,
-0.0299072265625,
0.0232696533203125,
-0.015838623046875,
0.0118865966796875,
0.00423431396484375,
-0.0179443359375,
0.00762939453125,
0.0078582763671875,
0.007625579833984375,
-0.036651611328125,
-0.028778076171875,
0.008209228515625,
-0.0146484375,
0.04376220703125,
-0.004001617431640625,
0.03802490234375,
-0.03546142578125,
-0.094970703125,
0.023468017578125,
-0.043121337890625,
-0.0127105712890625,
0.00485992431640625,
-0.005214691162109375,
0.055389404296875,
0.02215576171875,
-0.021881103515625,
-0.0003662109375,
0.037109375,
0.006130218505859375,
0.0546875,
-0.0305328369140625,
-0.0008802413940429688,
-0.0433349609375,
0.0030956268310546875,
0.0080413818359375,
0.01490020751953125,
-0.004138946533203125,
-0.027130126953125,
-0.006114959716796875,
-0.037017822265625,
-0.0032520294189453125,
0.01207733154296875,
0.01268768310546875,
0.015777587890625,
0.00913238525390625,
-0.0089874267578125,
-0.00481414794921875,
0.01276397705078125,
-0.030914306640625,
0.040008544921875,
0.0201416015625,
-0.02490234375,
0.037261962890625,
-0.032989501953125,
0.0157623291015625,
-0.0301513671875,
0.002330780029296875,
0.0213775634765625,
0.0222930908203125,
0.0709228515625,
0.018157958984375,
-0.033050537109375,
-0.0013904571533203125,
0.03753662109375,
-0.0092010498046875,
-0.033966064453125,
0.005435943603515625,
-0.006908416748046875,
0.0259552001953125,
-0.034454345703125,
-0.043365478515625,
0.056640625,
-0.0222015380859375,
-0.0079498291015625,
0.0167388916015625,
0.0015497207641601562,
-0.0517578125,
0.008056640625,
0.0255126953125,
0.01511383056640625,
-0.03753662109375,
-0.01611328125,
0.0263824462890625,
-0.01161956787109375,
0.01314544677734375,
0.022369384765625,
-0.0186309814453125,
-0.003559112548828125,
0.0004119873046875,
-0.0009694099426269531,
-0.026214599609375,
-0.0421142578125,
-0.005016326904296875,
0.01052093505859375,
-0.0138092041015625,
-0.02325439453125,
0.033294677734375,
-0.01103973388671875,
-0.0035190582275390625,
-0.01287841796875,
0.0031414031982421875,
-0.027435302734375,
0.043121337890625,
-0.0297393798828125,
-0.038330078125,
-0.0038585662841796875,
-0.027862548828125,
-0.01290130615234375,
-0.003406524658203125,
0.0849609375,
0.0283355712890625,
0.0089874267578125,
-0.0301361083984375,
-0.034881591796875,
0.02093505859375,
0.01064300537109375,
0.0592041015625,
-0.0207977294921875,
0.036773681640625,
-0.014984130859375,
0.04791259765625,
-0.06085205078125,
-0.016082763671875,
0.043121337890625,
-0.03466796875,
-0.039031982421875,
-0.02679443359375,
0.04644775390625,
0.01239013671875,
0.003108978271484375,
-0.026214599609375,
-0.01375579833984375,
0.01035308837890625,
-0.0029449462890625,
0.0007467269897460938,
0.0032787322998046875,
-0.00009113550186157227,
0.0264739990234375,
-0.04718017578125,
0.0089263916015625,
-0.0098724365234375,
0.048248291015625,
-0.05438232421875,
-0.0025653839111328125,
0.0450439453125,
-0.005764007568359375,
0.058258056640625,
-0.0233001708984375,
-0.009002685546875,
0.0139312744140625,
-0.01442718505859375,
0.017364501953125,
0.01457977294921875,
0.032318115234375,
-0.00597381591796875,
0.02618408203125,
-0.02081298828125,
0.020263671875,
0.0201873779296875,
0.018524169921875,
0.005992889404296875,
0.03759765625,
-0.000019371509552001953,
-0.05999755859375,
-0.0135650634765625,
-0.004558563232421875,
0.02197265625,
-0.0007877349853515625,
0.00627899169921875,
0.041107177734375,
-0.01503753662109375,
0.07550048828125,
-0.00913238525390625,
0.0203857421875,
0.03741455078125,
-0.03265380859375,
0.043670654296875,
0.0027027130126953125,
0.02032470703125,
-0.00733184814453125,
0.037994384765625,
-0.0109710693359375,
-0.0099945068359375,
0.01274871826171875,
-0.0050048828125,
-0.00568389892578125,
0.0014400482177734375,
0.04736328125,
0.01297760009765625,
-0.06707763671875,
-0.024078369140625,
0.0643310546875,
-0.0556640625,
0.04510498046875,
0.032470703125,
-0.052886962890625,
-0.02313232421875,
0.003597259521484375,
-0.0186920166015625,
-0.040985107421875,
-0.0258026123046875,
-0.016143798828125,
-0.01273345947265625,
0.010467529296875,
0.055511474609375,
-0.0254669189453125,
-0.00319671630859375,
0.04345703125,
-0.05126953125,
0.091796875,
-0.004734039306640625,
0.009307861328125,
0.0313720703125,
-0.022705078125,
-0.0165863037109375,
0.007373809814453125,
0.0240936279296875,
0.009429931640625,
-0.034149169921875,
0.017974853515625,
-0.061737060546875,
0.0192413330078125,
0.0216064453125,
-0.02459716796875,
-0.01139068603515625,
-0.0246734619140625,
0.04669189453125,
-0.04644775390625,
-0.0193328857421875,
-0.00013840198516845703,
-0.026397705078125,
0.00714111328125,
-0.01922607421875,
-0.027740478515625,
0.05157470703125,
-0.01047515869140625,
0.013946533203125,
0.040283203125,
0.0254974365234375,
-0.0266876220703125,
-0.00872039794921875,
-0.0298919677734375,
0.0016679763793945312,
-0.0007505416870117188,
0.01482391357421875,
-0.0215606689453125,
0.0105133056640625,
-0.005512237548828125,
0.0033969879150390625,
0.053466796875,
0.0100250244140625,
-0.0404052734375,
-0.00921630859375,
0.049591064453125,
0.036376953125,
0.004642486572265625,
0.0364990234375,
0.02325439453125,
-0.028594970703125,
0.01263427734375,
0.021942138671875,
0.032989501953125,
-0.0091400146484375,
-0.0009908676147460938,
0.045562744140625,
-0.0091705322265625,
-0.036865234375,
0.01192474365234375,
-0.00921630859375,
-0.047149658203125,
0.01494598388671875,
0.039947509765625,
-0.039947509765625,
0.00899505615234375,
0.05133056640625,
0.0168609619140625,
-0.006221771240234375,
-0.037628173828125,
-0.007808685302734375,
0.036285400390625,
0.004024505615234375,
0.0232391357421875,
0.03118896484375,
0.0206451416015625,
0.04327392578125,
-0.01274871826171875,
0.015380859375,
0.0189361572265625,
-0.01526641845703125,
0.0089569091796875,
0.023162841796875,
0.0159149169921875,
-0.02471923828125,
-0.0099639892578125,
0.03668212890625,
0.041595458984375,
-0.028533935546875,
-0.031646728515625,
0.0157470703125,
0.0085601806640625,
-0.00006502866744995117,
-0.0067138671875,
-0.0166168212890625,
-0.017547607421875,
0.0290374755859375,
-0.028289794921875,
0.0144195556640625,
0.055938720703125,
0.03887939453125,
0.015228271484375,
0.01551055908203125,
-0.07415771484375,
-0.007602691650390625,
-0.004322052001953125,
0.0024967193603515625,
-0.00726318359375,
-0.005130767822265625,
-0.003223419189453125,
0.013702392578125,
-0.0111846923828125,
0.01523590087890625,
0.0036602020263671875,
0.05889892578125,
-0.011627197265625,
-0.0041046142578125,
-0.01549530029296875,
-0.05462646484375,
-0.004802703857421875,
0.032958984375,
-0.023956298828125,
0.0206298828125,
0.0478515625,
0.0721435546875,
-0.0300750732421875,
-0.03350830078125,
0.0288238525390625,
-0.0175933837890625,
-0.01214599609375,
-0.041473388671875,
-0.0194854736328125,
-0.016021728515625,
-0.0208892822265625,
0.022216796875,
-0.0032329559326171875,
0.019805908203125,
0.01187896728515625,
-0.0167236328125,
0.019683837890625,
-0.0279998779296875,
0.0265960693359375,
0.00827789306640625,
0.0269317626953125,
0.0230255126953125,
-0.048828125,
0.002044677734375,
-0.005603790283203125,
-0.008575439453125,
-0.0253753662109375,
0.025848388671875,
-0.006984710693359375,
0.0252685546875,
0.00870513916015625,
-0.033447265625,
0.018585205078125,
0.012542724609375,
0.002048492431640625,
-0.01316070556640625,
0.02484130859375,
-0.0216217041015625,
-0.040679931640625,
-0.020782470703125,
-0.034820556640625,
0.0299530029296875,
0.0660400390625,
0.046142578125,
-0.0005908012390136719,
0.049072265625,
0.04156494140625,
0.006198883056640625,
0.008575439453125,
0.031463623046875,
0.0092315673828125,
0.002056121826171875,
-0.0008378028869628906,
-0.03216552734375,
-0.00803375244140625,
0.05316162109375,
0.0156097412109375,
-0.035675048828125,
-0.0004172325134277344,
0.0298614501953125,
0.00374603271484375,
0.0238037109375,
0.008544921875,
-0.040252685546875,
-0.02069091796875,
-0.051422119140625,
-0.01806640625,
0.0151824951171875,
0.016204833984375,
0.01123809814453125,
0.0101470947265625,
0.0019741058349609375,
-0.01910400390625,
0.0306243896484375,
-0.0323486328125,
0.049163818359375,
0.034027099609375,
-0.03790283203125,
-0.08026123046875,
-0.01166534423828125,
-0.02191162109375,
-0.025177001953125,
-0.0209808349609375,
0.0755615234375,
-0.019439697265625,
-0.04095458984375,
0.04705810546875,
0.0025844573974609375,
-0.004901885986328125,
-0.053009033203125,
-0.0338134765625,
0.05596923828125,
-0.01093292236328125,
-0.01068878173828125,
0.02294921875,
0.01385498046875,
-0.0343017578125,
-0.022064208984375,
0.01497650146484375,
-0.03265380859375,
0.0289306640625,
-0.0135955810546875,
0.03143310546875,
0.0222625732421875,
0.003986358642578125,
-0.037017822265625,
0.0221405029296875,
-0.0257568359375,
0.031402587890625,
0.0115966796875,
-0.01522064208984375,
-0.01149749755859375,
-0.003749847412109375,
-0.0361328125,
-0.06280517578125,
-0.044036865234375,
0.04437255859375,
-0.03802490234375,
0.045166015625,
0.06292724609375,
-0.037506103515625,
-0.00940704345703125,
0.0253448486328125,
0.0325927734375,
0.07330322265625,
-0.04522705078125,
-0.004077911376953125,
0.0550537109375,
0.0080718994140625,
-0.042755126953125,
-0.07611083984375,
-0.004611968994140625,
-0.043365478515625,
0.0258331298828125,
-0.0255279541015625,
0.03717041015625,
0.03173828125,
-0.027496337890625,
-0.06689453125,
-0.021820068359375,
0.002239227294921875,
-0.041717529296875,
-0.0211639404296875,
0.004741668701171875,
-0.048980712890625,
0.059722900390625,
0.0230865478515625,
-0.01184844970703125,
0.0279693603515625,
0.045654296875,
-0.005886077880859375,
-0.0162506103515625,
0.028411865234375,
-0.0136260986328125,
-0.0297393798828125,
0.0253753662109375,
0.036895751953125,
-0.02691650390625,
0.03326416015625,
-0.034576416015625,
0.060546875,
0.06103515625,
-0.00911712646484375,
0.027008056640625,
0.0174102783203125,
-0.0589599609375,
-0.023590087890625,
-0.0289154052734375,
-0.0224151611328125,
0.005313873291015625,
0.09600830078125,
0.048492431640625,
0.01268768310546875,
-0.04119873046875,
0.0248565673828125,
-0.0128936767578125,
-0.00730133056640625,
0.01314544677734375,
-0.0017156600952148438,
-0.035186767578125,
0.005615234375,
0.027557373046875,
-0.03277587890625,
-0.01021575927734375,
0.05218505859375,
-0.05419921875,
0.011444091796875,
0.023590087890625,
-0.036163330078125,
-0.059173583984375,
0.041534423828125,
0.04571533203125,
-0.03070068359375,
0.01097869873046875,
-0.0169219970703125,
0.00006139278411865234,
0.02093505859375,
-0.032501220703125,
-0.0310211181640625,
0.02728271484375,
-0.047698974609375,
0.01462554931640625,
-0.022186279296875,
0.01389312744140625,
-0.033294677734375,
0.0258941650390625,
0.018218994140625,
0.005916595458984375,
-0.01751708984375,
0.014984130859375,
0.018585205078125,
0.005535125732421875,
-0.0389404296875,
0.03570556640625,
-0.02716064453125,
-0.0183563232421875,
-0.0239410400390625,
0.010650634765625,
-0.0253143310546875,
0.01434326171875,
0.012481689453125,
-0.00616455078125,
0.0251617431640625,
0.029876708984375,
0.031646728515625,
-0.01134490966796875,
0.01175689697265625,
0.0007276535034179688,
0.0149383544921875,
0.00710296630859375
] |
0bedc6dc55d8c434b1824f94a0d3f5b255907db2
|
Wordpress Stackexchange
Q: Is it safe/recommended to use wp_enqueue_script function outside the functions.php file? I created multiple post formats, and when i use an audio post format, i want to include some additional javascript for the audio player.
So, i include the content-audio.php like this:
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'blog/content', get_post_format() ); ?>
<?php endwhile; ?>
This loads the blog/content-audio.php as expected:
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
$att_args = array(
'post_type' => 'attachment',
'numberposts' => 1,
'post_status' => null,
'post_parent' => $post->ID,
'post_mime_type' => 'audio',
'orderby' => 'menu_order'
);
$attachments = get_posts( $att_args );
if( $attachments ): ?>
<?php wp_enqueue_script('mediaelement-js'); ?>
<?php foreach( $attachments as $attachment ): ?>
<?php $attachmenturl=wp_get_attachment_url($attachment->ID); ?>
<audio id="player2" src="<?php echo $attachmenturl; ?>" type="audio/mp3" controls="controls"></audio>
<?php endforeach; ?>
<?php endif; ?>
<?php the_title(); ?>
</article>
Can i use the wp_enqueue_script() function inside this file? It's working fine, but i'm curious if this is the right way to do it.
A: As of WordPress 3.4, calls to wp_enqueue_script() can be made inline. So, it is perfectly acceptable to call it where needed, such as inside a shortcode callback, or conditionally based upon returned queries, as you've done here.
|
Q: Is it safe/recommended to use wp_enqueue_script function outside the functions.php file? I created multiple post formats, and when i use an audio post format, i want to include some additional javascript for the audio player.
So, i include the content-audio.php like this:
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'blog/content', get_post_format() ); ?>
<?php endwhile; ?>
This loads the blog/content-audio.php as expected:
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
$att_args = array(
'post_type' => 'attachment',
'numberposts' => 1,
'post_status' => null,
'post_parent' => $post->ID,
'post_mime_type' => 'audio',
'orderby' => 'menu_order'
);
$attachments = get_posts( $att_args );
if( $attachments ): ?>
<?php wp_enqueue_script('mediaelement-js'); ?>
<?php foreach( $attachments as $attachment ): ?>
<?php $attachmenturl=wp_get_attachment_url($attachment->ID); ?>
<audio id="player2" src="<?php echo $attachmenturl; ?>" type="audio/mp3" controls="controls"></audio>
<?php endforeach; ?>
<?php endif; ?>
<?php the_title(); ?>
</article>
Can i use the wp_enqueue_script() function inside this file? It's working fine, but i'm curious if this is the right way to do it.
A: As of WordPress 3.4, calls to wp_enqueue_script() can be made inline. So, it is perfectly acceptable to call it where needed, such as inside a shortcode callback, or conditionally based upon returned queries, as you've done here.
|
wordpress
|
{
"language": "en",
"length": 198,
"provenance": "stackexchange_00019.jsonl.gz:428270",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83129"
}
|
[
0.060272216796875,
-0.01480865478515625,
-0.01367950439453125,
-0.04266357421875,
0.0157318115234375,
-0.0266876220703125,
0.03656005859375,
-0.004734039306640625,
-0.0281219482421875,
0.03125,
0.00673675537109375,
0.014404296875,
-0.0197906494140625,
-0.01282501220703125,
-0.00653839111328125,
-0.032684326171875,
0.043792724609375,
-0.0221099853515625,
0.0208740234375,
0.0069427490234375,
0.000766754150390625,
0.037353515625,
-0.001674652099609375,
0.0227813720703125,
0.0029926300048828125,
0.024383544921875,
0.107421875,
-0.001583099365234375,
-0.010345458984375,
-0.003082275390625,
0.019775390625,
-0.04052734375,
0.034820556640625,
0.011749267578125,
-0.058380126953125,
0.0148468017578125,
0.017333984375,
0.00446319580078125,
-0.00977325439453125,
0.032958984375,
0.015625,
0.0022487640380859375,
0.0269622802734375,
0.0299530029296875,
0.002239227294921875,
-0.0287017822265625,
-0.006275177001953125,
-0.0579833984375,
0.0174560546875,
0.00312042236328125,
0.032012939453125,
0.020599365234375,
0.0309906005859375,
0.0211029052734375,
-0.006866455078125,
0.036865234375,
-0.0390625,
-0.0155487060546875,
-0.0035247802734375,
0.046173095703125,
0.02520751953125,
0.008514404296875,
0.0075531005859375,
-0.002819061279296875,
-0.00795745849609375,
0.0093536376953125,
0.00920867919921875,
0.00323486328125,
-0.07073974609375,
-0.0241851806640625,
0.052276611328125,
-0.05462646484375,
-0.00450897216796875,
-0.042816162109375,
-0.00921630859375,
0.022674560546875,
-0.0169525146484375,
-0.0206451416015625,
0.01000213623046875,
-0.02374267578125,
0.004131317138671875,
0.00763702392578125,
-0.0164337158203125,
-0.0069732666015625,
0.0153350830078125,
0.013824462890625,
-0.0092926025390625,
-0.0302886962890625,
0.01319122314453125,
-0.0163726806640625,
-0.007228851318359375,
-0.0087432861328125,
0.04388427734375,
-0.0088653564453125,
-0.040863037109375,
-0.027740478515625,
0.041900634765625,
0.06781005859375,
0.04107666015625,
0.0316162109375,
0.0243072509765625,
-0.0684814453125,
0.03961181640625,
-0.046661376953125,
-0.01358795166015625,
0.0509033203125,
-0.0130615234375,
-0.051483154296875,
0.01021575927734375,
0.032440185546875,
0.003231048583984375,
0.01324462890625,
0.0240478515625,
-0.01092529296875,
-0.0159912109375,
-0.0273284912109375,
-0.043487548828125,
0.047515869140625,
0.02642822265625,
0.015411376953125,
0.013153076171875,
0.032928466796875,
0.007709503173828125,
-0.030029296875,
-0.02880859375,
-0.018951416015625,
-0.0030384063720703125,
-0.05682373046875,
0.00894927978515625,
0.07763671875,
-0.0120697021484375,
-0.01220703125,
0.01520538330078125,
0.007061004638671875,
-0.0127105712890625,
-0.03863525390625,
0.0127105712890625,
0.00022912025451660156,
0.00799560546875,
-0.0325927734375,
0.035858154296875,
-0.0153350830078125,
-0.004543304443359375,
0.03167724609375,
0.0238494873046875,
0.0032901763916015625,
0.0003883838653564453,
0.039398193359375,
0.0195465087890625,
-0.0262298583984375,
0.033447265625,
-0.0286407470703125,
0.0450439453125,
-0.0160369873046875,
0.00033283233642578125,
-0.039031982421875,
0.03167724609375,
-0.040618896484375,
0.004940032958984375,
-0.06829833984375,
-0.0088653564453125,
-0.01158905029296875,
0.004436492919921875,
-0.0406494140625,
-0.0426025390625,
0.00907135009765625,
-0.01219940185546875,
-0.005863189697265625,
0.023681640625,
0.0557861328125,
-0.01904296875,
-0.038360595703125,
-0.0038127899169921875,
0.009796142578125,
-0.01247406005859375,
0.035980224609375,
-0.00675201416015625,
0.004604339599609375,
0.03680419921875,
0.0291748046875,
-0.01418304443359375,
-0.0369873046875,
0.05615234375,
-0.046630859375,
-0.053924560546875,
0.051055908203125,
0.01018524169921875,
0.05279541015625,
0.02215576171875,
0.0140838623046875,
0.07501220703125,
0.026702880859375,
-0.00533294677734375,
0.0229949951171875,
-0.0212860107421875,
-0.037994384765625,
-0.0034160614013671875,
0.0044403076171875,
-0.0178985595703125,
0.00391387939453125,
0.0128936767578125,
0.019683837890625,
0.017486572265625,
0.01380157470703125,
-0.00936126708984375,
0.05029296875,
-0.0234375,
0.03851318359375,
-0.047943115234375,
-0.005462646484375,
0.034088134765625,
0.0015649795532226562,
-0.01763916015625,
-0.022247314453125,
-0.003818511962890625,
0.0172882080078125,
-0.01788330078125,
0.05169677734375,
-0.03729248046875,
0.054962158203125,
-0.05926513671875,
-0.04522705078125,
-0.0274658203125,
0.017120361328125,
0.01265716552734375,
-0.022857666015625,
-0.00533294677734375,
-0.035552978515625,
0.01078033447265625,
-0.010101318359375,
0.00330352783203125,
0.0132598876953125,
0.052764892578125,
0.0670166015625,
-0.007274627685546875,
-0.01053619384765625,
0.01367950439453125,
-0.048187255859375,
0.0144195556640625,
0.038970947265625,
0.03167724609375,
0.0740966796875,
-0.0232391357421875,
-0.0263519287109375,
0.059906005859375,
-0.0270233154296875,
0.01099395751953125,
-0.022613525390625,
-0.005611419677734375,
0.0242462158203125,
-0.004619598388671875,
0.027984619140625,
0.0174407958984375,
-0.06304931640625,
0.02239990234375,
0.054901123046875,
-0.0217132568359375,
0.0037384033203125,
-0.01528167724609375,
-0.006549835205078125,
0.00807952880859375,
-0.035736083984375,
-0.00254058837890625,
-0.030853271484375,
0.058441162109375,
-0.01340484619140625,
0.036224365234375,
0.004924774169921875,
-0.0181427001953125,
0.003566741943359375,
0.020660400390625,
-0.0224609375,
-0.00394439697265625,
0.036651611328125,
0.0058746337890625,
-0.020294189453125,
-0.0290374755859375,
0.0011377334594726562,
0.005542755126953125,
0.01219940185546875,
-0.002788543701171875,
0.017608642578125,
-0.055389404296875,
-0.005832672119140625,
-0.0270843505859375,
-0.05364990234375,
-0.005962371826171875,
0.05462646484375,
-0.0007038116455078125,
0.0028533935546875,
0.007465362548828125,
0.055511474609375,
0.0216217041015625,
0.01727294921875,
0.046173095703125,
0.0035991668701171875,
0.007965087890625,
-0.01282501220703125,
0.014678955078125,
-0.0109100341796875,
0.0297698974609375,
0.050628662109375,
0.0003879070281982422,
0.020965576171875,
-0.007160186767578125,
0.00701904296875,
0.0010662078857421875,
0.01058197021484375,
-0.005046844482421875,
-0.038421630859375,
-0.0133209228515625,
0.0006556510925292969,
0.014556884765625,
0.044189453125,
-0.047576904296875,
-0.054901123046875,
-0.037841796875,
0.006542205810546875,
-0.12066650390625,
-0.09002685546875,
0.033966064453125,
-0.0950927734375,
0.041046142578125,
-0.038787841796875,
-0.051788330078125,
-0.031829833984375,
0.0128021240234375,
0.0145111083984375,
-0.043243408203125,
0.00568389892578125,
-0.0190582275390625,
-0.041046142578125,
-0.037109375,
0.0014286041259765625,
-0.0171661376953125,
0.0020961761474609375,
0.00848388671875,
0.0222320556640625,
0.0205841064453125,
-0.03106689453125,
0.03289794921875,
0.044769287109375,
-0.0118560791015625,
0.020599365234375,
0.0028858184814453125,
-0.036041259765625,
-0.05828857421875,
-0.014892578125,
0.0318603515625,
-0.006603240966796875,
-0.0019855499267578125,
0.01457977294921875,
-0.01221466064453125,
0.0192718505859375,
0.034271240234375,
0.02178955078125,
-0.0017271041870117188,
0.05401611328125,
0.051300048828125,
-0.0186767578125,
0.019561767578125,
-0.0007352828979492188,
-0.0162200927734375,
-0.03619384765625,
-0.0116424560546875,
-0.0177459716796875,
0.00839996337890625,
-0.0200042724609375,
0.01617431640625,
-0.021759033203125,
-0.0014801025390625,
-0.00815582275390625,
0.0589599609375,
-0.005367279052734375,
0.034149169921875,
-0.0218505859375,
0.040191650390625,
-0.014373779296875,
-0.0230255126953125,
0.01180267333984375,
0.00974273681640625,
0.00836944580078125,
-0.03369140625,
-0.00841522216796875,
-0.005985260009765625,
0.030609130859375,
-0.0139617919921875,
0.0271148681640625,
-0.0050506591796875,
-0.0276336669921875,
-0.00392913818359375,
0.05633544921875,
-0.059051513671875,
-0.01222991943359375,
-0.0164642333984375,
0.01526641845703125,
-0.0300445556640625,
-0.03759765625,
-0.03912353515625,
0.006114959716796875,
0.050994873046875,
0.003047943115234375,
-0.01271820068359375,
0.0185546875,
-0.01395416259765625,
0.0309906005859375,
0.0269317626953125,
-0.001941680908203125,
0.0234375,
-0.047149658203125,
0.006710052490234375,
0.0350341796875,
-0.02008056640625,
0.0094757080078125,
-0.0246429443359375,
-0.04107666015625,
-0.0926513671875,
-0.0200653076171875,
0.00766754150390625,
0.0653076171875,
0.00835418701171875,
-0.02581787109375,
-0.0258026123046875,
0.05694580078125,
0.0020999908447265625,
0.02264404296875,
0.002056121826171875,
0.00763702392578125,
-0.023956298828125,
-0.00493621826171875,
0.01012420654296875,
-0.0285491943359375,
-0.0221710205078125,
-0.007266998291015625,
-0.0355224609375,
-0.0254364013671875,
-0.021484375,
-0.040283203125,
0.0238037109375,
-0.033233642578125,
-0.04925537109375,
-0.014739990234375,
0.0019521713256835938,
0.0119171142578125,
0.0013780593872070312,
-0.005035400390625,
-0.018798828125,
-0.051025390625,
0.018218994140625,
-0.0281524658203125,
-0.0267181396484375,
0.0008320808410644531,
0.047210693359375,
0.02398681640625,
-0.00539398193359375,
-0.0308990478515625,
0.01540374755859375,
0.037139892578125,
-0.03472900390625,
0.03472900390625,
0.0016651153564453125,
-0.041961669921875,
0.09893798828125,
-0.00920867919921875,
0.0209808349609375,
-0.013092041015625,
0.0238494873046875,
0.0111236572265625,
0.000507354736328125,
0.01294708251953125,
0.024322509765625,
0.002376556396484375,
-0.017547607421875,
-0.0374755859375,
-0.002277374267578125,
0.011199951171875,
0.037994384765625,
-0.02508544921875,
0.053131103515625,
-0.034515380859375,
-0.06585693359375,
0.0045166015625,
-0.06597900390625,
0.061065673828125,
0.052886962890625,
-0.0199127197265625,
0.0775146484375,
0.0662841796875,
0.013824462890625,
0.020263671875,
0.034027099609375,
0.0010118484497070312,
0.04608154296875,
0.01971435546875,
-0.0013360977172851562,
-0.0241241455078125,
-0.007648468017578125,
-0.0233001708984375,
0.0245819091796875,
-0.0290985107421875,
-0.0299530029296875,
0.042694091796875,
0.052764892578125,
-0.005462646484375,
0.006542205810546875,
0.03082275390625,
0.03289794921875,
-0.027435302734375,
-0.0231475830078125,
-0.02459716796875,
0.037261962890625,
-0.05731201171875,
0.0189971923828125,
0.00539398193359375,
-0.00860595703125,
0.0032215118408203125,
0.05511474609375,
-0.0015716552734375,
0.026611328125,
-0.022705078125,
0.045867919921875,
-0.00716400146484375,
0.05059814453125,
0.0200958251953125,
-0.03668212890625,
0.004611968994140625,
0.01439666748046875,
-0.020782470703125,
-0.070068359375,
0.0157470703125,
0.0110626220703125,
0.082275390625,
-0.0196990966796875,
-0.04437255859375,
0.034271240234375,
-0.05352783203125,
-0.0286712646484375,
0.043060302734375,
0.01531982421875,
-0.03265380859375,
-0.016754150390625,
0.00864410400390625,
0.032012939453125,
-0.006328582763671875,
0.0118255615234375,
0.016815185546875,
0.025115966796875,
0.0236663818359375,
-0.0226593017578125,
-0.031219482421875,
0.0147247314453125,
0.0284881591796875,
0.030426025390625,
-0.00360870361328125,
-0.01125335693359375,
-0.041107177734375,
-0.030303955078125,
-0.02301025390625,
0.006748199462890625,
0.06756591796875,
-0.0250396728515625,
0.0294036865234375,
-0.01317596435546875,
-0.014404296875,
-0.01617431640625,
0.0106048583984375,
0.041259765625,
0.0223236083984375,
-0.007381439208984375,
-0.0209197998046875,
-0.052703857421875,
-0.01470184326171875,
-0.007171630859375,
-0.026336669921875,
-0.006137847900390625,
0.000545501708984375,
-0.01393890380859375,
0.024383544921875,
-0.0186004638671875,
0.0009036064147949219,
0.009033203125,
-0.0029201507568359375,
-0.0257415771484375,
0.031463623046875,
-0.0013399124145507812,
0.042449951171875,
0.031707763671875,
0.0142364501953125,
0.0196533203125,
0.0213165283203125,
-0.0145721435546875,
-0.0170440673828125,
-0.004810333251953125,
-0.025421142578125,
0.031646728515625,
-0.01068878173828125,
0.023406982421875,
-0.05621337890625,
-0.0017824172973632812,
0.006229400634765625,
0.049560546875,
-0.0309295654296875,
-0.0145721435546875,
-0.0195770263671875,
0.040496826171875,
-0.05706787109375,
0.0261383056640625,
0.008880615234375,
-0.0491943359375,
-0.0144195556640625,
0.0023746490478515625,
0.00919342041015625,
0.04345703125,
-0.048614501953125,
0.0096588134765625,
0.026031494140625,
-0.026123046875,
0.03692626953125,
0.06805419921875,
0.0031414031982421875,
0.034820556640625,
0.00720977783203125,
-0.009063720703125,
-0.0005025863647460938,
0.039306640625,
-0.00806427001953125,
-0.0281829833984375,
0.07574462890625,
0.010833740234375,
-0.041168212890625,
0.006404876708984375,
-0.041259765625,
0.0182952880859375,
-0.009063720703125,
0.029815673828125,
-0.000037789344787597656,
0.0079345703125,
-0.0024356842041015625,
-0.037445068359375,
0.003925323486328125,
-0.054107666015625,
0.0127716064453125,
-0.00909423828125,
0.09442138671875,
0.015411376953125,
-0.035430908203125,
0.023681640625,
-0.040496826171875,
0.0189056396484375,
-0.024871826171875,
0.01119232177734375,
0.0096588134765625,
-0.058319091796875,
0.01245880126953125,
0.036468505859375,
0.0175018310546875,
-0.009307861328125,
-0.0058746337890625,
-0.0164337158203125,
-0.0191650390625,
-0.037689208984375,
0.0014629364013671875,
-0.03668212890625,
-0.0007543563842773438,
-0.04644775390625,
0.006744384765625,
0.02874755859375,
0.0439453125,
-0.00960540771484375,
-0.01025390625,
0.034149169921875,
-0.01003265380859375,
-0.01276397705078125,
-0.02069091796875,
0.035675048828125,
0.031341552734375,
-0.05426025390625,
0.02069091796875,
-0.00896453857421875,
-0.023773193359375,
-0.0063934326171875,
0.0223388671875,
0.09149169921875,
-0.06591796875,
-0.0104217529296875,
0.023956298828125,
0.02191162109375,
-0.01404571533203125,
-0.00494384765625,
0.0174560546875,
-0.0845947265625,
-0.0692138671875,
0.006683349609375,
-0.06463623046875,
-0.035919189453125,
-0.0347900390625,
-0.07928466796875,
0.12335205078125,
-0.003509521484375,
0.040740966796875,
-0.0025539398193359375,
0.042999267578125,
-0.0212860107421875,
0.003780364990234375,
0.003692626953125,
0.007160186767578125,
0.01422882080078125,
-0.01971435546875,
-0.017730712890625,
-0.003101348876953125,
-0.006359100341796875,
0.051666259765625,
0.01532745361328125,
0.0059356689453125,
-0.0096435546875,
-0.008392333984375,
0.033416748046875,
0.05584716796875,
0.0197906494140625,
-0.0028476715087890625,
0.0095977783203125,
0.0185394287109375,
0.03143310546875,
-0.047210693359375,
0.032318115234375,
-0.0626220703125,
0.0180511474609375,
0.02276611328125,
0.02703857421875,
0.049591064453125,
-0.01546478271484375,
0.0197906494140625,
-0.0225067138671875,
-0.0013790130615234375,
0.031280517578125,
-0.0236663818359375,
-0.02606201171875,
0.05755615234375,
0.0222625732421875,
-0.056304931640625,
-0.03887939453125,
-0.038848876953125,
0.045623779296875,
-0.01410675048828125,
-0.0210723876953125,
0.0204925537109375,
0.00975799560546875,
0.001972198486328125,
0.00144195556640625,
-0.0094451904296875,
0.00914764404296875,
-0.00019431114196777344,
0.01509857177734375,
0.00691986083984375,
-0.0027332305908203125,
-0.0267791748046875,
-0.006656646728515625,
0.0216827392578125,
0.011138916015625,
-0.0235748291015625,
0.006931304931640625,
0.0200042724609375,
0.0294952392578125,
-0.0026531219482421875,
-0.0263824462890625,
0.032196044921875,
0.003765106201171875,
0.00872802734375,
-0.0221710205078125,
0.0180206298828125,
0.020172119140625,
0.01523590087890625,
0.01064300537109375,
-0.0032958984375,
-0.04840087890625,
0.0333251953125,
-0.055206298828125,
0.0362548828125,
0.0285186767578125,
0.05072021484375,
0.0213165283203125,
0.0244903564453125,
-0.01279449462890625,
-0.01206207275390625,
-0.00726318359375,
0.037872314453125,
-0.0180206298828125,
0.0119171142578125,
-0.0260009765625,
-0.05413818359375,
-0.0008039474487304688,
0.033935546875,
0.040130615234375,
0.001079559326171875,
0.035736083984375,
-0.0131072998046875,
-0.039703369140625,
0.010467529296875,
0.00608062744140625,
-0.0235595703125,
0.033416748046875,
-0.0136260986328125,
0.0152435302734375,
0.0178680419921875,
-0.010284423828125,
-0.012542724609375,
-0.0022792816162109375,
0.06396484375,
-0.033203125,
0.0229949951171875,
-0.00429534912109375,
-0.00225067138671875,
0.0277099609375,
0.0031871795654296875,
0.0231475830078125,
0.01352691650390625,
-0.06463623046875,
-0.03253173828125,
-0.01454925537109375,
-0.029754638671875,
0.0204620361328125,
0.035797119140625,
-0.00579833984375,
0.0125274658203125,
0.01197052001953125,
-0.0086822509765625,
-0.002803802490234375,
0.0033626556396484375,
0.001743316650390625,
0.0146026611328125,
0.031982421875,
-0.002712249755859375,
-0.03765869140625,
-0.032379150390625,
-0.01512908935546875,
0.03314208984375,
0.0234222412109375,
0.06292724609375,
-0.0245208740234375,
0.01482391357421875,
0.0230865478515625,
-0.0023021697998046875,
0.0104522705078125,
0.0140380859375,
0.015869140625,
-0.0167236328125,
0.007228851318359375,
-0.0187530517578125,
0.00948333740234375,
0.043853759765625,
0.00373077392578125,
-0.0102691650390625,
-0.00951385498046875,
-0.0034637451171875,
0.0170135498046875,
0.01328277587890625,
0.0016002655029296875,
-0.0292510986328125,
-0.023468017578125,
-0.040191650390625,
-0.012481689453125,
0.039031982421875,
0.01172637939453125,
-0.01312255859375,
-0.002025604248046875,
0.02276611328125,
0.01702880859375,
0.00247955322265625,
0.039825439453125,
0.0194244384765625,
0.022430419921875,
-0.04193115234375,
-0.01519012451171875,
0.01111602783203125,
-0.020111083984375,
0.00682830810546875,
0.014312744140625,
0.05181884765625,
-0.01404571533203125,
-0.0226593017578125,
-0.01396942138671875,
0.051239013671875,
0.034393310546875,
0.00460052490234375,
0.00946807861328125,
0.027191162109375,
-0.048828125,
-0.0298919677734375,
-0.01207733154296875,
-0.033966064453125,
-0.0679931640625,
0.021331787109375,
0.004978179931640625,
-0.0222625732421875,
0.01617431640625,
-0.0210418701171875,
-0.0189971923828125,
0.048370361328125,
-0.0135040283203125,
-0.0220947265625,
-0.0028133392333984375,
-0.024932861328125,
0.038604736328125,
-0.006832122802734375,
0.056610107421875,
-0.034698486328125,
0.0207366943359375,
-0.04205322265625,
-0.07275390625,
-0.058135986328125,
0.0753173828125,
-0.057281494140625,
0.04327392578125,
0.08074951171875,
-0.0552978515625,
-0.03680419921875,
0.01800537109375,
0.043609619140625,
0.0673828125,
0.00033211708068847656,
-0.027679443359375,
-0.005462646484375,
0.024688720703125,
-0.00438690185546875,
-0.0289459228515625,
0.001720428466796875,
-0.00229644775390625,
0.00567626953125,
0.0032291412353515625,
0.0105133056640625,
0.018218994140625,
-0.0284576416015625,
-0.0467529296875,
0.07550048828125,
-0.01544952392578125,
-0.0254669189453125,
-0.04864501953125,
0.0303497314453125,
0.0279693603515625,
-0.0080413818359375,
-0.01432037353515625,
-0.01090240478515625,
-0.048095703125,
0.00553131103515625,
0.0030155181884765625,
-0.0014486312866210938,
0.052215576171875,
0.005077362060546875,
-0.03228759765625,
-0.025054931640625,
-0.03369140625,
-0.03131103515625,
-0.01465606689453125,
0.00621795654296875,
0.025299072265625,
0.037384033203125,
-0.0084381103515625,
-0.0021648406982421875,
-0.01137542724609375,
-0.01529693603515625,
-0.0380859375,
0.0101165771484375,
-0.06341552734375,
0.00832366943359375,
0.11541748046875,
0.10992431640625,
0.034393310546875,
-0.052825927734375,
0.005100250244140625,
-0.007091522216796875,
-0.05157470703125,
-0.0163116455078125,
0.0255584716796875,
-0.0345458984375,
0.0010089874267578125,
-0.0246734619140625,
-0.00738525390625,
-0.02056884765625,
-0.0328369140625,
-0.039276123046875,
-0.034423828125,
-0.026641845703125,
0.011474609375,
0.008392333984375,
-0.0426025390625,
0.08209228515625,
-0.029449462890625,
0.0254058837890625,
0.0217132568359375,
0.02410888671875,
0.049713134765625,
0.052581787109375,
0.0029850006103515625,
-0.005023956298828125,
-0.022125244140625,
-0.020843505859375,
0.0208587646484375,
-0.002918243408203125,
0.0240325927734375,
-0.01250457763671875,
-0.01366424560546875,
0.034332275390625,
0.0174713134765625,
0.0257720947265625,
-0.006771087646484375,
0.040679931640625,
0.0190277099609375,
0.026885986328125,
-0.03607177734375,
0.0110015869140625,
-0.01537322998046875,
-0.007801055908203125,
-0.0042266845703125,
0.0222015380859375,
0.06939697265625,
-0.0236053466796875,
-0.002040863037109375,
-0.01470947265625,
-0.0210723876953125,
0.00615692138671875,
-0.0279998779296875,
-0.04583740234375,
-0.044677734375,
-0.0167236328125
] |
1d6517b068db0307d86745f340b8484cc1cc2520
|
Wordpress Stackexchange
Q: Avoiding using a loop to access a single post Sometimes I want to access one particular CPT to extract something from it, for example a custom field value:
$group = new WP_Query( array(
'post_type' => 'group',
'p' => $group_id
) );
while ( $group->have_posts() ) : $group->the_post();
$group_type = get_post_meta($post->ID, "group_type", $single = true);
endwhile;
However the purpose of a loop is to access more than one element so I dislike using a loop for a single post. Is there a way to do exactly the same thing (accessing this custom field value) without using a loop?
A: Your WP_Query object holds an array of posts. Just take first entry:
get_post_meta( $group->posts[0]->ID, "group_type", true );
Note: the third parameter for get_post_meta() expects a keyword: true or false, not $single = true. It works, but it looks rather odd. :)
|
Q: Avoiding using a loop to access a single post Sometimes I want to access one particular CPT to extract something from it, for example a custom field value:
$group = new WP_Query( array(
'post_type' => 'group',
'p' => $group_id
) );
while ( $group->have_posts() ) : $group->the_post();
$group_type = get_post_meta($post->ID, "group_type", $single = true);
endwhile;
However the purpose of a loop is to access more than one element so I dislike using a loop for a single post. Is there a way to do exactly the same thing (accessing this custom field value) without using a loop?
A: Your WP_Query object holds an array of posts. Just take first entry:
get_post_meta( $group->posts[0]->ID, "group_type", true );
Note: the third parameter for get_post_meta() expects a keyword: true or false, not $single = true. It works, but it looks rather odd. :)
A: how about get_post?
$post = get_post( $p );
$group_type = get_post_meta( $post->ID, 'group_type', true );
A: You can use only half of a loop. Well, it's not even a loop, just the check if we received any post. Simply use the (WP_Query) objects methods. The example wraps it up in a function, so you could even use it as Template Tag:
function wpse83212_get_group_post( $group_id )
{
add_filter( 'post_limits', 'wpse83212_group_post_limit' );
$group = new WP_Query( array(
'post_type' => 'group'
,'p' => $group_id
) );
// Did the query return anything?
if ( $group->have_posts() )
{
// Setup the post data
$group->the_post();
// Now we have access to the `$GLOBALS['post']` object
// as well as to any functions that only work inside the Loop:
return get_post_meta( get_the_ID(), 'group_type', true );
}
else
{
return NULL;
}
}
function wpse83212_group_post_limit( $limit )
{
remove_filter( current_filter(), __FUNCTION__, 10 );
return 1;
}
Then simply use it in any template: $group_meta = wpse83212_get_group_post( 12 );. If the value now is NULL there was no such post. Else you'd get the single value returned.
|
wordpress
|
{
"language": "en",
"length": 319,
"provenance": "stackexchange_00019.jsonl.gz:428294",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83212"
}
|
[
0.049957275390625,
-0.0164794921875,
0.0039215087890625,
-0.0083465576171875,
-0.004924774169921875,
-0.0184478759765625,
0.04315185546875,
-0.015960693359375,
0.031585693359375,
0.029449462890625,
-0.032958984375,
-0.0233154296875,
-0.023529052734375,
-0.0163421630859375,
-0.03387451171875,
-0.0224456787109375,
0.0248565673828125,
0.003376007080078125,
0.038970947265625,
-0.004230499267578125,
0.0302886962890625,
-0.001293182373046875,
0.0162353515625,
0.0098876953125,
0.02685546875,
-0.03924560546875,
0.01473236083984375,
0.0021877288818359375,
0.01158905029296875,
-0.007579803466796875,
0.0161590576171875,
-0.004360198974609375,
0.0218505859375,
0.00026726722717285156,
0.0035190582275390625,
-0.0007386207580566406,
0.005702972412109375,
0.00505828857421875,
-0.0007843971252441406,
0.023162841796875,
-0.0092926025390625,
0.016876220703125,
-0.03338623046875,
0.0291748046875,
-0.04888916015625,
-0.032318115234375,
-0.0195465087890625,
-0.03204345703125,
0.0616455078125,
-0.0022754669189453125,
0.01526641845703125,
0.0202178955078125,
0.00809478759765625,
0.0335693359375,
-0.032562255859375,
0.005687713623046875,
-0.005283355712890625,
-0.097412109375,
0.03350830078125,
-0.0198822021484375,
-0.0180816650390625,
-0.06573486328125,
0.0626220703125,
-0.0021839141845703125,
-0.005466461181640625,
0.0020923614501953125,
0.004558563232421875,
0.0188751220703125,
-0.0301513671875,
-0.019195556640625,
0.022979736328125,
-0.0158538818359375,
0.041015625,
-0.0077362060546875,
-0.010986328125,
-0.05389404296875,
0.004161834716796875,
-0.05401611328125,
0.012664794921875,
-0.0005860328674316406,
-0.056182861328125,
-0.0665283203125,
-0.06854248046875,
0.00846099853515625,
-0.0010805130004882812,
0.0531005859375,
-0.022369384765625,
0.0062103271484375,
0.0016317367553710938,
-0.046356201171875,
-0.0254364013671875,
0.00870513916015625,
0.00907135009765625,
-0.05224609375,
-0.048126220703125,
-0.0626220703125,
0.019012451171875,
0.025421142578125,
-0.0193023681640625,
-0.0198822021484375,
0.005153656005859375,
-0.04486083984375,
0.00370025634765625,
-0.01947021484375,
0.0185546875,
-0.00064849853515625,
0.0014791488647460938,
0.01332855224609375,
0.04461669921875,
0.0207977294921875,
-0.01325225830078125,
0.038787841796875,
-0.00926971435546875,
-0.0184478759765625,
-0.03143310546875,
0.01380157470703125,
-0.0254669189453125,
-0.005962371826171875,
0.0006113052368164062,
-0.0165557861328125,
0.01265716552734375,
0.041717529296875,
-0.00133514404296875,
-0.043212890625,
0.00829315185546875,
0.0036602020263671875,
-0.026092529296875,
-0.03460693359375,
-0.005336761474609375,
0.0267181396484375,
-0.01617431640625,
-0.023162841796875,
0.029388427734375,
0.044708251953125,
0.0278472900390625,
-0.0164031982421875,
-0.01123809814453125,
0.0158538818359375,
0.0017547607421875,
0.005191802978515625,
0.02374267578125,
-0.060516357421875,
-0.025146484375,
0.03924560546875,
-0.0123291015625,
0.01377105712890625,
0.0162200927734375,
-0.006114959716796875,
-0.0031909942626953125,
-0.01061248779296875,
-0.0521240234375,
-0.00004947185516357422,
0.01119232177734375,
-0.01062774658203125,
-0.0018978118896484375,
-0.04461669921875,
0.0009479522705078125,
-0.0247955322265625,
0.034912109375,
-0.035614013671875,
0.0304412841796875,
-0.00720977783203125,
-0.01268768310546875,
-0.00782012939453125,
-0.03216552734375,
0.015899658203125,
-0.00887298583984375,
-0.00714874267578125,
0.00637054443359375,
0.025421142578125,
0.0172271728515625,
-0.001499176025390625,
0.0096588134765625,
-0.01099395751953125,
-0.01413726806640625,
-0.0188751220703125,
0.00948333740234375,
0.0003204345703125,
0.0137176513671875,
0.010406494140625,
-0.043060302734375,
-0.044586181640625,
0.01898193359375,
-0.01534271240234375,
-0.057403564453125,
0.04254150390625,
-0.0005178451538085938,
0.01361083984375,
0.0018787384033203125,
-0.00771331787109375,
0.0743408203125,
0.032196044921875,
-0.019775390625,
0.0294036865234375,
0.01050567626953125,
-0.0419921875,
-0.0098419189453125,
-0.0122528076171875,
-0.004482269287109375,
-0.02899169921875,
0.0179290771484375,
0.01030731201171875,
-0.0261993408203125,
-0.00003743171691894531,
-0.040130615234375,
-0.01230621337890625,
-0.00208282470703125,
0.031036376953125,
-0.02734375,
-0.0031337738037109375,
0.021026611328125,
0.00328826904296875,
-0.016387939453125,
-0.0021800994873046875,
-0.00701141357421875,
0.0103302001953125,
0.005832672119140625,
0.03607177734375,
-0.0147552490234375,
-0.0092926025390625,
-0.0109100341796875,
-0.0295257568359375,
-0.001369476318359375,
0.06610107421875,
0.0943603515625,
0.0120697021484375,
0.00397491455078125,
-0.0137481689453125,
0.060150146484375,
0.03253173828125,
-0.08392333984375,
0.00007939338684082031,
-0.0009889602661132812,
0.0126495361328125,
-0.019195556640625,
0.01160430908203125,
0.00400543212890625,
-0.04339599609375,
-0.0006108283996582031,
0.04644775390625,
0.034942626953125,
0.0252532958984375,
-0.01499176025390625,
-0.011383056640625,
0.047515869140625,
-0.0261688232421875,
0.0009918212890625,
-0.01800537109375,
0.0321044921875,
0.0557861328125,
-0.0293426513671875,
0.004817962646484375,
0.0282440185546875,
0.0006732940673828125,
0.0122528076171875,
0.023284912109375,
-0.0033283233642578125,
0.03387451171875,
-0.02398681640625,
-0.01259613037109375,
-0.0027103424072265625,
-0.0270538330078125,
-0.004119873046875,
-0.006893157958984375,
0.065673828125,
0.004840850830078125,
0.06195068359375,
0.041229248046875,
-0.0293426513671875,
0.0133056640625,
-0.0055389404296875,
0.0071258544921875,
-0.0093536376953125,
-0.0134735107421875,
-0.033355712890625,
0.01280975341796875,
-0.041900634765625,
0.024688720703125,
0.00936126708984375,
-0.01751708984375,
-0.01474761962890625,
-0.0027523040771484375,
-0.0214385986328125,
-0.00870513916015625,
0.01291656494140625,
-0.01334381103515625,
0.00939178466796875,
0.00665283203125,
0.00399017333984375,
-0.007152557373046875,
0.0224151611328125,
0.01555633544921875,
-0.0362548828125,
0.038360595703125,
-0.0196990966796875,
-0.0247650146484375,
0.019775390625,
-0.0159454345703125,
0.022735595703125,
-0.0294036865234375,
0.042572021484375,
0.03887939453125,
-0.023284912109375,
0.0248870849609375,
-0.01275634765625,
-0.035064697265625,
-0.044342041015625,
0.044342041015625,
-0.0018100738525390625,
-0.048095703125,
-0.040802001953125,
0.0243072509765625,
0.0233612060546875,
0.1015625,
0.001163482666015625,
-0.047088623046875,
0.043182373046875,
0.04052734375,
-0.0672607421875,
-0.12255859375,
0.06256103515625,
-0.1038818359375,
0.002269744873046875,
-0.06036376953125,
-0.06689453125,
-0.006259918212890625,
-0.024688720703125,
-0.0007429122924804688,
0.007114410400390625,
0.02264404296875,
-0.0845947265625,
-0.0283966064453125,
-0.0767822265625,
-0.0166473388671875,
-0.0159149169921875,
0.0207366943359375,
0.00797271728515625,
0.03375244140625,
0.01021575927734375,
-0.031768798828125,
-0.0015020370483398438,
0.0184326171875,
-0.04119873046875,
-0.0219879150390625,
0.022430419921875,
-0.0149383544921875,
-0.026824951171875,
0.0169219970703125,
-0.0592041015625,
-0.020233154296875,
0.005756378173828125,
-0.052276611328125,
0.04864501953125,
0.0307464599609375,
0.08355712890625,
0.0125579833984375,
-0.0823974609375,
0.11065673828125,
0.092529296875,
0.00861358642578125,
-0.042236328125,
-0.00634765625,
-0.051666259765625,
-0.0242156982421875,
0.0122528076171875,
0.026092529296875,
-0.042449951171875,
0.04998779296875,
0.0136260986328125,
-0.0006785392761230469,
-0.0277099609375,
-0.0150299072265625,
0.029144287109375,
0.023895263671875,
0.050506591796875,
0.0248565673828125,
0.015289306640625,
-0.022613525390625,
-0.01068115234375,
0.00025391578674316406,
-0.0114898681640625,
0.0097198486328125,
-0.04779052734375,
-0.007457733154296875,
-0.0084686279296875,
0.062469482421875,
0.02264404296875,
0.0595703125,
-0.03863525390625,
-0.0499267578125,
-0.047698974609375,
0.08868408203125,
-0.0194091796875,
-0.015533447265625,
-0.0201568603515625,
0.01275634765625,
-0.0269012451171875,
-0.06121826171875,
-0.0115203857421875,
0.0008068084716796875,
-0.037353515625,
-0.006290435791015625,
-0.0157470703125,
-0.004978179931640625,
0.01181793212890625,
0.00800323486328125,
-0.01067352294921875,
-0.040771484375,
0.035400390625,
-0.03399658203125,
0.0002970695495605469,
-0.009490966796875,
-0.002544403076171875,
-0.02886962890625,
-0.0111083984375,
-0.0235595703125,
-0.06817626953125,
-0.02447509765625,
0.039764404296875,
0.054840087890625,
-0.0278472900390625,
0.01099395751953125,
-0.000766754150390625,
0.053131103515625,
0.005401611328125,
-0.0030384063720703125,
-0.0274200439453125,
-0.015289306640625,
-0.0125885009765625,
0.039581298828125,
-0.02032470703125,
0.018585205078125,
-0.008209228515625,
-0.04461669921875,
-0.020172119140625,
-0.0389404296875,
-0.050506591796875,
-0.039031982421875,
-0.041015625,
0.005893707275390625,
-0.006847381591796875,
-0.0071258544921875,
-0.02459716796875,
0.0362548828125,
-0.03399658203125,
0.0273590087890625,
-0.021759033203125,
-0.040802001953125,
0.055389404296875,
0.059234619140625,
-0.0034999847412109375,
-0.0032711029052734375,
0.0440673828125,
0.0029964447021484375,
-0.053070068359375,
-0.0999755859375,
0.00945281982421875,
0.044342041015625,
-0.0201568603515625,
0.040771484375,
0.026641845703125,
-0.0151519775390625,
0.05792236328125,
0.00443267822265625,
0.0003654956817626953,
-0.01097869873046875,
0.033538818359375,
-0.0127410888671875,
-0.0168304443359375,
0.0235595703125,
-0.035858154296875,
0.015289306640625,
0.039642333984375,
0.0245513916015625,
-0.054107666015625,
0.042999267578125,
0.0550537109375,
-0.0092926025390625,
-0.01340484619140625,
-0.033355712890625,
-0.054107666015625,
0.031494140625,
0.0106201171875,
-0.0022068023681640625,
0.009796142578125,
0.002246856689453125,
0.0161590576171875,
-0.023162841796875,
0.00722503662109375,
0.002651214599609375,
0.049957275390625,
0.0164947509765625,
0.0221099853515625,
0.04754638671875,
0.0038166046142578125,
-0.048553466796875,
-0.0015106201171875,
-0.0033817291259765625,
-0.0198822021484375,
-0.05059814453125,
0.004863739013671875,
0.0118408203125,
0.0296783447265625,
0.0294036865234375,
-0.005764007568359375,
-0.00293731689453125,
0.0189971923828125,
-0.005657196044921875,
-0.006931304931640625,
0.01126861572265625,
-0.0011768341064453125,
-0.01108551025390625,
0.00799560546875,
0.0192108154296875,
-0.0092620849609375,
0.0070953369140625,
0.049957275390625,
-0.0168304443359375,
0.025177001953125,
-0.0213623046875,
0.0229949951171875,
0.021484375,
0.027374267578125,
0.00335693359375,
-0.00896453857421875,
-0.00409698486328125,
0.013519287109375,
0.008270263671875,
-0.045166015625,
-0.0296173095703125,
0.036956787109375,
0.044830322265625,
0.0269317626953125,
-0.00853729248046875,
-0.0008764266967773438,
0.00739288330078125,
-0.035980224609375,
0.033355712890625,
0.0120391845703125,
-0.04327392578125,
-0.017059326171875,
-0.01470184326171875,
0.0007038116455078125,
-0.0011749267578125,
0.01000213623046875,
0.01302337646484375,
-0.00835418701171875,
0.01107025146484375,
-0.06976318359375,
0.00201416015625,
-0.0229644775390625,
0.0002491474151611328,
0.01256561279296875,
0.006465911865234375,
-0.00666046142578125,
-0.00217437744140625,
-0.004955291748046875,
-0.01525115966796875,
-0.03228759765625,
0.0280609130859375,
0.0149078369140625,
0.061187744140625,
-0.049957275390625,
-0.0281982421875,
-0.0377197265625,
-0.0225830078125,
0.097900390625,
0.059906005859375,
0.00021779537200927734,
0.00948333740234375,
-0.03643798828125,
-0.01519775390625,
-0.0227508544921875,
-0.074462890625,
-0.0209503173828125,
-0.0198516845703125,
-0.006622314453125,
0.00356292724609375,
0.0297393798828125,
0.0325927734375,
-0.004123687744140625,
0.024932861328125,
-0.0265655517578125,
0.0163116455078125,
-0.03521728515625,
0.033355712890625,
0.0438232421875,
0.03460693359375,
0.0013713836669921875,
0.03076171875,
0.016204833984375,
-0.0205841064453125,
0.0006999969482421875,
-0.0692138671875,
-0.0087890625,
-0.00001424551010131836,
0.01067352294921875,
0.02716064453125,
-0.0232696533203125,
0.01071929931640625,
-0.0194091796875,
-0.01486968994140625,
0.00394439697265625,
-0.0238800048828125,
0.040618896484375,
-0.01873779296875,
-0.032257080078125,
0.036651611328125,
0.0005254745483398438,
-0.0269012451171875,
0.008087158203125,
-0.0163421630859375,
0.0157623291015625,
0.026123046875,
-0.00513458251953125,
-0.01270294189453125,
-0.01357269287109375,
0.01251220703125,
0.0721435546875,
0.0214385986328125,
0.042236328125,
0.004833221435546875,
0.00966644287109375,
0.00838470458984375,
-0.01354217529296875,
0.0117950439453125,
0.0172271728515625,
0.049407958984375,
-0.01280975341796875,
-0.018280029296875,
0.037261962890625,
-0.0262298583984375,
0.01111602783203125,
0.00604248046875,
0.0472412109375,
-0.0307769775390625,
0.0089111328125,
0.033477783203125,
-0.01132965087890625,
0.0157470703125,
0.01363372802734375,
-0.0111541748046875,
-0.0149078369140625,
0.0022373199462890625,
0.0077667236328125,
-0.0130157470703125,
0.0027370452880859375,
0.0014057159423828125,
0.0219879150390625,
-0.0281982421875,
0.0224761962890625,
-0.0072174072265625,
-0.0236053466796875,
-0.00567626953125,
0.0278472900390625,
-0.03021240234375,
-0.0200042724609375,
0.006519317626953125,
-0.0005502700805664062,
-0.033782958984375,
-0.11932373046875,
-0.047943115234375,
-0.0148773193359375,
-0.04315185546875,
0.0128631591796875,
0.06280517578125,
-0.023284912109375,
0.0458984375,
0.00612640380859375,
0.0094451904296875,
0.01230621337890625,
-0.020294189453125,
-0.0799560546875,
-0.053253173828125,
-0.028900146484375,
0.053558349609375,
0.0059661865234375,
0.0408935546875,
0.01444244384765625,
-0.0263214111328125,
-0.004611968994140625,
-0.04315185546875,
0.0250244140625,
0.0014848709106445312,
-0.0264434814453125,
0.0160980224609375,
-0.0059814453125,
-0.00914764404296875,
0.0187530517578125,
-0.0084991455078125,
0.00960540771484375,
-0.00197601318359375,
0.006206512451171875,
-0.043121337890625,
-0.00040221214294433594,
0.007343292236328125,
-0.01418304443359375,
0.0389404296875,
0.0152740478515625,
-0.01324462890625,
0.034149169921875,
0.006626129150390625,
-0.036376953125,
-0.0007996559143066406,
-0.035491943359375,
0.045166015625,
-0.0024967193603515625,
0.042083740234375,
-0.07373046875,
-0.0188751220703125,
-0.01061248779296875,
0.0384521484375,
0.04852294921875,
0.02056884765625,
-0.07415771484375,
-0.009002685546875,
0.023406982421875,
0.06549072265625,
0.0236663818359375,
0.046112060546875,
0.0296478271484375,
0.0833740234375,
0.0858154296875,
-0.0382080078125,
0.0249786376953125,
0.0272216796875,
0.0061798095703125,
0.07940673828125,
0.0260009765625,
0.0167388916015625,
0.018798828125,
-0.0037517547607421875,
-0.0465087890625,
0.01100921630859375,
0.0251312255859375,
0.022125244140625,
0.0118255615234375,
0.0261993408203125,
0.0142974853515625,
-0.0228118896484375,
0.005420684814453125,
-0.031707763671875,
0.03973388671875,
-0.0182952880859375,
0.05615234375,
0.00455474853515625,
0.005710601806640625,
0.0794677734375,
-0.039703369140625,
0.00586700439453125,
-0.0021915435791015625,
-0.01261138916015625,
0.0271453857421875,
-0.017486572265625,
0.00003814697265625,
-0.05780029296875,
0.0692138671875,
0.039215087890625,
0.0282745361328125,
-0.0677490234375,
-0.0285186767578125,
0.006595611572265625,
-0.0003910064697265625,
0.00992584228515625,
-0.01497650146484375,
0.005054473876953125,
0.027313232421875,
0.051177978515625,
-0.047149658203125,
0.005527496337890625,
0.03521728515625,
0.01366424560546875,
-0.0108795166015625,
-0.019561767578125,
-0.025115966796875,
-0.004940032958984375,
-0.0235595703125,
0.005931854248046875,
0.021240234375,
0.04779052734375,
0.0230865478515625,
0.0204010009765625,
-0.0206298828125,
-0.01276397705078125,
-0.0014057159423828125,
0.025421142578125,
-0.0204315185546875,
0.002086639404296875,
-0.005611419677734375,
-0.03851318359375,
-0.005146026611328125,
0.016143798828125,
0.051605224609375,
0.022216796875,
0.07232666015625,
0.03887939453125,
-0.0247802734375,
0.011383056640625,
0.031829833984375,
-0.01544189453125,
-0.0255279541015625,
-0.034393310546875,
-0.0187835693359375,
0.0007724761962890625,
-0.0011701583862304688,
0.0012912750244140625,
0.0189971923828125,
0.0014581680297851562,
0.050201416015625,
0.01227569580078125,
0.0156707763671875,
0.0009031295776367188,
0.031524658203125,
-0.0157012939453125,
0.060516357421875,
0.052093505859375,
-0.0260009765625,
-0.0009703636169433594,
-0.00634002685546875,
-0.062744140625,
0.00908660888671875,
0.034423828125,
-0.0175323486328125,
0.01702880859375,
0.0008635520935058594,
0.04827880859375,
-0.001617431640625,
-0.0302276611328125,
-0.0115814208984375,
-0.038970947265625,
0.04449462890625,
-0.00817108154296875,
-0.08660888671875,
-0.042816162109375,
-0.037353515625,
0.01751708984375,
0.0233306884765625,
0.0309906005859375,
0.0291595458984375,
0.033447265625,
0.0016546249389648438,
0.00516510009765625,
0.017578125,
0.00931549072265625,
0.004589080810546875,
0.024383544921875,
0.0110015869140625,
-0.0236663818359375,
0.05889892578125,
0.007518768310546875,
0.0625,
-0.052337646484375,
-0.040008544921875,
0.014068603515625,
0.02197265625,
-0.01557159423828125,
-0.00603485107421875,
-0.011444091796875,
-0.015960693359375,
-0.0296783447265625,
-0.01198577880859375,
0.0675048828125,
0.07537841796875,
0.0005764961242675781,
-0.036102294921875,
-0.022613525390625,
-0.035003662109375,
0.0345458984375,
0.02349853515625,
0.01519012451171875,
0.0156402587890625,
-0.0255584716796875,
0.0099029541015625,
-0.023406982421875,
-0.0256195068359375,
0.03875732421875,
-0.0018434524536132812,
0.01300811767578125,
0.0001373291015625,
0.02880859375,
0.017333984375,
0.0103912353515625,
0.047454833984375,
-0.0106964111328125,
0.0029850006103515625,
0.0173187255859375,
0.00905609130859375,
-0.046112060546875,
-0.019195556640625,
-0.0305633544921875,
-0.037445068359375,
0.005084991455078125,
0.0086822509765625,
-0.03192138671875,
-0.0218658447265625,
-0.031951904296875,
-0.0548095703125,
0.0203094482421875,
-0.002017974853515625,
-0.027191162109375,
-0.011199951171875,
-0.019134521484375,
-0.004276275634765625,
-0.03204345703125,
-0.0250244140625,
0.0005645751953125,
0.030853271484375,
-0.0218353271484375,
0.004364013671875,
-0.0218963623046875,
-0.00321197509765625,
0.002887725830078125,
0.0128631591796875,
-0.007503509521484375,
-0.021942138671875,
0.004245758056640625,
0.040191650390625,
0.0254058837890625,
0.0537109375,
0.034332275390625,
0.00933837890625,
-0.0039520263671875,
0.0347900390625,
-0.046905517578125,
-0.066650390625,
0.03094482421875,
-0.042938232421875,
-0.01023101806640625,
-0.039794921875,
0.003223419189453125,
0.014678955078125,
-0.041015625,
-0.07159423828125,
0.0714111328125,
-0.027099609375,
-0.021453857421875,
-0.051177978515625,
-0.01119232177734375,
0.0179595947265625,
0.0165863037109375,
-0.01526641845703125,
-0.03729248046875,
-0.045745849609375,
0.023345947265625,
0.0193328857421875,
-0.015594482421875,
0.055877685546875,
0.00012886524200439453,
-0.051177978515625,
0.006694793701171875,
-0.005962371826171875,
0.0164337158203125,
0.00693511962890625,
0.019989013671875,
-0.01186370849609375,
-0.0015201568603515625,
-0.06219482421875,
-0.007354736328125,
-0.02691650390625,
0.040283203125,
0.010498046875,
-0.006061553955078125,
-0.051910400390625,
-0.0148468017578125,
0.0657958984375,
0.04986572265625,
0.0214385986328125,
-0.0452880859375,
-0.005184173583984375,
-0.023223876953125,
-0.071533203125,
-0.028839111328125,
0.043670654296875,
-0.08587646484375,
-0.0244140625,
0.0000349879264831543,
-0.0105438232421875,
0.0430908203125,
-0.00792694091796875,
-0.00568389892578125,
0.0093536376953125,
0.01495361328125,
-0.028961181640625,
-0.03662109375,
0.02587890625,
0.00785064697265625,
-0.015167236328125,
-0.02203369140625,
0.0077362060546875,
-0.0143280029296875,
-0.018707275390625,
0.027313232421875,
-0.0070037841796875,
-0.0033931732177734375,
0.01061248779296875,
0.01340484619140625,
0.01177978515625,
0.01038360595703125,
-0.00374603271484375,
-0.0030460357666015625,
-0.0273590087890625,
0.017669677734375,
0.0113372802734375,
0.01444244384765625,
-0.0287322998046875,
0.0239715576171875,
0.0295867919921875,
0.01300811767578125,
-0.005550384521484375,
0.0667724609375,
-0.01131439208984375,
0.029541015625,
0.004962921142578125,
-0.00897979736328125,
0.034637451171875,
-0.02496337890625,
-0.0011196136474609375,
-0.006259918212890625,
-0.027557373046875,
-0.02716064453125,
0.0085906982421875,
0.01320648193359375,
-0.01317596435546875,
0.00510406494140625
] |
33e71b8ce6c21d7bfe074ef126ee0193d5325bba
|
Wordpress Stackexchange
Q: Memorizing syntax I hope the following question is acceptable here.
I rely entirely on copy/paste for most WP functions, however I guess WP veterans don't. Is it important to know by heart the common WP syntax, and if it is, do people actually make an effort to memorize them just like we memorize a piece of poetry or a quote?
A: You don’t have to remember very much. Any decent IDE will help you with auto-complete and an overview of the parsed PHPDoc.
Example from Eclipse:
After typing add_ you get a list of matching function names and constants, a description and an explanation of the parameters … if there is a useful PHPDoc block.
And when you create a new object you get the public methods offered too.
See also this answer for a useful setup.
What you should learn is the order of the main actions:
*
*muplugins_loaded
*plugins_loaded
*after_setup_theme
*init
*wp_loaded
*… and so on.
But that’s really easy. :)
|
Q: Memorizing syntax I hope the following question is acceptable here.
I rely entirely on copy/paste for most WP functions, however I guess WP veterans don't. Is it important to know by heart the common WP syntax, and if it is, do people actually make an effort to memorize them just like we memorize a piece of poetry or a quote?
A: You don’t have to remember very much. Any decent IDE will help you with auto-complete and an overview of the parsed PHPDoc.
Example from Eclipse:
After typing add_ you get a list of matching function names and constants, a description and an explanation of the parameters … if there is a useful PHPDoc block.
And when you create a new object you get the public methods offered too.
See also this answer for a useful setup.
What you should learn is the order of the main actions:
*
*muplugins_loaded
*plugins_loaded
*after_setup_theme
*init
*wp_loaded
*… and so on.
But that’s really easy. :)
A: Not everyone will follow convention, so you can be assured if you are copy-pasting then you are getting a mix-and-match approach from people who do it "right" and do it "wrong" and sometimes the difference between right and wrong is a matter of opinion, lets not forget.
Also this applies to NOT only Syntax Style but also Best Practice methods for using proper WP Core functions over less preferred hack-jobs or unconventional functions to perform certain tasks.
Here are two links that can help you understand what WordPress thinks is acceptable coding standards syntactically, most of which you will find is common practice elsewhere amongst PHP developers;
*
*http://codex.wordpress.org/WordPress_Coding_Standards
*http://make.wordpress.org/core/handbook/coding-standards/
Work with anything long enough and you will begin to memorize good convention, you'll also graduate from copy-pasting, more so to writing your own logic and with that you will adopt convention, standards and best practices because ultimately we want others to be able to read our junk code just the same as you'd expect from others.
|
wordpress
|
{
"language": "en",
"length": 332,
"provenance": "stackexchange_00019.jsonl.gz:428295",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83214"
}
|
[
0.0147552490234375,
-0.01024627685546875,
-0.0291900634765625,
-0.04766845703125,
-0.0006427764892578125,
-0.0021800994873046875,
0.0027408599853515625,
0.03363037109375,
0.00389862060546875,
0.04217529296875,
-0.0309600830078125,
-0.01641845703125,
-0.0035552978515625,
-0.0106353759765625,
-0.04229736328125,
-0.056243896484375,
0.059173583984375,
-0.024993896484375,
0.01552581787109375,
0.01084136962890625,
-0.0113372802734375,
0.05078125,
0.0207366943359375,
0.068115234375,
0.0288848876953125,
-0.05035400390625,
0.0623779296875,
-0.01145172119140625,
0.0262298583984375,
0.002468109130859375,
0.019866943359375,
-0.03363037109375,
0.01462554931640625,
0.025177001953125,
-0.0189971923828125,
0.0096435546875,
-0.0147705078125,
0.01551055908203125,
0.0206756591796875,
0.004627227783203125,
-0.00891876220703125,
0.00301361083984375,
-0.0288238525390625,
-0.01666259765625,
-0.0357666015625,
-0.02197265625,
-0.00494384765625,
-0.0049896240234375,
0.034210205078125,
-0.0462646484375,
-0.004924774169921875,
0.00431060791015625,
0.037261962890625,
-0.044708251953125,
-0.0251922607421875,
-0.02813720703125,
-0.02288818359375,
0.033538818359375,
0.0259246826171875,
0.01239013671875,
-0.02392578125,
0.0062408447265625,
-0.0034236907958984375,
-0.046966552734375,
0.00719451904296875,
-0.01727294921875,
-0.031524658203125,
0.037353515625,
-0.034637451171875,
-0.01287078857421875,
0.02459716796875,
-0.03448486328125,
-0.00218963623046875,
0.0010061264038085938,
0.04437255859375,
-0.023651123046875,
-0.01617431640625,
0.0139617919921875,
0.013427734375,
0.0645751953125,
0.03009033203125,
0.002773284912109375,
-0.015594482421875,
-0.0276336669921875,
0.0300445556640625,
-0.01873779296875,
0.01131439208984375,
-0.004520416259765625,
-0.049896240234375,
-0.06689453125,
-0.032958984375,
-0.023162841796875,
-0.07183837890625,
-0.053619384765625,
-0.01560211181640625,
-0.051422119140625,
-0.00850677490234375,
-0.02899169921875,
-0.024871826171875,
-0.0118560791015625,
-0.00809478759765625,
-0.00836944580078125,
-0.006679534912109375,
0.01800537109375,
0.005474090576171875,
0.055755615234375,
-0.018707275390625,
0.05645751953125,
0.053314208984375,
0.03179931640625,
0.032867431640625,
-0.03717041015625,
-0.00897979736328125,
-0.0330810546875,
0.01061248779296875,
0.0306243896484375,
-0.035614013671875,
0.029327392578125,
0.007648468017578125,
0.0249786376953125,
0.0054168701171875,
0.021453857421875,
-0.01250457763671875,
0.035675048828125,
0.01513671875,
0.0149688720703125,
-0.00702667236328125,
-0.01149749755859375,
0.01465606689453125,
-0.0257568359375,
-0.0322265625,
0.049560546875,
0.0293121337890625,
-0.016448974609375,
-0.035400390625,
0.0077362060546875,
0.0048828125,
-0.009368896484375,
-0.01204681396484375,
0.028106689453125,
-0.06292724609375,
-0.038238525390625,
0.01520538330078125,
-0.050048828125,
0.0601806640625,
0.0255279541015625,
0.025543212890625,
0.004512786865234375,
0.022735595703125,
-0.0816650390625,
0.075439453125,
-0.03961181640625,
0.01305389404296875,
-0.007465362548828125,
-0.054412841796875,
0.0034465789794921875,
-0.060577392578125,
0.0191192626953125,
-0.0038909912109375,
0.002414703369140625,
0.01020050048828125,
-0.025482177734375,
-0.004123687744140625,
0.033447265625,
-0.0025539398193359375,
0.042572021484375,
-0.004119873046875,
0.01232147216796875,
0.00914764404296875,
-0.01910400390625,
-0.005218505859375,
-0.0018510818481445312,
0.00750732421875,
-0.0162811279296875,
0.001354217529296875,
-0.00039839744567871094,
0.018218994140625,
-0.0197296142578125,
0.0157470703125,
0.038848876953125,
-0.0006456375122070312,
-0.0062408447265625,
0.04888916015625,
-0.0143890380859375,
-0.05120849609375,
0.04644775390625,
0.00345611572265625,
0.06622314453125,
0.040863037109375,
0.0015935897827148438,
0.0361328125,
-0.0311431884765625,
-0.040130615234375,
0.0294647216796875,
-0.0154571533203125,
-0.02642822265625,
0.0157470703125,
0.00791168212890625,
-0.007030487060546875,
-0.00998687744140625,
0.005096435546875,
-0.006290435791015625,
-0.0311126708984375,
0.0000762939453125,
-0.09454345703125,
-0.00605010986328125,
-0.0267791748046875,
0.03955078125,
0.031829833984375,
0.00411224365234375,
-0.01236724853515625,
-0.0088653564453125,
0.00765228271484375,
-0.041778564453125,
-0.043609619140625,
0.034942626953125,
-0.0182952880859375,
0.07666015625,
-0.0054931640625,
0.0184173583984375,
0.00699615478515625,
-0.042572021484375,
0.0298614501953125,
0.019287109375,
-0.00914764404296875,
-0.01776123046875,
-0.0306549072265625,
-0.0030651092529296875,
-0.05401611328125,
0.000004649162292480469,
-0.006885528564453125,
0.052276611328125,
0.01511383056640625,
0.035003662109375,
-0.026031494140625,
-0.0301971435546875,
-0.0234527587890625,
-0.0771484375,
0.0194091796875,
0.0701904296875,
0.0175323486328125,
0.043792724609375,
-0.0171051025390625,
0.0233001708984375,
0.044708251953125,
-0.0301666259765625,
0.00914764404296875,
0.019561767578125,
-0.032989501953125,
0.01045989990234375,
0.025390625,
0.020751953125,
0.0016689300537109375,
-0.056549072265625,
-0.01331329345703125,
0.0428466796875,
-0.005313873291015625,
0.012237548828125,
0.024627685546875,
0.002971649169921875,
-0.007015228271484375,
-0.0304718017578125,
0.0004775524139404297,
-0.0298614501953125,
0.0227203369140625,
0.0005984306335449219,
0.0287017822265625,
0.0170135498046875,
-0.023773193359375,
-0.001983642578125,
0.005672454833984375,
0.0006546974182128906,
-0.005573272705078125,
0.0131683349609375,
0.025390625,
0.006687164306640625,
0.006107330322265625,
-0.014617919921875,
-0.00897979736328125,
-0.01122283935546875,
-0.0009446144104003906,
0.032257080078125,
-0.0233612060546875,
-0.01177215576171875,
-0.0080108642578125,
-0.01389312744140625,
-0.00884246826171875,
0.0169525146484375,
0.01462554931640625,
-0.01467132568359375,
0.0029468536376953125,
0.003978729248046875,
-0.0228424072265625,
0.0289154052734375,
0.0270233154296875,
-0.038482666015625,
0.0187835693359375,
0.00421905517578125,
0.014312744140625,
-0.003345489501953125,
0.03192138671875,
0.056976318359375,
-0.00334930419921875,
0.01236724853515625,
0.01059722900390625,
0.003551483154296875,
0.0225830078125,
0.000022470951080322266,
-0.01166534423828125,
0.0291748046875,
-0.090576171875,
-0.0136566162109375,
0.005279541015625,
0.07464599609375,
-0.031341552734375,
-0.0677490234375,
-0.01474761962890625,
0.01114654541015625,
-0.09271240234375,
-0.081787109375,
-0.0227813720703125,
-0.041900634765625,
-0.0105438232421875,
0.00004947185516357422,
-0.0305023193359375,
0.0025882720947265625,
0.000007510185241699219,
0.01074981689453125,
0.039825439453125,
-0.05804443359375,
-0.10443115234375,
-0.09344482421875,
-0.11224365234375,
-0.0621337890625,
-0.002384185791015625,
-0.0031642913818359375,
-0.0016956329345703125,
0.038665771484375,
0.0044708251953125,
-0.00792694091796875,
-0.00182342529296875,
-0.053558349609375,
-0.011932373046875,
-0.017608642578125,
0.007534027099609375,
-0.0294647216796875,
-0.0109405517578125,
0.00701904296875,
-0.0124359130859375,
-0.0126953125,
0.00925445556640625,
-0.0189208984375,
0.03466796875,
0.0169525146484375,
0.045166015625,
0.01332855224609375,
-0.0628662109375,
0.040496826171875,
0.02960205078125,
-0.030181884765625,
-0.0134124755859375,
0.035980224609375,
-0.0004558563232421875,
-0.00971221923828125,
-0.0179901123046875,
-0.0251007080078125,
-0.0014619827270507812,
0.0089263916015625,
-0.011474609375,
0.0085906982421875,
-0.054595947265625,
-0.011627197265625,
0.0240478515625,
-0.000039696693420410156,
0.0158843994140625,
0.0367431640625,
0.030609130859375,
-0.033966064453125,
-0.00611114501953125,
-0.0023860931396484375,
-0.007312774658203125,
-0.008087158203125,
-0.0276031494140625,
-0.023284912109375,
-0.0478515625,
0.0128631591796875,
-0.0848388671875,
0.012847900390625,
-0.0751953125,
0.0031585693359375,
-0.022186279296875,
0.0821533203125,
0.00646209716796875,
-0.0119781494140625,
0.00428009033203125,
0.000055849552154541016,
-0.040924072265625,
0.003414154052734375,
-0.0462646484375,
-0.0019369125366210938,
-0.013214111328125,
-0.024932861328125,
-0.026885986328125,
-0.0094451904296875,
-0.0246124267578125,
0.0257415771484375,
-0.0284576416015625,
-0.029754638671875,
0.04327392578125,
-0.046051025390625,
0.0177764892578125,
0.046661376953125,
-0.005496978759765625,
0.022735595703125,
-0.0428466796875,
-0.0244598388671875,
-0.11083984375,
0.00006258487701416016,
-0.052581787109375,
0.09765625,
0.031158447265625,
-0.02130126953125,
-0.02099609375,
0.04583740234375,
-0.033416748046875,
-0.0196075439453125,
0.019012451171875,
0.050506591796875,
-0.033599853515625,
-0.0121002197265625,
-0.0002505779266357422,
-0.03662109375,
-0.036468505859375,
-0.046630859375,
-0.0117950439453125,
0.01428985595703125,
-0.008453369140625,
0.050750732421875,
-0.003063201904296875,
0.002475738525390625,
0.008514404296875,
-0.01093292236328125,
-0.0355224609375,
0.0167236328125,
-0.01036834716796875,
-0.0162200927734375,
-0.0188751220703125,
-0.01050567626953125,
0.042144775390625,
0.0224761962890625,
-0.00557708740234375,
0.0026454925537109375,
0.042938232421875,
0.01444244384765625,
-0.021392822265625,
-0.0374755859375,
-0.0163116455078125,
0.034027099609375,
0.040924072265625,
-0.0130615234375,
-0.01488494873046875,
-0.048797607421875,
0.0560302734375,
0.01849365234375,
0.005828857421875,
-0.020782470703125,
0.048583984375,
-0.022674560546875,
-0.0135498046875,
0.019622802734375,
-0.037994384765625,
0.016387939453125,
0.0389404296875,
-0.01392364501953125,
-0.016357421875,
0.0015172958374023438,
0.028533935546875,
-0.05914306640625,
0.03271484375,
-0.01678466796875,
-0.048248291015625,
0.01605224609375,
-0.0102691650390625,
0.034637451171875,
0.046844482421875,
-0.0156402587890625,
0.04168701171875,
0.00792694091796875,
-0.004367828369140625,
0.088134765625,
0.08135986328125,
-0.00028634071350097656,
0.04296875,
0.06341552734375,
-0.0309295654296875,
0.00022649765014648438,
-0.0282135009765625,
0.11297607421875,
0.0133209228515625,
-0.059967041015625,
0.0189208984375,
-0.0304718017578125,
0.0166778564453125,
0.02801513671875,
-0.0005617141723632812,
0.007778167724609375,
0.006053924560546875,
-0.0242919921875,
-0.0093841552734375,
0.0027294158935546875,
-0.03656005859375,
-0.0250091552734375,
0.0042724609375,
-0.008392333984375,
-0.0183563232421875,
0.036376953125,
-0.0006966590881347656,
-0.021331787109375,
0.028472900390625,
0.00016295909881591797,
-0.0386962890625,
-0.04278564453125,
0.0201568603515625,
0.0157012939453125,
0.007122039794921875,
0.0135040283203125,
-0.0107421875,
0.059173583984375,
-0.0323486328125,
-0.042236328125,
0.00553131103515625,
0.042572021484375,
-0.030548095703125,
-0.0018243789672851562,
0.0279541015625,
-0.017486572265625,
-0.0220184326171875,
0.00644683837890625,
-0.00237274169921875,
-0.0007472038269042969,
-0.0202484130859375,
-0.040496826171875,
0.00424957275390625,
0.012908935546875,
0.022430419921875,
0.00567626953125,
0.0260772705078125,
-0.0008001327514648438,
0.00475311279296875,
-0.0262451171875,
-0.0253143310546875,
-0.012237548828125,
-0.017547607421875,
0.00785064697265625,
0.0084991455078125,
-0.0186920166015625,
-0.047088623046875,
-0.0021457672119140625,
-0.0205535888671875,
0.074951171875,
-0.003021240234375,
0.0251312255859375,
-0.036651611328125,
0.0087127685546875,
-0.006134033203125,
0.00518798828125,
0.018951416015625,
-0.0089111328125,
-0.006572723388671875,
-0.027130126953125,
-0.07537841796875,
-0.022674560546875,
-0.0892333984375,
-0.047821044921875,
-0.0190582275390625,
0.03521728515625,
-0.01279449462890625,
0.007175445556640625,
0.01116180419921875,
0.04302978515625,
-0.033172607421875,
0.0294189453125,
-0.00792694091796875,
0.0267486572265625,
-0.018463134765625,
0.0279693603515625,
0.0204620361328125,
0.0081329345703125,
0.002117156982421875,
0.01218414306640625,
-0.0099639892578125,
-0.003971099853515625,
0.031005859375,
-0.00440216064453125,
-0.038543701171875,
-0.034149169921875,
-0.018524169921875,
0.001018524169921875,
0.0421142578125,
-0.0214996337890625,
0.00478363037109375,
0.00959014892578125,
-0.0016307830810546875,
-0.01166534423828125,
-0.0022335052490234375,
0.016387939453125,
0.0015735626220703125,
-0.033935546875,
-0.043060302734375,
0.045166015625,
0.00199127197265625,
0.015289306640625,
0.025848388671875,
-0.06207275390625,
0.0214385986328125,
0.048370361328125,
-0.0190887451171875,
-0.010711669921875,
-0.01934814453125,
0.03387451171875,
0.039886474609375,
-0.0199127197265625,
0.058624267578125,
0.020172119140625,
-0.0009083747863769531,
-0.0280914306640625,
-0.0083770751953125,
0.018463134765625,
0.0022869110107421875,
-0.0245513916015625,
0.018768310546875,
-0.0147705078125,
0.002902984619140625,
0.007015228271484375,
0.062164306640625,
-0.020050048828125,
0.0182342529296875,
0.0239105224609375,
-0.024322509765625,
-0.01523590087890625,
0.016632080078125,
-0.0115814208984375,
-0.0382080078125,
-0.01195526123046875,
0.00994873046875,
-0.0225982666015625,
-0.0306396484375,
0.003082275390625,
0.001781463623046875,
0.020965576171875,
-0.0033969879150390625,
-0.0003440380096435547,
-0.03741455078125,
-0.0171966552734375,
0.00986480712890625,
0.00470733642578125,
-0.0169677734375,
-0.01033782958984375,
0.00968170166015625,
-0.0030422210693359375,
-0.0479736328125,
0.0238494873046875,
-0.04779052734375,
0.0262298583984375,
-0.0206146240234375,
0.00997161865234375,
0.006259918212890625,
0.06591796875,
-0.0369873046875,
0.0211944580078125,
0.0229339599609375,
-0.010101318359375,
-0.004634857177734375,
-0.0310821533203125,
0.0200042724609375,
0.0052032470703125,
-0.068115234375,
0.0171051025390625,
-0.040283203125,
-0.01415252685546875,
-0.0202789306640625,
0.00757598876953125,
0.0567626953125,
-0.0196533203125,
-0.01287841796875,
0.016082763671875,
0.028778076171875,
0.0234222412109375,
-0.044219970703125,
0.027923583984375,
-0.024932861328125,
0.035369873046875,
-0.02825927734375,
0.043182373046875,
0.0191802978515625,
-0.057830810546875,
-0.032806396484375,
0.062347412109375,
0.070556640625,
-0.0002760887145996094,
0.0046234130859375,
0.0232696533203125,
-0.035430908203125,
0.0157470703125,
-0.022979736328125,
0.0477294921875,
-0.01522064208984375,
0.01282501220703125,
-0.04827880859375,
0.0076751708984375,
-0.0162200927734375,
0.0256500244140625,
0.050994873046875,
0.0042266845703125,
-0.0233306884765625,
0.003078460693359375,
0.07012939453125,
0.050201416015625,
0.005672454833984375,
0.028472900390625,
0.01019287109375,
0.046600341796875,
0.0386962890625,
-0.06549072265625,
0.0095672607421875,
-0.018707275390625,
0.003124237060546875,
0.022003173828125,
0.007740020751953125,
0.0027217864990234375,
-0.0197601318359375,
-0.0205535888671875,
0.00478363037109375,
-0.0149383544921875,
-0.024078369140625,
0.01100921630859375,
-0.01348876953125,
0.00925445556640625,
0.01204681396484375,
-0.05218505859375,
-0.01308441162109375,
-0.035186767578125,
0.0372314453125,
0.01511383056640625,
0.057403564453125,
0.057373046875,
0.0123138427734375,
0.0347900390625,
0.01448822021484375,
0.0416259765625,
-0.0009889602661132812,
-0.0104217529296875,
0.038360595703125,
-0.002285003662109375,
0.03924560546875,
-0.04779052734375,
-0.0287017822265625,
0.00344085693359375,
0.052825927734375,
-0.0225982666015625,
-0.0160980224609375,
0.00988006591796875,
-0.002956390380859375,
-0.0086669921875,
-0.01020050048828125,
0.003173828125,
0.005802154541015625,
0.03265380859375,
-0.0030155181884765625,
-0.042724609375,
-0.00827789306640625,
-0.029876708984375,
-0.006374359130859375,
-0.034942626953125,
0.09686279296875,
-0.007671356201171875,
-0.002498626708984375,
0.00818634033203125,
0.01180267333984375,
-0.04559326171875,
-0.039154052734375,
0.036285400390625,
0.0743408203125,
0.048614501953125,
0.0187225341796875,
0.01715087890625,
-0.0087432861328125,
-0.0196075439453125,
-0.013153076171875,
-0.031463623046875,
0.01197052001953125,
0.01898193359375,
-0.0026531219482421875,
0.0160064697265625,
0.037689208984375,
-0.005126953125,
-0.061279296875,
-0.00844573974609375,
-0.0259857177734375,
-0.037811279296875,
0.0214691162109375,
-0.007556915283203125,
-0.00007838010787963867,
0.026275634765625,
-0.01401519775390625,
-0.021484375,
0.00785064697265625,
0.049957275390625,
-0.0198516845703125,
0.01369476318359375,
0.00844573974609375,
-0.01398468017578125,
-0.01331329345703125,
-0.0169525146484375,
-0.0166778564453125,
0.01436614990234375,
-0.0274658203125,
0.0181732177734375,
-0.032196044921875,
-0.06280517578125,
0.01186370849609375,
0.044036865234375,
0.0012178421020507812,
0.00968170166015625,
-0.018402099609375,
-0.01218414306640625,
0.0135650634765625,
-0.01204681396484375,
-0.0037593841552734375,
-0.01396942138671875,
0.0228271484375,
-0.0149383544921875,
-0.05059814453125,
-0.034698486328125,
-0.0206146240234375,
0.046722412109375,
0.0191192626953125,
0.043670654296875,
0.0059051513671875,
0.024932861328125,
-0.00257110595703125,
-0.0082244873046875,
-0.0175933837890625,
-0.004222869873046875,
-0.0011138916015625,
-0.0203704833984375,
-0.003124237060546875,
0.01279449462890625,
-0.017822265625,
0.0628662109375,
0.0157470703125,
-0.0054473876953125,
0.0517578125,
0.0022430419921875,
-0.00235748291015625,
-0.0299835205078125,
0.0408935546875,
-0.0145263671875,
-0.0287322998046875,
0.00800323486328125,
0.0170135498046875,
-0.002712249755859375,
0.01499176025390625,
-0.005279541015625,
-0.0189666748046875,
-0.004512786865234375,
-0.052001953125,
0.0035800933837890625,
-0.01146697998046875,
-0.03125,
0.00876617431640625,
0.049102783203125,
-0.048553466796875,
0.0103759765625,
-0.0208740234375,
-0.0234832763671875,
0.0155029296875,
0.0179443359375,
-0.0079498291015625,
-0.05047607421875,
-0.0127105712890625,
0.053497314453125,
0.0643310546875,
0.00649261474609375,
0.04388427734375,
-0.006961822509765625,
-0.0308685302734375,
0.01239013671875,
-0.003681182861328125,
-0.0212554931640625,
-0.00860595703125,
-0.01424407958984375,
-0.0010271072387695312,
-0.00881195068359375,
-0.03692626953125,
-0.034515380859375,
-0.036773681640625,
0.0267791748046875,
-0.0140838623046875,
0.022125244140625,
-0.0191497802734375,
-0.0191192626953125,
-0.02703857421875,
-0.0034618377685546875,
-0.0223541259765625,
0.00539398193359375,
0.0053863525390625,
-0.0003123283386230469,
-0.009490966796875,
-0.039337158203125,
0.020965576171875,
-0.0259552001953125,
0.0645751953125,
0.07354736328125,
-0.05572509765625,
0.0143280029296875,
0.038330078125,
0.0391845703125,
0.0926513671875,
-0.00826263427734375,
-0.039154052734375,
0.035125732421875,
0.0025959014892578125,
0.037017822265625,
-0.042022705078125,
-0.040008544921875,
0.006500244140625,
0.037750244140625,
-0.048431396484375,
-0.0013723373413085938,
0.011474609375,
-0.07720947265625,
-0.12225341796875,
0.0540771484375,
-0.041046142578125,
-0.04144287109375,
-0.0660400390625,
-0.0262298583984375,
-0.016204833984375,
0.0174713134765625,
-0.028289794921875,
-0.01021575927734375,
-0.04351806640625,
0.061309814453125,
0.007221221923828125,
0.01531982421875,
0.011077880859375,
-0.00021827220916748047,
-0.037628173828125,
0.00885772705078125,
0.0085601806640625,
0.00943756103515625,
0.00888824462890625,
-0.01393890380859375,
0.036376953125,
0.062408447265625,
-0.004451751708984375,
0.00508880615234375,
0.005947113037109375,
-0.02471923828125,
-0.007808685302734375,
-0.0034465789794921875,
0.0013275146484375,
0.0189971923828125,
0.031585693359375,
0.0487060546875,
0.004924774169921875,
-0.041961669921875,
0.051422119140625,
0.07757568359375,
-0.0199127197265625,
0.0220184326171875,
-0.00542449951171875,
0.009613037109375,
-0.0256500244140625,
-0.04705810546875,
0.01311492919921875,
-0.012115478515625,
-0.00494384765625,
-0.018310546875,
-0.01258087158203125,
0.0276336669921875,
0.0201416015625,
-0.0261688232421875,
-0.042755126953125,
0.04217529296875,
-0.0222015380859375,
0.0018634796142578125,
0.02862548828125,
0.0215301513671875,
0.0243072509765625,
0.08221435546875,
0.023681640625,
0.0286102294921875,
-0.059051513671875,
-0.008697509765625,
-0.004741668701171875,
0.0310516357421875,
-0.0200042724609375,
-0.016998291015625,
-0.041748046875,
0.0164337158203125,
0.013336181640625,
0.003932952880859375,
-0.0338134765625,
0.046295166015625,
0.04217529296875,
0.019805908203125,
-0.0165252685546875,
-0.0237884521484375,
-0.0396728515625,
0.03778076171875,
0.005191802978515625,
-0.01303863525390625,
0.03802490234375,
-0.0037326812744140625,
0.0239105224609375,
0.015350341796875,
0.049896240234375,
0.0031986236572265625,
0.02386474609375,
-0.029144287109375,
-0.0038166046142578125,
0.01328277587890625
] |
557b68c6db2e55506dd764e21cd5fafbb8a3da01
|
Wordpress Stackexchange
Q: Redirect old permalinks to new permalinks I changed the permalink structure from /%category%/%postname%/ to /%year%/%monthnum%/%postname%//
How can I redirect all old posts to the new ones (eg: via htaccess)?
A: WordPress should handle the 301 redirects for you automatically in this case. It doesn't always, but it should here.
Long story short, WordPress has a function, redirect_guess_404_permalink which tries to find the correct post when it encounters a 404 by using the end of the 404 url to query against the wp_posts.post_name. If it finds a post, it will perform a 301 redirect. In your particular case, because your old structure ends in %postname%, this should very reliably 301 all your old paths.
|
Q: Redirect old permalinks to new permalinks I changed the permalink structure from /%category%/%postname%/ to /%year%/%monthnum%/%postname%//
How can I redirect all old posts to the new ones (eg: via htaccess)?
A: WordPress should handle the 301 redirects for you automatically in this case. It doesn't always, but it should here.
Long story short, WordPress has a function, redirect_guess_404_permalink which tries to find the correct post when it encounters a 404 by using the end of the 404 url to query against the wp_posts.post_name. If it finds a post, it will perform a 301 redirect. In your particular case, because your old structure ends in %postname%, this should very reliably 301 all your old paths.
A: You can also redirect via WP. Yes, the htaccess variant is with better performance, but a small plugin is easy to use.
Use the Hook template_redirect and check for the conditional function is_404(); if true, than get the right permalink and rewrite. Also you can use the small plugin Change Permalink Helper.
|
wordpress
|
{
"language": "en",
"length": 167,
"provenance": "stackexchange_00019.jsonl.gz:428305",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83263"
}
|
[
0.08905029296875,
-0.003597259521484375,
0.009368896484375,
-0.02789306640625,
-0.00020456314086914062,
-0.03912353515625,
0.042633056640625,
-0.041656494140625,
0.00803375244140625,
0.0178070068359375,
-0.01727294921875,
0.00493621826171875,
0.00130462646484375,
-0.0240478515625,
0.006191253662109375,
-0.0112762451171875,
0.045684814453125,
-0.0576171875,
0.01800537109375,
-0.00835418701171875,
0.018463134765625,
0.0278472900390625,
0.042510986328125,
0.0221405029296875,
0.005474090576171875,
0.007640838623046875,
0.08233642578125,
-0.07928466796875,
0.0286407470703125,
-0.04351806640625,
0.00983428955078125,
-0.0019178390502929688,
-0.005950927734375,
0.033172607421875,
0.0129547119140625,
0.0246429443359375,
0.015594482421875,
0.018035888671875,
0.045257568359375,
-0.0004839897155761719,
0.026580810546875,
-0.018218994140625,
0.0165252685546875,
0.0267333984375,
0.00988006591796875,
-0.0302276611328125,
0.0019779205322265625,
-0.0726318359375,
0.01152801513671875,
-0.03851318359375,
0.00617218017578125,
-0.0081329345703125,
0.0219573974609375,
-0.0030612945556640625,
-0.034454345703125,
-0.012176513671875,
0.00586700439453125,
0.00460052490234375,
0.02764892578125,
-0.00423431396484375,
-0.02984619140625,
0.01512908935546875,
0.012420654296875,
-0.0140380859375,
-0.033538818359375,
0.005199432373046875,
0.0222625732421875,
0.0190887451171875,
-0.0516357421875,
-0.04571533203125,
0.03057861328125,
-0.024200439453125,
-0.0055084228515625,
-0.0229949951171875,
0.01763916015625,
-0.010498046875,
0.01364898681640625,
0.002162933349609375,
-0.0151824951171875,
0.041107177734375,
0.023406982421875,
-0.01522064208984375,
0.0303955078125,
-0.0721435546875,
0.056884765625,
-0.0292205810546875,
-0.005313873291015625,
-0.006542205810546875,
-0.039703369140625,
-0.06036376953125,
-0.0293731689453125,
-0.034423828125,
-0.07391357421875,
-0.0018396377563476562,
-0.0095672607421875,
-0.038482666015625,
0.0386962890625,
0.052642822265625,
-0.00502777099609375,
-0.00048828125,
-0.006725311279296875,
-0.0255889892578125,
-0.01947021484375,
-0.019683837890625,
-0.0009670257568359375,
0.038665771484375,
0.038299560546875,
0.004550933837890625,
0.0225982666015625,
0.0025539398193359375,
0.0014657974243164062,
0.058837890625,
-0.030517578125,
-0.01392364501953125,
-0.0226593017578125,
0.061492919921875,
-0.0328369140625,
-0.00685882568359375,
-0.0230865478515625,
0.0457763671875,
-0.025787353515625,
0.017120361328125,
0.00699615478515625,
0.00948333740234375,
0.01100921630859375,
0.004955291748046875,
-0.0008831024169921875,
-0.025848388671875,
0.04559326171875,
0.01067352294921875,
-0.0223846435546875,
0.001277923583984375,
-0.0005831718444824219,
0.00984954833984375,
0.0013895034790039062,
-0.019073486328125,
0.057830810546875,
-0.04327392578125,
-0.033477783203125,
0.039886474609375,
0.0091705322265625,
-0.038787841796875,
-0.038604736328125,
-0.017059326171875,
0.0362548828125,
0.0219573974609375,
0.0197906494140625,
0.0189208984375,
0.00688934326171875,
-0.0206756591796875,
0.004970550537109375,
-0.00905609130859375,
0.0382080078125,
0.0014019012451171875,
-0.0118560791015625,
-0.027191162109375,
0.0019083023071289062,
-0.01605224609375,
-0.0037479400634765625,
-0.03082275390625,
0.041595458984375,
-0.0004153251647949219,
0.0066986083984375,
-0.00861358642578125,
-0.060394287109375,
0.0019388198852539062,
-0.07476806640625,
-0.0273590087890625,
0.02880859375,
0.02069091796875,
-0.01788330078125,
-0.03302001953125,
-0.000980377197265625,
-0.039764404296875,
-0.03179931640625,
0.01239013671875,
-0.01459503173828125,
0.019134521484375,
0.0081329345703125,
0.07037353515625,
0.035858154296875,
-0.02264404296875,
0.0218048095703125,
0.01538848876953125,
-0.07012939453125,
0.0281219482421875,
0.00345611572265625,
0.047454833984375,
0.0088043212890625,
0.003589630126953125,
0.06878662109375,
0.0196533203125,
-0.0731201171875,
0.035400390625,
-0.011383056640625,
0.003108978271484375,
0.00859832763671875,
0.0137481689453125,
-0.004543304443359375,
-0.02142333984375,
-0.00814056396484375,
0.04583740234375,
-0.0506591796875,
0.0251007080078125,
-0.0308380126953125,
0.0160369873046875,
-0.0029735565185546875,
0.027252197265625,
0.0203399658203125,
0.044647216796875,
0.0088043212890625,
0.0224456787109375,
-0.029998779296875,
-0.02001953125,
-0.0030002593994140625,
0.0260009765625,
-0.01120758056640625,
-0.00004941225051879883,
-0.0178985595703125,
0.0037841796875,
-0.01332855224609375,
-0.01335906982421875,
-0.0263519287109375,
0.0084075927734375,
0.02752685546875,
-0.045623779296875,
-0.0014200210571289062,
-0.0419921875,
-0.042144775390625,
0.0163726806640625,
-0.10968017578125,
0.05389404296875,
0.020599365234375,
0.01371002197265625,
-0.035430908203125,
-0.006206512451171875,
-0.016571044921875,
-0.0193023681640625,
-0.0005064010620117188,
0.04986572265625,
0.0291290283203125,
0.033447265625,
-0.0204925537109375,
-0.0162506103515625,
-0.0057830810546875,
-0.06683349609375,
0.009796142578125,
-0.0075836181640625,
0.0269012451171875,
0.041107177734375,
0.0230712890625,
-0.010711669921875,
0.029632568359375,
-0.01332855224609375,
0.0015649795532226562,
0.039306640625,
-0.0018510818481445312,
-0.0115814208984375,
-0.0173492431640625,
0.007160186767578125,
0.020050048828125,
-0.036956787109375,
-0.046630859375,
-0.01302337646484375,
0.03851318359375,
-0.01678466796875,
0.0203094482421875,
0.003948211669921875,
-0.0014867782592773438,
-0.00923919677734375,
0.00714874267578125,
-0.05029296875,
0.0236053466796875,
0.0210113525390625,
0.014495849609375,
-0.0292510986328125,
-0.01508331298828125,
-0.0131072998046875,
0.04351806640625,
0.00984954833984375,
-0.0184173583984375,
0.043426513671875,
-0.0196075439453125,
-0.01213836669921875,
-0.0238494873046875,
-0.022613525390625,
-0.01412200927734375,
-0.004390716552734375,
0.0443115234375,
0.00946044921875,
0.03753662109375,
-0.0090179443359375,
0.0009560585021972656,
0.014404296875,
0.0267486572265625,
-0.0469970703125,
-0.01030731201171875,
-0.050750732421875,
0.03887939453125,
-0.045806884765625,
0.032012939453125,
0.05291748046875,
-0.0030765533447265625,
0.0023899078369140625,
0.013519287109375,
0.019561767578125,
0.01763916015625,
-0.004154205322265625,
-0.0224456787109375,
-0.012115478515625,
-0.051666259765625,
-0.0263214111328125,
0.0312042236328125,
0.03411865234375,
0.009246826171875,
-0.01898193359375,
0.0107574462890625,
0.0299835205078125,
-0.05859375,
-0.07275390625,
-0.033935546875,
-0.036773681640625,
0.02081298828125,
0.028167724609375,
-0.003673553466796875,
-0.02203369140625,
0.03863525390625,
0.0082550048828125,
0.09027099609375,
-0.0210418701171875,
-0.08294677734375,
-0.0161590576171875,
-0.09844970703125,
-0.022796630859375,
-0.0014562606811523438,
-0.005733489990234375,
0.002475738525390625,
-0.024383544921875,
-0.017791748046875,
-0.0235595703125,
-0.00695037841796875,
0.039276123046875,
0.01184844970703125,
-0.0196380615234375,
0.00550079345703125,
0.01105499267578125,
0.01506805419921875,
0.005146026611328125,
0.081298828125,
0.0550537109375,
-0.05767822265625,
-0.0025844573974609375,
-0.0275726318359375,
-0.0028171539306640625,
0.001888275146484375,
-0.0226593017578125,
0.0284423828125,
-0.0138702392578125,
-0.005786895751953125,
-0.04296875,
-0.02032470703125,
-0.013427734375,
-0.045074462890625,
-0.02630615234375,
0.01558685302734375,
0.0008845329284667969,
-0.00007355213165283203,
-0.0181121826171875,
0.0174407958984375,
0.006473541259765625,
0.0283966064453125,
-0.0364990234375,
0.03302001953125,
0.011688232421875,
0.02569580078125,
-0.0428466796875,
0.0024738311767578125,
-0.046783447265625,
0.050201416015625,
-0.0019054412841796875,
-0.00908660888671875,
-0.0005965232849121094,
-0.01087188720703125,
-0.036865234375,
-0.0797119140625,
0.0272216796875,
-0.09716796875,
-0.03143310546875,
-0.052398681640625,
0.008270263671875,
-0.0011157989501953125,
0.07440185546875,
0.0008363723754882812,
-0.0107269287109375,
-0.024169921875,
-0.016204833984375,
0.0006165504455566406,
-0.00975799560546875,
-0.0078887939453125,
-0.003452301025390625,
-0.08770751953125,
-0.0260162353515625,
-0.006290435791015625,
-0.050537109375,
-0.0139617919921875,
0.015045166015625,
-0.053985595703125,
-0.022979736328125,
0.03948974609375,
0.0211029052734375,
0.00020003318786621094,
-0.00540924072265625,
-0.003498077392578125,
-0.0152587890625,
-0.019866943359375,
0.018829345703125,
-0.06170654296875,
-0.017791748046875,
-0.00011110305786132812,
0.0662841796875,
0.0235443115234375,
-0.0300140380859375,
0.007274627685546875,
0.049957275390625,
-0.0006957054138183594,
0.0280609130859375,
-0.005523681640625,
-0.0014123916625976562,
0.0011692047119140625,
0.02716064453125,
0.005649566650390625,
0.002124786376953125,
0.00982666015625,
-0.0273895263671875,
-0.0216064453125,
-0.002750396728515625,
-0.055938720703125,
-0.005634307861328125,
-0.02789306640625,
-0.01020050048828125,
-0.0714111328125,
-0.014007568359375,
-0.0272674560546875,
0.01371002197265625,
-0.0286407470703125,
-0.0082550048828125,
-0.0127410888671875,
-0.08795166015625,
0.042388916015625,
-0.0064697265625,
-0.00894927978515625,
-0.00965118408203125,
0.033477783203125,
0.002498626708984375,
-0.0253143310546875,
0.0166778564453125,
0.0413818359375,
0.02490234375,
0.0011310577392578125,
0.0357666015625,
-0.020965576171875,
-0.0010766983032226562,
0.047332763671875,
-0.0213470458984375,
-0.036865234375,
-0.023162841796875,
0.0167083740234375,
0.002864837646484375,
-0.0072784423828125,
-0.01355743408203125,
-0.0428466796875,
0.079833984375,
0.065673828125,
0.01483154296875,
-0.0163116455078125,
-0.04840087890625,
0.039215087890625,
0.0171661376953125,
-0.00968170166015625,
-0.055908203125,
-0.055694580078125,
0.022674560546875,
0.023651123046875,
0.0169219970703125,
0.005146026611328125,
-0.00859832763671875,
0.048553466796875,
0.0216064453125,
-0.0008072853088378906,
-0.0245819091796875,
-0.01036834716796875,
-0.0145416259765625,
0.02490234375,
-0.01087188720703125,
0.0017557144165039062,
-0.0178375244140625,
-0.006862640380859375,
0.00984954833984375,
0.00922393798828125,
-0.0220947265625,
0.01346588134765625,
-0.026641845703125,
-0.022918701171875,
0.0276031494140625,
-0.048248291015625,
0.03204345703125,
0.036102294921875,
-0.02557373046875,
0.006015777587890625,
-0.037322998046875,
-0.012603759765625,
-0.049224853515625,
0.027740478515625,
0.022674560546875,
0.0008044242858886719,
-0.00024700164794921875,
0.06707763671875,
0.06298828125,
0.018341064453125,
-0.037017822265625,
0.0089263916015625,
0.034698486328125,
0.0298614501953125,
0.0256805419921875,
-0.0220947265625,
-0.01085662841796875,
0.004093170166015625,
0.00943756103515625,
-0.048492431640625,
-0.020721435546875,
0.043853759765625,
0.0618896484375,
-0.01509857177734375,
-0.021514892578125,
0.01806640625,
0.006771087646484375,
-0.00926971435546875,
0.01617431640625,
-0.0176239013671875,
-0.038177490234375,
-0.029296875,
0.0174102783203125,
0.037567138671875,
-0.00867462158203125,
-0.0186767578125,
0.00893402099609375,
-0.045318603515625,
0.01641845703125,
0.005268096923828125,
0.0094451904296875,
-0.009765625,
-0.01259613037109375,
0.00862884521484375,
-0.028106689453125,
-0.01050567626953125,
0.029571533203125,
0.0418701171875,
-0.046539306640625,
-0.0224456787109375,
0.0716552734375,
0.00850677490234375,
0.032440185546875,
-0.01471710205078125,
-0.040191650390625,
0.072509765625,
-0.01187896728515625,
0.07647705078125,
0.00841522216796875,
-0.057830810546875,
-0.004085540771484375,
-0.0276641845703125,
0.005161285400390625,
0.0113525390625,
-0.009552001953125,
-0.0133819580078125,
-0.009429931640625,
0.0252227783203125,
0.0121307373046875,
0.016845703125,
-0.0018968582153320312,
-0.0013570785522460938,
0.007781982421875,
0.00519561767578125,
-0.0047760009765625,
-0.011962890625,
0.045806884765625,
-0.01073455810546875,
0.03485107421875,
-0.00684356689453125,
0.01181793212890625,
-0.017822265625,
-0.0214691162109375,
0.0069732666015625,
-0.035430908203125,
-0.033111572265625,
0.0017004013061523438,
-0.022125244140625,
0.00616455078125,
0.028717041015625,
-0.00635528564453125,
0.00439453125,
-0.004558563232421875,
0.0118560791015625,
-0.037353515625,
-0.0274505615234375,
-0.051727294921875,
-0.004680633544921875,
-0.034210205078125,
0.034393310546875,
0.047027587890625,
-0.032562255859375,
-0.049591064453125,
-0.007289886474609375,
0.026763916015625,
0.00669097900390625,
0.00634765625,
-0.0421142578125,
0.0235748291015625,
0.04486083984375,
0.0159149169921875,
0.04547119140625,
-0.004291534423828125,
0.0275726318359375,
0.054229736328125,
-0.04779052734375,
0.0660400390625,
0.04571533203125,
0.07989501953125,
-0.0055389404296875,
0.024444580078125,
0.06976318359375,
-0.0225677490234375,
-0.01227569580078125,
0.0259246826171875,
0.016204833984375,
-0.058502197265625,
-0.00044608116149902344,
-0.00396728515625,
-0.0011682510375976562,
0.0216522216796875,
0.01187896728515625,
-0.0083160400390625,
0.0145111083984375,
-0.0163421630859375,
-0.027374267578125,
-0.0159454345703125,
-0.006816864013671875,
0.0072021484375,
-0.0049591064453125,
0.006908416748046875,
0.030670166015625,
0.0117034912109375,
-0.039794921875,
-0.0008463859558105469,
0.03173828125,
0.00994110107421875,
-0.0250091552734375,
-0.0196685791015625,
-0.0164947509765625,
-0.0181732177734375,
-0.0150604248046875,
0.020233154296875,
-0.034912109375,
0.040191650390625,
0.03704833984375,
-0.004848480224609375,
0.0208740234375,
0.039520263671875,
-0.01202392578125,
0.02069091796875,
0.003932952880859375,
-0.01953125,
0.02691650390625,
-0.0306854248046875,
0.0079803466796875,
-0.020263671875,
-0.004608154296875,
0.0021209716796875,
-0.01071929931640625,
-0.04022216796875,
-0.0029468536376953125,
-0.009979248046875,
0.047637939453125,
-0.047821044921875,
-0.0025806427001953125,
0.0180816650390625,
0.0119171142578125,
0.00044417381286621094,
-0.006481170654296875,
0.01296234130859375,
-0.021759033203125,
0.0036487579345703125,
-0.0177459716796875,
-0.01236724853515625,
0.018798828125,
-0.0211334228515625,
-0.066650390625,
0.10955810546875,
0.020904541015625,
0.0570068359375,
0.02288818359375,
0.031341552734375,
-0.021148681640625,
0.01873779296875,
-0.0164642333984375,
0.08245849609375,
-0.0248870849609375,
0.034454345703125,
-0.0310211181640625,
-0.0006761550903320312,
0.0229644775390625,
0.0171356201171875,
0.0889892578125,
0.024688720703125,
-0.06524658203125,
-0.01136016845703125,
0.062347412109375,
0.04278564453125,
-0.00011026859283447266,
0.044921875,
-0.034698486328125,
0.0011644363403320312,
0.026824951171875,
-0.0032958984375,
0.02081298828125,
0.01470947265625,
-0.05609130859375,
-0.01235198974609375,
0.01534271240234375,
0.021942138671875,
0.0018634796142578125,
-0.05059814453125,
-0.05499267578125,
0.00890350341796875,
0.043060302734375,
0.0023956298828125,
0.039337158203125,
-0.0106964111328125,
0.0178680419921875,
-0.08172607421875,
0.025787353515625,
-0.043212890625,
0.045501708984375,
-0.01073455810546875,
0.0257568359375,
0.0164947509765625,
0.01424407958984375,
0.060943603515625,
-0.018829345703125,
0.0196533203125,
0.0143280029296875,
-0.01824951171875,
0.0858154296875,
0.0662841796875,
0.048797607421875,
0.005130767822265625,
-0.056549072265625,
0.04736328125,
0.1080322265625,
-0.0238800048828125,
-0.0028018951416015625,
0.01526641845703125,
0.01373291015625,
0.023956298828125,
-0.017364501953125,
0.053680419921875,
-0.00858306884765625,
-0.0148468017578125,
-0.01430511474609375,
-0.00396728515625,
0.0271453857421875,
0.029144287109375,
-0.002452850341796875,
-0.018524169921875,
-0.0286102294921875,
0.010345458984375,
-0.06451416015625,
0.0159454345703125,
0.056915283203125,
0.0701904296875,
-0.0026645660400390625,
0.041351318359375,
0.01105499267578125,
-0.02978515625,
0.01403045654296875,
-0.0187835693359375,
0.0017538070678710938,
-0.01129913330078125,
-0.0298309326171875,
-0.03521728515625,
0.03662109375,
0.056732177734375,
0.04034423828125,
0.003566741943359375,
0.0229644775390625,
0.021514892578125,
0.0008854866027832031,
-0.00959014892578125,
0.00629425048828125,
-0.01421356201171875,
0.06298828125,
-0.0163116455078125,
0.0242462158203125,
-0.0274810791015625,
-0.0299072265625,
-0.053680419921875,
0.0289154052734375,
-0.00400543212890625,
-0.013336181640625,
0.058013916015625,
-0.0014190673828125,
-0.0186309814453125,
0.031341552734375,
0.0026950836181640625,
0.083740234375,
0.03118896484375,
-0.0218963623046875,
-0.023223876953125,
-0.00621795654296875,
-0.035308837890625,
0.023193359375,
0.041900634765625,
0.02801513671875,
-0.03375244140625,
-0.01302337646484375,
-0.022796630859375,
0.01212310791015625,
0.004802703857421875,
0.0047454833984375,
0.0313720703125,
0.0022029876708984375,
0.006626129150390625,
-0.0338134765625,
0.0006194114685058594,
0.00778961181640625,
0.0106353759765625,
0.007175445556640625,
0.053466796875,
-0.0038204193115234375,
-0.0025615692138671875,
-0.0196990966796875,
-0.001171112060546875,
-0.030059814453125,
-0.0249176025390625,
0.042724609375,
-0.023895263671875,
-0.0211944580078125,
0.00827789306640625,
-0.046875,
0.0120849609375,
0.0174407958984375,
-0.016998291015625,
0.0185394287109375,
-0.042022705078125,
0.01338958740234375,
-0.00107574462890625,
-0.00421905517578125,
-0.0548095703125,
-0.06573486328125,
-0.033660888671875,
0.0026187896728515625,
-0.0275115966796875,
-0.02191162109375,
-0.0083770751953125,
0.0312042236328125,
-0.0083465576171875,
-0.03570556640625,
0.02789306640625,
-0.060150146484375,
0.042816162109375,
0.045257568359375,
0.0039520263671875,
0.0157012939453125,
0.0269012451171875,
-0.0127410888671875,
0.01291656494140625,
0.0176544189453125,
-0.02874755859375,
0.0171661376953125,
-0.01258087158203125,
-0.05462646484375,
-0.049957275390625,
-0.0228424072265625,
-0.0122222900390625,
-0.00998687744140625,
-0.05999755859375,
-0.02032470703125,
0.007648468017578125,
-0.009033203125,
-0.021453857421875,
-0.0223388671875,
-0.00807952880859375,
0.019683837890625,
0.004055023193359375,
-0.0236358642578125,
-0.01371002197265625,
0.0096282958984375,
0.014862060546875,
0.0023174285888671875,
-0.047637939453125,
0.04522705078125,
-0.0182037353515625,
0.03363037109375,
-0.034088134765625,
-0.0211334228515625,
0.007038116455078125,
0.03204345703125,
-0.0390625,
-0.0247802734375,
-0.04351806640625,
-0.0166473388671875,
-0.062744140625,
-0.000995635986328125,
0.024078369140625,
-0.0212554931640625,
-0.00670623779296875,
-0.023284912109375,
-0.00870513916015625,
0.0277099609375,
-0.0013017654418945312,
-0.002071380615234375,
0.032440185546875,
0.01126861572265625,
-0.025665283203125,
-0.08245849609375,
-0.006725311279296875,
-0.01496124267578125,
0.0176544189453125,
-0.0109710693359375,
-0.03533935546875,
-0.0194854736328125,
-0.04229736328125,
-0.041778564453125,
0.034423828125,
0.0013017654418945312,
-0.0182342529296875,
-0.045166015625,
0.0009112358093261719,
-0.006999969482421875,
0.0276947021484375,
-0.0005464553833007812,
-0.025726318359375,
-0.03436279296875,
0.026336669921875,
0.005176544189453125,
0.044464111328125,
-0.01537322998046875,
0.01959228515625,
0.0140533447265625,
0.0458984375,
0.04632568359375,
0.00428009033203125,
0.0261688232421875,
-0.01154327392578125,
0.023529052734375,
0.0611572265625,
-0.0289306640625,
0.002895355224609375,
-0.03082275390625,
-0.0194091796875,
0.005161285400390625,
-0.051727294921875,
-0.049468994140625,
-0.059661865234375,
0.06964111328125,
-0.0050506591796875,
0.0219268798828125,
0.0099945068359375,
-0.045013427734375,
-0.004070281982421875,
-0.004306793212890625,
-0.005931854248046875,
0.0251922607421875,
-0.060516357421875,
0.014068603515625,
-0.01334381103515625,
-0.0017309188842773438,
0.0021686553955078125,
-0.0146636962890625,
-0.01971435546875,
0.01087188720703125,
0.00395965576171875,
-0.031829833984375,
0.01116180419921875,
0.03692626953125,
0.07110595703125,
-0.050811767578125,
-0.0178375244140625,
0.00830841064453125,
0.00002288818359375,
0.005130767822265625,
-0.058837890625,
0.029296875,
0.05230712890625,
-0.00211334228515625,
-0.02490234375,
0.052337646484375,
0.0117950439453125,
0.0249786376953125,
-0.0236968994140625,
0.00030040740966796875,
0.0276336669921875,
0.0012865066528320312,
0.02581787109375,
-0.027252197265625,
0.052276611328125,
0.0029277801513671875,
0.086669921875,
0.0139007568359375,
0.01262664794921875,
0.0017547607421875,
0.058074951171875,
-0.037261962890625,
-0.0146636962890625,
-0.0200042724609375,
-0.025360107421875,
0.006504058837890625,
0.0283203125,
0.0283355712890625,
-0.01090240478515625,
0.0147857666015625,
-0.01202392578125,
0.020843505859375,
0.01026153564453125
] |
160ff5b4e87e9a777d169d7134ea54d8e0a14da7
|
Wordpress Stackexchange
Q: WP3.5 Media Uploader - how to make it accept multiple images? I'm wondering how to make WP3.5 media uploader return 2 or more items in attachement? It always runs once even if 2 items are selected. The code:
$('.button').on('click', function(){
var send_attachment_backup = wp.media.editor.send.attachment;
wp.media.editor.send.attachment = function(props, attachment){
myFunction(attachment.url);
wp.media.editor.send.attachment = send_attachment_backup;
}
wp.media.editor.open();
});
EDIT: My mistake. I'm doing wp.media.editor.send.attachment = send_attachment_backup; and it runs once. So the new questions would be: how to restore the original function after the latest item in the loop?
A: I'd sugest you to properly handle new media modal integration. There's no need to hijack wp.media.editor object's attributes in order to use media modal in your plugins. You can inspire yourself from a demo integration plugin at github
Demo #4 best suits your needs I guess
|
Q: WP3.5 Media Uploader - how to make it accept multiple images? I'm wondering how to make WP3.5 media uploader return 2 or more items in attachement? It always runs once even if 2 items are selected. The code:
$('.button').on('click', function(){
var send_attachment_backup = wp.media.editor.send.attachment;
wp.media.editor.send.attachment = function(props, attachment){
myFunction(attachment.url);
wp.media.editor.send.attachment = send_attachment_backup;
}
wp.media.editor.open();
});
EDIT: My mistake. I'm doing wp.media.editor.send.attachment = send_attachment_backup; and it runs once. So the new questions would be: how to restore the original function after the latest item in the loop?
A: I'd sugest you to properly handle new media modal integration. There's no need to hijack wp.media.editor object's attributes in order to use media modal in your plugins. You can inspire yourself from a demo integration plugin at github
Demo #4 best suits your needs I guess
|
wordpress
|
{
"language": "en",
"length": 134,
"provenance": "stackexchange_00019.jsonl.gz:428321",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83323"
}
|
[
0.041595458984375,
-0.0016613006591796875,
0.00981903076171875,
0.0175018310546875,
0.00748443603515625,
-0.033782958984375,
0.06634521484375,
-0.053009033203125,
-0.004184722900390625,
0.035125732421875,
-0.002285003662109375,
0.0217132568359375,
0.016265869140625,
-0.0163116455078125,
-0.001903533935546875,
-0.0018863677978515625,
0.035736083984375,
-0.0288543701171875,
0.0210418701171875,
-0.00017464160919189453,
-0.0024776458740234375,
0.040252685546875,
0.0187835693359375,
0.026092529296875,
-0.018280029296875,
0.03790283203125,
0.02093505859375,
-0.0140838623046875,
-0.0161590576171875,
-0.024505615234375,
-0.00007677078247070312,
0.041412353515625,
0.03411865234375,
0.0125732421875,
-0.055023193359375,
0.0062408447265625,
0.0181427001953125,
0.0036029815673828125,
-0.017730712890625,
0.0283966064453125,
0.0240478515625,
-0.0021877288818359375,
0.002353668212890625,
0.026519775390625,
-0.00571441650390625,
-0.04351806640625,
0.0286712646484375,
-0.04144287109375,
0.0333251953125,
0.0276336669921875,
-0.007472991943359375,
-0.02459716796875,
-0.005462646484375,
-0.0108642578125,
-0.026214599609375,
-0.04473876953125,
-0.0462646484375,
0.02752685546875,
0.00354766845703125,
0.057769775390625,
0.00608062744140625,
0.0203399658203125,
-0.0237274169921875,
-0.0423583984375,
-0.0196380615234375,
-0.005970001220703125,
-0.01953125,
0.01190185546875,
-0.02716064453125,
-0.04815673828125,
0.0004944801330566406,
-0.0239105224609375,
0.0167999267578125,
-0.03253173828125,
-0.0183258056640625,
0.0241241455078125,
-0.0010986328125,
-0.01360321044921875,
0.0306396484375,
-0.035858154296875,
0.053680419921875,
-0.01739501953125,
0.005588531494140625,
0.01099395751953125,
0.0243072509765625,
0.0179443359375,
0.02777099609375,
-0.0254364013671875,
-0.00891876220703125,
0.0169830322265625,
-0.011566162109375,
-0.0305938720703125,
0.004253387451171875,
0.03466796875,
-0.00827789306640625,
-0.01361846923828125,
0.007965087890625,
0.0137939453125,
0.0099029541015625,
0.005199432373046875,
0.01026153564453125,
-0.052642822265625,
0.01306915283203125,
-0.0237579345703125,
0.01348876953125,
-0.0214691162109375,
-0.004749298095703125,
-0.044342041015625,
0.03167724609375,
0.03509521484375,
-0.03125,
0.08624267578125,
0.039398193359375,
-0.006046295166015625,
0.0267333984375,
-0.039764404296875,
-0.012664794921875,
0.0653076171875,
-0.0011377334594726562,
-0.00007981061935424805,
-0.0279083251953125,
-0.0010519027709960938,
-0.033721923828125,
0.006107330322265625,
0.008880615234375,
-0.00853729248046875,
0.0186767578125,
0.00861358642578125,
0.0021648406982421875,
0.0024013519287109375,
-0.0191802978515625,
0.03704833984375,
0.04119873046875,
-0.0009312629699707031,
-0.007965087890625,
-0.0015163421630859375,
0.0204315185546875,
-0.007091522216796875,
0.0103607177734375,
-0.01059722900390625,
0.0274505615234375,
-0.019195556640625,
-0.0178375244140625,
0.0181884765625,
-0.007965087890625,
0.03277587890625,
0.013671875,
-0.00675201416015625,
-0.00315093994140625,
-0.053070068359375,
-0.005680084228515625,
-0.017822265625,
0.016204833984375,
0.00910186767578125,
0.0035152435302734375,
-0.0182037353515625,
0.0211334228515625,
-0.0219573974609375,
0.0190582275390625,
-0.0187530517578125,
-0.00646209716796875,
0.005107879638671875,
0.0592041015625,
-0.041534423828125,
-0.043426513671875,
0.0082550048828125,
-0.0966796875,
-0.0197296142578125,
0.028106689453125,
0.049713134765625,
-0.0238037109375,
-0.00382232666015625,
0.0307159423828125,
0.0199432373046875,
-0.0178680419921875,
0.01554107666015625,
0.0200653076171875,
0.0234222412109375,
0.008209228515625,
0.04913330078125,
-0.0031528472900390625,
-0.04351806640625,
0.09356689453125,
-0.050994873046875,
-0.048492431640625,
0.0162353515625,
0.01039886474609375,
0.0689697265625,
0.0072021484375,
0.0294952392578125,
0.037811279296875,
0.005893707275390625,
0.01284027099609375,
-0.0149383544921875,
-0.0183258056640625,
-0.0235443115234375,
-0.0421142578125,
0.0130767822265625,
-0.0435791015625,
0.0264434814453125,
0.03460693359375,
0.0267486572265625,
0.00331878662109375,
0.0124359130859375,
-0.0224456787109375,
0.02471923828125,
-0.011444091796875,
0.00970458984375,
-0.025115966796875,
0.01959228515625,
0.03265380859375,
0.02362060546875,
-0.044830322265625,
0.018463134765625,
0.0149383544921875,
-0.00812530517578125,
-0.039794921875,
0.0174560546875,
-0.016815185546875,
0.0526123046875,
-0.041748046875,
-0.0244903564453125,
-0.033294677734375,
0.006717681884765625,
0.037384033203125,
-0.0159454345703125,
-0.0129241943359375,
-0.030029296875,
0.0247955322265625,
0.00357818603515625,
-0.032440185546875,
0.028045654296875,
-0.00774383544921875,
-0.01476287841796875,
-0.0287322998046875,
-0.004154205322265625,
-0.00901031494140625,
-0.08160400390625,
0.0261383056640625,
0.0491943359375,
0.02032470703125,
0.0204925537109375,
0.00551605224609375,
0.044403076171875,
0.0433349609375,
0.00498199462890625,
0.0147857666015625,
0.00801849365234375,
0.0196685791015625,
0.0176849365234375,
-0.012847900390625,
-0.0213775634765625,
0.017059326171875,
-0.0736083984375,
0.038818359375,
0.0231475830078125,
-0.01551055908203125,
-0.033294677734375,
-0.025787353515625,
0.039825439453125,
0.01084136962890625,
-0.0168609619140625,
-0.0167388916015625,
-0.004779815673828125,
-0.0097808837890625,
0.0189056396484375,
0.01715087890625,
0.01068878173828125,
-0.0243377685546875,
0.01910400390625,
0.01055908203125,
-0.047088623046875,
0.0031909942626953125,
0.02093505859375,
0.03302001953125,
0.0236053466796875,
-0.00931549072265625,
-0.0171966552734375,
0.00411224365234375,
0.0171966552734375,
-0.0083465576171875,
0.0246429443359375,
-0.02606201171875,
-0.019287109375,
0.003284454345703125,
0.01519775390625,
-0.00914764404296875,
-0.039703369140625,
0.00621795654296875,
-0.0085296630859375,
0.034942626953125,
0.0012273788452148438,
0.0001380443572998047,
0.028350830078125,
-0.0281524658203125,
-0.037261962890625,
0.0083770751953125,
-0.039764404296875,
0.0411376953125,
-0.04156494140625,
0.050811767578125,
0.05712890625,
-0.032806396484375,
0.016326904296875,
-0.018035888671875,
0.00019681453704833984,
-0.0279998779296875,
0.0240936279296875,
-0.0157012939453125,
-0.035736083984375,
-0.03802490234375,
-0.014678955078125,
0.0248870849609375,
-0.00952911376953125,
-0.0008840560913085938,
-0.03594970703125,
-0.0288848876953125,
-0.00460052490234375,
-0.07501220703125,
-0.0657958984375,
0.0174102783203125,
-0.06634521484375,
0.0167999267578125,
0.01102447509765625,
-0.03253173828125,
-0.033355712890625,
0.057647705078125,
0.00411224365234375,
-0.047882080078125,
0.0070343017578125,
0.01739501953125,
-0.00946807861328125,
0.0013179779052734375,
-0.01065826416015625,
-0.0106201171875,
-0.0093841552734375,
-0.0008854866027832031,
0.0457763671875,
0.0064849853515625,
-0.021759033203125,
0.0190887451171875,
-0.005115509033203125,
-0.0007748603820800781,
-0.004673004150390625,
0.027496337890625,
-0.0298614501953125,
-0.0177764892578125,
-0.0025005340576171875,
0.053436279296875,
0.0272369384765625,
-0.034332275390625,
0.0022716522216796875,
0.0038623809814453125,
0.00426483154296875,
-0.001712799072265625,
0.0309295654296875,
-0.0010623931884765625,
-0.00804901123046875,
-0.0021762847900390625,
-0.035186767578125,
0.051544189453125,
-0.03240966796875,
-0.00881195068359375,
-0.028076171875,
0.0008974075317382812,
-0.026031494140625,
-0.0218048095703125,
-0.026641845703125,
0.0112457275390625,
0.01476287841796875,
-0.005828857421875,
-0.03497314453125,
0.042755126953125,
-0.0005888938903808594,
0.0181732177734375,
-0.014129638671875,
-0.01158905029296875,
-0.031402587890625,
-0.03863525390625,
-0.041778564453125,
0.00689697265625,
-0.007221221923828125,
0.007366180419921875,
-0.0235137939453125,
-0.016845703125,
0.039459228515625,
-0.016448974609375,
0.019439697265625,
-0.0261383056640625,
-0.0211181640625,
-0.0183258056640625,
0.062347412109375,
-0.024322509765625,
-0.020965576171875,
-0.0306854248046875,
0.0204925537109375,
-0.00414276123046875,
-0.036834716796875,
0.01422882080078125,
-0.021209716796875,
0.009765625,
-0.0002453327178955078,
-0.01458740234375,
0.0086822509765625,
-0.009735107421875,
-0.027008056640625,
0.0200042724609375,
-0.0450439453125,
0.055694580078125,
-0.047088623046875,
0.008514404296875,
-0.0005049705505371094,
-0.0003685951232910156,
-0.0538330078125,
-0.0248565673828125,
-0.01041412353515625,
-0.111328125,
-0.0244140625,
0.02520751953125,
0.0697021484375,
-0.03173828125,
-0.004261016845703125,
-0.0615234375,
0.037017822265625,
0.0174713134765625,
0.04925537109375,
-0.0019054412841796875,
-0.00572967529296875,
0.038665771484375,
0.0000546574592590332,
0.031646728515625,
0.0008459091186523438,
-0.0111083984375,
-0.0672607421875,
-0.04937744140625,
-0.068359375,
-0.039947509765625,
-0.0218505859375,
-0.029693603515625,
-0.0020751953125,
-0.0191192626953125,
0.002056121826171875,
-0.030731201171875,
-0.00868988037109375,
-0.007396697998046875,
-0.016387939453125,
0.00473785400390625,
-0.036346435546875,
-0.0139312744140625,
-0.0247802734375,
-0.00765228271484375,
0.0280303955078125,
0.06488037109375,
0.024810791015625,
0.02166748046875,
-0.07049560546875,
0.006866455078125,
0.0279541015625,
-0.0054779052734375,
0.017791748046875,
0.01708984375,
-0.0164642333984375,
0.011260986328125,
0.0034694671630859375,
0.033294677734375,
-0.04302978515625,
0.037628173828125,
-0.0012645721435546875,
-0.039154052734375,
0.04913330078125,
-0.004062652587890625,
-0.0159454345703125,
-0.002361297607421875,
-0.0135498046875,
0.006717681884765625,
-0.003902435302734375,
0.0116424560546875,
-0.01561737060546875,
0.021392822265625,
-0.006927490234375,
-0.0509033203125,
0.0095977783203125,
-0.01837158203125,
0.0662841796875,
0.00909423828125,
-0.00806427001953125,
0.058807373046875,
0.07012939453125,
-0.016265869140625,
0.01140594482421875,
0.0184173583984375,
0.0084381103515625,
0.0625,
-0.00830078125,
-0.002582550048828125,
-0.0253143310546875,
0.018096923828125,
-0.03619384765625,
0.001194000244140625,
0.0028324127197265625,
-0.083251953125,
0.00746917724609375,
0.00949859619140625,
-0.00577545166015625,
-0.031463623046875,
0.032684326171875,
0.039825439453125,
-0.016754150390625,
0.00804901123046875,
-0.05548095703125,
0.0211334228515625,
-0.05072021484375,
-0.0180816650390625,
-0.0064544677734375,
-0.01081085205078125,
0.0283660888671875,
0.0086212158203125,
-0.0241851806640625,
0.01511383056640625,
-0.0010061264038085938,
0.016876220703125,
0.015716552734375,
0.00894927978515625,
0.026275634765625,
0.01137542724609375,
0.0012464523315429688,
-0.00937652587890625,
-0.0030498504638671875,
-0.0428466796875,
0.01123809814453125,
0.0224761962890625,
0.032806396484375,
0.0008792877197265625,
-0.0207672119140625,
0.006412506103515625,
-0.0171051025390625,
-0.0259246826171875,
0.0226287841796875,
-0.0174102783203125,
-0.05133056640625,
-0.017730712890625,
0.018280029296875,
0.034088134765625,
-0.0096435546875,
0.014801025390625,
0.0185089111328125,
0.004772186279296875,
-0.02496337890625,
-0.00788116455078125,
-0.07586669921875,
-0.003787994384765625,
0.035675048828125,
0.03240966796875,
0.0067901611328125,
-0.019134521484375,
-0.059295654296875,
-0.05072021484375,
-0.00513458251953125,
0.0084075927734375,
0.0770263671875,
-0.042938232421875,
-0.0079498291015625,
-0.02325439453125,
0.02496337890625,
-0.07037353515625,
0.03057861328125,
0.0027980804443359375,
0.0204315185546875,
0.041656494140625,
-0.0484619140625,
-0.01493072509765625,
-0.038787841796875,
-0.001819610595703125,
-0.004940032958984375,
0.0023021697998046875,
-0.007801055908203125,
0.0186309814453125,
0.033721923828125,
0.002803802490234375,
-0.01947021484375,
0.0157318115234375,
0.0108795166015625,
0.00255584716796875,
0.0404052734375,
-0.0169677734375,
0.033233642578125,
0.031005859375,
0.036407470703125,
0.00644683837890625,
0.0081329345703125,
-0.01546478271484375,
-0.032684326171875,
-0.0181732177734375,
-0.07891845703125,
-0.008087158203125,
0.0234527587890625,
-0.00925445556640625,
0.021881103515625,
-0.017547607421875,
0.01084136962890625,
0.0272674560546875,
-0.023529052734375,
0.0008454322814941406,
-0.0236053466796875,
0.032806396484375,
-0.0501708984375,
-0.0269317626953125,
0.03363037109375,
-0.04815673828125,
-0.00433349609375,
0.032806396484375,
0.0185394287109375,
0.0280914306640625,
-0.019378662109375,
0.0202178955078125,
-0.0041961669921875,
-0.00273895263671875,
0.004627227783203125,
0.03643798828125,
0.01096343994140625,
0.05072021484375,
0.0156707763671875,
0.0213165283203125,
0.024749755859375,
0.0195159912109375,
0.045379638671875,
-0.0072479248046875,
0.033721923828125,
-0.01186370849609375,
0.0104827880859375,
-0.0008516311645507812,
-0.0170745849609375,
0.0185546875,
-0.036712646484375,
0.0330810546875,
0.0221099853515625,
0.012969970703125,
0.0022735595703125,
-0.026458740234375,
0.030426025390625,
-0.0228271484375,
0.02154541015625,
-0.0291900634765625,
0.023590087890625,
0.00994110107421875,
-0.0228729248046875,
0.004116058349609375,
-0.03662109375,
0.006866455078125,
0.0204315185546875,
-0.00371551513671875,
0.0088958740234375,
-0.009918212890625,
-0.04486083984375,
0.0301361083984375,
0.0009675025939941406,
0.028900146484375,
0.00858306884765625,
-0.023651123046875,
-0.0478515625,
-0.0479736328125,
-0.044921875,
-0.01152801513671875,
-0.046630859375,
0.0160369873046875,
0.01342010498046875,
0.037689208984375,
0.04742431640625,
0.005832672119140625,
0.000003874301910400391,
0.023162841796875,
-0.02752685546875,
-0.047454833984375,
-0.019012451171875,
0.03302001953125,
0.0185394287109375,
-0.08111572265625,
0.035308837890625,
-0.038238525390625,
0.004772186279296875,
0.015228271484375,
0.0158538818359375,
0.0204620361328125,
-0.00627899169921875,
-0.0230560302734375,
0.0565185546875,
-0.0164031982421875,
-0.0296630859375,
0.0022449493408203125,
0.043121337890625,
-0.08123779296875,
-0.083251953125,
0.01078033447265625,
-0.08538818359375,
-0.0302581787109375,
-0.0137939453125,
-0.10272216796875,
0.1353759765625,
0.00218963623046875,
0.0814208984375,
0.00879669189453125,
0.03179931640625,
-0.0288543701171875,
0.01116943359375,
-0.009796142578125,
0.006229400634765625,
-0.047454833984375,
-0.00862884521484375,
-0.06390380859375,
0.005550384521484375,
-0.039764404296875,
0.032745361328125,
0.03460693359375,
0.0024471282958984375,
-0.05224609375,
-0.010711669921875,
0.053985595703125,
0.058441162109375,
0.0249481201171875,
0.04449462890625,
0.0230560302734375,
-0.0198516845703125,
0.044281005859375,
-0.01087188720703125,
0.0302734375,
-0.022247314453125,
0.0268707275390625,
0.024261474609375,
0.005146026611328125,
0.00992584228515625,
-0.007045745849609375,
0.0265655517578125,
0.015716552734375,
-0.0253143310546875,
0.00749969482421875,
-0.066650390625,
0.032806396484375,
0.045318603515625,
-0.00366973876953125,
0.0650634765625,
0.09722900390625,
-0.0246124267578125,
0.04620361328125,
-0.0474853515625,
-0.00750732421875,
0.026153564453125,
0.00502777099609375,
-0.015380859375,
0.037261962890625,
0.0005173683166503906,
0.0360107421875,
0.007843017578125,
0.0010528564453125,
-0.01354217529296875,
0.0167083740234375,
-0.06622314453125,
0.0031223297119140625,
0.043609619140625,
0.024688720703125,
-0.012054443359375,
-0.042633056640625,
0.0035648345947265625,
0.002384185791015625,
-0.0170135498046875,
-0.0258331298828125,
-0.045135498046875,
-0.0230865478515625,
0.03411865234375,
-0.0023651123046875,
0.01129913330078125,
0.0138092041015625,
0.00830078125,
0.0023403167724609375,
0.046905517578125,
-0.033905029296875,
0.00010704994201660156,
-0.022247314453125,
0.0228118896484375,
-0.003276824951171875,
0.0164794921875,
-0.026336669921875,
0.0595703125,
-0.023773193359375,
0.003002166748046875,
-0.006793975830078125,
0.044921875,
0.003093719482421875,
-0.005855560302734375,
-0.01479339599609375,
-0.0693359375,
0.0275726318359375,
0.02105712890625,
0.037261962890625,
0.03497314453125,
0.067138671875,
0.044586181640625,
-0.025909423828125,
0.0146026611328125,
0.02325439453125,
-0.00948333740234375,
-0.0038738250732421875,
-0.030242919921875,
-0.027435302734375,
0.00685882568359375,
-0.0211029052734375,
0.00371551513671875,
-0.0247344970703125,
0.040771484375,
-0.019134521484375,
-0.002857208251953125,
-0.004436492919921875,
-0.05120849609375,
0.016357421875,
-0.026580810546875,
0.0645751953125,
-0.00592041015625,
-0.11077880859375,
-0.0192718505859375,
-0.0144195556640625,
-0.0247802734375,
0.017852783203125,
0.0271148681640625,
-0.07373046875,
0.07257080078125,
0.00890350341796875,
-0.046875,
-0.004848480224609375,
0.0321044921875,
0.0157623291015625,
-0.00698089599609375,
0.0002803802490234375,
-0.011016845703125,
-0.07366943359375,
-0.01329803466796875,
-0.0298004150390625,
0.00054931640625,
0.023681640625,
0.0531005859375,
0.0195465087890625,
0.0328369140625,
0.0309295654296875,
0.005229949951171875,
0.014404296875,
0.0399169921875,
-0.043731689453125,
-0.0014514923095703125,
0.01285552978515625,
-0.00901031494140625,
0.04315185546875,
0.0191650390625,
0.02880859375,
-0.0254974365234375,
-0.018768310546875,
-0.0279998779296875,
0.015289306640625,
0.034881591796875,
0.050872802734375,
-0.0132293701171875,
-0.032928466796875,
-0.09588623046875,
-0.032867431640625,
0.06591796875,
0.053009033203125,
-0.0202178955078125,
-0.007564544677734375,
0.00130462646484375,
-0.051239013671875,
0.016387939453125,
-0.00466156005859375,
-0.002231597900390625,
0.0165863037109375,
0.0155487060546875,
-0.04791259765625,
0.011749267578125,
-0.0143585205078125,
-0.0173187255859375,
0.0175628662109375,
0.04541015625,
-0.0017480850219726562,
-0.028350830078125,
0.045745849609375,
0.044525146484375,
-0.0078277587890625,
-0.07855224609375,
-0.01407623291015625,
0.1260986328125,
-0.022979736328125,
-0.003856658935546875,
-0.06512451171875,
-0.0223846435546875,
-0.042022705078125,
-0.00817108154296875,
0.043731689453125,
-0.031219482421875,
0.0217437744140625,
-0.053924560546875,
0.01097869873046875,
0.011383056640625,
0.004901885986328125,
-0.04986572265625,
0.047149658203125,
-0.01430511474609375,
0.0035839080810546875,
-0.0286102294921875,
0.022247314453125,
-0.02996826171875,
0.0155181884765625,
-0.0191497802734375,
-0.0921630859375,
-0.03564453125,
0.08721923828125,
-0.053924560546875,
-0.0023345947265625,
-0.005718231201171875,
-0.0254974365234375,
0.01245880126953125,
0.01049041748046875,
0.0256195068359375,
0.061737060546875,
0.0640869140625,
0.0023250579833984375,
-0.0011425018310546875,
0.01513671875,
-0.0308837890625,
-0.027801513671875,
0.01045989990234375,
-0.006259918212890625,
-0.0092010498046875,
-0.0003764629364013672,
-0.00677490234375,
0.00144195556640625,
-0.044097900390625,
-0.0955810546875,
0.0350341796875,
-0.0135345458984375,
-0.042724609375,
-0.0382080078125,
0.0111236572265625,
-0.01088714599609375,
0.0252227783203125,
-0.004032135009765625,
-0.0268707275390625,
-0.00716400146484375,
0.043182373046875,
-0.00737762451171875,
0.0224609375,
-0.0003249645233154297,
0.006153106689453125,
-0.02880859375,
0.0015201568603515625,
-0.017242431640625,
-0.0147552490234375,
0.0243988037109375,
-0.01067352294921875,
0.0426025390625,
0.03839111328125,
-0.03509521484375,
0.007671356201171875,
-0.01319122314453125,
-0.0189971923828125,
-0.010772705078125,
-0.027374267578125,
-0.0428466796875,
-0.007244110107421875,
0.06524658203125,
0.07769775390625,
0.0175018310546875,
-0.037261962890625,
0.0472412109375,
-0.0120391845703125,
-0.0239105224609375,
0.00260162353515625,
0.008209228515625,
-0.036163330078125,
-0.012237548828125,
0.02105712890625,
0.0016775131225585938,
-0.01471710205078125,
-0.0008807182312011719,
-0.0286407470703125,
-0.0159149169921875,
0.01171112060546875,
0.0190582275390625,
-0.05841064453125,
-0.0003113746643066406,
0.087646484375,
-0.042022705078125,
0.0008606910705566406,
0.021392822265625,
0.0036907196044921875,
0.0426025390625,
0.0178070068359375,
-0.0001863241195678711,
0.006633758544921875,
-0.042572021484375,
0.0125885009765625,
-0.003154754638671875,
-0.00457000732421875,
-0.03863525390625,
-0.0071563720703125,
0.00943756103515625,
0.017425537109375,
-0.01531982421875,
0.0287628173828125,
0.0263519287109375,
-0.01971435546875,
-0.038299560546875,
0.017181396484375,
-0.046783447265625,
0.033172607421875,
-0.0097198486328125,
0.00713348388671875,
-0.0222930908203125,
0.0235137939453125,
0.047119140625,
-0.04180908203125,
0.016204833984375,
0.0181427001953125,
0.0154571533203125,
-0.02874755859375,
0.0185546875,
0.04815673828125,
0.0164947509765625,
0.0027523040771484375
] |
fd158c3911f8db20ed239b72eaa809d51191143f
|
Wordpress Stackexchange
Q: WooCommerce: How to edit the get_price_html I am trying to edit the price value for a single product.
In single-product/price.php there is a template call to $product->get_price_html. How can I edit that function/method to change the way the HTML is presented?
At the moment even if I delete all the contents of the function located in class-wc-product it still miraculously displays? Anyone know why?
A: function wpa83368_price_html( $price,$product ){
// return $product->price;
if ( $product->price > 0 ) {
if ( $product->price && isset( $product->regular_price ) ) {
$from = $product->regular_price;
$to = $product->price;
return '<div class="old-colt"><del>'. ( ( is_numeric( $from ) ) ? woocommerce_price( $from ) : $from ) .' Retail </del> | </div><div class="live-colst">'.( ( is_numeric( $to ) ) ? woocommerce_price( $to ) : $to ) .'Our Price</div>';
} else {
$to = $product->price;
return '<div class="live-colst">' . ( ( is_numeric( $to ) ) ? woocommerce_price( $to ) : $to ) . 'Our Price</div>';
}
} else {
return '<div class="live-colst">0 Our Price</div>';
}
}
|
Q: WooCommerce: How to edit the get_price_html I am trying to edit the price value for a single product.
In single-product/price.php there is a template call to $product->get_price_html. How can I edit that function/method to change the way the HTML is presented?
At the moment even if I delete all the contents of the function located in class-wc-product it still miraculously displays? Anyone know why?
A: function wpa83368_price_html( $price,$product ){
// return $product->price;
if ( $product->price > 0 ) {
if ( $product->price && isset( $product->regular_price ) ) {
$from = $product->regular_price;
$to = $product->price;
return '<div class="old-colt"><del>'. ( ( is_numeric( $from ) ) ? woocommerce_price( $from ) : $from ) .' Retail </del> | </div><div class="live-colst">'.( ( is_numeric( $to ) ) ? woocommerce_price( $to ) : $to ) .'Our Price</div>';
} else {
$to = $product->price;
return '<div class="live-colst">' . ( ( is_numeric( $to ) ) ? woocommerce_price( $to ) : $to ) . 'Our Price</div>';
}
} else {
return '<div class="live-colst">0 Our Price</div>';
}
}
A: Core and plugin files should never be edited directly, as any updates could overwrite your changes. If you look in WooCommerce source at the get_price_html method, there are a number of filters available to modify the output of the function.
See add_filter in Codex for more info on adding filters to apply_filters calls.
From get_price_html in class-wc-product:
return apply_filters('woocommerce_get_price_html', $price, $this);
So to add your own filter:
add_filter( 'woocommerce_get_price_html', 'wpa83367_price_html', 100, 2 );
function wpa83367_price_html( $price, $product ){
return 'Was:' . str_replace( '<ins>', ' Now:<ins>', $price );
}
A: in the functions.php
function h08831n_get_price($product){
$price_html = '<div class="product-price">';
if ( $product->get_price() > 0 ) {
if ($product->get_price() && $product->get_regular_price()) {
$from = $product->get_regular_price();
$to = $product->get_price();
$price_html .= '<del>'. ( ( is_numeric( $from ) ) ? wc_price( $from ) : $from ) .'</del><ins>'.( ( is_numeric( $to ) ) ? wc_price( $to ) : $to ) .'</ins>';
}else{
$to = $product->get_price();
$price_html .= '<ins>' . ( ( is_numeric( $to ) ) ? wc_price( $to ) : $to ) . '</ins>';
}
}else{
$price_html .= '<div class="free">free</div>';
}
$price_html .= '</div>';
return $price_html;
}
in the where you want to display the price like single-product.php
global $product;
echo h08831n_get_price($product);
you can also remove wc_price in the function to remove woocommerce default HTML formats
|
wordpress
|
{
"language": "en",
"length": 380,
"provenance": "stackexchange_00019.jsonl.gz:428332",
"question_score": "18",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83367"
}
|
[
-0.00504302978515625,
-0.00713348388671875,
-0.03765869140625,
-0.0192413330078125,
-0.00406646728515625,
-0.00525665283203125,
0.0130767822265625,
0.007171630859375,
0.007350921630859375,
0.01690673828125,
-0.035186767578125,
-0.017791748046875,
-0.0007762908935546875,
-0.02294921875,
-0.0025577545166015625,
-0.033355712890625,
0.037689208984375,
-0.0058135986328125,
0.02606201171875,
0.0124053955078125,
-0.0292510986328125,
0.040435791015625,
0.0171966552734375,
0.03277587890625,
0.01306915283203125,
-0.04266357421875,
0.106689453125,
-0.000042319297790527344,
0.047576904296875,
-0.009765625,
0.045257568359375,
-0.04180908203125,
0.03619384765625,
-0.005268096923828125,
-0.0148162841796875,
0.0247650146484375,
-0.002666473388671875,
-0.00732421875,
0.0011005401611328125,
0.01132965087890625,
0.047271728515625,
-0.0170745849609375,
-0.0350341796875,
0.028564453125,
-0.045440673828125,
-0.019989013671875,
0.01512908935546875,
-0.00844573974609375,
0.0197906494140625,
-0.00678253173828125,
0.0002353191375732422,
0.009063720703125,
-0.002460479736328125,
-0.017181396484375,
-0.032440185546875,
-0.023345947265625,
-0.044525146484375,
-0.0230712890625,
0.0050506591796875,
0.01038360595703125,
0.01154327392578125,
-0.00701904296875,
0.027740478515625,
0.0009775161743164062,
-0.041168212890625,
-0.00004410743713378906,
0.016265869140625,
0.00797271728515625,
-0.0278778076171875,
-0.03680419921875,
0.03912353515625,
0.0020599365234375,
0.0064239501953125,
-0.01316070556640625,
-0.0020694732666015625,
-0.028900146484375,
0.01073455810546875,
-0.0163726806640625,
-0.0012683868408203125,
0.0180511474609375,
0.0535888671875,
-0.0276947021484375,
-0.007450103759765625,
-0.024688720703125,
0.02789306640625,
-0.0291748046875,
0.0179290771484375,
-0.001346588134765625,
-0.04693603515625,
-0.0345458984375,
-0.04229736328125,
0.0223236083984375,
-0.0487060546875,
-0.0201568603515625,
-0.051605224609375,
-0.01183319091796875,
-0.00457000732421875,
0.036376953125,
0.01263427734375,
0.02288818359375,
-0.006641387939453125,
-0.03546142578125,
-0.000362396240234375,
-0.046173095703125,
-0.00213623046875,
0.005950927734375,
-0.005176544189453125,
0.042022705078125,
0.04974365234375,
0.0260772705078125,
0.0108184814453125,
0.020233154296875,
-0.046905517578125,
-0.0687255859375,
-0.011474609375,
0.040679931640625,
-0.037200927734375,
0.01413726806640625,
0.0289306640625,
-0.01367950439453125,
0.033447265625,
0.055450439453125,
0.09619140625,
-0.019195556640625,
-0.0258941650390625,
0.019500732421875,
-0.03839111328125,
-0.1202392578125,
0.00287628173828125,
-0.004039764404296875,
-0.035797119140625,
0.0007171630859375,
0.06341552734375,
0.053253173828125,
0.01959228515625,
-0.0174713134765625,
0.048797607421875,
0.04046630859375,
-0.0032291412353515625,
0.0124664306640625,
0.022186279296875,
0.01468658447265625,
0.00702667236328125,
-0.0114898681640625,
0.01558685302734375,
-0.0177764892578125,
0.0162811279296875,
0.0175628662109375,
-0.00434112548828125,
-0.01232147216796875,
0.0338134765625,
0.0235595703125,
0.030792236328125,
0.0030994415283203125,
0.025299072265625,
0.0134124755859375,
0.055389404296875,
-0.00411224365234375,
-0.0295257568359375,
-0.016876220703125,
-0.0201416015625,
-0.026458740234375,
0.027191162109375,
-0.0455322265625,
-0.0712890625,
0.03497314453125,
-0.0291900634765625,
-0.0235443115234375,
0.01715087890625,
0.06671142578125,
-0.040252685546875,
0.00746917724609375,
0.001651763916015625,
0.01024627685546875,
-0.01456451416015625,
-0.0006008148193359375,
-0.031829833984375,
0.053802490234375,
0.03192138671875,
-0.00887298583984375,
-0.0014801025390625,
-0.038604736328125,
0.0665283203125,
-0.0202484130859375,
-0.03131103515625,
0.01611328125,
0.0013418197631835938,
-0.0014715194702148438,
0.006465911865234375,
-0.014862060546875,
0.02777099609375,
0.0303955078125,
-0.05743408203125,
0.039794921875,
0.031707763671875,
-0.0312042236328125,
-0.0283660888671875,
-0.03668212890625,
-0.00782012939453125,
-0.0123748779296875,
-0.0278778076171875,
0.040771484375,
-0.036590576171875,
0.020294189453125,
-0.021575927734375,
0.029327392578125,
-0.000041425228118896484,
0.0450439453125,
-0.09686279296875,
0.029083251953125,
0.040069580078125,
0.0148468017578125,
-0.0377197265625,
-0.014862060546875,
0.03643798828125,
-0.03271484375,
-0.0582275390625,
0.05987548828125,
-0.0165863037109375,
0.056671142578125,
-0.0096282958984375,
-0.04840087890625,
-0.004955291748046875,
0.004009246826171875,
0.0285491943359375,
0.05926513671875,
-0.05029296875,
0.0138397216796875,
0.044891357421875,
0.03253173828125,
0.00765228271484375,
0.006046295166015625,
0.024871826171875,
-0.014312744140625,
-0.039886474609375,
-0.0033473968505859375,
-0.007091522216796875,
-0.068603515625,
-0.0114898681640625,
0.057373046875,
0.033355712890625,
-0.00951385498046875,
-0.01580810546875,
-0.01271820068359375,
0.08428955078125,
0.0163726806640625,
-0.0145263671875,
-0.0016202926635742188,
-0.0082244873046875,
0.042694091796875,
-0.0017976760864257812,
0.01560211181640625,
-0.0010366439819335938,
-0.010467529296875,
-0.006008148193359375,
0.036041259765625,
-0.021942138671875,
0.02435302734375,
-0.0099334716796875,
0.037384033203125,
-0.043792724609375,
0.030059814453125,
0.05743408203125,
-0.0279998779296875,
0.0227813720703125,
-0.00615692138671875,
0.02685546875,
0.00847625732421875,
-0.026611328125,
0.0014638900756835938,
0.0257568359375,
0.01102447509765625,
-0.01374053955078125,
0.00273895263671875,
-0.10528564453125,
-0.0377197265625,
-0.0268402099609375,
0.058624267578125,
-0.01543426513671875,
-0.04705810546875,
0.006839752197265625,
0.053802490234375,
-0.005809783935546875,
-0.00853729248046875,
-0.00321197509765625,
-0.062469482421875,
-0.025360107421875,
0.006336212158203125,
-0.005908966064453125,
-0.0091552734375,
0.0201568603515625,
0.0036792755126953125,
-0.054656982421875,
0.0416259765625,
-0.0142974853515625,
-0.0269927978515625,
-0.003528594970703125,
-0.01142120361328125,
0.021881103515625,
-0.0167083740234375,
0.04034423828125,
0.0545654296875,
-0.0455322265625,
0.053924560546875,
0.0021381378173828125,
0.0088043212890625,
0.0245819091796875,
-0.038909912109375,
-0.0394287109375,
0.048492431640625,
-0.0675048828125,
0.032135009765625,
0.01373291015625,
0.05084228515625,
-0.043212890625,
-0.04718017578125,
-0.005191802978515625,
-0.003753662109375,
-0.098876953125,
-0.07391357421875,
-0.0211181640625,
-0.06298828125,
-0.0236968994140625,
0.005889892578125,
-0.0280609130859375,
0.020843505859375,
0.0214080810546875,
0.0014495849609375,
0.0192718505859375,
0.01009368896484375,
-0.0268096923828125,
-0.029083251953125,
-0.0487060546875,
-0.04754638671875,
-0.01424407958984375,
-0.01033782958984375,
-0.01593017578125,
0.032623291015625,
-0.0003695487976074219,
-0.00487518310546875,
0.032989501953125,
0.0240631103515625,
0.0208587646484375,
-0.01192474365234375,
-0.00615692138671875,
-0.031524658203125,
0.006103515625,
-0.0089874267578125,
-0.00039768218994140625,
0.00891876220703125,
-0.0081329345703125,
-0.01189422607421875,
-0.0111541748046875,
0.0217742919921875,
0.01519012451171875,
0.057403564453125,
0.0214996337890625,
0.00936126708984375,
0.0311279296875,
-0.03271484375,
-0.06768798828125,
-0.005992889404296875,
-0.057464599609375,
0.06964111328125,
0.0250091552734375,
0.00818634033203125,
0.0201263427734375,
0.041534423828125,
-0.01181793212890625,
0.003086090087890625,
0.053131103515625,
-0.029632568359375,
0.00794219970703125,
-0.0083465576171875,
-0.031494140625,
-0.044342041015625,
0.027557373046875,
-0.01263427734375,
0.020599365234375,
0.015716552734375,
0.0210418701171875,
0.00522613525390625,
-0.00014674663543701172,
-0.02789306640625,
-0.0207366943359375,
0.07720947265625,
-0.0119781494140625,
-0.002246856689453125,
-0.023284912109375,
-0.045074462890625,
0.0022869110107421875,
0.09246826171875,
-0.0256500244140625,
-0.0221405029296875,
-0.02239990234375,
0.01140594482421875,
-0.0312347412109375,
-0.054595947265625,
-0.010986328125,
0.000732421875,
-0.0911865234375,
0.025299072265625,
-0.013214111328125,
-0.000017762184143066406,
-0.0196075439453125,
0.01458740234375,
-0.03790283203125,
-0.0477294921875,
0.0206451416015625,
-0.0218963623046875,
-0.009857177734375,
0.033233642578125,
-0.01406097412109375,
0.006107330322265625,
0.0021209716796875,
-0.0367431640625,
0.00904083251953125,
-0.0294036865234375,
0.0260009765625,
0.0304107666015625,
0.0261077880859375,
-0.02618408203125,
-0.0008449554443359375,
0.036041259765625,
0.007427215576171875,
0.019195556640625,
-0.003131866455078125,
0.0196075439453125,
-0.0217742919921875,
-0.036346435546875,
-0.0013427734375,
-0.051513671875,
-0.025909423828125,
-0.045196533203125,
-0.007213592529296875,
0.0223236083984375,
0.0018110275268554688,
0.01446533203125,
-0.007572174072265625,
-0.00046539306640625,
-0.1256103515625,
-0.041259765625,
-0.0009784698486328125,
0.004608154296875,
-0.0113677978515625,
0.02496337890625,
-0.013092041015625,
-0.10980224609375,
0.052642822265625,
0.0228424072265625,
-0.01299285888671875,
-0.0013780593872070312,
0.044830322265625,
0.0255584716796875,
-0.036468505859375,
0.004474639892578125,
0.02606201171875,
0.041046142578125,
0.05511474609375,
-0.00542449951171875,
-0.028472900390625,
-0.0216217041015625,
0.0219879150390625,
0.004856109619140625,
0.0157623291015625,
-0.0010509490966796875,
0.052215576171875,
0.01207733154296875,
0.002399444580078125,
0.0118408203125,
0.0214385986328125,
-0.032562255859375,
0.006053924560546875,
-0.0211334228515625,
-0.01385498046875,
0.0086517333984375,
0.0316162109375,
-0.005702972412109375,
0.025482177734375,
-0.02349853515625,
-0.0304718017578125,
0.0036468505859375,
-0.020477294921875,
-0.0022029876708984375,
0.032073974609375,
0.0015783309936523438,
0.004642486572265625,
-0.0263519287109375,
-0.0247344970703125,
-0.01340484619140625,
-0.004329681396484375,
-0.002956390380859375,
0.0153350830078125,
-0.041534423828125,
-0.011505126953125,
-0.0180206298828125,
0.001087188720703125,
0.00568389892578125,
0.00435638427734375,
-0.016082763671875,
-0.03094482421875,
-0.005481719970703125,
-0.00269317626953125,
-0.0036182403564453125,
-0.028350830078125,
0.0126495361328125,
0.050262451171875,
0.0014925003051757812,
-0.00849151611328125,
-0.04315185546875,
0.01184844970703125,
-0.036956787109375,
0.002063751220703125,
0.019134521484375,
-0.007228851318359375,
0.0034046173095703125,
0.0672607421875,
0.015899658203125,
0.0217742919921875,
-0.017578125,
0.03192138671875,
0.008544921875,
0.0274810791015625,
0.0137481689453125,
-0.0222930908203125,
0.00799560546875,
-0.022735595703125,
-0.01012420654296875,
-0.01263427734375,
-0.0460205078125,
0.06524658203125,
0.0166168212890625,
-0.0191802978515625,
0.01378631591796875,
-0.01971435546875,
0.043121337890625,
-0.01192474365234375,
0.025543212890625,
0.0372314453125,
-0.012908935546875,
-0.00579071044921875,
0.0204010009765625,
0.0170135498046875,
-0.010345458984375,
0.00008505582809448242,
-0.045867919921875,
-0.006740570068359375,
-0.0205535888671875,
0.007717132568359375,
-0.0264434814453125,
-0.017333984375,
-0.016357421875,
-0.0016269683837890625,
-0.009033203125,
-0.00893402099609375,
-0.02569580078125,
-0.0017194747924804688,
-0.037322998046875,
-0.0268707275390625,
0.08099365234375,
0.00933074951171875,
0.05517578125,
-0.03662109375,
-0.049072265625,
-0.0300750732421875,
0.004589080810546875,
0.05291748046875,
0.0309295654296875,
-0.0237274169921875,
-0.01424407958984375,
-0.039306640625,
-0.0400390625,
0.017730712890625,
0.01837158203125,
-0.0260009765625,
-0.00901031494140625,
-0.0007538795471191406,
0.022674560546875,
-0.01065826416015625,
-0.04510498046875,
-0.00894927978515625,
-0.021331787109375,
0.0030517578125,
0.00901031494140625,
0.00864410400390625,
0.0299224853515625,
-0.002323150634765625,
0.0266265869140625,
0.0186614990234375,
0.009765625,
-0.0228424072265625,
-0.0168914794921875,
0.024444580078125,
0.00923919677734375,
-0.007659912109375,
-0.012908935546875,
-0.026336669921875,
-0.0650634765625,
0.0003998279571533203,
-0.0102081298828125,
-0.0064697265625,
-0.00791168212890625,
-0.00495147705078125,
-0.03155517578125,
0.01367950439453125,
-0.01300811767578125,
-0.0021209716796875,
-0.0171966552734375,
-0.04864501953125,
-0.0308685302734375,
0.01384735107421875,
-0.0196380615234375,
0.055328369140625,
-0.0179595947265625,
0.00867462158203125,
0.033172607421875,
-0.02392578125,
0.0217437744140625,
0.0418701171875,
0.0056610107421875,
0.044830322265625,
-0.0210418701171875,
0.0172119140625,
0.04638671875,
0.0013437271118164062,
0.01483917236328125,
0.032501220703125,
0.03509521484375,
-0.01447296142578125,
-0.01068115234375,
0.0014019012451171875,
-0.01812744140625,
0.0478515625,
0.07208251953125,
0.091796875,
-0.10650634765625,
0.01338958740234375,
0.019073486328125,
-0.025787353515625,
0.042510986328125,
-0.00649261474609375,
-0.0024433135986328125,
-0.0242919921875,
-0.0027256011962890625,
-0.0242462158203125,
-0.016387939453125,
-0.009979248046875,
-0.005100250244140625,
0.0087432861328125,
0.0106048583984375,
0.01751708984375,
-0.0021209716796875,
-0.08282470703125,
-0.01502227783203125,
0.060760498046875,
-0.00995635986328125,
-0.015716552734375,
-0.00914764404296875,
0.02593994140625,
-0.04632568359375,
-0.071044921875,
-0.026123046875,
-0.01904296875,
-0.01812744140625,
0.03826904296875,
0.007770538330078125,
-0.004810333251953125,
0.0374755859375,
0.0010776519775390625,
0.01035308837890625,
0.0099639892578125,
-0.0677490234375,
0.0037097930908203125,
-0.00274658203125,
0.0234832763671875,
0.0220489501953125,
-0.07562255859375,
0.002849578857421875,
-0.053985595703125,
0.00940704345703125,
0.00815582275390625,
0.03302001953125,
-0.00243377685546875,
0.039703369140625,
-0.04541015625,
0.053131103515625,
0.004360198974609375,
-0.0338134765625,
-0.0102386474609375,
0.0036869049072265625,
-0.017120361328125,
0.035675048828125,
-0.0080108642578125,
0.0186004638671875,
0.0019369125366210938,
-0.0173187255859375,
-0.0308074951171875,
0.0389404296875,
-0.042938232421875,
0.0108642578125,
0.041015625,
0.013092041015625,
-0.023040771484375,
-0.019683837890625,
-0.0188751220703125,
0.0217132568359375,
0.00034308433532714844,
0.0191192626953125,
0.00827789306640625,
-0.003192901611328125,
0.01042938232421875,
0.0259552001953125,
-0.0140228271484375,
-0.0010671615600585938,
-0.0062255859375,
0.025299072265625,
0.055755615234375,
0.0015583038330078125,
-0.00772857666015625,
0.0306549072265625,
0.003971099853515625,
-0.0196075439453125,
0.0193328857421875,
-0.0215301513671875,
-0.0003707408905029297,
-0.0126953125,
0.022552490234375,
0.048004150390625,
0.027130126953125,
0.003940582275390625,
0.0016088485717773438,
0.0260162353515625,
-0.026214599609375,
0.01165008544921875,
0.02484130859375,
-0.010040283203125,
0.007213592529296875,
0.0209808349609375,
0.0013837814331054688,
0.019805908203125,
0.02984619140625,
-0.0288543701171875,
0.038665771484375,
-0.02880859375,
-0.018707275390625,
0.039825439453125,
-0.0064239501953125,
0.01325225830078125,
0.00847625732421875,
-0.01358795166015625,
-0.0029754638671875,
0.05755615234375,
0.02362060546875,
0.0347900390625,
0.0027008056640625,
0.005889892578125,
0.0870361328125,
0.049713134765625,
0.023223876953125,
-0.061767578125,
0.01654052734375,
0.004467010498046875,
-0.02642822265625,
0.0024394989013671875,
-0.0775146484375,
-0.0250396728515625,
-0.044677734375,
-0.05474853515625,
-0.00939178466796875,
-0.0313720703125,
0.039794921875,
0.037261962890625,
0.03564453125,
0.0150909423828125,
-0.053802490234375,
-0.07769775390625,
-0.033416748046875,
0.022369384765625,
0.0018787384033203125,
0.050018310546875,
-0.00749969482421875,
0.0826416015625,
-0.0164947509765625,
-0.024078369140625,
0.01186370849609375,
0.0272674560546875,
0.0003483295440673828,
-0.0170135498046875,
-0.021759033203125,
-0.033416748046875,
0.003437042236328125,
0.0215606689453125,
-0.0043182373046875,
0.0071563720703125,
0.03314208984375,
0.0439453125,
-0.0031528472900390625,
-0.0163726806640625,
0.0290679931640625,
-0.0053863525390625,
-0.0018825531005859375,
-0.004058837890625,
-0.0034961700439453125,
-0.019134521484375,
-0.0273895263671875,
-0.020111083984375,
0.027496337890625,
-0.0029964447021484375,
-0.035675048828125,
0.060089111328125,
-0.014190673828125,
-0.0025691986083984375,
0.0228424072265625,
-0.0054779052734375,
0.07080078125,
0.00968170166015625,
-0.039825439453125,
0.007720947265625,
-0.025634765625,
-0.0198974609375,
-0.01971435546875,
0.007701873779296875,
-0.037139892578125,
0.06793212890625,
0.0007958412170410156,
0.0106353759765625,
-0.0169525146484375,
0.00251007080078125,
0.01497650146484375,
0.00034165382385253906,
0.0153961181640625,
0.0194244384765625,
0.003948211669921875,
-0.01403045654296875,
-0.0178375244140625,
0.04638671875,
-0.00722503662109375,
0.0704345703125,
-0.0447998046875,
0.0150909423828125,
-0.0002739429473876953,
0.014404296875,
-0.01532745361328125,
-0.0323486328125,
0.07379150390625,
-0.036102294921875,
-0.01788330078125,
-0.004947662353515625,
-0.0239410400390625,
-0.013946533203125,
0.03497314453125,
-0.03302001953125,
-0.016143798828125,
-0.040130615234375,
0.052642822265625,
0.017364501953125,
0.01461029052734375,
-0.01406097412109375,
-0.03485107421875,
-0.024139404296875,
-0.006061553955078125,
0.0248870849609375,
0.034454345703125,
0.0121307373046875,
0.008056640625,
0.043792724609375,
-0.0235137939453125,
0.0212554931640625,
-0.0164947509765625,
0.067138671875,
0.037994384765625,
0.001018524169921875,
0.05120849609375,
0.0021076202392578125,
-0.028656005859375,
0.0125732421875,
0.002216339111328125,
-0.01067352294921875,
-0.00273895263671875,
-0.0124359130859375,
-0.020660400390625,
0.0248870849609375,
-0.0015707015991210938,
-0.036163330078125,
0.01227569580078125,
0.055877685546875,
-0.043670654296875,
-0.00742340087890625,
-0.02520751953125,
-0.01873779296875,
-0.036834716796875,
-0.004405975341796875,
0.0226287841796875,
-0.0105743408203125,
0.003314971923828125,
-0.0281982421875,
0.007106781005859375,
0.0260009765625,
-0.0247650146484375,
-0.017181396484375,
-0.0193023681640625,
-0.027862548828125,
0.08831787109375,
-0.0190887451171875,
-0.04791259765625,
0.002506256103515625,
0.0294342041015625,
0.0001456737518310547,
-0.034881591796875,
-0.052398681640625,
-0.007160186767578125,
-0.051910400390625,
0.0203704833984375,
0.037628173828125,
-0.0226898193359375,
0.015625,
0.0101318359375,
-0.00844573974609375,
0.063232421875,
-0.05987548828125,
-0.035186767578125,
0.00490570068359375,
0.007114410400390625,
0.036834716796875,
-0.05645751953125,
0.00010323524475097656,
-0.048614501953125,
0.0132904052734375,
0.041839599609375,
-0.017669677734375,
0.0401611328125,
-0.0273590087890625,
-0.049896240234375,
0.0263519287109375,
0.0213775634765625,
-0.03399658203125,
0.034759521484375,
-0.023590087890625,
-0.046051025390625,
0.033416748046875,
0.012237548828125,
-0.0099945068359375,
0.0134735107421875,
0.03802490234375,
0.004825592041015625,
-0.0128936767578125,
0.04180908203125,
-0.0198516845703125,
-0.06024169921875,
-0.005615234375,
-0.0147552490234375,
0.009246826171875,
-0.04156494140625,
0.00905609130859375,
-0.0174560546875,
0.0133514404296875,
-0.023590087890625,
-0.036407470703125,
0.0189666748046875,
0.0302734375,
0.00476837158203125,
-0.05511474609375,
0.006458282470703125,
-0.053253173828125,
0.0286712646484375,
-0.042327880859375,
-0.00853729248046875,
0.0237274169921875,
-0.005096435546875,
-0.0097808837890625,
-0.05267333984375,
0.01084136962890625,
0.035003662109375,
-0.06280517578125,
0.0037937164306640625,
0.04071044921875,
-0.01209259033203125,
0.03875732421875,
0.028778076171875,
-0.026336669921875,
0.018096923828125,
0.0009222030639648438,
-0.0268402099609375,
-0.0924072265625,
-0.0196685791015625,
0.0174407958984375,
-0.024505615234375,
-0.01544189453125,
-0.0029010772705078125,
0.01407623291015625,
-0.0091400146484375,
-0.0036220550537109375,
-0.032379150390625,
-0.019744873046875,
-0.005245208740234375,
0.0280609130859375,
-0.022430419921875,
0.020172119140625,
-0.0266265869140625,
0.01103973388671875,
-0.06268310546875,
0.01378631591796875,
-0.001430511474609375,
0.01335906982421875,
0.01206207275390625,
0.01561737060546875,
0.05145263671875,
0.07073974609375,
-0.0219879150390625,
0.10186767578125,
0.034881591796875,
0.0177154541015625,
0.002498626708984375,
0.0017147064208984375,
0.0352783203125,
-0.04119873046875,
-0.004573822021484375,
-0.0096435546875,
0.0001575946807861328,
-0.040618896484375,
0.032562255859375,
0.01044464111328125,
0.00004976987838745117,
0.0231170654296875
] |
b64e4e8b5a66b33b5f29beff1e5f2e975cb12041
|
Wordpress Stackexchange
Q: Does WordPress Development Mode Exist (with not minified JS)? A lot of WP JS is minified and therefore it's hard to be analyzed in the Console. Is there any way to have all scripts uncompressed?
A: Yes there is, from Debugging in WordPress codex, you need to define SCRIPT_DEBUG in wp-config.php to force WP to load the dev versions of the scripts:
define('SCRIPT_DEBUG', true);
|
Q: Does WordPress Development Mode Exist (with not minified JS)? A lot of WP JS is minified and therefore it's hard to be analyzed in the Console. Is there any way to have all scripts uncompressed?
A: Yes there is, from Debugging in WordPress codex, you need to define SCRIPT_DEBUG in wp-config.php to force WP to load the dev versions of the scripts:
define('SCRIPT_DEBUG', true);
|
wordpress
|
{
"language": "en",
"length": 65,
"provenance": "stackexchange_00019.jsonl.gz:428333",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83370"
}
|
[
-0.004039764404296875,
-0.007015228271484375,
-0.038330078125,
-0.0274505615234375,
-0.0018434524536132812,
-0.0182952880859375,
0.005779266357421875,
0.0166778564453125,
0.006786346435546875,
-0.00991058349609375,
-0.01374053955078125,
-0.010040283203125,
-0.06903076171875,
-0.027130126953125,
-0.0225372314453125,
-0.062469482421875,
0.05963134765625,
-0.040008544921875,
0.0002644062042236328,
-0.0213470458984375,
0.004436492919921875,
0.0131072998046875,
-0.006237030029296875,
0.126953125,
-0.005359649658203125,
0.00116729736328125,
0.061553955078125,
-0.0097198486328125,
-0.022216796875,
-0.024749755859375,
0.0029735565185546875,
0.01605224609375,
0.01142120361328125,
0.033477783203125,
-0.01343536376953125,
0.005168914794921875,
-0.0010461807250976562,
0.02032470703125,
0.022003173828125,
0.0003352165222167969,
-0.0025043487548828125,
0.005275726318359375,
0.0472412109375,
-0.0036754608154296875,
-0.0016069412231445312,
-0.029449462890625,
0.0294189453125,
-0.012603759765625,
0.027191162109375,
-0.0194549560546875,
0.003688812255859375,
0.03863525390625,
0.0258331298828125,
-0.0148468017578125,
-0.0218658447265625,
0.002941131591796875,
-0.0119476318359375,
0.01366424560546875,
0.0291595458984375,
0.026519775390625,
-0.00983428955078125,
0.005100250244140625,
-0.00164031982421875,
-0.0193634033203125,
0.01126861572265625,
-0.003925323486328125,
-0.0291290283203125,
0.0003581047058105469,
-0.02581787109375,
0.05023193359375,
0.050201416015625,
-0.055145263671875,
0.0164031982421875,
0.011444091796875,
0.0214691162109375,
-0.028350830078125,
0.0096435546875,
0.01371002197265625,
0.0211334228515625,
0.01479339599609375,
0.0596923828125,
-0.040191650390625,
0.0012807846069335938,
0.015289306640625,
0.009246826171875,
0.03973388671875,
0.00940704345703125,
-0.02325439453125,
-0.028717041015625,
0.006439208984375,
-0.034942626953125,
-0.024749755859375,
-0.0556640625,
0.03009033203125,
-0.0026912689208984375,
0.015106201171875,
0.014892578125,
0.0250091552734375,
-0.01422882080078125,
0.0208282470703125,
0.03363037109375,
-0.0509033203125,
0.06304931640625,
-0.033599853515625,
0.0018014907836914062,
0.01511383056640625,
0.005977630615234375,
0.0157318115234375,
0.013763427734375,
0.03125,
-0.021331787109375,
-0.00795745849609375,
-0.008697509765625,
-0.01041412353515625,
0.0012969970703125,
0.00438690185546875,
-0.039215087890625,
0.0340576171875,
-0.01197052001953125,
0.0286865234375,
0.01513671875,
0.0416259765625,
0.0184173583984375,
0.0001983642578125,
-0.0100250244140625,
-0.0115814208984375,
-0.005764007568359375,
-0.038543701171875,
0.0160064697265625,
0.006679534912109375,
0.01294708251953125,
0.01499176025390625,
-0.033355712890625,
-0.0081329345703125,
-0.0211181640625,
0.0014209747314453125,
0.0543212890625,
0.0035228729248046875,
-0.0131378173828125,
0.035308837890625,
-0.04864501953125,
-0.0274200439453125,
0.0207061767578125,
-0.04608154296875,
0.0092315673828125,
-0.007537841796875,
0.00214385986328125,
0.01375579833984375,
0.033050537109375,
0.0013446807861328125,
-0.00952911376953125,
0.01462554931640625,
0.0406494140625,
0.002849578857421875,
0.01165771484375,
-0.03692626953125,
0.0831298828125,
-0.0706787109375,
-0.009918212890625,
-0.07550048828125,
0.005870819091796875,
-0.0159454345703125,
0.001064300537109375,
0.0108184814453125,
-0.01410675048828125,
0.0252838134765625,
-0.0030498504638671875,
-0.003170013427734375,
0.0234375,
0.007022857666015625,
0.0233306884765625,
-0.0506591796875,
0.0211944580078125,
0.005580902099609375,
-0.0178680419921875,
0.03570556640625,
-0.0240936279296875,
-0.01146697998046875,
0.0428466796875,
-0.016998291015625,
-0.007648468017578125,
-0.0160980224609375,
0.042938232421875,
0.0048828125,
-0.030120849609375,
0.006336212158203125,
-0.00455474853515625,
0.021514892578125,
0.0333251953125,
0.019378662109375,
0.0015153884887695312,
0.003993988037109375,
-0.025390625,
0.0244140625,
-0.048309326171875,
-0.054168701171875,
0.020904541015625,
0.01091766357421875,
-0.0300445556640625,
0.040618896484375,
0.02374267578125,
-0.0053558349609375,
0.0134124755859375,
0.0023097991943359375,
-0.0251922607421875,
0.0179443359375,
-0.031768798828125,
0.01206207275390625,
0.0136871337890625,
0.018646240234375,
-0.0009684562683105469,
0.0276336669921875,
-0.0186004638671875,
-0.0094146728515625,
-0.00904083251953125,
0.041717529296875,
-0.0265045166015625,
0.05621337890625,
0.003803253173828125,
0.00989532470703125,
0.0082855224609375,
-0.047088623046875,
0.012664794921875,
0.0007615089416503906,
0.0232391357421875,
0.050628662109375,
-0.015289306640625,
0.0290069580078125,
0.09857177734375,
0.020721435546875,
0.098876953125,
-0.021820068359375,
-0.0172271728515625,
-0.0175018310546875,
-0.0227813720703125,
-0.018707275390625,
-0.0146942138671875,
-0.0645751953125,
0.02398681640625,
0.055389404296875,
0.055633544921875,
0.044342041015625,
0.0027980804443359375,
-0.033355712890625,
0.06793212890625,
-0.043701171875,
0.01557159423828125,
-0.040985107421875,
-0.0019521713256835938,
0.04083251953125,
0.0111846923828125,
0.010009765625,
0.0023479461669921875,
-0.056182861328125,
0.0227203369140625,
0.0273590087890625,
-0.030609130859375,
0.035552978515625,
-0.01142120361328125,
-0.03546142578125,
0.0129241943359375,
0.005718231201171875,
0.0040283203125,
-0.0016965866088867188,
0.0309600830078125,
0.025848388671875,
0.033416748046875,
0.029205322265625,
-0.0215301513671875,
0.031707763671875,
0.017303466796875,
-0.03314208984375,
-0.0015430450439453125,
0.04107666015625,
0.0153961181640625,
0.06353759765625,
-0.042205810546875,
-0.0174102783203125,
0.019439697265625,
0.045684814453125,
-0.00196075439453125,
0.025146484375,
0.002185821533203125,
-0.00438690185546875,
0.0041351318359375,
-0.035064697265625,
0.012847900390625,
-0.0007920265197753906,
-0.006183624267578125,
0.0016632080078125,
0.037322998046875,
-0.006084442138671875,
-0.026031494140625,
0.019073486328125,
0.0041046142578125,
-0.0273895263671875,
0.047760009765625,
-0.0421142578125,
0.02886962890625,
-0.0013523101806640625,
0.059906005859375,
0.0657958984375,
0.004390716552734375,
0.0216217041015625,
0.0030155181884765625,
0.0180206298828125,
0.031768798828125,
-0.018310546875,
-0.0322265625,
-0.0034694671630859375,
-0.060028076171875,
-0.0196380615234375,
0.020782470703125,
0.0323486328125,
-0.01236724853515625,
-0.038360595703125,
-0.01172637939453125,
0.00917816162109375,
-0.0821533203125,
-0.083740234375,
-0.00276947021484375,
-0.08111572265625,
-0.0017414093017578125,
-0.0174407958984375,
-0.035797119140625,
-0.0006914138793945312,
0.0165252685546875,
0.0196075439453125,
-0.0230712890625,
-0.0435791015625,
-0.0307769775390625,
-0.05926513671875,
-0.047515869140625,
0.0191497802734375,
0.004734039306640625,
0.005146026611328125,
0.0059967041015625,
0.00888824462890625,
0.005611419677734375,
-0.0105438232421875,
0.00267791748046875,
0.0162353515625,
0.0038433074951171875,
-0.033416748046875,
0.0107574462890625,
-0.0164031982421875,
0.00933837890625,
0.0005741119384765625,
-0.039764404296875,
0.01000213623046875,
0.00872802734375,
-0.02557373046875,
-0.02752685546875,
-0.0242462158203125,
-0.035552978515625,
0.046875,
0.0311279296875,
-0.038909912109375,
-0.005352020263671875,
-0.06085205078125,
0.006351470947265625,
-0.004108428955078125,
-0.006603240966796875,
-0.001155853271484375,
-0.00016748905181884766,
-0.03350830078125,
-0.0294342041015625,
0.01302337646484375,
0.0821533203125,
0.04791259765625,
-0.0130462646484375,
0.02642822265625,
0.045562744140625,
0.00853729248046875,
0.042388916015625,
-0.04937744140625,
0.06597900390625,
-0.0242156982421875,
-0.027587890625,
0.0022258758544921875,
-0.032012939453125,
-0.00841522216796875,
-0.032440185546875,
-0.01409149169921875,
0.0212249755859375,
0.0139007568359375,
-0.042449951171875,
0.03179931640625,
-0.026580810546875,
0.0168609619140625,
-0.04046630859375,
0.01222991943359375,
-0.06719970703125,
0.0008592605590820312,
0.02044677734375,
0.04541015625,
-0.06549072265625,
-0.06610107421875,
-0.07440185546875,
-0.01129150390625,
-0.0151519775390625,
0.02459716796875,
-0.0014772415161132812,
0.002105712890625,
-0.0181732177734375,
0.048370361328125,
-0.00420379638671875,
-0.00994110107421875,
0.0435791015625,
-0.062744140625,
-0.0085906982421875,
-0.00853729248046875,
0.0225830078125,
-0.0836181640625,
-0.00952911376953125,
-0.0273895263671875,
-0.09332275390625,
-0.012451171875,
-0.049835205078125,
0.07965087890625,
0.0185089111328125,
0.005687713623046875,
-0.0299072265625,
0.031524658203125,
-0.00604248046875,
0.0297088623046875,
0.014129638671875,
0.01959228515625,
-0.0301971435546875,
-0.0027980804443359375,
0.037445068359375,
-0.041778564453125,
-0.0265350341796875,
-0.01465606689453125,
-0.0269012451171875,
-0.00984954833984375,
0.001987457275390625,
-0.0216827392578125,
0.029052734375,
-0.0212249755859375,
-0.01270294189453125,
-0.036041259765625,
-0.020538330078125,
-0.0290985107421875,
-0.01224517822265625,
-0.01544189453125,
-0.0032787322998046875,
-0.0016832351684570312,
0.0284881591796875,
0.0310516357421875,
-0.0024852752685546875,
-0.013336181640625,
0.0345458984375,
0.02301025390625,
-0.03082275390625,
0.039581298828125,
-0.01454925537109375,
0.010528564453125,
0.0171051025390625,
0.038482666015625,
0.0266876220703125,
0.01104736328125,
0.01537322998046875,
0.006198883056640625,
0.0123138427734375,
0.0248870849609375,
0.0249176025390625,
0.0288238525390625,
-0.005352020263671875,
0.01439666748046875,
0.045867919921875,
-0.05694580078125,
0.0138702392578125,
0.003284454345703125,
-0.01178741455078125,
0.001361846923828125,
0.036102294921875,
-0.0221405029296875,
-0.005840301513671875,
-0.0307464599609375,
-0.03155517578125,
-0.003078460693359375,
-0.0352783203125,
0.08795166015625,
0.062744140625,
-0.0177459716796875,
0.0701904296875,
0.06341552734375,
0.002628326416015625,
0.0489501953125,
0.041259765625,
-0.0005908012390136719,
0.057037353515625,
0.0202484130859375,
0.0108642578125,
-0.01181793212890625,
0.002719879150390625,
0.01468658447265625,
0.0026950836181640625,
-0.04571533203125,
-0.018341064453125,
-0.0008420944213867188,
-0.0156402587890625,
0.01342010498046875,
0.0195465087890625,
0.0212249755859375,
-0.00673675537109375,
-0.01715087890625,
-0.0144195556640625,
0.006351470947265625,
-0.0292510986328125,
-0.022125244140625,
-0.0036525726318359375,
-0.041259765625,
0.00966644287109375,
0.03289794921875,
0.047271728515625,
-0.053192138671875,
0.05712890625,
-0.0091094970703125,
0.0335693359375,
0.0176544189453125,
0.043182373046875,
0.017578125,
-0.0284423828125,
-0.00283050537109375,
0.0299530029296875,
-0.0182342529296875,
-0.0281524658203125,
0.00045609474182128906,
0.01102447509765625,
-0.010894775390625,
-0.010528564453125,
-0.0017108917236328125,
0.03497314453125,
0.0140533447265625,
0.00696563720703125,
-0.0142974853515625,
-0.0479736328125,
0.00933837890625,
-0.0279998779296875,
-0.051361083984375,
0.0212860107421875,
0.01041412353515625,
0.0005502700805664062,
0.0160064697265625,
0.01049041748046875,
-0.0142364501953125,
0.03955078125,
-0.047515869140625,
-0.01461029052734375,
0.01076507568359375,
-0.014007568359375,
-0.020660400390625,
-0.00769805908203125,
-0.031463623046875,
-0.00579071044921875,
-0.01270294189453125,
-0.02899169921875,
0.034759521484375,
-0.01085662841796875,
-0.0272979736328125,
-0.01343536376953125,
0.0206298828125,
-0.0242462158203125,
0.019989013671875,
0.0279998779296875,
0.016876220703125,
0.01036834716796875,
-0.04193115234375,
-0.06195068359375,
-0.05242919921875,
-0.031036376953125,
-0.0035762786865234375,
-0.038726806640625,
0.0180816650390625,
-0.01186370849609375,
0.004764556884765625,
-0.0260467529296875,
-0.036468505859375,
-0.004253387451171875,
0.018096923828125,
0.02679443359375,
0.0237884521484375,
0.0083160400390625,
0.05389404296875,
-0.032440185546875,
0.042724609375,
0.0077362060546875,
0.0265350341796875,
-0.01812744140625,
-0.0286102294921875,
0.0117034912109375,
-0.0154571533203125,
-0.020050048828125,
-0.005031585693359375,
0.0096282958984375,
-0.0111236572265625,
0.002803802490234375,
-0.00873565673828125,
0.0233612060546875,
-0.005207061767578125,
0.0032520294189453125,
-0.018646240234375,
-0.0116119384765625,
-0.01255035400390625,
0.0090179443359375,
0.0005431175231933594,
-0.0084381103515625,
-0.0208282470703125,
-0.00482940673828125,
-0.053314208984375,
0.0584716796875,
0.0162811279296875,
0.0322265625,
-0.0023021697998046875,
0.0128326416015625,
0.00495147705078125,
0.00543975830078125,
-0.006664276123046875,
0.003467559814453125,
0.01082611083984375,
0.007904052734375,
-0.00567626953125,
0.0219573974609375,
-0.0139007568359375,
-0.08837890625,
-0.005115509033203125,
0.0016841888427734375,
0.0013017654418945312,
0.0155181884765625,
-0.008026123046875,
0.00792694091796875,
0.07916259765625,
0.08978271484375,
-0.08453369140625,
-0.0026607513427734375,
0.0185546875,
-0.04583740234375,
-0.04071044921875,
-0.027923583984375,
0.02459716796875,
-0.024078369140625,
0.0533447265625,
0.041656494140625,
-0.006015777587890625,
0.0247650146484375,
-0.0097503662109375,
-0.0032749176025390625,
-0.01345062255859375,
0.0030193328857421875,
0.011138916015625,
-0.0477294921875,
0.0572509765625,
0.0296478271484375,
0.04833984375,
-0.02777099609375,
0.0208892822265625,
0.0221405029296875,
-0.0225067138671875,
-0.05609130859375,
0.031280517578125,
0.0187225341796875,
-0.019134521484375,
-0.01654052734375,
0.0155792236328125,
0.0273284912109375,
0.041015625,
-0.011322021484375,
-0.0007481575012207031,
0.0171356201171875,
0.01226806640625,
-0.008544921875,
-0.02947998046875,
0.039154052734375,
-0.015960693359375,
-0.0307464599609375,
0.0132293701171875,
-0.0186004638671875,
-0.056060791015625,
-0.0081634521484375,
0.0089569091796875,
0.059814453125,
-0.040374755859375,
-0.0206451416015625,
0.03558349609375,
0.01983642578125,
-0.0199127197265625,
-0.026153564453125,
0.023712158203125,
-0.022613525390625,
0.0174407958984375,
-0.011810302734375,
-0.0116729736328125,
-0.00818634033203125,
-0.038116455078125,
0.00021350383758544922,
0.05352783203125,
-0.004467010498046875,
-0.0267333984375,
0.04937744140625,
0.029937744140625,
-0.02752685546875,
0.0244598388671875,
-0.0182342529296875,
0.07684326171875,
0.025146484375,
0.01605224609375,
-0.0149078369140625,
-0.0121307373046875,
0.022735595703125,
0.0225830078125,
-0.0038013458251953125,
-0.014434814453125,
0.023773193359375,
0.02508544921875,
0.069091796875,
0.053375244140625,
0.012786865234375,
-0.016387939453125,
-0.0006208419799804688,
-0.0080108642578125,
0.00460052490234375,
0.005084991455078125,
0.0265960693359375,
-0.027923583984375,
-0.032470703125,
0.01666259765625,
0.0274505615234375,
0.02386474609375,
-0.001003265380859375,
0.00199127197265625,
-0.0093994140625,
0.0075531005859375,
0.00724029541015625,
0.0116729736328125,
-0.024871826171875,
0.00238037109375,
-0.0254669189453125,
-0.045379638671875,
-0.08111572265625,
-0.003265380859375,
0.005634307861328125,
0.00018155574798583984,
-0.045745849609375,
-0.0167694091796875,
0.0030117034912109375,
-0.045684814453125,
-0.033172607421875,
-0.0533447265625,
0.00046563148498535156,
-0.0079498291015625,
0.035675048828125,
0.00414276123046875,
0.0299530029296875,
-0.032257080078125,
-0.0113677978515625,
0.0237274169921875,
0.044525146484375,
-0.0184478759765625,
-0.040740966796875,
0.02685546875,
0.029083251953125,
-0.0160369873046875,
0.02716064453125,
0.0192718505859375,
-0.0056610107421875,
0.039215087890625,
0.005893707275390625,
-0.0174407958984375,
0.016754150390625,
-0.0104522705078125,
0.00492095947265625,
0.0199432373046875,
0.03594970703125,
0.00528717041015625,
-0.070556640625,
0.0007381439208984375,
0.01145172119140625,
0.0999755859375,
0.06243896484375,
0.031341552734375,
-0.01532745361328125,
-0.057464599609375,
-0.01499176025390625,
0.0322265625,
0.03033447265625,
0.01364898681640625,
0.001316070556640625,
0.0080108642578125,
0.0170745849609375,
0.0205535888671875,
-0.0103302001953125,
0.034637451171875,
0.0396728515625,
0.0450439453125,
-0.049591064453125,
-0.01255035400390625,
0.0938720703125,
-0.0262451171875,
0.003101348876953125,
-0.0261383056640625,
0.0292510986328125,
0.021209716796875,
0.00713348388671875,
-0.0263671875,
0.0458984375,
0.0186004638671875,
-0.0240936279296875,
0.01100921630859375,
0.003498077392578125,
-0.039642333984375,
0.01447296142578125,
-0.00864410400390625,
0.046905517578125,
0.0024852752685546875,
0.0089569091796875,
0.006587982177734375,
-0.025360107421875,
0.0018415451049804688,
0.01068115234375,
0.028717041015625,
0.0027446746826171875,
0.032073974609375,
0.04937744140625,
-0.0176239013671875,
-0.007175445556640625,
0.0252685546875,
0.0204010009765625,
-0.0211639404296875,
0.0162506103515625,
0.0106353759765625,
-0.074462890625,
-0.05047607421875,
-0.047698974609375,
0.0287322998046875,
0.00006872415542602539,
0.10455322265625,
-0.0272369384765625,
0.0189208984375,
0.01568603515625,
0.011962890625,
0.00595855712890625,
0.0075836181640625,
0.006011962890625,
0.0271453857421875,
0.0206146240234375,
-0.0258941650390625,
-0.051025390625,
0.047149658203125,
-0.006839752197265625,
-0.007678985595703125,
0.0673828125,
-0.0266876220703125,
0.0020122528076171875,
-0.027679443359375,
0.0020599365234375,
-0.03192138671875,
-0.0479736328125,
0.01363372802734375,
0.041351318359375,
-0.029388427734375,
-0.0088043212890625,
0.0016803741455078125,
-0.0416259765625,
0.0325927734375,
-0.06707763671875,
0.00701904296875,
0.01318359375,
-0.00885772705078125,
0.0189971923828125,
0.06317138671875,
0.0180816650390625,
0.0169525146484375,
-0.0129852294921875,
0.020233154296875,
0.021270751953125,
-0.0133056640625,
0.016265869140625,
-0.0207061767578125,
0.01178741455078125,
0.0499267578125,
0.044921875,
-0.006603240966796875,
0.01561737060546875,
0.02685546875,
-0.035491943359375,
0.005893707275390625,
0.00331878662109375,
-0.0225677490234375,
0.0131072998046875,
-0.01251220703125,
0.0093841552734375,
0.0185546875,
-0.0406494140625,
-0.0233306884765625,
-0.0232086181640625,
0.027496337890625,
0.005321502685546875,
-0.028167724609375,
0.0045013427734375,
-0.0209808349609375,
-0.001483917236328125,
-0.011474609375,
0.06610107421875,
-0.03363037109375,
-0.025909423828125,
-0.0295257568359375,
-0.044830322265625,
-0.01140594482421875,
0.09246826171875,
0.0101776123046875,
0.0494384765625,
0.039764404296875,
-0.045074462890625,
0.0206451416015625,
0.0689697265625,
0.04736328125,
0.1300048828125,
0.0186767578125,
-0.0252685546875,
-0.033111572265625,
0.037322998046875,
0.01113128662109375,
-0.042083740234375,
0.00951385498046875,
-0.041778564453125,
-0.007495880126953125,
0.003849029541015625,
-0.01039886474609375,
0.00994873046875,
-0.048858642578125,
-0.1202392578125,
0.05792236328125,
-0.01910400390625,
-0.054656982421875,
-0.0614013671875,
-0.004047393798828125,
0.01410675048828125,
-0.004512786865234375,
-0.0227813720703125,
-0.00971221923828125,
-0.047149658203125,
0.0172271728515625,
-0.016845703125,
0.0281219482421875,
0.0211944580078125,
-0.03155517578125,
-0.005054473876953125,
0.01215362548828125,
0.025909423828125,
-0.007793426513671875,
-0.0185699462890625,
0.025726318359375,
0.01983642578125,
0.06292724609375,
0.01006317138671875,
0.006938934326171875,
0.006084442138671875,
-0.0726318359375,
-0.0117645263671875,
0.0185089111328125,
-0.03961181640625,
-0.024688720703125,
0.046478271484375,
0.04925537109375,
0.013763427734375,
-0.00046133995056152344,
-0.05145263671875,
-0.029998779296875,
-0.00769805908203125,
0.004924774169921875,
0.022674560546875,
-0.05438232421875,
0.023773193359375,
0.0006985664367675781,
0.01068878173828125,
0.0112762451171875,
-0.03265380859375,
-0.0019016265869140625,
-0.0167083740234375,
0.016082763671875,
0.00574493408203125,
-0.01067352294921875,
-0.0533447265625,
0.0531005859375,
-0.02130126953125,
0.03912353515625,
0.038421630859375,
0.0242919921875,
0.06329345703125,
0.0975341796875,
0.0028095245361328125,
0.038818359375,
-0.03460693359375,
-0.01458740234375,
0.021728515625,
0.020050048828125,
-0.008697509765625,
-0.0093231201171875,
-0.0256805419921875,
-0.012786865234375,
0.0263214111328125,
-0.01971435546875,
-0.0226287841796875,
-0.0308837890625,
-0.0011110305786132812,
0.021026611328125,
-0.043701171875,
-0.0477294921875,
-0.05694580078125,
0.038421630859375,
-0.01165771484375,
0.0102996826171875,
0.0294952392578125,
0.0202178955078125,
-0.00823211669921875,
0.0156402587890625,
-0.029541015625,
-0.060577392578125,
0.01235198974609375,
0.00022482872009277344,
0.01224517822265625,
0.016937255859375
] |
e466fec13458eabc409c2babd512c38b70411728
|
Wordpress Stackexchange
Q: Metabox date month number to word I use custom metabox with date (day, month and year). The problem is when I try to transform date number to date word - for example 10 to be October. I use this code:
function eventposttype_get_the_month_abbr($month) {
global $wp_locale;
for ( $i = 1; $i < 13; $i = $i +1 ) {
if ( $i == $month )
$monthabbr = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
}
return $monthabbr;
}
But now the month is displayed only with three symbols - Oct. I like to be full month name. Is there any way to define it?
Thank you in advance!
A: The code you are using is specifically for the month abbreviation, (Oct). You should be using this:
function eventposttype_get_the_month($month) {
global $wp_locale;
for ( $i = 1; $i < 13; $i = $i +1 ) {
if ( $i == $month )
$month =$wp_locale->get_month( $i ) ;
}
return $monthabbr;
}
|
Q: Metabox date month number to word I use custom metabox with date (day, month and year). The problem is when I try to transform date number to date word - for example 10 to be October. I use this code:
function eventposttype_get_the_month_abbr($month) {
global $wp_locale;
for ( $i = 1; $i < 13; $i = $i +1 ) {
if ( $i == $month )
$monthabbr = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
}
return $monthabbr;
}
But now the month is displayed only with three symbols - Oct. I like to be full month name. Is there any way to define it?
Thank you in advance!
A: The code you are using is specifically for the month abbreviation, (Oct). You should be using this:
function eventposttype_get_the_month($month) {
global $wp_locale;
for ( $i = 1; $i < 13; $i = $i +1 ) {
if ( $i == $month )
$month =$wp_locale->get_month( $i ) ;
}
return $monthabbr;
}
|
wordpress
|
{
"language": "en",
"length": 159,
"provenance": "stackexchange_00019.jsonl.gz:428344",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83405"
}
|
[
0.0127410888671875,
-0.0251617431640625,
-0.016937255859375,
-0.07391357421875,
-0.014923095703125,
0.00952911376953125,
-0.027862548828125,
0.028900146484375,
0.047515869140625,
0.027740478515625,
0.047515869140625,
-0.031768798828125,
-0.01099395751953125,
-0.05340576171875,
-0.046234130859375,
0.00876617431640625,
0.039093017578125,
-0.017730712890625,
0.0163726806640625,
0.0006098747253417969,
-0.01458740234375,
0.028594970703125,
0.018798828125,
-0.01548004150390625,
0.0667724609375,
-0.053009033203125,
0.07421875,
-0.04534912109375,
0.07208251953125,
-0.0179595947265625,
0.046478271484375,
-0.0292816162109375,
0.0323486328125,
-0.0033054351806640625,
-0.0052490234375,
0.0543212890625,
0.0008182525634765625,
0.0200347900390625,
0.0263214111328125,
-0.007495880126953125,
0.0135345458984375,
-0.0191802978515625,
-0.01522064208984375,
-0.006153106689453125,
-0.0210723876953125,
0.003856658935546875,
-0.004302978515625,
-0.039031982421875,
0.007457733154296875,
0.048675537109375,
0.011016845703125,
0.0099639892578125,
0.008575439453125,
0.01314544677734375,
-0.01904296875,
-0.0261077880859375,
-0.02166748046875,
0.0107421875,
0.0178375244140625,
0.044464111328125,
-0.00249481201171875,
0.036376953125,
-0.0157318115234375,
-0.0110015869140625,
-0.0003333091735839844,
-0.00894927978515625,
-0.0186614990234375,
0.00519561767578125,
0.0278472900390625,
0.006740570068359375,
0.0234222412109375,
-0.005344390869140625,
0.0256500244140625,
-0.0252532958984375,
0.032989501953125,
0.020904541015625,
-0.0298004150390625,
0.01436614990234375,
0.041168212890625,
-0.0111541748046875,
0.038482666015625,
0.050048828125,
-0.060272216796875,
-0.00487518310546875,
0.024505615234375,
0.0106201171875,
-0.01071929931640625,
-0.033111572265625,
-0.058197021484375,
-0.056610107421875,
-0.0352783203125,
-0.04119873046875,
-0.0787353515625,
-0.040618896484375,
-0.0168609619140625,
-0.05133056640625,
-0.0198211669921875,
0.0293731689453125,
-0.062255859375,
-0.0059814453125,
-0.038543701171875,
0.02362060546875,
-0.044586181640625,
0.005767822265625,
0.021636962890625,
0.034515380859375,
-0.006610870361328125,
-0.0083465576171875,
0.05743408203125,
0.00115203857421875,
0.0113983154296875,
0.04669189453125,
-0.03204345703125,
-0.039459228515625,
-0.0182647705078125,
0.060150146484375,
-0.01013946533203125,
-0.0133209228515625,
-0.005855560302734375,
0.00128936767578125,
0.034332275390625,
0.045684814453125,
0.0156707763671875,
-0.06280517578125,
0.0091094970703125,
-0.0167083740234375,
-0.04052734375,
-0.0361328125,
0.0284881591796875,
-0.0193939208984375,
-0.0077667236328125,
0.01154327392578125,
0.0037708282470703125,
0.0161285400390625,
0.00018727779388427734,
0.0130767822265625,
0.0966796875,
-0.015380859375,
-0.0203857421875,
0.034393310546875,
0.0035858154296875,
-0.005695343017578125,
-0.0155792236328125,
-0.01288604736328125,
-0.045867919921875,
0.0189971923828125,
-0.0235595703125,
0.01354217529296875,
0.01052093505859375,
-0.05133056640625,
-0.0111846923828125,
-0.061126708984375,
0.023773193359375,
0.00615692138671875,
-0.0469970703125,
-0.0155792236328125,
0.02508544921875,
-0.03656005859375,
-0.0247650146484375,
-0.051605224609375,
-0.00548553466796875,
-0.021148681640625,
-0.055877685546875,
-0.0269012451171875,
-0.04241943359375,
0.016082763671875,
0.0106353759765625,
0.0159759521484375,
0.0038661956787109375,
0.0018768310546875,
0.0206146240234375,
0.032135009765625,
-0.0273284912109375,
-0.022491455078125,
0.00029206275939941406,
-0.0202789306640625,
0.01375579833984375,
0.0292510986328125,
-0.01334381103515625,
0.0225677490234375,
0.007110595703125,
-0.032623291015625,
0.0318603515625,
-0.0011005401611328125,
-0.0019092559814453125,
-0.03863525390625,
0.017303466796875,
-0.0290069580078125,
0.00820159912109375,
0.00469970703125,
0.0386962890625,
0.0301513671875,
-0.0662841796875,
0.01433563232421875,
0.0047607421875,
0.027618408203125,
-0.004726409912109375,
0.02386474609375,
0.0041656494140625,
-0.019012451171875,
-0.0248870849609375,
0.01146697998046875,
-0.0091552734375,
0.02313232421875,
-0.0229644775390625,
0.023345947265625,
-0.0179595947265625,
0.036773681640625,
-0.0300445556640625,
0.0226593017578125,
0.032470703125,
0.0016384124755859375,
-0.0191497802734375,
-0.01094818115234375,
0.01171112060546875,
0.0190277099609375,
0.01064300537109375,
0.008575439453125,
-0.01239776611328125,
-0.0025463104248046875,
0.02496337890625,
-0.02606201171875,
0.004810333251953125,
0.0626220703125,
0.045928955078125,
-0.0208892822265625,
-0.0179901123046875,
-0.01172637939453125,
0.052154541015625,
-0.0002865791320800781,
-0.01873779296875,
0.0167694091796875,
-0.03240966796875,
0.02459716796875,
-0.026397705078125,
-0.01971435546875,
-0.004638671875,
-0.035064697265625,
0.0301055908203125,
0.03973388671875,
0.046295166015625,
-0.0142059326171875,
0.0219573974609375,
0.01306915283203125,
0.06524658203125,
-0.016265869140625,
0.0092620849609375,
-0.026031494140625,
-0.0006189346313476562,
0.037872314453125,
-0.0139007568359375,
-0.0053863525390625,
0.00879669189453125,
-0.03778076171875,
-0.0115966796875,
0.01494598388671875,
-0.0369873046875,
-0.057281494140625,
0.0254058837890625,
-0.006023406982421875,
0.0164794921875,
-0.015869140625,
-0.0131072998046875,
-0.00589752197265625,
0.0034503936767578125,
-0.004459381103515625,
0.0304412841796875,
0.0295562744140625,
-0.0107269287109375,
-0.0172576904296875,
0.02056884765625,
0.022003173828125,
-0.005863189697265625,
-0.006359100341796875,
-0.01641845703125,
-0.00794219970703125,
-0.0236968994140625,
0.0244903564453125,
0.00034117698669433594,
-0.0031833648681640625,
0.01219940185546875,
0.033905029296875,
0.0105438232421875,
-0.0034809112548828125,
0.034423828125,
0.01192474365234375,
-0.007160186767578125,
-0.00665283203125,
-0.022857666015625,
0.0252532958984375,
0.0372314453125,
0.03253173828125,
-0.022125244140625,
0.01629638671875,
-0.0033588409423828125,
-0.0009112358093261719,
0.01345062255859375,
-0.0016803741455078125,
0.0274658203125,
-0.06390380859375,
0.002300262451171875,
0.0217742919921875,
-0.0557861328125,
0.00862884521484375,
-0.024871826171875,
-0.00188446044921875,
-0.03558349609375,
0.0245361328125,
-0.003543853759765625,
-0.048797607421875,
-0.0242462158203125,
-0.02215576171875,
0.01026153564453125,
0.04168701171875,
-0.0440673828125,
-0.05810546875,
-0.01611328125,
-0.0189208984375,
-0.0916748046875,
-0.059112548828125,
0.0155181884765625,
-0.021209716796875,
-0.00946044921875,
-0.0137481689453125,
-0.023101806640625,
-0.00807952880859375,
0.0029048919677734375,
-0.00974273681640625,
-0.0182952880859375,
0.00023376941680908203,
0.0079193115234375,
-0.0399169921875,
-0.03594970703125,
-0.052947998046875,
0.01000213623046875,
-0.01363372802734375,
-0.004520416259765625,
0.06390380859375,
0.01079559326171875,
-0.06097412109375,
-0.0455322265625,
0.08013916015625,
-0.0003376007080078125,
-0.01126861572265625,
0.037322998046875,
-0.04901123046875,
0.0010080337524414062,
-0.0166168212890625,
0.0062255859375,
0.0345458984375,
-0.03155517578125,
0.007793426513671875,
0.01372528076171875,
0.04888916015625,
0.04986572265625,
0.02130126953125,
-0.0220794677734375,
0.07586669921875,
0.06817626953125,
0.0079498291015625,
-0.01910400390625,
0.0207977294921875,
-0.01508331298828125,
0.0226593017578125,
-0.0021209716796875,
-0.0251617431640625,
0.00109100341796875,
0.035491943359375,
-0.0018358230590820312,
0.0020885467529296875,
0.06201171875,
-0.016632080078125,
0.01065826416015625,
-0.01279449462890625,
-0.03460693359375,
-0.05072021484375,
0.031036376953125,
-0.00655364990234375,
0.037628173828125,
0.0261688232421875,
0.02032470703125,
-0.0013942718505859375,
0.007843017578125,
-0.03564453125,
-0.05242919921875,
0.05419921875,
-0.04840087890625,
-0.040313720703125,
-0.041259765625,
-0.0265960693359375,
0.0127716064453125,
0.056915283203125,
-0.00550079345703125,
-0.035491943359375,
0.03350830078125,
0.018096923828125,
-0.035491943359375,
-0.00988006591796875,
-0.01096343994140625,
-0.013580322265625,
-0.08111572265625,
0.004993438720703125,
0.02203369140625,
-0.0150604248046875,
-0.00705718994140625,
0.0287322998046875,
-0.048431396484375,
-0.0309295654296875,
0.046875,
0.0081939697265625,
-0.027679443359375,
0.04052734375,
-0.01419830322265625,
-0.002788543701171875,
-0.033294677734375,
0.038665771484375,
-0.055511474609375,
-0.036712646484375,
-0.01354217529296875,
0.07977294921875,
0.033477783203125,
-0.06646728515625,
-0.0240020751953125,
0.044647216796875,
0.070556640625,
0.01184844970703125,
0.0272064208984375,
-0.05694580078125,
0.07080078125,
0.03375244140625,
0.040191650390625,
-0.01229095458984375,
-0.0101165771484375,
0.01302337646484375,
-0.04107666015625,
0.041534423828125,
0.016204833984375,
0.0300750732421875,
0.036102294921875,
-0.03790283203125,
0.00811767578125,
-0.014373779296875,
-0.029571533203125,
0.01708984375,
-0.0240936279296875,
-0.0020389556884765625,
-0.01079559326171875,
-0.005584716796875,
0.010101318359375,
0.0592041015625,
-0.0269012451171875,
0.0119476318359375,
0.03924560546875,
0.029541015625,
-0.02886962890625,
-0.051116943359375,
0.0170135498046875,
0.037445068359375,
-0.00363922119140625,
0.0159912109375,
-0.00975799560546875,
-0.038177490234375,
0.08685302734375,
-0.0116424560546875,
0.01047515869140625,
-0.031707763671875,
0.0033092498779296875,
0.002574920654296875,
-0.016754150390625,
0.0184478759765625,
-0.005214691162109375,
0.030120849609375,
0.0242919921875,
-0.00899505615234375,
-0.0263671875,
-0.0184326171875,
0.05523681640625,
-0.003810882568359375,
0.01342010498046875,
-0.050872802734375,
0.0048370361328125,
-0.01074981689453125,
-0.016937255859375,
-0.00798797607421875,
-0.00777435302734375,
0.00901031494140625,
-0.04949951171875,
0.0014896392822265625,
0.0091400146484375,
-0.017242431640625,
-0.012359619140625,
-0.03948974609375,
0.0013561248779296875,
0.0322265625,
-0.0153350830078125,
0.00814056396484375,
0.00032448768615722656,
0.054168701171875,
0.0247650146484375,
0.0042572021484375,
-0.0250701904296875,
-0.01453399658203125,
0.011627197265625,
0.01898193359375,
-0.057281494140625,
0.00933074951171875,
0.035736083984375,
-0.013580322265625,
0.028472900390625,
-0.0252227783203125,
-0.02069091796875,
-0.036376953125,
-0.040771484375,
0.0188446044921875,
-0.01047515869140625,
-0.0303802490234375,
0.08758544921875,
-0.01824951171875,
0.0220947265625,
-0.004985809326171875,
0.028656005859375,
-0.0188446044921875,
0.060394287109375,
0.0261383056640625,
-0.057647705078125,
0.005695343017578125,
0.0379638671875,
-0.014068603515625,
0.00971221923828125,
0.006450653076171875,
0.014129638671875,
-0.00157928466796875,
-0.00959014892578125,
0.0020732879638671875,
0.00431060791015625,
-0.0311737060546875,
-0.0226287841796875,
-0.01047515869140625,
-0.00699615478515625,
0.01311492919921875,
-0.0261688232421875,
-0.056549072265625,
0.009613037109375,
0.0220489501953125,
-0.0000413060188293457,
0.0268402099609375,
0.00800323486328125,
0.0244140625,
-0.03692626953125,
0.0184478759765625,
-0.040374755859375,
-0.02349853515625,
-0.00701141357421875,
0.00005996227264404297,
-0.0047149658203125,
-0.0189666748046875,
-0.041748046875,
-0.00948333740234375,
-0.0137176513671875,
0.052947998046875,
-0.0665283203125,
0.0043182373046875,
-0.022003173828125,
0.04925537109375,
-0.046478271484375,
0.0404052734375,
0.0294036865234375,
0.0297393798828125,
-0.011199951171875,
-0.0411376953125,
-0.038604736328125,
0.01323699951171875,
-0.0225982666015625,
-0.082763671875,
0.03826904296875,
-0.00029158592224121094,
0.021392822265625,
0.06488037109375,
-0.006832122802734375,
-0.0201568603515625,
0.046905517578125,
-0.0197296142578125,
-0.028839111328125,
0.07257080078125,
-0.0167388916015625,
0.01273345947265625,
0.04095458984375,
0.0269622802734375,
0.00655364990234375,
-0.00614166259765625,
0.002651214599609375,
-0.0239715576171875,
0.027801513671875,
-0.0193939208984375,
-0.0264892578125,
-0.02105712890625,
-0.01271820068359375,
-0.0194854736328125,
-0.002788543701171875,
-0.015106201171875,
0.008331298828125,
-0.0189208984375,
-0.013763427734375,
-0.0189666748046875,
0.044464111328125,
-0.0106048583984375,
0.0303192138671875,
-0.03497314453125,
-0.050323486328125,
0.0158538818359375,
0.009124755859375,
0.047271728515625,
0.026580810546875,
-0.059814453125,
0.012603759765625,
0.061004638671875,
-0.0228271484375,
0.0406494140625,
0.01342010498046875,
0.0185699462890625,
0.051025390625,
-0.0194549560546875,
0.032012939453125,
0.0275115966796875,
-0.0115814208984375,
0.02496337890625,
0.044342041015625,
0.041778564453125,
-0.0289764404296875,
-0.033233642578125,
-0.0028324127197265625,
-0.025360107421875,
0.0301971435546875,
0.06915283203125,
0.1021728515625,
-0.07171630859375,
0.0111846923828125,
0.045379638671875,
-0.022003173828125,
0.0272064208984375,
-0.0189056396484375,
-0.03240966796875,
-0.0199127197265625,
0.029693603515625,
-0.0244140625,
-0.049652099609375,
-0.0020809173583984375,
0.0217132568359375,
0.0019378662109375,
-0.01678466796875,
0.018890380859375,
0.01197052001953125,
-0.041259765625,
0.005645751953125,
-0.00556182861328125,
0.00907135009765625,
-0.041351318359375,
0.005954742431640625,
0.01096343994140625,
-0.0239105224609375,
-0.10980224609375,
-0.0239715576171875,
0.005641937255859375,
-0.006359100341796875,
-0.0178680419921875,
0.0185394287109375,
0.04022216796875,
0.031524658203125,
0.005397796630859375,
-0.00757598876953125,
0.0073089599609375,
-0.01494598388671875,
-0.028961181640625,
0.01111602783203125,
-0.015167236328125,
0.01654052734375,
0.017913818359375,
0.00476837158203125,
-0.0291290283203125,
0.01258087158203125,
-0.002590179443359375,
-0.0224761962890625,
0.0201263427734375,
0.059722900390625,
-0.05108642578125,
0.030487060546875,
0.00904083251953125,
-0.027618408203125,
0.006305694580078125,
0.030059814453125,
-0.059478759765625,
-0.02020263671875,
0.003509521484375,
-0.014190673828125,
0.00428009033203125,
-0.0018215179443359375,
-0.05035400390625,
0.07464599609375,
-0.0263519287109375,
0.0190277099609375,
-0.0099945068359375,
0.033660888671875,
-0.002559661865234375,
0.028961181640625,
-0.0389404296875,
0.05523681640625,
0.004077911376953125,
0.0162506103515625,
-0.044281005859375,
-0.0137939453125,
0.0032367706298828125,
0.00917816162109375,
0.003376007080078125,
-0.0210418701171875,
-0.0019321441650390625,
-0.00036716461181640625,
0.08880615234375,
0.1114501953125,
0.05706787109375,
-0.031890869140625,
0.01092529296875,
0.026336669921875,
0.00690460205078125,
-0.017364501953125,
0.0300750732421875,
-0.041046142578125,
-0.0263824462890625,
0.03887939453125,
0.00760650634765625,
-0.00536346435546875,
-0.02227783203125,
-0.01509857177734375,
0.0200347900390625,
-0.0289154052734375,
-0.020263671875,
0.007282257080078125,
0.01094818115234375,
0.0350341796875,
0.0384521484375,
-0.06353759765625,
-0.0494384765625,
-0.010040283203125,
0.03472900390625,
0.00568389892578125,
0.02740478515625,
0.0323486328125,
0.030609130859375,
-0.00569915771484375,
-0.024688720703125,
0.00042724609375,
-0.0110626220703125,
-0.00611114501953125,
0.026763916015625,
-0.01111602783203125,
-0.0013360977172851562,
-0.06036376953125,
-0.01103973388671875,
0.065185546875,
0.04144287109375,
-0.0272369384765625,
-0.0183868408203125,
0.01352691650390625,
-0.015625,
0.0088958740234375,
-0.0170135498046875,
0.0186767578125,
0.0025806427001953125,
-0.0165557861328125,
-0.04815673828125,
0.0208740234375,
0.0263671875,
0.004154205322265625,
0.007354736328125,
0.047119140625,
-0.04925537109375,
0.0171356201171875,
-0.0411376953125,
0.056610107421875,
0.0186614990234375,
0.005107879638671875,
-0.037261962890625,
0.07623291015625,
0.01157379150390625,
0.003620147705078125,
0.01534271240234375,
0.00496673583984375,
0.05859375,
-0.04229736328125,
0.04071044921875,
0.04290771484375,
0.021270751953125,
-0.017547607421875,
0.009765625,
0.00988006591796875,
0.042877197265625,
0.028411865234375,
-0.03033447265625,
-0.01336669921875,
-0.012359619140625,
-0.02703857421875,
-0.0308685302734375,
-0.031646728515625,
-0.0034961700439453125,
0.0037403106689453125,
0.0029163360595703125,
0.0096588134765625,
0.0188751220703125,
0.0107269287109375,
-0.0017271041870117188,
0.01338958740234375,
0.00829315185546875,
-0.0059967041015625,
0.035369873046875,
0.006183624267578125,
0.024627685546875,
0.0120086669921875,
-0.031280517578125,
0.0203704833984375,
-0.0302276611328125,
-0.060821533203125,
0.004596710205078125,
0.0423583984375,
-2.384185791015625e-7,
-0.00030922889709472656,
-0.0211334228515625,
0.005771636962890625,
0.04931640625,
-0.028564453125,
-0.0242919921875,
0.03448486328125,
0.03082275390625,
-0.00980377197265625,
-0.06512451171875,
-0.0265350341796875,
0.007015228271484375,
0.028167724609375,
-0.042144775390625,
0.06390380859375,
0.0079345703125,
0.00021946430206298828,
-0.060699462890625,
0.0196380615234375,
-0.049835205078125,
-0.0487060546875,
0.03216552734375,
0.031707763671875,
0.01151275634765625,
-0.002742767333984375,
-0.01062774658203125,
-0.0004673004150390625,
0.0275421142578125,
-0.006549835205078125,
-0.02325439453125,
-0.00716400146484375,
0.035797119140625,
0.033233642578125,
0.0540771484375,
-0.021942138671875,
0.0011911392211914062,
0.003871917724609375,
-0.041259765625,
0.03875732421875,
0.03814697265625,
0.05316162109375,
0.0241851806640625,
0.0496826171875,
0.0078582763671875,
0.0201873779296875,
0.00511932373046875,
0.02899169921875,
0.02606201171875,
0.009979248046875,
0.000659942626953125,
-0.017120361328125,
-0.016204833984375,
0.028656005859375,
-0.00495147705078125,
0.0147705078125,
0.00498199462890625,
0.060943603515625,
0.01355743408203125,
0.044281005859375,
0.03753662109375,
0.00811767578125,
0.00534820556640625,
0.043365478515625,
-0.0280914306640625,
-0.045745849609375,
-0.01474761962890625,
-0.0203399658203125,
-0.0419921875,
0.028472900390625,
0.02325439453125,
0.01438140869140625,
-0.01264190673828125,
-0.0243072509765625,
-0.035430908203125,
-0.004032135009765625,
-0.004329681396484375,
0.01520538330078125,
0.0010919570922851562,
-0.0007071495056152344,
-0.034210205078125,
0.00673675537109375,
-0.0258941650390625,
-0.00234222412109375,
0.033477783203125,
-0.02886962890625,
-0.023406982421875,
-0.027313232421875,
0.0149383544921875,
-0.02484130859375,
0.018218994140625,
0.0206298828125,
-0.0098419189453125,
0.0060882568359375,
0.011260986328125,
0.0165863037109375,
0.04296875,
-0.0220184326171875,
-0.0075225830078125,
0.003108978271484375,
0.02227783203125,
-0.033599853515625,
-0.08905029296875,
0.03466796875,
-0.08477783203125,
-0.01824951171875,
0.02130126953125,
-0.042938232421875,
-0.0138397216796875,
-0.023895263671875,
-0.06536865234375,
-0.005634307861328125,
0.0177764892578125,
-0.03167724609375,
-0.0292816162109375,
-0.01009368896484375,
0.0118560791015625,
0.012664794921875,
-0.0136566162109375,
0.01177978515625,
-0.04010009765625,
0.007144927978515625,
0.0227203369140625,
0.0086517333984375,
0.0178985595703125,
0.02166748046875,
-0.05755615234375,
0.01206207275390625,
-0.0021381378173828125,
-0.0130462646484375,
-0.0158233642578125,
-0.007045745849609375,
-0.01482391357421875,
0.0200042724609375,
-0.036865234375,
-0.082763671875,
-0.002529144287109375,
0.030120849609375,
-0.0119476318359375,
-0.060272216796875,
-0.06317138671875,
-0.0640869140625,
0.07647705078125,
0.038818359375,
0.0231170654296875,
-0.0082244873046875,
0.0341796875,
-0.0164642333984375,
-0.0140533447265625,
-0.0269012451171875,
0.01226043701171875,
-0.0908203125,
-0.05126953125,
0.02386474609375,
-0.0330810546875,
0.0220489501953125,
0.0179290771484375,
-0.0245513916015625,
0.0194854736328125,
0.032958984375,
-0.024871826171875,
-0.056884765625,
0.0156402587890625,
0.0753173828125,
-0.06854248046875,
-0.0341796875,
0.00939178466796875,
0.0003209114074707031,
0.01323699951171875,
-0.043731689453125,
-0.038818359375,
-0.059173583984375,
0.025665283203125,
0.016357421875,
-0.01329803466796875,
0.000005543231964111328,
0.0158843994140625,
-0.00995635986328125,
0.0267486572265625,
-0.020965576171875,
-0.0340576171875,
-0.027069091796875,
0.045989990234375,
-0.00066375732421875,
-0.03253173828125,
0.00858306884765625,
-0.0154876708984375,
0.01036834716796875,
-0.034423828125,
0.0107269287109375,
-0.02716064453125,
0.004856109619140625,
-0.01093292236328125,
-0.007030487060546875,
0.0105743408203125,
-0.03387451171875,
-0.03912353515625,
-0.0228118896484375,
-0.04083251953125,
-0.052490234375,
-0.023406982421875,
-0.003265380859375
] |
25aad38977c08c7a97367167fdb62ed066042f66
|
Wordpress Stackexchange
Q: Remove / Rename Uncategorized Category In Wordpress I have installed wordpress Muilit Site (NETWORK)
I need to Remove / Rename Uncategorized Category In Wordpress.
How is this possible?
A: To change the default "Uncategorized" using code you can do the following:
// Uncategorized ID is always 1
wp_update_term(1, 'category', array(
'name' => 'hello',
'slug' => 'hello',
'description' => 'hi'
));
Read this: http://codex.wordpress.org/Function_Reference/wp_update_term
|
Q: Remove / Rename Uncategorized Category In Wordpress I have installed wordpress Muilit Site (NETWORK)
I need to Remove / Rename Uncategorized Category In Wordpress.
How is this possible?
A: To change the default "Uncategorized" using code you can do the following:
// Uncategorized ID is always 1
wp_update_term(1, 'category', array(
'name' => 'hello',
'slug' => 'hello',
'description' => 'hi'
));
Read this: http://codex.wordpress.org/Function_Reference/wp_update_term
A: In wp-admin, you can rename the Uncategorized category any time. Just go to Posts > Categories and do it. :)
In case you forgot to assign a post to any category WordPress will add that post to Uncategorized by default. That's why a default category is must.
To change a default category go to Settings > Writing.
Then choose the Default category whatever you want; but you have to add a new category from the Categories page first. Enjoy WordPress.
A: You can easily rename uncategorize category in WordPress. Just go to Posts the select Categories. Then click on Edit just below Uncategorized. Then enter your meaningful category. Finally, click on Update. That's all.
http://www.mytechgoal.com/rename-uncategorized-category-in-wordpress/
|
wordpress
|
{
"language": "en",
"length": 180,
"provenance": "stackexchange_00019.jsonl.gz:428347",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83415"
}
|
[
0.0196685791015625,
0.014434814453125,
-0.03350830078125,
-0.005062103271484375,
0.027191162109375,
-0.052764892578125,
0.0299530029296875,
-0.034423828125,
-0.036102294921875,
0.02886962890625,
0.012420654296875,
-0.0024776458740234375,
0.01241302490234375,
-0.032989501953125,
0.01074981689453125,
-0.0216827392578125,
0.02288818359375,
0.031829833984375,
0.050201416015625,
0.00466156005859375,
-0.0132293701171875,
0.020599365234375,
0.04150390625,
0.0230712890625,
0.0030307769775390625,
-0.0239715576171875,
0.07879638671875,
-0.02508544921875,
-0.004024505615234375,
-0.046783447265625,
0.0269317626953125,
0.03570556640625,
-0.0015163421630859375,
0.031494140625,
-0.0024929046630859375,
0.006824493408203125,
-0.032470703125,
0.0277862548828125,
0.00917816162109375,
0.02325439453125,
0.045654296875,
-0.01861572265625,
0.034088134765625,
0.00917816162109375,
0.008941650390625,
-0.052337646484375,
0.048553466796875,
-0.056304931640625,
0.028564453125,
-0.05322265625,
0.0304718017578125,
0.044647216796875,
0.056060791015625,
-0.0833740234375,
-0.01336669921875,
0.024993896484375,
-0.0229644775390625,
0.0229339599609375,
0.0279541015625,
0.0386962890625,
-0.0093231201171875,
-0.0017042160034179688,
-0.004848480224609375,
-0.0445556640625,
0.0280303955078125,
0.0011348724365234375,
0.0252685546875,
0.027313232421875,
-0.039337158203125,
0.01226043701171875,
0.035186767578125,
-0.0220947265625,
0.01261138916015625,
0.003696441650390625,
0.01166534423828125,
-0.0217742919921875,
0.0248260498046875,
0.0238494873046875,
0.0186004638671875,
0.00119781494140625,
0.06512451171875,
-0.0037708282470703125,
0.03125,
0.00966644287109375,
0.0182342529296875,
0.0276641845703125,
0.0166015625,
-0.050140380859375,
-0.05181884765625,
0.00679779052734375,
-0.0175323486328125,
-0.01485443115234375,
-0.07745361328125,
0.0171966552734375,
0.01467132568359375,
0.01107025146484375,
0.0210113525390625,
0.0499267578125,
-0.015380859375,
-0.01141357421875,
-0.0132598876953125,
-0.0273895263671875,
-0.031341552734375,
-0.023834228515625,
0.002101898193359375,
-0.001026153564453125,
0.0119781494140625,
0.0007910728454589844,
0.034423828125,
0.034149169921875,
-0.035308837890625,
0.0350341796875,
0.00951385498046875,
0.00008666515350341797,
-0.040985107421875,
-0.0012769699096679688,
-0.01922607421875,
0.025421142578125,
-0.0012960433959960938,
0.0140533447265625,
0.00469207763671875,
0.0203704833984375,
0.006427764892578125,
-0.050201416015625,
-0.003910064697265625,
-0.0222930908203125,
-0.03253173828125,
-0.0051422119140625,
-0.0050048828125,
-0.06475830078125,
-0.058013916015625,
0.040679931640625,
0.1015625,
0.07208251953125,
0.042510986328125,
0.014007568359375,
0.047821044921875,
0.0214385986328125,
0.017181396484375,
0.0340576171875,
0.0073089599609375,
-0.0221405029296875,
-0.0045928955078125,
0.006549835205078125,
0.06683349609375,
0.04522705078125,
0.0153656005859375,
-0.00562286376953125,
0.033905029296875,
-0.0299072265625,
0.03265380859375,
-0.02392578125,
0.0433349609375,
0.031005859375,
-0.015777587890625,
-0.004611968994140625,
0.07598876953125,
-0.058624267578125,
-0.045684814453125,
-0.07952880859375,
0.052764892578125,
-0.0173187255859375,
0.0098876953125,
0.0205841064453125,
-0.0192413330078125,
0.0260162353515625,
-0.0697021484375,
-0.02001953125,
0.006824493408203125,
0.0148773193359375,
-0.016510009765625,
-0.0216217041015625,
0.0079345703125,
-0.00048422813415527344,
-0.004474639892578125,
0.01374053955078125,
-0.0523681640625,
-0.00945281982421875,
0.0285186767578125,
0.059906005859375,
0.041534423828125,
-0.030426025390625,
-0.020172119140625,
0.056640625,
-0.06494140625,
0.042877197265625,
0.005992889404296875,
0.07025146484375,
0.0146942138671875,
0.01290130615234375,
0.0499267578125,
0.0128173828125,
-0.05755615234375,
0.01396942138671875,
0.01525115966796875,
-0.028411865234375,
-0.045867919921875,
-0.0309295654296875,
-0.004810333251953125,
0.0105438232421875,
-0.005176544189453125,
-0.0280303955078125,
-0.00803375244140625,
0.008209228515625,
-0.0576171875,
-0.015716552734375,
-0.018402099609375,
0.027801513671875,
-0.031768798828125,
0.0005245208740234375,
0.0151519775390625,
-0.03900146484375,
0.0108489990234375,
-0.05023193359375,
-0.034759521484375,
0.007656097412109375,
-0.00923919677734375,
0.00577545166015625,
0.0017881393432617188,
0.0016279220581054688,
0.01541900634765625,
0.01149749755859375,
0.0049591064453125,
0.03369140625,
0.06597900390625,
0.01317596435546875,
-0.039886474609375,
-0.029815673828125,
0.03106689453125,
-0.003917694091796875,
-0.0745849609375,
0.06915283203125,
0.0306854248046875,
0.01898193359375,
-0.0152740478515625,
0.004756927490234375,
0.0190887451171875,
-0.055755615234375,
-0.005889892578125,
0.04241943359375,
0.01154327392578125,
0.006473541259765625,
-0.032501220703125,
-0.007434844970703125,
0.02423095703125,
0.01788330078125,
0.02203369140625,
-0.01401519775390625,
0.0194854736328125,
0.0258331298828125,
0.00803375244140625,
-0.00153350830078125,
0.0230712890625,
0.0223388671875,
0.042083740234375,
0.0261383056640625,
-0.0078887939453125,
-0.0307464599609375,
0.025787353515625,
-0.00876617431640625,
0.0131072998046875,
-0.03594970703125,
-0.03094482421875,
0.00254058837890625,
0.0753173828125,
-0.0107421875,
0.028839111328125,
0.0175323486328125,
-0.0516357421875,
0.01873779296875,
0.0197906494140625,
-0.018218994140625,
-0.023712158203125,
0.036773681640625,
0.02276611328125,
0.007678985595703125,
-0.05877685546875,
0.0143890380859375,
-0.0034942626953125,
0.01873779296875,
-0.00223541259765625,
0.061004638671875,
-0.00843048095703125,
-0.0233154296875,
-0.015045166015625,
-0.03973388671875,
-0.0279998779296875,
-0.01349639892578125,
-0.08172607421875,
-0.03662109375,
-0.00839996337890625,
0.057037353515625,
-0.0274505615234375,
0.00930023193359375,
-0.02142333984375,
0.0207672119140625,
-0.001987457275390625,
-0.0239410400390625,
0.0198822021484375,
-0.019195556640625,
0.0242919921875,
0.06341552734375,
-0.0214080810546875,
0.0269012451171875,
0.0029087066650390625,
-0.01397705078125,
0.023193359375,
-0.005565643310546875,
-0.008148193359375,
0.015655517578125,
-0.055694580078125,
0.03656005859375,
0.0027332305908203125,
0.040863037109375,
-0.018310546875,
-0.0462646484375,
0.0192413330078125,
0.0078582763671875,
-0.054840087890625,
-0.0562744140625,
-0.0196533203125,
0.00823974609375,
0.0033817291259765625,
0.0301055908203125,
-0.0005750656127929688,
0.0035400390625,
0.0291900634765625,
0.0019464492797851562,
0.058807373046875,
-0.006832122802734375,
-0.06292724609375,
-0.00823211669921875,
-0.06744384765625,
-0.0380859375,
-0.0171661376953125,
0.0018482208251953125,
-0.007282257080078125,
0.041259765625,
0.0069732666015625,
-0.031585693359375,
-0.006587982177734375,
0.00722503662109375,
-0.0001653432846069336,
0.00890350341796875,
0.050811767578125,
-0.004558563232421875,
0.0056610107421875,
0.0098724365234375,
0.02667236328125,
0.054779052734375,
-0.057647705078125,
-0.02459716796875,
-0.01409149169921875,
0.05206298828125,
0.0128936767578125,
-0.01486968994140625,
0.0191497802734375,
-0.01058197021484375,
-0.0367431640625,
-0.05963134765625,
-0.024322509765625,
0.0097198486328125,
-0.0259857177734375,
-0.01410675048828125,
0.007457733154296875,
-0.007045745849609375,
-0.04248046875,
0.021392822265625,
-0.0355224609375,
-0.0131683349609375,
0.0188140869140625,
-0.04669189453125,
0.032440185546875,
-0.0213470458984375,
-0.054107666015625,
-0.004238128662109375,
0.0286407470703125,
-0.027008056640625,
-0.0107269287109375,
-0.0087738037109375,
0.01293182373046875,
-0.00843048095703125,
-0.003467559814453125,
-0.052154541015625,
-0.045013427734375,
0.0251922607421875,
-0.09698486328125,
-0.041259765625,
-0.018768310546875,
0.022186279296875,
0.0285186767578125,
0.08026123046875,
-0.040863037109375,
-0.0292816162109375,
0.0027179718017578125,
0.02191162109375,
-0.004001617431640625,
-0.04779052734375,
-0.01021575927734375,
-0.038360595703125,
-0.09637451171875,
0.005153656005859375,
-0.00041747093200683594,
-0.022003173828125,
-0.0360107421875,
0.0811767578125,
-0.07464599609375,
-0.029266357421875,
0.041839599609375,
-0.039337158203125,
0.043792724609375,
0.011871337890625,
0.03289794921875,
-0.0173187255859375,
-0.036407470703125,
-0.0185089111328125,
-0.0469970703125,
0.005542755126953125,
-0.01019287109375,
0.022918701171875,
-0.00875091552734375,
0.0286102294921875,
-0.0178680419921875,
0.037322998046875,
0.014068603515625,
-0.014312744140625,
0.0015153884887695312,
-0.0112762451171875,
-0.02264404296875,
0.050323486328125,
0.005290985107421875,
-0.00017535686492919922,
-0.0164947509765625,
-0.0218658447265625,
-0.03009033203125,
0.042144775390625,
-0.009674072265625,
0.033050537109375,
0.010589599609375,
-0.0153045654296875,
-0.0443115234375,
-0.05780029296875,
-0.036407470703125,
0.00888824462890625,
-0.01154327392578125,
0.018035888671875,
-0.040374755859375,
-0.04681396484375,
0.066650390625,
0.041412353515625,
-0.0114593505859375,
-0.00998687744140625,
0.050811767578125,
0.0037631988525390625,
-0.04840087890625,
-0.05963134765625,
0.0031604766845703125,
0.01397705078125,
0.0245819091796875,
0.040069580078125,
-0.00812530517578125,
-0.01406097412109375,
0.05828857421875,
0.004856109619140625,
-0.00576019287109375,
0.0033664703369140625,
0.049530029296875,
-0.007598876953125,
-0.0180816650390625,
0.018310546875,
-0.0235748291015625,
0.0160064697265625,
0.012969970703125,
-0.00876617431640625,
0.003536224365234375,
-0.0199127197265625,
-0.005893707275390625,
0.00978851318359375,
-0.0301055908203125,
-0.01557159423828125,
-0.0278472900390625,
0.022064208984375,
-0.0171661376953125,
-0.0022029876708984375,
0.0011205673217773438,
-0.0007433891296386719,
-0.02032470703125,
-0.01366424560546875,
0.020355224609375,
-0.036285400390625,
-0.045074462890625,
-0.058502197265625,
0.020477294921875,
-0.0213470458984375,
-0.00997161865234375,
0.03228759765625,
-0.00635528564453125,
0.045135498046875,
-0.0288848876953125,
-0.035675048828125,
-0.055328369140625,
-0.00621795654296875,
-0.00017559528350830078,
0.051300048828125,
-0.015716552734375,
0.019866943359375,
0.0041656494140625,
-0.016632080078125,
-0.011871337890625,
-0.04937744140625,
-0.019317626953125,
-0.038482666015625,
-0.005390167236328125,
-0.006389617919921875,
-0.005214691162109375,
0.0306396484375,
0.011016845703125,
0.012420654296875,
0.0201873779296875,
-0.028839111328125,
0.0144805908203125,
0.0152435302734375,
0.032562255859375,
0.004131317138671875,
0.0093994140625,
-0.0210113525390625,
0.004405975341796875,
0.00525665283203125,
-0.050262451171875,
-0.0169219970703125,
0.047943115234375,
0.03564453125,
-0.01390838623046875,
-0.0257568359375,
0.0191802978515625,
0.01139068603515625,
-0.002208709716796875,
-0.00872039794921875,
-0.0452880859375,
-0.0121612548828125,
-0.022857666015625,
0.0016965866088867188,
0.0224151611328125,
-0.01375579833984375,
-0.02642822265625,
-0.0233917236328125,
-0.0830078125,
-0.01384735107421875,
0.036102294921875,
-0.007465362548828125,
-0.0286102294921875,
-0.051849365234375,
-0.0187225341796875,
-0.018768310546875,
-0.0089569091796875,
-0.009490966796875,
-0.013031005859375,
-0.014892578125,
-0.0369873046875,
0.021148681640625,
-0.015716552734375,
0.043212890625,
-0.02105712890625,
-0.01178741455078125,
0.0501708984375,
0.0055389404296875,
0.043426513671875,
0.00812530517578125,
-0.04107666015625,
-0.015411376953125,
-0.0386962890625,
-0.004596710205078125,
-0.005950927734375,
-0.006443023681640625,
-0.033599853515625,
-0.01296234130859375,
-0.0009427070617675781,
0.01078033447265625,
-0.006244659423828125,
0.00634002685546875,
-0.00392913818359375,
0.0205841064453125,
0.006122589111328125,
0.0107879638671875,
-0.0286102294921875,
-0.01800537109375,
0.030364990234375,
-0.000560760498046875,
-0.01152801513671875,
-0.03277587890625,
0.031951904296875,
-0.02203369140625,
-0.00453948974609375,
-0.02874755859375,
-0.004180908203125,
0.00470733642578125,
-0.043243408203125,
0.0014400482177734375,
0.0416259765625,
-0.0052642822265625,
0.0261077880859375,
-0.0179290771484375,
0.005329132080078125,
-0.00615692138671875,
-0.0255126953125,
-0.0306243896484375,
-0.0013780593872070312,
-0.0118255615234375,
-0.01091766357421875,
0.04443359375,
0.00348663330078125,
0.031494140625,
-0.01837158203125,
-0.0330810546875,
0.01149749755859375,
0.013275146484375,
-0.031646728515625,
0.038116455078125,
0.02032470703125,
-0.0103759765625,
0.0107269287109375,
-0.0040740966796875,
0.004299163818359375,
-0.0225982666015625,
-0.051788330078125,
0.03369140625,
0.062408447265625,
0.054473876953125,
-0.01354217529296875,
-0.0134735107421875,
0.025482177734375,
-0.0352783203125,
-0.017242431640625,
0.05206298828125,
0.07635498046875,
-0.054443359375,
-0.0016880035400390625,
0.037261962890625,
-0.0220184326171875,
-0.0107269287109375,
0.014251708984375,
-0.0179443359375,
-0.0130615234375,
-0.01090240478515625,
-0.042694091796875,
-0.030487060546875,
-0.01776123046875,
0.0102081298828125,
-0.016815185546875,
0.007160186767578125,
0.04351806640625,
0.032257080078125,
-0.0305633544921875,
0.017425537109375,
0.0198211669921875,
0.01546478271484375,
-0.01898193359375,
-0.009552001953125,
0.051177978515625,
-0.03692626953125,
-0.07244873046875,
0.0643310546875,
0.0141143798828125,
-0.0040740966796875,
-0.0038928985595703125,
-0.0362548828125,
0.0020465850830078125,
0.0428466796875,
-0.0357666015625,
0.010467529296875,
0.023529052734375,
-0.0693359375,
0.0003294944763183594,
-0.0104827880859375,
0.008636474609375,
0.01534271240234375,
-0.0701904296875,
0.006259918212890625,
-0.0343017578125,
0.00733184814453125,
-0.0135650634765625,
-0.04864501953125,
0.07342529296875,
-0.076904296875,
0.0105743408203125,
-0.007190704345703125,
0.06231689453125,
0.03948974609375,
-0.00360870361328125,
0.01303863525390625,
-0.043304443359375,
-0.00630950927734375,
0.0162353515625,
-0.00312042236328125,
0.0169219970703125,
0.0168304443359375,
-0.08331298828125,
0.0526123046875,
0.033233642578125,
0.023345947265625,
-0.01445770263671875,
0.0162506103515625,
-0.0177154541015625,
-0.00865936279296875,
-0.00487518310546875,
0.0259246826171875,
0.0196990966796875,
0.00301361083984375,
0.044891357421875,
0.025146484375,
0.0166473388671875,
-0.0181732177734375,
0.054473876953125,
0.010833740234375,
0.01490020751953125,
0.022003173828125,
0.045196533203125,
0.025634765625,
-0.0262451171875,
0.0166473388671875,
0.004352569580078125,
-0.0174560546875,
-0.00684356689453125,
0.03057861328125,
0.0221405029296875,
0.0028934478759765625,
-0.05657958984375,
0.02880859375,
0.028564453125,
0.0565185546875,
-0.0241241455078125,
0.041290283203125,
-0.01837158203125,
-0.0277252197265625,
0.0272216796875,
-0.00786590576171875,
-0.022430419921875,
0.058837890625,
0.02117919921875,
-0.042724609375,
0.04150390625,
-0.055206298828125,
0.07415771484375,
-0.00595855712890625,
0.051544189453125,
0.04925537109375,
0.01491546630859375,
0.07659912109375,
-0.020751953125,
0.020721435546875,
-0.00702667236328125,
-0.0211029052734375,
0.06689453125,
0.063232421875,
0.03240966796875,
0.007038116455078125,
-0.0022296905517578125,
0.05438232421875,
0.0823974609375,
-0.043304443359375,
-0.0031795501708984375,
0.04168701171875,
0.03814697265625,
0.0017919540405273438,
-0.0262908935546875,
0.02679443359375,
-0.046173095703125,
-0.0125579833984375,
-0.05029296875,
0.013519287109375,
0.05389404296875,
0.0288543701171875,
0.00209808349609375,
0.0092620849609375,
-0.07281494140625,
-0.02197265625,
-0.0372314453125,
0.0307159423828125,
-0.0026607513427734375,
0.022369384765625,
0.005859375,
0.02777099609375,
0.0296630859375,
0.0004544258117675781,
0.01345062255859375,
0.0289154052734375,
-0.00041484832763671875,
-0.0079193115234375,
-0.0174713134765625,
-0.04718017578125,
0.01300048828125,
0.032073974609375,
-0.0062255859375,
0.00809478759765625,
0.047271728515625,
0.052520751953125,
-0.0292205810546875,
-0.0231475830078125,
0.0213623046875,
-0.01453399658203125,
-0.010009765625,
-0.030242919921875,
0.0262908935546875,
0.035888671875,
0.0150604248046875,
-0.01331329345703125,
0.052459716796875,
0.04168701171875,
-0.0096893310546875,
0.035919189453125,
0.0029735565185546875,
-0.038360595703125,
0.06719970703125,
0.0025691986083984375,
0.082763671875,
0.026214599609375,
-0.051849365234375,
-0.03509521484375,
-0.00931549072265625,
-0.013458251953125,
0.0218353271484375,
0.0296630859375,
-0.0224761962890625,
0.0201568603515625,
-0.004604339599609375,
-0.016143798828125,
0.00618743896484375,
0.01806640625,
-0.0213165283203125,
-0.013671875,
0.029083251953125,
-0.029144287109375,
-0.054168701171875,
-0.031280517578125,
0.00002944469451904297,
0.034393310546875,
-0.0034637451171875,
0.034637451171875,
-0.0024318695068359375,
0.01995849609375,
-0.046234130859375,
0.039520263671875,
-0.0650634765625,
-0.0455322265625,
0.033782958984375,
0.01216888427734375,
-0.00319671630859375,
-0.0010232925415039062,
-0.00716400146484375,
0.01502227783203125,
0.037994384765625,
-0.033599853515625,
0.003017425537109375,
-0.01311492919921875,
0.0236053466796875,
-0.02685546875,
0.052764892578125,
0.001010894775390625,
-0.01082611083984375,
-0.01181793212890625,
-0.0025272369384765625,
0.03094482421875,
0.0164642333984375,
-0.0167694091796875,
-0.03350830078125,
-0.0273590087890625,
-0.0174560546875,
0.0167694091796875,
0.0229339599609375,
0.0025882720947265625,
0.0338134765625,
-0.0166473388671875,
-0.016693115234375,
0.037872314453125,
0.000438690185546875,
-0.0010213851928710938,
0.036376953125,
0.01093292236328125,
0.029327392578125,
-0.0281219482421875,
-0.01297760009765625,
0.00231170654296875,
0.0233306884765625,
-0.007137298583984375,
0.0054931640625,
-0.01520538330078125,
-0.0030612945556640625,
-0.026824951171875,
-0.0164031982421875,
-0.044342041015625,
-0.06463623046875,
-0.007717132568359375,
0.0045623779296875,
-0.044586181640625,
-0.04205322265625,
-0.040252685546875,
0.010223388671875,
0.0438232421875,
-0.0040130615234375,
-0.026153564453125,
0.038330078125,
-0.03424072265625,
0.007671356201171875,
0.0017852783203125,
-0.04583740234375,
-0.0183868408203125,
-0.004085540771484375,
-0.0225372314453125,
-0.0311431884765625,
-0.0738525390625,
0.0092010498046875,
-0.059661865234375,
0.0025539398193359375,
0.0174407958984375,
-0.00475311279296875,
-0.0010461807250976562,
-0.021514892578125,
0.00567626953125,
0.03765869140625,
0.00881195068359375,
-0.0226593017578125,
-0.01103973388671875,
0.0035152435302734375,
-0.024078369140625,
-0.0259857177734375,
0.0201416015625,
-0.043487548828125,
-0.0197296142578125,
-0.0121002197265625,
0.007213592529296875,
0.02685546875,
-0.035980224609375,
-0.06463623046875,
0.043731689453125,
-0.0211944580078125,
-0.029266357421875,
-0.011993408203125,
0.0167388916015625,
-0.02557373046875,
0.033355712890625,
-0.00542449951171875,
-0.005397796630859375,
0.00809478759765625,
0.012786865234375,
0.0266265869140625,
0.03021240234375,
0.006603240966796875,
-0.0133209228515625,
-0.03948974609375,
0.013763427734375,
0.01690673828125,
0.054779052734375,
-0.0084686279296875,
0.00910186767578125,
0.0086669921875,
0.033172607421875,
-0.0190582275390625,
-0.021697998046875,
0.0028934478759765625,
-0.0297698974609375,
0.0225372314453125,
-0.050994873046875,
-0.06414794921875,
-0.039764404296875,
0.040985107421875,
0.032440185546875,
0.026702880859375,
-0.003635406494140625,
-0.0535888671875,
-0.02606201171875,
0.02593994140625,
-0.0214080810546875,
0.0086517333984375,
-0.0753173828125,
-0.01123809814453125,
0.02630615234375,
-0.02801513671875,
-0.0023193359375,
-0.00023281574249267578,
-0.054290771484375,
0.005908966064453125,
-0.006031036376953125,
-0.004047393798828125,
-0.06878662109375,
0.02490234375,
-0.019287109375,
-0.014801025390625,
-0.0164794921875,
-0.0229339599609375,
-0.002140045166015625,
-0.0311737060546875,
-0.0107574462890625,
-0.0170135498046875,
0.0235748291015625,
0.00241851806640625,
0.00040459632873535156,
0.021728515625,
0.00391387939453125,
0.0157623291015625,
0.018463134765625,
-0.0491943359375,
0.01739501953125,
0.0204620361328125,
0.0267181396484375,
-0.04248046875,
0.032318115234375,
0.045440673828125,
0.0008630752563476562,
-0.00923919677734375,
-0.053863525390625,
-0.0250396728515625,
0.0445556640625,
0.0001195073127746582,
-0.019622802734375,
0.046112060546875,
-0.0443115234375,
0.02581787109375,
-0.0196075439453125,
0.044647216796875,
-0.036346435546875,
0.02960205078125,
-0.01837158203125,
-0.0014772415161132812,
0.03106689453125
] |
198c681a0b5b8a67bb83fa9547b09f06a3d5667e
|
Wordpress Stackexchange
Q: How to sync with plugins update after I have done manual optimizations? I have several WordPress running plugins on my site and as per suggestions of wordpress performance optimizations I am planning to do the optimizations on plugins myself.
However, that will mean that I will have to modify existing plugins codes. Now, as WordPress plugins release frequent updates, the updates will wipe out my manual changes. How can I keep sync between these? That means, how can I get updated plugin and keep my manual changes as well?
A: Create a local repository in Git (or SVN) for the plugin, and each time an update happens:
*
*merge the changes into your adjusted version,
*test it in your local copy of the production site,
*then push your updated code to your site.
But much better would it be to send your improvements to the plugin author, so she can use that in the main code. Keeping improvements secret is not the spirit of Open Source.
|
Q: How to sync with plugins update after I have done manual optimizations? I have several WordPress running plugins on my site and as per suggestions of wordpress performance optimizations I am planning to do the optimizations on plugins myself.
However, that will mean that I will have to modify existing plugins codes. Now, as WordPress plugins release frequent updates, the updates will wipe out my manual changes. How can I keep sync between these? That means, how can I get updated plugin and keep my manual changes as well?
A: Create a local repository in Git (or SVN) for the plugin, and each time an update happens:
*
*merge the changes into your adjusted version,
*test it in your local copy of the production site,
*then push your updated code to your site.
But much better would it be to send your improvements to the plugin author, so she can use that in the main code. Keeping improvements secret is not the spirit of Open Source.
A: It depends on what kind of mods you are going to perform. If plugin uses filters and actions, you can hook them, or deregister them and register your own modified functions instead of them, from your custom plugin or theme's functions.php.
You can read more about hooks and filters in codex.
A: There isn't really a practical way to go about this that will ensure you can update plugins that you have modified and still guarantee your changes will work, unless you inspect the newly released code prior to merging your changes.
So that means every time a plugin update is available, you would need to check that the modifications you have made are still applicable to the newly updated code base because in some instances a plugin author may change their Class/Method/Function structure so as it represents nothing like the changes you have made.
In cases where your modifications do not work in the context of the newly released version of said plugin then you will need to re-adjust accordingly.
You need to keep a local repository/copy/version of your changes and check those against future updates.
This all requires some effort on your part, attention to detail, that would otherwise be better focused toward trying to convince the plugin authors in question to make the same changes that you have made for improved performance.
|
wordpress
|
{
"language": "en",
"length": 393,
"provenance": "stackexchange_00019.jsonl.gz:428349",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83421"
}
|
[
-0.0013914108276367188,
-0.01849365234375,
0.0088653564453125,
-0.01090240478515625,
-0.00989532470703125,
0.0124359130859375,
0.0106964111328125,
-0.019317626953125,
-0.031097412109375,
0.043182373046875,
-0.01079559326171875,
0.028900146484375,
-0.022857666015625,
-0.00911712646484375,
-0.007049560546875,
-0.028228759765625,
0.052154541015625,
-0.01898193359375,
0.020904541015625,
-0.013214111328125,
0.0095672607421875,
0.04278564453125,
0.01372528076171875,
0.113525390625,
0.040130615234375,
-0.0159454345703125,
0.048126220703125,
-0.00823974609375,
0.0198822021484375,
0.009429931640625,
0.0322265625,
-0.037445068359375,
0.0308685302734375,
0.01312255859375,
-0.048583984375,
-0.0207672119140625,
0.0244903564453125,
-0.0234527587890625,
-0.035369873046875,
0.048004150390625,
0.034332275390625,
-0.005462646484375,
0.0007567405700683594,
0.02484130859375,
-0.00022804737091064453,
-0.059173583984375,
0.035491943359375,
-0.0634765625,
-0.0015649795532226562,
0.0015668869018554688,
0.0014257431030273438,
0.0139923095703125,
0.0195770263671875,
0.0103302001953125,
0.005939483642578125,
0.0001169443130493164,
-0.02618408203125,
0.06829833984375,
0.02105712890625,
-0.0134429931640625,
-0.044952392578125,
-0.006641387939453125,
0.009979248046875,
-0.02508544921875,
-0.00574493408203125,
0.00057220458984375,
0.00695037841796875,
-0.003971099853515625,
-0.035675048828125,
0.0026035308837890625,
0.051483154296875,
-0.038421630859375,
0.00695037841796875,
-0.00464630126953125,
0.0328369140625,
-0.039825439453125,
0.03326416015625,
-0.0151519775390625,
-0.0015354156494140625,
0.041046142578125,
0.0648193359375,
0.013916015625,
0.03387451171875,
-0.039886474609375,
0.0186004638671875,
-0.01169586181640625,
0.0023670196533203125,
-0.0137176513671875,
-0.0172576904296875,
-0.006984710693359375,
-0.017364501953125,
0.0311431884765625,
-0.0537109375,
0.033203125,
-0.00923919677734375,
0.021820068359375,
0.004364013671875,
0.0242767333984375,
-0.006072998046875,
0.02471923828125,
-0.01544189453125,
-0.031341552734375,
0.041595458984375,
-0.0465087890625,
-0.0147552490234375,
0.03363037109375,
0.00313568115234375,
0.0000941157341003418,
0.0239105224609375,
0.031982421875,
0.004299163818359375,
0.004169464111328125,
-0.0230255126953125,
-0.053955078125,
0.030242919921875,
0.0404052734375,
-0.035858154296875,
0.044708251953125,
0.01018524169921875,
0.01276397705078125,
-0.006641387939453125,
0.0271148681640625,
-0.06842041015625,
-0.01296234130859375,
-0.0196075439453125,
-0.0380859375,
0.01424407958984375,
0.007015228271484375,
-0.0299072265625,
-0.0015401840209960938,
-0.0552978515625,
0.03558349609375,
0.07720947265625,
0.0235137939453125,
-0.005405426025390625,
-0.0029144287109375,
0.026336669921875,
0.00913238525390625,
-0.0068511962890625,
0.0311431884765625,
-0.04901123046875,
-0.004261016845703125,
0.040985107421875,
-0.0594482421875,
0.04510498046875,
-0.00322723388671875,
0.0088348388671875,
0.0196075439453125,
0.0217437744140625,
0.039520263671875,
-0.0006146430969238281,
0.025421142578125,
0.025482177734375,
-0.016021728515625,
0.03924560546875,
-0.049072265625,
0.0186767578125,
-0.0277557373046875,
0.034576416015625,
-0.017120361328125,
-0.016632080078125,
-0.0135345458984375,
0.0104217529296875,
0.0018310546875,
-0.003513336181640625,
0.02490234375,
0.00298309326171875,
0.0055389404296875,
0.018463134765625,
-0.01276397705078125,
0.0205078125,
-0.0146331787109375,
0.0467529296875,
0.0102386474609375,
-0.01247406005859375,
0.01122283935546875,
-0.00650787353515625,
-0.00335693359375,
0.037933349609375,
-0.02838134765625,
-0.0255889892578125,
-0.01279449462890625,
0.0880126953125,
-0.0305633544921875,
-0.0108795166015625,
0.00803375244140625,
-0.00984954833984375,
0.047576904296875,
0.042449951171875,
0.0290069580078125,
-0.0318603515625,
-0.0263671875,
-0.0307464599609375,
0.022247314453125,
-0.01520538330078125,
0.01033782958984375,
0.01885986328125,
0.045318603515625,
-0.00901031494140625,
-0.053375244140625,
-0.035736083984375,
0.028839111328125,
-0.02813720703125,
-0.00914764404296875,
-0.08685302734375,
0.0155487060546875,
-0.0228729248046875,
0.0589599609375,
0.0262603759765625,
0.0335693359375,
-0.00164794921875,
0.012359619140625,
0.01092529296875,
-0.04400634765625,
-0.0225372314453125,
0.00803375244140625,
-0.00658416748046875,
0.0248260498046875,
0.0205078125,
0.0230865478515625,
0.00902557373046875,
-0.0237579345703125,
-0.00574493408203125,
-0.0126495361328125,
-0.0247955322265625,
0.0034809112548828125,
-0.020111083984375,
0.0145721435546875,
-0.040618896484375,
0.0009918212890625,
0.0169830322265625,
0.037872314453125,
-0.0263519287109375,
0.01454925537109375,
0.0019483566284179688,
-0.019805908203125,
-0.00809478759765625,
-0.07489013671875,
0.042755126953125,
0.0362548828125,
0.0233001708984375,
-0.017303466796875,
-0.0078582763671875,
0.0183868408203125,
0.0006709098815917969,
-0.038604736328125,
0.00995635986328125,
0.003833770751953125,
0.0355224609375,
0.038299560546875,
0.005870819091796875,
-0.02960205078125,
0.01334381103515625,
-0.07147216796875,
0.02496337890625,
0.0173187255859375,
-0.0022335052490234375,
-0.0137481689453125,
0.0013065338134765625,
-0.0033931732177734375,
-0.00949859619140625,
-0.080322265625,
-0.0285186767578125,
-0.0258941650390625,
0.026214599609375,
-0.0006313323974609375,
0.0258331298828125,
0.01380157470703125,
-0.031707763671875,
-0.003749847412109375,
0.0283050537109375,
0.0207061767578125,
0.03204345703125,
0.0048675537109375,
-0.03387451171875,
0.0292510986328125,
0.0126190185546875,
-0.01041412353515625,
0.0297088623046875,
0.004337310791015625,
-0.02679443359375,
-0.031585693359375,
0.01399993896484375,
-0.014190673828125,
0.0162200927734375,
-0.014801025390625,
0.041107177734375,
-0.01837158203125,
-0.0350341796875,
-0.0223846435546875,
0.0007100105285644531,
0.006443023681640625,
-0.027557373046875,
0.0179595947265625,
-0.0019292831420898438,
-0.01317596435546875,
0.02362060546875,
-0.0185546875,
0.0270843505859375,
-0.0174560546875,
0.03143310546875,
0.052032470703125,
-0.0015239715576171875,
-0.01430511474609375,
0.003055572509765625,
-0.01702880859375,
0.0209503173828125,
-0.01004791259765625,
-0.027313232421875,
0.02569580078125,
-0.1016845703125,
-0.0140380859375,
0.0030117034912109375,
0.03497314453125,
-0.03558349609375,
-0.048583984375,
-0.041839599609375,
0.0007100105285644531,
-0.09283447265625,
-0.043426513671875,
-0.0276641845703125,
-0.0186309814453125,
-0.0030364990234375,
0.007244110107421875,
-0.0027103424072265625,
-0.00023984909057617188,
0.016082763671875,
0.0150604248046875,
0.00717926025390625,
-0.04669189453125,
-0.085693359375,
-0.09100341796875,
-0.084716796875,
0.016845703125,
-0.0035266876220703125,
0.0227508544921875,
0.0035037994384765625,
0.07537841796875,
-0.00800323486328125,
-0.07421875,
-0.0310211181640625,
0.018310546875,
-0.0245208740234375,
-0.00664520263671875,
0.0221405029296875,
-0.036224365234375,
0.01036834716796875,
-0.01361083984375,
0.0269012451171875,
0.033782958984375,
-0.039886474609375,
-0.00690460205078125,
-0.0008082389831542969,
-0.003978729248046875,
0.04644775390625,
0.00429534912109375,
-0.0177764892578125,
0.0308837890625,
0.04730224609375,
-0.015869140625,
0.0095672607421875,
0.02935791015625,
0.01129913330078125,
-0.0007824897766113281,
-0.0181427001953125,
-0.048492431640625,
-0.0037517547607421875,
0.007049560546875,
0.0279693603515625,
0.034576416015625,
0.0178985595703125,
-0.0036640167236328125,
0.016448974609375,
-0.00872802734375,
-0.0052032470703125,
-0.04937744140625,
0.0187530517578125,
-0.0119171142578125,
0.0212860107421875,
-0.00455474853515625,
-0.00006270408630371094,
-0.033782958984375,
0.041259765625,
-0.071533203125,
0.0287017822265625,
0.0151519775390625,
0.0089111328125,
0.056060791015625,
-0.0258331298828125,
-0.0051727294921875,
-0.0406494140625,
0.033203125,
-0.029632568359375,
-0.006633758544921875,
0.0132904052734375,
0.020477294921875,
-0.0399169921875,
-0.0282135009765625,
-0.0301666259765625,
-0.015838623046875,
0.01108551025390625,
0.006168365478515625,
-0.005596160888671875,
0.00820159912109375,
-0.00750732421875,
-0.0156402587890625,
0.00551605224609375,
-0.01971435546875,
0.01137542724609375,
0.005359649658203125,
0.0159454345703125,
-0.013427734375,
-0.0083160400390625,
-0.0177001953125,
0.0018100738525390625,
-0.01434326171875,
-0.043701171875,
-0.00780487060546875,
-0.034149169921875,
0.043121337890625,
0.044036865234375,
-0.03173828125,
-0.0296630859375,
0.0004916191101074219,
-0.0139312744140625,
0.0221405029296875,
-0.01540374755859375,
0.0260772705078125,
-0.031524658203125,
0.0026187896728515625,
0.0025234222412109375,
-0.0247039794921875,
0.001743316650390625,
-0.01364898681640625,
-0.047576904296875,
-0.006412506103515625,
-0.0186614990234375,
0.0277252197265625,
0.022918701171875,
-0.03717041015625,
-0.03460693359375,
-0.0263214111328125,
-0.021759033203125,
-0.01175689697265625,
-0.01018524169921875,
0.004932403564453125,
-0.01482391357421875,
-0.02728271484375,
0.0285797119140625,
-0.0037136077880859375,
0.00589752197265625,
-0.007175445556640625,
0.06536865234375,
0.018341064453125,
-0.018829345703125,
-0.01515960693359375,
0.0264739990234375,
0.037567138671875,
0.07623291015625,
-0.0154266357421875,
0.00911712646484375,
-0.034423828125,
-0.01910400390625,
0.0592041015625,
-0.02020263671875,
0.000980377197265625,
0.01024627685546875,
0.0007944107055664062,
-0.04034423828125,
0.017822265625,
-0.0025081634521484375,
0.006572723388671875,
0.0252227783203125,
-0.0090179443359375,
-0.0576171875,
-0.026763916015625,
0.04254150390625,
-0.00875091552734375,
0.05804443359375,
-0.0026149749755859375,
-0.039764404296875,
0.0058746337890625,
-0.0034999847412109375,
0.0301361083984375,
0.037872314453125,
-0.027374267578125,
0.04095458984375,
0.017364501953125,
-0.02703857421875,
-0.0003170967102050781,
-0.0276031494140625,
0.0027256011962890625,
-0.01238250732421875,
0.0231475830078125,
-0.03192138671875,
0.0016536712646484375,
-0.01520538330078125,
0.0572509765625,
0.0018720626831054688,
-0.0540771484375,
0.0034770965576171875,
-0.01145172119140625,
-0.004596710205078125,
0.032562255859375,
-0.0162506103515625,
0.08563232421875,
0.021392822265625,
-0.0234222412109375,
-0.01113128662109375,
-0.06097412109375,
-0.0199432373046875,
-0.0718994140625,
-0.02081298828125,
-0.0146942138671875,
-0.023284912109375,
0.0218658447265625,
-0.0152130126953125,
0.017364501953125,
-0.0191192626953125,
-0.0167083740234375,
0.043426513671875,
0.01056671142578125,
-0.01513671875,
0.0282440185546875,
0.00846099853515625,
0.02142333984375,
-0.059112548828125,
0.0031795501708984375,
0.016937255859375,
0.0249481201171875,
-0.0103302001953125,
0.0005049705505371094,
0.0224456787109375,
0.00972747802734375,
0.021636962890625,
-0.033233642578125,
-0.0183258056640625,
0.0179595947265625,
-0.0020923614501953125,
-0.01335906982421875,
-0.0233306884765625,
0.007457733154296875,
0.04742431640625,
0.007190704345703125,
-0.004913330078125,
0.0053558349609375,
-0.01337432861328125,
-0.0023632049560546875,
0.053924560546875,
-0.034637451171875,
-0.0071563720703125,
-0.001220703125,
0.0423583984375,
-0.024383544921875,
-0.00553131103515625,
-0.058837890625,
0.00396728515625,
-0.02777099609375,
0.01561737060546875,
0.055328369140625,
-0.0292816162109375,
0.00954437255859375,
-0.0301666259765625,
0.00335693359375,
-0.0258331298828125,
-0.002105712890625,
0.054443359375,
0.0285491943359375,
-0.039642333984375,
-0.0194244384765625,
-0.03472900390625,
-0.019439697265625,
-0.040252685546875,
-0.036712646484375,
-0.030975341796875,
0.0199737548828125,
-0.0018663406372070312,
0.0146636962890625,
-0.038421630859375,
-0.04364013671875,
-0.0144195556640625,
0.016448974609375,
0.026153564453125,
0.004459381103515625,
0.01271820068359375,
0.022796630859375,
-0.00830078125,
0.08245849609375,
0.023590087890625,
-0.01436614990234375,
-0.057464599609375,
-0.0255584716796875,
-0.005634307861328125,
-0.0110015869140625,
0.00711822509765625,
-0.0155792236328125,
0.013824462890625,
-0.0017976760864257812,
0.0305633544921875,
0.00832366943359375,
-0.01201629638671875,
-0.03302001953125,
-0.004238128662109375,
-0.0162353515625,
0.0806884765625,
-0.0034122467041015625,
-0.0360107421875,
0.04571533203125,
-0.022796630859375,
-0.0303192138671875,
-0.004711151123046875,
-0.03240966796875,
0.0149078369140625,
0.0199127197265625,
0.009033203125,
-0.021240234375,
-0.0148773193359375,
0.01258087158203125,
0.02154541015625,
0.018341064453125,
0.04095458984375,
0.012786865234375,
0.04705810546875,
0.0180511474609375,
-0.043853759765625,
0.0026264190673828125,
0.04888916015625,
0.04193115234375,
-0.0162353515625,
-0.00009459257125854492,
0.0447998046875,
-0.0228118896484375,
0.005126953125,
0.02532958984375,
0.0333251953125,
-0.040008544921875,
0.006359100341796875,
-0.00958251953125,
0.005496978759765625,
0.0416259765625,
0.00750732421875,
-0.048004150390625,
-0.0906982421875,
0.01319122314453125,
-0.0245819091796875,
-0.0186767578125,
-0.01215362548828125,
-0.008697509765625,
-0.0216522216796875,
0.0037975311279296875,
0.019378662109375,
0.022125244140625,
-0.0092315673828125,
0.0197906494140625,
-0.00849151611328125,
0.031219482421875,
-0.0004572868347167969,
0.01113128662109375,
0.0252685546875,
-0.0290679931640625,
-0.030731201171875,
0.042266845703125,
-0.00983428955078125,
-0.0169525146484375,
0.024322509765625,
-0.01678466796875,
0.040435791015625,
0.025604248046875,
-0.004650115966796875,
-0.0196533203125,
0.005992889404296875,
0.00994110107421875,
-0.0003845691680908203,
-0.01367950439453125,
0.004901885986328125,
0.0163116455078125,
-0.007030487060546875,
0.0152587890625,
-0.0001285076141357422,
-0.011474609375,
-0.01529693603515625,
0.007312774658203125,
0.0899658203125,
-0.025390625,
-0.0200653076171875,
0.0145111083984375,
0.052642822265625,
-0.006916046142578125,
-0.0171661376953125,
0.011993408203125,
-0.0304412841796875,
0.00592803955078125,
-0.00307464599609375,
-0.01415252685546875,
-0.0198516845703125,
-0.0182647705078125,
-0.040771484375,
0.11669921875,
0.0186004638671875,
-0.02044677734375,
-0.01390838623046875,
0.06915283203125,
-0.031951904296875,
0.03936767578125,
0.007282257080078125,
0.0587158203125,
-0.0673828125,
-0.0017061233520507812,
-0.04400634765625,
0.00276947021484375,
-0.006450653076171875,
0.031829833984375,
0.07171630859375,
0.028411865234375,
-0.07073974609375,
-0.0035800933837890625,
0.0308990478515625,
0.0021877288818359375,
-0.008636474609375,
0.0892333984375,
0.01554107666015625,
0.0069122314453125,
0.01175689697265625,
-0.008392333984375,
0.054168701171875,
-0.08441162109375,
-0.00516510009765625,
0.012176513671875,
0.006008148193359375,
0.00640106201171875,
-0.0278472900390625,
0.04620361328125,
0.0316162109375,
-0.0280303955078125,
-0.027252197265625,
0.03643798828125,
0.055084228515625,
-0.01519775390625,
0.0157928466796875,
0.0567626953125,
0.0251312255859375,
0.01119232177734375,
0.033935546875,
0.00824737548828125,
-0.013946533203125,
0.00417327880859375,
0.00394439697265625,
0.00531768798828125,
-0.01200103759765625,
-0.0191650390625,
0.005649566650390625,
0.006671905517578125,
0.0028972625732421875,
0.00623321533203125,
0.0253143310546875,
-0.0242919921875,
0.00444793701171875,
0.041351318359375,
0.0166778564453125,
-0.010467529296875,
-0.0273590087890625,
0.01922607421875,
0.007549285888671875,
-0.0030193328857421875,
-0.0165863037109375,
-0.0203094482421875,
-0.06121826171875,
-0.01268768310546875,
0.0110626220703125,
-0.036834716796875,
-0.0223236083984375,
-0.020172119140625,
-0.002880096435546875,
0.0252685546875,
0.064453125,
-0.0119781494140625,
-0.044158935546875,
0.08624267578125,
0.0196533203125,
-0.030426025390625,
-0.0689697265625,
0.051788330078125,
0.08056640625,
0.038848876953125,
-0.01279449462890625,
0.032806396484375,
-0.0112152099609375,
0.0215301513671875,
-0.055816650390625,
-0.0858154296875,
0.018890380859375,
0.05303955078125,
-0.011474609375,
-0.026275634765625,
0.0265960693359375,
0.04022216796875,
-0.04925537109375,
-0.0323486328125,
0.0204315185546875,
-0.0218658447265625,
-0.01268768310546875,
-0.0174407958984375,
0.018280029296875,
0.020965576171875,
-0.00505828857421875,
-0.01406097412109375,
0.0284423828125,
0.042938232421875,
-0.0362548828125,
0.03765869140625,
0.0038585662841796875,
-0.01953125,
0.026153564453125,
-0.031707763671875,
0.0205535888671875,
-0.01253509521484375,
0.01064300537109375,
-0.00780487060546875,
-0.01483154296875,
0.0012102127075195312,
0.0003275871276855469,
0.01337432861328125,
-0.007617950439453125,
0.045623779296875,
0.0207977294921875,
-0.01983642578125,
0.01934814453125,
-0.029754638671875,
0.03155517578125,
-0.00672149658203125,
-0.01006317138671875,
-0.0009002685546875,
-0.01384735107421875,
-0.0228424072265625,
-0.0391845703125,
0.07171630859375,
0.056304931640625,
0.08447265625,
-0.040771484375,
0.051300048828125,
0.049072265625,
-0.050140380859375,
0.0462646484375,
0.04150390625,
-0.0260009765625,
-0.054473876953125,
-0.03192138671875,
0.0002906322479248047,
-0.0191192626953125,
0.0278167724609375,
0.007625579833984375,
-0.0098419189453125,
-0.01690673828125,
-0.0112457275390625,
0.017578125,
0.048095703125,
0.0296630859375,
-0.023529052734375,
-0.0225372314453125,
0.01078033447265625,
0.00733184814453125,
-0.007381439208984375,
-0.0243682861328125,
-0.0164947509765625,
0.025299072265625,
0.01776123046875,
0.0278167724609375,
-0.005809783935546875,
0.0190887451171875,
-0.0154876708984375,
0.0244903564453125,
-0.0268707275390625,
0.006183624267578125,
-0.03387451171875,
-0.031646728515625,
0.0124359130859375,
-0.0110321044921875,
0.01488494873046875,
-0.01204681396484375,
-0.0273590087890625,
0.008392333984375,
0.0380859375,
0.0195770263671875,
-0.035186767578125,
0.0139007568359375,
0.0241241455078125,
-0.007717132568359375,
0.0281982421875,
0.007160186767578125,
-0.04974365234375,
-0.0703125,
0.0287933349609375,
0.014678955078125,
-0.0229034423828125,
-0.023284912109375,
-0.059906005859375,
-0.0159149169921875,
0.01180267333984375,
-0.01108551025390625,
-0.03460693359375,
-0.00835418701171875,
-0.0036258697509765625,
0.046142578125,
-0.043853759765625,
-0.03656005859375,
-0.01383209228515625,
0.0118865966796875,
0.0192413330078125,
-0.042816162109375,
-0.04083251953125,
0.061614990234375,
-0.0180511474609375,
-0.00200653076171875,
0.0175018310546875,
-0.007480621337890625,
-0.05230712890625,
-0.01512908935546875,
0.007259368896484375,
0.0208587646484375,
-0.0091552734375,
-0.029693603515625,
0.047454833984375,
-0.031036376953125,
0.009185791015625,
-0.07147216796875,
-0.0228271484375,
-0.064208984375,
0.03448486328125,
-0.0242919921875,
-0.003223419189453125,
0.0014448165893554688,
-0.04486083984375,
-0.0574951171875,
0.03997802734375,
0.0020847320556640625,
-0.034423828125,
-0.0830078125,
-0.0201873779296875,
0.0018587112426757812,
0.01107025146484375,
-0.03790283203125,
-0.0150604248046875,
-0.060302734375,
0.06939697265625,
-0.00643157958984375,
0.0225067138671875,
0.0023708343505859375,
-0.0020294189453125,
0.0006232261657714844,
0.0137786865234375,
0.02313232421875,
-0.041839599609375,
-0.0249176025390625,
0.0207061767578125,
0.0162353515625,
0.030609130859375,
-0.001010894775390625,
0.011199951171875,
0.035400390625,
-0.03125,
-0.00324249267578125,
-0.040435791015625,
-0.043853759765625,
-0.006366729736328125,
0.10052490234375,
0.05731201171875,
0.03472900390625,
-0.04730224609375,
0.0232391357421875,
-0.002986907958984375,
-0.040313720703125,
-0.00853729248046875,
0.02337646484375,
-0.0677490234375,
-0.0253753662109375,
0.0082550048828125,
0.02008056640625,
0.01168060302734375,
-0.01459503173828125,
0.013641357421875,
-0.0196990966796875,
0.02301025390625,
0.01448822021484375,
-0.0223388671875,
-0.0186920166015625,
0.01348876953125,
0.01010894775390625,
0.06280517578125,
0.0030307769775390625,
0.0006852149963378906,
0.05255126953125,
0.129150390625,
0.041290283203125,
0.060272216796875,
-0.06561279296875,
-0.01126861572265625,
0.022308349609375,
0.01189422607421875,
-0.0201568603515625,
-0.033935546875,
-0.037811279296875,
0.0186614990234375,
0.0213775634765625,
0.0176239013671875,
-0.03814697265625,
0.04766845703125,
0.035980224609375,
0.07861328125,
-0.017669677734375,
-0.0672607421875,
-0.013336181640625,
0.01220703125,
-0.046722412109375,
0.0184326171875,
-0.00821685791015625,
-0.031768798828125,
0.0259552001953125,
-0.01143646240234375,
0.07110595703125,
-0.02032470703125,
0.03179931640625,
-0.07257080078125,
0.0023250579833984375,
0.02117919921875
] |
8dfc6c876eafb88c3a94033b3ad2b6770c4ba757
|
Wordpress Stackexchange
Q: How to change ?lang=cn into /cn/ I'm trying to add languages to my wordpress driven website and i installed xili-languages plugin. Unfortunately it uses lang param to differentiate between languages and i rather have seen something like http://domain.com/cn/article-in-chinese/ rather than http://domain.com/article-in-chinese/?lang=cn
A: Set permalink to (Post Name)
or
http://www.example.com/[blog_name]`/%post_id%/%postname%/`
Add following code to functions.php of your theme:
add_filter ( 'alias_rule', 'xili_language_trans_slug_qv' ) ;
function xl_permalinks_init () {
global $XL_Permalinks_rules;
if (class_exists('XL_Permalinks_rules') ) {
$XL_Permalinks_rules = new XL_Permalinks_rules ();
add_permastruct ( 'language', '%lang%', true, 1 );
add_permastruct ( 'language', '%lang%', array('with_front' => false) );
}
}
|
Q: How to change ?lang=cn into /cn/ I'm trying to add languages to my wordpress driven website and i installed xili-languages plugin. Unfortunately it uses lang param to differentiate between languages and i rather have seen something like http://domain.com/cn/article-in-chinese/ rather than http://domain.com/article-in-chinese/?lang=cn
A: Set permalink to (Post Name)
or
http://www.example.com/[blog_name]`/%post_id%/%postname%/`
Add following code to functions.php of your theme:
add_filter ( 'alias_rule', 'xili_language_trans_slug_qv' ) ;
function xl_permalinks_init () {
global $XL_Permalinks_rules;
if (class_exists('XL_Permalinks_rules') ) {
$XL_Permalinks_rules = new XL_Permalinks_rules ();
add_permastruct ( 'language', '%lang%', true, 1 );
add_permastruct ( 'language', '%lang%', array('with_front' => false) );
}
}
A: You would like to write:
http://domain.com/cn/article-in-chinese/
so that wordpress understand :
http://domain.com/article-in-chinese/?lang=cn.
I think it will be easier to use http://domain.com/article-in-chinese/lang/cn/. You need to write a new rule and a new tag in WP rewrite rules (Wordpress write those rules in your htaccess) with the functions add_rewrite_rules() and add_rewrite_tag().
|
wordpress
|
{
"language": "en",
"length": 146,
"provenance": "stackexchange_00019.jsonl.gz:428365",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83463"
}
|
[
0.0013561248779296875,
0.002300262451171875,
-0.0352783203125,
0.0239105224609375,
-0.016998291015625,
-0.041748046875,
0.011260986328125,
-0.0251922607421875,
0.002689361572265625,
-0.01172637939453125,
0.019012451171875,
-0.0196990966796875,
-0.0102996826171875,
-0.05804443359375,
0.038177490234375,
-0.01175689697265625,
0.0125732421875,
0.00555419921875,
0.01548004150390625,
-0.021575927734375,
0.01012420654296875,
-0.0255126953125,
0.03228759765625,
0.02471923828125,
0.0447998046875,
-0.059173583984375,
0.05877685546875,
-0.056365966796875,
0.015655517578125,
-0.0506591796875,
0.019500732421875,
0.03863525390625,
0.00940704345703125,
0.01132965087890625,
-0.01708984375,
-0.00307464599609375,
0.00016582012176513672,
0.0105743408203125,
-0.0026493072509765625,
0.015899658203125,
0.0509033203125,
-0.03790283203125,
-0.030609130859375,
0.072265625,
-0.01494598388671875,
-0.039764404296875,
0.044403076171875,
-0.049591064453125,
0.0216064453125,
-0.0134735107421875,
0.00146484375,
0.0125274658203125,
0.006809234619140625,
-0.01280975341796875,
-0.01526641845703125,
0.0107269287109375,
-0.0443115234375,
0.053497314453125,
0.0023708343505859375,
0.0391845703125,
-0.004405975341796875,
0.03656005859375,
-0.0271148681640625,
-0.00829315185546875,
-0.01483917236328125,
-0.004451751708984375,
0.060760498046875,
-0.00130462646484375,
-0.0711669921875,
-0.016845703125,
0.047515869140625,
-0.012176513671875,
-0.0016660690307617188,
-0.036285400390625,
-0.00876617431640625,
0.01404571533203125,
-0.0252532958984375,
-0.03350830078125,
0.0186004638671875,
-0.00897216796875,
-0.0178985595703125,
0.0006384849548339844,
0.015777587890625,
-0.0265045166015625,
-0.0019435882568359375,
0.0003254413604736328,
-0.030670166015625,
0.0006117820739746094,
-0.058807373046875,
-0.04547119140625,
-0.03173828125,
-0.0440673828125,
-0.071044921875,
0.0157012939453125,
0.01318359375,
-0.0134124755859375,
-0.017578125,
0.00911712646484375,
-0.006458282470703125,
0.0355224609375,
0.0018787384033203125,
-0.0450439453125,
0.0496826171875,
-0.041961669921875,
0.0016803741455078125,
-0.002227783203125,
-0.003795623779296875,
0.0231475830078125,
0.05963134765625,
0.033477783203125,
0.0160675048828125,
0.06829833984375,
-0.0171966552734375,
-0.0361328125,
-0.0027713775634765625,
0.03253173828125,
-0.032470703125,
0.034576416015625,
0.01507568359375,
0.03594970703125,
-0.006744384765625,
0.03558349609375,
-0.0264739990234375,
0.001514434814453125,
0.01218414306640625,
-0.01303863525390625,
0.0008502006530761719,
-0.0152740478515625,
-0.007122039794921875,
0.0194091796875,
-0.007427215576171875,
-0.017791748046875,
-0.002086639404296875,
0.06341552734375,
0.01047515869140625,
-0.006946563720703125,
0.0213470458984375,
0.033660888671875,
0.009857177734375,
-0.040252685546875,
0.0684814453125,
-0.025726318359375,
-0.0201568603515625,
0.058837890625,
-0.0157318115234375,
0.0142974853515625,
0.0272216796875,
0.0178680419921875,
-0.0189056396484375,
-0.05072021484375,
0.001636505126953125,
-0.01934814453125,
0.059173583984375,
-0.03192138671875,
-0.03912353515625,
-0.0286102294921875,
-0.007472991943359375,
-0.01427459716796875,
-0.03143310546875,
-0.02032470703125,
-0.03985595703125,
-0.00681304931640625,
0.056854248046875,
-0.06011962890625,
-0.048004150390625,
-0.00014412403106689453,
-0.053466796875,
0.006839752197265625,
0.006687164306640625,
-0.029296875,
0.00588226318359375,
0.0166015625,
-0.00806427001953125,
-0.01047515869140625,
0.0170745849609375,
-0.00945281982421875,
-0.021453857421875,
0.0462646484375,
-0.00960540771484375,
0.0518798828125,
0.054412841796875,
-0.035888671875,
0.028472900390625,
0.0310516357421875,
-0.0204925537109375,
-0.022125244140625,
0.0238494873046875,
0.018402099609375,
0.0105133056640625,
0.00904083251953125,
0.0238037109375,
-0.01806640625,
-0.044891357421875,
0.0280303955078125,
-0.0170440673828125,
-0.0286102294921875,
0.011932373046875,
0.0011129379272460938,
-0.008636474609375,
-0.002040863037109375,
0.0243988037109375,
0.0197296142578125,
-0.03387451171875,
0.0163116455078125,
-0.06036376953125,
-0.011627197265625,
-0.0102691650390625,
0.0291748046875,
0.03643798828125,
0.039581298828125,
-0.00371551513671875,
0.03265380859375,
-0.01267242431640625,
-0.062744140625,
-0.03460693359375,
0.036895751953125,
-0.012298583984375,
0.017791748046875,
0.0008130073547363281,
0.0274658203125,
0.041473388671875,
-0.0230865478515625,
0.0243072509765625,
0.0202178955078125,
-0.00446319580078125,
0.0096435546875,
-0.01239776611328125,
0.004840850830078125,
0.0064239501953125,
0.0003211498260498047,
0.0084075927734375,
0.01470184326171875,
-0.01474761962890625,
-0.033782958984375,
-0.0102996826171875,
0.0275421142578125,
-0.000004231929779052734,
-0.05462646484375,
-0.01189422607421875,
0.041839599609375,
0.043060302734375,
0.0131072998046875,
-0.0037403106689453125,
-0.037689208984375,
0.0170745849609375,
-0.04931640625,
0.01641845703125,
-0.03173828125,
0.00595855712890625,
0.0188140869140625,
-0.0207061767578125,
0.01715087890625,
0.0284271240234375,
-0.0161590576171875,
0.0122833251953125,
0.05511474609375,
-0.01445770263671875,
-0.055419921875,
0.0191497802734375,
-0.01250457763671875,
0.032562255859375,
-0.008575439453125,
-0.05859375,
0.0254974365234375,
-0.0096893310546875,
-0.0421142578125,
-0.04449462890625,
-0.03253173828125,
-0.008636474609375,
-0.01166534423828125,
0.044281005859375,
-0.0155181884765625,
0.0135498046875,
0.00472259521484375,
-0.0423583984375,
-0.041748046875,
0.00136566162109375,
0.0220794677734375,
-0.017120361328125,
-0.021148681640625,
-0.0018157958984375,
0.02960205078125,
0.017669677734375,
-0.01351165771484375,
-0.0152435302734375,
-0.055877685546875,
0.000023186206817626953,
0.001651763916015625,
-0.040557861328125,
-0.044891357421875,
0.0032863616943359375,
0.01305389404296875,
-0.0291900634765625,
0.0214385986328125,
-0.006626129150390625,
-0.0345458984375,
0.050750732421875,
-0.028411865234375,
0.0216522216796875,
-0.0288543701171875,
0.043914794921875,
0.046356201171875,
0.0189971923828125,
-0.034637451171875,
0.01316070556640625,
-0.01910400390625,
-0.000029802322387695312,
-0.0009436607360839844,
-0.0187530517578125,
0.0008130073547363281,
-0.05078125,
0.0222015380859375,
0.0027027130126953125,
-0.0189666748046875,
-0.01548004150390625,
-0.05548095703125,
-0.03387451171875,
-0.0272979736328125,
-0.114501953125,
-0.0750732421875,
0.01543426513671875,
-0.01245880126953125,
0.031585693359375,
0.01384735107421875,
0.00791168212890625,
-0.045074462890625,
0.0186920166015625,
-0.00634765625,
0.0154571533203125,
-0.0002624988555908203,
-0.0357666015625,
-0.031494140625,
-0.05694580078125,
-0.034149169921875,
-0.001216888427734375,
-0.0121002197265625,
0.017425537109375,
-0.024169921875,
-0.01214599609375,
-0.031463623046875,
0.01136016845703125,
0.06256103515625,
-0.00870513916015625,
-0.0162811279296875,
0.004611968994140625,
-0.0269317626953125,
0.00800323486328125,
-0.015350341796875,
0.030609130859375,
0.057342529296875,
-0.0347900390625,
0.0185699462890625,
0.01001739501953125,
-0.01300048828125,
0.03851318359375,
-0.045562744140625,
-0.026641845703125,
0.02374267578125,
0.00263214111328125,
-0.03753662109375,
-0.01318359375,
0.001781463623046875,
-0.036651611328125,
0.058013916015625,
0.00876617431640625,
-0.017913818359375,
0.0257720947265625,
0.0015001296997070312,
-0.01544952392578125,
-0.0030689239501953125,
0.04644775390625,
-0.033721923828125,
0.0014209747314453125,
-0.00839996337890625,
-0.0167083740234375,
-0.0167694091796875,
0.05419921875,
-0.0008745193481445312,
0.01354217529296875,
0.0269622802734375,
0.01247406005859375,
0.0112152099609375,
-0.00452423095703125,
-0.0218658447265625,
0.015777587890625,
0.0166473388671875,
-0.06842041015625,
0.0012969970703125,
0.0047454833984375,
-0.0081329345703125,
-0.0243072509765625,
0.01473236083984375,
-0.0292510986328125,
-0.0138092041015625,
0.008758544921875,
0.0122833251953125,
-0.0367431640625,
-0.0240325927734375,
-0.050689697265625,
-0.00914764404296875,
-0.037628173828125,
0.01166534423828125,
-0.0003936290740966797,
0.0008120536804199219,
-0.031524658203125,
0.056365966796875,
-0.0110321044921875,
-0.021087646484375,
0.0255279541015625,
0.0015506744384765625,
-0.02386474609375,
0.02154541015625,
-0.0144500732421875,
-0.008392333984375,
-0.029632568359375,
0.022979736328125,
-0.0361328125,
-0.0088958740234375,
-0.024322509765625,
0.05352783203125,
0.034759521484375,
-0.056121826171875,
0.01294708251953125,
0.05670166015625,
0.03729248046875,
-0.0107879638671875,
0.03448486328125,
-0.005954742431640625,
0.0027942657470703125,
0.00725555419921875,
0.02490234375,
-0.028961181640625,
0.02166748046875,
0.0255126953125,
-0.05157470703125,
0.043304443359375,
-0.0037822723388671875,
0.025604248046875,
0.054779052734375,
-0.0653076171875,
-0.08221435546875,
-0.04217529296875,
0.0050201416015625,
0.00778961181640625,
-0.01233673095703125,
0.0142974853515625,
-0.0267791748046875,
-0.07598876953125,
0.0167083740234375,
-0.003814697265625,
0.005832672119140625,
-0.0018301010131835938,
0.025665283203125,
0.0031414031982421875,
-0.025146484375,
-0.02545166015625,
0.04345703125,
0.034820556640625,
-0.044189453125,
0.056060791015625,
0.030517578125,
-0.01532745361328125,
0.065673828125,
-0.01392364501953125,
0.005157470703125,
0.042266845703125,
-0.04534912109375,
0.0110931396484375,
-0.0298614501953125,
0.01947021484375,
0.016082763671875,
-0.023345947265625,
0.037384033203125,
0.017974853515625,
-0.0136871337890625,
0.004894256591796875,
0.01715087890625,
-0.002498626708984375,
-0.0083465576171875,
-0.0165557861328125,
-0.05279541015625,
0.04156494140625,
-0.005733489990234375,
-0.00948333740234375,
-0.03985595703125,
0.0238800048828125,
-0.0200347900390625,
-0.01467132568359375,
-0.0035610198974609375,
0.0008525848388671875,
0.013824462890625,
0.011260986328125,
0.032257080078125,
0.00804901123046875,
-0.0084686279296875,
-0.0209503173828125,
-0.0152740478515625,
0.045501708984375,
0.030670166015625,
-0.020050048828125,
0.01181793212890625,
-0.0016565322875976562,
0.0157470703125,
-0.00467681884765625,
0.006381988525390625,
0.00225830078125,
-0.029449462890625,
-0.0111236572265625,
0.01413726806640625,
0.0300140380859375,
-0.0567626953125,
-0.01325225830078125,
-0.0145111083984375,
0.0106048583984375,
-0.01605224609375,
0.0130157470703125,
0.05279541015625,
0.0197906494140625,
0.014129638671875,
-0.0252227783203125,
-0.031341552734375,
-0.014129638671875,
0.041259765625,
0.0167083740234375,
0.0024871826171875,
-0.0220184326171875,
0.0526123046875,
0.03460693359375,
-0.001068115234375,
0.02197265625,
-0.0042724609375,
0.004451751708984375,
-0.01104736328125,
-0.026580810546875,
0.036346435546875,
-0.026336669921875,
-0.03204345703125,
0.006683349609375,
0.0029811859130859375,
-0.0018367767333984375,
-0.029205322265625,
-0.01001739501953125,
0.0277557373046875,
0.0179901123046875,
-0.0017709732055664062,
-0.0015344619750976562,
-0.02593994140625,
-0.01593017578125,
0.0601806640625,
-0.0426025390625,
0.003078460693359375,
-0.0006847381591796875,
-0.01715087890625,
0.00954437255859375,
0.00787353515625,
-0.038726806640625,
-0.0526123046875,
0.005283355712890625,
0.0238037109375,
0.01263427734375,
0.0288543701171875,
0.08123779296875,
-0.005039215087890625,
-0.07080078125,
0.0660400390625,
0.005176544189453125,
-0.0032634735107421875,
-0.049102783203125,
0.0032100677490234375,
-0.029022216796875,
0.0028133392333984375,
-0.01366424560546875,
0.051544189453125,
0.005611419677734375,
-0.005031585693359375,
-0.0015192031860351562,
0.025054931640625,
0.00409698486328125,
-0.0338134765625,
-0.038330078125,
-0.0186767578125,
0.03021240234375,
0.048675537109375,
0.018890380859375,
-0.00609588623046875,
0.0672607421875,
-0.02490234375,
0.021942138671875,
-0.0038776397705078125,
0.043121337890625,
-0.00019609928131103516,
-0.0175628662109375,
0.01904296875,
0.01201629638671875,
-0.00588226318359375,
0.01181793212890625,
-0.0301361083984375,
-0.06439208984375,
0.026031494140625,
-0.004848480224609375,
0.0007243156433105469,
-0.0157928466796875,
0.026092529296875,
-0.025665283203125,
-0.0282745361328125,
-0.057037353515625,
-0.0214385986328125,
-0.01166534423828125,
-0.02081298828125,
0.015594482421875,
0.0022106170654296875,
-0.007114410400390625,
0.0231475830078125,
-0.0032196044921875,
0.01629638671875,
0.012176513671875,
-0.0184478759765625,
0.0175933837890625,
0.056915283203125,
0.041168212890625,
0.0433349609375,
0.018829345703125,
0.036376953125,
-0.0352783203125,
-0.015228271484375,
0.0245208740234375,
0.0438232421875,
0.0260009765625,
-0.0198974609375,
0.020660400390625,
0.01224517822265625,
-0.0045928955078125,
-0.0017194747924804688,
0.09906005859375,
0.07025146484375,
-0.10321044921875,
-0.0180206298828125,
0.022430419921875,
-0.029876708984375,
-0.0244598388671875,
0.0009984970092773438,
-0.00623321533203125,
0.005764007568359375,
0.028076171875,
-0.021728515625,
-0.0184326171875,
0.0298004150390625,
0.0023937225341796875,
-0.004886627197265625,
0.01163482666015625,
0.0035495758056640625,
0.004009246826171875,
-0.00936126708984375,
-0.033935546875,
0.007373809814453125,
-0.0179290771484375,
-0.03802490234375,
-0.01029205322265625,
0.0294342041015625,
-0.0293426513671875,
-0.06781005859375,
0.0285491943359375,
-0.0291900634765625,
-0.005157470703125,
0.0372314453125,
-0.0382080078125,
0.0404052734375,
0.048095703125,
-0.0294647216796875,
0.01294708251953125,
0.0066986083984375,
-0.01413726806640625,
0.0347900390625,
-0.032928466796875,
0.0148468017578125,
0.0296478271484375,
-0.037384033203125,
0.019561767578125,
0.01284027099609375,
-0.028778076171875,
0.0212249755859375,
-0.0133209228515625,
0.017364501953125,
-0.01654052734375,
-0.0264129638671875,
0.00850677490234375,
-0.060821533203125,
0.00917816162109375,
-0.01129150390625,
-0.030242919921875,
-0.07421875,
-0.061431884765625,
-0.0188446044921875,
-0.08123779296875,
0.0209808349609375,
-0.007534027099609375,
-0.07025146484375,
0.05810546875,
-0.003383636474609375,
0.029815673828125,
0.0142364501953125,
0.01503753662109375,
-0.039703369140625,
-0.024993896484375,
-0.021636962890625,
0.0271148681640625,
0.014068603515625,
-0.00495147705078125,
-0.0275421142578125,
0.0014591217041015625,
-0.00031566619873046875,
0.034454345703125,
0.0281524658203125,
0.005054473876953125,
-0.01788330078125,
0.006664276123046875,
0.04620361328125,
0.0175323486328125,
0.0117034912109375,
0.0181884765625,
-0.023406982421875,
0.08758544921875,
0.03466796875,
-0.055694580078125,
0.02630615234375,
0.0155487060546875,
-0.07794189453125,
0.01245880126953125,
0.0007863044738769531,
-0.00876617431640625,
-0.00824737548828125,
-0.01202392578125,
-0.04437255859375,
0.01053619384765625,
0.0237579345703125,
0.00872802734375,
0.053131103515625,
-0.017974853515625,
0.0245513916015625,
-0.041107177734375,
-0.00251007080078125,
-0.0089263916015625,
0.042572021484375,
-0.00888824462890625,
0.048095703125,
0.037750244140625,
0.039642333984375,
0.0211334228515625,
-0.0288848876953125,
0.024749755859375,
0.00238037109375,
-0.044769287109375,
0.033233642578125,
0.062042236328125,
0.06658935546875,
0.03643798828125,
-0.0095062255859375,
0.005542755126953125,
0.04376220703125,
-0.01207733154296875,
-0.07354736328125,
0.0030155181884765625,
-0.01678466796875,
-0.0170745849609375,
0.023345947265625,
-0.017059326171875,
-0.03656005859375,
0.03619384765625,
0.0242767333984375,
-0.00926971435546875,
0.004802703857421875,
0.0212554931640625,
0.00274658203125,
0.02154541015625,
-0.0162811279296875,
0.0153350830078125,
-0.07196044921875,
0.01448822021484375,
0.0193328857421875,
0.0765380859375,
0.0408935546875,
0.049774169921875,
0.021484375,
-0.0270538330078125,
-0.00411224365234375,
0.0264739990234375,
-0.0003619194030761719,
0.0024814605712890625,
-0.021240234375,
-0.038330078125,
0.038360595703125,
0.0273895263671875,
0.027130126953125,
-0.0032444000244140625,
0.039703369140625,
0.025390625,
-0.0227508544921875,
-0.01145172119140625,
-0.03155517578125,
-0.0150909423828125,
0.059234619140625,
-0.0221710205078125,
0.051910400390625,
-0.013427734375,
-0.019744873046875,
-0.037750244140625,
0.0411376953125,
0.01027679443359375,
-0.01910400390625,
0.039520263671875,
-0.0036678314208984375,
-0.031982421875,
0.0386962890625,
-0.00035119056701660156,
0.087890625,
0.007701873779296875,
-0.01068115234375,
0.0218963623046875,
-0.039642333984375,
-0.08697509765625,
0.029815673828125,
0.048309326171875,
-0.01035308837890625,
0.0029735565185546875,
-0.020965576171875,
-0.0053863525390625,
0.0130157470703125,
-0.0002524852752685547,
-0.00508880615234375,
0.034820556640625,
0.032257080078125,
0.004638671875,
-0.020904541015625,
-0.026031494140625,
-0.01187896728515625,
0.0589599609375,
0.00852203369140625,
0.031494140625,
-0.010986328125,
0.032379150390625,
-0.031097412109375,
-0.0296630859375,
0.0042724609375,
-0.02020263671875,
0.039337158203125,
0.0008778572082519531,
-0.01361846923828125,
-0.0034027099609375,
-0.0010347366333007812,
-0.00955963134765625,
0.011749267578125,
-0.0535888671875,
-0.0011701583862304688,
-0.0726318359375,
0.0215911865234375,
-0.015869140625,
0.04254150390625,
-0.036773681640625,
-0.10406494140625,
-0.101806640625,
0.03533935546875,
0.0035190582275390625,
0.025970458984375,
-0.07257080078125,
0.032806396484375,
-0.0248870849609375,
-0.030181884765625,
0.0360107421875,
-0.0401611328125,
0.01070404052734375,
0.0266876220703125,
-0.02728271484375,
-0.03387451171875,
0.040435791015625,
-0.01250457763671875,
0.026092529296875,
-0.00835418701171875,
0.0828857421875,
0.00616455078125,
-0.03582763671875,
-0.0227203369140625,
-0.00739288330078125,
-0.00394439697265625,
-0.034820556640625,
-0.0016326904296875,
-0.019195556640625,
-0.0016632080078125,
0.0328369140625,
0.0213775634765625,
-0.004604339599609375,
-0.0279083251953125,
-0.0046234130859375,
0.02276611328125,
-0.010650634765625,
0.007114410400390625,
-0.0218353271484375,
0.006267547607421875,
0.0343017578125,
-0.0286712646484375,
-0.0001850128173828125,
0.0011281967163085938,
-0.06414794921875,
0.040863037109375,
-0.04107666015625,
-0.016754150390625,
0.01242828369140625,
0.0222320556640625,
-0.047607421875,
-0.01922607421875,
-0.026885986328125,
-0.012969970703125,
-0.03179931640625,
-0.01311492919921875,
0.023590087890625,
0.0223541259765625,
-0.039642333984375,
-0.00646209716796875,
-0.02838134765625,
0.04888916015625,
-0.05255126953125,
-0.0007266998291015625,
0.05328369140625,
-0.005584716796875,
-0.06671142578125,
-0.0758056640625,
0.0274810791015625,
-0.0733642578125,
-0.01251983642578125,
-0.00946807861328125,
-0.0254364013671875,
-0.02520751953125,
-0.0599365234375,
-0.08544921875,
-0.014556884765625,
0.004268646240234375,
-0.046051025390625,
-0.0178680419921875,
0.0526123046875,
-0.015899658203125,
0.017059326171875,
0.0148468017578125,
-0.017547607421875,
0.01190948486328125,
-0.0220489501953125,
0.0282440185546875,
0.028839111328125,
0.0105133056640625,
0.016021728515625,
0.0179443359375,
0.05975341796875,
0.061431884765625,
0.006900787353515625,
0.0235748291015625,
-0.007720947265625,
0.0002472400665283203,
0.0347900390625,
-0.06085205078125,
-0.062286376953125,
-0.04736328125,
0.0184326171875,
-0.0009069442749023438,
-0.06829833984375,
-0.009552001953125,
-0.044921875,
0.06195068359375,
-0.032806396484375,
0.010284423828125,
-0.00469970703125,
0.0206451416015625,
0.0302276611328125,
0.015045166015625,
0.048065185546875,
0.005680084228515625,
-0.01568603515625,
0.000025153160095214844,
0.0032329559326171875,
0.019775390625,
-0.0297698974609375,
0.02947998046875,
-0.01335906982421875,
-0.0298919677734375,
0.01128387451171875,
-0.0294036865234375,
-0.0232391357421875,
0.01279449462890625,
0.062286376953125,
-0.028717041015625,
0.03814697265625,
-0.0016260147094726562,
0.0099945068359375,
0.05206298828125,
0.0278778076171875,
-0.047882080078125,
-0.00962066650390625,
0.0305633544921875,
0.0244140625,
0.0088958740234375,
0.0236358642578125,
0.013519287109375,
0.0170440673828125,
-0.03607177734375,
0.011474609375,
0.01605224609375,
0.026458740234375,
-0.0122528076171875,
-0.0138092041015625,
0.023651123046875,
-0.01861572265625,
-0.0223388671875,
-0.07861328125,
0.0030422210693359375,
-0.0270233154296875,
-0.053863525390625,
0.032958984375,
0.01222991943359375,
-0.0570068359375,
-0.0026187896728515625,
0.0042572021484375,
-0.016632080078125,
-0.06640625,
0.0260467529296875,
0.020599365234375,
0.01751708984375,
0.0286712646484375
] |
6e7a1e36358f89e94ba3186661c4839265a374ae
|
Wordpress Stackexchange
Q: Disallow file edit not preventing plugin install I have a little demo site (admin details are listed publicly), and I've configured the wp-config.php to disallow file edits, so in theory no one can install a theme / plugin.
define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );
Yet lately I've noticed strange plugins & themes being installed on my demo site. I can see in the apache logs that they've been trying to access plugin-install.php but failing with a 500 error.
The folder permissions are 755 on both plugins & themes, so the files can execute but only the user has write access.
Does anyone know how they might be doing it / where I'm going wrong?
Thanks
A: I would convert the site to a subsite on a multi-site instance, you can then have an approved list of plugins and themes. This answer might help more.
You could also create a new user type that does not have access to the plugins/themes areas and only publish those details.
|
Q: Disallow file edit not preventing plugin install I have a little demo site (admin details are listed publicly), and I've configured the wp-config.php to disallow file edits, so in theory no one can install a theme / plugin.
define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );
Yet lately I've noticed strange plugins & themes being installed on my demo site. I can see in the apache logs that they've been trying to access plugin-install.php but failing with a 500 error.
The folder permissions are 755 on both plugins & themes, so the files can execute but only the user has write access.
Does anyone know how they might be doing it / where I'm going wrong?
Thanks
A: I would convert the site to a subsite on a multi-site instance, you can then have an approved list of plugins and themes. This answer might help more.
You could also create a new user type that does not have access to the plugins/themes areas and only publish those details.
|
wordpress
|
{
"language": "en",
"length": 169,
"provenance": "stackexchange_00019.jsonl.gz:428375",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83496"
}
|
[
0.048797607421875,
-0.00415802001953125,
0.017242431640625,
-0.03765869140625,
-0.0058135986328125,
-0.0052337646484375,
-0.004390716552734375,
-0.0268096923828125,
-0.00342559814453125,
0.002410888671875,
-0.0133056640625,
0.0143280029296875,
0.01031494140625,
-0.0232391357421875,
0.02374267578125,
-0.017730712890625,
0.0015878677368164062,
0.004150390625,
0.018768310546875,
-0.010589599609375,
0.0096435546875,
-0.006206512451171875,
0.0186004638671875,
0.003452301025390625,
-0.01617431640625,
0.05096435546875,
0.0634765625,
-0.0294647216796875,
-0.004032135009765625,
-0.025299072265625,
0.01041412353515625,
-0.0233917236328125,
0.0305023193359375,
0.049774169921875,
-0.07659912109375,
-0.034698486328125,
0.0210418701171875,
0.003368377685546875,
-0.00952911376953125,
0.017333984375,
0.0479736328125,
-0.02166748046875,
-0.0219268798828125,
0.05718994140625,
-0.0316162109375,
-0.07440185546875,
0.061065673828125,
-0.01390838623046875,
0.0158538818359375,
-0.03662109375,
-0.0102691650390625,
0.047943115234375,
0.019927978515625,
-0.057861328125,
-0.0201263427734375,
-0.01279449462890625,
-0.0310211181640625,
0.05657958984375,
0.0136871337890625,
-0.00795745849609375,
-0.03082275390625,
0.008148193359375,
0.0135498046875,
-0.004955291748046875,
0.0216522216796875,
-0.0295257568359375,
-0.01006317138671875,
0.046142578125,
-0.06585693359375,
0.0187530517578125,
0.04791259765625,
-0.03765869140625,
0.01326751708984375,
-0.04718017578125,
0.022552490234375,
0.01049041748046875,
-0.00794219970703125,
-0.00833892822265625,
0.00829315185546875,
0.004474639892578125,
-0.0014867782592773438,
-0.034912109375,
0.01471710205078125,
-0.0025959014892578125,
-0.0140838623046875,
0.0184783935546875,
0.006671905517578125,
0.005733489990234375,
-0.014129638671875,
0.0311279296875,
-0.0210723876953125,
0.042022705078125,
0.00994873046875,
0.026092529296875,
-0.03155517578125,
0.03448486328125,
0.0355224609375,
0.042083740234375,
-0.0186920166015625,
0.01385498046875,
0.02252197265625,
-0.043609619140625,
0.0246734619140625,
-0.0292205810546875,
-0.0033817291259765625,
0.04248046875,
-0.003570556640625,
-0.0222930908203125,
0.00177001953125,
0.0213623046875,
0.0088348388671875,
-0.00286865234375,
-0.00980377197265625,
-0.06121826171875,
0.01325225830078125,
0.0323486328125,
-0.018402099609375,
0.01593017578125,
0.0283355712890625,
-0.01294708251953125,
0.00043010711669921875,
0.00914764404296875,
-0.006969451904296875,
-0.0106201171875,
-0.0093841552734375,
-0.031463623046875,
-0.031768798828125,
0.01468658447265625,
-0.0198974609375,
0.030303955078125,
-0.01483154296875,
0.006473541259765625,
0.0229339599609375,
0.035308837890625,
0.007904052734375,
-0.006877899169921875,
0.003421783447265625,
0.01218414306640625,
-0.0268402099609375,
-0.0021572113037109375,
-0.0125274658203125,
0.0287933349609375,
0.050872802734375,
-0.06146240234375,
-0.021697998046875,
0.01093292236328125,
0.00653076171875,
0.02093505859375,
-0.005710601806640625,
-0.020904541015625,
-0.00788116455078125,
-0.029693603515625,
0.03802490234375,
-0.004703521728515625,
-0.01459503173828125,
-0.057037353515625,
0.005664825439453125,
-0.0413818359375,
0.0152587890625,
-0.0423583984375,
0.0026569366455078125,
0.00495147705078125,
0.03240966796875,
-0.01413726806640625,
-0.032989501953125,
-0.0013761520385742188,
-0.0178070068359375,
-0.00925445556640625,
0.0054168701171875,
0.017486572265625,
-0.00890350341796875,
-0.00455474853515625,
0.0014562606811523438,
0.029510498046875,
0.01013946533203125,
0.0192413330078125,
0.030029296875,
-0.00018894672393798828,
0.006275177001953125,
0.088134765625,
0.0249176025390625,
-0.007595062255859375,
0.0421142578125,
-0.00505828857421875,
-0.0599365234375,
-0.01116943359375,
-0.00321197509765625,
0.01122283935546875,
0.0433349609375,
-0.01031494140625,
0.064453125,
-0.00617218017578125,
0.00354766845703125,
-0.003261566162109375,
-0.0021533966064453125,
-0.0379638671875,
-0.006221771240234375,
-0.007068634033203125,
-0.016387939453125,
0.0152740478515625,
0.0009322166442871094,
-0.00728607177734375,
-0.0020294189453125,
-0.036712646484375,
-0.068359375,
-0.028350830078125,
-0.0122528076171875,
0.024993896484375,
0.00441741943359375,
0.033111572265625,
0.005126953125,
0.00006407499313354492,
-0.005035400390625,
-0.005153656005859375,
0.0016813278198242188,
0.004627227783203125,
-0.037353515625,
0.062286376953125,
0.01399993896484375,
0.0440673828125,
0.030242919921875,
-0.057037353515625,
0.043609619140625,
-0.042938232421875,
-0.00875091552734375,
0.0214385986328125,
-0.019287109375,
0.01800537109375,
0.0061798095703125,
0.01503753662109375,
0.05645751953125,
0.0027599334716796875,
0.045166015625,
-0.0101470947265625,
-0.035125732421875,
-0.035400390625,
-0.0330810546875,
-0.15576171875,
0.00975799560546875,
0.09771728515625,
0.018707275390625,
0.0006799697875976562,
-0.037506103515625,
-0.0107269287109375,
0.0220947265625,
-0.038116455078125,
-0.001644134521484375,
-0.0015697479248046875,
0.05572509765625,
0.069580078125,
-0.005390167236328125,
-0.007579803466796875,
0.01453399658203125,
-0.03643798828125,
0.044342041015625,
0.0131988525390625,
-0.01442718505859375,
-0.0263671875,
-0.01361083984375,
0.020263671875,
0.00901031494140625,
0.0211334228515625,
-0.0029010772705078125,
0.007465362548828125,
0.0198211669921875,
-0.0021114349365234375,
0.01934814453125,
0.017608642578125,
-0.02264404296875,
0.006298065185546875,
0.005619049072265625,
-0.017242431640625,
-0.0006341934204101562,
0.030792236328125,
0.025390625,
0.0088653564453125,
-0.0303802490234375,
-0.005458831787109375,
0.040985107421875,
0.01303863525390625,
-0.0533447265625,
-0.051849365234375,
-0.0165252685546875,
-0.015472412109375,
0.02227783203125,
-0.06964111328125,
0.0183868408203125,
-0.046112060546875,
-0.032806396484375,
-0.033477783203125,
-0.007450103759765625,
-0.00579833984375,
-0.040924072265625,
0.01947021484375,
0.021942138671875,
-0.0313720703125,
-0.01177215576171875,
-0.0419921875,
0.0253753662109375,
-0.035003662109375,
0.048675537109375,
0.0726318359375,
-0.005817413330078125,
0.00751495361328125,
0.0200958251953125,
-0.01384735107421875,
-0.0027942657470703125,
0.0145721435546875,
0.006229400634765625,
0.033111572265625,
-0.10321044921875,
-0.021575927734375,
0.016632080078125,
0.00030517578125,
0.0137481689453125,
-0.018585205078125,
-0.01128387451171875,
0.0277099609375,
-0.032867431640625,
-0.00763702392578125,
-0.031768798828125,
-0.064453125,
0.050323486328125,
-0.004344940185546875,
-0.00882720947265625,
-0.0139312744140625,
0.032318115234375,
0.0238189697265625,
-0.055816650390625,
0.0025882720947265625,
0.005496978759765625,
-0.0292205810546875,
-0.042877197265625,
-0.036590576171875,
0.002750396728515625,
0.0184173583984375,
0.0029392242431640625,
0.10546875,
0.0127716064453125,
-0.0455322265625,
0.0236968994140625,
-0.0469970703125,
-0.00977325439453125,
0.044464111328125,
0.01441192626953125,
-0.0027713775634765625,
0.0037555694580078125,
0.02325439453125,
-0.0174102783203125,
0.006069183349609375,
-0.01268768310546875,
-0.038909912109375,
0.00807952880859375,
-0.03704833984375,
0.01332855224609375,
0.0269927978515625,
-0.0205841064453125,
-0.02581787109375,
0.002716064453125,
-0.0819091796875,
0.00487518310546875,
0.00927734375,
-0.01580810546875,
0.047088623046875,
-0.0070343017578125,
-0.0245208740234375,
0.047515869140625,
0.000850677490234375,
0.045013427734375,
0.0150146484375,
-0.0222930908203125,
-0.0141448974609375,
0.06719970703125,
0.0175628662109375,
0.06072998046875,
-0.0287628173828125,
0.036468505859375,
-0.0081024169921875,
0.029296875,
0.01300811767578125,
0.00952911376953125,
-0.0205078125,
0.0160064697265625,
-0.06689453125,
-0.0134429931640625,
0.039031982421875,
-0.048828125,
0.03228759765625,
-0.06536865234375,
-0.012420654296875,
-0.037078857421875,
0.06915283203125,
-0.058258056640625,
-0.0159454345703125,
0.0230865478515625,
0.050048828125,
-0.051025390625,
-0.07098388671875,
-0.020782470703125,
-0.01971435546875,
-0.04779052734375,
0.0184326171875,
0.01261138916015625,
-0.03466796875,
0.005878448486328125,
-0.0772705078125,
-0.03912353515625,
-0.037078857421875,
0.042022705078125,
-0.0276336669921875,
0.04400634765625,
0.0236968994140625,
0.0246124267578125,
-0.01021575927734375,
-0.044921875,
-0.017852783203125,
-0.0892333984375,
-0.01198577880859375,
-0.0276947021484375,
0.07720947265625,
-0.01461029052734375,
0.051910400390625,
-0.0675048828125,
0.0242767333984375,
0.014129638671875,
-0.00785064697265625,
0.025421142578125,
-0.005207061767578125,
-0.0220184326171875,
0.0020236968994140625,
0.0253143310546875,
-0.0305633544921875,
0.0033817291259765625,
-0.00226593017578125,
-0.03466796875,
-0.00582122802734375,
-0.031494140625,
-0.0213623046875,
0.003955841064453125,
-0.0284271240234375,
-0.00312042236328125,
-0.0156707763671875,
-0.031707763671875,
-0.0008559226989746094,
-0.0009059906005859375,
-0.021087646484375,
-0.0188751220703125,
-0.00482177734375,
0.0400390625,
-0.076416015625,
0.0293426513671875,
0.021636962890625,
0.114501953125,
0.009918212890625,
0.0176544189453125,
-0.052459716796875,
0.041259765625,
0.042327880859375,
0.0250244140625,
0.0243072509765625,
0.005329132080078125,
-0.03057861328125,
0.022491455078125,
0.022369384765625,
-0.008056640625,
-0.036712646484375,
0.049530029296875,
0.006092071533203125,
-0.0258026123046875,
0.0133819580078125,
-0.010955810546875,
0.03631591796875,
0.0007691383361816406,
-0.01279449462890625,
-0.01309967041015625,
-0.01349639892578125,
0.0160064697265625,
-0.0085906982421875,
0.034332275390625,
-0.0018968582153320312,
-0.038421630859375,
0.01251983642578125,
-0.0081939697265625,
0.0007114410400390625,
0.017974853515625,
0.005306243896484375,
0.008697509765625,
0.01229095458984375,
-0.016876220703125,
0.04052734375,
0.0714111328125,
0.0037441253662109375,
0.051239013671875,
0.00934600830078125,
-0.01146697998046875,
-0.03363037109375,
-0.0133819580078125,
0.035003662109375,
-0.01047515869140625,
-0.00960540771484375,
-0.039459228515625,
-0.00682830810546875,
0.045745849609375,
0.02130126953125,
-0.0035343170166015625,
0.0190277099609375,
-0.0008449554443359375,
-0.005954742431640625,
0.0153045654296875,
0.0026988983154296875,
-0.0205078125,
-0.01401519775390625,
0.0162811279296875,
0.0251007080078125,
-0.037109375,
0.047088623046875,
-0.03912353515625,
0.0015401840209960938,
-0.0285491943359375,
0.00492095947265625,
0.0328369140625,
0.0706787109375,
-0.0114593505859375,
0.019317626953125,
0.0121002197265625,
0.00864410400390625,
-0.05438232421875,
0.0196685791015625,
-0.02032470703125,
-0.00811767578125,
0.043792724609375,
0.01309967041015625,
-0.025177001953125,
-0.0273895263671875,
0.0184173583984375,
-0.013153076171875,
-0.00800323486328125,
0.01861572265625,
-0.0018491744995117188,
-0.034759521484375,
-0.006488800048828125,
0.0308837890625,
0.037628173828125,
-0.02960205078125,
-0.0081939697265625,
-0.001556396484375,
-0.01332855224609375,
-0.0220184326171875,
0.04803466796875,
-0.08575439453125,
0.009185791015625,
0.035369873046875,
-0.01404571533203125,
0.017364501953125,
0.01248931884765625,
-0.039520263671875,
-0.032440185546875,
-0.005443572998046875,
-0.02215576171875,
0.036651611328125,
-0.01187896728515625,
0.008575439453125,
-0.0206756591796875,
0.0065155029296875,
-0.0151214599609375,
-0.0085296630859375,
0.05419921875,
0.032623291015625,
-0.05712890625,
0.004909515380859375,
-0.04443359375,
-0.014129638671875,
-0.043670654296875,
-0.055908203125,
-0.040374755859375,
-0.004863739013671875,
0.020904541015625,
0.007659912109375,
-0.006519317626953125,
-0.0491943359375,
0.005115509033203125,
0.0207366943359375,
0.0144805908203125,
0.033416748046875,
-0.0284271240234375,
0.0125732421875,
0.04437255859375,
0.0265045166015625,
0.009124755859375,
0.0196380615234375,
0.0238037109375,
-0.034881591796875,
0.0020542144775390625,
-0.028076171875,
0.0012836456298828125,
-0.01323699951171875,
0.0229644775390625,
0.00655364990234375,
0.0313720703125,
0.0020275115966796875,
-0.027099609375,
-0.00624847412109375,
0.01013946533203125,
-0.0261383056640625,
0.031768798828125,
-0.0031108856201171875,
-0.042724609375,
-0.01026153564453125,
-0.0438232421875,
-0.006481170654296875,
0.0118255615234375,
-0.0474853515625,
0.038116455078125,
-0.0016145706176757812,
0.00801849365234375,
0.04351806640625,
-0.01462554931640625,
0.03961181640625,
0.050567626953125,
-0.0025005340576171875,
0.05206298828125,
0.011260986328125,
0.025360107421875,
0.0181427001953125,
0.005687713623046875,
0.00691986083984375,
-0.03192138671875,
0.043670654296875,
0.01074981689453125,
0.01345062255859375,
0.05548095703125,
-0.0026569366455078125,
0.031890869140625,
0.0882568359375,
0.076171875,
-0.11248779296875,
0.0027904510498046875,
0.00621795654296875,
-0.002704620361328125,
0.036224365234375,
-0.002727508544921875,
0.0191650390625,
0.006107330322265625,
0.0215606689453125,
-0.025146484375,
-0.005313873291015625,
0.00009065866470336914,
-0.0185546875,
-0.0283355712890625,
0.0171966552734375,
0.00354766845703125,
0.021331787109375,
0.01380157470703125,
-0.01214599609375,
-0.018951416015625,
0.01739501953125,
0.0104827880859375,
0.000537872314453125,
-0.017791748046875,
-0.043731689453125,
-0.04888916015625,
-0.0298614501953125,
-0.00835418701171875,
-0.0255126953125,
0.01465606689453125,
0.0131378173828125,
0.01081085205078125,
0.055206298828125,
-0.01513671875,
0.006282806396484375,
0.03216552734375,
-0.01434326171875,
-0.01265716552734375,
-0.03912353515625,
-0.031982421875,
0.0166778564453125,
-0.007511138916015625,
0.01222991943359375,
-0.002460479736328125,
-0.0287322998046875,
-0.0153961181640625,
0.0036773681640625,
0.0833740234375,
-0.0222015380859375,
-0.02783203125,
0.034820556640625,
-0.016571044921875,
-0.031951904296875,
-0.0078887939453125,
-0.00630950927734375,
-0.046051025390625,
-0.017730712890625,
-0.0007729530334472656,
-0.01505279541015625,
0.006927490234375,
0.0178680419921875,
-0.03753662109375,
0.079345703125,
-0.0164031982421875,
0.01136016845703125,
0.028533935546875,
0.0185394287109375,
-0.0217742919921875,
0.0031871795654296875,
-0.0164794921875,
0.04754638671875,
-0.01401519775390625,
0.03668212890625,
0.004024505615234375,
0.01085662841796875,
0.0262603759765625,
0.01776123046875,
0.038177490234375,
0.014190673828125,
-0.045074462890625,
-0.0159149169921875,
0.045928955078125,
0.035430908203125,
0.014739990234375,
0.0325927734375,
-0.005817413330078125,
-0.01117706298828125,
0.0052032470703125,
-0.00251007080078125,
0.0271759033203125,
-0.04290771484375,
-0.01122283935546875,
0.010589599609375,
0.0021648406982421875,
-0.00597381591796875,
-0.007678985595703125,
0.005817413330078125,
-0.0504150390625,
-0.0067138671875,
0.024322509765625,
0.005695343017578125,
-0.0228271484375,
0.030364990234375,
0.0215606689453125,
-0.0012769699096679688,
0.007366180419921875,
-0.02569580078125,
0.053497314453125,
0.01470947265625,
-0.0046234130859375,
-0.026641845703125,
0.00991058349609375,
-0.048095703125,
-0.0276336669921875,
-0.01068878173828125,
0.051513671875,
-0.05548095703125,
-0.037109375,
0.01336669921875,
0.00836944580078125,
-0.00829315185546875,
0.0017910003662109375,
0.06292724609375,
-0.017333984375,
0.0019855499267578125,
-0.0178680419921875,
0.0087127685546875,
-0.00240325927734375,
-0.0260009765625,
0.005466461181640625,
-0.0294647216796875,
0.041839599609375,
0.0728759765625,
-0.00850677490234375,
0.0045166015625,
0.023590087890625,
0.0105743408203125,
0.003826141357421875,
0.002178192138671875,
-0.006313323974609375,
0.007549285888671875,
-0.0176544189453125,
0.00803375244140625,
-0.006603240966796875,
0.002536773681640625,
0.0091400146484375,
0.01380157470703125,
0.0144500732421875,
-0.001617431640625,
-0.007183074951171875,
0.03369140625,
-0.0295867919921875,
0.021392822265625,
-0.0775146484375,
-0.091064453125,
0.024078369140625,
0.057464599609375,
-0.005218505859375,
0.0270538330078125,
0.0335693359375,
0.0572509765625,
-0.003559112548828125,
-0.004230499267578125,
0.0606689453125,
-0.00460052490234375,
-0.032501220703125,
-0.0109100341796875,
0.01641845703125,
0.025146484375,
0.004444122314453125,
0.00408935546875,
0.046173095703125,
0.021453857421875,
-0.015380859375,
0.01493072509765625,
0.0024204254150390625,
-0.0237579345703125,
-0.007720947265625,
-0.022003173828125,
-0.006534576416015625,
-0.002651214599609375,
-0.065185546875,
-0.00997161865234375,
-0.024688720703125,
-0.01131439208984375,
0.0124664306640625,
0.0247039794921875,
-0.038055419921875,
0.0623779296875,
0.010986328125,
-0.0280609130859375,
0.0018930435180664062,
0.01277923583984375,
0.02197265625,
-0.0002765655517578125,
-0.0010223388671875,
-0.010498046875,
-0.023712158203125,
-0.0090179443359375,
-0.02825927734375,
0.06298828125,
-0.0077667236328125,
0.083740234375,
-0.06103515625,
0.0279388427734375,
-0.007110595703125,
-0.00562286376953125,
-0.0233154296875,
-0.003795623779296875,
0.035003662109375,
0.01177978515625,
-0.036102294921875,
-0.0195770263671875,
-0.0169219970703125,
0.0033664703369140625,
0.02056884765625,
-0.03668212890625,
-0.0183868408203125,
-0.01108551025390625,
0.0364990234375,
0.0162506103515625,
-0.00933074951171875,
-0.031524658203125,
-0.06781005859375,
-0.050689697265625,
0.0107574462890625,
-0.01154327392578125,
0.0267791748046875,
0.01318359375,
0.01153564453125,
0.0305938720703125,
0.0094757080078125,
0.0060577392578125,
0.017608642578125,
0.00829315185546875,
0.0229949951171875,
-0.0233917236328125,
-0.032684326171875,
0.00018072128295898438,
-0.0202178955078125,
-0.0241546630859375,
0.0220947265625,
0.0247039794921875,
-0.01390838623046875,
-0.0161285400390625,
-0.00318145751953125,
0.021820068359375,
0.03314208984375,
-0.0197906494140625,
0.01276397705078125,
0.0180816650390625,
-0.003025054931640625,
-0.00666046142578125,
-0.0139617919921875,
-0.01837158203125,
-0.04547119140625,
-0.0028858184814453125,
0.02166748046875,
-0.01522064208984375,
-0.053192138671875,
-0.05169677734375,
0.06396484375,
0.002681732177734375,
-0.0133514404296875,
-0.0853271484375,
0.060394287109375,
-0.037139892578125,
0.0924072265625,
-0.060516357421875,
0.02423095703125,
-0.0107421875,
0.015716552734375,
-0.053680419921875,
-0.0302276611328125,
-0.018463134765625,
0.046112060546875,
-0.00949859619140625,
0.03631591796875,
0.022003173828125,
-0.01444244384765625,
0.0303497314453125,
0.0654296875,
0.0218505859375,
0.10028076171875,
-0.0209808349609375,
-0.019378662109375,
-0.012451171875,
-0.00027251243591308594,
-0.00402069091796875,
-0.02020263671875,
-0.00971221923828125,
-0.01512908935546875,
-0.020660400390625,
-0.021728515625,
-0.0086669921875,
-0.0078277587890625,
-0.0618896484375,
-0.084716796875,
0.005252838134765625,
0.0003657341003417969,
-0.0465087890625,
-0.01519012451171875,
-0.0408935546875,
-0.0273284912109375,
0.0233306884765625,
-0.0029544830322265625,
-0.03045654296875,
-0.03387451171875,
0.04925537109375,
0.002559661865234375,
-0.01392364501953125,
0.01209259033203125,
0.0202484130859375,
-0.0276641845703125,
0.014617919921875,
0.01329803466796875,
-0.060577392578125,
0.003910064697265625,
-0.0191802978515625,
0.062225341796875,
0.053985595703125,
0.0052032470703125,
0.052642822265625,
0.0246429443359375,
-0.04022216796875,
-0.01183319091796875,
-0.01427459716796875,
-0.044647216796875,
-0.0196685791015625,
0.09112548828125,
0.058746337890625,
0.0262603759765625,
-0.0225067138671875,
-0.020111083984375,
-0.025634765625,
-0.0177459716796875,
0.0170135498046875,
0.017364501953125,
-0.06671142578125,
0.0296478271484375,
0.03851318359375,
-0.0261993408203125,
0.02288818359375,
0.00032782554626464844,
-0.039093017578125,
0.016387939453125,
0.0109100341796875,
-0.0096282958984375,
-0.0263519287109375,
-0.0191192626953125,
0.060821533203125,
-0.0307464599609375,
0.01071929931640625,
-0.0115509033203125,
0.020294189453125,
0.03533935546875,
-0.01352691650390625,
-0.0012006759643554688,
0.01486968994140625,
-0.05181884765625,
0.0189666748046875,
0.0021457672119140625,
0.033233642578125,
-0.042510986328125,
-0.01338958740234375,
0.01361846923828125,
0.0264129638671875,
-0.0297698974609375,
0.01385498046875,
-0.00858306884765625,
0.0621337890625,
-0.0126953125,
0.08758544921875,
-0.033203125,
-0.04290771484375,
-0.0174713134765625,
-0.0105133056640625,
-0.01450347900390625,
0.0242462158203125,
0.039947509765625,
-0.04150390625,
0.00506591796875,
0.0129547119140625,
-0.0255279541015625,
-0.01947021484375,
-0.005680084228515625,
-0.06927490234375,
-0.002857208251953125,
0.005329132080078125
] |
07a972ea9968ceedb6443d35bbed0d418620b402
|
Wordpress Stackexchange
Q: Change permalinks for posts but not for custom post types Currently my permalink structure for posts is
domain.com/post-title
I'm using a static front page and a "blog" page for posts. I'd like to to change the permalink structure for posts, tags and categories to
domain.com/blog/post-title
I can easily add /blog/ in the permalink structure but the catch is that my custom post types also get this modified permalink structure and that is not the desired result.
Thanks in advance!
A: When you register your post type, the with_front argument of rewrite should be false, so the permastruct is not appended to the front of your custom post type permalink.
$args = array(
// snip...
'rewrite' => array( 'with_front' => false ),
// snip...
);
register_post_type( 'your-post-type', $args );
|
Q: Change permalinks for posts but not for custom post types Currently my permalink structure for posts is
domain.com/post-title
I'm using a static front page and a "blog" page for posts. I'd like to to change the permalink structure for posts, tags and categories to
domain.com/blog/post-title
I can easily add /blog/ in the permalink structure but the catch is that my custom post types also get this modified permalink structure and that is not the desired result.
Thanks in advance!
A: When you register your post type, the with_front argument of rewrite should be false, so the permastruct is not appended to the front of your custom post type permalink.
$args = array(
// snip...
'rewrite' => array( 'with_front' => false ),
// snip...
);
register_post_type( 'your-post-type', $args );
|
wordpress
|
{
"language": "en",
"length": 129,
"provenance": "stackexchange_00019.jsonl.gz:428384",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83516"
}
|
[
0.047027587890625,
-0.01070404052734375,
0.030609130859375,
0.0189361572265625,
-0.0208892822265625,
-0.0186767578125,
0.048065185546875,
-0.052947998046875,
-0.04852294921875,
-0.006061553955078125,
0.0171661376953125,
0.00473785400390625,
-0.0333251953125,
-0.057098388671875,
0.054534912109375,
-0.0218658447265625,
0.03253173828125,
-0.0230865478515625,
0.034912109375,
-0.01995849609375,
0.0249786376953125,
-0.00853729248046875,
0.06561279296875,
0.01500701904296875,
0.01065826416015625,
0.00775146484375,
0.05755615234375,
-0.047882080078125,
0.00896453857421875,
-0.044036865234375,
0.017669677734375,
0.000484466552734375,
0.017486572265625,
0.0128326416015625,
0.007610321044921875,
0.041046142578125,
0.022918701171875,
0.00022912025451660156,
0.0229034423828125,
0.023101806640625,
0.015838623046875,
-0.0032444000244140625,
0.03936767578125,
0.04595947265625,
0.0298919677734375,
-0.0306549072265625,
0.00035762786865234375,
-0.11187744140625,
0.005977630615234375,
-0.046478271484375,
0.0004241466522216797,
0.0070953369140625,
0.0192108154296875,
-0.024658203125,
-0.032318115234375,
-0.017578125,
-0.00782012939453125,
-0.054595947265625,
0.03509521484375,
0.006099700927734375,
-0.007717132568359375,
-0.031280517578125,
0.018402099609375,
-0.00865936279296875,
-0.01213836669921875,
-0.014984130859375,
0.01554107666015625,
0.029937744140625,
-0.04937744140625,
-0.027496337890625,
0.038726806640625,
-0.0271759033203125,
-0.01291656494140625,
-0.0218658447265625,
-0.028106689453125,
-0.01654052734375,
-0.01123046875,
-0.05682373046875,
0.0030460357666015625,
0.011199951171875,
0.00464630126953125,
0.0054779052734375,
0.02813720703125,
-0.05767822265625,
0.0159149169921875,
-0.0479736328125,
-0.005268096923828125,
0.01245880126953125,
-0.0275726318359375,
-0.03826904296875,
-0.0205841064453125,
-0.0269622802734375,
-0.048492431640625,
0.0036945343017578125,
0.0009832382202148438,
-0.0272216796875,
0.032073974609375,
0.023284912109375,
0.0004355907440185547,
0.0037078857421875,
0.01561737060546875,
-0.054534912109375,
0.0382080078125,
-0.0269317626953125,
0.007537841796875,
0.003543853759765625,
0.0020427703857421875,
0.025634765625,
0.054168701171875,
0.03240966796875,
-0.0100250244140625,
0.06805419921875,
0.00040793418884277344,
0.0142364501953125,
-0.04425048828125,
0.00992584228515625,
-0.039398193359375,
0.005924224853515625,
-0.017333984375,
0.053863525390625,
0.0036602020263671875,
0.0465087890625,
0.0189056396484375,
-0.006954193115234375,
0.007511138916015625,
0.0275115966796875,
0.01030731201171875,
-0.08026123046875,
-0.0175933837890625,
0.06219482421875,
-0.0273895263671875,
-0.01340484619140625,
0.057159423828125,
0.041595458984375,
0.0178070068359375,
-0.04449462890625,
0.0216827392578125,
-0.05029296875,
-0.0246734619140625,
0.0105438232421875,
0.01116943359375,
-0.02374267578125,
0.00225830078125,
-0.0177764892578125,
0.0298004150390625,
0.0430908203125,
0.01824951171875,
0.0018301010131835938,
-0.012481689453125,
-0.025390625,
0.004856109619140625,
-0.034942626953125,
0.055450439453125,
0.00295257568359375,
-0.032806396484375,
-0.0318603515625,
0.01534271240234375,
-0.0296783447265625,
-0.0304412841796875,
-0.04864501953125,
0.029541015625,
-0.0232086181640625,
0.0028171539306640625,
-0.0233612060546875,
-0.04803466796875,
0.034881591796875,
-0.050445556640625,
-0.01389312744140625,
0.0206451416015625,
-0.00864410400390625,
0.0193939208984375,
0.01285552978515625,
-0.00980377197265625,
-0.006633758544921875,
0.01235198974609375,
-0.01079559326171875,
-0.0185394287109375,
0.009368896484375,
0.0158233642578125,
0.06781005859375,
0.0301361083984375,
-0.018798828125,
0.01153564453125,
0.0113983154296875,
-0.06915283203125,
0.032867431640625,
0.032989501953125,
0.054962158203125,
-0.01464080810546875,
0.0251312255859375,
0.0465087890625,
0.040985107421875,
-0.04803466796875,
0.034027099609375,
-0.01378631591796875,
-0.0175018310546875,
0.0194549560546875,
0.0024433135986328125,
-0.0076446533203125,
-0.00406646728515625,
-0.036376953125,
0.009033203125,
-0.020050048828125,
0.037384033203125,
0.015960693359375,
-0.012176513671875,
0.0174560546875,
0.01323699951171875,
0.032501220703125,
0.04119873046875,
0.01165771484375,
0.0254364013671875,
-0.0306243896484375,
-0.033599853515625,
-0.023834228515625,
0.0308685302734375,
-0.0018405914306640625,
0.002086639404296875,
-0.029754638671875,
0.01136016845703125,
-0.025238037109375,
-0.0361328125,
-0.0347900390625,
0.0296783447265625,
0.056365966796875,
-0.01611328125,
-0.00905609130859375,
-0.030242919921875,
-0.0207672119140625,
0.0260772705078125,
-0.116943359375,
0.0304107666015625,
0.037689208984375,
0.002201080322265625,
-0.039337158203125,
0.00557708740234375,
0.01067352294921875,
-0.0247650146484375,
-0.0053863525390625,
0.055877685546875,
0.0131378173828125,
0.043243408203125,
-0.0034313201904296875,
0.025146484375,
0.017822265625,
-0.01476287841796875,
0.02215576171875,
0.00011986494064331055,
0.003253936767578125,
0.0377197265625,
0.0200042724609375,
0.007083892822265625,
0.01323699951171875,
-0.041229248046875,
0.006847381591796875,
0.040618896484375,
-0.003650665283203125,
-0.029266357421875,
0.01511383056640625,
-0.01010894775390625,
0.0255584716796875,
-0.0170745849609375,
-0.050537109375,
0.0007352828979492188,
0.042999267578125,
0.030914306640625,
0.04791259765625,
0.05133056640625,
-0.0265960693359375,
0.0171966552734375,
-0.0090179443359375,
0.00516510009765625,
0.0015401840209960938,
0.0247344970703125,
0.015777587890625,
-0.00039267539978027344,
-0.0261993408203125,
-0.00878143310546875,
0.0225067138671875,
0.005840301513671875,
-0.01505279541015625,
0.0162353515625,
-0.03338623046875,
0.00225830078125,
-0.01558685302734375,
-0.058990478515625,
-0.003910064697265625,
0.029266357421875,
0.01287078857421875,
-0.01216888427734375,
0.012542724609375,
-0.01261138916015625,
-0.016387939453125,
-0.0005664825439453125,
0.047760009765625,
-0.0361328125,
0.00432586669921875,
-0.09075927734375,
0.07281494140625,
-0.054046630859375,
0.03717041015625,
0.08197021484375,
0.0159912109375,
0.0086669921875,
0.022674560546875,
-0.0033321380615234375,
-0.00048542022705078125,
0.036956787109375,
0.0016317367553710938,
-0.0074005126953125,
-0.0711669921875,
-0.01102447509765625,
0.0237579345703125,
0.0238189697265625,
0.0113525390625,
-0.0223236083984375,
0.02093505859375,
0.035369873046875,
-0.0277862548828125,
-0.0201568603515625,
0.036346435546875,
-0.027435302734375,
0.00417327880859375,
-0.0016965866088867188,
-0.0035152435302734375,
-0.034393310546875,
0.00443267822265625,
-0.00804901123046875,
0.0352783203125,
-0.01922607421875,
-0.089111328125,
-0.03265380859375,
-0.09710693359375,
0.00070953369140625,
-0.007335662841796875,
0.0144805908203125,
0.01134490966796875,
0.03857421875,
0.01155853271484375,
-0.0543212890625,
0.03167724609375,
0.044525146484375,
-0.01210784912109375,
-0.005130767822265625,
0.0260467529296875,
-0.031829833984375,
0.0233917236328125,
0.0016307830810546875,
0.0631103515625,
0.05218505859375,
-0.04803466796875,
0.00677490234375,
-0.022979736328125,
-0.0291900634765625,
0.01050567626953125,
0.020538330078125,
0.031890869140625,
0.022186279296875,
0.0288543701171875,
-0.0401611328125,
-0.04351806640625,
-0.00984954833984375,
-0.057373046875,
0.0017566680908203125,
0.02093505859375,
0.0006914138793945312,
-0.02001953125,
0.0248870849609375,
0.02838134765625,
0.0313720703125,
0.0233306884765625,
-0.032440185546875,
0.048065185546875,
0.01141357421875,
0.030303955078125,
-0.052276611328125,
0.00893402099609375,
-0.042816162109375,
0.0167999267578125,
-0.0166778564453125,
-0.0303192138671875,
-0.032501220703125,
0.007480621337890625,
-0.03704833984375,
-0.07379150390625,
0.03594970703125,
-0.10308837890625,
-0.030059814453125,
-0.040924072265625,
-0.00787353515625,
0.01406097412109375,
0.09197998046875,
-0.017364501953125,
-0.007183074951171875,
-0.0124359130859375,
-0.004261016845703125,
0.0033512115478515625,
-0.0290069580078125,
-0.0281982421875,
-0.01419830322265625,
-0.034515380859375,
-0.031005859375,
-0.0361328125,
-0.0325927734375,
-0.00023758411407470703,
-0.01425933837890625,
-0.006744384765625,
-0.020233154296875,
0.04266357421875,
0.02374267578125,
0.00704193115234375,
0.005565643310546875,
0.0111541748046875,
-0.009857177734375,
-0.038726806640625,
0.01690673828125,
-0.06787109375,
-0.017303466796875,
0.0166778564453125,
0.029693603515625,
-0.018829345703125,
-0.0097198486328125,
-0.01184844970703125,
0.04498291015625,
-0.004665374755859375,
-0.007442474365234375,
0.003963470458984375,
0.0121002197265625,
-0.01482391357421875,
0.00836944580078125,
-0.0108184814453125,
-0.0142669677734375,
0.005718231201171875,
0.02008056640625,
-0.039337158203125,
0.027801513671875,
-0.01428985595703125,
-0.0096435546875,
0.0374755859375,
-0.051788330078125,
-0.055633544921875,
-0.0099945068359375,
-0.0087890625,
0.03143310546875,
-0.00872039794921875,
-0.0015802383422851562,
-0.036224365234375,
-0.06451416015625,
0.047760009765625,
-0.0256195068359375,
0.0053558349609375,
-0.0007276535034179688,
0.08673095703125,
0.006290435791015625,
-0.01357269287109375,
-0.01434326171875,
-0.0113677978515625,
0.036407470703125,
-0.0290679931640625,
0.0197601318359375,
-0.006473541259765625,
-0.01473236083984375,
0.03533935546875,
-0.0290374755859375,
-0.0184478759765625,
-0.0073699951171875,
0.0160675048828125,
0.00792694091796875,
-0.00360870361328125,
-0.005657196044921875,
-0.0171356201171875,
0.04119873046875,
0.0195159912109375,
-0.01275634765625,
-0.004787445068359375,
-0.040008544921875,
0.03125,
-0.0025882720947265625,
0.0272674560546875,
-0.03045654296875,
-0.0289764404296875,
0.029693603515625,
0.023406982421875,
0.017669677734375,
0.01311492919921875,
0.0021762847900390625,
0.0159912109375,
-0.017974853515625,
0.0019044876098632812,
0.004634857177734375,
-0.00791168212890625,
0.0259857177734375,
0.027130126953125,
0.011444091796875,
0.013916015625,
-0.0146636962890625,
-0.00414276123046875,
0.030059814453125,
0.020172119140625,
0.003322601318359375,
-0.0222930908203125,
-0.015472412109375,
0.0031719207763671875,
-0.00891876220703125,
0.0190887451171875,
0.053863525390625,
0.012420654296875,
0.01617431640625,
-0.007587432861328125,
-0.0350341796875,
0.00862884521484375,
-0.037322998046875,
0.01544952392578125,
0.0148773193359375,
-0.0099945068359375,
-0.0003104209899902344,
0.03753662109375,
0.042755126953125,
0.0017938613891601562,
-0.02569580078125,
0.019287109375,
0.0217437744140625,
0.0300750732421875,
0.01428985595703125,
-0.003726959228515625,
-0.0089874267578125,
0.0036640167236328125,
0.00991058349609375,
-0.021728515625,
-0.0157928466796875,
0.02728271484375,
0.047393798828125,
0.006519317626953125,
0.010498046875,
-0.0150604248046875,
-0.018524169921875,
-0.02410888671875,
0.0261077880859375,
-0.016845703125,
-0.0489501953125,
-0.028076171875,
0.0131683349609375,
0.030609130859375,
-0.01506805419921875,
-0.0152587890625,
-0.00027370452880859375,
-0.03997802734375,
-0.0055694580078125,
0.0184326171875,
-0.006610870361328125,
-0.00458526611328125,
-0.00852203369140625,
0.01351165771484375,
-0.006160736083984375,
0.01983642578125,
-0.002651214599609375,
-0.0031490325927734375,
-0.0196380615234375,
-0.0193328857421875,
0.030120849609375,
-0.004032135009765625,
0.07318115234375,
-0.0248870849609375,
-0.032135009765625,
0.0243377685546875,
0.0040740966796875,
0.0217742919921875,
0.0009918212890625,
-0.0721435546875,
0.01276397705078125,
-0.0210113525390625,
0.025421142578125,
-0.02618408203125,
-0.054718017578125,
-0.026031494140625,
-0.0213775634765625,
0.033111572265625,
0.0163421630859375,
0.0159759521484375,
-0.02130126953125,
-0.03912353515625,
0.0013971328735351562,
0.0203094482421875,
0.036895751953125,
-0.027099609375,
0.055267333984375,
-0.01171875,
0.0361328125,
-0.018157958984375,
0.006229400634765625,
-0.007373809814453125,
-0.0147552490234375,
-0.005702972412109375,
-0.0643310546875,
-0.036163330078125,
0.02264404296875,
-0.051971435546875,
0.050323486328125,
0.06475830078125,
0.0048065185546875,
0.01248931884765625,
-0.0033779144287109375,
0.006023406982421875,
-0.020416259765625,
-0.013275146484375,
-0.042449951171875,
0.017486572265625,
-0.01462554931640625,
0.046417236328125,
0.0693359375,
-0.00867462158203125,
-0.017059326171875,
-0.03387451171875,
0.021820068359375,
0.000728607177734375,
-0.0144195556640625,
-0.031982421875,
-0.00555419921875,
0.032470703125,
0.05072021484375,
0.055908203125,
0.005161285400390625,
0.03955078125,
0.0259857177734375,
-0.0123443603515625,
0.006885528564453125,
0.0307464599609375,
0.055328369140625,
0.005992889404296875,
0.01763916015625,
0.06488037109375,
-0.01293182373046875,
-0.0016269683837890625,
0.07122802734375,
0.060943603515625,
-0.08502197265625,
-0.00022089481353759766,
0.0129241943359375,
0.0243682861328125,
0.061614990234375,
0.0264129638671875,
-0.0027370452880859375,
0.0498046875,
-0.0210723876953125,
-0.048828125,
-0.0244140625,
0.00007605552673339844,
0.0165557861328125,
-0.01082611083984375,
-0.00728607177734375,
0.033538818359375,
0.0038204193115234375,
-0.0156707763671875,
-0.0161285400390625,
-0.0013475418090820312,
0.004589080810546875,
-0.0033473968505859375,
0.00937652587890625,
-0.0074310302734375,
-0.030487060546875,
-0.04107666015625,
0.021026611328125,
-0.0003597736358642578,
-0.01239776611328125,
0.0122222900390625,
-0.0133514404296875,
0.0160369873046875,
0.03131103515625,
-0.023773193359375,
0.01885986328125,
-0.00960540771484375,
-0.0189666748046875,
-0.012908935546875,
-0.030914306640625,
-0.00672149658203125,
0.0190582275390625,
-0.0009436607360839844,
0.0129547119140625,
-0.0008101463317871094,
-0.0316162109375,
-0.0117950439453125,
-0.031463623046875,
0.061431884765625,
-0.058837890625,
-0.0005121231079101562,
0.0205230712890625,
-0.002490997314453125,
0.00543975830078125,
-0.0183868408203125,
-0.0204315185546875,
-0.03656005859375,
-0.0025997161865234375,
-0.0268402099609375,
-0.01531219482421875,
-0.0009446144104003906,
-0.035125732421875,
-0.06549072265625,
0.13037109375,
0.01413726806640625,
0.050537109375,
0.0286865234375,
0.038482666015625,
-0.0308380126953125,
0.0167388916015625,
-0.03594970703125,
0.0264129638671875,
-0.0176239013671875,
0.03253173828125,
-0.027801513671875,
-0.001407623291015625,
0.002857208251953125,
0.0269317626953125,
0.07147216796875,
0.018402099609375,
-0.060302734375,
-0.02825927734375,
0.039794921875,
0.037689208984375,
0.005931854248046875,
0.03265380859375,
-0.04052734375,
0.044464111328125,
0.0047149658203125,
-0.0177001953125,
0.02728271484375,
0.0086669921875,
-0.08514404296875,
0.0019092559814453125,
0.03485107421875,
0.042877197265625,
0.0130157470703125,
-0.0291900634765625,
-0.00414276123046875,
0.002044677734375,
0.035064697265625,
-0.025299072265625,
0.00809478759765625,
0.005588531494140625,
0.042510986328125,
-0.06781005859375,
-0.0083160400390625,
-0.029632568359375,
0.055694580078125,
0.0139923095703125,
0.01290130615234375,
-0.022857666015625,
0.003570556640625,
0.03338623046875,
-0.02490234375,
-0.01122283935546875,
0.040313720703125,
-0.023773193359375,
0.061767578125,
0.052886962890625,
0.0207977294921875,
-0.0038471221923828125,
-0.00217437744140625,
0.056732177734375,
0.07452392578125,
-0.058837890625,
-0.02703857421875,
0.01462554931640625,
0.01183319091796875,
0.00707244873046875,
-0.0246124267578125,
-0.005260467529296875,
-0.0172271728515625,
0.0156402587890625,
-0.0310211181640625,
0.00019419193267822266,
0.0274505615234375,
0.041107177734375,
-0.00493621826171875,
-0.036407470703125,
-0.038360595703125,
0.004627227783203125,
-0.052734375,
0.0263824462890625,
-0.008331298828125,
0.06732177734375,
0.0283966064453125,
0.046356201171875,
-0.0213470458984375,
-0.033447265625,
0.0136871337890625,
0.018157958984375,
-0.0357666015625,
-0.0059814453125,
-0.0227813720703125,
-0.07550048828125,
0.002544403076171875,
0.041961669921875,
0.041656494140625,
0.0191192626953125,
0.0284881591796875,
-0.005584716796875,
0.004825592041015625,
0.00872039794921875,
0.0193328857421875,
-0.0055694580078125,
0.02496337890625,
-0.03515625,
0.0177154541015625,
-0.01242828369140625,
-0.01128387451171875,
-0.01715087890625,
0.0015048980712890625,
0.0175628662109375,
0.0003631114959716797,
0.01910400390625,
0.01116943359375,
-0.0247650146484375,
0.054351806640625,
0.003559112548828125,
0.07763671875,
0.032196044921875,
-0.0172119140625,
-0.015411376953125,
-0.03533935546875,
-0.0810546875,
0.042083740234375,
0.060089111328125,
0.0159759521484375,
-0.038543701171875,
0.0005283355712890625,
-0.00725555419921875,
0.0240936279296875,
-0.0238494873046875,
0.014068603515625,
0.05242919921875,
0.00738525390625,
0.032806396484375,
-0.07269287109375,
-0.04302978515625,
0.00258636474609375,
0.0206756591796875,
-0.0144805908203125,
0.10205078125,
-0.0249481201171875,
-0.0108184814453125,
-0.035430908203125,
0.0435791015625,
-0.048187255859375,
-0.03857421875,
0.0260009765625,
-0.00977325439453125,
0.0122528076171875,
0.005706787109375,
-0.0149993896484375,
0.012542724609375,
0.055267333984375,
-0.043914794921875,
0.0233917236328125,
-0.01200103759765625,
0.00768280029296875,
-0.053863525390625,
0.020294189453125,
-0.030303955078125,
-0.06524658203125,
-0.058837890625,
0.0121612548828125,
0.0026988983154296875,
0.00594329833984375,
-0.039459228515625,
0.04986572265625,
0.01230621337890625,
-0.019134521484375,
0.025421142578125,
-0.05877685546875,
0.0472412109375,
0.0416259765625,
0.024017333984375,
-0.0260009765625,
0.046142578125,
-0.007244110107421875,
0.0201568603515625,
0.0201416015625,
0.03826904296875,
0.0302276611328125,
-0.038055419921875,
-0.03167724609375,
-0.004474639892578125,
0.01535797119140625,
-0.00307464599609375,
0.0255889892578125,
-0.02459716796875,
-0.0148773193359375,
0.01117706298828125,
-0.0015268325805664062,
-0.03570556640625,
-0.032958984375,
0.005565643310546875,
0.02587890625,
-0.0161895751953125,
-0.0215301513671875,
-0.0675048828125,
-0.00004178285598754883,
0.032440185546875,
-0.005329132080078125,
-0.034820556640625,
0.031646728515625,
-0.045989990234375,
0.021484375,
-0.03363037109375,
-0.053070068359375,
0.019866943359375,
0.041961669921875,
-0.0270843505859375,
-0.0226898193359375,
-0.04327392578125,
-0.0250396728515625,
-0.061492919921875,
0.024566650390625,
0.04681396484375,
-0.03057861328125,
-0.033935546875,
0.0028781890869140625,
-0.004001617431640625,
0.064697265625,
-0.00884246826171875,
-0.0016031265258789062,
0.0078125,
0.0266571044921875,
-0.0325927734375,
-0.06597900390625,
0.0153350830078125,
-0.040863037109375,
-0.00702667236328125,
-0.034149169921875,
-0.0192718505859375,
-0.005344390869140625,
-0.043670654296875,
-0.023681640625,
0.05218505859375,
-0.0031757354736328125,
-0.0142974853515625,
-0.06671142578125,
-0.00034332275390625,
-0.021484375,
0.06292724609375,
0.0087127685546875,
-0.042999267578125,
-0.01407623291015625,
0.05084228515625,
0.01861572265625,
0.04888916015625,
0.00064849853515625,
0.0298004150390625,
0.0277252197265625,
0.04443359375,
0.03369140625,
-0.00835418701171875,
0.0300445556640625,
-0.0262603759765625,
0.03167724609375,
0.038482666015625,
-0.04510498046875,
0.0103302001953125,
-0.024658203125,
-0.00251007080078125,
-0.00289154052734375,
-0.053466796875,
-0.0283966064453125,
-0.039764404296875,
0.0816650390625,
-0.0127410888671875,
0.0256195068359375,
-0.0094451904296875,
-0.0245208740234375,
-0.0182342529296875,
-0.018524169921875,
0.00450897216796875,
0.032379150390625,
-0.06787109375,
0.01055145263671875,
0.0177764892578125,
0.000782012939453125,
-0.032989501953125,
0.01122283935546875,
-0.0170745849609375,
-0.0027294158935546875,
0.0190887451171875,
-0.01120758056640625,
0.00461578369140625,
0.020599365234375,
0.048828125,
-0.036651611328125,
-0.006359100341796875,
-0.0026683807373046875,
0.003055572509765625,
0.0007529258728027344,
-0.0209503173828125,
0.00423431396484375,
0.0184478759765625,
0.0113983154296875,
0.01383209228515625,
0.03997802734375,
0.01971435546875,
0.00861358642578125,
-0.007053375244140625,
-0.0024700164794921875,
0.01015472412109375,
-0.0028629302978515625,
0.0035247802734375,
-0.0126800537109375,
0.04046630859375,
-0.0012292861938476562,
0.0875244140625,
0.0157928466796875,
-0.017242431640625,
-0.007579803466796875,
0.035919189453125,
-0.0386962890625,
-0.00958251953125,
-0.02056884765625,
-0.03643798828125,
-0.00411224365234375,
-0.00742340087890625,
-0.013824462890625,
-0.0207366943359375,
-0.0059967041015625,
-0.0173187255859375,
-0.007144927978515625,
0.00952911376953125
] |
92f0110be5b9a34c61b553fee7b59e22ae208a20
|
Wordpress Stackexchange
Q: Why Does get_posts() Return an Empty Set? I'm writing a custom plugin that is initialized at init. This plugin is trying to query for some custom post types already stored in the DB.
Here's my code:
$args = array()
$myposts = get_posts( $args );
print_r($myposts);
No matter what arguments I pass into the $args array I don't get anything. For example:
$args = array( 'post_type' => 'page' );
Now, to my confusion if I use the exact same arguments with get_pages() I get a result.
Maybe this has something to do with when WP Query is initialized?
A: It seems that is was a simple problem. get_posts() has various default settings, one of which is that the post_status is set to public and my custom post type which doesn't use post_status used the default value, draft.
To fix this you can either query by post status (see the code below) or change the data in the DB.
$args = array(
'post_status' => 'draft',
'post_type' => 'your_custom_post_type'
);
|
Q: Why Does get_posts() Return an Empty Set? I'm writing a custom plugin that is initialized at init. This plugin is trying to query for some custom post types already stored in the DB.
Here's my code:
$args = array()
$myposts = get_posts( $args );
print_r($myposts);
No matter what arguments I pass into the $args array I don't get anything. For example:
$args = array( 'post_type' => 'page' );
Now, to my confusion if I use the exact same arguments with get_pages() I get a result.
Maybe this has something to do with when WP Query is initialized?
A: It seems that is was a simple problem. get_posts() has various default settings, one of which is that the post_status is set to public and my custom post type which doesn't use post_status used the default value, draft.
To fix this you can either query by post status (see the code below) or change the data in the DB.
$args = array(
'post_status' => 'draft',
'post_type' => 'your_custom_post_type'
);
|
wordpress
|
{
"language": "en",
"length": 168,
"provenance": "stackexchange_00019.jsonl.gz:428398",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83559"
}
|
[
0.033660888671875,
-0.0027484893798828125,
0.00801849365234375,
0.01447296142578125,
-0.003047943115234375,
-0.0173187255859375,
0.0552978515625,
-0.032562255859375,
-0.0323486328125,
0.0023193359375,
-0.043701171875,
0.0024585723876953125,
-0.078857421875,
-0.0160369873046875,
-0.003986358642578125,
-0.08428955078125,
0.0523681640625,
-0.0239105224609375,
0.032684326171875,
-0.0196075439453125,
0.02716064453125,
0.01221466064453125,
0.05126953125,
0.0640869140625,
0.02618408203125,
-0.006000518798828125,
0.043701171875,
-0.0012578964233398438,
0.00787353515625,
-0.006549835205078125,
0.0308074951171875,
-0.014434814453125,
0.00577545166015625,
0.021759033203125,
0.0025577545166015625,
-0.0233306884765625,
0.0141143798828125,
-0.0038623809814453125,
0.01031494140625,
0.015472412109375,
0.00841522216796875,
-0.005489349365234375,
0.0305023193359375,
0.006420135498046875,
-0.00722503662109375,
0.006927490234375,
0.01035308837890625,
-0.00742340087890625,
-0.017059326171875,
-0.0285491943359375,
-0.00568389892578125,
-0.027740478515625,
0.01528167724609375,
-0.030181884765625,
-0.0176239013671875,
-0.030303955078125,
0.0223236083984375,
-0.0270843505859375,
0.0447998046875,
-0.01540374755859375,
-0.04742431640625,
-0.0258026123046875,
0.036773681640625,
-0.02947998046875,
-0.01267242431640625,
0.039154052734375,
0.04022216796875,
0.001392364501953125,
-0.044189453125,
-0.0251007080078125,
0.00971221923828125,
-0.041748046875,
0.00428009033203125,
0.007648468017578125,
-0.054229736328125,
-0.041900634765625,
0.012603759765625,
-0.06005859375,
0.02215576171875,
0.0030765533447265625,
0.0018796920776367188,
0.0038280487060546875,
-0.072998046875,
0.04034423828125,
-0.029510498046875,
0.037445068359375,
-0.028045654296875,
-0.03082275390625,
-0.003040313720703125,
0.0021648406982421875,
-0.01293182373046875,
-0.0196380615234375,
0.0198211669921875,
0.0175323486328125,
-0.010528564453125,
-0.018218994140625,
0.01425933837890625,
0.047576904296875,
-0.0196075439453125,
0.03082275390625,
-0.0391845703125,
-0.036041259765625,
0.0498046875,
-0.04644775390625,
0.025634765625,
0.0215301513671875,
-0.010162353515625,
-0.014678955078125,
0.05572509765625,
0.03167724609375,
0.017913818359375,
0.062744140625,
-0.0180511474609375,
-0.0143890380859375,
-0.01348876953125,
-0.007328033447265625,
-0.047607421875,
-0.00524139404296875,
0.001834869384765625,
-0.0176544189453125,
0.0298614501953125,
0.047821044921875,
-0.0118255615234375,
-0.01422119140625,
-0.00016570091247558594,
0.0021381378173828125,
-0.01436614990234375,
-0.040863037109375,
-0.00846099853515625,
0.062744140625,
-0.03546142578125,
-0.010345458984375,
0.050140380859375,
0.0135498046875,
0.0007305145263671875,
-0.036102294921875,
-0.0090484619140625,
-0.03607177734375,
-0.0279083251953125,
0.0100555419921875,
-0.0013208389282226562,
-0.024688720703125,
0.0056915283203125,
-0.03271484375,
-0.02294921875,
0.0241851806640625,
0.01068878173828125,
0.01158905029296875,
-0.0161590576171875,
-0.04132080078125,
-0.018829345703125,
-0.007007598876953125,
0.0149993896484375,
0.01141357421875,
0.00754547119140625,
0.01332855224609375,
0.0209808349609375,
-0.02520751953125,
-0.01511383056640625,
-0.016876220703125,
0.053802490234375,
-0.004150390625,
-0.0418701171875,
-0.007801055908203125,
-0.039306640625,
0.00038886070251464844,
-0.0162811279296875,
-0.006298065185546875,
0.0186004638671875,
0.0209197998046875,
0.0175018310546875,
-0.00251007080078125,
0.0255279541015625,
0.0168914794921875,
-0.000286102294921875,
0.0022716522216796875,
0.005901336669921875,
-0.015533447265625,
0.033660888671875,
0.0177459716796875,
-0.047271728515625,
-0.0309600830078125,
0.032440185546875,
-0.0174560546875,
-0.061981201171875,
0.0457763671875,
0.006404876708984375,
0.056732177734375,
0.0034961700439453125,
0.0172271728515625,
0.0173187255859375,
0.033050537109375,
-0.057220458984375,
0.044891357421875,
0.007160186767578125,
-0.01265716552734375,
-0.03564453125,
-0.01318359375,
-0.004520416259765625,
-0.00991058349609375,
0.0029315948486328125,
-0.01123809814453125,
-0.01548004150390625,
0.01513671875,
-0.050811767578125,
-0.0169830322265625,
-0.0159454345703125,
0.01953125,
0.01263427734375,
0.0210418701171875,
0.0120391845703125,
0.006366729736328125,
-0.06365966796875,
0.063232421875,
-0.0161590576171875,
0.014129638671875,
-0.0193328857421875,
0.0157928466796875,
-0.032562255859375,
0.01515960693359375,
-0.0438232421875,
-0.03729248046875,
-0.0450439453125,
0.032623291015625,
0.07122802734375,
-0.02642822265625,
0.018951416015625,
-0.029632568359375,
0.063720703125,
-0.0008068084716796875,
-0.0230255126953125,
0.0025882720947265625,
0.0400390625,
0.063232421875,
-0.00952911376953125,
-0.006084442138671875,
0.01514434814453125,
-0.048980712890625,
0.0244598388671875,
0.044036865234375,
0.0245208740234375,
0.006443023681640625,
-0.0192108154296875,
-0.0097808837890625,
0.0576171875,
-0.01433563232421875,
0.0129241943359375,
-0.0087890625,
0.056976318359375,
0.07159423828125,
0.0144195556640625,
-0.0081024169921875,
0.01085662841796875,
0.0252685546875,
0.028564453125,
0.0137481689453125,
-0.0158843994140625,
-0.0201568603515625,
-0.0004711151123046875,
0.00984954833984375,
0.01058197021484375,
-0.027313232421875,
-0.0124664306640625,
-0.010498046875,
0.039154052734375,
0.032012939453125,
0.034698486328125,
0.032958984375,
-0.042205810546875,
0.038360595703125,
0.0007305145263671875,
-0.03875732421875,
-0.00525665283203125,
0.0019245147705078125,
0.008331298828125,
-0.0144195556640625,
-0.031280517578125,
0.004169464111328125,
0.0207366943359375,
-0.01108551025390625,
0.001674652099609375,
0.0133209228515625,
-0.0386962890625,
-0.0026683807373046875,
0.006725311279296875,
-0.01346588134765625,
-0.0030803680419921875,
0.050201416015625,
0.00046324729919433594,
-0.01336669921875,
0.016021728515625,
0.03790283203125,
-0.0142364501953125,
0.0323486328125,
-0.0032596588134765625,
-0.01476287841796875,
0.038299560546875,
-0.08551025390625,
0.054779052734375,
-0.049285888671875,
0.05645751953125,
0.07366943359375,
0.01372528076171875,
-0.0043487548828125,
-0.0013570785522460938,
-0.0004906654357910156,
0.0009860992431640625,
0.0174713134765625,
-0.01169586181640625,
-0.0187225341796875,
-0.04229736328125,
0.005100250244140625,
0.036651611328125,
0.06365966796875,
0.01331329345703125,
-0.0321044921875,
-0.005016326904296875,
0.059173583984375,
-0.06884765625,
-0.054229736328125,
0.031463623046875,
-0.04290771484375,
-0.0280914306640625,
-0.043365478515625,
-0.0233306884765625,
0.01385498046875,
-0.051300048828125,
-0.0104522705078125,
0.005771636962890625,
-0.0276947021484375,
-0.06402587890625,
-0.08001708984375,
-0.09149169921875,
-0.011749267578125,
-0.0014781951904296875,
0.0174102783203125,
-0.008880615234375,
0.10205078125,
0.0196075439453125,
-0.035552978515625,
0.012786865234375,
0.035003662109375,
-0.01143646240234375,
0.0177001953125,
0.01241302490234375,
0.042022705078125,
0.0262298583984375,
0.0141448974609375,
0.040008544921875,
0.0684814453125,
-0.081787109375,
-0.027008056640625,
-0.01097869873046875,
-0.00646209716796875,
0.00930023193359375,
0.01465606689453125,
0.01032257080078125,
0.026611328125,
0.02386474609375,
-0.0220184326171875,
-0.026397705078125,
-0.019256591796875,
-0.04693603515625,
0.03173828125,
0.01345062255859375,
0.004878997802734375,
-0.0204925537109375,
0.034637451171875,
0.0027313232421875,
-0.000560760498046875,
0.0264434814453125,
-0.01265716552734375,
0.032501220703125,
-0.017608642578125,
-0.01212310791015625,
-0.0307159423828125,
-0.005523681640625,
-0.0216217041015625,
0.005779266357421875,
-0.005084991455078125,
0.01345062255859375,
-0.006633758544921875,
-0.029632568359375,
-0.051483154296875,
-0.050750732421875,
0.044921875,
-0.02288818359375,
0.0081329345703125,
-0.039093017578125,
-0.019500732421875,
-0.01218414306640625,
0.070556640625,
-0.01788330078125,
-0.01068878173828125,
-0.01427459716796875,
0.01220703125,
-0.04669189453125,
-0.085693359375,
-0.0156402587890625,
-0.01019287109375,
-0.029449462890625,
-0.007965087890625,
-0.007720947265625,
-0.0283203125,
-0.0166168212890625,
-0.021484375,
-0.04205322265625,
-0.0255889892578125,
0.028778076171875,
-0.0309906005859375,
0.043243408203125,
-0.034881591796875,
0.03656005859375,
-0.060211181640625,
-0.00408935546875,
-0.031402587890625,
-0.07745361328125,
-0.019378662109375,
0.053375244140625,
0.0145111083984375,
-0.0209808349609375,
0.0009474754333496094,
-0.040191650390625,
0.028289794921875,
-0.0034313201904296875,
0.021453857421875,
-0.01529693603515625,
0.007373809814453125,
-0.0093994140625,
-0.007472991943359375,
0.0008382797241210938,
-0.0229339599609375,
-0.01224517822265625,
0.004184722900390625,
-0.0006909370422363281,
0.0049896240234375,
-0.020904541015625,
-0.0272064208984375,
-0.00859832763671875,
-0.03411865234375,
-0.01702880859375,
-0.01288604736328125,
-0.0117645263671875,
0.0157318115234375,
-0.01519012451171875,
0.00951385498046875,
-0.0264434814453125,
-0.01311492919921875,
0.040557861328125,
-0.0135345458984375,
-0.006069183349609375,
-0.0030269622802734375,
0.0675048828125,
0.02447509765625,
-0.01165008544921875,
-0.0026226043701171875,
-0.0299835205078125,
0.02239990234375,
-0.016082763671875,
0.050994873046875,
0.03289794921875,
-0.00904083251953125,
0.050506591796875,
-0.0036792755126953125,
0.0042572021484375,
-0.00439453125,
0.06109619140625,
-0.004932403564453125,
-0.021209716796875,
0.0180206298828125,
-0.017364501953125,
-0.0257720947265625,
0.052398681640625,
-0.019500732421875,
-0.00495147705078125,
0.016693115234375,
0.03173828125,
-0.07049560546875,
0.038238525390625,
-0.0179901123046875,
-0.029144287109375,
0.016876220703125,
-0.0069122314453125,
-0.0158233642578125,
0.003688812255859375,
-0.00368499755859375,
-0.0033779144287109375,
-0.01245880126953125,
0.005420684814453125,
0.01995849609375,
0.0643310546875,
0.000698089599609375,
0.0207366943359375,
0.048431396484375,
-0.0070037841796875,
-0.035919189453125,
-0.003055572509765625,
0.0277862548828125,
-0.0255126953125,
-0.07635498046875,
-0.00009763240814208984,
-0.024444580078125,
0.023101806640625,
0.0271759033203125,
-0.009246826171875,
0.041290283203125,
0.051177978515625,
-0.002017974853515625,
-0.004024505615234375,
0.0189208984375,
0.017974853515625,
-0.030029296875,
-0.00444793701171875,
0.015899658203125,
-0.01436614990234375,
-0.0063629150390625,
0.07354736328125,
0.00003165006637573242,
0.03790283203125,
-0.023834228515625,
-0.033477783203125,
-0.00909423828125,
0.062225341796875,
0.0343017578125,
-0.024566650390625,
-0.000995635986328125,
0.03826904296875,
0.014739990234375,
-0.04486083984375,
-0.0236968994140625,
0.005817413330078125,
0.034576416015625,
0.01343536376953125,
-0.005077362060546875,
0.042083740234375,
0.0081787109375,
-0.03277587890625,
0.043670654296875,
0.0457763671875,
-0.025665283203125,
-0.041046142578125,
0.0072021484375,
0.04620361328125,
0.030731201171875,
-0.026214599609375,
0.0400390625,
-0.0118408203125,
0.019744873046875,
-0.033538818359375,
-0.051239013671875,
0.0205535888671875,
0.0469970703125,
-0.002685546875,
-0.057861328125,
0.004131317138671875,
-0.0482177734375,
0.0252685546875,
-0.025665283203125,
-0.018707275390625,
0.01331329345703125,
-0.01617431640625,
0.05865478515625,
-0.0275726318359375,
-0.031402587890625,
-0.03466796875,
0.01099395751953125,
0.03375244140625,
0.03155517578125,
-0.006526947021484375,
-0.015655517578125,
-0.03790283203125,
-0.0273590087890625,
-0.01158905029296875,
-0.0240478515625,
-0.03826904296875,
-0.0116729736328125,
0.015869140625,
0.032318115234375,
-0.0081939697265625,
-0.054046630859375,
-0.0297393798828125,
-0.01849365234375,
0.02154541015625,
0.052398681640625,
0.004177093505859375,
0.06402587890625,
-0.0179443359375,
0.03564453125,
0.0138092041015625,
0.031585693359375,
-0.030303955078125,
-0.01357269287109375,
0.006763458251953125,
-0.06915283203125,
-0.016693115234375,
-0.00029850006103515625,
-0.0266265869140625,
0.01258087158203125,
-0.0069732666015625,
0.00543212890625,
-0.0142059326171875,
0.00186920166015625,
-0.000606536865234375,
-0.0245819091796875,
0.0269775390625,
0.02490234375,
0.016357421875,
0.01495361328125,
-0.020111083984375,
-0.0212860107421875,
0.003864288330078125,
0.007579803466796875,
-0.0196990966796875,
-0.004467010498046875,
-0.018096923828125,
-0.004558563232421875,
-0.025115966796875,
0.0312042236328125,
0.0596923828125,
-0.00687408447265625,
0.0279388427734375,
0.01105499267578125,
0.007415771484375,
0.0298614501953125,
-0.0031585693359375,
0.0211029052734375,
0.0016851425170898438,
0.07623291015625,
0.0092926025390625,
0.0079498291015625,
0.070556640625,
-0.03045654296875,
0.0005369186401367188,
0.036285400390625,
0.0413818359375,
-0.06378173828125,
0.018341064453125,
0.0305328369140625,
0.0163116455078125,
0.0078277587890625,
0.01457977294921875,
-0.01305389404296875,
-0.036468505859375,
-0.0104827880859375,
-0.0206451416015625,
-0.0232086181640625,
-0.007221221923828125,
0.0083465576171875,
0.004638671875,
-0.0164337158203125,
0.045074462890625,
0.0184173583984375,
-0.050201416015625,
0.035675048828125,
0.03131103515625,
0.00212860107421875,
0.0162506103515625,
0.014190673828125,
-0.0246734619140625,
-0.022125244140625,
-0.0706787109375,
-0.017059326171875,
-0.036102294921875,
-0.0438232421875,
0.040130615234375,
-0.00714111328125,
0.0031757354736328125,
0.0404052734375,
-0.0216522216796875,
0.033599853515625,
0.00177764892578125,
-0.03753662109375,
-0.0648193359375,
-0.042144775390625,
0.01300811767578125,
0.07354736328125,
-0.0343017578125,
0.050140380859375,
0.0150299072265625,
-0.0303192138671875,
0.0015392303466796875,
-0.0272369384765625,
0.039703369140625,
-0.044464111328125,
-0.0008878707885742188,
0.0181427001953125,
0.0207977294921875,
0.0013132095336914062,
-0.004852294921875,
-0.0116119384765625,
-0.037445068359375,
0.0212554931640625,
-0.0088958740234375,
0.006496429443359375,
0.006038665771484375,
0.006561279296875,
-0.06964111328125,
0.084716796875,
0.0001609325408935547,
0.030242919921875,
0.0102996826171875,
0.018463134765625,
-0.026336669921875,
-0.0017862319946289062,
-0.053619384765625,
0.049713134765625,
-0.0207366943359375,
0.05255126953125,
-0.09661865234375,
-0.00850677490234375,
-0.01666259765625,
0.038177490234375,
0.0628662109375,
0.00042176246643066406,
-0.00968170166015625,
0.0006699562072753906,
0.07061767578125,
0.034759521484375,
0.0006103515625,
0.0210113525390625,
0.045562744140625,
0.090576171875,
0.1063232421875,
-0.039703369140625,
0.06658935546875,
-0.038299560546875,
0.0325927734375,
0.038970947265625,
0.0017824172973632812,
-0.02197265625,
-0.01285552978515625,
-0.032257080078125,
-0.0711669921875,
0.0090789794921875,
0.0244903564453125,
0.01508331298828125,
0.00402069091796875,
0.04010009765625,
0.0670166015625,
-0.03759765625,
-0.032684326171875,
-0.01441192626953125,
0.048065185546875,
0.0201263427734375,
-0.0067138671875,
0.0202484130859375,
0.017730712890625,
0.0222930908203125,
-0.0290069580078125,
-0.0135345458984375,
0.0164947509765625,
0.00046133995056152344,
0.07244873046875,
0.0247650146484375,
0.0139312744140625,
-0.0626220703125,
0.0010833740234375,
0.05694580078125,
0.08868408203125,
-0.06097412109375,
-0.0469970703125,
0.0193939208984375,
-0.0010137557983398438,
0.0009036064147949219,
0.0118255615234375,
0.00296783447265625,
0.0120086669921875,
0.051605224609375,
-0.02984619140625,
-0.005374908447265625,
0.0016841888427734375,
0.0256805419921875,
-0.03045654296875,
-0.07147216796875,
0.01293182373046875,
-0.006587982177734375,
-0.00943756103515625,
-0.016143798828125,
0.003032684326171875,
0.026214599609375,
0.01096343994140625,
0.0135955810546875,
-0.0318603515625,
0.0019054412841796875,
0.01137542724609375,
0.004924774169921875,
-0.0293121337890625,
0.016387939453125,
-0.020172119140625,
-0.031219482421875,
-0.0143280029296875,
0.0246734619140625,
0.05712890625,
-0.0109710693359375,
0.0322265625,
-0.0035686492919921875,
-0.027191162109375,
0.026580810546875,
0.036041259765625,
-0.00524139404296875,
-0.050933837890625,
-0.034393310546875,
-0.0031642913818359375,
0.005451202392578125,
0.00450897216796875,
0.03729248046875,
0.039276123046875,
-0.0112152099609375,
0.00016057491302490234,
0.050933837890625,
-0.005352020263671875,
-0.0237884521484375,
0.02093505859375,
-0.0249481201171875,
0.08905029296875,
0.01166534423828125,
-0.052154541015625,
-0.017913818359375,
-0.035675048828125,
-0.03179931640625,
0.003299713134765625,
0.03912353515625,
0.0139923095703125,
0.0077667236328125,
-0.01873779296875,
0.0013895034790039062,
0.0074920654296875,
-0.0099334716796875,
0.010894775390625,
-0.005992889404296875,
0.0128631591796875,
-0.003559112548828125,
-0.03289794921875,
-0.0268402099609375,
-0.0198516845703125,
0.0290374755859375,
0.002613067626953125,
0.05126953125,
-0.008514404296875,
0.0179901123046875,
-0.01438140869140625,
0.0272674560546875,
-0.049407958984375,
-0.0214996337890625,
0.00653076171875,
-0.0135650634765625,
0.01006317138671875,
0.0158538818359375,
0.02374267578125,
-0.0137176513671875,
0.04827880859375,
-0.032379150390625,
-0.047698974609375,
-0.0181121826171875,
0.039398193359375,
0.01178741455078125,
0.0017747879028320312,
-0.0300750732421875,
0.007568359375,
-0.02783203125,
-0.034637451171875,
0.03704833984375,
-0.0009565353393554688,
0.0087432861328125,
0.054229736328125,
-0.01459503173828125,
-0.049713134765625,
0.043975830078125,
-0.11285400390625,
0.050628662109375,
0.034942626953125,
0.00927734375,
0.01508331298828125,
-0.0187530517578125,
-0.042022705078125,
0.0239105224609375,
0.001110076904296875,
0.006622314453125,
-0.018890380859375,
0.0472412109375,
-0.0008606910705566406,
-0.010101318359375,
0.0212554931640625,
-0.040771484375,
0.0024204254150390625,
0.014801025390625,
0.0025119781494140625,
0.0012178421020507812,
-0.0635986328125,
-0.0280609130859375,
-0.051116943359375,
-0.0016078948974609375,
0.00457000732421875,
-0.005451202392578125,
-0.056976318359375,
0.005352020263671875,
0.01654052734375,
-0.0173187255859375,
0.0006661415100097656,
-0.036834716796875,
0.03509521484375,
-0.0328369140625,
-0.0255126953125,
-0.03143310546875,
-0.044830322265625,
0.033111572265625,
0.053497314453125,
0.002162933349609375,
0.02423095703125,
-0.001708984375,
-0.0232086181640625,
0.02691650390625,
0.02825927734375,
0.04241943359375,
-0.0350341796875,
-0.055938720703125,
0.0369873046875,
0.005115509033203125,
0.0770263671875,
0.01338958740234375,
-0.00344085693359375,
0.032928466796875,
0.00311279296875,
-0.031463623046875,
-0.07781982421875,
0.02581787109375,
-0.07891845703125,
-0.004779815673828125,
-0.0214385986328125,
0.0147705078125,
0.03326416015625,
-0.0238494873046875,
-0.040374755859375,
0.059478759765625,
-0.0195465087890625,
-0.0265960693359375,
-0.056304931640625,
0.01702880859375,
0.0067901611328125,
-0.0014219284057617188,
-0.007965087890625,
-0.015625,
-0.025115966796875,
0.0175933837890625,
-0.0010509490966796875,
0.023223876953125,
0.020416259765625,
0.011322021484375,
-0.07135009765625,
-0.0211944580078125,
-0.03277587890625,
-0.01763916015625,
-0.004638671875,
-0.0009479522705078125,
0.002262115478515625,
0.044342041015625,
-0.0227203369140625,
-0.0537109375,
-0.0027828216552734375,
-0.01021575927734375,
0.007396697998046875,
-0.005298614501953125,
-0.033050537109375,
-0.0243682861328125,
0.0247802734375,
0.03387451171875,
0.0192108154296875,
-0.00811004638671875,
-0.0288543701171875,
-0.00962066650390625,
-0.0228118896484375,
-0.0149078369140625,
0.04632568359375,
-0.09564208984375,
-0.0127716064453125,
0.027923583984375,
-0.002063751220703125,
0.007495880126953125,
-0.0269012451171875,
-0.0181427001953125,
-0.03369140625,
-0.045928955078125,
-0.01715087890625,
0.0023174285888671875,
-0.033477783203125,
0.0035266876220703125,
-0.0158233642578125,
0.004352569580078125,
0.00565338134765625,
0.0207061767578125,
-0.0074920654296875,
0.049407958984375,
0.00841522216796875,
-0.0042266845703125,
-0.0158843994140625,
0.005977630615234375,
0.0177459716796875,
-0.01367950439453125,
0.01593017578125,
-0.0241546630859375,
0.008636474609375,
0.0056610107421875,
-0.0205535888671875,
0.0003170967102050781,
0.033355712890625,
0.024566650390625,
-0.012908935546875,
0.0283050537109375,
0.02227783203125,
0.0078277587890625,
0.01108551025390625,
0.0221405029296875,
-0.0090789794921875,
-0.02947998046875,
0.0164642333984375,
-0.0467529296875,
0.008575439453125,
0.00951385498046875,
-0.0011701583862304688,
-0.020660400390625,
0.0213470458984375,
0.01331329345703125,
-0.0216217041015625,
0.0166015625
] |
9d206264b256f9df8d3093a3e3f0e1ba51be1e65
|
Wordpress Stackexchange
Q: External WordPress API I'd like to manipulate a WordPress website from another program/website. IS there an API already written that provides access, and authentication, to do this?
Ideally, I'll be using a multi-site wordpress instance and I want an outside program to add new sites, send config options to plugins, etc.
A: WordPpress platform provides XML-RPC support which you can use to maintain your WP site. You also enable to extend functionality of build in xml-rpc methods to use it for your needs.
|
Q: External WordPress API I'd like to manipulate a WordPress website from another program/website. IS there an API already written that provides access, and authentication, to do this?
Ideally, I'll be using a multi-site wordpress instance and I want an outside program to add new sites, send config options to plugins, etc.
A: WordPpress platform provides XML-RPC support which you can use to maintain your WP site. You also enable to extend functionality of build in xml-rpc methods to use it for your needs.
A: There are multiple API plugins out there that work very well:
WP-API by Ryan McCue
https://github.com/WP-API/WP-API
and JSON API by Dan Phiffer:
http://wordpress.org/plugins/json-api/
A: As of Wordpress 4.7 (released December 2016), a REST API is provided out of the box on Wordpress.
As you're probably aware, REST APIs are interfaced with by standard HTTP GET and POST requests, so if you have a Wordpress 4.7 installation, you can access it at this URL, by plugging this into your browser:
http://your.site.com/wp/v2/posts
Further reading:
*
*WP REST API, User Guide
*WP REST API, Developer's Guide
Important side note:
Because this is turned on be default, because this exposes endpoints that can changes your data (via POST/PATCH/DELETE requests), and because Wordpress prefers you not to disable it, you really really ought to turn on some form of authentication. Thankfully, turning on basic WP logged-in authentication isn't particularly hard, and there are plugins that will enable OAuth.
|
wordpress
|
{
"language": "en",
"length": 238,
"provenance": "stackexchange_00019.jsonl.gz:428409",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83592"
}
|
[
0.02923583984375,
-0.0184478759765625,
0.0246734619140625,
0.0198822021484375,
-0.00704193115234375,
-0.0167388916015625,
0.042938232421875,
-0.03765869140625,
-0.01605224609375,
-0.0220947265625,
-0.051116943359375,
0.00841522216796875,
-0.0287322998046875,
-0.0222625732421875,
0.04656982421875,
-0.061798095703125,
0.005767822265625,
0.0099334716796875,
0.0286712646484375,
-0.02117919921875,
0.0005855560302734375,
-0.01141357421875,
0.032623291015625,
-0.003570556640625,
0.00830841064453125,
-0.0019512176513671875,
0.032135009765625,
-0.0197296142578125,
0.02569580078125,
-0.0039520263671875,
0.01399993896484375,
-0.04144287109375,
0.01488494873046875,
0.061187744140625,
-0.0533447265625,
-0.004726409912109375,
-0.00405120849609375,
0.01873779296875,
0.0030155181884765625,
0.040985107421875,
0.02850341796875,
0.0030345916748046875,
-0.0009350776672363281,
0.061492919921875,
-0.0189208984375,
-0.038818359375,
0.0229644775390625,
-0.049102783203125,
-0.0070648193359375,
0.0347900390625,
0.0255279541015625,
-0.00959014892578125,
0.0306243896484375,
0.02606201171875,
-0.005634307861328125,
-0.003879547119140625,
0.03411865234375,
-0.0160980224609375,
0.032501220703125,
-0.052001953125,
-0.05804443359375,
-0.01222991943359375,
0.037261962890625,
0.00388336181640625,
0.01010894775390625,
0.0029888153076171875,
0.009002685546875,
0.039794921875,
-0.0323486328125,
-0.0083465576171875,
0.001155853271484375,
-0.0274658203125,
-0.00969696044921875,
0.0092010498046875,
-0.0222625732421875,
-0.0560302734375,
0.0443115234375,
-0.044830322265625,
-0.004024505615234375,
0.027801513671875,
0.001251220703125,
0.01505279541015625,
-0.0005884170532226562,
-0.036346435546875,
0.0011758804321289062,
-0.006977081298828125,
-0.005558013916015625,
-0.008209228515625,
-0.0291748046875,
0.0172119140625,
-0.0152587890625,
-0.035400390625,
-0.02838134765625,
0.04132080078125,
0.0029125213623046875,
0.00882720947265625,
-0.0270233154296875,
-0.06427001953125,
0.000018656253814697266,
0.022796630859375,
0.052764892578125,
-0.0634765625,
0.0863037109375,
-0.0176849365234375,
-0.02227783203125,
0.0163116455078125,
0.058349609375,
0.009033203125,
-0.018157958984375,
-0.0207977294921875,
-0.045562744140625,
0.0168914794921875,
0.04541015625,
0.006710052490234375,
-0.018524169921875,
-0.0562744140625,
-0.0156707763671875,
0.0277557373046875,
-0.004123687744140625,
-0.041717529296875,
-0.0306243896484375,
-0.02191162109375,
0.006282806396484375,
-0.01190185546875,
0.010345458984375,
-0.015899658203125,
-0.0341796875,
0.0294647216796875,
-0.023956298828125,
0.0135040283203125,
-0.01776123046875,
0.01245880126953125,
0.015899658203125,
0.021728515625,
-0.02117919921875,
-0.0020885467529296875,
0.07275390625,
0.02783203125,
0.0026340484619140625,
-0.020233154296875,
0.042022705078125,
-0.0008907318115234375,
-0.06036376953125,
0.0075225830078125,
0.043060302734375,
0.002864837646484375,
0.0236968994140625,
0.0170440673828125,
0.01300811767578125,
0.035491943359375,
0.007381439208984375,
0.01380157470703125,
-0.035430908203125,
0.01885986328125,
0.12384033203125,
-0.0179443359375,
0.05078125,
-0.0274200439453125,
0.0457763671875,
0.025146484375,
-0.038970947265625,
-0.01010894775390625,
0.037689208984375,
-0.0115966796875,
-0.019195556640625,
0.019287109375,
0.004894256591796875,
-0.01050567626953125,
0.0244598388671875,
0.047882080078125,
-0.00014400482177734375,
-0.0184783935546875,
0.02825927734375,
0.0272674560546875,
-0.0008177757263183594,
0.024566650390625,
0.0005655288696289062,
0.04986572265625,
0.01446533203125,
0.01503753662109375,
0.0340576171875,
-0.03680419921875,
0.08575439453125,
-0.0213470458984375,
-0.0445556640625,
0.0391845703125,
0.0008330345153808594,
0.06304931640625,
0.003665924072265625,
0.0198211669921875,
-0.0181427001953125,
0.0047607421875,
-0.00685882568359375,
0.0225372314453125,
-0.024749755859375,
-0.01512908935546875,
-0.0107879638671875,
0.0263519287109375,
-0.032806396484375,
-0.01165771484375,
-0.0212860107421875,
0.026947021484375,
-0.017730712890625,
0.020599365234375,
-0.00026345252990722656,
-0.0033817291259765625,
0.00002181529998779297,
0.024139404296875,
0.019317626953125,
0.00801849365234375,
0.01175689697265625,
-0.001312255859375,
-0.00855255126953125,
-0.0123138427734375,
-0.0298919677734375,
-0.005008697509765625,
-0.0274200439453125,
0.05322265625,
0.00890350341796875,
0.01381683349609375,
0.01457977294921875,
-0.04791259765625,
0.0135955810546875,
-0.00952911376953125,
0.038970947265625,
-0.034149169921875,
-0.009796142578125,
-0.033233642578125,
0.038818359375,
-0.0222625732421875,
0.0172119140625,
0.052154541015625,
0.03173828125,
0.04241943359375,
0.017486572265625,
-0.00991058349609375,
0.01309967041015625,
-0.0931396484375,
0.021636962890625,
0.051055908203125,
0.0032405853271484375,
0.02972412109375,
-0.01194000244140625,
0.0284271240234375,
0.0119476318359375,
-0.031585693359375,
0.00981903076171875,
0.00021791458129882812,
0.027374267578125,
0.01555633544921875,
-0.055816650390625,
-0.043670654296875,
0.037384033203125,
-0.0758056640625,
-0.0102996826171875,
0.031036376953125,
0.00807952880859375,
0.01358795166015625,
-0.005340576171875,
-0.01485443115234375,
0.01495361328125,
-0.005580902099609375,
-0.043670654296875,
0.0106658935546875,
0.0328369140625,
-0.0005359649658203125,
0.060455322265625,
0.037628173828125,
0.01316070556640625,
-0.0394287109375,
0.000896453857421875,
0.0188140869140625,
0.010162353515625,
0.03680419921875,
0.02935791015625,
0.0177001953125,
-0.01678466796875,
-0.025604248046875,
0.01093292236328125,
0.026641845703125,
-0.0240020751953125,
0.02752685546875,
-0.03509521484375,
-0.0000095367431640625,
-0.0244598388671875,
-0.056732177734375,
-0.0004551410675048828,
0.025665283203125,
0.0119781494140625,
0.0028896331787109375,
0.01493072509765625,
0.03692626953125,
-0.01483917236328125,
0.03961181640625,
0.0003924369812011719,
-0.010833740234375,
0.00226593017578125,
-0.0280609130859375,
0.032012939453125,
-0.023895263671875,
0.01560211181640625,
0.06524658203125,
-0.0004544258117675781,
0.012115478515625,
-0.00786590576171875,
0.0023136138916015625,
-0.00839996337890625,
-0.005710601806640625,
-0.007770538330078125,
-0.0240631103515625,
-0.0445556640625,
-0.004718780517578125,
-0.003841400146484375,
-0.013214111328125,
-0.016448974609375,
-0.0626220703125,
-0.038848876953125,
-0.01751708984375,
-0.1326904296875,
-0.06597900390625,
0.0182342529296875,
-0.05450439453125,
0.01203155517578125,
-0.01219940185546875,
-0.03369140625,
-0.017364501953125,
0.00386810302734375,
0.0014057159423828125,
0.0213470458984375,
-0.0672607421875,
-0.0234527587890625,
-0.08966064453125,
-0.07843017578125,
-0.0675048828125,
0.01739501953125,
-0.00965118408203125,
0.0031490325927734375,
0.05120849609375,
-0.01096343994140625,
-0.0611572265625,
-0.0244293212890625,
0.0311431884765625,
-0.00778961181640625,
-0.0158538818359375,
-0.0313720703125,
-0.0115966796875,
-0.0278472900390625,
-0.0014238357543945312,
0.064453125,
0.01020050048828125,
-0.02197265625,
0.01922607421875,
0.00043773651123046875,
0.0030269622802734375,
-0.01270294189453125,
-0.015838623046875,
0.02783203125,
-0.017730712890625,
-0.06549072265625,
-0.064453125,
0.01276397705078125,
0.009033203125,
-0.02008056640625,
-0.0215606689453125,
0.017303466796875,
-0.044464111328125,
0.01157379150390625,
-0.038818359375,
-0.016082763671875,
-0.00756072998046875,
-0.014068603515625,
-0.03192138671875,
0.0673828125,
-0.00908660888671875,
-0.020904541015625,
-0.01003265380859375,
0.0137786865234375,
-0.0289306640625,
-0.032684326171875,
-0.01001739501953125,
-0.0224151611328125,
-0.0229034423828125,
0.018280029296875,
-0.020416259765625,
-0.0011501312255859375,
0.046875,
0.01274871826171875,
0.0126190185546875,
0.0107421875,
-0.021240234375,
0.033660888671875,
0.0667724609375,
-0.00618743896484375,
-0.005001068115234375,
0.04876708984375,
0.01617431640625,
-0.03460693359375,
-0.00373077392578125,
-0.060394287109375,
-0.01331329345703125,
0.001560211181640625,
-0.003040313720703125,
-0.016998291015625,
0.0089569091796875,
-0.004154205322265625,
0.002315521240234375,
0.0162506103515625,
-0.0194549560546875,
0.00896453857421875,
-0.0146026611328125,
0.0261383056640625,
-0.03350830078125,
0.0310516357421875,
-0.0457763671875,
0.01468658447265625,
-0.03948974609375,
-0.06903076171875,
-0.00946044921875,
-0.02471923828125,
0.050689697265625,
0.00543212890625,
-0.01873779296875,
-0.0012636184692382812,
0.042694091796875,
-0.0181884765625,
-0.027313232421875,
-0.020721435546875,
0.0108184814453125,
-0.0201416015625,
-0.016357421875,
-0.040985107421875,
-0.01641845703125,
-0.0074920654296875,
-0.0176849365234375,
-0.036895751953125,
-0.0203399658203125,
-0.0187530517578125,
-0.0296783447265625,
0.021881103515625,
-0.0298614501953125,
-0.01300811767578125,
-0.02288818359375,
0.0164031982421875,
0.01910400390625,
-0.034088134765625,
0.040313720703125,
-0.005451202392578125,
-0.00313568115234375,
0.028564453125,
0.0115203857421875,
-0.01418304443359375,
-0.00251007080078125,
0.055755615234375,
0.01125335693359375,
-0.01299285888671875,
-0.058319091796875,
-0.02178955078125,
0.0228729248046875,
-0.0259246826171875,
0.041595458984375,
0.032135009765625,
-0.00656890869140625,
0.040374755859375,
0.0015354156494140625,
0.021148681640625,
0.003154754638671875,
0.0145111083984375,
0.021240234375,
0.019287109375,
-0.00434112548828125,
0.037567138671875,
-0.01947021484375,
-0.0153656005859375,
-0.0179901123046875,
-0.003231048583984375,
-0.00994873046875,
0.00418853759765625,
-0.0090179443359375,
0.0237579345703125,
-0.0180816650390625,
0.00567626953125,
0.00800323486328125,
-0.002063751220703125,
-0.033111572265625,
0.0150909423828125,
0.00390625,
-0.059478759765625,
-0.0455322265625,
0.013671875,
-0.020660400390625,
0.02825927734375,
-0.06121826171875,
0.02252197265625,
-0.01515960693359375,
-0.01214599609375,
-0.02508544921875,
-0.01495361328125,
0.059173583984375,
-0.0245513916015625,
-0.062286376953125,
-0.00650787353515625,
-0.017730712890625,
0.0026302337646484375,
0.046051025390625,
0.0006542205810546875,
0.029693603515625,
-0.01053619384765625,
-0.0171356201171875,
-0.0226898193359375,
-0.03460693359375,
-0.0309906005859375,
-0.049407958984375,
-0.07452392578125,
-0.04229736328125,
-0.0087890625,
0.007244110107421875,
0.04913330078125,
-0.04315185546875,
0.04962158203125,
-0.007114410400390625,
0.056732177734375,
0.0178070068359375,
0.015960693359375,
-0.005886077880859375,
-0.003391265869140625,
0.03411865234375,
-0.0269622802734375,
0.00539398193359375,
-0.00860595703125,
-0.0262451171875,
0.050567626953125,
0.024505615234375,
0.0333251953125,
0.0307159423828125,
-0.021697998046875,
0.0187225341796875,
-0.022308349609375,
0.015960693359375,
0.0230712890625,
-0.01374053955078125,
0.0037841796875,
0.0357666015625,
0.0188751220703125,
0.0130462646484375,
0.00841522216796875,
0.01317596435546875,
0.035400390625,
0.00957489013671875,
0.004364013671875,
-0.031646728515625,
0.00838470458984375,
0.01641845703125,
0.015777587890625,
-0.0182952880859375,
-0.018310546875,
-0.043243408203125,
-0.00217437744140625,
-0.0278167724609375,
-0.0061798095703125,
0.06085205078125,
-0.02459716796875,
-0.02520751953125,
-0.0226287841796875,
0.045257568359375,
-0.0599365234375,
-0.00827789306640625,
0.06439208984375,
0.034027099609375,
-0.037628173828125,
0.01003265380859375,
-0.0489501953125,
-0.0223846435546875,
-0.01436614990234375,
-0.038787841796875,
-0.049652099609375,
-0.03271484375,
0.0002872943878173828,
0.0101318359375,
0.002689361572265625,
0.0233917236328125,
-0.01462554931640625,
0.032073974609375,
-0.0166015625,
0.0265045166015625,
0.00640106201171875,
0.078369140625,
-0.046661376953125,
0.05523681640625,
0.0237274169921875,
0.038970947265625,
-0.0487060546875,
-0.01221466064453125,
0.01181793212890625,
-0.0626220703125,
-0.0340576171875,
-0.032501220703125,
-0.00698089599609375,
0.03436279296875,
0.0209808349609375,
-0.0010366439819335938,
0.006893157958984375,
-0.06390380859375,
-0.0120849609375,
-0.025909423828125,
0.062164306640625,
-0.0672607421875,
-0.0269317626953125,
-0.004283905029296875,
-0.00496673583984375,
0.0302734375,
-0.038970947265625,
-0.0272064208984375,
0.01458740234375,
0.01494598388671875,
0.01264190673828125,
0.0273895263671875,
-0.01708984375,
0.0189971923828125,
0.09564208984375,
0.00379180908203125,
0.050018310546875,
0.0555419921875,
0.0036907196044921875,
0.0303802490234375,
0.0014581680297851562,
-0.045013427734375,
0.0145416259765625,
-0.026336669921875,
-0.021331787109375,
-0.01529693603515625,
-0.05047607421875,
-0.01128387451171875,
0.0018177032470703125,
0.0228271484375,
0.07373046875,
-0.046783447265625,
0.002689361572265625,
0.031005859375,
-0.01387786865234375,
-0.01334381103515625,
0.0019989013671875,
-0.0251922607421875,
-0.02862548828125,
0.004535675048828125,
-0.0192718505859375,
-0.0254364013671875,
-0.0007686614990234375,
0.021331787109375,
-0.0171051025390625,
-0.0272064208984375,
0.057647705078125,
0.03961181640625,
0.022247314453125,
0.05206298828125,
-0.0250244140625,
0.08135986328125,
-0.03521728515625,
0.00948333740234375,
0.0283660888671875,
-0.0298919677734375,
-0.07452392578125,
0.01849365234375,
-0.0129241943359375,
-0.019012451171875,
-0.0227813720703125,
-0.01849365234375,
0.039947509765625,
0.0384521484375,
-0.0289459228515625,
0.0204315185546875,
0.00841522216796875,
0.040313720703125,
-0.01654052734375,
-0.059478759765625,
0.025146484375,
0.0380859375,
-0.0736083984375,
0.02764892578125,
-0.00827789306640625,
-0.030487060546875,
-0.0005297660827636719,
0.01019287109375,
0.033660888671875,
-0.004711151123046875,
-0.0113525390625,
0.06463623046875,
0.020782470703125,
-0.04443359375,
0.0027904510498046875,
-0.0333251953125,
-0.056365966796875,
-0.063720703125,
-0.01094818115234375,
-0.08587646484375,
0.0218963623046875,
-0.01654052734375,
-0.046875,
0.1148681640625,
-0.0225982666015625,
0.016510009765625,
0.032745361328125,
0.033294677734375,
-0.04486083984375,
0.00711822509765625,
-0.02484130859375,
0.038970947265625,
0.01971435546875,
-0.004322052001953125,
-0.04583740234375,
-0.0173187255859375,
-0.0283203125,
0.0487060546875,
0.02142333984375,
0.0084991455078125,
-0.044525146484375,
0.00966644287109375,
-0.00980377197265625,
-0.032958984375,
-0.026458740234375,
0.07391357421875,
-0.004909515380859375,
0.006031036376953125,
0.005359649658203125,
-0.029083251953125,
0.00940704345703125,
-0.01849365234375,
0.00618743896484375,
0.0252532958984375,
-0.003971099853515625,
-0.01030731201171875,
0.0027294158935546875,
0.0250701904296875,
-0.0283355712890625,
0.00384521484375,
-0.002948760986328125,
0.0330810546875,
-0.017120361328125,
-0.019317626953125,
-0.04864501953125,
-0.036590576171875,
0.01641845703125,
-0.0284271240234375,
0.01323699951171875,
-0.0293121337890625,
0.014556884765625,
0.03436279296875,
0.0325927734375,
0.0290985107421875,
-0.0209197998046875,
0.0056915283203125,
-0.0007643699645996094,
-0.01331329345703125,
0.054412841796875,
0.0253753662109375,
0.0277557373046875,
-0.0254058837890625,
-0.00566864013671875,
0.004650115966796875,
0.060394287109375,
-0.039764404296875,
-0.01242828369140625,
0.004642486572265625,
0.0143890380859375,
0.008209228515625,
-0.0015783309936523438,
0.04217529296875,
0.01511383056640625,
0.0301513671875,
-0.0214385986328125,
0.022216796875,
0.042999267578125,
0.02764892578125,
0.014190673828125,
0.022186279296875,
-0.07861328125,
-0.0110015869140625,
0.005023956298828125,
-0.0302734375,
-0.005886077880859375,
0.035614013671875,
0.0176544189453125,
0.040618896484375,
-0.060516357421875,
-0.005153656005859375,
-0.0017461776733398438,
0.03704833984375,
0.0340576171875,
-0.019866943359375,
-0.0180816650390625,
-0.052032470703125,
0.0284271240234375,
0.03216552734375,
0.00440216064453125,
0.01885986328125,
0.04974365234375,
0.03240966796875,
-0.031585693359375,
-0.0090789794921875,
0.020172119140625,
-0.0245361328125,
-0.007404327392578125,
-0.041900634765625,
-0.02606201171875,
-0.018035888671875,
-0.0266876220703125,
0.02178955078125,
0.006320953369140625,
-0.0018491744995117188,
-0.05511474609375,
0.057861328125,
-0.016387939453125,
0.0071868896484375,
0.04547119140625,
0.012420654296875,
0.0205535888671875,
-0.0178680419921875,
-0.093994140625,
-0.0293731689453125,
-0.016937255859375,
0.0010957717895507812,
0.04034423828125,
0.052032470703125,
-0.01220703125,
0.018157958984375,
0.01068115234375,
-0.016510009765625,
0.025848388671875,
-0.00930023193359375,
-0.0088043212890625,
-0.0260772705078125,
0.00888824462890625,
-0.0228729248046875,
-0.060516357421875,
-0.03143310546875,
-0.04547119140625,
0.0523681640625,
0.034149169921875,
0.053680419921875,
-0.0136871337890625,
0.048583984375,
0.004894256591796875,
-0.0263671875,
0.03143310546875,
-0.006023406982421875,
-0.00376129150390625,
0.035980224609375,
0.0255889892578125,
-0.00801849365234375,
-0.049530029296875,
-0.005687713623046875,
0.031829833984375,
-0.00250244140625,
0.0151519775390625,
-0.0300445556640625,
0.0294647216796875,
-0.00823974609375,
0.0028018951416015625,
-0.045501708984375,
-0.04290771484375,
-0.00817108154296875,
0.0208587646484375,
-0.0192718505859375,
-0.0066070556640625,
0.01068115234375,
0.0137481689453125,
-0.0226287841796875,
-0.0016775131225585938,
-0.0007052421569824219,
-0.00033974647521972656,
-0.00296783447265625,
0.007236480712890625,
-0.016632080078125,
-0.0183258056640625,
-0.0039520263671875,
-0.023773193359375,
-0.0165252685546875,
0.01448822021484375,
0.0153656005859375,
0.001529693603515625,
0.0030364990234375,
-0.052001953125,
0.008026123046875,
0.040557861328125,
0.0238037109375,
0.037322998046875,
-0.04107666015625,
-0.011077880859375,
-0.005992889404296875,
0.0142364501953125,
-0.0216064453125,
-0.039764404296875,
0.02288818359375,
0.006244659423828125,
-0.001056671142578125,
-0.01416778564453125,
-0.03155517578125,
-0.0207366943359375,
0.029632568359375,
0.0149993896484375,
-0.0333251953125,
-0.0016279220581054688,
-0.005645751953125,
-0.0010519027709960938,
0.0239410400390625,
-0.00319671630859375,
0.01497650146484375,
0.0272064208984375,
-0.0457763671875,
-0.056549072265625,
-0.01220703125,
0.03338623046875,
-0.03680419921875,
0.0252685546875,
0.0364990234375,
-0.0309906005859375,
0.0052032470703125,
0.0298919677734375,
0.0290374755859375,
0.06494140625,
-0.00266265869140625,
-0.004978179931640625,
0.00720977783203125,
0.011016845703125,
-0.00591278076171875,
-0.054168701171875,
-0.00351715087890625,
-0.032623291015625,
-0.0166473388671875,
-0.03204345703125,
-0.013946533203125,
-0.005733489990234375,
-0.058197021484375,
-0.09014892578125,
0.0176239013671875,
-0.01016998291015625,
-0.0379638671875,
-0.0579833984375,
0.025604248046875,
0.01065826416015625,
-0.0435791015625,
-0.03436279296875,
0.002193450927734375,
-0.004985809326171875,
0.044677734375,
0.0116119384765625,
-0.01416778564453125,
0.00101470947265625,
0.00749969482421875,
-0.0223541259765625,
0.04803466796875,
0.039398193359375,
-0.017913818359375,
-0.0029621124267578125,
-0.02789306640625,
0.03369140625,
0.04669189453125,
-0.021148681640625,
-0.03277587890625,
0.0146484375,
-0.01369476318359375,
-0.02679443359375,
0.0172271728515625,
-0.044525146484375,
-0.0117340087890625,
0.04840087890625,
0.0960693359375,
0.01471710205078125,
-0.032745361328125,
-0.0028896331787109375,
-0.016357421875,
0.0123291015625,
-0.02569580078125,
-0.001560211181640625,
-0.038482666015625,
-0.005008697509765625,
-0.0155792236328125,
-0.01096343994140625,
0.0084991455078125,
-0.0029659271240234375,
-0.0013256072998046875,
0.0222320556640625,
0.05670166015625,
-0.0226898193359375,
0.047119140625,
-0.0157318115234375,
0.08380126953125,
-0.04949951171875,
0.01904296875,
0.0047760009765625,
0.0186309814453125,
0.048126220703125,
-0.00201416015625,
-0.01055908203125,
0.0268402099609375,
-0.03546142578125,
0.00222015380859375,
0.0033702850341796875,
0.039947509765625,
-0.0171966552734375,
-0.005069732666015625,
-0.0177459716796875,
0.034698486328125,
0.00443267822265625,
0.044403076171875,
-0.0252227783203125,
0.07452392578125,
0.036346435546875,
0.032135009765625,
-0.025238037109375,
-0.0269317626953125,
-0.056884765625,
0.0623779296875,
-0.0447998046875,
-0.00014531612396240234,
-0.025390625,
-0.0138397216796875,
-0.00498199462890625,
0.0167236328125,
-0.05560302734375,
-0.041595458984375,
0.024139404296875,
0.051849365234375,
-0.006122589111328125,
0.021942138671875
] |
623c3e7cd6ef0b53a9f6915cfd180ff932718a8f
|
Wordpress Stackexchange
Q: Given a WP_Query, how can I get a list of tags? I have a new WP_Query that I use to generate a custom loop and display a set of posts. One of the things the query does is provide pagination.
Before I display the queried posts though, I'd like to get a list of all the tags for the posts found. I know I can do this by looping through each of the posts and then removing duplicates, but I was hoping for a more elegant approach.
A: For the sake of posterity, I ended up just iterating through the loop twice: once to get the tags, and then to actually display the page.
Here's my code:
if ( have_posts() ) :
// get tags for found posts
$recent_tags = array();
while ( $loop->have_posts() ) : $loop->the_post();
foreach(get_the_tags() as $t) $recent_tags[$t->slug] = $t->name; // this adds to the array in the form ['slug']=>'name'
endwhile;
// de-dupe
$recent_tags = array_unique($recent_tags);
// sort
natcasesort($recent_tags);
// do something with the array
while ( $loop->have_posts() ) : $loop->the_post();
// normal wp loop
|
Q: Given a WP_Query, how can I get a list of tags? I have a new WP_Query that I use to generate a custom loop and display a set of posts. One of the things the query does is provide pagination.
Before I display the queried posts though, I'd like to get a list of all the tags for the posts found. I know I can do this by looping through each of the posts and then removing duplicates, but I was hoping for a more elegant approach.
A: For the sake of posterity, I ended up just iterating through the loop twice: once to get the tags, and then to actually display the page.
Here's my code:
if ( have_posts() ) :
// get tags for found posts
$recent_tags = array();
while ( $loop->have_posts() ) : $loop->the_post();
foreach(get_the_tags() as $t) $recent_tags[$t->slug] = $t->name; // this adds to the array in the form ['slug']=>'name'
endwhile;
// de-dupe
$recent_tags = array_unique($recent_tags);
// sort
natcasesort($recent_tags);
// do something with the array
while ( $loop->have_posts() ) : $loop->the_post();
// normal wp loop
A: Getting the tags of multiple posts can be achieved by passing 'object_ids' to get_terms().
First, let another WP_Query return you only the IDs of your desired posts. For example get all posts of a given category:
// Get the posts.
$category = get_queried_object();
$args = [
'cat' => $category->term_id,
'fields' => 'ids',
];
$the_query = new WP_Query($args);
Now that you have the IDs you can simply hand them over to get_terms() and will be returned a list of all tags of these selected posts:
// Get the terms of these posts.
if ($the_query->have_posts()) {
$terms = get_terms([
'taxonomy' => 'post_tag',
'object_ids' => $the_query->posts,
]);
}
Source: https://developer.wordpress.org/reference/classes/wp_term_query/__construct/#comment-2500
A: I don't think that is possible. The SQL query performed by WP_Query returns only the post objects (and perhaps some metadata), while the tags resides in a different table. When looping through the returned posts in templates you usually put the_tags(); or something similar in your templates, which in turns runs a new database query for each post.
However, you could run a separate query to load the tags prior to running your primary posts query. As far as I know there is no function WordPress API that will let you load the tags of more than one post at the time, but you could accomplish that by directly calling $wpdb.
Something like this might help get you started:
global $wpdb;
$sql = $wpdb->prepare(
"SELECT DISTINCT $wbdb->terms.* FROM $wbdb->term_relationships
JOIN $wbdb->posts
ON $wbdb->posts.ID = $wbdb->term_relationships.object_id
JOIN $wbdb->term_taxonomy
ON $wbdb->term_taxonomy.term_taxonomy_id = $wbdb->term_taxonomy.term_taxonomy_id
JOIN $wbdb->terms
ON $wbdb->term_taxonomy.term_id = $wbdb->terms.term_id
WHERE $wbdb->term_taxonomy.taxonomy = 'post_tag'
AND $wbdb->posts.ID IN (1,2,3,4,5,6,7,8,9,10)"
);
$tags = $wpdb->query($sql);
As you can see this assumes that you know your post IDs beforehand, which you most likely does not. In that case you would need to replace the lists in the parentheses with a subquery, which in it's simplest form would be SELECT ID FROM $wpdb->posts, but more likely will need to filter/order/limit posts by category, date, etc. A problem I encountered is that my version of MySQL did not support LIMIT in subqueries. If yours doesn't either it might be hard to accomplish this in one query. Unless you have a lot of posts you could just loop through your WP_Query first and collect the post IDs. In any case, this will be faster than running separate queries for each post since you will only run one tag-related query instead of running one for each post.
|
wordpress
|
{
"language": "en",
"length": 584,
"provenance": "stackexchange_00019.jsonl.gz:428410",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83594"
}
|
[
0.06475830078125,
0.00899505615234375,
-0.0004715919494628906,
-0.0130615234375,
0.057403564453125,
-0.0428466796875,
0.1063232421875,
-0.01568603515625,
0.040313720703125,
0.0328369140625,
-0.0401611328125,
-0.0031452178955078125,
-0.0261383056640625,
-0.004070281982421875,
-0.0391845703125,
-0.039764404296875,
0.048919677734375,
-0.0374755859375,
0.05615234375,
0.0120086669921875,
0.014892578125,
0.04180908203125,
0.05902099609375,
0.04248046875,
-0.00551605224609375,
-0.00650787353515625,
0.038970947265625,
-0.0055694580078125,
-0.00460052490234375,
-0.029266357421875,
0.006412506103515625,
0.016510009765625,
0.0091705322265625,
0.00600433349609375,
-0.01007080078125,
-0.0325927734375,
0.018951416015625,
-0.0184326171875,
-0.00391387939453125,
0.021484375,
0.019378662109375,
-0.005401611328125,
-0.0016384124755859375,
0.01120758056640625,
-0.02783203125,
-0.03326416015625,
0.040130615234375,
-0.0150604248046875,
0.02093505859375,
0.0009617805480957031,
0.03143310546875,
-0.015655517578125,
0.0258636474609375,
-0.016571044921875,
-0.018524169921875,
0.01233673095703125,
0.0091094970703125,
-0.030792236328125,
0.036834716796875,
-0.037994384765625,
-0.03173828125,
-0.02703857421875,
0.050323486328125,
0.0162353515625,
-0.01363372802734375,
0.005329132080078125,
0.05670166015625,
0.000774383544921875,
-0.026153564453125,
-0.032501220703125,
0.0193939208984375,
-0.021270751953125,
-0.0006923675537109375,
-0.0164337158203125,
0.0102081298828125,
-0.039642333984375,
-0.0057373046875,
-0.04443359375,
0.0007953643798828125,
0.0160064697265625,
-0.01090240478515625,
-0.033172607421875,
-0.05096435546875,
0.0291900634765625,
-0.03533935546875,
0.022705078125,
-0.00829315185546875,
0.0088653564453125,
-0.0187835693359375,
-0.0310516357421875,
-0.0240631103515625,
-0.0128173828125,
-0.0079803466796875,
0.0018367767333984375,
-0.022491455078125,
-0.0255126953125,
0.046905517578125,
0.0421142578125,
0.0011434555053710938,
-0.004364013671875,
-0.00258636474609375,
-0.056915283203125,
0.01168060302734375,
-0.0218353271484375,
0.0284271240234375,
0.004108428955078125,
-0.025665283203125,
0.031982421875,
0.08380126953125,
0.05755615234375,
0.00726318359375,
0.020172119140625,
-0.028167724609375,
-0.041534423828125,
-0.011383056640625,
0.0384521484375,
-0.035400390625,
-0.0147857666015625,
0.001018524169921875,
-0.0149688720703125,
-0.004985809326171875,
0.0131988525390625,
-0.019317626953125,
0.02667236328125,
-0.004604339599609375,
0.0175628662109375,
0.0195159912109375,
-0.027435302734375,
-0.007389068603515625,
0.036102294921875,
-0.0193939208984375,
-0.011932373046875,
0.0281982421875,
0.0126800537109375,
-0.01258087158203125,
-0.03350830078125,
-0.008087158203125,
-0.048126220703125,
-0.01305389404296875,
0.0220184326171875,
-0.03143310546875,
-0.033477783203125,
0.02044677734375,
-0.03057861328125,
0.057464599609375,
0.016815185546875,
0.0168609619140625,
-0.00650787353515625,
0.01470184326171875,
-0.0072479248046875,
0.0235137939453125,
-0.016326904296875,
0.021270751953125,
-0.0198974609375,
0.01209259033203125,
-0.0285797119140625,
-0.007343292236328125,
-0.0123748779296875,
0.0054473876953125,
-0.0295257568359375,
0.024932861328125,
-0.001873016357421875,
-0.0017080307006835938,
-0.0123291015625,
-0.0435791015625,
0.005664825439453125,
-0.0333251953125,
-0.005565643310546875,
0.02874755859375,
0.002933502197265625,
0.01396942138671875,
-0.020599365234375,
0.07305908203125,
0.016387939453125,
-0.015228271484375,
0.02447509765625,
-0.01345062255859375,
0.01168060302734375,
0.038482666015625,
-0.0043792724609375,
-0.036041259765625,
-0.03265380859375,
0.0308990478515625,
-0.0095672607421875,
-0.05865478515625,
0.01522064208984375,
0.00897216796875,
0.038177490234375,
0.0281524658203125,
0.0197601318359375,
0.0321044921875,
-0.00986480712890625,
-0.058441162109375,
0.055267333984375,
-0.0007271766662597656,
-0.004215240478515625,
-0.0467529296875,
0.005828857421875,
-0.0048065185546875,
-0.04779052734375,
-0.026458740234375,
0.004180908203125,
-0.0184478759765625,
0.02056884765625,
-0.0631103515625,
0.0143280029296875,
-0.0306243896484375,
0.04766845703125,
-0.002410888671875,
0.0086822509765625,
0.027191162109375,
-0.00921630859375,
-0.0399169921875,
0.031463623046875,
-0.019195556640625,
0.01288604736328125,
-0.047637939453125,
-0.040618896484375,
-0.00150299072265625,
-0.03765869140625,
0.025970458984375,
0.0216217041015625,
0.014801025390625,
0.006977081298828125,
0.05615234375,
-0.005359649658203125,
-0.015106201171875,
-0.019378662109375,
-0.01045989990234375,
0.035430908203125,
-0.08123779296875,
0.01526641845703125,
0.04925537109375,
0.0236968994140625,
-0.049530029296875,
-0.0116119384765625,
0.03497314453125,
-0.0122528076171875,
0.002811431884765625,
0.04351806640625,
0.035980224609375,
0.036041259765625,
0.003276824951171875,
-0.01355743408203125,
0.085693359375,
-0.03240966796875,
0.0124969482421875,
-0.0288543701171875,
0.0179901123046875,
0.0380859375,
0.026641845703125,
0.0121307373046875,
0.02032470703125,
0.0186767578125,
0.0238189697265625,
0.018798828125,
0.0098876953125,
0.046112060546875,
-0.03875732421875,
-0.00726318359375,
-0.00814056396484375,
-0.0207672119140625,
-0.004062652587890625,
-0.0202789306640625,
0.061065673828125,
0.016143798828125,
0.035888671875,
0.0245819091796875,
-0.02667236328125,
0.015167236328125,
-0.003757476806640625,
-0.018310546875,
0.0141448974609375,
0.0245361328125,
-0.08416748046875,
0.031890869140625,
-0.0330810546875,
0.01444244384765625,
0.0168914794921875,
-0.00970458984375,
-0.0014772415161132812,
0.06298828125,
0.04559326171875,
-0.0128631591796875,
-0.0416259765625,
-0.0474853515625,
0.0184326171875,
0.0189208984375,
-0.0299072265625,
-0.0018854141235351562,
0.0026912689208984375,
0.06341552734375,
-0.03363037109375,
0.04339599609375,
-0.0364990234375,
0.0249176025390625,
0.0268402099609375,
-0.0131988525390625,
0.0340576171875,
-0.0223236083984375,
0.045867919921875,
0.0628662109375,
-0.00585174560546875,
0.0127410888671875,
0.0035152435302734375,
-0.016937255859375,
0.0206451416015625,
0.00017213821411132812,
-0.01209259033203125,
-0.0022869110107421875,
-0.056976318359375,
0.0060577392578125,
0.032684326171875,
0.06512451171875,
-0.006816864013671875,
-0.057037353515625,
-0.0120086669921875,
0.032440185546875,
-0.11224365234375,
-0.0865478515625,
0.062042236328125,
-0.04693603515625,
-0.041015625,
-0.034912109375,
-0.05078125,
0.01026153564453125,
-0.0161895751953125,
-0.0244140625,
-0.01305389404296875,
0.004970550537109375,
-0.09173583984375,
-0.052886962890625,
-0.0830078125,
0.0384521484375,
-0.01146697998046875,
0.036224365234375,
0.00621795654296875,
0.058685302734375,
0.0216522216796875,
-0.03570556640625,
0.01015472412109375,
0.00428009033203125,
-0.035614013671875,
-0.00698089599609375,
-0.0118560791015625,
0.0079498291015625,
0.011962890625,
0.01538848876953125,
-0.032989501953125,
0.006244659423828125,
0.0013418197631835938,
-0.03277587890625,
0.0052490234375,
0.0180511474609375,
0.039825439453125,
-0.00939178466796875,
-0.0121307373046875,
0.0298919677734375,
0.02740478515625,
-0.00963592529296875,
0.00164031982421875,
-0.0094757080078125,
-0.0135040283203125,
-0.01340484619140625,
-0.0245361328125,
0.0073089599609375,
-0.0085906982421875,
0.015625,
-0.0016508102416992188,
0.00940704345703125,
-0.015960693359375,
-0.0258636474609375,
0.07012939453125,
0.01216888427734375,
0.01349639892578125,
0.009033203125,
0.0266571044921875,
-0.003765106201171875,
0.011993408203125,
-0.0107574462890625,
-0.00804901123046875,
-0.02301025390625,
0.0093994140625,
-0.054412841796875,
-0.0158843994140625,
0.051513671875,
0.0273590087890625,
0.002899169921875,
-0.007171630859375,
-0.052642822265625,
0.006107330322265625,
0.079833984375,
-0.04083251953125,
-0.0211639404296875,
-0.03240966796875,
0.0013132095336914062,
0.0259246826171875,
-0.0095672607421875,
-0.00234222412109375,
-0.0191802978515625,
-0.10205078125,
-0.0059051513671875,
-0.045928955078125,
-0.0015211105346679688,
-0.0028247833251953125,
0.0235595703125,
-0.03192138671875,
-0.05206298828125,
0.03509521484375,
-0.049072265625,
-0.0029087066650390625,
-0.0108489990234375,
0.006023406982421875,
-0.061126708984375,
-0.021209716796875,
-0.0125732421875,
-0.0687255859375,
0.0087432861328125,
-0.037353515625,
0.0394287109375,
0.01270294189453125,
-0.007732391357421875,
0.00801849365234375,
0.043731689453125,
0.03228759765625,
-0.0235595703125,
0.015960693359375,
-0.005084991455078125,
0.0147247314453125,
-0.004215240478515625,
-0.0110931396484375,
-0.0251922607421875,
-0.024444580078125,
-0.037689208984375,
-0.004852294921875,
0.0379638671875,
-0.0369873046875,
0.01462554931640625,
-0.038238525390625,
0.003265380859375,
-0.022979736328125,
0.0010242462158203125,
0.0239715576171875,
0.00940704345703125,
-0.030914306640625,
0.0426025390625,
0.0263519287109375,
-0.019561767578125,
0.048614501953125,
0.0250701904296875,
-0.0458984375,
0.006938934326171875,
0.0794677734375,
0.0174102783203125,
-0.03729248046875,
-0.07708740234375,
-0.0141448974609375,
0.0433349609375,
-0.038421630859375,
0.042266845703125,
0.050445556640625,
-0.035858154296875,
0.041717529296875,
0.02392578125,
0.0012273788452148438,
0.03173828125,
0.0026950836181640625,
0.01282501220703125,
0.0072479248046875,
-0.020355224609375,
0.0081329345703125,
-0.011627197265625,
0.0273590087890625,
-0.00643157958984375,
-0.04974365234375,
0.01313018798828125,
0.054962158203125,
0.0007710456848144531,
0.006038665771484375,
-0.046630859375,
-0.05938720703125,
0.01568603515625,
0.0310821533203125,
-0.00225067138671875,
0.02178955078125,
-0.004047393798828125,
0.035919189453125,
0.01373291015625,
0.0007572174072265625,
-0.0258941650390625,
0.012176513671875,
-0.0018224716186523438,
0.04669189453125,
-0.029541015625,
0.0028839111328125,
-0.039794921875,
-0.004852294921875,
0.043731689453125,
-0.009246826171875,
-0.047515869140625,
0.031463623046875,
-0.0183868408203125,
0.0175933837890625,
0.032867431640625,
0.0023365020751953125,
0.0092620849609375,
0.0179290771484375,
-0.00922393798828125,
0.0006146430969238281,
-0.01508331298828125,
-0.0144500732421875,
-0.0308380126953125,
-0.0190277099609375,
-0.0050201416015625,
-0.0019330978393554688,
-0.01200103759765625,
0.07952880859375,
-0.0215301513671875,
0.054107666015625,
-0.0212249755859375,
0.0189361572265625,
-0.004291534423828125,
0.028717041015625,
0.01345062255859375,
-0.0197601318359375,
0.0244903564453125,
-0.0080718994140625,
0.0160675048828125,
-0.0307769775390625,
0.00506591796875,
0.004123687744140625,
0.042266845703125,
-0.007244110107421875,
-0.034393310546875,
0.040191650390625,
-0.0290985107421875,
-0.01593017578125,
0.036285400390625,
0.0253753662109375,
-0.002574920654296875,
-0.0443115234375,
-0.013824462890625,
0.0297088623046875,
0.02093505859375,
0.0017871856689453125,
0.039886474609375,
-0.00437164306640625,
0.04498291015625,
-0.022003173828125,
0.0328369140625,
-0.0175628662109375,
-0.0204010009765625,
-0.036651611328125,
-0.034820556640625,
0.0006380081176757812,
-0.01239776611328125,
-0.0008726119995117188,
-0.01273345947265625,
-0.0231475830078125,
0.0150299072265625,
0.0165863037109375,
0.060760498046875,
-0.0276947021484375,
-0.073974609375,
0.01412200927734375,
-0.0217437744140625,
0.08221435546875,
0.038299560546875,
-0.052001953125,
0.0287628173828125,
-0.043426513671875,
-0.00298309326171875,
0.0548095703125,
-0.040679931640625,
-0.0275115966796875,
-0.059417724609375,
0.02410888671875,
0.0310516357421875,
0.0115966796875,
0.00844573974609375,
-0.02996826171875,
-0.016143798828125,
-0.00804901123046875,
0.059539794921875,
-0.0103607177734375,
0.0115814208984375,
0.043609619140625,
-0.005283355712890625,
0.0090179443359375,
-0.0103302001953125,
-0.0152740478515625,
-0.00814056396484375,
-0.004669189453125,
-0.0797119140625,
-0.007587432861328125,
0.020477294921875,
-0.0294952392578125,
0.03558349609375,
0.0264739990234375,
0.0117950439453125,
0.01458740234375,
-0.01357269287109375,
0.007793426513671875,
0.0018825531005859375,
0.00902557373046875,
-0.011199951171875,
-0.038970947265625,
0.0980224609375,
0.0027027130126953125,
-0.0445556640625,
0.00794219970703125,
0.00739288330078125,
-0.036895751953125,
0.04510498046875,
-0.052520751953125,
-0.03216552734375,
0.00292205810546875,
0.016021728515625,
0.035888671875,
-0.00341796875,
0.01053619384765625,
0.00304412841796875,
-0.0028171539306640625,
-0.0032939910888671875,
-0.0070037841796875,
0.016204833984375,
-0.0098419189453125,
0.06927490234375,
0.00820159912109375,
0.00527191162109375,
0.0662841796875,
-0.029205322265625,
-0.0533447265625,
-0.03057861328125,
0.00409698486328125,
0.019989013671875,
-0.0112152099609375,
0.0311279296875,
0.0162811279296875,
-0.059539794921875,
0.0131988525390625,
-0.0213165283203125,
-0.04327392578125,
0.0227508544921875,
-0.03662109375,
-0.015869140625,
-0.002162933349609375,
-0.009552001953125,
-0.0104217529296875,
-0.0252838134765625,
0.072509765625,
-0.0009570121765136719,
-0.07012939453125,
0.003330230712890625,
0.032318115234375,
-0.0281829833984375,
-0.0195465087890625,
0.01213836669921875,
-0.03131103515625,
-0.00832366943359375,
-0.06884765625,
-0.02105712890625,
-0.0203857421875,
-0.0033721923828125,
0.0157928466796875,
-0.0240631103515625,
0.0146026611328125,
0.04400634765625,
-0.015716552734375,
-0.002025604248046875,
0.0137481689453125,
-0.07904052734375,
-0.049835205078125,
0.004314422607421875,
0.00681304931640625,
0.0229644775390625,
0.026123046875,
0.0196685791015625,
-0.0111236572265625,
-0.020294189453125,
-0.02105712890625,
-0.02899169921875,
0.0528564453125,
0.0057830810546875,
-0.032806396484375,
0.0286865234375,
0.0440673828125,
-0.0213165283203125,
0.0033245086669921875,
0.0121612548828125,
-0.041259765625,
-0.01678466796875,
-0.006214141845703125,
-0.036651611328125,
-0.003055572509765625,
-0.027374267578125,
-0.06524658203125,
0.0906982421875,
0.0161895751953125,
0.02606201171875,
0.0155792236328125,
0.024444580078125,
-0.0465087890625,
-0.0131072998046875,
-0.037811279296875,
0.047576904296875,
-0.01293182373046875,
0.0638427734375,
-0.060272216796875,
-0.016082763671875,
0.0153350830078125,
0.05419921875,
0.041412353515625,
0.00807952880859375,
-0.01898193359375,
-0.0163421630859375,
0.0218963623046875,
0.03363037109375,
-0.006496429443359375,
0.0304107666015625,
-0.005123138427734375,
0.0606689453125,
0.040985107421875,
-0.08013916015625,
0.0164947509765625,
-0.00736236572265625,
0.00615692138671875,
0.03631591796875,
0.02227783203125,
0.023162841796875,
-0.03594970703125,
-0.007537841796875,
-0.05401611328125,
-0.01317596435546875,
0.0309295654296875,
0.01470184326171875,
0.03399658203125,
0.03466796875,
0.04718017578125,
-0.0692138671875,
-0.060028076171875,
-0.02496337890625,
0.033233642578125,
-0.005840301513671875,
0.040252685546875,
0.00888824462890625,
0.0185546875,
0.05120849609375,
-0.00010395050048828125,
0.01099395751953125,
0.0175933837890625,
-0.025909423828125,
0.05950927734375,
0.01629638671875,
0.0183563232421875,
-0.06683349609375,
0.001171112060546875,
0.0487060546875,
0.06982421875,
-0.049713134765625,
-0.03729248046875,
0.00858306884765625,
-0.007320404052734375,
0.0086669921875,
-0.0005240440368652344,
0.0173797607421875,
0.0212860107421875,
0.048248291015625,
-0.041168212890625,
-0.0220794677734375,
0.00934600830078125,
0.0020465850830078125,
0.005123138427734375,
0.0038013458251953125,
0.022369384765625,
-0.0248260498046875,
-0.039642333984375,
0.0245361328125,
0.04144287109375,
0.039520263671875,
-0.00916290283203125,
0.01947021484375,
-0.006801605224609375,
-0.004192352294921875,
0.00701904296875,
0.03448486328125,
-0.021240234375,
0.002178192138671875,
-0.0080718994140625,
-0.029876708984375,
-0.024261474609375,
0.01418304443359375,
0.041595458984375,
-0.033538818359375,
0.0340576171875,
0.03558349609375,
-0.051483154296875,
-0.0057373046875,
0.043731689453125,
-0.004512786865234375,
-0.035308837890625,
-0.03155517578125,
-0.03692626953125,
0.0235443115234375,
-0.018707275390625,
0.045135498046875,
-0.015106201171875,
0.0302734375,
-0.0241546630859375,
0.06414794921875,
-0.0167236328125,
0.00801849365234375,
0.0177764892578125,
0.00327301025390625,
0.0207061767578125,
0.004886627197265625,
-0.056640625,
0.013641357421875,
-0.08099365234375,
-0.0299224853515625,
0.014495849609375,
0.016693115234375,
-0.021636962890625,
0.0301361083984375,
0.0110626220703125,
-0.04595947265625,
0.0253143310546875,
0.0457763671875,
0.00975799560546875,
0.06671142578125,
0.006916046142578125,
0.0123443603515625,
-0.06756591796875,
-0.02545166015625,
-0.0150909423828125,
0.00023305416107177734,
0.0018415451049804688,
-0.0003151893615722656,
0.04534912109375,
0.019195556640625,
-0.0242919921875,
0.032073974609375,
-0.057159423828125,
-0.038787841796875,
0.0650634765625,
-0.0223236083984375,
-0.0151214599609375,
0.0009751319885253906,
-0.004573822021484375,
0.01039886474609375,
0.04693603515625,
-0.0535888671875,
-0.0251007080078125,
0.020904541015625,
0.013885498046875,
-0.016143798828125,
0.05633544921875,
-0.01256561279296875,
-0.01328277587890625,
-0.0350341796875,
-0.00722503662109375,
0.032501220703125,
0.030609130859375,
-0.0014772415161132812,
0.005390167236328125,
-0.019775390625,
-0.0186004638671875,
0.0252685546875,
-0.0009694099426269531,
0.0009431838989257812,
0.0234527587890625,
-0.006114959716796875,
-0.01398468017578125,
-0.0245208740234375,
-0.01373291015625,
0.0155487060546875,
0.004917144775390625,
0.0213775634765625,
-0.0025997161865234375,
0.0208892822265625,
0.008941650390625,
-0.0006890296936035156,
0.041717529296875,
0.00007468461990356445,
0.0229644775390625,
-0.019683837890625,
0.0077362060546875,
0.004077911376953125,
-0.0166015625,
-0.04412841796875,
-0.035552978515625,
-0.0048370361328125,
0.015411376953125,
-0.0236663818359375,
-0.049957275390625,
-0.08770751953125,
-0.024627685546875,
0.0005822181701660156,
-0.01393890380859375,
0.01091766357421875,
-0.01302337646484375,
-0.0229949951171875,
-0.004848480224609375,
-0.03955078125,
-0.0091094970703125,
0.0164947509765625,
-0.00229644775390625,
-0.05206298828125,
-0.007785797119140625,
-0.02142333984375,
0.0164337158203125,
-0.00919342041015625,
-0.010498046875,
-0.01409149169921875,
-0.0155029296875,
-0.044677734375,
0.007030487060546875,
0.01081085205078125,
0.03533935546875,
0.06500244140625,
-0.0062713623046875,
0.019439697265625,
0.0037841796875,
-0.039581298828125,
-0.052215576171875,
0.032012939453125,
-0.058319091796875,
-0.0062103271484375,
0.0106048583984375,
0.0129547119140625,
0.0242767333984375,
-0.034942626953125,
-0.086669921875,
0.0548095703125,
-0.0240936279296875,
-0.029632568359375,
0.0033168792724609375,
0.033538818359375,
0.0213165283203125,
-0.049560546875,
-0.002841949462890625,
-0.0198211669921875,
-0.0130767822265625,
-0.02239990234375,
0.0248870849609375,
0.034393310546875,
0.0196685791015625,
0.0009093284606933594,
-0.047271728515625,
0.004329681396484375,
-0.021484375,
0.033935546875,
-0.0006051063537597656,
0.005096435546875,
0.0079498291015625,
0.039337158203125,
-0.039031982421875,
-0.017120361328125,
-0.0190887451171875,
-0.00649261474609375,
0.009979248046875,
-0.0154571533203125,
-0.042999267578125,
-0.04388427734375,
0.0292816162109375,
0.02392578125,
0.0236968994140625,
0.00228118896484375,
-0.006244659423828125,
-0.01245880126953125,
-0.03997802734375,
-0.0019321441650390625,
0.031341552734375,
-0.06207275390625,
0.0033855438232421875,
0.01434326171875,
-0.0042266845703125,
-0.0201873779296875,
-0.024627685546875,
-0.04412841796875,
-0.0195770263671875,
-0.05584716796875,
0.017669677734375,
-0.03582763671875,
0.0016794204711914062,
0.01959228515625,
-0.0201873779296875,
-0.01520538330078125,
-0.031768798828125,
0.01800537109375,
-0.00466156005859375,
-0.03900146484375,
0.005340576171875,
-0.0149078369140625,
0.03857421875,
0.005435943603515625,
0.038299560546875,
-0.01434326171875,
0.044525146484375,
0.003726959228515625,
-0.028106689453125,
-0.0031795501708984375,
0.0027790069580078125,
-0.0152130126953125,
0.003520965576171875,
-0.0022106170654296875,
0.01302337646484375,
0.0460205078125,
-0.002410888671875,
0.10321044921875,
0.0201416015625,
0.0509033203125,
0.0021686553955078125,
-0.0271759033203125,
0.02960205078125,
-0.0281524658203125,
-0.0120697021484375,
0.0005640983581542969,
-0.021270751953125,
-0.02777099609375,
-0.006862640380859375,
0.0181121826171875,
-0.00186920166015625,
0.012115478515625
] |
98a066cebca58f22e71442e69276472669d94e45
|
Wordpress Stackexchange
Q: how can I add an icon/image for a child theme? I have set up a child theme of the twentyten theme. In the themes section that under the appearance, I can only see the child theme's title, author name, and a grey box above it. How can I add an icon/image to be displayed in the grey box?
A: Leave a file with the name screenshot.png inside the root of your child theme folder and it works.
The recommended image size is 600x450. The screenshot will only be shown as 300x225, but the double-sized image allows for high-resolution viewing on HiDPI displays.
*
*see on Codex
|
Q: how can I add an icon/image for a child theme? I have set up a child theme of the twentyten theme. In the themes section that under the appearance, I can only see the child theme's title, author name, and a grey box above it. How can I add an icon/image to be displayed in the grey box?
A: Leave a file with the name screenshot.png inside the root of your child theme folder and it works.
The recommended image size is 600x450. The screenshot will only be shown as 300x225, but the double-sized image allows for high-resolution viewing on HiDPI displays.
*
*see on Codex
A: As @bueltge suggested simply create a screenshot.png in your child theme folder.
You can get more information from the WordPress Codex here.
|
wordpress
|
{
"language": "en",
"length": 130,
"provenance": "stackexchange_00019.jsonl.gz:428416",
"question_score": "14",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83606"
}
|
[
0.05218505859375,
-0.022979736328125,
0.046539306640625,
-0.0284423828125,
-0.01401519775390625,
-0.0165557861328125,
0.047698974609375,
-0.034881591796875,
0.0085906982421875,
0.0011167526245117188,
-0.041534423828125,
-0.0241546630859375,
-0.01284027099609375,
-0.02581787109375,
-0.0207061767578125,
-0.05377197265625,
0.0309906005859375,
-0.0540771484375,
0.00330352783203125,
0.00225830078125,
-0.00942230224609375,
0.00891876220703125,
0.04345703125,
0.005474090576171875,
0.0374755859375,
-0.004314422607421875,
0.0288543701171875,
-0.026824951171875,
0.005046844482421875,
-0.024078369140625,
0.032806396484375,
0.0089263916015625,
0.0224456787109375,
0.005893707275390625,
-0.00844573974609375,
0.054473876953125,
0.020263671875,
-0.0026073455810546875,
-0.004032135009765625,
0.032073974609375,
-0.007297515869140625,
0.021148681640625,
0.051666259765625,
-0.004825592041015625,
-0.01195526123046875,
-0.02294921875,
0.01195526123046875,
-0.025054931640625,
-0.02606201171875,
-0.0119781494140625,
0.0443115234375,
0.0216522216796875,
0.0634765625,
-0.010284423828125,
-0.0156097412109375,
0.006984710693359375,
-0.05584716796875,
0.047332763671875,
0.01239776611328125,
0.01317596435546875,
-0.004154205322265625,
0.0136260986328125,
-0.0016231536865234375,
0.0008559226989746094,
0.039947509765625,
0.004192352294921875,
-0.005626678466796875,
0.01119232177734375,
-0.0343017578125,
0.03216552734375,
0.0196685791015625,
-0.047454833984375,
0.0254058837890625,
-0.051177978515625,
-0.02838134765625,
0.0217132568359375,
-0.04730224609375,
-0.0386962890625,
0.044219970703125,
-0.058807373046875,
-0.030029296875,
-0.0650634765625,
-0.00893402099609375,
-0.01690673828125,
0.0182037353515625,
0.0015764236450195312,
-0.0094757080078125,
0.01641845703125,
-0.03155517578125,
0.01171875,
-0.018829345703125,
-0.07208251953125,
-0.0180206298828125,
0.0223236083984375,
0.025543212890625,
-0.0308685302734375,
0.003192901611328125,
0.0139923095703125,
-0.01499176025390625,
0.0172271728515625,
-0.005970001220703125,
-0.02862548828125,
0.046875,
-0.05499267578125,
-0.0087890625,
0.0149688720703125,
-0.00339508056640625,
0.02410888671875,
0.0253753662109375,
0.043975830078125,
0.004364013671875,
0.001544952392578125,
0.01334381103515625,
-0.03985595703125,
-0.032684326171875,
0.051788330078125,
0.0269775390625,
-0.00691986083984375,
0.042572021484375,
0.01438140869140625,
-0.01308441162109375,
-0.004596710205078125,
0.047760009765625,
0.0261688232421875,
0.01107025146484375,
0.0033931732177734375,
-0.01898193359375,
-0.03729248046875,
0.00046372413635253906,
0.03173828125,
-0.050567626953125,
0.0150604248046875,
0.046295166015625,
-0.004016876220703125,
-0.010528564453125,
-0.0246124267578125,
-0.0216827392578125,
-0.0013427734375,
0.008575439453125,
0.005859375,
0.000514984130859375,
-0.041839599609375,
0.0227508544921875,
0.0175018310546875,
-0.0127410888671875,
-0.015289306640625,
-0.0174407958984375,
0.035125732421875,
0.0282135009765625,
-0.032012939453125,
0.01343536376953125,
-0.02630615234375,
0.008819580078125,
0.01462554931640625,
-0.0024547576904296875,
0.025970458984375,
-0.0035037994384765625,
0.00283050537109375,
0.0005822181701660156,
0.01247406005859375,
-0.00885009765625,
0.03753662109375,
0.06787109375,
-0.0037670135498046875,
0.0192718505859375,
-0.058746337890625,
-0.0280609130859375,
0.00444793701171875,
0.0198211669921875,
-0.052093505859375,
0.00765228271484375,
-0.0032787322998046875,
-0.050811767578125,
0.01023101806640625,
0.0276336669921875,
0.042449951171875,
0.0175933837890625,
-0.005397796630859375,
0.0278778076171875,
0.0275421142578125,
0.0026264190673828125,
-0.0140380859375,
0.051544189453125,
-0.00628662109375,
0.00714111328125,
-0.048309326171875,
0.004177093505859375,
-0.0176849365234375,
0.029754638671875,
0.0229644775390625,
-0.046295166015625,
0.00547027587890625,
-0.06256103515625,
-0.0325927734375,
0.0173187255859375,
0.007537841796875,
-0.02862548828125,
-0.03558349609375,
-0.0023021697998046875,
0.0160675048828125,
-0.010284423828125,
-0.01605224609375,
0.049835205078125,
-0.03271484375,
0.006717681884765625,
-0.006732940673828125,
-0.01177215576171875,
0.03790283203125,
0.005950927734375,
0.01885986328125,
0.004322052001953125,
0.0036678314208984375,
-0.006153106689453125,
-0.05535888671875,
-0.017333984375,
0.0435791015625,
-0.027069091796875,
0.0259857177734375,
-0.009307861328125,
-0.004375457763671875,
-0.00890350341796875,
-0.0185394287109375,
0.0205535888671875,
0.0232696533203125,
0.041015625,
0.00748443603515625,
-0.0174560546875,
-0.01202392578125,
0.0428466796875,
0.0103912353515625,
-0.035491943359375,
0.0325927734375,
-0.019073486328125,
-0.03851318359375,
-0.0259552001953125,
0.0194244384765625,
-0.0009622573852539062,
-0.036041259765625,
-0.01546478271484375,
0.0237884521484375,
0.03570556640625,
0.0207977294921875,
0.00891876220703125,
0.01824951171875,
0.054229736328125,
-0.0142059326171875,
0.0222320556640625,
-0.0218048095703125,
-0.03021240234375,
-0.0207977294921875,
0.026275634765625,
-0.006275177001953125,
0.017242431640625,
-0.0714111328125,
0.02740478515625,
0.0177764892578125,
0.01331329345703125,
-0.037628173828125,
0.0220184326171875,
0.00989532470703125,
0.03399658203125,
0.05511474609375,
-0.057342529296875,
0.047027587890625,
0.0091705322265625,
0.0335693359375,
0.023773193359375,
0.0251617431640625,
-0.037139892578125,
0.01959228515625,
0.013580322265625,
0.005100250244140625,
0.00696563720703125,
-0.0028533935546875,
-0.007701873779296875,
0.0469970703125,
0.0027313232421875,
0.01018524169921875,
0.01486968994140625,
0.0040435791015625,
0.01428985595703125,
-0.0127716064453125,
-0.017608642578125,
0.00186920166015625,
0.00624847412109375,
-0.053466796875,
0.02587890625,
0.07098388671875,
-0.0302581787109375,
-0.018585205078125,
-0.00958251953125,
0.0703125,
0.02008056640625,
0.0019245147705078125,
0.00994110107421875,
0.0125732421875,
0.032867431640625,
-0.01068878173828125,
0.0390625,
-0.0242767333984375,
0.034912109375,
0.061737060546875,
-0.035125732421875,
0.03155517578125,
0.0037555694580078125,
-0.0200653076171875,
-0.01507568359375,
0.0321044921875,
0.0091094970703125,
-0.04583740234375,
0.0026226043701171875,
0.02435302734375,
0.016998291015625,
0.01238250732421875,
-0.0090179443359375,
-0.0247344970703125,
-0.016571044921875,
0.004940032958984375,
-0.0518798828125,
-0.050140380859375,
-0.041900634765625,
-0.029754638671875,
-0.044525146484375,
0.0048980712890625,
-0.0220184326171875,
0.022125244140625,
-0.00835418701171875,
0.00756072998046875,
-0.079833984375,
-0.003082275390625,
0.0201568603515625,
-0.051300048828125,
-0.005096435546875,
-0.0168914794921875,
-0.006748199462890625,
-0.00876617431640625,
-0.007183074951171875,
0.037353515625,
-0.009002685546875,
0.01490020751953125,
-0.00024628639221191406,
0.0347900390625,
0.017242431640625,
-0.037506103515625,
0.0460205078125,
-0.043426513671875,
-0.02734375,
0.0256195068359375,
-0.006351470947265625,
0.0077362060546875,
-0.0237579345703125,
-0.0232391357421875,
-0.040191650390625,
-0.049041748046875,
-0.0249176025390625,
0.048583984375,
0.05255126953125,
-0.0246734619140625,
0.029754638671875,
-0.04730224609375,
-0.03192138671875,
-0.00960540771484375,
-0.04840087890625,
0.02191162109375,
0.0255126953125,
-0.01068878173828125,
-0.0247955322265625,
0.016693115234375,
0.014007568359375,
-0.01078033447265625,
0.0316162109375,
-0.0177154541015625,
0.0287017822265625,
-0.0226287841796875,
-0.01323699951171875,
-0.04803466796875,
-0.01029205322265625,
-0.022613525390625,
0.03466796875,
-0.0147552490234375,
0.03369140625,
-0.01267242431640625,
0.039642333984375,
-0.040771484375,
-0.01308441162109375,
0.01297760009765625,
0.002117156982421875,
0.045013427734375,
-0.024444580078125,
-0.017974853515625,
-0.01397705078125,
0.06475830078125,
-0.08154296875,
-0.02496337890625,
-0.0264892578125,
0.022247314453125,
-0.010009765625,
-0.0034389495849609375,
-0.014190673828125,
-0.00576019287109375,
-0.08734130859375,
-0.0148162841796875,
0.0008988380432128906,
-0.042327880859375,
0.03277587890625,
-0.0026149749755859375,
-0.027435302734375,
-0.03387451171875,
0.029205322265625,
0.027130126953125,
-0.04052734375,
0.03515625,
-0.03814697265625,
-0.0016870498657226562,
-0.015228271484375,
0.01074981689453125,
-0.1151123046875,
-0.01727294921875,
-0.046295166015625,
0.1075439453125,
-0.002964019775390625,
0.0162200927734375,
-0.0313720703125,
0.06695556640625,
-0.01250457763671875,
0.0679931640625,
-0.00751495361328125,
0.0210723876953125,
-0.001201629638671875,
-0.0194091796875,
0.013916015625,
-0.04119873046875,
-0.020263671875,
-0.0362548828125,
-0.0293731689453125,
-0.020904541015625,
-0.0094451904296875,
-0.005588531494140625,
0.0260772705078125,
-0.01049041748046875,
0.033905029296875,
-0.04132080078125,
-0.01354217529296875,
0.028106689453125,
0.022857666015625,
-0.01183319091796875,
-0.0723876953125,
0.01496124267578125,
0.00617218017578125,
0.0288543701171875,
-0.0177001953125,
0.01023101806640625,
0.058807373046875,
0.0143890380859375,
-0.019195556640625,
-0.063232421875,
-0.04388427734375,
0.02215576171875,
0.0204315185546875,
0.00806427001953125,
-0.004741668701171875,
-0.006458282470703125,
-0.01323699951171875,
0.01461029052734375,
0.01003265380859375,
0.01153564453125,
0.04296875,
0.0204620361328125,
-0.010223388671875,
0.00563812255859375,
0.004467010498046875,
-0.0183258056640625,
0.0074462890625,
-0.0101318359375,
-0.0271453857421875,
0.0078582763671875,
0.0338134765625,
-0.035888671875,
0.06671142578125,
-0.00553131103515625,
-0.0083160400390625,
0.005344390869140625,
0.0197601318359375,
0.02850341796875,
0.01143646240234375,
0.0035572052001953125,
-0.0021228790283203125,
-0.01309967041015625,
-0.033966064453125,
-0.005764007568359375,
0.0008115768432617188,
0.0018672943115234375,
0.006656646728515625,
-0.0145111083984375,
-0.03167724609375,
-0.018157958984375,
-0.01055145263671875,
0.068359375,
0.04669189453125,
0.007781982421875,
-0.0119476318359375,
-0.007755279541015625,
0.0517578125,
-0.040618896484375,
0.058074951171875,
0.016326904296875,
-0.013153076171875,
0.028411865234375,
-0.0287628173828125,
0.0192718505859375,
0.0301513671875,
-0.017333984375,
-0.0218048095703125,
-0.0034618377685546875,
-0.023834228515625,
0.056610107421875,
-0.049560546875,
-0.01482391357421875,
-0.01284027099609375,
-0.004119873046875,
-0.0418701171875,
-0.0223388671875,
0.0021915435791015625,
0.04815673828125,
-0.0180206298828125,
0.0126190185546875,
-0.0291900634765625,
0.0528564453125,
0.017181396484375,
0.041290283203125,
-0.011749267578125,
0.03271484375,
-0.00020110607147216797,
-0.0171966552734375,
0.0201416015625,
-0.05963134765625,
-0.007274627685546875,
-0.007511138916015625,
-0.0169677734375,
-0.029205322265625,
0.0050811767578125,
0.0269317626953125,
0.00823211669921875,
-0.0011377334594726562,
-0.032318115234375,
0.0268707275390625,
-0.037841796875,
0.006488800048828125,
0.040252685546875,
-0.049530029296875,
0.027008056640625,
0.0159454345703125,
-0.06610107421875,
-0.0109710693359375,
-0.01522064208984375,
-0.035675048828125,
-0.034912109375,
0.01715087890625,
-0.0190277099609375,
0.0024929046630859375,
-0.04827880859375,
0.0137176513671875,
-0.011199951171875,
0.01312255859375,
-0.0172576904296875,
0.01500701904296875,
0.0469970703125,
0.01824951171875,
-0.0261993408203125,
-0.015960693359375,
-0.01617431640625,
-0.01251220703125,
0.03253173828125,
-0.0021419525146484375,
0.0079498291015625,
-0.009857177734375,
-0.0019426345825195312,
0.016937255859375,
-0.0072021484375,
0.01432037353515625,
-0.0282135009765625,
0.051727294921875,
0.028045654296875,
0.05914306640625,
0.01523590087890625,
0.015625,
-0.041107177734375,
-0.003231048583984375,
0.0088653564453125,
0.02655029296875,
0.03680419921875,
-0.03485107421875,
0.002044677734375,
-0.01318359375,
0.007801055908203125,
-0.010772705078125,
0.01374053955078125,
-0.0205841064453125,
0.037078857421875,
0.006130218505859375,
0.0095672607421875,
-0.01953125,
-0.00522613525390625,
-0.01300811767578125,
0.04443359375,
-0.0282135009765625,
-0.01238250732421875,
0.036285400390625,
-0.037628173828125,
-0.0117034912109375,
0.0183563232421875,
-0.0018186569213867188,
-0.0172271728515625,
-0.0095672607421875,
-0.042266845703125,
0.074462890625,
-0.04779052734375,
0.061553955078125,
0.062408447265625,
0.0030078887939453125,
0.030059814453125,
0.01079559326171875,
0.022613525390625,
-0.0108642578125,
0.0243988037109375,
-0.0697021484375,
-0.01340484619140625,
0.0157470703125,
-0.0036220550537109375,
-0.040069580078125,
-0.007396697998046875,
-0.01715087890625,
-0.0209808349609375,
0.0158233642578125,
0.0323486328125,
0.0212249755859375,
-0.046783447265625,
-0.036865234375,
-0.0440673828125,
0.0084228515625,
-0.0154571533203125,
0.0024204254150390625,
0.00635528564453125,
0.044677734375,
-0.01303863525390625,
-0.02130126953125,
0.01934814453125,
-0.012847900390625,
-0.01134490966796875,
-0.02081298828125,
0.047271728515625,
0.0231781005859375,
-0.046142578125,
0.006038665771484375,
0.05633544921875,
-0.0068511962890625,
-0.0020294189453125,
0.034393310546875,
-0.01511383056640625,
-0.01044464111328125,
-0.019927978515625,
-0.005855560302734375,
-0.0003924369812011719,
-0.022125244140625,
0.03338623046875,
0.0045013427734375,
-0.0174407958984375,
0.052337646484375,
-0.034912109375,
0.04449462890625,
0.005779266357421875,
-0.0020389556884765625,
0.025665283203125,
0.03314208984375,
0.00902557373046875,
-0.04168701171875,
-0.0161285400390625,
-0.0181732177734375,
-0.07354736328125,
0.045806884765625,
-0.003753662109375,
-0.0017480850219726562,
0.0225372314453125,
0.039337158203125,
-0.0419921875,
0.0687255859375,
-0.022979736328125,
-0.054534912109375,
0.0207672119140625,
0.0374755859375,
-0.044586181640625,
-0.034576416015625,
0.0299835205078125,
-0.033203125,
-0.021240234375,
0.01213836669921875,
-0.047698974609375,
0.070556640625,
-0.036285400390625,
-0.005229949951171875,
-0.02154541015625,
0.0484619140625,
0.0060577392578125,
0.0158843994140625,
-0.01959228515625,
0.04132080078125,
0.020721435546875,
0.0350341796875,
-0.049957275390625,
-0.0097808837890625,
0.0005807876586914062,
0.04803466796875,
0.041748046875,
0.01483154296875,
-0.031524658203125,
-0.0155181884765625,
0.0396728515625,
0.001239776611328125,
-0.0206146240234375,
0.048004150390625,
0.027313232421875,
-0.0174407958984375,
0.00426483154296875,
0.042938232421875,
0.05255126953125,
-0.046417236328125,
-0.014984130859375,
0.03985595703125,
0.013153076171875,
0.0159149169921875,
0.047943115234375,
0.0266265869140625,
-0.0057525634765625,
0.0197601318359375,
0.0312347412109375,
-0.061767578125,
0.07208251953125,
-0.0188140869140625,
0.04840087890625,
0.01708984375,
-0.01227569580078125,
0.01087188720703125,
0.04473876953125,
0.0187225341796875,
0.0223388671875,
-0.00843048095703125,
0.0302734375,
-0.0565185546875,
0.030975341796875,
0.024261474609375,
0.08319091796875,
-0.0770263671875,
-0.0304412841796875,
0.004917144775390625,
0.0105133056640625,
-0.0013933181762695312,
0.05303955078125,
-0.0029659271240234375,
-0.03216552734375,
-0.034393310546875,
-0.0157318115234375,
0.004581451416015625,
-0.0056610107421875,
-0.00446319580078125,
0.0045318603515625,
0.0254669189453125,
-0.0322265625,
0.0027408599853515625,
-0.033477783203125,
0.0161895751953125,
0.03582763671875,
0.030792236328125,
0.0017032623291015625,
0.0264434814453125,
-0.051971435546875,
0.016021728515625,
0.0014486312866210938,
-0.0136260986328125,
-0.002227783203125,
-0.00704193115234375,
-0.0102081298828125,
0.0321044921875,
0.0267181396484375,
0.01383209228515625,
-0.03179931640625,
0.01251220703125,
0.05072021484375,
0.023681640625,
-0.004878997802734375,
0.0303192138671875,
0.04217529296875,
0.0184783935546875,
-0.007175445556640625,
-0.010589599609375,
-0.005855560302734375,
0.00594329833984375,
-0.01190948486328125,
-0.0208892822265625,
0.002956390380859375,
-0.0202484130859375,
0.036895751953125,
-0.029327392578125,
0.06243896484375,
0.0211029052734375,
-0.0131988525390625,
-0.0254974365234375,
0.01309967041015625,
0.06787109375,
-0.08294677734375,
0.005390167236328125,
-0.02197265625,
-0.05718994140625,
0.00829315185546875,
-0.0070953369140625,
0.03314208984375,
-0.056182861328125,
-0.0755615234375,
-0.00797271728515625,
-0.03466796875,
-0.040313720703125,
0.0411376953125,
0.032958984375,
-0.037567138671875,
0.0239410400390625,
-0.00614166259765625,
-0.005664825439453125,
-0.007389068603515625,
0.00904083251953125,
-0.0088348388671875,
0.059906005859375,
0.032257080078125,
0.0233154296875,
-0.0017719268798828125,
0.026519775390625,
0.01386260986328125,
-0.00798797607421875,
0.00934600830078125,
0.06158447265625,
-0.00970458984375,
0.0031986236572265625,
-0.0225830078125,
0.0262603759765625,
-0.039276123046875,
-0.03485107421875,
0.0638427734375,
-0.030487060546875,
-0.017852783203125,
-0.01068115234375,
-0.0672607421875,
-0.0023250579833984375,
0.0194549560546875,
-0.007358551025390625,
-0.01436614990234375,
-0.0223388671875,
0.0292205810546875,
0.019683837890625,
-0.007720947265625,
-0.02728271484375,
-0.0222015380859375,
-0.052001953125,
-0.0115966796875,
0.0228729248046875,
-0.03289794921875,
-0.038238525390625,
0.0006632804870605469,
0.06121826171875,
0.00899505615234375,
0.0287933349609375,
0.020050048828125,
0.04913330078125,
0.053009033203125,
-0.01116943359375,
-0.040771484375,
-0.01297760009765625,
-0.0228424072265625,
0.0136260986328125,
-0.005756378173828125,
0.04864501953125,
-0.00005990266799926758,
-0.027557373046875,
0.07403564453125,
0.0244140625,
0.008026123046875,
-0.09149169921875,
-0.032257080078125,
0.08721923828125,
-0.00006431341171264648,
0.03753662109375,
0.056396484375,
-0.008148193359375,
-0.05731201171875,
-0.013214111328125,
-0.005764007568359375,
-0.043701171875,
-0.005184173583984375,
-0.0190582275390625,
0.0007109642028808594,
0.06402587890625,
0.059234619140625,
-0.09625244140625,
0.060516357421875,
0.00434112548828125,
0.005695343017578125,
0.054595947265625,
0.0379638671875,
-0.024017333984375,
-0.0311126708984375,
-0.0699462890625,
-0.049285888671875,
-0.0213470458984375,
0.056365966796875,
-0.0163421630859375,
0.021697998046875,
0.0229949951171875,
-0.0297698974609375,
0.06365966796875,
0.0019092559814453125,
0.034454345703125,
0.0589599609375,
-0.0092926025390625,
-0.0406494140625,
-0.01029205322265625,
-0.008514404296875,
0.01806640625,
-0.0194854736328125,
0.0174102783203125,
-0.052001953125,
-0.037628173828125,
-0.047119140625,
0.028778076171875,
0.0273284912109375,
-0.037872314453125,
-0.04815673828125,
0.037628173828125,
-0.00608062744140625,
-0.032745361328125,
-0.00501251220703125,
-0.00894927978515625,
-0.03515625,
0.04608154296875,
0.01312255859375,
-0.0099334716796875,
0.0163726806640625,
0.02984619140625,
-0.006916046142578125,
-0.010162353515625,
0.0160369873046875,
0.0011548995971679688,
-0.048004150390625,
0.00872802734375,
0.005413055419921875,
-0.019378662109375,
0.0247344970703125,
-0.0227203369140625,
0.0389404296875,
0.037200927734375,
-0.049560546875,
-0.02069091796875,
-0.016326904296875,
-0.026275634765625,
-0.0458984375,
-0.04290771484375,
0.0166168212890625,
0.004791259765625,
0.04034423828125,
0.03533935546875,
-0.01123809814453125,
-0.0292205810546875,
-0.05950927734375,
-0.0237579345703125,
0.0043487548828125,
-0.005462646484375,
0.02935791015625,
-0.07696533203125,
0.004222869873046875,
0.024871826171875,
-0.00606536865234375,
0.01052093505859375,
-0.01324462890625,
-0.0228424072265625,
-0.01044464111328125,
0.01041412353515625,
0.0266876220703125,
-0.053741455078125,
0.00011414289474487305,
0.09320068359375,
-0.039459228515625,
0.01558685302734375,
0.01104736328125,
-0.00699615478515625,
0.061737060546875,
0.006683349609375,
0.0007190704345703125,
0.052764892578125,
-0.045654296875,
0.0345458984375,
-0.01071929931640625,
0.0295257568359375,
-0.0833740234375,
0.0042877197265625,
-0.006298065185546875,
0.000024139881134033203,
-0.015167236328125,
-0.0093231201171875,
0.031036376953125,
0.0139007568359375,
-0.0191497802734375,
0.08416748046875,
-0.0243988037109375,
0.04119873046875,
-0.01454925537109375,
0.035369873046875,
-0.0406494140625,
0.0145263671875,
-0.00745391845703125,
-0.0277862548828125,
0.0150604248046875,
-0.054443359375,
0.0046539306640625,
-0.04327392578125,
0.0123748779296875,
0.004398345947265625,
-0.030059814453125,
0.035125732421875
] |
6bfd031288abf0c63faa905b7df2813e495f5c8b
|
Wordpress Stackexchange
Q: Wordpress plugin archive I need to find an archive of some Wordpress plugins.
Previous webmaster of the site installed some plugins and then made modifications to some of them. He did not document these modifications in any way, so I have no idea what was changed and where. There's also no contact with him. And now I need to upgrade Wordpress and its plugins - there's a security update released.
I could compare installed plugins to originals but I can't find an archive of old versions of these plugins anywhere. Is there any?
A: If the plugins were hosted in the official WordPress SVN repository, you can download old versions directly if they're available by clicking the 'developer' tab on the relevant plugin page. e.g. http://wordpress.org/extend/plugins/buddypress/developers/ (scroll down to 'other versions').
If the plugins weren't hosted at WordPress.org, you'll need to contact the plugin developer directly.
|
Q: Wordpress plugin archive I need to find an archive of some Wordpress plugins.
Previous webmaster of the site installed some plugins and then made modifications to some of them. He did not document these modifications in any way, so I have no idea what was changed and where. There's also no contact with him. And now I need to upgrade Wordpress and its plugins - there's a security update released.
I could compare installed plugins to originals but I can't find an archive of old versions of these plugins anywhere. Is there any?
A: If the plugins were hosted in the official WordPress SVN repository, you can download old versions directly if they're available by clicking the 'developer' tab on the relevant plugin page. e.g. http://wordpress.org/extend/plugins/buddypress/developers/ (scroll down to 'other versions').
If the plugins weren't hosted at WordPress.org, you'll need to contact the plugin developer directly.
|
wordpress
|
{
"language": "en",
"length": 147,
"provenance": "stackexchange_00019.jsonl.gz:428419",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83613"
}
|
[
0.02618408203125,
-0.0113067626953125,
0.00804901123046875,
0.0160980224609375,
-0.00897216796875,
-0.021636962890625,
0.056793212890625,
-0.02398681640625,
-0.0017709732055664062,
0.03192138671875,
0.0209808349609375,
-0.0122528076171875,
-0.02630615234375,
-0.034027099609375,
-0.03790283203125,
-0.0304107666015625,
0.054107666015625,
-0.021392822265625,
0.012542724609375,
-0.0004410743713378906,
0.0240936279296875,
0.05755615234375,
-0.0261383056640625,
0.08660888671875,
0.022186279296875,
0.03631591796875,
0.11505126953125,
-0.035980224609375,
0.0390625,
-0.01476287841796875,
0.0313720703125,
-0.051910400390625,
0.013885498046875,
0.0234375,
-0.01788330078125,
-0.032257080078125,
-0.0146026611328125,
0.005062103271484375,
-0.00275421142578125,
0.022308349609375,
0.0228729248046875,
-0.00547027587890625,
0.0235595703125,
-0.00650787353515625,
0.02691650390625,
-0.06060791015625,
0.0455322265625,
-0.04779052734375,
0.01983642578125,
-0.0294647216796875,
0.017303466796875,
0.02130126953125,
0.038330078125,
-0.039337158203125,
-0.0175018310546875,
0.00528717041015625,
-0.003032684326171875,
0.035675048828125,
0.0202178955078125,
-0.0298309326171875,
-0.022216796875,
0.032806396484375,
0.01384735107421875,
0.03070068359375,
0.00774383544921875,
0.0295867919921875,
0.0657958984375,
0.005016326904296875,
-0.038177490234375,
0.0013427734375,
0.038360595703125,
-0.0235748291015625,
0.0023059844970703125,
0.00428009033203125,
-0.0015592575073242188,
-0.0284881591796875,
0.0188140869140625,
-0.011016845703125,
-0.006801605224609375,
0.036224365234375,
0.024169921875,
-0.00856781005859375,
0.017486572265625,
-0.00801849365234375,
0.0028076171875,
0.01456451416015625,
-0.004238128662109375,
-0.0249786376953125,
-0.0241241455078125,
0.029052734375,
-0.0207366943359375,
-0.021270751953125,
-0.005840301513671875,
0.037506103515625,
-0.0008406639099121094,
0.005992889404296875,
0.03607177734375,
0.05224609375,
-0.0132598876953125,
0.00995635986328125,
-0.007366180419921875,
-0.0229339599609375,
0.0281982421875,
-0.027618408203125,
-0.0171966552734375,
0.017852783203125,
0.036102294921875,
0.01079559326171875,
-0.001590728759765625,
0.01348876953125,
-0.0238189697265625,
0.013671875,
-0.04364013671875,
-0.048095703125,
0.006072998046875,
0.045166015625,
-0.0489501953125,
0.0284881591796875,
0.005035400390625,
0.037841796875,
0.021453857421875,
0.048095703125,
-0.0097503662109375,
-0.0310516357421875,
-0.050079345703125,
-0.05072021484375,
-0.03021240234375,
-0.0233612060546875,
0.0235137939453125,
0.0057373046875,
-0.01078033447265625,
0.00763702392578125,
-0.0272674560546875,
-0.00327301025390625,
-0.0194091796875,
-0.0011606216430664062,
-0.002826690673828125,
0.004222869873046875,
0.01904296875,
-0.00792694091796875,
-0.007396697998046875,
-0.00533294677734375,
0.053924560546875,
-0.0247344970703125,
0.063720703125,
-0.0213470458984375,
0.0119781494140625,
0.0428466796875,
0.01172637939453125,
0.01523590087890625,
0.04705810546875,
0.03961181640625,
0.01381683349609375,
-0.00960540771484375,
0.048065185546875,
-0.05828857421875,
0.0604248046875,
-0.05975341796875,
0.034454345703125,
-0.0506591796875,
-0.035552978515625,
-0.00250244140625,
0.0200958251953125,
-0.0050201416015625,
-0.00408172607421875,
0.01520538330078125,
0.032073974609375,
0.0174560546875,
0.0178985595703125,
0.0196533203125,
0.00676727294921875,
-0.041412353515625,
0.0555419921875,
0.0176544189453125,
-0.0098419189453125,
0.05072021484375,
-0.015655517578125,
-0.00867462158203125,
0.038299560546875,
0.02349853515625,
0.0051727294921875,
-0.00002008676528930664,
0.048583984375,
0.00646209716796875,
-0.040802001953125,
-0.007801055908203125,
-0.002300262451171875,
0.0171661376953125,
0.0218353271484375,
0.006366729736328125,
0.037933349609375,
0.004268646240234375,
-0.051177978515625,
0.033416748046875,
-0.026214599609375,
0.004413604736328125,
0.022857666015625,
0.048065185546875,
-0.0091705322265625,
-0.0369873046875,
-0.022430419921875,
0.02423095703125,
-0.035186767578125,
0.0015039443969726562,
-0.07122802734375,
-0.00847625732421875,
-0.0037994384765625,
0.033599853515625,
0.0228118896484375,
0.04388427734375,
-0.00885009765625,
-0.01161956787109375,
0.0165252685546875,
-0.03021240234375,
-0.018463134765625,
0.0045318603515625,
-0.000949859619140625,
0.01293182373046875,
-0.00341033935546875,
0.006313323974609375,
-0.01348876953125,
0.014068603515625,
-0.021270751953125,
0.00959014892578125,
0.007549285888671875,
0.0302581787109375,
-0.02911376953125,
0.0142822265625,
-0.01715087890625,
0.03729248046875,
-0.0308837890625,
0.019622802734375,
0.0284881591796875,
0.0367431640625,
-0.0184173583984375,
-0.0506591796875,
-0.0537109375,
-0.10223388671875,
0.0241851806640625,
0.077880859375,
0.040863037109375,
0.01543426513671875,
0.005504608154296875,
-0.00347137451171875,
0.023284912109375,
-0.05975341796875,
0.0200347900390625,
-0.022491455078125,
0.01432037353515625,
0.026397705078125,
0.01480865478515625,
0.004608154296875,
0.01148223876953125,
0.03265380859375,
0.0163116455078125,
0.0204925537109375,
-0.017974853515625,
-0.01537322998046875,
-0.0112762451171875,
-0.0011768341064453125,
0.0029087066650390625,
-0.072265625,
-0.0360107421875,
-0.0270233154296875,
0.0260009765625,
0.023651123046875,
0.03778076171875,
0.037353515625,
-0.0022029876708984375,
0.0054779052734375,
-0.00591278076171875,
-0.007099151611328125,
0.012054443359375,
0.014251708984375,
-0.0170440673828125,
0.04339599609375,
-0.028961181640625,
-0.009796142578125,
0.037353515625,
0.0168304443359375,
-0.01032257080078125,
-0.0006771087646484375,
0.0243377685546875,
-0.003154754638671875,
-0.01326751708984375,
-0.0252532958984375,
0.048980712890625,
0.02130126953125,
-0.039825439453125,
-0.025604248046875,
0.01312255859375,
-0.005157470703125,
-0.0382080078125,
0.023895263671875,
-0.0169677734375,
-0.017333984375,
0.03900146484375,
-0.05999755859375,
0.052490234375,
-0.036163330078125,
0.047393798828125,
0.06146240234375,
-0.00487518310546875,
0.01267242431640625,
0.01116943359375,
-0.00630950927734375,
0.038116455078125,
-0.007022857666015625,
-0.019012451171875,
0.006130218505859375,
-0.059539794921875,
0.0037212371826171875,
0.01235198974609375,
-0.0022430419921875,
-0.0098724365234375,
-0.03570556640625,
-0.042266845703125,
-0.006134033203125,
-0.09552001953125,
-0.054351806640625,
-0.037811279296875,
-0.11529541015625,
0.009033203125,
-0.026123046875,
-0.0599365234375,
-0.0014219284057617188,
0.0308990478515625,
0.0273284912109375,
0.0595703125,
-0.056060791015625,
-0.07269287109375,
-0.05352783203125,
-0.09478759765625,
-0.030792236328125,
0.006565093994140625,
0.006862640380859375,
0.01451873779296875,
0.04443359375,
-0.005687713623046875,
-0.06683349609375,
-0.01049041748046875,
0.0038356781005859375,
-0.015228271484375,
0.01369476318359375,
-0.00156402587890625,
0.0010528564453125,
0.005985260009765625,
0.0167236328125,
0.05712890625,
0.03399658203125,
-0.051239013671875,
-0.0176239013671875,
-0.010528564453125,
-0.014801025390625,
0.00653076171875,
-0.0262298583984375,
0.00913238525390625,
-0.0132293701171875,
-0.0200042724609375,
-0.04168701171875,
0.0163116455078125,
0.021484375,
0.0196533203125,
0.0435791015625,
-0.039306640625,
-0.03570556640625,
0.01910400390625,
0.0171051025390625,
0.011322021484375,
0.0015192031860351562,
0.0158843994140625,
-0.01010894775390625,
-0.00225830078125,
-0.006328582763671875,
-0.007122039794921875,
-0.0202178955078125,
0.016357421875,
-0.059356689453125,
0.03509521484375,
0.00013458728790283203,
-0.048309326171875,
-0.0134124755859375,
-0.0250396728515625,
-0.011199951171875,
-0.0333251953125,
0.02508544921875,
-0.048828125,
0.026824951171875,
-0.0457763671875,
-0.002300262451171875,
-0.02490234375,
0.054046630859375,
-0.0537109375,
-0.006855010986328125,
0.014434814453125,
0.006439208984375,
0.003124237060546875,
0.0006289482116699219,
-0.041717529296875,
-0.0254669189453125,
-0.073486328125,
-0.0174713134765625,
-0.00942230224609375,
-0.043609619140625,
0.0124664306640625,
0.00772857666015625,
-0.016845703125,
-0.04541015625,
0.0008459091186523438,
-0.0003757476806640625,
-0.0123291015625,
-0.031036376953125,
-0.0263519287109375,
-0.04888916015625,
0.011444091796875,
-0.020050048828125,
-0.1171875,
-0.00807952880859375,
-0.052642822265625,
0.08258056640625,
0.0177764892578125,
-0.002262115478515625,
-0.0254669189453125,
0.040924072265625,
-0.02545166015625,
0.0034961700439453125,
0.01153564453125,
0.0462646484375,
-0.04193115234375,
-0.00136566162109375,
0.004596710205078125,
-0.0374755859375,
-0.00710296630859375,
-0.040069580078125,
-0.0211639404296875,
-0.04010009765625,
-0.0306243896484375,
-0.01297760009765625,
0.0007152557373046875,
-0.007663726806640625,
-0.018402099609375,
-0.0012054443359375,
-0.00299835205078125,
0.006214141845703125,
-0.0221710205078125,
-0.0029048919677734375,
-0.0027904510498046875,
-0.0028057098388671875,
0.026397705078125,
0.04119873046875,
-0.0169525146484375,
0.01416778564453125,
0.031829833984375,
0.01316070556640625,
-0.043182373046875,
-0.056854248046875,
0.04095458984375,
0.03729248046875,
0.03802490234375,
0.01971435546875,
0.00278472900390625,
-0.0156402587890625,
0.012542724609375,
0.0128173828125,
0.0276947021484375,
-0.041351318359375,
0.038848876953125,
0.01654052734375,
0.01320648193359375,
0.00815582275390625,
0.03009033203125,
-0.0067901611328125,
0.0028743743896484375,
-0.00946044921875,
-0.025787353515625,
-0.00603485107421875,
0.036895751953125,
-0.003551483154296875,
0.034393310546875,
-0.0235748291015625,
-0.0762939453125,
0.0143890380859375,
-0.028900146484375,
0.0267791748046875,
0.0382080078125,
-0.043243408203125,
0.07159423828125,
0.002681732177734375,
-0.01541900634765625,
-0.01922607421875,
-0.004108428955078125,
-0.007232666015625,
0.038543701171875,
-0.04296875,
-0.0159149169921875,
-0.0273590087890625,
-0.01026153564453125,
0.0236053466796875,
0.005496978759765625,
-0.06671142578125,
0.00492095947265625,
-0.006076812744140625,
-0.016937255859375,
0.042572021484375,
-0.046112060546875,
0.052490234375,
0.07061767578125,
-0.056884765625,
-0.0159149169921875,
-0.05133056640625,
0.0099334716796875,
-0.07489013671875,
-0.006988525390625,
-0.033966064453125,
-0.0033359527587890625,
0.02423095703125,
0.01806640625,
-0.030731201171875,
0.027862548828125,
-0.002155303955078125,
0.018280029296875,
0.008544921875,
0.035064697265625,
0.043701171875,
-0.050323486328125,
0.0045013427734375,
-0.01458740234375,
-0.01381683349609375,
-0.00751495361328125,
0.0223846435546875,
-0.0259857177734375,
0.00225067138671875,
-0.01486968994140625,
-0.019805908203125,
0.07550048828125,
-0.031951904296875,
0.004520416259765625,
0.0209808349609375,
0.0121307373046875,
-0.0081634521484375,
-0.006725311279296875,
0.00952911376953125,
0.0255279541015625,
0.0009446144104003906,
-0.0206298828125,
-0.01210784912109375,
-0.033203125,
-0.041595458984375,
0.05206298828125,
-0.10467529296875,
0.0294342041015625,
0.042633056640625,
0.023284912109375,
-0.029296875,
-0.025848388671875,
0.0065460205078125,
0.01465606689453125,
-0.0304412841796875,
-0.003299713134765625,
0.04949951171875,
-0.00940704345703125,
0.007343292236328125,
-0.01383209228515625,
-0.0162353515625,
0.0013017654418945312,
0.003101348876953125,
0.054473876953125,
0.0089569091796875,
-0.06768798828125,
0.0030040740966796875,
-0.04638671875,
-0.042999267578125,
-0.004283905029296875,
0.002979278564453125,
-0.0732421875,
-0.006916046142578125,
0.00595855712890625,
0.022674560546875,
-0.0129241943359375,
-0.0097198486328125,
0.019439697265625,
0.005645751953125,
-0.0055389404296875,
0.023468017578125,
0.01020050048828125,
0.035308837890625,
-0.0128631591796875,
0.05548095703125,
0.020843505859375,
0.01556396484375,
-0.02423095703125,
-0.0244140625,
0.01058197021484375,
-0.01739501953125,
-0.008209228515625,
-0.019866943359375,
0.002063751220703125,
-0.002010345458984375,
0.040557861328125,
-0.0008807182312011719,
-0.0288238525390625,
-0.0250701904296875,
-0.01212310791015625,
-0.00809478759765625,
0.08111572265625,
0.00827789306640625,
-0.02642822265625,
0.0247802734375,
-0.049530029296875,
-0.01357269287109375,
0.006488800048828125,
-0.01323699951171875,
0.020355224609375,
-0.0221710205078125,
0.0005869865417480469,
0.05712890625,
0.004138946533203125,
0.01490020751953125,
0.042236328125,
0.0095977783203125,
0.036712646484375,
0.038665771484375,
0.037353515625,
0.0193023681640625,
-0.03167724609375,
0.0254669189453125,
0.0057525634765625,
0.06646728515625,
0.0083160400390625,
-0.00800323486328125,
0.07867431640625,
-0.044464111328125,
0.0027599334716796875,
-0.0189208984375,
0.01522064208984375,
-0.0031108856201171875,
0.0217132568359375,
-0.007663726806640625,
-0.00421905517578125,
0.0160369873046875,
-0.0070648193359375,
-0.022003173828125,
-0.07794189453125,
0.04083251953125,
0.008392333984375,
-0.00580596923828125,
-0.0006542205810546875,
0.0017309188842773438,
-0.0210723876953125,
-0.0115509033203125,
-0.0092315673828125,
0.0152435302734375,
-0.033782958984375,
0.038299560546875,
0.00189208984375,
0.01410675048828125,
0.0003457069396972656,
0.0007653236389160156,
-0.033111572265625,
-0.043731689453125,
-0.030914306640625,
-0.006282806396484375,
-0.00292205810546875,
-0.0083770751953125,
-0.029754638671875,
-0.0070953369140625,
0.07000732421875,
0.02978515625,
0.014556884765625,
-0.050628662109375,
0.0166168212890625,
0.031280517578125,
0.0283050537109375,
-0.025604248046875,
-0.004608154296875,
0.0278167724609375,
0.006900787353515625,
0.00939178466796875,
0.0304107666015625,
-0.0276031494140625,
-0.00868988037109375,
0.0217437744140625,
0.0660400390625,
-0.0258026123046875,
-0.006931304931640625,
0.0264739990234375,
0.0657958984375,
-0.00960540771484375,
-0.026641845703125,
0.0400390625,
-0.036224365234375,
0.036102294921875,
0.00322723388671875,
0.06201171875,
0.00423431396484375,
0.022613525390625,
-0.05010986328125,
0.09912109375,
-0.012664794921875,
0.007762908935546875,
0.02978515625,
0.03826904296875,
-0.050323486328125,
0.0023670196533203125,
-0.00250244140625,
0.0229339599609375,
-0.0268402099609375,
-0.00803375244140625,
-0.0006704330444335938,
0.01200103759765625,
-0.00737762451171875,
-0.00304412841796875,
0.04962158203125,
0.0178070068359375,
-0.032684326171875,
-0.00775909423828125,
0.0267791748046875,
0.0262451171875,
-0.00485992431640625,
0.03753662109375,
0.00341796875,
0.023712158203125,
0.042327880859375,
-0.026611328125,
0.051513671875,
-0.059478759765625,
0.005588531494140625,
0.01531219482421875,
0.0040435791015625,
0.00507354736328125,
-0.0104827880859375,
0.0440673828125,
0.0291748046875,
-0.0263519287109375,
-0.01224517822265625,
-0.0003008842468261719,
0.0191497802734375,
0.00876617431640625,
-0.014434814453125,
0.021087646484375,
-0.030426025390625,
-0.006748199462890625,
0.011871337890625,
-0.017852783203125,
-0.0021381378173828125,
0.01479339599609375,
0.01477813720703125,
-0.01068878173828125,
-0.027984619140625,
-0.0006885528564453125,
0.005657196044921875,
-0.0244293212890625,
0.036041259765625,
-0.010162353515625,
0.02813720703125,
-0.0626220703125,
-0.018951416015625,
0.0254058837890625,
0.06256103515625,
-0.0292205810546875,
-0.06768798828125,
0.00876617431640625,
0.005126953125,
-0.00421905517578125,
0.01000213623046875,
-0.0218963623046875,
-0.0203399658203125,
0.0406494140625,
-0.0260772705078125,
-0.01348876953125,
0.0149688720703125,
-0.00244903564453125,
-0.0109100341796875,
-0.0192413330078125,
0.033843994140625,
0.0123138427734375,
0.0110321044921875,
-0.00762939453125,
-0.004230499267578125,
-0.0186614990234375,
0.00650787353515625,
0.0129852294921875,
0.0303955078125,
0.013641357421875,
-0.011260986328125,
0.03961181640625,
-0.016998291015625,
0.03076171875,
-0.0192718505859375,
-0.04315185546875,
-0.0185394287109375,
0.03302001953125,
-0.0009670257568359375,
-0.02264404296875,
0.04937744140625,
0.045257568359375,
-0.07757568359375,
-0.023101806640625,
0.03924560546875,
-0.020172119140625,
-0.0002617835998535156,
-0.0188751220703125,
0.025543212890625,
0.037322998046875,
-0.00821685791015625,
-0.013427734375,
-0.0035400390625,
0.06439208984375,
-0.030548095703125,
0.01282501220703125,
0.0046539306640625,
-0.007266998291015625,
-0.00185394287109375,
-0.0201263427734375,
-0.0301666259765625,
-0.01715087890625,
-0.04193115234375,
-0.027587890625,
-0.019195556640625,
0.03057861328125,
0.01061248779296875,
0.024627685546875,
-0.00457763671875,
0.0178070068359375,
0.04278564453125,
-0.004390716552734375,
-0.025115966796875,
0.004535675048828125,
0.045928955078125,
0.022003173828125,
0.00945281982421875,
0.045135498046875,
-0.042022705078125,
-0.027801513671875,
-0.04620361328125,
0.03375244140625,
0.0789794921875,
0.033294677734375,
0.00350189208984375,
0.04730224609375,
0.0068206787109375,
-0.04351806640625,
-0.0011243820190429688,
-0.005672454833984375,
0.003467559814453125,
-0.037872314453125,
-0.021026611328125,
0.0096893310546875,
-0.031768798828125,
0.016387939453125,
0.037811279296875,
-0.0287628173828125,
0.0015430450439453125,
-0.02166748046875,
0.0203399658203125,
-0.01047515869140625,
-0.00203704833984375,
-0.03143310546875,
-0.0850830078125,
-0.041656494140625,
0.03680419921875,
-0.02117919921875,
0.0285186767578125,
-0.003147125244140625,
-0.0172882080078125,
0.044952392578125,
-0.00647735595703125,
-0.0186920166015625,
0.0400390625,
0.0003371238708496094,
0.040863037109375,
0.002925872802734375,
-0.01837158203125,
0.0027294158935546875,
-0.020050048828125,
-0.0019273757934570312,
-0.00021541118621826172,
0.0386962890625,
-0.0113983154296875,
-0.0211181640625,
0.0140533447265625,
-0.0305328369140625,
0.019561767578125,
-0.0133056640625,
-0.00145721435546875,
-0.016876220703125,
0.0197296142578125,
-0.01433563232421875,
-0.0341796875,
-0.026336669921875,
-0.052154541015625,
0.0022335052490234375,
0.0240631103515625,
-0.0128936767578125,
-0.0305328369140625,
-0.047882080078125,
-0.01256561279296875,
0.00937652587890625,
0.0069427490234375,
-0.059600830078125,
0.02734375,
0.00848388671875,
0.004581451416015625,
-0.032318115234375,
0.0014066696166992188,
0.0010623931884765625,
0.026824951171875,
-0.016632080078125,
-0.02337646484375,
-0.032196044921875,
0.02630615234375,
-0.020233154296875,
0.02850341796875,
0.03936767578125,
-0.027191162109375,
-0.00045752525329589844,
0.0418701171875,
0.03790283203125,
0.07659912109375,
0.0169219970703125,
0.01337432861328125,
0.04498291015625,
-0.0260467529296875,
-0.041107177734375,
-0.06378173828125,
0.0167999267578125,
-0.0885009765625,
-0.0303497314453125,
-0.06439208984375,
0.0046844482421875,
-0.01494598388671875,
-0.06683349609375,
-0.06964111328125,
0.0753173828125,
-0.025848388671875,
-0.0172119140625,
-0.07061767578125,
0.01224517822265625,
0.0202178955078125,
-0.038818359375,
-0.042388916015625,
0.01425933837890625,
-0.039764404296875,
0.032958984375,
-0.00274658203125,
0.046630859375,
-0.0242156982421875,
0.00257110595703125,
-0.0276031494140625,
0.0196380615234375,
0.024505615234375,
0.007049560546875,
0.0064849853515625,
-0.003429412841796875,
0.045745849609375,
0.06768798828125,
-0.006267547607421875,
0.03607177734375,
0.01200103759765625,
-0.042877197265625,
0.017120361328125,
-0.007781982421875,
-0.042694091796875,
-0.007568359375,
0.0203094482421875,
0.0537109375,
0.0145111083984375,
-0.0279998779296875,
0.005130767822265625,
0.0182342529296875,
0.01983642578125,
-0.0231475830078125,
-0.0114898681640625,
-0.03497314453125,
-0.0216064453125,
-0.032684326171875,
-0.023101806640625,
0.0266571044921875,
-0.01325225830078125,
-0.037689208984375,
0.0115966796875,
-0.00382232666015625,
-0.013580322265625,
-0.023223876953125,
-0.026092529296875,
0.061187744140625,
-0.01548004150390625,
0.050689697265625,
0.0102081298828125,
0.004344940185546875,
0.077392578125,
0.08245849609375,
0.0213623046875,
0.00620269775390625,
-0.0386962890625,
0.00782012939453125,
0.01006317138671875,
0.01904296875,
-0.0275726318359375,
-0.02484130859375,
-0.00782012939453125,
0.00835418701171875,
-0.000400543212890625,
-0.0210418701171875,
-0.008941650390625,
0.013824462890625,
-0.00012254714965820312,
0.090087890625,
0.0139312744140625,
-0.0682373046875,
-0.0208282470703125,
0.0399169921875,
-0.01059722900390625,
-0.0291290283203125,
-0.0056610107421875,
-0.05218505859375,
0.01425933837890625,
0.00014483928680419922,
-0.001094818115234375,
-0.041839599609375,
0.0062255859375,
-0.0111541748046875,
-0.0066680908203125,
0.0203094482421875
] |
2d778d030788fa36c9e425e3a3ecbe6fe7641d3d
|
Wordpress Stackexchange
Q: Wordpress tries to load "next page" after done loading current page I have a fresh 3.5.1 installation - default theme, no plugins.
Running HTTPFox on Firefox shows that after a GET-request of any given page in Wordpress has finished loading, a GET-request is sent for the rel='next' page:
<link rel='next' title='Next Page Title' href='http://www.domain.com/next-page/' />
and fails:
00:10:04.992 0.556 698 245 GET (Aborted) text/html (NS_BINDING_ABORTED) http://www.domain.com/next-page/
My question - is this on purpose? Is wordpress doing some kind of preloading? I'd like to understand why it is doing this.
A: This isn’t WordPress, it is Firefox’ Link prefetching. You can turn it off.
Serve those requests nothing:
# Serve Firefox' prefetch requests an empty page
RewriteCond %{HTTP_X_MOZ} ^prefetch$
RewriteRule ^ - [L,R=204]
|
Q: Wordpress tries to load "next page" after done loading current page I have a fresh 3.5.1 installation - default theme, no plugins.
Running HTTPFox on Firefox shows that after a GET-request of any given page in Wordpress has finished loading, a GET-request is sent for the rel='next' page:
<link rel='next' title='Next Page Title' href='http://www.domain.com/next-page/' />
and fails:
00:10:04.992 0.556 698 245 GET (Aborted) text/html (NS_BINDING_ABORTED) http://www.domain.com/next-page/
My question - is this on purpose? Is wordpress doing some kind of preloading? I'd like to understand why it is doing this.
A: This isn’t WordPress, it is Firefox’ Link prefetching. You can turn it off.
Serve those requests nothing:
# Serve Firefox' prefetch requests an empty page
RewriteCond %{HTTP_X_MOZ} ^prefetch$
RewriteRule ^ - [L,R=204]
|
wordpress
|
{
"language": "en",
"length": 123,
"provenance": "stackexchange_00019.jsonl.gz:428433",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83656"
}
|
[
0.0675048828125,
0.004123687744140625,
0.039794921875,
-0.042999267578125,
0.005523681640625,
-0.006801605224609375,
0.00885009765625,
-0.0535888671875,
-0.0165557861328125,
0.006420135498046875,
-0.060577392578125,
0.0474853515625,
-0.032989501953125,
0.0027256011962890625,
0.03448486328125,
-0.041046142578125,
0.02783203125,
-0.03948974609375,
0.0609130859375,
0.0028476715087890625,
-0.01319122314453125,
0.0120086669921875,
0.0906982421875,
0.004131317138671875,
0.0254974365234375,
-0.01340484619140625,
0.08111572265625,
-0.00627899169921875,
0.017913818359375,
-0.025360107421875,
0.03472900390625,
-0.0239715576171875,
0.0281524658203125,
0.03631591796875,
-0.057464599609375,
-0.051910400390625,
-0.00807952880859375,
0.013946533203125,
-0.02264404296875,
0.03857421875,
0.0195159912109375,
-0.00600433349609375,
0.0372314453125,
-0.01319122314453125,
0.001552581787109375,
-0.014739990234375,
0.017669677734375,
-0.042205810546875,
0.01611328125,
-0.0035419464111328125,
0.026885986328125,
0.0038852691650390625,
0.02685546875,
0.04534912109375,
-0.0261077880859375,
0.00592803955078125,
-0.01214599609375,
0.004856109619140625,
0.0164947509765625,
-0.0183868408203125,
-0.0017652511596679688,
0.0131683349609375,
0.00933074951171875,
-0.0030918121337890625,
-0.02410888671875,
-0.035369873046875,
-0.0163421630859375,
0.0246429443359375,
0.00289154052734375,
-0.031524658203125,
0.017425537109375,
0.01947021484375,
-0.01308441162109375,
-0.00823211669921875,
-0.0164794921875,
0.007106781005859375,
0.04132080078125,
-0.0044403076171875,
-0.01371002197265625,
0.02032470703125,
-0.04217529296875,
-0.042816162109375,
-0.046234130859375,
-0.001369476318359375,
-0.006755828857421875,
0.01690673828125,
-0.0131072998046875,
0.0015096664428710938,
-0.029144287109375,
-0.0057525634765625,
-0.043121337890625,
0.00559234619140625,
0.03265380859375,
-0.0238037109375,
-0.071044921875,
0.0163726806640625,
-0.00812530517578125,
0.009613037109375,
0.0115203857421875,
0.00937652587890625,
0.002124786376953125,
-0.0289154052734375,
0.01242828369140625,
-0.0252838134765625,
-0.00839996337890625,
-0.00637054443359375,
0.02215576171875,
0.02117919921875,
0.01580810546875,
0.00905609130859375,
-0.0252685546875,
0.026031494140625,
0.0106353759765625,
0.03326416015625,
-0.055328369140625,
-0.0170440673828125,
-0.028778076171875,
-0.037872314453125,
-0.0235595703125,
-0.0271759033203125,
-0.0187835693359375,
0.00270843505859375,
-0.0142364501953125,
0.0196075439453125,
0.04632568359375,
0.0248870849609375,
0.01270294189453125,
-0.0126495361328125,
-0.0118865966796875,
0.0187530517578125,
-0.01102447509765625,
0.02545166015625,
-0.0027599334716796875,
0.0005702972412109375,
-0.0246124267578125,
-0.0110626220703125,
0.0219573974609375,
-0.021697998046875,
0.005706787109375,
0.00443267822265625,
0.0088043212890625,
-0.03656005859375,
-0.01372528076171875,
-0.0028018951416015625,
0.016510009765625,
0.01800537109375,
0.0020122528076171875,
0.0119476318359375,
0.00366973876953125,
-0.004528045654296875,
-0.00911712646484375,
-0.011444091796875,
0.0478515625,
-0.00859832763671875,
-0.00807952880859375,
-0.037445068359375,
0.03857421875,
-0.0258636474609375,
-0.007904052734375,
-0.04742431640625,
0.0026569366455078125,
-0.0101318359375,
0.00555419921875,
-0.06378173828125,
-0.08050537109375,
0.00563812255859375,
-0.06353759765625,
-0.020233154296875,
0.02142333984375,
0.0283050537109375,
0.042755126953125,
-0.047515869140625,
0.0021514892578125,
-0.00576019287109375,
-0.020416259765625,
-0.0028362274169921875,
0.0230255126953125,
-0.00740814208984375,
0.0119476318359375,
0.034942626953125,
-0.0020275115966796875,
-0.0207366943359375,
0.07666015625,
-0.0362548828125,
-0.034210205078125,
0.0233001708984375,
0.033355712890625,
0.0882568359375,
-0.0059967041015625,
0.042755126953125,
0.0036602020263671875,
0.0044708251953125,
-0.028717041015625,
0.02264404296875,
0.002197265625,
-0.00888824462890625,
0.01551055908203125,
0.0210418701171875,
-0.0097808837890625,
-0.03961181640625,
-0.0195465087890625,
0.032501220703125,
-0.03057861328125,
0.034820556640625,
-0.038787841796875,
0.03533935546875,
-0.02801513671875,
0.041595458984375,
0.03814697265625,
0.01096343994140625,
-0.01087188720703125,
0.01461029052734375,
-0.015472412109375,
-0.0197601318359375,
-0.034881591796875,
0.057769775390625,
-0.004917144775390625,
0.00458526611328125,
-0.0180206298828125,
0.0139312744140625,
-0.0109405517578125,
-0.0166015625,
-0.036102294921875,
0.005504608154296875,
0.049346923828125,
-0.0215911865234375,
-0.0272369384765625,
-0.031402587890625,
0.01058197021484375,
-0.0004897117614746094,
-0.03839111328125,
0.050933837890625,
0.0404052734375,
0.029449462890625,
-0.05389404296875,
0.008148193359375,
-0.0082550048828125,
0.0238800048828125,
-0.0158233642578125,
0.02630615234375,
0.03173828125,
0.01236724853515625,
0.0092620849609375,
-0.0129852294921875,
-0.015899658203125,
-0.043792724609375,
0.0286712646484375,
-0.036651611328125,
0.004146575927734375,
0.041168212890625,
0.05426025390625,
0.00264739990234375,
-0.01496124267578125,
0.000022172927856445312,
-0.015716552734375,
0.029510498046875,
0.01424407958984375,
-0.0245819091796875,
0.0084075927734375,
-0.0143280029296875,
0.016693115234375,
0.006771087646484375,
-0.035888671875,
0.019744873046875,
-0.028106689453125,
-0.0121917724609375,
-0.0208740234375,
-0.012664794921875,
0.0036487579345703125,
-0.0165863037109375,
0.006473541259765625,
-0.041534423828125,
-0.0078582763671875,
-0.00936126708984375,
0.050262451171875,
-0.037841796875,
-0.0255126953125,
0.0226593017578125,
-0.01024627685546875,
-0.0306854248046875,
-0.0040435791015625,
-0.001861572265625,
-0.0234375,
-0.003963470458984375,
0.027587890625,
-0.045928955078125,
-0.00807952880859375,
0.0248870849609375,
0.052490234375,
0.0423583984375,
0.03594970703125,
0.03265380859375,
-0.0027446746826171875,
0.06610107421875,
-0.004726409912109375,
-0.012481689453125,
0.04083251953125,
-0.0300750732421875,
0.034149169921875,
-0.0316162109375,
0.0233917236328125,
0.039886474609375,
-0.0167999267578125,
0.0036945343017578125,
-0.0018157958984375,
0.02606201171875,
0.022552490234375,
-0.005077362060546875,
-0.01371002197265625,
0.0178985595703125,
-0.08941650390625,
-0.041259765625,
0.051971435546875,
0.056854248046875,
0.037506103515625,
-0.02783203125,
0.0307769775390625,
0.06768798828125,
-0.0716552734375,
-0.0894775390625,
0.01058197021484375,
-0.0294036865234375,
-0.0081329345703125,
0.0253143310546875,
-0.0111541748046875,
-0.0174407958984375,
0.048828125,
-0.0022144317626953125,
-0.01136016845703125,
-0.05487060546875,
-0.0762939453125,
-0.111572265625,
-0.08978271484375,
-0.0131988525390625,
-0.0012617111206054688,
-0.0054931640625,
-0.01255035400390625,
0.052215576171875,
-0.0120849609375,
-0.05279541015625,
-0.0374755859375,
0.0260467529296875,
-0.0010890960693359375,
-0.032989501953125,
-0.0204315185546875,
-0.02606201171875,
0.0219268798828125,
-0.0172119140625,
0.059814453125,
0.0301513671875,
0.0016078948974609375,
0.017425537109375,
-0.01654052734375,
0.0244293212890625,
-0.0212249755859375,
0.034454345703125,
0.037628173828125,
-0.0234375,
-0.041839599609375,
-0.050323486328125,
-0.0225982666015625,
-0.011871337890625,
-0.08062744140625,
-0.01323699951171875,
0.0689697265625,
-0.037872314453125,
0.001125335693359375,
-0.040771484375,
-0.0178070068359375,
0.0015239715576171875,
0.024810791015625,
-0.0233154296875,
0.032501220703125,
-0.012115478515625,
-0.0133056640625,
-0.014495849609375,
0.0638427734375,
0.01152801513671875,
-0.00885009765625,
0.01549530029296875,
0.0266571044921875,
0.0051422119140625,
-0.0316162109375,
-0.065185546875,
-0.0276336669921875,
0.052215576171875,
-0.0034847259521484375,
0.0243682861328125,
-0.042266845703125,
-0.03839111328125,
-0.023834228515625,
0.07684326171875,
-0.0325927734375,
-0.0137786865234375,
0.0123443603515625,
0.016815185546875,
0.00399017333984375,
-0.055084228515625,
-0.0307464599609375,
-0.03778076171875,
-0.034942626953125,
-0.005130767822265625,
-0.0218658447265625,
0.006732940673828125,
-0.024444580078125,
0.039093017578125,
0.0017185211181640625,
-0.038116455078125,
0.0240478515625,
-0.032470703125,
-0.02392578125,
0.00412750244140625,
-0.0467529296875,
-0.040008544921875,
-0.0202484130859375,
-0.015350341796875,
-0.062103271484375,
-0.004302978515625,
-0.01486968994140625,
0.05279541015625,
0.028839111328125,
-0.04656982421875,
-0.024261474609375,
0.0267181396484375,
0.055633544921875,
0.041717529296875,
0.04522705078125,
-0.0576171875,
0.07513427734375,
0.03155517578125,
0.048431396484375,
-0.01151275634765625,
0.00763702392578125,
0.015106201171875,
-0.019561767578125,
-0.023834228515625,
-0.0452880859375,
-0.0535888671875,
-0.01397705078125,
-0.03369140625,
-0.0052490234375,
0.01020050048828125,
-0.0020503997802734375,
0.047943115234375,
0.0083770751953125,
-0.01568603515625,
-0.003795623779296875,
-0.0390625,
0.0266876220703125,
-0.007232666015625,
-0.02520751953125,
-0.0006122589111328125,
0.00656890869140625,
0.020904541015625,
-0.01261138916015625,
0.06365966796875,
-0.0264739990234375,
0.0283660888671875,
-0.002437591552734375,
0.038604736328125,
-0.0030918121337890625,
-0.0230865478515625,
0.07342529296875,
-0.00304412841796875,
0.01873779296875,
0.0203857421875,
-0.0011644363403320312,
-0.005126953125,
-0.0513916015625,
0.046875,
0.01239776611328125,
-0.044647216796875,
0.03448486328125,
-0.033447265625,
0.0037078857421875,
-0.01213836669921875,
0.0144805908203125,
-0.054595947265625,
0.053192138671875,
-0.0143890380859375,
-0.033294677734375,
-0.00007194280624389648,
0.07452392578125,
0.0634765625,
0.0222320556640625,
0.01152801513671875,
0.0723876953125,
0.062744140625,
-0.0266876220703125,
0.03045654296875,
0.0280303955078125,
0.03961181640625,
0.0304107666015625,
-0.0045623779296875,
-0.006008148193359375,
-0.01329803466796875,
-0.0147552490234375,
0.069580078125,
0.00241851806640625,
-0.031951904296875,
-0.0107269287109375,
-0.0149383544921875,
-0.0194549560546875,
0.0246734619140625,
-0.0003440380096435547,
0.024383544921875,
0.00893402099609375,
0.0181732177734375,
0.0289154052734375,
0.0227203369140625,
-0.018829345703125,
-0.00809478759765625,
-0.0106201171875,
-0.022705078125,
0.01065826416015625,
0.0018062591552734375,
0.06915283203125,
-0.00556182861328125,
0.045745849609375,
-0.0110626220703125,
0.00644683837890625,
0.00897979736328125,
0.049224853515625,
0.0238037109375,
-0.0207366943359375,
0.00392913818359375,
0.0294647216796875,
0.0251922607421875,
-0.035858154296875,
-0.002254486083984375,
0.0018854141235351562,
0.052093505859375,
-0.00820159912109375,
-0.0252685546875,
0.037567138671875,
-0.017913818359375,
-0.031005859375,
0.03021240234375,
0.04833984375,
-0.0175323486328125,
-0.0307464599609375,
0.01165008544921875,
0.040863037109375,
0.031158447265625,
-0.016265869140625,
0.041229248046875,
0.03125,
0.047943115234375,
0.0218048095703125,
-0.0090484619140625,
0.0037784576416015625,
0.007415771484375,
0.029876708984375,
-0.007293701171875,
0.0113983154296875,
-0.0193939208984375,
0.02252197265625,
-0.038238525390625,
-0.019134521484375,
0.034027099609375,
-0.0137481689453125,
0.02740478515625,
-0.047882080078125,
0.01262664794921875,
-0.037689208984375,
0.0157318115234375,
-0.0078887939453125,
-0.0159149169921875,
-0.00473785400390625,
0.0179595947265625,
-0.0556640625,
-0.0386962890625,
-0.032501220703125,
-0.031158447265625,
-0.03961181640625,
-0.020843505859375,
0.01340484619140625,
0.02001953125,
-0.038482666015625,
-0.044647216796875,
-0.0264739990234375,
0.0124664306640625,
0.033721923828125,
0.0235748291015625,
-0.03253173828125,
0.05487060546875,
0.0216217041015625,
0.023895263671875,
-0.00986480712890625,
0.0193023681640625,
-0.0013933181762695312,
-0.01485443115234375,
0.0029315948486328125,
-0.0274200439453125,
-0.0421142578125,
0.0012912750244140625,
-0.057281494140625,
0.027252197265625,
0.08343505859375,
-0.017181396484375,
0.01340484619140625,
-0.01434326171875,
0.0015192031860351562,
-0.005107879638671875,
0.0018100738525390625,
0.007843017578125,
-0.029876708984375,
0.06024169921875,
-0.0061798095703125,
-0.0212860107421875,
0.0099639892578125,
-0.00481414794921875,
-0.0108489990234375,
0.02520751953125,
-0.03216552734375,
0.0018711090087890625,
-0.0275115966796875,
0.0306549072265625,
0.035919189453125,
0.022857666015625,
0.05218505859375,
-0.005405426025390625,
0.0294189453125,
0.054901123046875,
0.01666259765625,
0.0305023193359375,
-0.00835418701171875,
0.0254669189453125,
-0.0213775634765625,
0.001979827880859375,
-0.0187530517578125,
-0.0247650146484375,
0.0279083251953125,
0.049591064453125,
0.07012939453125,
-0.068359375,
-0.004405975341796875,
0.0072021484375,
-0.044219970703125,
0.00853729248046875,
-0.01268768310546875,
0.028564453125,
-0.026824951171875,
0.041961669921875,
0.0112457275390625,
-0.000362396240234375,
0.01190948486328125,
-0.007404327392578125,
-0.017730712890625,
-0.0150146484375,
0.04736328125,
0.01412200927734375,
-0.00832366943359375,
-0.01312255859375,
-0.00872802734375,
-0.0251922607421875,
-0.023345947265625,
-0.0214385986328125,
0.0020923614501953125,
-0.040771484375,
-0.0172576904296875,
0.029296875,
0.006824493408203125,
0.013153076171875,
0.03192138671875,
0.037933349609375,
-0.020111083984375,
0.05291748046875,
-0.011016845703125,
0.0285797119140625,
0.0162811279296875,
-0.041229248046875,
0.01551055908203125,
-0.0090179443359375,
0.00868988037109375,
-0.00760650634765625,
0.002239227294921875,
-0.0027599334716796875,
-0.011962890625,
-0.0207672119140625,
-0.0172271728515625,
-0.0053863525390625,
0.07177734375,
-0.01515960693359375,
-0.0203399658203125,
0.044097900390625,
0.0184783935546875,
-0.045989990234375,
0.0128021240234375,
-0.018585205078125,
-0.0020236968994140625,
0.0285491943359375,
-0.0153961181640625,
-0.0032596588134765625,
0.017364501953125,
-0.0202178955078125,
-0.07232666015625,
0.05230712890625,
-0.008544921875,
0.054840087890625,
0.033233642578125,
-0.005016326904296875,
-0.0245513916015625,
-0.025238037109375,
-0.0308380126953125,
0.063720703125,
0.0247344970703125,
0.07354736328125,
-0.051971435546875,
-0.0301666259765625,
0.04656982421875,
0.071533203125,
-0.0052032470703125,
0.0015106201171875,
-0.035430908203125,
-0.013031005859375,
0.046417236328125,
0.06256103515625,
0.0457763671875,
0.0224456787109375,
-0.0020122528076171875,
0.0113372802734375,
0.00559234619140625,
-0.03900146484375,
0.0221710205078125,
-0.01690673828125,
-0.0155029296875,
0.018585205078125,
0.024261474609375,
0.0099639892578125,
0.0206451416015625,
0.0252838134765625,
-0.0748291015625,
0.0382080078125,
0.049835205078125,
0.042816162109375,
-0.004962921142578125,
0.05126953125,
0.0283355712890625,
-0.033355712890625,
0.0006756782531738281,
-0.05621337890625,
0.04486083984375,
-0.006839752197265625,
-0.01294708251953125,
0.02215576171875,
0.0014801025390625,
0.0257568359375,
-0.0279083251953125,
-0.02227783203125,
0.005748748779296875,
0.014251708984375,
0.09771728515625,
0.00980377197265625,
0.02325439453125,
-0.08697509765625,
-0.047943115234375,
0.0352783203125,
0.10552978515625,
-0.05267333984375,
-0.04376220703125,
-0.0031414031982421875,
-0.010589599609375,
0.0198516845703125,
-0.00762176513671875,
0.0260467529296875,
-0.030853271484375,
0.0114593505859375,
-0.0102996826171875,
-0.01242828369140625,
0.026031494140625,
0.01611328125,
0.018096923828125,
0.042999267578125,
-0.0210723876953125,
-0.0214691162109375,
0.0144500732421875,
-0.004444122314453125,
0.009429931640625,
0.01314544677734375,
-0.0155487060546875,
0.0113067626953125,
-0.0267791748046875,
0.0206298828125,
0.0009775161743164062,
0.01220703125,
-0.060028076171875,
0.0019283294677734375,
-0.021575927734375,
-0.043731689453125,
-0.022705078125,
0.040313720703125,
0.03289794921875,
0.02880859375,
0.0289459228515625,
0.01953125,
0.0240020751953125,
0.023834228515625,
0.051727294921875,
-0.004833221435546875,
-0.01197052001953125,
-0.04534912109375,
0.0166778564453125,
0.01324462890625,
0.00341033935546875,
0.0011072158813476562,
-0.005321502685546875,
0.031280517578125,
-0.026214599609375,
0.035858154296875,
0.0022983551025390625,
-0.015777587890625,
0.054595947265625,
-0.030487060546875,
0.052337646484375,
0.00030541419982910156,
-0.062408447265625,
-0.007411956787109375,
-0.021148681640625,
0.01152801513671875,
-0.0158233642578125,
0.02392578125,
0.0191497802734375,
0.0102996826171875,
0.0247650146484375,
0.00994110107421875,
-0.034332275390625,
-0.0023651123046875,
0.0419921875,
0.0143280029296875,
0.01165008544921875,
0.0318603515625,
-0.061126708984375,
-0.033416748046875,
-0.0002732276916503906,
0.00952911376953125,
-0.0020084381103515625,
0.0304412841796875,
0.005924224853515625,
-0.00153350830078125,
0.0188140869140625,
0.000812530517578125,
0.035430908203125,
0.00859832763671875,
0.02008056640625,
0.0203399658203125,
0.01018524169921875,
-0.038726806640625,
-0.07379150390625,
0.053863525390625,
-0.0029926300048828125,
0.01482391357421875,
0.0548095703125,
-0.033905029296875,
0.0014352798461914062,
-0.00522613525390625,
0.003971099853515625,
-0.026214599609375,
-0.04034423828125,
-0.004791259765625,
0.0267333984375,
-0.00658416748046875,
-0.0135955810546875,
-0.05517578125,
0.06536865234375,
0.020782470703125,
0.0137176513671875,
0.0285491943359375,
-0.038360595703125,
0.0372314453125,
0.025360107421875,
-0.0150146484375,
-0.0096282958984375,
-0.0021305084228515625,
-0.0210113525390625,
0.03875732421875,
-0.023590087890625,
0.0290374755859375,
-0.0022106170654296875,
-0.0171356201171875,
-0.017730712890625,
-0.006252288818359375,
0.0209197998046875,
-0.0197601318359375,
0.006458282470703125,
-0.020660400390625,
0.012939453125,
0.02630615234375,
-0.040618896484375,
-0.0168304443359375,
-0.0005850791931152344,
-0.0546875,
0.0084991455078125,
-0.02691650390625,
-0.043975830078125,
-0.0296783447265625,
0.0011653900146484375,
-0.004680633544921875,
0.01392364501953125,
-0.087158203125,
0.06488037109375,
-0.0000311732292175293,
0.019012451171875,
-0.04144287109375,
-0.004261016845703125,
-0.002750396728515625,
0.0102996826171875,
-0.0235443115234375,
-0.04217529296875,
-0.0269012451171875,
0.0345458984375,
-0.031280517578125,
-0.0028705596923828125,
0.023223876953125,
-0.013153076171875,
-0.028167724609375,
-0.04827880859375,
-0.009735107421875,
0.01509857177734375,
-0.00782012939453125,
0.0133209228515625,
0.04083251953125,
0.005847930908203125,
-0.035736083984375,
-0.056365966796875,
0.005779266357421875,
-0.026397705078125,
0.0034961700439453125,
0.01397705078125,
-0.0285797119140625,
-0.0231475830078125,
-0.042816162109375,
-0.052093505859375,
0.0185394287109375,
0.0286407470703125,
-0.03759765625,
-0.0221099853515625,
-0.0019025802612304688,
-0.006687164306640625,
-0.0005016326904296875,
-0.006122589111328125,
-0.019012451171875,
-0.01467132568359375,
0.044097900390625,
0.03656005859375,
0.044708251953125,
0.005588531494140625,
0.03778076171875,
-0.0184783935546875,
0.05609130859375,
0.0289459228515625,
0.030731201171875,
-0.015045166015625,
0.02508544921875,
-0.00850677490234375,
0.0290374755859375,
-0.02508544921875,
0.039794921875,
-0.01021575927734375,
0.007396697998046875,
0.003780364990234375,
0.0033111572265625,
0.00543975830078125,
0.0092620849609375,
0.036590576171875,
0.00829315185546875,
0.0089263916015625,
-0.0199127197265625,
-0.0017242431640625,
0.0037021636962890625,
-0.03863525390625,
-0.0293121337890625,
0.04425048828125,
-0.10565185546875,
-0.035675048828125,
0.030242919921875,
-0.0267181396484375,
-0.03057861328125,
-0.005290985107421875,
-0.06439208984375,
0.00408935546875,
-0.0187835693359375,
0.0273284912109375,
-0.055084228515625,
0.01490020751953125,
0.083740234375,
-0.054779052734375,
0.0038356781005859375,
0.02532958984375,
0.01061248779296875,
0.0175323486328125,
-0.032379150390625,
0.056060791015625,
0.06268310546875,
-0.056640625,
-0.007511138916015625,
0.0264434814453125,
-0.00835418701171875,
-0.040679931640625,
-0.04425048828125,
0.0118408203125,
0.0270843505859375,
-0.00911712646484375,
0.0244903564453125,
0.0190277099609375,
0.0213775634765625,
-0.00991058349609375,
0.034271240234375,
-0.0034923553466796875,
0.02587890625,
0.00693511962890625,
0.0087890625,
-0.0296173095703125,
0.0019521713256835938,
0.003475189208984375,
-0.0345458984375,
-0.0021228790283203125,
0.0224151611328125,
0.0116119384765625,
0.0028133392333984375,
-0.01751708984375,
0.02203369140625,
0.01190185546875,
-0.023101806640625
] |
aa8a292313bf3cefdd131d71c6fb0b5d224429aa
|
Wordpress Stackexchange
Q: Is it possible to remove next-post / previous-post with out creating a custom template? I'm creating a plugin that uses a custom post type. I do not want to make a custom template for viewing the posts and discovered I can add a filter for the_content to include my custom fields, this works great. However, I don't want visitors to navigate the custom post types with the previous next navigation. It there a way to remove these without creating a custom template?
Thank you for taking the time to look at my issue.
A: Try this:
function remove_link( $format, $link ) {
return false;
}
add_filter( 'previous_post_link', 'remove_link' );
add_filter( 'next_post_link', 'remove_link' );
It should work if the theme uses next_post_link() and previous_post_link().
Cheers
|
Q: Is it possible to remove next-post / previous-post with out creating a custom template? I'm creating a plugin that uses a custom post type. I do not want to make a custom template for viewing the posts and discovered I can add a filter for the_content to include my custom fields, this works great. However, I don't want visitors to navigate the custom post types with the previous next navigation. It there a way to remove these without creating a custom template?
Thank you for taking the time to look at my issue.
A: Try this:
function remove_link( $format, $link ) {
return false;
}
add_filter( 'previous_post_link', 'remove_link' );
add_filter( 'next_post_link', 'remove_link' );
It should work if the theme uses next_post_link() and previous_post_link().
Cheers
|
wordpress
|
{
"language": "en",
"length": 125,
"provenance": "stackexchange_00019.jsonl.gz:428458",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83743"
}
|
[
0.07598876953125,
0.0034236907958984375,
0.033447265625,
-0.017578125,
0.02508544921875,
-0.037322998046875,
0.0654296875,
-0.04833984375,
-0.0198516845703125,
0.02252197265625,
0.019805908203125,
-0.0103302001953125,
-0.039794921875,
-0.03802490234375,
-0.002166748046875,
-0.032958984375,
0.022735595703125,
-0.00890350341796875,
0.04876708984375,
-0.0243988037109375,
0.018341064453125,
-0.01502227783203125,
0.06903076171875,
0.058563232421875,
0.0115814208984375,
0.045989990234375,
0.057403564453125,
-0.0224761962890625,
0.00373077392578125,
-0.0277252197265625,
0.0195770263671875,
-0.0161285400390625,
-0.0089111328125,
0.0567626953125,
-0.03564453125,
-0.058135986328125,
-0.01316070556640625,
0.0227203369140625,
-0.0036525726318359375,
0.007293701171875,
-0.00757598876953125,
0.016326904296875,
-0.0201416015625,
-0.01218414306640625,
-0.0401611328125,
-0.00274658203125,
-0.02337646484375,
-0.0301513671875,
0.018890380859375,
0.00687408447265625,
0.01384735107421875,
-0.02496337890625,
0.031036376953125,
-0.00927734375,
-0.024169921875,
-0.03424072265625,
-0.028076171875,
-0.01263427734375,
0.02581787109375,
0.01293182373046875,
-0.0037670135498046875,
-0.01641845703125,
0.0012102127075195312,
-0.027191162109375,
-0.006053924560546875,
0.00531768798828125,
-0.0036373138427734375,
0.0164337158203125,
-0.0528564453125,
-0.0013065338134765625,
0.037506103515625,
-0.036407470703125,
0.0072174072265625,
-0.024017333984375,
-0.0186614990234375,
-0.01104736328125,
0.021942138671875,
-0.01120758056640625,
0.0016222000122070312,
-0.01641845703125,
-0.05694580078125,
0.00954437255859375,
-0.03106689453125,
-0.052276611328125,
-0.004627227783203125,
-0.0267181396484375,
-0.030120849609375,
0.0207366943359375,
-0.02008056640625,
-0.021514892578125,
-0.031341552734375,
-0.035125732421875,
0.021575927734375,
0.0007262229919433594,
-0.047210693359375,
0.0078887939453125,
0.055938720703125,
0.033935546875,
0.00536346435546875,
0.0036487579345703125,
0.006916046142578125,
-0.051666259765625,
0.029388427734375,
-0.030181884765625,
-0.0013608932495117188,
0.016448974609375,
-0.006229400634765625,
0.02459716796875,
0.052032470703125,
0.043212890625,
0.01555633544921875,
0.0151214599609375,
-0.01242828369140625,
-0.0228424072265625,
-0.031219482421875,
0.046844482421875,
-0.01087188720703125,
-0.020721435546875,
0.006847381591796875,
0.0273284912109375,
-0.01580810546875,
-0.009857177734375,
-0.00737762451171875,
-0.01329803466796875,
0.031005859375,
-0.002040863037109375,
-0.0289306640625,
0.006591796875,
0.026519775390625,
0.01397705078125,
-0.062744140625,
-0.001659393310546875,
0.07269287109375,
0.02569580078125,
0.034027099609375,
-0.031646728515625,
0.0011148452758789062,
-0.0352783203125,
-0.003673553466796875,
-0.00589752197265625,
-0.00234222412109375,
-0.0226898193359375,
-0.0032596588134765625,
-0.02764892578125,
0.054168701171875,
0.032257080078125,
0.006465911865234375,
0.007709503173828125,
0.0211029052734375,
-0.0217437744140625,
0.019073486328125,
-0.03570556640625,
0.050872802734375,
-0.01427459716796875,
-0.0287017822265625,
-0.043426513671875,
0.00881195068359375,
-0.022430419921875,
-0.005535125732421875,
-0.038543701171875,
0.0265045166015625,
-0.006572723388671875,
-0.01506805419921875,
-0.054168701171875,
-0.08941650390625,
0.0187835693359375,
-0.070068359375,
-0.0147552490234375,
0.031097412109375,
0.0187530517578125,
0.046539306640625,
-0.0692138671875,
-0.02154541015625,
-0.0008091926574707031,
-0.01422882080078125,
0.0237274169921875,
0.008544921875,
-0.00620269775390625,
-0.007801055908203125,
0.07342529296875,
0.0161590576171875,
-0.034271240234375,
0.009063720703125,
-0.00670623779296875,
-0.07171630859375,
0.033966064453125,
0.0311737060546875,
0.061798095703125,
-0.00033855438232421875,
0.0233917236328125,
0.09088134765625,
0.00923919677734375,
-0.0213165283203125,
-0.0013427734375,
0.0165557861328125,
-0.033416748046875,
0.02203369140625,
-0.0133819580078125,
0.00722503662109375,
0.003932952880859375,
-0.0134735107421875,
0.0262908935546875,
-0.0051422119140625,
0.007114410400390625,
-0.0517578125,
0.02435302734375,
-0.0240936279296875,
0.04803466796875,
-0.055908203125,
0.0101776123046875,
0.03863525390625,
0.003200531005859375,
-0.05572509765625,
0.02740478515625,
0.0028743743896484375,
0.007091522216796875,
0.01409912109375,
-0.01322174072265625,
0.0074920654296875,
0.00452423095703125,
0.0115966796875,
0.01125335693359375,
-0.0170440673828125,
0.00019466876983642578,
0.054595947265625,
-0.0226593017578125,
-0.01800537109375,
-0.0306396484375,
-0.01934814453125,
0.0078582763671875,
-0.10235595703125,
0.062225341796875,
0.006961822509765625,
-0.04290771484375,
-0.0284271240234375,
0.0355224609375,
0.040313720703125,
-0.05670166015625,
-0.0024700164794921875,
0.039947509765625,
0.031341552734375,
0.041015625,
-0.01409149169921875,
-0.01444244384765625,
0.03369140625,
-0.0259246826171875,
0.02044677734375,
-0.02294921875,
0.0106201171875,
0.0262451171875,
0.0105438232421875,
0.00909423828125,
0.015472412109375,
0.00904083251953125,
0.038970947265625,
0.00447845458984375,
0.01360321044921875,
-0.01222991943359375,
0.0246429443359375,
-0.0123138427734375,
0.0150146484375,
0.00028324127197265625,
-0.042144775390625,
0.00536346435546875,
0.040771484375,
-0.0252532958984375,
0.03228759765625,
0.017181396484375,
-0.01352691650390625,
-0.035552978515625,
0.02813720703125,
0.0164031982421875,
-0.004108428955078125,
-0.0177764892578125,
0.01348876953125,
0.01557159423828125,
-0.024810791015625,
-0.00009375810623168945,
0.01535797119140625,
-0.01776123046875,
-0.0139007568359375,
0.00289154052734375,
-0.0052032470703125,
-0.01544952392578125,
-0.004917144775390625,
-0.04388427734375,
0.02862548828125,
0.01277923583984375,
0.01275634765625,
-0.004207611083984375,
0.007762908935546875,
0.0219573974609375,
-0.036956787109375,
0.055450439453125,
0.00630950927734375,
-0.019744873046875,
-0.07073974609375,
-0.05828857421875,
0.056915283203125,
-0.05950927734375,
0.01837158203125,
0.07025146484375,
-0.005290985107421875,
0.005214691162109375,
0.00406646728515625,
0.0201416015625,
0.024139404296875,
-0.0086517333984375,
-0.0259857177734375,
-0.00634765625,
-0.053497314453125,
-0.036346435546875,
0.0117950439453125,
0.0195159912109375,
0.0080108642578125,
-0.043487548828125,
0.01273345947265625,
0.0264129638671875,
-0.0306243896484375,
0.006855010986328125,
0.045257568359375,
-0.0033397674560546875,
-0.0249786376953125,
0.046783447265625,
-0.01873779296875,
-0.0186309814453125,
0.0706787109375,
-0.01116180419921875,
0.00475311279296875,
-0.053192138671875,
-0.034576416015625,
-0.0472412109375,
-0.055267333984375,
0.026580810546875,
0.0181884765625,
0.00443267822265625,
0.00788116455078125,
0.07415771484375,
0.00626373291015625,
-0.06768798828125,
-0.0016307830810546875,
-0.03009033203125,
-0.0311737060546875,
0.032867431640625,
0.0103912353515625,
0.01751708984375,
0.00302886962890625,
0.0273590087890625,
0.0117340087890625,
0.0211639404296875,
-0.03594970703125,
-0.027191162109375,
-0.007617950439453125,
0.01812744140625,
0.0097808837890625,
-0.0001270771026611328,
0.0123291015625,
0.0304412841796875,
0.01149749755859375,
-0.0308380126953125,
-0.03216552734375,
-0.017791748046875,
-0.04827880859375,
0.045166015625,
0.016357421875,
0.01296234130859375,
-0.045013427734375,
0.06304931640625,
0.011138916015625,
-0.012939453125,
-0.015380859375,
-0.01141357421875,
0.031463623046875,
0.0081787109375,
0.033203125,
0.0012950897216796875,
0.03802490234375,
-0.0176544189453125,
-0.004138946533203125,
0.001445770263671875,
-0.0007915496826171875,
-0.0018939971923828125,
-0.0184478759765625,
-0.038482666015625,
-0.060150146484375,
0.05914306640625,
-0.011199951171875,
0.005344390869140625,
-0.00888824462890625,
-0.033477783203125,
0.0179290771484375,
0.11419677734375,
-0.09722900390625,
-0.0218963623046875,
0.01099395751953125,
0.004695892333984375,
0.061279296875,
-0.015716552734375,
-0.04119873046875,
-0.049285888671875,
-0.110595703125,
0.0245513916015625,
-0.0016651153564453125,
-0.0161285400390625,
-0.033538818359375,
0.055419921875,
-0.0789794921875,
-0.0272979736328125,
0.0394287109375,
0.00188446044921875,
0.006008148193359375,
0.006099700927734375,
-0.0196533203125,
-0.0211334228515625,
-0.029449462890625,
0.0008678436279296875,
-0.0303497314453125,
-0.003452301025390625,
-0.01519775390625,
0.037078857421875,
0.023406982421875,
-0.00261688232421875,
-0.023956298828125,
0.013824462890625,
0.028076171875,
0.0179290771484375,
0.00997161865234375,
-0.016876220703125,
0.025665283203125,
-0.00086212158203125,
0.005634307861328125,
-0.027801513671875,
0.0266265869140625,
0.00007534027099609375,
-0.0086822509765625,
0.031463623046875,
-0.052642822265625,
0.00025773048400878906,
-0.03192138671875,
-0.0276031494140625,
-0.018585205078125,
-0.01293182373046875,
-0.01508331298828125,
0.03411865234375,
-0.00591278076171875,
-0.00420379638671875,
-0.0236663818359375,
-0.037567138671875,
0.038726806640625,
0.01432037353515625,
-0.045013427734375,
0.005336761474609375,
0.0537109375,
0.0266265869140625,
-0.0191650390625,
-0.01108551025390625,
0.012908935546875,
0.0283050537109375,
0.017852783203125,
0.0102996826171875,
-0.00812530517578125,
-0.0194549560546875,
0.04193115234375,
-0.0062713623046875,
-0.021820068359375,
-0.01580810546875,
0.07659912109375,
0.005504608154296875,
-0.0340576171875,
0.0271453857421875,
-0.0205535888671875,
0.0188446044921875,
0.01556396484375,
-0.01019287109375,
-0.033416748046875,
0.01169586181640625,
0.046112060546875,
-0.0226898193359375,
0.027252197265625,
-0.035888671875,
0.0003101825714111328,
0.005401611328125,
0.0190582275390625,
0.0232086181640625,
0.04278564453125,
-0.01096343994140625,
0.0167694091796875,
-0.0295562744140625,
0.0010900497436523438,
-0.02777099609375,
-0.0102081298828125,
-0.02020263671875,
0.0301971435546875,
-0.0183868408203125,
-0.005802154541015625,
-0.003322601318359375,
-0.0024280548095703125,
0.05914306640625,
0.004970550537109375,
-0.0137786865234375,
-0.0625,
-0.00445556640625,
0.019775390625,
-0.016021728515625,
0.0012187957763671875,
0.05987548828125,
0.035736083984375,
-0.003032684326171875,
-0.0157470703125,
0.0026092529296875,
-0.01187896728515625,
-0.058074951171875,
-0.02020263671875,
-0.0018768310546875,
-0.0034999847412109375,
0.0168609619140625,
0.049774169921875,
-0.0197296142578125,
0.041961669921875,
-0.0261077880859375,
0.0196380615234375,
-0.00656890869140625,
0.02178955078125,
0.0064239501953125,
0.006832122802734375,
0.00800323486328125,
-0.00738525390625,
0.0169219970703125,
-0.0290985107421875,
-0.027557373046875,
0.0207977294921875,
0.037261962890625,
-0.0121307373046875,
-0.006038665771484375,
0.0248260498046875,
0.0082244873046875,
-0.01190948486328125,
0.03692626953125,
0.046051025390625,
-0.04766845703125,
0.023956298828125,
0.05242919921875,
0.0018720626831054688,
0.0027313232421875,
-0.01450347900390625,
-0.019073486328125,
-0.04205322265625,
-0.01161956787109375,
-0.0283203125,
-0.01503753662109375,
-0.005886077880859375,
-0.0205230712890625,
0.006500244140625,
-0.01043701171875,
0.01175689697265625,
-0.038818359375,
-0.0140838623046875,
-0.0256500244140625,
0.005031585693359375,
0.027374267578125,
-0.028106689453125,
0.056549072265625,
-0.0295867919921875,
-0.01045989990234375,
-0.0277557373046875,
0.024658203125,
0.0201263427734375,
0.018341064453125,
-0.047454833984375,
0.0078277587890625,
-0.039886474609375,
-0.0121002197265625,
-0.072265625,
-0.0762939453125,
-0.039031982421875,
0.007717132568359375,
0.020721435546875,
0.0080718994140625,
0.0119171142578125,
-0.01111602783203125,
0.007167816162109375,
0.0114288330078125,
0.004283905029296875,
0.0200958251953125,
-0.0013742446899414062,
0.0670166015625,
0.0245513916015625,
0.0706787109375,
0.030731201171875,
0.0258941650390625,
-0.0298004150390625,
-0.03582763671875,
0.0207366943359375,
-0.045745849609375,
-0.04339599609375,
-0.0286712646484375,
-0.0457763671875,
0.040740966796875,
0.050048828125,
-0.009521484375,
0.0117950439453125,
-0.01172637939453125,
0.0019779205322265625,
-0.02569580078125,
0.01068878173828125,
0.004505157470703125,
-0.0021762847900390625,
0.01197052001953125,
0.0009317398071289062,
0.00955963134765625,
-0.000059723854064941406,
0.0008883476257324219,
-0.0231475830078125,
0.020172119140625,
-0.0222930908203125,
-0.00461578369140625,
-0.01152801513671875,
0.0258941650390625,
0.01531982421875,
0.0008373260498046875,
0.033660888671875,
0.0155792236328125,
0.02764892578125,
0.0193939208984375,
-0.0201263427734375,
0.0225067138671875,
0.022308349609375,
0.04913330078125,
-0.00380706787109375,
0.0109100341796875,
0.03973388671875,
-0.0273895263671875,
-0.0089111328125,
0.013397216796875,
-0.0007739067077636719,
-0.055572509765625,
0.00036334991455078125,
-0.022064208984375,
0.0299072265625,
0.0589599609375,
0.0121002197265625,
0.03662109375,
0.0284271240234375,
-0.0160064697265625,
0.0128021240234375,
-0.00667572021484375,
0.0014905929565429688,
-0.00577545166015625,
-0.01111602783203125,
0.0034542083740234375,
0.001674652099609375,
0.002071380615234375,
-0.0103759765625,
-0.0205535888671875,
0.005664825439453125,
-0.024688720703125,
-0.0217132568359375,
-0.0019426345825195312,
-0.0028400421142578125,
-0.0277862548828125,
-0.0650634765625,
-0.00634765625,
-0.01148223876953125,
-0.0034999847412109375,
0.051177978515625,
-0.01361846923828125,
0.0162506103515625,
0.03741455078125,
-0.0240478515625,
0.030731201171875,
-0.006801605224609375,
-0.0325927734375,
-0.031524658203125,
-0.045318603515625,
0.007022857666015625,
0.01194000244140625,
-0.0391845703125,
0.0291748046875,
-0.00949859619140625,
-0.043701171875,
-0.0175628662109375,
0.042388916015625,
0.125244140625,
-0.01055145263671875,
-0.047393798828125,
0.024078369140625,
0.01544952392578125,
-0.02423095703125,
-0.00238037109375,
-0.0028171539306640625,
-0.0260162353515625,
0.0015087127685546875,
-0.0184783935546875,
-0.0146636962890625,
0.01184844970703125,
-0.01325225830078125,
-0.10943603515625,
0.10858154296875,
0.001220703125,
0.07568359375,
0.005115509033203125,
0.0182342529296875,
-0.0172271728515625,
-0.0009264945983886719,
-0.0269622802734375,
0.0667724609375,
0.016265869140625,
0.045928955078125,
-0.031646728515625,
-0.01409149169921875,
0.01410675048828125,
0.0462646484375,
0.0609130859375,
0.01849365234375,
0.0184783935546875,
-0.021575927734375,
0.043212890625,
0.035369873046875,
-0.0238189697265625,
0.0021800994873046875,
-0.0082244873046875,
0.04376220703125,
0.00582122802734375,
-0.0655517578125,
0.02801513671875,
-0.0222320556640625,
-0.0193023681640625,
0.019439697265625,
0.0210723876953125,
0.0264892578125,
-0.00974273681640625,
0.001117706298828125,
-0.020294189453125,
-0.0016927719116210938,
0.011810302734375,
0.004055023193359375,
0.0197906494140625,
0.04205322265625,
0.04888916015625,
-0.043853759765625,
-0.00025534629821777344,
-0.032501220703125,
0.0535888671875,
-0.0016965866088867188,
0.055450439453125,
0.035675048828125,
0.0279998779296875,
0.019866943359375,
-0.053192138671875,
0.02520751953125,
-0.00843048095703125,
-0.04901123046875,
0.07177734375,
0.011871337890625,
0.0096435546875,
-0.07635498046875,
-0.01392364501953125,
0.038116455078125,
0.0787353515625,
-0.050933837890625,
-0.0474853515625,
-0.00525665283203125,
-0.0183868408203125,
0.01409149169921875,
-0.007488250732421875,
0.001148223876953125,
-0.01355743408203125,
-0.0034389495849609375,
-0.042205810546875,
0.0034465789794921875,
0.01763916015625,
0.03887939453125,
-0.0177764892578125,
-0.005008697509765625,
-0.035003662109375,
-0.02679443359375,
-0.0391845703125,
-0.01201629638671875,
0.0308074951171875,
0.036102294921875,
0.019287109375,
0.0258636474609375,
0.0228424072265625,
-0.00714874267578125,
0.0209197998046875,
0.018951416015625,
-0.06787109375,
0.0006237030029296875,
-0.00007027387619018555,
-0.052154541015625,
-0.061492919921875,
0.0180511474609375,
0.01361083984375,
0.0228729248046875,
0.0204315185546875,
0.0079498291015625,
0.0268707275390625,
0.00022745132446289062,
-0.0100250244140625,
-0.01678466796875,
0.01404571533203125,
-0.0506591796875,
0.00382232666015625,
-0.01128387451171875,
-0.0225677490234375,
0.008575439453125,
-0.035003662109375,
0.0289306640625,
0.0004639625549316406,
0.0236358642578125,
0.0124969482421875,
-0.0313720703125,
0.057281494140625,
0.0011606216430664062,
0.0570068359375,
0.025390625,
-0.0229339599609375,
0.004329681396484375,
-0.05072021484375,
-0.019500732421875,
0.003681182861328125,
0.016876220703125,
-0.036834716796875,
0.057952880859375,
0.035614013671875,
-0.01322174072265625,
-0.004108428955078125,
-0.0290679931640625,
0.04296875,
0.00365447998046875,
-0.0126953125,
0.0259552001953125,
-0.0121002197265625,
-0.01557159423828125,
-0.005687713623046875,
0.04046630859375,
0.005260467529296875,
0.031036376953125,
-0.0177764892578125,
0.0345458984375,
-0.0208587646484375,
0.04541015625,
-0.0242919921875,
-0.00635528564453125,
0.020294189453125,
0.043792724609375,
0.030975341796875,
-0.02874755859375,
-0.0293121337890625,
0.01134490966796875,
0.033660888671875,
-0.0258941650390625,
0.0259246826171875,
-0.01959228515625,
0.0052947998046875,
-0.0187530517578125,
0.0017633438110351562,
-0.0167999267578125,
0.0226593017578125,
-0.0016832351684570312,
-0.0203399658203125,
0.0345458984375,
-0.008209228515625,
-0.021240234375,
0.03656005859375,
0.0120697021484375,
-0.028533935546875,
0.0280303955078125,
-0.04901123046875,
0.0511474609375,
0.03912353515625,
-0.01044464111328125,
-0.0002994537353515625,
0.043701171875,
-0.004787445068359375,
0.0070037841796875,
0.0294342041015625,
0.0169677734375,
0.03582763671875,
-0.04888916015625,
-0.0235595703125,
-0.0237274169921875,
0.042510986328125,
0.0125885009765625,
0.01479339599609375,
-0.0298004150390625,
0.01149749755859375,
-0.040863037109375,
-0.0250396728515625,
-0.0185089111328125,
-0.03662109375,
-0.0122222900390625,
0.0253753662109375,
-0.0255126953125,
-0.043121337890625,
-0.07635498046875,
0.0028743743896484375,
0.0277252197265625,
0.0224456787109375,
-0.1002197265625,
0.053619384765625,
-0.0019369125366210938,
0.029693603515625,
-0.01023101806640625,
0.0008997917175292969,
-0.0173492431640625,
-0.003871917724609375,
-0.002079010009765625,
-0.0242462158203125,
-0.035675048828125,
0.042816162109375,
-0.0264739990234375,
-0.018707275390625,
-0.01380157470703125,
-0.0015926361083984375,
0.006290435791015625,
-0.01222991943359375,
-0.0125732421875,
0.048187255859375,
0.035430908203125,
0.007556915283203125,
0.0328369140625,
0.0003452301025390625,
-0.035736083984375,
-0.04693603515625,
0.013641357421875,
-0.037750244140625,
-0.026214599609375,
0.0243988037109375,
-0.032684326171875,
-0.011566162109375,
-0.03717041015625,
-0.09375,
0.04736328125,
-0.00856781005859375,
-0.05267333984375,
-0.020477294921875,
0.028106689453125,
0.003993988037109375,
-0.003627777099609375,
0.005893707275390625,
-0.01146697998046875,
-0.03375244140625,
0.0011663436889648438,
0.009246826171875,
0.046539306640625,
0.00603485107421875,
0.022064208984375,
-0.006435394287109375,
0.034210205078125,
0.0166168212890625,
0.0172119140625,
-0.01274871826171875,
-0.0011959075927734375,
-0.0035076141357421875,
0.0103302001953125,
-0.0489501953125,
0.0311126708984375,
0.00579833984375,
0.049530029296875,
-0.01453399658203125,
-0.0101318359375,
-0.019561767578125,
0.003429412841796875,
0.049713134765625,
0.07843017578125,
0.0214691162109375,
-0.044219970703125,
0.01210784912109375,
-0.01776123046875,
-0.046783447265625,
-0.026947021484375,
0.035614013671875,
-0.07861328125,
-0.03680419921875,
0.0253143310546875,
-0.00704193115234375,
-0.01172637939453125,
-0.05413818359375,
-0.048095703125,
-0.0222625732421875,
-0.04364013671875,
0.05059814453125,
-0.06463623046875,
0.095458984375,
0.0114288330078125,
-0.01403045654296875,
0.04376220703125,
-0.028076171875,
-0.032745361328125,
0.0309295654296875,
-0.0282135009765625,
0.006378173828125,
-0.0242462158203125,
-0.0235595703125,
0.03955078125,
-0.00395965576171875,
0.044036865234375,
-0.041839599609375,
-0.0301666259765625,
-0.017120361328125,
0.021270751953125,
0.003917694091796875,
0.007740020751953125,
-0.0411376953125,
0.0489501953125,
0.0135040283203125,
0.0635986328125,
0.017547607421875,
0.053466796875,
0.0193328857421875,
0.01800537109375,
-0.01971435546875,
-0.0118408203125,
0.0100860595703125,
-0.03546142578125,
-0.01837158203125,
-0.01224517822265625,
-0.047210693359375,
-0.061614990234375,
0.0296173095703125,
0.0180206298828125,
-0.000629425048828125,
0.0214691162109375
] |
d3f1b0fec3ab45b9e74059451b57ea54157ce119
|
Wordpress Stackexchange
Q: Where to put archive-{post-type}.php I have a plugin that adds a custom post type for a website I'm building. I am using the_content filters to change how a singular page looks, and it works great, allowing me to keep everything contained in the plugin.
However, I want to render a custom archive page using dls and what not, but I have no idea how to do this. This website will probably always use the same theme, but I still want to keep my plugin as separated from the theme as possible.
A: The archive-{post-type}.php files goes directly in your theme directory. Notice that you will also need to make sure has_archive is set to true for any post types you wish to display as archives. Depending on how you registered you post type the method used to change this might differ. I'm really just familiar with registering manually using register_post_type, in which case you simply need to include 'has_archive' => true in your arguments array, but I would suspect the corresponding functionality to be available in most post type related plugins.
|
Q: Where to put archive-{post-type}.php I have a plugin that adds a custom post type for a website I'm building. I am using the_content filters to change how a singular page looks, and it works great, allowing me to keep everything contained in the plugin.
However, I want to render a custom archive page using dls and what not, but I have no idea how to do this. This website will probably always use the same theme, but I still want to keep my plugin as separated from the theme as possible.
A: The archive-{post-type}.php files goes directly in your theme directory. Notice that you will also need to make sure has_archive is set to true for any post types you wish to display as archives. Depending on how you registered you post type the method used to change this might differ. I'm really just familiar with registering manually using register_post_type, in which case you simply need to include 'has_archive' => true in your arguments array, but I would suspect the corresponding functionality to be available in most post type related plugins.
|
wordpress
|
{
"language": "en",
"length": 182,
"provenance": "stackexchange_00019.jsonl.gz:428468",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83762"
}
|
[
0.07513427734375,
0.0130615234375,
-0.0035839080810546875,
-0.01474761962890625,
0.034088134765625,
-0.04205322265625,
0.08721923828125,
-0.01454925537109375,
-0.00445556640625,
-0.006427764892578125,
0.0233154296875,
-0.0181121826171875,
-0.033447265625,
-0.05609130859375,
0.006153106689453125,
-0.0283050537109375,
0.043304443359375,
-0.039337158203125,
0.019073486328125,
-0.01161956787109375,
0.034271240234375,
0.0085906982421875,
0.034088134765625,
0.023406982421875,
0.00499725341796875,
0.0382080078125,
0.09503173828125,
-0.027099609375,
0.0181732177734375,
-0.0012416839599609375,
0.02288818359375,
-0.04803466796875,
0.02984619140625,
-0.006488800048828125,
0.017974853515625,
0.055267333984375,
-0.01812744140625,
0.0084075927734375,
0.02001953125,
0.01160430908203125,
0.00662994384765625,
0.004764556884765625,
0.041839599609375,
-0.01434326171875,
0.00804901123046875,
-0.0238494873046875,
0.0222320556640625,
-0.034393310546875,
0.0184783935546875,
-0.0083770751953125,
0.00027298927307128906,
0.0114593505859375,
0.0172576904296875,
-0.028961181640625,
-0.008392333984375,
-0.00833892822265625,
-0.011993408203125,
-0.0013666152954101562,
0.03253173828125,
-0.0325927734375,
-0.02557373046875,
-0.021087646484375,
0.03814697265625,
0.005413055419921875,
0.0246124267578125,
0.0104827880859375,
0.0213623046875,
0.0012941360473632812,
-0.0889892578125,
0.0258941650390625,
0.061767578125,
-0.073974609375,
0.048065185546875,
-0.0283050537109375,
-0.02203369140625,
-0.0164794921875,
0.018890380859375,
-0.01303863525390625,
0.0228424072265625,
-0.04840087890625,
0.0033016204833984375,
0.01465606689453125,
0.005001068115234375,
-0.039398193359375,
-0.00792694091796875,
-0.046661376953125,
-0.0161895751953125,
-0.0008130073547363281,
-0.00798797607421875,
-0.00469970703125,
-0.00745391845703125,
-0.04010009765625,
0.024871826171875,
0.03924560546875,
-0.016937255859375,
-0.0081939697265625,
0.042633056640625,
0.03448486328125,
0.006011962890625,
0.0246429443359375,
0.0143585205078125,
-0.06884765625,
0.07867431640625,
-0.04522705078125,
0.01226806640625,
0.045806884765625,
-0.004070281982421875,
-0.0143585205078125,
0.032012939453125,
0.0024051666259765625,
-0.0014486312866210938,
0.0169525146484375,
-0.03070068359375,
-0.053253173828125,
0.000004112720489501953,
0.041168212890625,
-0.040557861328125,
0.0241851806640625,
0.0274810791015625,
0.0251007080078125,
0.018341064453125,
0.040008544921875,
0.045654296875,
-0.00605010986328125,
-0.05242919921875,
-0.010406494140625,
-0.007114410400390625,
-0.10272216796875,
0.0189361572265625,
0.043731689453125,
-0.0225982666015625,
-0.01143646240234375,
-0.004138946533203125,
-0.0024738311767578125,
-0.01499176025390625,
-0.0198211669921875,
0.01483154296875,
-0.00963592529296875,
0.004520416259765625,
-0.01168060302734375,
0.00905609130859375,
-0.024749755859375,
-0.00537872314453125,
0.002773284912109375,
-0.0139923095703125,
0.0288543701171875,
0.0211334228515625,
0.01409912109375,
-0.036712646484375,
-0.051971435546875,
0.024078369140625,
-0.0321044921875,
0.028900146484375,
0.0078887939453125,
0.00699615478515625,
-0.035980224609375,
0.033233642578125,
-0.036956787109375,
0.001819610595703125,
-0.04547119140625,
0.0082244873046875,
-0.0034847259521484375,
-0.007457733154296875,
-0.0215606689453125,
-0.0267333984375,
0.0196685791015625,
-0.0178680419921875,
0.004436492919921875,
0.015289306640625,
0.012176513671875,
0.01715087890625,
-0.005603790283203125,
0.017547607421875,
-0.0016679763793945312,
-0.01134490966796875,
-0.0032253265380859375,
-0.009552001953125,
-0.0207366943359375,
0.0316162109375,
0.0413818359375,
-0.0015163421630859375,
-0.0181121826171875,
0.00958251953125,
0.0039520263671875,
-0.03826904296875,
0.0261688232421875,
0.036285400390625,
0.0264129638671875,
-0.035430908203125,
0.022918701171875,
0.026092529296875,
0.0791015625,
-0.037933349609375,
0.014404296875,
-0.00283050537109375,
-0.01244354248046875,
-0.0037689208984375,
-0.0015811920166015625,
-0.0196990966796875,
0.00728607177734375,
-0.040863037109375,
-0.0022430419921875,
0.0031108856201171875,
0.030303955078125,
0.005420684814453125,
0.012664794921875,
-0.01025390625,
0.0218963623046875,
0.030426025390625,
0.0267333984375,
-0.00043487548828125,
0.0020275115966796875,
0.0009093284606933594,
-0.0241851806640625,
-0.0301055908203125,
0.008148193359375,
0.0059967041015625,
-0.009429931640625,
-0.0154571533203125,
0.0204315185546875,
-0.01230621337890625,
-0.002231597900390625,
-0.03936767578125,
0.0033397674560546875,
0.055419921875,
0.01467132568359375,
-0.0242919921875,
-0.01325225830078125,
-0.005496978759765625,
0.030181884765625,
-0.0933837890625,
0.037353515625,
0.02734375,
0.000514984130859375,
-0.039398193359375,
-0.0244598388671875,
-0.0167236328125,
-0.08380126953125,
0.0249786376953125,
0.0697021484375,
0.0271453857421875,
0.024627685546875,
0.0288238525390625,
0.056793212890625,
0.032379150390625,
0.025390625,
0.05096435546875,
-0.01214599609375,
0.032928466796875,
0.054443359375,
-0.0009741783142089844,
0.00017547607421875,
0.004108428955078125,
-0.008575439453125,
0.036224365234375,
0.007747650146484375,
0.0107879638671875,
-0.0179290771484375,
0.027435302734375,
0.00804901123046875,
0.002178192138671875,
0.007232666015625,
-0.02471923828125,
0.00213623046875,
0.043548583984375,
0.0109100341796875,
0.0458984375,
0.0307769775390625,
-0.041259765625,
0.007785797119140625,
0.012298583984375,
0.01039886474609375,
0.005748748779296875,
0.005191802978515625,
-0.009368896484375,
0.0206146240234375,
-0.01435089111328125,
-0.0006537437438964844,
0.01094818115234375,
-0.00946044921875,
-0.0261383056640625,
0.0005478858947753906,
-0.04046630859375,
-0.01198577880859375,
-0.011505126953125,
-0.07501220703125,
0.007007598876953125,
0.033111572265625,
-0.0269927978515625,
-0.038177490234375,
-0.015228271484375,
0.03424072265625,
-0.03778076171875,
0.0438232421875,
0.010986328125,
-0.022857666015625,
0.0167694091796875,
-0.08489990234375,
0.053375244140625,
-0.06329345703125,
0.08038330078125,
0.075439453125,
-0.03265380859375,
0.0182342529296875,
0.0120086669921875,
0.0043182373046875,
0.017974853515625,
0.01873779296875,
-0.0218658447265625,
-0.038665771484375,
-0.0287933349609375,
-0.0137939453125,
0.0213470458984375,
-0.007457733154296875,
0.005207061767578125,
-0.01445770263671875,
-0.030517578125,
0.015869140625,
-0.0718994140625,
-0.0572509765625,
0.056610107421875,
-0.08026123046875,
0.005767822265625,
-0.0204620361328125,
-0.0540771484375,
-0.02545166015625,
0.030670166015625,
-0.00528717041015625,
-0.014801025390625,
-0.02288818359375,
-0.034698486328125,
-0.072265625,
-0.06494140625,
-0.0299224853515625,
0.010589599609375,
0.0080718994140625,
0.0026721954345703125,
0.1181640625,
0.0254364013671875,
-0.07623291015625,
0.0015840530395507812,
0.0276641845703125,
-0.037200927734375,
0.04931640625,
0.042877197265625,
-0.03265380859375,
0.010528564453125,
0.01102447509765625,
0.0305023193359375,
0.03387451171875,
-0.03326416015625,
-0.0228729248046875,
-0.0181121826171875,
-0.0041351318359375,
-0.00942230224609375,
0.03497314453125,
0.0306549072265625,
-0.0189666748046875,
-0.0177001953125,
-0.06341552734375,
-0.021392822265625,
0.0118865966796875,
-0.018646240234375,
0.0139923095703125,
-0.00907135009765625,
-0.014495849609375,
-0.03094482421875,
0.052490234375,
-0.0169830322265625,
-0.00501251220703125,
0.0399169921875,
-0.04595947265625,
0.036407470703125,
-0.019317626953125,
-0.0182647705078125,
-0.023040771484375,
0.0260772705078125,
-0.017181396484375,
0.0178375244140625,
0.020050048828125,
0.00591278076171875,
0.00772857666015625,
-0.0023822784423828125,
-0.007717132568359375,
-0.1082763671875,
0.060791015625,
-0.0278778076171875,
-0.01435089111328125,
-0.035980224609375,
-0.023193359375,
0.017425537109375,
0.10491943359375,
-0.07769775390625,
0.00012254714965820312,
0.0106201171875,
0.00390625,
0.012542724609375,
-0.02618408203125,
-0.05206298828125,
-0.0310516357421875,
-0.056915283203125,
0.0015010833740234375,
-0.018280029296875,
-0.0191802978515625,
-0.01155853271484375,
-0.0089111328125,
-0.040374755859375,
-0.0406494140625,
0.0288543701171875,
-0.061614990234375,
0.0202178955078125,
0.003021240234375,
0.0073394775390625,
-0.05462646484375,
-0.016571044921875,
-0.046783447265625,
-0.09832763671875,
-0.01326751708984375,
-0.016571044921875,
0.05706787109375,
0.0016307830810546875,
-0.01165008544921875,
-0.0204010009765625,
0.04119873046875,
0.025421142578125,
0.0289764404296875,
0.00763702392578125,
-0.00524139404296875,
-0.044891357421875,
-0.041656494140625,
0.01386260986328125,
-0.044952392578125,
0.01319122314453125,
-0.0072174072265625,
-0.0384521484375,
-0.006092071533203125,
-0.0188140869140625,
0.0204010009765625,
0.0263671875,
-0.041717529296875,
-0.02557373046875,
-0.01010894775390625,
0.01399993896484375,
0.011199951171875,
0.0289154052734375,
-0.03607177734375,
-0.033203125,
-0.0174407958984375,
0.02020263671875,
0.006900787353515625,
-0.03179931640625,
0.0263519287109375,
0.0673828125,
0.0209197998046875,
-0.011871337890625,
-0.08868408203125,
0.0209808349609375,
0.013671875,
-0.0223541259765625,
0.0654296875,
0.04229736328125,
0.0171356201171875,
0.0248870849609375,
-0.015625,
0.016937255859375,
-0.0184326171875,
0.052032470703125,
0.000782012939453125,
-0.00252532958984375,
0.02435302734375,
-0.01557159423828125,
0.00337982177734375,
0.0122528076171875,
0.0011262893676757812,
-0.0296478271484375,
0.032745361328125,
0.05474853515625,
-0.04443359375,
0.043212890625,
-0.0271759033203125,
-0.0285186767578125,
0.0165557861328125,
0.002422332763671875,
0.0328369140625,
0.0335693359375,
-0.0123291015625,
0.03277587890625,
-0.044677734375,
0.0039520263671875,
0.01690673828125,
0.02252197265625,
0.01218414306640625,
0.0244903564453125,
0.0304412841796875,
0.004863739013671875,
-0.0151519775390625,
0.004070281982421875,
0.01036834716796875,
-0.0171966552734375,
-0.05792236328125,
-0.0129241943359375,
0.0036945343017578125,
0.015533447265625,
0.0307464599609375,
-0.022613525390625,
0.01806640625,
0.03668212890625,
-0.0145111083984375,
0.038116455078125,
0.01544952392578125,
-0.01525115966796875,
-0.0274658203125,
0.00864410400390625,
0.01033782958984375,
-0.00904083251953125,
0.01274871826171875,
0.0440673828125,
0.00870513916015625,
0.016632080078125,
-0.0198211669921875,
0.032470703125,
0.0321044921875,
0.040191650390625,
0.036651611328125,
-0.04632568359375,
-0.023773193359375,
0.01580810546875,
-0.037353515625,
-0.01934814453125,
0.020599365234375,
-0.01806640625,
0.019073486328125,
-0.037750244140625,
-0.0299224853515625,
0.06890869140625,
-0.0273284912109375,
-0.01047515869140625,
0.022491455078125,
-0.0163726806640625,
-0.035491943359375,
-0.0208892822265625,
-0.01209259033203125,
0.034759521484375,
-0.03759765625,
-0.039825439453125,
0.0210723876953125,
-0.035888671875,
0.0006694793701171875,
0.026397705078125,
-0.06744384765625,
0.031646728515625,
0.043792724609375,
-0.0162200927734375,
-0.0271148681640625,
-0.01299285888671875,
-0.00543975830078125,
0.00850677490234375,
-0.0230865478515625,
-0.01537322998046875,
0.0305328369140625,
-0.0531005859375,
0.0131072998046875,
0.01221466064453125,
-0.00901031494140625,
0.002170562744140625,
0.03167724609375,
0.03564453125,
0.015838623046875,
-0.06494140625,
0.01442718505859375,
-0.0264892578125,
-0.0101776123046875,
-0.01319122314453125,
-0.031646728515625,
-0.051300048828125,
-0.0085906982421875,
0.0062255859375,
0.0216064453125,
-0.033172607421875,
-0.04156494140625,
-0.00004738569259643555,
0.0181121826171875,
0.00817108154296875,
0.041351318359375,
-0.00865936279296875,
0.0675048828125,
-0.0243988037109375,
0.07318115234375,
-0.0117645263671875,
0.006732940673828125,
-0.0248260498046875,
0.004146575927734375,
0.0022907257080078125,
-0.06658935546875,
-0.00733184814453125,
-0.0231170654296875,
0.0005979537963867188,
0.06414794921875,
0.062103271484375,
0.0089111328125,
-0.025482177734375,
-0.0158233642578125,
-0.006519317626953125,
-0.0206451416015625,
0.068115234375,
0.00399017333984375,
0.00567626953125,
-0.022857666015625,
-0.034637451171875,
-0.0009646415710449219,
0.007472991943359375,
-0.0254364013671875,
0.01568603515625,
-0.00829315185546875,
0.007106781005859375,
0.0238494873046875,
-0.0233306884765625,
0.039215087890625,
0.057159423828125,
0.024169921875,
0.0609130859375,
0.00926971435546875,
0.02587890625,
0.026580810546875,
-0.00833892822265625,
0.01898193359375,
-0.0017900466918945312,
0.0469970703125,
-0.0114288330078125,
-0.00576019287109375,
0.03271484375,
-0.036163330078125,
-0.0016918182373046875,
0.03985595703125,
0.0263214111328125,
-0.0733642578125,
0.01473236083984375,
-0.00348663330078125,
0.0251007080078125,
0.04083251953125,
-0.0009150505065917969,
-0.01468658447265625,
-0.00811004638671875,
0.004947662353515625,
0.0106353759765625,
-0.034820556640625,
-0.005107879638671875,
0.036102294921875,
0.016021728515625,
0.003597259521484375,
0.01280975341796875,
-0.0011587142944335938,
-0.026397705078125,
-0.00379180908203125,
0.01255035400390625,
0.01387786865234375,
0.00977325439453125,
0.044158935546875,
-0.045257568359375,
-0.0214080810546875,
0.0008716583251953125,
0.0114898681640625,
-0.01238250732421875,
-0.02276611328125,
0.00850677490234375,
0.006008148193359375,
0.049468994140625,
0.04156494140625,
0.0063629150390625,
-0.01044464111328125,
0.007167816162109375,
0.006072998046875,
-0.08319091796875,
-0.0521240234375,
0.0236968994140625,
0.032745361328125,
-0.04034423828125,
0.043609619140625,
-0.01039886474609375,
-0.051422119140625,
-0.0224609375,
-0.04443359375,
0.09771728515625,
-0.05194091796875,
-0.00373077392578125,
0.010772705078125,
0.0299072265625,
-0.0078277587890625,
0.0015325546264648438,
0.0396728515625,
-0.03753662109375,
-0.00997161865234375,
0.008544921875,
-0.01328277587890625,
-0.03070068359375,
0.00569915771484375,
-0.03076171875,
0.0855712890625,
-0.0182647705078125,
-0.013458251953125,
0.004970550537109375,
0.047088623046875,
0.00653076171875,
0.04180908203125,
0.0005183219909667969,
0.01108551025390625,
-0.00772857666015625,
-0.009063720703125,
-0.044342041015625,
-0.012542724609375,
-0.035980224609375,
0.06048583984375,
0.04669189453125,
0.01280975341796875,
-0.031982421875,
0.01197052001953125,
0.06787109375,
0.03125,
0.008026123046875,
0.03533935546875,
0.006145477294921875,
0.03656005859375,
0.0221405029296875,
-0.0162200927734375,
0.033599853515625,
0.0024051666259765625,
-0.034820556640625,
0.01593017578125,
0.0145416259765625,
0.010284423828125,
-0.0299224853515625,
-0.0224456787109375,
-0.00684356689453125,
-0.0189208984375,
-0.00009369850158691406,
0.0249176025390625,
0.002727508544921875,
0.021209716796875,
0.0278167724609375,
-0.022216796875,
-0.004566192626953125,
-0.01971435546875,
0.04638671875,
0.002147674560546875,
0.007640838623046875,
0.0223541259765625,
-0.0012216567993164062,
0.01776123046875,
-0.0440673828125,
-0.003269195556640625,
-0.01324462890625,
-0.002841949462890625,
0.0293121337890625,
0.02276611328125,
0.0188140869140625,
-0.0222320556640625,
-0.00038170814514160156,
0.040252685546875,
0.0386962890625,
-0.02703857421875,
-0.0697021484375,
0.0167999267578125,
0.01204681396484375,
-0.01293182373046875,
0.0382080078125,
-0.005184173583984375,
-0.013580322265625,
0.044525146484375,
-0.01122283935546875,
-0.029449462890625,
-0.0191497802734375,
0.042633056640625,
-0.0085601806640625,
-0.0340576171875,
-0.00844573974609375,
-0.051239013671875,
-0.0274658203125,
-0.00913238525390625,
0.0107574462890625,
0.047088623046875,
0.022735595703125,
0.047119140625,
-0.00669097900390625,
-0.0208587646484375,
-0.023651123046875,
0.038238525390625,
-0.035980224609375,
0.035430908203125,
-0.04559326171875,
-0.0565185546875,
-0.004390716552734375,
0.039215087890625,
0.01004791259765625,
-0.02239990234375,
0.006664276123046875,
0.0086517333984375,
-0.004703521728515625,
-0.0095977783203125,
0.01100921630859375,
-0.00421905517578125,
0.03546142578125,
-0.0265655517578125,
0.039764404296875,
0.030029296875,
0.002445220947265625,
-0.01702880859375,
0.003223419189453125,
0.0772705078125,
-0.01263427734375,
0.0046844482421875,
0.0005817413330078125,
-0.040252685546875,
0.0297393798828125,
-0.005992889404296875,
0.06024169921875,
0.01029205322265625,
-0.058135986328125,
-0.0235595703125,
-0.0080108642578125,
-0.04095458984375,
0.0290679931640625,
0.04815673828125,
-0.003482818603515625,
-0.017608642578125,
0.0665283203125,
-0.0261993408203125,
-0.018890380859375,
0.01555633544921875,
0.042572021484375,
0.0247344970703125,
0.0175018310546875,
0.039642333984375,
-0.022247314453125,
-0.052001953125,
-0.01053619384765625,
0.07537841796875,
0.01421356201171875,
0.037872314453125,
-0.0165557861328125,
0.03863525390625,
-0.01065826416015625,
0.0294952392578125,
-0.035858154296875,
-0.0019388198852539062,
0.00868988037109375,
-0.002227783203125,
0.005397796630859375,
-0.00742340087890625,
-0.018768310546875,
-0.0173492431640625,
0.056060791015625,
-0.055572509765625,
-0.03607177734375,
-0.006130218505859375,
0.0367431640625,
-0.022979736328125,
0.00594329833984375,
-0.027008056640625,
-0.033233642578125,
-0.04571533203125,
0.01068115234375,
0.012725830078125,
0.0111083984375,
-0.03533935546875,
0.054962158203125,
0.044403076171875,
-0.0218658447265625,
0.0273895263671875,
-0.04608154296875,
0.05987548828125,
0.03839111328125,
0.0308837890625,
-0.046142578125,
0.01727294921875,
-0.0218658447265625,
-0.0029010772705078125,
0.01544952392578125,
0.07501220703125,
-0.00262451171875,
0.007022857666015625,
-0.003662109375,
0.0014467239379882812,
0.03411865234375,
-0.0015697479248046875,
0.002437591552734375,
-0.020294189453125,
-0.0033245086669921875,
-0.024322509765625,
-0.0019931793212890625,
-0.052093505859375,
-0.04571533203125,
0.03228759765625,
0.0122528076171875,
0.0068206787109375,
-0.0305633544921875,
-0.0689697265625,
0.0192108154296875,
0.035919189453125,
-0.004974365234375,
-0.0662841796875,
0.0175628662109375,
-0.031524658203125,
0.05157470703125,
-0.017578125,
-0.006404876708984375,
0.00830078125,
0.04998779296875,
-0.021881103515625,
-0.022186279296875,
-0.049652099609375,
0.00823974609375,
-0.043060302734375,
0.0194091796875,
0.037933349609375,
-0.0247039794921875,
-0.0261383056640625,
0.0239105224609375,
0.007167816162109375,
0.06585693359375,
-0.01666259765625,
-0.01105499267578125,
0.01873779296875,
0.0006375312805175781,
-0.0228424072265625,
-0.05975341796875,
0.0129547119140625,
-0.0618896484375,
-0.01422882080078125,
0.0090484619140625,
0.0010166168212890625,
0.01861572265625,
-0.027862548828125,
-0.07562255859375,
0.1005859375,
-0.0247344970703125,
-0.0174560546875,
-0.0340576171875,
0.033172607421875,
0.0222320556640625,
-0.013580322265625,
-0.00861358642578125,
-0.019134521484375,
-0.0211029052734375,
-0.005401611328125,
-0.0186767578125,
0.06329345703125,
-0.0013637542724609375,
-0.008026123046875,
-0.0128021240234375,
-0.0157623291015625,
-0.010589599609375,
-0.00555419921875,
-0.00867462158203125,
-0.003688812255859375,
0.02166748046875,
0.04119873046875,
-0.0176239013671875,
0.0197906494140625,
0.0229949951171875,
0.02581787109375,
-0.00010406970977783203,
-0.04351806640625,
-0.0178680419921875,
-0.0135040283203125,
0.04400634765625,
0.00870513916015625,
0.0091094970703125,
-0.0197906494140625,
-0.00824737548828125,
-0.034088134765625,
-0.04669189453125,
-0.0031452178955078125,
0.02606201171875,
-0.04620361328125,
0.0152740478515625,
0.02130126953125,
0.0011816024780273438,
0.0084075927734375,
-0.006076812744140625,
-0.009521484375,
-0.01458740234375,
0.023651123046875,
-0.007457733154296875,
-0.01271820068359375,
0.010589599609375,
-0.0017452239990234375,
0.00025653839111328125,
0.031890869140625,
-0.0218353271484375,
0.00751495361328125,
0.0214385986328125,
-0.00240325927734375,
-0.031158447265625,
-0.01003265380859375,
-0.0206298828125,
0.019439697265625,
-0.0241851806640625,
0.044097900390625,
-0.02630615234375,
0.0216064453125,
0.01450347900390625,
-0.002685546875,
-0.00605010986328125,
-0.0263671875,
-0.0229644775390625,
0.027496337890625,
-0.0147857666015625,
0.0294647216796875,
-0.0028018951416015625,
-0.029754638671875,
-0.01763916015625,
0.0318603515625,
-0.0186767578125,
-0.00002104043960571289,
-0.009063720703125,
-0.0047607421875,
0.004169464111328125,
-0.02716064453125,
-0.0195159912109375,
-0.046173095703125,
0.02093505859375,
-0.035491943359375,
-0.034088134765625,
0.0284881591796875
] |
449c3e6bb31fcf4e2183f10d6826b789c38afc24
|
Wordpress Stackexchange
Q: Hook to edit an column on comments screen? At the moment I'm doing
add_filter("manage_edit-comments_columns", function($columns) {
unset($columns["author"]);
$columns_one = array_slice($columns,0,1);
$columns_two = array_slice($columns,1);
$columns_one["user"] = "User";
$columns = $columns_one + $columns_two;
return $columns;
});
add_filter( 'manage_comments_custom_column', function($column, $column_id) {
echo "Test";
},10, 2 );
Is there a way to just edit the author column instead of removing and creating my own?
A: There is no filter for this column. So answer is 'No'.
WP_List_Table search for method column_{something} inside class of Lister. Comments List class has column_author. So kill this column, and create filter as you do now.
|
Q: Hook to edit an column on comments screen? At the moment I'm doing
add_filter("manage_edit-comments_columns", function($columns) {
unset($columns["author"]);
$columns_one = array_slice($columns,0,1);
$columns_two = array_slice($columns,1);
$columns_one["user"] = "User";
$columns = $columns_one + $columns_two;
return $columns;
});
add_filter( 'manage_comments_custom_column', function($column, $column_id) {
echo "Test";
},10, 2 );
Is there a way to just edit the author column instead of removing and creating my own?
A: There is no filter for this column. So answer is 'No'.
WP_List_Table search for method column_{something} inside class of Lister. Comments List class has column_author. So kill this column, and create filter as you do now.
A: I came to this question since I needed a similar thing. While an answer by qwerty-qwerty is correct, it's correct only partially so to say. As far as I understand, author needed to change a column name, while I needed to change contents of the author column itself. So, while this is a bit different, I'll just leave it here in case someone finds this question like I did. This also works if you need to get some additional data regarding comments which isn't stored in meta table and isn't not cached like said table and don't want to do separate query for each item.
So, what you can do is hook into the_comments filter. This filter passes an array of of WP_Comment_Object instances for each comment found that matches the request. In my case, comments could be saved with name other than user's display name, so where it was the case, I needed to get an actual display name from wp_users table and display it like comment_author_from_wp_comments (display_name_from_wp_users). I went through array passed by the filter, figured which comments needed additional info from wp_users table, ran a single query to that table, then modified elements within original array with new data. Here's a general idea of how my code works:
function my_filter($objects)
{
global $current_screen;
if (is_admin() && $current_screen->id == 'edit-comments') // I only needed it on that screen within admin
{
if (count($objects) > 0)
{
foreach ($objects as $key => $object)
{
//find out which comments needed 'fixing'
}
//do the actual fixing
}
}
return $objects; //return modified or unmodified array
}
add_filter('the_comments', 'my_filter');
Hopefully, someone in the future will find this useful.
|
wordpress
|
{
"language": "en",
"length": 377,
"provenance": "stackexchange_00019.jsonl.gz:428471",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83769"
}
|
[
0.0013494491577148438,
-0.02020263671875,
0.0079803466796875,
-0.0219879150390625,
-0.0177001953125,
-0.00885772705078125,
0.01326751708984375,
-0.005908966064453125,
0.015594482421875,
0.007038116455078125,
-0.022979736328125,
0.001514434814453125,
-0.0211029052734375,
-0.018341064453125,
-0.0187530517578125,
-0.037200927734375,
0.0177764892578125,
-0.0295562744140625,
-0.0038547515869140625,
-0.01480865478515625,
0.038177490234375,
-0.01019287109375,
0.001094818115234375,
0.0589599609375,
0.019287109375,
-0.0260467529296875,
0.1007080078125,
0.0127410888671875,
0.0302581787109375,
-0.002490997314453125,
0.03375244140625,
-0.0557861328125,
0.005435943603515625,
0.027923583984375,
-0.031494140625,
0.0289154052734375,
-0.00676727294921875,
0.018096923828125,
-0.0005106925964355469,
0.029571533203125,
0.042449951171875,
-0.0198516845703125,
-0.0733642578125,
0.0192108154296875,
-0.0406494140625,
-0.0250396728515625,
0.0283660888671875,
-0.00982666015625,
0.04010009765625,
-0.0174102783203125,
0.009063720703125,
0.0631103515625,
0.0168609619140625,
-0.0197296142578125,
-0.00920867919921875,
0.00968170166015625,
-0.0190277099609375,
0.0022258758544921875,
0.0159759521484375,
-0.0201568603515625,
0.000244140625,
0.006488800048828125,
0.0159912109375,
0.026947021484375,
0.011016845703125,
-0.0074615478515625,
0.007476806640625,
0.030303955078125,
-0.0011682510375976562,
0.002780914306640625,
0.01050567626953125,
-0.015167236328125,
-0.00849151611328125,
-0.04180908203125,
-0.0186920166015625,
0.0252838134765625,
0.0129241943359375,
-0.0300750732421875,
-0.00940704345703125,
0.001705169677734375,
-0.00041985511779785156,
-0.025970458984375,
0.01186370849609375,
-0.014556884765625,
-0.00084686279296875,
0.0003819465637207031,
-0.01242828369140625,
0.0009593963623046875,
-0.0292205810546875,
0.025177001953125,
-0.02398681640625,
-0.06781005859375,
-0.0288848876953125,
0.044189453125,
0.032135009765625,
0.0121612548828125,
0.0238800048828125,
0.03656005859375,
-0.0090179443359375,
0.0036945343017578125,
0.00588226318359375,
-0.028228759765625,
0.021270751953125,
-0.0364990234375,
0.010162353515625,
0.00788116455078125,
-0.0027675628662109375,
-0.0108795166015625,
0.01515960693359375,
0.03521728515625,
-0.004734039306640625,
-0.03271484375,
-0.01141357421875,
0.00954437255859375,
-0.037811279296875,
-0.0301055908203125,
-0.043304443359375,
-0.004169464111328125,
-0.0202484130859375,
-0.01145172119140625,
-0.034088134765625,
-0.03802490234375,
-0.00891876220703125,
0.0032711029052734375,
0.038421630859375,
-0.0240325927734375,
-0.040130615234375,
0.068115234375,
0.00923919677734375,
-0.0345458984375,
-0.03997802734375,
0.0304412841796875,
0.11468505859375,
0.0675048828125,
0.044830322265625,
-0.006961822509765625,
0.00986480712890625,
0.00017499923706054688,
0.0061187744140625,
0.0082855224609375,
0.0005927085876464844,
-0.0263824462890625,
-0.01403045654296875,
0.00829315185546875,
0.007144927978515625,
-0.0013895034790039062,
0.0245819091796875,
0.031158447265625,
-0.00447845458984375,
-0.01158905029296875,
-0.031524658203125,
0.0482177734375,
0.0294342041015625,
0.01505279541015625,
0.0189971923828125,
-0.02923583984375,
0.04998779296875,
-0.045166015625,
0.0007071495056152344,
-0.041473388671875,
-0.00855255126953125,
-0.025054931640625,
0.012725830078125,
-0.047698974609375,
-0.07733154296875,
0.053497314453125,
-0.040863037109375,
-0.0253448486328125,
0.01409912109375,
-0.03924560546875,
-0.002349853515625,
0.006137847900390625,
0.01418304443359375,
0.02777099609375,
0.0261993408203125,
0.035186767578125,
-0.0418701171875,
0.0033512115478515625,
0.003437042236328125,
0.0269775390625,
0.0168304443359375,
-0.0465087890625,
-0.04766845703125,
0.04345703125,
-0.03192138671875,
0.04302978515625,
0.0289154052734375,
0.0911865234375,
-0.00453948974609375,
0.0235443115234375,
0.01453399658203125,
0.0276641845703125,
-0.0401611328125,
-0.0276336669921875,
-0.007625579833984375,
-0.03173828125,
-0.0022029876708984375,
-0.030487060546875,
-0.00051116943359375,
0.059326171875,
0.042572021484375,
0.005252838134765625,
0.0026645660400390625,
-0.0113372802734375,
-0.1162109375,
0.0232086181640625,
-0.0504150390625,
0.055694580078125,
-0.02557373046875,
0.013153076171875,
0.0220489501953125,
-0.01526641845703125,
-0.033355712890625,
0.01763916015625,
0.001766204833984375,
-0.004913330078125,
-0.00791168212890625,
-0.0009503364562988281,
0.005809783935546875,
-0.0088653564453125,
0.00334930419921875,
-0.0052642822265625,
-0.002117156982421875,
0.00748443603515625,
0.004497528076171875,
-0.0634765625,
-0.00714111328125,
-0.03619384765625,
-0.0169525146484375,
-0.0020236968994140625,
-0.021240234375,
0.039764404296875,
0.03192138671875,
0.0072479248046875,
-0.02410888671875,
-0.007480621337890625,
-0.0059967041015625,
-0.0631103515625,
0.0011148452758789062,
0.0557861328125,
0.03472900390625,
-0.0111541748046875,
-0.0037021636962890625,
0.0151519775390625,
0.035614013671875,
0.01288604736328125,
0.038177490234375,
-0.01441192626953125,
0.015472412109375,
0.046783447265625,
-0.0025577545166015625,
-0.0010347366333007812,
0.00618743896484375,
-0.033203125,
0.022613525390625,
0.01433563232421875,
-0.029327392578125,
0.027618408203125,
0.0102386474609375,
-0.0171356201171875,
-0.00603485107421875,
-0.046051025390625,
0.01213836669921875,
-0.025482177734375,
0.04547119140625,
-0.03936767578125,
0.0217742919921875,
-0.00164031982421875,
-0.039794921875,
-0.01276397705078125,
0.02984619140625,
0.020782470703125,
0.00980377197265625,
0.035430908203125,
-0.033355712890625,
0.03179931640625,
-0.00336456298828125,
-0.00482177734375,
-0.02294921875,
0.01202392578125,
0.00016796588897705078,
0.0281524658203125,
-0.006305694580078125,
-0.01543426513671875,
0.0006213188171386719,
-0.01256561279296875,
-0.00925445556640625,
-0.01146697998046875,
-0.036529541015625,
-0.039825439453125,
-0.00914764404296875,
0.0135498046875,
-0.021453857421875,
0.005706787109375,
-0.0123138427734375,
-0.023162841796875,
0.037445068359375,
-0.0228271484375,
0.0457763671875,
-0.03973388671875,
0.0274200439453125,
0.0565185546875,
-0.049468994140625,
0.033538818359375,
0.01340484619140625,
0.00420379638671875,
0.01226043701171875,
0.01018524169921875,
0.0217132568359375,
0.00821685791015625,
-0.007415771484375,
0.045623779296875,
0.0120086669921875,
0.0787353515625,
-0.042633056640625,
-0.045135498046875,
-0.0229644775390625,
0.0138092041015625,
0.0013332366943359375,
0.0137939453125,
0.058868408203125,
-0.0189971923828125,
-0.006961822509765625,
-0.0247955322265625,
-0.01629638671875,
-0.022735595703125,
-0.01044464111328125,
-0.01154327392578125,
0.013763427734375,
-0.036834716796875,
-0.047271728515625,
-0.0128021240234375,
-0.05621337890625,
0.045379638671875,
-0.0002892017364501953,
0.0163726806640625,
-0.0028285980224609375,
0.06982421875,
-0.019622802734375,
-0.051513671875,
-0.02520751953125,
-0.05950927734375,
0.0014095306396484375,
0.00832366943359375,
0.016998291015625,
-0.018096923828125,
0.004322052001953125,
0.007556915283203125,
0.0022869110107421875,
0.03631591796875,
-0.041046142578125,
-0.0264739990234375,
-0.0183868408203125,
0.0186614990234375,
0.0167236328125,
0.0268707275390625,
0.0144500732421875,
0.048309326171875,
0.048370361328125,
-0.01393890380859375,
-0.021636962890625,
-0.00848388671875,
-0.0161895751953125,
-0.008575439453125,
0.0079345703125,
0.0019207000732421875,
-0.0635986328125,
0.0609130859375,
0.02471923828125,
0.01029205322265625,
0.0104827880859375,
-0.0031833648681640625,
0.01056671142578125,
0.0127105712890625,
0.01873779296875,
-0.024932861328125,
0.0032329559326171875,
-0.00632476806640625,
-0.01546478271484375,
-0.0099334716796875,
0.02783203125,
-0.01561737060546875,
0.0482177734375,
-0.044677734375,
-0.037078857421875,
0.03680419921875,
-0.0179595947265625,
-0.00830841064453125,
-0.01654052734375,
-0.00031685829162597656,
0.01229095458984375,
0.058807373046875,
-0.0289154052734375,
-0.0254364013671875,
0.018035888671875,
0.0237884521484375,
-0.045501708984375,
-0.0222625732421875,
-0.026275634765625,
-0.027862548828125,
-0.09149169921875,
0.044036865234375,
0.01267242431640625,
-0.032958984375,
-0.037353515625,
0.029449462890625,
-0.059051513671875,
-0.0203704833984375,
0.018829345703125,
-0.0186614990234375,
-0.0192413330078125,
0.05426025390625,
-0.0634765625,
0.057159423828125,
-0.03118896484375,
-0.0271453857421875,
-0.12200927734375,
-0.020416259765625,
-0.01531219482421875,
0.06646728515625,
-0.0246734619140625,
0.049652099609375,
-0.02880859375,
0.0546875,
-0.0011653900146484375,
0.01515960693359375,
0.00711822509765625,
0.013763427734375,
-0.00145721435546875,
-0.011383056640625,
0.006511688232421875,
-0.0279541015625,
-0.0190887451171875,
-0.03717041015625,
-0.0028057098388671875,
0.06524658203125,
-0.032989501953125,
0.0745849609375,
-0.040283203125,
0.0011758804321289062,
-0.0164031982421875,
-0.07305908203125,
-0.0261077880859375,
0.037445068359375,
-0.040985107421875,
0.04083251953125,
-0.07720947265625,
-0.027923583984375,
0.0372314453125,
-0.0227508544921875,
0.00732421875,
-0.008758544921875,
0.11163330078125,
0.0301361083984375,
-0.0087738037109375,
0.0124969482421875,
-0.032196044921875,
0.016571044921875,
-0.0100860595703125,
0.046600341796875,
0.030731201171875,
0.0016107559204101562,
0.0390625,
-0.0134429931640625,
-0.01316070556640625,
-0.028564453125,
0.06781005859375,
-0.0151824951171875,
0.0006175041198730469,
0.0125885009765625,
-0.036285400390625,
0.01849365234375,
-0.008697509765625,
-0.0142974853515625,
0.007556915283203125,
-0.01378631591796875,
0.04888916015625,
0.005069732666015625,
0.00760650634765625,
-0.04443359375,
-0.031646728515625,
0.0104522705078125,
-0.053741455078125,
0.06500244140625,
0.0167999267578125,
0.00942230224609375,
0.02362060546875,
0.0119781494140625,
0.0197906494140625,
-0.01220703125,
-0.051788330078125,
-0.038787841796875,
0.03900146484375,
-0.0550537109375,
0.0008673667907714844,
0.03985595703125,
-0.0148468017578125,
0.08148193359375,
0.0264892578125,
-0.04656982421875,
0.031280517578125,
-0.011932373046875,
-0.007587432861328125,
0.005130767822265625,
-0.00432586669921875,
0.00972747802734375,
0.0106964111328125,
0.01513671875,
0.00438690185546875,
-0.0189361572265625,
0.0105438232421875,
-0.024139404296875,
0.02655029296875,
0.041168212890625,
-0.0206298828125,
0.052032470703125,
-0.0100555419921875,
0.029998779296875,
-0.00922393798828125,
-0.02459716796875,
0.046966552734375,
0.0277252197265625,
0.027984619140625,
0.0071868896484375,
0.00921630859375,
-0.019439697265625,
0.00605010986328125,
-0.03448486328125,
-0.0162506103515625,
0.0209808349609375,
0.031280517578125,
0.0080413818359375,
0.037384033203125,
-0.0195465087890625,
0.005451202392578125,
-0.0287933349609375,
0.00931549072265625,
0.01186370849609375,
0.009368896484375,
-0.0244140625,
-0.009674072265625,
-0.010467529296875,
-0.006114959716796875,
-0.0201873779296875,
-0.01380157470703125,
-0.004283905029296875,
-0.05804443359375,
-0.0174560546875,
0.024383544921875,
-0.008270263671875,
-0.039459228515625,
-0.046600341796875,
-0.003631591796875,
0.010101318359375,
0.006778717041015625,
-0.0504150390625,
-0.049407958984375,
-0.0030689239501953125,
0.007244110107421875,
0.0399169921875,
-0.004207611083984375,
0.02301025390625,
-0.0255279541015625,
-0.0152435302734375,
0.004985809326171875,
-0.01593017578125,
0.0792236328125,
0.037750244140625,
-0.02093505859375,
-0.00841522216796875,
-0.05828857421875,
-0.00164031982421875,
-0.0214996337890625,
-0.04522705078125,
-0.01418304443359375,
0.0122222900390625,
0.0128936767578125,
0.024169921875,
-0.002384185791015625,
-0.049560546875,
-0.03533935546875,
-0.036712646484375,
0.032012939453125,
-0.0030994415283203125,
-0.019989013671875,
0.047821044921875,
0.019256591796875,
0.0189208984375,
0.0259246826171875,
0.056640625,
0.024932861328125,
-0.0355224609375,
0.0262298583984375,
0.00605010986328125,
-0.013946533203125,
-0.0219879150390625,
-0.029022216796875,
-0.0246124267578125,
0.049591064453125,
-0.01204681396484375,
0.01303863525390625,
-0.0177459716796875,
0.0011606216430664062,
-0.0303955078125,
-0.004718780517578125,
-0.0209503173828125,
0.0139312744140625,
0.0005412101745605469,
0.01470184326171875,
0.06500244140625,
-0.056488037109375,
-0.02899169921875,
0.01387786865234375,
-0.00742340087890625,
0.0227508544921875,
0.01401519775390625,
-0.03076171875,
0.06842041015625,
0.029388427734375,
-0.0350341796875,
0.0059051513671875,
0.03460693359375,
0.008636474609375,
-0.00492095947265625,
-0.055023193359375,
0.0081939697265625,
0.057342529296875,
0.031524658203125,
-0.0231170654296875,
0.00992584228515625,
0.0276947021484375,
-0.005695343017578125,
0.027618408203125,
0.043243408203125,
0.090576171875,
-0.08941650390625,
0.034423828125,
0.0321044921875,
0.006504058837890625,
0.05419921875,
-0.0035495758056640625,
-0.00022280216217041016,
-0.03515625,
0.036712646484375,
-0.029449462890625,
-0.01556396484375,
0.00777435302734375,
-0.006015777587890625,
-0.00592041015625,
-0.0301666259765625,
0.01678466796875,
-0.00563812255859375,
0.01104736328125,
-0.0036373138427734375,
-0.005340576171875,
0.0011968612670898438,
0.0019989013671875,
-0.0033931732177734375,
0.00469970703125,
-0.0169525146484375,
-0.0555419921875,
0.006622314453125,
-0.049713134765625,
-0.017578125,
0.031005859375,
0.0233154296875,
0.01111602783203125,
0.0301971435546875,
0.0146942138671875,
-0.018157958984375,
0.0208740234375,
-0.0849609375,
-0.04986572265625,
-0.03375244140625,
0.00621795654296875,
0.0305938720703125,
0.0004992485046386719,
0.033447265625,
0.0016870498657226562,
-0.04217529296875,
-0.0014476776123046875,
0.0310211181640625,
0.041168212890625,
-0.00689697265625,
-0.0438232421875,
0.0285797119140625,
-0.0223846435546875,
-0.01087188720703125,
0.019744873046875,
0.007236480712890625,
-0.01273345947265625,
-0.0151519775390625,
0.005237579345703125,
-0.05364990234375,
-0.01800537109375,
0.0005154609680175781,
-0.055694580078125,
0.044281005859375,
0.004184722900390625,
-0.0013484954833984375,
-0.01267242431640625,
0.0136566162109375,
-0.01140594482421875,
0.00341796875,
-0.050018310546875,
0.040313720703125,
-0.006710052490234375,
0.08990478515625,
-0.053466796875,
-0.01580810546875,
0.03839111328125,
0.0535888671875,
0.065673828125,
0.005474090576171875,
0.00421905517578125,
-0.030853271484375,
0.005523681640625,
0.01134490966796875,
-0.0275115966796875,
0.0171661376953125,
-0.0218505859375,
0.0144805908203125,
0.01525115966796875,
-0.0006361007690429688,
0.02117919921875,
-0.000011980533599853516,
-0.05975341796875,
-0.000048100948333740234,
0.01506805419921875,
0.0265960693359375,
0.018218994140625,
0.044403076171875,
-0.0210723876953125,
-0.000865936279296875,
0.0243072509765625,
-0.0626220703125,
-0.040740966796875,
0.057098388671875,
0.055084228515625,
-0.00795745849609375,
-0.041717529296875,
-0.0248870849609375,
0.052520751953125,
0.046295166015625,
0.047637939453125,
0.049224853515625,
0.0247344970703125,
0.0206146240234375,
0.0014257431030273438,
0.028106689453125,
0.0108642578125,
-0.0233612060546875,
0.038177490234375,
0.02020263671875,
0.01290130615234375,
-0.0116119384765625,
0.034271240234375,
0.0126800537109375,
0.0389404296875,
-0.047821044921875,
-0.0282135009765625,
0.0162200927734375,
0.01983642578125,
0.00927734375,
0.003021240234375,
0.0185394287109375,
-0.03289794921875,
0.013397216796875,
-0.0433349609375,
-0.01229095458984375,
0.023101806640625,
0.043121337890625,
0.002288818359375,
0.0088043212890625,
-0.02880859375,
-0.027679443359375,
-0.036529541015625,
0.01421356201171875,
-0.0007977485656738281,
0.0077972412109375,
0.0032253265380859375,
0.04290771484375,
0.041656494140625,
0.01126861572265625,
0.001178741455078125,
0.0138092041015625,
-0.001979827880859375,
0.01050567626953125,
-0.06109619140625,
-0.050689697265625,
0.0171356201171875,
0.050506591796875,
0.013885498046875,
0.0341796875,
0.00905609130859375,
-0.0245819091796875,
-0.01385498046875,
0.00498199462890625,
-0.00872802734375,
-0.04693603515625,
-0.0277557373046875,
-0.025848388671875,
0.0245819091796875,
0.026153564453125,
0.0029506683349609375,
0.01099395751953125,
0.015380859375,
0.03900146484375,
-0.02301025390625,
-0.01140594482421875,
0.004764556884765625,
-0.027587890625,
0.0094451904296875,
0.01494598388671875,
-0.0160675048828125,
-0.00536346435546875,
-0.029052734375,
0.0243988037109375,
-0.058319091796875,
-0.07489013671875,
0.018524169921875,
0.040191650390625,
-0.011627197265625,
-0.001659393310546875,
-0.0298004150390625,
0.00543212890625,
-0.004436492919921875,
0.0004405975341796875,
-0.0000616908073425293,
0.0263214111328125,
0.027008056640625,
-0.0020160675048828125,
-0.030914306640625,
-0.01776123046875,
-0.028533935546875,
0.02783203125,
0.0239410400390625,
0.047637939453125,
-0.01108551025390625,
0.03533935546875,
-0.039520263671875,
0.0133819580078125,
-0.038360595703125,
-0.0233306884765625,
0.061492919921875,
-0.00316619873046875,
-0.030670166015625,
-0.0147552490234375,
0.00577545166015625,
0.08282470703125,
0.0051727294921875,
-0.0178070068359375,
0.05828857421875,
-0.01262664794921875,
-0.01532745361328125,
-0.025115966796875,
-0.0246734619140625,
-0.028106689453125,
-0.027740478515625,
-0.002056121826171875,
-0.0011224746704101562,
0.00640869140625,
-0.0228271484375,
-0.0051116943359375,
0.01922607421875,
0.00482940673828125,
0.009979248046875,
-0.018768310546875,
0.038177490234375,
-0.030914306640625,
0.019012451171875,
-0.037750244140625,
0.0008873939514160156,
0.0443115234375,
0.007152557373046875,
-0.004833221435546875,
0.037689208984375,
0.00933074951171875,
0.0210113525390625,
-0.043731689453125,
0.0269775390625,
-0.012298583984375,
0.063720703125,
0.0156707763671875,
0.0107879638671875,
-0.030517578125,
0.018402099609375,
-0.02801513671875,
0.0120086669921875,
-0.0321044921875,
-0.0192108154296875,
0.003604888916015625,
0.0129547119140625,
-0.0017099380493164062,
-0.0611572265625,
-0.10015869140625,
-0.0304107666015625,
0.006710052490234375,
0.00494384765625,
-0.03973388671875,
0.0269775390625,
0.0005321502685546875,
0.01107025146484375,
-0.02972412109375,
-0.009002685546875,
0.0294952392578125,
0.0254364013671875,
-0.0606689453125,
-0.0184326171875,
-0.01947021484375,
-0.007663726806640625,
-0.0202789306640625,
0.05792236328125,
0.078369140625,
-0.044525146484375,
-0.0005321502685546875,
0.066162109375,
0.048553466796875,
0.12005615234375,
-0.047454833984375,
-0.037078857421875,
-0.0012454986572265625,
0.0158843994140625,
0.017181396484375,
-0.088623046875,
-0.0191497802734375,
-0.06781005859375,
0.031707763671875,
0.0171661376953125,
-0.01171112060546875,
0.0155487060546875,
-0.03973388671875,
-0.07122802734375,
0.04833984375,
-0.0064849853515625,
-0.032379150390625,
-0.0545654296875,
0.0034236907958984375,
-0.0087127685546875,
0.020111083984375,
0.0035495758056640625,
-0.01523590087890625,
-0.0210723876953125,
0.028076171875,
0.0017309188842773438,
0.0208892822265625,
0.00466156005859375,
-0.01080322265625,
-0.036163330078125,
0.005268096923828125,
-0.003353118896484375,
0.0007109642028808594,
-0.0131378173828125,
-0.037750244140625,
0.04180908203125,
0.0233612060546875,
-0.01409149169921875,
-0.02734375,
0.032806396484375,
-0.0262298583984375,
-0.017974853515625,
-0.0087890625,
-0.0282135009765625,
-0.00699615478515625,
0.055084228515625,
0.053070068359375,
0.01500701904296875,
-0.020263671875,
0.0116119384765625,
-0.0106658935546875,
-0.0298919677734375,
-0.0229339599609375,
0.0091094970703125,
-0.052276611328125,
-0.01739501953125,
0.0021266937255859375,
-0.00894927978515625,
-0.0286712646484375,
0.0125885009765625,
-0.017364501953125,
0.00591278076171875,
0.03076171875,
-0.0034122467041015625,
0.01087188720703125,
0.003986358642578125,
0.0283966064453125,
-0.018096923828125,
0.026397705078125,
-0.0179290771484375,
0.0146636962890625,
0.020477294921875,
0.0010824203491210938,
-0.053863525390625,
-0.0802001953125,
0.01311492919921875,
0.0496826171875,
-0.034271240234375,
0.0494384765625,
-0.0384521484375,
-0.0093231201171875,
-0.01259613037109375,
0.0277862548828125,
-0.004169464111328125,
0.0172576904296875,
0.01065826416015625,
0.01251220703125,
0.0061798095703125,
0.0562744140625,
-0.0168914794921875,
0.0224456787109375,
-0.0248260498046875,
0.031341552734375,
0.00238037109375,
0.00665283203125,
0.015594482421875,
-0.0010347366333007812,
-0.00958251953125,
0.01149749755859375,
-0.0245361328125,
-0.0855712890625,
0.035614013671875,
0.006999969482421875,
0.0186309814453125,
0.042877197265625
] |
a1ab54021ffb4be97cf7558edd3baa8c75e61b5a
|
Wordpress Stackexchange
Q: wp_get_archives breakes Html5 validation I have a issue with wp_get_archives because it breaks my Html5 validation.
Inside validator I get this message: Bad value archives for attribute rel on element link: Not an absolute IRI. The string archives is not a registered keyword or absolute URL.
My archive links looks like this: http://robertpeic.com/wordpress_template/2013/01/' />
http://robertpeic.com/wordpress_template/2012/12/' />
I am guessing that those errors are happening because spaces inside my links, now if I change my Doctype into Strict my page validates fine. Can someone please tell me how can I validate my page as HTML5? Thank you!!
My wp_get_archives looks like this:wp_get_archives('type=monthly&format=link');
Validator link
A: I would just remove the wp_get_archives() call from the document head altogether. Why even have it there?
Otherwise, this isn't really WordPress-specific. rel="archives" is valid for <link> tags in HTML5.
|
Q: wp_get_archives breakes Html5 validation I have a issue with wp_get_archives because it breaks my Html5 validation.
Inside validator I get this message: Bad value archives for attribute rel on element link: Not an absolute IRI. The string archives is not a registered keyword or absolute URL.
My archive links looks like this: http://robertpeic.com/wordpress_template/2013/01/' />
http://robertpeic.com/wordpress_template/2012/12/' />
I am guessing that those errors are happening because spaces inside my links, now if I change my Doctype into Strict my page validates fine. Can someone please tell me how can I validate my page as HTML5? Thank you!!
My wp_get_archives looks like this:wp_get_archives('type=monthly&format=link');
Validator link
A: I would just remove the wp_get_archives() call from the document head altogether. Why even have it there?
Otherwise, this isn't really WordPress-specific. rel="archives" is valid for <link> tags in HTML5.
|
wordpress
|
{
"language": "en",
"length": 135,
"provenance": "stackexchange_00019.jsonl.gz:428482",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83809"
}
|
[
0.056396484375,
0.01025390625,
-0.0021038055419921875,
-0.019805908203125,
0.0098114013671875,
-0.0291900634765625,
0.032989501953125,
-0.040771484375,
0.01184844970703125,
0.01088714599609375,
0.00177001953125,
-0.01377105712890625,
0.0263519287109375,
-0.0316162109375,
0.02703857421875,
-0.0082855224609375,
0.024505615234375,
-0.0305023193359375,
-0.006374359130859375,
-0.0203704833984375,
0.009613037109375,
-0.004119873046875,
0.0042877197265625,
0.0191650390625,
-0.003894805908203125,
0.0009613037109375,
0.1143798828125,
-0.0060272216796875,
0.00971221923828125,
-0.00872802734375,
0.0125579833984375,
-0.03826904296875,
0.03216552734375,
0.0126800537109375,
-0.0206298828125,
-0.018768310546875,
-0.0021495819091796875,
0.002460479736328125,
-0.0118560791015625,
0.022216796875,
0.0011758804321289062,
-0.00841522216796875,
0.033538818359375,
-0.03955078125,
0.0145263671875,
-0.026397705078125,
0.03985595703125,
-0.0217132568359375,
-0.025115966796875,
0.013580322265625,
0.01303863525390625,
0.036712646484375,
0.02972412109375,
-0.039306640625,
0.006710052490234375,
0.0107421875,
0.007228851318359375,
-0.045745849609375,
0.023834228515625,
0.0244903564453125,
-0.0021457672119140625,
-0.018341064453125,
0.02447509765625,
-0.03448486328125,
0.01300048828125,
-0.0017032623291015625,
0.0501708984375,
0.0256500244140625,
-0.022430419921875,
0.00659942626953125,
0.01100921630859375,
-0.004779815673828125,
0.0018558502197265625,
-0.03631591796875,
0.007755279541015625,
-0.01123046875,
0.004299163818359375,
-0.023590087890625,
-0.00553131103515625,
0.020294189453125,
0.05889892578125,
0.001087188720703125,
-0.0018291473388671875,
0.031280517578125,
-0.004520416259765625,
0.03839111328125,
0.01309967041015625,
-0.042083740234375,
-0.0282135009765625,
-0.032257080078125,
-0.017425537109375,
-0.039520263671875,
-0.04052734375,
-0.01523590087890625,
-0.0015201568603515625,
-0.040802001953125,
0.031463623046875,
0.06817626953125,
0.0035495758056640625,
0.01198577880859375,
-0.01111602783203125,
-0.048614501953125,
0.01459503173828125,
-0.042236328125,
-0.0191802978515625,
0.037200927734375,
0.044342041015625,
0.0528564453125,
0.021453857421875,
-0.0025081634521484375,
-0.0087127685546875,
0.037628173828125,
0.0032215118408203125,
-0.029510498046875,
0.0017518997192382812,
0.01177215576171875,
-0.0147857666015625,
0.033233642578125,
0.0290679931640625,
0.01253509521484375,
0.00911712646484375,
0.03875732421875,
-0.0208740234375,
-0.01175689697265625,
-0.01242828369140625,
-0.0110626220703125,
-0.0022296905517578125,
-0.0230865478515625,
-0.00643157958984375,
0.0401611328125,
-0.01354217529296875,
0.0115814208984375,
-0.01384735107421875,
-0.02679443359375,
-0.03851318359375,
-0.0249786376953125,
0.0229339599609375,
0.0229034423828125,
-0.01210784912109375,
0.032562255859375,
-0.0229644775390625,
-0.025177001953125,
0.0199737548828125,
-0.0188751220703125,
-0.0290679931640625,
0.0203704833984375,
0.03155517578125,
0.00899505615234375,
-0.041259765625,
-0.07763671875,
0.0225067138671875,
-0.005603790283203125,
0.0404052734375,
-0.006671905517578125,
-0.029754638671875,
-0.06781005859375,
0.054351806640625,
-0.06634521484375,
0.002559661865234375,
-0.09130859375,
0.01265716552734375,
-0.006618499755859375,
0.0060882568359375,
-0.0635986328125,
-0.068359375,
-0.010833740234375,
-0.05291748046875,
-0.01309967041015625,
0.0270538330078125,
0.08038330078125,
0.0160675048828125,
-0.058013916015625,
-0.0003337860107421875,
0.0308380126953125,
-0.00969696044921875,
0.032196044921875,
0.01328277587890625,
0.0026454925537109375,
0.0264739990234375,
0.044830322265625,
0.00420379638671875,
-0.0226898193359375,
0.061553955078125,
-0.0322265625,
-0.0279998779296875,
-0.01073455810546875,
0.0243377685546875,
0.03857421875,
0.00115203857421875,
0.0311737060546875,
0.0290679931640625,
0.0194549560546875,
-0.01385498046875,
0.015289306640625,
-0.015777587890625,
-0.017303466796875,
-0.023193359375,
0.007114410400390625,
-0.0220184326171875,
0.0174407958984375,
0.001834869384765625,
0.0142974853515625,
-0.01708984375,
0.00879669189453125,
-0.0540771484375,
0.005367279052734375,
-0.01058197021484375,
0.03662109375,
-0.064697265625,
0.039154052734375,
0.03326416015625,
0.01187896728515625,
-0.05975341796875,
0.06298828125,
0.056121826171875,
-0.0029315948486328125,
-0.0007753372192382812,
0.008758544921875,
-0.02587890625,
-0.02154541015625,
-0.01378631591796875,
-0.0191497802734375,
-0.0187225341796875,
0.04071044921875,
0.005901336669921875,
-0.0306854248046875,
-0.019927978515625,
-0.01296234130859375,
-0.0197601318359375,
0.01428985595703125,
-0.03521728515625,
0.0361328125,
0.019073486328125,
0.04095458984375,
-0.0308074951171875,
-0.05255126953125,
-0.03875732421875,
-0.0833740234375,
0.0426025390625,
0.09075927734375,
0.047515869140625,
0.038299560546875,
0.007518768310546875,
-0.01387786865234375,
0.01401519775390625,
-0.061248779296875,
0.024139404296875,
-0.04052734375,
-0.031829833984375,
-0.006862640380859375,
0.00664520263671875,
0.0068359375,
0.027313232421875,
0.014312744140625,
-0.048553466796875,
0.044525146484375,
0.0301666259765625,
0.021148681640625,
-0.045166015625,
0.043670654296875,
-0.01983642578125,
0.0269012451171875,
-0.01195526123046875,
0.002132415771484375,
0.0304107666015625,
0.044219970703125,
0.032562255859375,
0.0205230712890625,
-0.013916015625,
0.039703369140625,
0.0004253387451171875,
-0.04730224609375,
0.0036869049072265625,
0.06219482421875,
0.030853271484375,
0.0496826171875,
-0.01409149169921875,
-0.027099609375,
0.0182647705078125,
0.04876708984375,
-0.0033283233642578125,
0.013671875,
0.0120086669921875,
0.0021533966064453125,
0.0037517547607421875,
-0.0310516357421875,
0.0264892578125,
0.0246429443359375,
0.00806427001953125,
-0.00795745849609375,
0.0146942138671875,
0.0082550048828125,
-0.02667236328125,
0.037933349609375,
0.05279541015625,
-0.03472900390625,
-0.005023956298828125,
-0.04937744140625,
0.0401611328125,
-0.06573486328125,
0.0268096923828125,
0.04852294921875,
-0.021514892578125,
-0.01070404052734375,
-0.01300811767578125,
0.0160369873046875,
-0.00211334228515625,
0.01239013671875,
-0.0166015625,
-0.036712646484375,
-0.028656005859375,
0.0031757354736328125,
0.0302581787109375,
0.018280029296875,
0.02685546875,
-0.01535797119140625,
-0.007419586181640625,
0.02886962890625,
-0.07958984375,
-0.10748291015625,
0.02935791015625,
-0.07305908203125,
0.0283660888671875,
0.034881591796875,
-0.037445068359375,
-0.0299530029296875,
0.09930419921875,
0.00475311279296875,
0.022430419921875,
-0.00997161865234375,
-0.04364013671875,
-0.05810546875,
-0.08245849609375,
-0.025665283203125,
0.00830078125,
0.0142974853515625,
0.0037097930908203125,
0.027252197265625,
-0.008026123046875,
-0.07122802734375,
-0.01413726806640625,
0.036712646484375,
0.00594329833984375,
0.006381988525390625,
-0.04498291015625,
-0.005809783935546875,
-0.0034046173095703125,
-0.004688262939453125,
0.04681396484375,
-0.006683349609375,
0.006420135498046875,
0.00862884521484375,
0.032989501953125,
0.0199432373046875,
0.03985595703125,
0.0200042724609375,
-0.021575927734375,
0.00975799560546875,
0.019073486328125,
-0.04718017578125,
0.002132415771484375,
0.001377105712890625,
-0.0231475830078125,
0.007965087890625,
0.0200347900390625,
-0.0297393798828125,
-0.0087890625,
-0.0037384033203125,
-0.0129547119140625,
-0.01161956787109375,
0.0599365234375,
-0.051971435546875,
0.056671142578125,
-0.01204681396484375,
-0.0207061767578125,
-0.051116943359375,
0.061492919921875,
0.002044677734375,
-0.0643310546875,
0.01558685302734375,
-0.0107879638671875,
0.006866455078125,
-0.060791015625,
-0.01482391357421875,
-0.0275421142578125,
0.0167083740234375,
-0.05419921875,
0.0035915374755859375,
-0.029388427734375,
0.007232666015625,
-0.0204925537109375,
0.0438232421875,
-0.01270294189453125,
-0.036163330078125,
-0.005062103271484375,
0.0284576416015625,
0.0175018310546875,
-0.059844970703125,
0.03826904296875,
-0.043487548828125,
-0.0018205642700195312,
-0.01549530029296875,
-0.0176239013671875,
-0.003398895263671875,
-0.00623321533203125,
-0.0088348388671875,
0.00710296630859375,
-0.0233917236328125,
0.050506591796875,
-0.037139892578125,
0.012939453125,
0.01447296142578125,
0.00652313232421875,
-0.018951416015625,
-0.04302978515625,
-0.00382232666015625,
-0.1004638671875,
-0.032073974609375,
0.0135955810546875,
0.07659912109375,
-0.0078125,
-0.03338623046875,
-0.046875,
0.043426513671875,
-0.01332855224609375,
-0.011383056640625,
0.03179931640625,
0.02130126953125,
-0.028839111328125,
0.0025177001953125,
0.01354217529296875,
-0.0316162109375,
0.00550079345703125,
-0.0170135498046875,
-0.060699462890625,
-0.0338134765625,
-0.04254150390625,
-0.01174163818359375,
-0.006053924560546875,
-0.0194091796875,
-0.03125,
-0.00989532470703125,
0.005924224853515625,
0.019439697265625,
0.01107025146484375,
-0.0127410888671875,
-0.0066070556640625,
-0.0218658447265625,
0.035797119140625,
0.0285186767578125,
-0.0241241455078125,
-0.007076263427734375,
0.05279541015625,
0.03289794921875,
-0.024505615234375,
-0.016143798828125,
0.045166015625,
0.0258026123046875,
-0.038116455078125,
0.0867919921875,
0.0428466796875,
0.018218994140625,
0.055389404296875,
-0.01715087890625,
0.02276611328125,
0.0018634796142578125,
-0.0256500244140625,
0.0196685791015625,
-0.034515380859375,
0.03167724609375,
0.0380859375,
-0.01303863525390625,
0.015869140625,
-0.004764556884765625,
0.0218505859375,
0.013031005859375,
-0.0279998779296875,
-0.00875091552734375,
-0.0145721435546875,
0.009765625,
-0.014801025390625,
0.0095367431640625,
0.006298065185546875,
-0.0179595947265625,
0.0193328857421875,
-0.0225372314453125,
-0.015472412109375,
0.01324462890625,
-0.0173797607421875,
-0.045928955078125,
0.00884246826171875,
-0.045074462890625,
0.022735595703125,
-0.06640625,
-0.036651611328125,
-0.0277557373046875,
-0.01409149169921875,
0.034576416015625,
-0.018798828125,
-0.0623779296875,
0.0212554931640625,
0.002529144287109375,
-0.01239776611328125,
0.038787841796875,
-0.0247955322265625,
0.05645751953125,
0.0036220550537109375,
-0.015838623046875,
0.01424407958984375,
-0.03155517578125,
-0.04327392578125,
-0.05694580078125,
0.02880859375,
0.0028400421142578125,
0.00212860107421875,
0.02783203125,
0.032958984375,
0.034088134765625,
0.0186920166015625,
-0.029144287109375,
-0.01541900634765625,
-0.02020263671875,
0.0816650390625,
0.046539306640625,
-0.0831298828125,
-0.0118255615234375,
0.060760498046875,
-0.002674102783203125,
-0.060028076171875,
0.020660400390625,
0.038238525390625,
0.055389404296875,
0.005451202392578125,
-0.05621337890625,
0.0111236572265625,
-0.0237579345703125,
-0.009979248046875,
0.045135498046875,
-0.00943756103515625,
-0.045257568359375,
-0.045318603515625,
-0.0111236572265625,
0.039794921875,
-0.007350921630859375,
-0.004638671875,
0.0074005126953125,
0.0301513671875,
0.003269195556640625,
0.0380859375,
-0.044036865234375,
0.0174560546875,
0.034088134765625,
0.019805908203125,
-0.0211334228515625,
-0.0011548995971679688,
-0.01153564453125,
0.01910400390625,
-0.043426513671875,
-0.02276611328125,
0.08154296875,
-0.043487548828125,
-0.010284423828125,
-0.0478515625,
0.03607177734375,
-0.0736083984375,
0.0224151611328125,
0.00530242919921875,
0.0113525390625,
-0.0263671875,
-0.0074462890625,
-0.035491943359375,
-0.04278564453125,
-0.0029735565185546875,
-0.015289306640625,
-0.034271240234375,
0.0104217529296875,
-0.0018291473388671875,
0.0202484130859375,
-0.03143310546875,
-0.01044464111328125,
0.0067596435546875,
0.0249481201171875,
-0.0065155029296875,
0.052276611328125,
-0.021209716796875,
0.043853759765625,
0.002216339111328125,
0.01427459716796875,
-0.007476806640625,
-0.00411224365234375,
-0.0195159912109375,
0.0205230712890625,
0.00939178466796875,
-0.0286407470703125,
-0.0572509765625,
-0.025909423828125,
-0.01294708251953125,
0.06475830078125,
0.07293701171875,
-0.006656646728515625,
-0.006755828857421875,
-0.04217529296875,
-0.01351165771484375,
-0.0239105224609375,
0.07196044921875,
-0.028564453125,
0.0024623870849609375,
-0.00017368793487548828,
-0.0282440185546875,
0.0031261444091796875,
0.0196533203125,
0.0044097900390625,
0.02447509765625,
-0.0178680419921875,
0.0256500244140625,
-0.00514984130859375,
0.0306243896484375,
-0.004726409912109375,
0.0272369384765625,
0.0030651092529296875,
0.03521728515625,
0.0248870849609375,
0.0226898193359375,
0.0038852691650390625,
0.0421142578125,
-0.0137939453125,
-0.047454833984375,
0.0205078125,
0.006305694580078125,
0.0123748779296875,
0.023895263671875,
-0.0176849365234375,
0.0084075927734375,
0.022491455078125,
0.057098388671875,
-0.0535888671875,
0.012725830078125,
0.041168212890625,
0.005645751953125,
0.00957489013671875,
-0.0164031982421875,
-0.01273345947265625,
-0.0003414154052734375,
0.0107269287109375,
0.02301025390625,
-0.0310516357421875,
0.0092010498046875,
0.035369873046875,
0.0033416748046875,
-0.036376953125,
0.068115234375,
0.00670623779296875,
-0.043609619140625,
-0.0111236572265625,
0.026397705078125,
-0.0255889892578125,
0.0159149169921875,
0.038543701171875,
-0.041961669921875,
-0.01763916015625,
-0.040008544921875,
-0.0489501953125,
0.0174102783203125,
-0.07452392578125,
-0.01325225830078125,
-0.00402069091796875,
0.05084228515625,
0.0205230712890625,
0.0173492431640625,
-0.048614501953125,
-0.005268096923828125,
0.022308349609375,
0.0229644775390625,
-0.036468505859375,
0.007213592529296875,
0.027923583984375,
0.0005731582641601562,
-0.0013446807861328125,
0.0252227783203125,
-0.032073974609375,
0.007106781005859375,
-0.00629425048828125,
0.0316162109375,
-0.02691650390625,
-0.01739501953125,
0.017425537109375,
-0.03570556640625,
0.0030765533447265625,
0.01398468017578125,
0.042510986328125,
-0.047393798828125,
-0.007572174072265625,
0.0266265869140625,
-0.01041412353515625,
-0.059234619140625,
0.0013399124145507812,
-0.03472900390625,
0.05767822265625,
0.0027484893798828125,
0.0127716064453125,
0.0386962890625,
0.00670623779296875,
-0.035888671875,
-0.01221466064453125,
-0.01447296142578125,
0.032012939453125,
0.01476287841796875,
-0.039794921875,
0.006160736083984375,
0.000835418701171875,
-0.01337432861328125,
0.0038623809814453125,
0.00926971435546875,
-0.0001628398895263672,
-0.04217529296875,
0.002460479736328125,
0.07012939453125,
0.047393798828125,
0.03497314453125,
0.020050048828125,
0.01474761962890625,
-0.0016345977783203125,
0.0367431640625,
-0.02362060546875,
0.03857421875,
-0.04962158203125,
0.01012420654296875,
0.026763916015625,
0.004604339599609375,
-0.0194854736328125,
0.0131683349609375,
0.026458740234375,
-0.0645751953125,
0.0218048095703125,
0.0352783203125,
0.02587890625,
0.00855255126953125,
0.057464599609375,
0.053863525390625,
-0.0149383544921875,
-0.031402587890625,
-0.0307464599609375,
0.0404052734375,
0.01470947265625,
-0.011077880859375,
0.0421142578125,
0.0163726806640625,
0.038421630859375,
0.015716552734375,
-0.00559234619140625,
0.007648468017578125,
0.0272216796875,
0.01238250732421875,
-0.0143890380859375,
0.02740478515625,
-0.0489501953125,
-0.03680419921875,
0.023468017578125,
0.032379150390625,
-0.0027942657470703125,
-0.038330078125,
0.005413055419921875,
0.00875091552734375,
0.003978729248046875,
-0.0012998580932617188,
0.0233001708984375,
0.015960693359375,
0.0400390625,
-0.014373779296875,
-0.02349853515625,
0.0132293701171875,
0.027435302734375,
0.0174560546875,
0.0300445556640625,
-0.00433349609375,
-0.0423583984375,
-0.0210723876953125,
-0.04681396484375,
0.0259246826171875,
0.048309326171875,
0.04339599609375,
-0.0023326873779296875,
-0.0089569091796875,
-0.0262298583984375,
-0.0103607177734375,
0.027374267578125,
-0.034027099609375,
0.018646240234375,
-0.05743408203125,
-0.05242919921875,
0.0076446533203125,
0.04620361328125,
0.0277557373046875,
-0.036468505859375,
0.00994873046875,
-0.0017023086547851562,
-0.0501708984375,
-0.007678985595703125,
0.024932861328125,
-0.009979248046875,
-0.01141357421875,
-0.0352783203125,
0.0291748046875,
0.037933349609375,
0.02130126953125,
0.00009846687316894531,
0.00994110107421875,
0.04931640625,
0.022491455078125,
0.049407958984375,
0.0029754638671875,
0.0419921875,
-0.017303466796875,
-0.03546142578125,
-0.049560546875,
0.035064697265625,
-0.03131103515625,
0.0012607574462890625,
0.0004901885986328125,
-0.0066986083984375,
-0.0092926025390625,
0.0183868408203125,
-0.02593994140625,
0.05560302734375,
0.030426025390625,
-0.0533447265625,
0.0220947265625,
0.030517578125,
0.0174713134765625,
0.058746337890625,
0.0120391845703125,
0.0203704833984375,
-0.0191192626953125,
0.0011119842529296875,
0.0245819091796875,
0.013458251953125,
-0.016448974609375,
0.06884765625,
-0.02642822265625,
-0.006805419921875,
-0.00024008750915527344,
0.010650634765625,
-0.01140594482421875,
0.01067352294921875,
-0.01245880126953125,
0.0020275115966796875,
0.010894775390625,
-0.01280975341796875,
-0.002605438232421875,
0.048919677734375,
-0.0017538070678710938,
-0.050140380859375,
0.040863037109375,
-0.05224609375,
-0.002895355224609375,
-0.016632080078125,
0.0298309326171875,
-0.041107177734375,
-0.0806884765625,
-0.06396484375,
0.0204620361328125,
-0.005977630615234375,
0.035491943359375,
-0.0027408599853515625,
0.055419921875,
0.0034809112548828125,
-0.0087127685546875,
0.024200439453125,
-0.06146240234375,
0.03009033203125,
0.0252685546875,
-0.0024852752685546875,
0.0151519775390625,
-0.003749847412109375,
-0.02734375,
0.0372314453125,
-0.0177459716796875,
0.035247802734375,
-0.016326904296875,
0.026611328125,
0.0214996337890625,
0.01541900634765625,
0.03369140625,
-0.0132293701171875,
-0.005199432373046875,
0.02581787109375,
0.00009202957153320312,
-0.006465911865234375,
-0.02447509765625,
-0.0302276611328125,
-0.056549072265625,
0.0029544830322265625,
0.0006957054138183594,
-0.02459716796875,
-0.0234832763671875,
-0.015106201171875,
-0.0005326271057128906,
0.0087432861328125,
-0.0029582977294921875,
-0.035736083984375,
-0.0006051063537597656,
0.002727508544921875,
0.05255126953125,
-0.0178375244140625,
0.0194549560546875,
-0.0144195556640625,
0.0299224853515625,
-0.04364013671875,
-0.04925537109375,
-0.0300445556640625,
0.039794921875,
-0.062225341796875,
-0.00754547119140625,
0.0291595458984375,
-0.00832366943359375,
-0.0516357421875,
-0.01042938232421875,
-0.01110076904296875,
0.02655029296875,
-0.0274505615234375,
-0.01154327392578125,
0.006717681884765625,
0.007022857666015625,
-0.0094757080078125,
-0.06695556640625,
-0.006511688232421875,
-0.07940673828125,
0.0015201568603515625,
0.0257568359375,
-0.039764404296875,
-0.0219879150390625,
-0.055419921875,
-0.0897216796875,
0.0460205078125,
0.0181121826171875,
-0.039459228515625,
0.00420379638671875,
-0.00531768798828125,
-0.00980377197265625,
0.0262298583984375,
0.007427215576171875,
0.0017642974853515625,
-0.017913818359375,
-0.013885498046875,
0.0209503173828125,
0.02398681640625,
0.005252838134765625,
0.0082855224609375,
-0.043975830078125,
0.0284423828125,
0.01035308837890625,
0.017242431640625,
-0.051666259765625,
0.00693511962890625,
0.004016876220703125,
-0.00099945068359375,
-0.0261077880859375,
0.0167388916015625,
0.0312042236328125,
0.039703369140625,
0.0278778076171875,
-0.001316070556640625,
-0.043182373046875,
-0.03778076171875,
0.022674560546875,
0.00748443603515625,
-0.000644683837890625,
0.0133209228515625,
0.033050537109375,
-0.0020046234130859375,
-0.025634765625,
-0.00457000732421875,
0.02032470703125,
-0.053497314453125,
-0.03033447265625,
0.0181427001953125,
0.0247650146484375,
-0.0010976791381835938,
-0.033111572265625,
-0.0055999755859375,
-0.023590087890625,
0.009368896484375,
0.004131317138671875,
0.00738525390625,
-0.045806884765625,
0.0843505859375,
-0.058807373046875,
-0.02606201171875,
0.0012540817260742188,
0.0413818359375,
0.023101806640625,
-0.034942626953125,
0.0229034423828125,
0.03271484375,
-0.0517578125,
-0.0189056396484375,
0.00556182861328125,
0.024169921875,
-0.0031490325927734375,
-0.02435302734375,
0.0179443359375,
-0.019073486328125,
-0.0270843505859375,
-0.0377197265625,
0.0167694091796875,
-0.005603790283203125,
-0.042694091796875,
0.0460205078125,
-0.0175933837890625,
-0.0115203857421875,
-0.022857666015625,
0.02752685546875,
-0.05169677734375,
0.0105438232421875,
-0.025604248046875,
-0.0206298828125,
0.004192352294921875,
0.03399658203125,
0.004772186279296875,
-0.046600341796875,
0.00946044921875,
-0.00453948974609375,
0.043487548828125,
0.0035247802734375
] |
285f997b24d94557d63b94140c51e400e7dbc776
|
Wordpress Stackexchange
Q: How to load javascript on custom page template? I have a custom page template where I would like to load some javascript. I suppose I could always include the javascript in the actual file, but that seems ugly. Is there any way to identify if WordPress is loading my custom-page.php file so I can enqueue the script only on that page?
It should work dynamically, so checking page id is not an option.
A: You can use is_page_template to check if you template is being used and load your scripts based on that ex:
Add this code to your functions.php:
add_action('wp_enqueue_scripts','Load_Template_Scripts_wpa83855');
function Load_Template_Scripts_wpa83855(){
if ( is_page_template('custom-page.php') ) {
wp_enqueue_script('my-script', 'path/to/script.js');
}
}
|
Q: How to load javascript on custom page template? I have a custom page template where I would like to load some javascript. I suppose I could always include the javascript in the actual file, but that seems ugly. Is there any way to identify if WordPress is loading my custom-page.php file so I can enqueue the script only on that page?
It should work dynamically, so checking page id is not an option.
A: You can use is_page_template to check if you template is being used and load your scripts based on that ex:
Add this code to your functions.php:
add_action('wp_enqueue_scripts','Load_Template_Scripts_wpa83855');
function Load_Template_Scripts_wpa83855(){
if ( is_page_template('custom-page.php') ) {
wp_enqueue_script('my-script', 'path/to/script.js');
}
}
A: You can use something like this .....
add_filter( 'template_include', 'wpm_load_script_for_template', 1000 );
function wpm_load_script_for_template( $template ){
if(is_page_template('lead_capture_full.php')){
// standard code for adding js
}
return $template; }
A: You can add new wp_enqueue_scripts in your template file before get_header() call:
/**
* Template name: My page
*/
function my_page_scripts(){
wp_enqueue_script('my_script', get_template_directory_uri() . '/js/my-page-script.js', [], '1.0', true);
}
add_action( 'wp_enqueue_scripts', 'my_page_scripts' );
get_header();
|
wordpress
|
{
"language": "en",
"length": 176,
"provenance": "stackexchange_00019.jsonl.gz:428496",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83855"
}
|
[
0.03717041015625,
0.0139007568359375,
-0.026947021484375,
-0.06304931640625,
0.0146942138671875,
-0.01108551025390625,
-0.007965087890625,
0.0074615478515625,
-0.07952880859375,
-0.0200042724609375,
-0.0537109375,
0.0478515625,
-0.07989501953125,
-0.0022716522216796875,
0.0491943359375,
-0.1024169921875,
0.054534912109375,
-0.0293426513671875,
0.027191162109375,
-0.0172119140625,
0.0215301513671875,
0.003116607666015625,
0.0300445556640625,
0.10113525390625,
0.006427764892578125,
-0.0276336669921875,
0.102783203125,
0.0075836181640625,
-0.0028896331787109375,
-0.01113128662109375,
0.029205322265625,
-0.00937652587890625,
0.0182342529296875,
0.0258941650390625,
-0.028350830078125,
-0.016754150390625,
-0.00824737548828125,
0.0204620361328125,
-0.0010499954223632812,
0.0280914306640625,
0.0244140625,
-0.0141448974609375,
0.006641387939453125,
0.017059326171875,
-0.00928497314453125,
-0.0153656005859375,
-0.00011175870895385742,
-0.04833984375,
-0.015350341796875,
0.018310546875,
0.02044677734375,
-0.0312042236328125,
0.0294036865234375,
-0.006549835205078125,
-0.01270294189453125,
-0.01100921630859375,
-0.0243988037109375,
0.013671875,
0.0003464221954345703,
0.048858642578125,
0.018035888671875,
0.027099609375,
-0.01247406005859375,
-0.01340484619140625,
-0.0157318115234375,
-0.022552490234375,
-0.04718017578125,
0.0183868408203125,
-0.037628173828125,
-0.034637451171875,
0.0221710205078125,
-0.0267181396484375,
-0.00750732421875,
-0.0143890380859375,
-0.0214080810546875,
-0.0089263916015625,
0.00879669189453125,
-0.00951385498046875,
-0.00064849853515625,
0.004352569580078125,
-0.00571441650390625,
-0.051177978515625,
-0.0171051025390625,
0.007061004638671875,
-0.0062408447265625,
0.046722412109375,
-0.0182342529296875,
-0.00756072998046875,
-0.005191802978515625,
-0.017303466796875,
-0.0222320556640625,
0.019622802734375,
-0.006801605224609375,
-0.0099334716796875,
-0.052093505859375,
0.00792694091796875,
0.0097503662109375,
0.048126220703125,
-0.017364501953125,
0.01151275634765625,
-0.00281524658203125,
-0.018463134765625,
0.0274505615234375,
-0.033050537109375,
-0.013427734375,
0.0631103515625,
0.0070648193359375,
0.006084442138671875,
0.006153106689453125,
0.0030117034912109375,
0.0212249755859375,
-0.042266845703125,
0.03436279296875,
0.058685302734375,
-0.06402587890625,
-0.031585693359375,
-0.00771331787109375,
-0.04571533203125,
-0.0479736328125,
-0.00423431396484375,
0.0112152099609375,
0.029205322265625,
0.01068115234375,
-0.0198211669921875,
0.0182647705078125,
0.0013446807861328125,
-0.01433563232421875,
-0.037445068359375,
-0.0255889892578125,
0.00415802001953125,
-0.02423095703125,
0.006805419921875,
0.042449951171875,
0.060455322265625,
0.01250457763671875,
-0.01129150390625,
0.0316162109375,
-0.01629638671875,
0.0096893310546875,
-0.0185699462890625,
0.0140228271484375,
-0.0208587646484375,
-0.0059051513671875,
-0.00479888916015625,
-0.0217437744140625,
-0.004550933837890625,
-0.00897216796875,
0.03558349609375,
0.0204925537109375,
-0.028656005859375,
0.0335693359375,
-0.04296875,
0.040191650390625,
0.008697509765625,
0.0205841064453125,
-0.022735595703125,
0.03631591796875,
-0.030792236328125,
-0.00435638427734375,
-0.027099609375,
-0.018218994140625,
0.021087646484375,
-0.0022640228271484375,
-0.045562744140625,
-0.02435302734375,
-0.044097900390625,
0.0224456787109375,
0.01068115234375,
0.01541900634765625,
-0.0126953125,
-0.0233154296875,
-0.0304412841796875,
-0.0190277099609375,
0.01009368896484375,
0.00643157958984375,
0.0418701171875,
0.01312255859375,
0.02923583984375,
0.0255126953125,
0.0122528076171875,
-0.00994873046875,
-0.034637451171875,
0.081787109375,
-0.042510986328125,
-0.060791015625,
0.00643157958984375,
0.0243988037109375,
0.0673828125,
0.00255584716796875,
0.033355712890625,
0.050628662109375,
0.0019350051879882812,
-0.02105712890625,
0.0299530029296875,
0.0026874542236328125,
-0.0267181396484375,
-0.0236053466796875,
0.000865936279296875,
-0.0146942138671875,
-0.01194000244140625,
-0.005382537841796875,
-0.01438140869140625,
0.0096282958984375,
0.0194854736328125,
-0.0283355712890625,
-0.0016241073608398438,
-0.0263824462890625,
0.03143310546875,
0.016754150390625,
0.0133819580078125,
-0.00330352783203125,
-0.003753662109375,
-0.00409698486328125,
-0.0343017578125,
-0.04296875,
0.0134429931640625,
-0.006195068359375,
0.070556640625,
-0.01195526123046875,
0.01373291015625,
-0.002826690673828125,
-0.053314208984375,
0.005184173583984375,
0.0202484130859375,
0.00952911376953125,
0.00255584716796875,
-0.04583740234375,
-0.011016845703125,
-0.0185394287109375,
0.0044403076171875,
-0.03204345703125,
0.07489013671875,
0.012451171875,
0.056671142578125,
-0.01129913330078125,
-0.017730712890625,
-0.0071868896484375,
-0.0132293701171875,
0.006591796875,
0.0192108154296875,
0.03326416015625,
0.034820556640625,
0.008453369140625,
0.01364898681640625,
0.039459228515625,
-0.0589599609375,
-0.006809234619140625,
0.0087890625,
0.0287628173828125,
0.03173828125,
-0.025360107421875,
-0.0218963623046875,
0.0282135009765625,
-0.06988525390625,
0.01128387451171875,
0.056396484375,
0.010955810546875,
0.034332275390625,
0.00519561767578125,
0.0035839080810546875,
-0.0149993896484375,
0.05926513671875,
0.0182647705078125,
0.00791168212890625,
0.055877685546875,
0.008209228515625,
0.036956787109375,
0.035003662109375,
-0.023101806640625,
0.0242156982421875,
0.002262115478515625,
-0.049072265625,
-0.0114898681640625,
0.0103302001953125,
0.040069580078125,
0.0307464599609375,
-0.03741455078125,
0.004016876220703125,
0.0140533447265625,
0.0229339599609375,
0.003490447998046875,
0.017486572265625,
-0.06475830078125,
-0.0007510185241699219,
-0.019134521484375,
-0.07110595703125,
0.003246307373046875,
0.065185546875,
0.047698974609375,
0.04412841796875,
0.049041748046875,
0.046844482421875,
0.028900146484375,
0.0269317626953125,
0.005462646484375,
-0.00661468505859375,
0.0721435546875,
-0.045166015625,
0.055694580078125,
-0.028717041015625,
0.04449462890625,
0.066650390625,
-0.0148162841796875,
0.026123046875,
0.00020420551300048828,
0.040130615234375,
0.0227813720703125,
0.00896453857421875,
0.0173797607421875,
-0.02020263671875,
-0.0022029876708984375,
-0.0030841827392578125,
0.0170440673828125,
0.062286376953125,
-0.0002415180206298828,
-0.04248046875,
0.0223846435546875,
0.0244140625,
-0.059967041015625,
-0.10308837890625,
0.03424072265625,
-0.029541015625,
0.0254669189453125,
-0.043365478515625,
-0.007843017578125,
-0.0369873046875,
-0.0194091796875,
0.004596710205078125,
-0.0295867919921875,
-0.032989501953125,
-0.055755615234375,
-0.069580078125,
-0.06585693359375,
0.01160430908203125,
-0.005283355712890625,
-0.01296234130859375,
0.0027256011962890625,
0.0308380126953125,
0.002376556396484375,
-0.07635498046875,
0.003662109375,
0.034393310546875,
-0.019134521484375,
0.005519866943359375,
0.0311431884765625,
-0.0535888671875,
0.028228759765625,
-0.0009474754333496094,
-0.03228759765625,
0.02978515625,
0.0056915283203125,
-0.0192413330078125,
-0.0228424072265625,
-0.0195159912109375,
-0.00634765625,
0.034881591796875,
0.0245361328125,
-0.00405120849609375,
0.0158233642578125,
-0.04925537109375,
-0.0272979736328125,
0.0006394386291503906,
-0.04132080078125,
-0.003170013427734375,
0.034149169921875,
-0.0232086181640625,
-0.0171661376953125,
0.01067352294921875,
0.058197021484375,
0.0200653076171875,
-0.0225067138671875,
0.017120361328125,
0.0323486328125,
0.0188140869140625,
0.05816650390625,
-0.0210723876953125,
0.06878662109375,
-0.0045928955078125,
0.004940032958984375,
0.028656005859375,
0.00949859619140625,
-0.0162506103515625,
-0.0310821533203125,
-0.0736083984375,
-0.0188751220703125,
0.03521728515625,
0.0167694091796875,
0.034576416015625,
-0.0155029296875,
-0.0267333984375,
0.02264404296875,
0.0859375,
0.001979827880859375,
-0.0035915374755859375,
0.01299285888671875,
-0.0012712478637695312,
-0.026092529296875,
-0.006519317626953125,
-0.064453125,
-0.00408172607421875,
-0.03228759765625,
0.00942230224609375,
-0.023651123046875,
-0.0057830810546875,
-0.03643798828125,
0.039093017578125,
-0.040740966796875,
-0.0140533447265625,
0.025054931640625,
-0.0728759765625,
0.0115203857421875,
0.01084136962890625,
-0.004329681396484375,
-0.01873779296875,
-0.0042266845703125,
-0.06011962890625,
-0.0709228515625,
-0.0083770751953125,
-0.06439208984375,
0.05328369140625,
0.038116455078125,
-0.01242828369140625,
-0.00858306884765625,
0.030517578125,
0.0199432373046875,
0.0230712890625,
0.0077056884765625,
-0.01361846923828125,
0.0213623046875,
-0.0015583038330078125,
0.0103912353515625,
-0.0247650146484375,
0.00804901123046875,
-0.0007615089416503906,
-0.024322509765625,
-0.0032501220703125,
-0.0305633544921875,
-0.0207977294921875,
-0.0008916854858398438,
-0.0287017822265625,
-0.0150604248046875,
-0.0165252685546875,
0.0024471282958984375,
0.005512237548828125,
0.0216064453125,
-0.0203094482421875,
-0.0106353759765625,
-0.016815185546875,
0.04144287109375,
-0.00677490234375,
-0.01467132568359375,
-0.0065155029296875,
0.0232696533203125,
0.0264129638671875,
-0.029144287109375,
0.0134429931640625,
0.0211334228515625,
0.012969970703125,
-0.005889892578125,
0.0675048828125,
-0.0032939910888671875,
-0.006221771240234375,
0.0714111328125,
-0.015655517578125,
-0.0149383544921875,
0.0166168212890625,
0.0810546875,
0.0234527587890625,
0.00551605224609375,
-0.0048065185546875,
0.00994873046875,
-0.042816162109375,
0.0266571044921875,
-0.031494140625,
-0.004955291748046875,
0.006317138671875,
0.029571533203125,
-0.059234619140625,
0.044403076171875,
-0.038055419921875,
-0.0377197265625,
-0.00757598876953125,
-0.0205230712890625,
0.07135009765625,
0.02587890625,
-0.007556915283203125,
0.05462646484375,
0.06573486328125,
0.00638580322265625,
0.0305938720703125,
0.048553466796875,
-0.00908660888671875,
0.03912353515625,
0.03997802734375,
0.01465606689453125,
-0.011871337890625,
0.005367279052734375,
0.0084228515625,
0.0054779052734375,
-0.0261077880859375,
-0.0296478271484375,
0.01959228515625,
0.00498199462890625,
-0.00917816162109375,
0.0185089111328125,
0.04876708984375,
0.03997802734375,
-0.0251922607421875,
-0.0085601806640625,
0.0074615478515625,
0.006092071533203125,
-0.052215576171875,
-0.004428863525390625,
0.0275726318359375,
-0.03314208984375,
-0.051910400390625,
0.047760009765625,
0.0174560546875,
-0.02587890625,
-0.005268096923828125,
0.044708251953125,
0.025054931640625,
0.056365966796875,
0.01113128662109375,
-0.0203857421875,
-0.015655517578125,
0.0308380126953125,
-0.031463623046875,
-0.032867431640625,
0.00867462158203125,
0.00690460205078125,
0.02850341796875,
-0.055908203125,
-0.05084228515625,
0.05584716796875,
-0.03436279296875,
-0.01537322998046875,
-0.010009765625,
-0.035980224609375,
-0.00022542476654052734,
-0.043182373046875,
-0.0341796875,
0.037872314453125,
0.04296875,
0.00891876220703125,
0.0113372802734375,
-0.0151519775390625,
0.029449462890625,
-0.007556915283203125,
0.0215606689453125,
-0.0172576904296875,
-0.0311737060546875,
-0.0235748291015625,
-0.0005021095275878906,
0.022491455078125,
-0.0697021484375,
-0.033538818359375,
-0.0258636474609375,
-0.0145263671875,
0.0232086181640625,
-0.01038360595703125,
0.0120849609375,
-0.0178375244140625,
-0.004131317138671875,
0.0162353515625,
0.024566650390625,
0.005550384521484375,
-0.017669677734375,
-0.0265655517578125,
-0.01476287841796875,
-0.06353759765625,
-0.0277862548828125,
-0.05987548828125,
-0.05743408203125,
-0.041351318359375,
0.023040771484375,
-0.004848480224609375,
0.0244293212890625,
-0.02447509765625,
0.0007243156433105469,
0.0033397674560546875,
0.0233306884765625,
-0.0012140274047851562,
0.049652099609375,
-0.026153564453125,
0.08599853515625,
-0.0001341104507446289,
0.035491943359375,
0.0178985595703125,
0.062408447265625,
0.025543212890625,
-0.03631591796875,
-0.0162811279296875,
-0.040863037109375,
0.011016845703125,
0.01422119140625,
-0.0125732421875,
0.00185394287109375,
0.0382080078125,
0.009124755859375,
0.02294921875,
-0.0022525787353515625,
0.002750396728515625,
-0.0116424560546875,
-0.00653076171875,
0.0194244384765625,
0.006618499755859375,
0.032318115234375,
0.00868988037109375,
0.0024318695068359375,
0.00992584228515625,
-0.0289306640625,
0.035614013671875,
0.01161956787109375,
0.032073974609375,
-0.05059814453125,
-0.042266845703125,
0.056365966796875,
0.0165863037109375,
0.0099029541015625,
0.03826904296875,
-0.0102386474609375,
0.0236663818359375,
0.0277557373046875,
0.0606689453125,
-0.057861328125,
-0.0755615234375,
-0.00016677379608154297,
-0.000019848346710205078,
-0.02642822265625,
-0.0005769729614257812,
-0.004123687744140625,
-0.0029468536376953125,
0.058135986328125,
0.052276611328125,
-0.08056640625,
-0.007785797119140625,
-0.00388336181640625,
-0.017425537109375,
-0.027191162109375,
-0.039581298828125,
0.01507568359375,
-0.012542724609375,
0.0732421875,
0.03326416015625,
-0.00774383544921875,
0.035491943359375,
-0.01169586181640625,
-0.0151214599609375,
-0.0301971435546875,
0.0364990234375,
0.0301513671875,
-0.007965087890625,
0.0390625,
-0.00618743896484375,
0.031097412109375,
-0.0167083740234375,
0.0013246536254882812,
0.026275634765625,
-0.016937255859375,
-0.0233306884765625,
0.0496826171875,
-0.041839599609375,
0.00652313232421875,
0.0303192138671875,
0.0406494140625,
0.026824951171875,
0.03997802734375,
0.01385498046875,
0.01025390625,
0.007228851318359375,
0.0004482269287109375,
0.022125244140625,
-0.03668212890625,
0.0015115737915039062,
0.0137786865234375,
-0.027618408203125,
0.00702667236328125,
-0.0010528564453125,
-0.023956298828125,
-0.01390838623046875,
-0.0066680908203125,
0.0595703125,
-0.005825042724609375,
-0.031646728515625,
0.02362060546875,
0.0287017822265625,
-0.032684326171875,
-0.00604248046875,
0.007160186767578125,
-0.025360107421875,
0.01262664794921875,
0.004268646240234375,
-0.031158447265625,
-0.044097900390625,
-0.034881591796875,
-0.056793212890625,
0.0986328125,
0.000568389892578125,
0.0244293212890625,
0.0064849853515625,
0.036224365234375,
-0.006374359130859375,
0.022613525390625,
-0.023284912109375,
0.040985107421875,
0.0192108154296875,
0.04229736328125,
-0.0360107421875,
-0.0163116455078125,
0.0197601318359375,
0.044281005859375,
-0.025360107421875,
-0.0090789794921875,
0.0270538330078125,
0.003688812255859375,
0.03167724609375,
0.06146240234375,
0.0219879150390625,
-0.0362548828125,
-0.01221466064453125,
0.029296875,
-0.00942230224609375,
-0.040771484375,
0.0017194747924804688,
-0.020904541015625,
-0.0421142578125,
0.02081298828125,
0.0286407470703125,
0.04193115234375,
-0.0254364013671875,
-0.030853271484375,
-0.03857421875,
0.00775909423828125,
0.03485107421875,
0.0316162109375,
-0.031494140625,
0.037628173828125,
0.0035724639892578125,
-0.0224151611328125,
-0.07745361328125,
-0.01241302490234375,
0.0115966796875,
-0.0063018798828125,
-0.0225067138671875,
-0.00396728515625,
0.01313018798828125,
-0.053741455078125,
-0.0141448974609375,
-0.0141754150390625,
0.0367431640625,
-0.049041748046875,
0.032958984375,
0.016937255859375,
0.0151519775390625,
-0.044219970703125,
-0.01092529296875,
-0.006622314453125,
0.0279083251953125,
-0.034454345703125,
-0.02093505859375,
0.00826263427734375,
-0.00734710693359375,
-0.01448822021484375,
-0.01654052734375,
-0.0230865478515625,
0.031280517578125,
0.043243408203125,
0.00844573974609375,
-0.00801849365234375,
0.001354217529296875,
-0.00391387939453125,
0.0052642822265625,
0.0110626220703125,
0.01180267333984375,
0.0110015869140625,
-0.058197021484375,
0.01239013671875,
0.005405426025390625,
0.06707763671875,
0.039276123046875,
0.0322265625,
-0.0227203369140625,
-0.03973388671875,
0.005626678466796875,
0.00968170166015625,
-0.0260009765625,
0.0147705078125,
-0.018951416015625,
-0.0121307373046875,
-0.0261993408203125,
0.039886474609375,
0.0104827880859375,
0.016265869140625,
0.03411865234375,
0.0017375946044921875,
-0.02978515625,
-0.0015268325805664062,
0.034332275390625,
-0.01488494873046875,
0.054412841796875,
-0.0224456787109375,
0.037017822265625,
-0.0038471221923828125,
-0.0187225341796875,
-0.0274810791015625,
0.0343017578125,
0.0262908935546875,
-0.026611328125,
0.0296478271484375,
0.0038299560546875,
-0.034576416015625,
0.080322265625,
0.02130126953125,
0.1083984375,
0.0290374755859375,
-0.019805908203125,
-0.0044708251953125,
-0.038848876953125,
-0.022186279296875,
0.021820068359375,
0.048309326171875,
-0.00927734375,
0.024261474609375,
0.052978515625,
-0.004840850830078125,
0.0008215904235839844,
0.00939178466796875,
0.02398681640625,
-0.010498046875,
0.0269927978515625,
0.0328369140625,
-0.0367431640625,
-0.01302337646484375,
-0.0129241943359375,
0.0157470703125,
0.00492095947265625,
0.02801513671875,
-0.003498077392578125,
0.00597381591796875,
0.0300750732421875,
-0.0059661865234375,
0.0238494873046875,
0.01137542724609375,
0.020111083984375,
0.00870513916015625,
0.011322021484375,
-0.03076171875,
-0.051361083984375,
0.07733154296875,
-0.006439208984375,
0.0295867919921875,
0.032073974609375,
-0.0006594657897949219,
0.0080718994140625,
0.03228759765625,
-0.01532745361328125,
-0.04095458984375,
-0.0418701171875,
0.006900787353515625,
0.0215301513671875,
-0.02764892578125,
-0.013641357421875,
0.00579071044921875,
0.028717041015625,
-0.01462554931640625,
-0.024749755859375,
0.011688232421875,
-0.03521728515625,
0.00197601318359375,
0.01146697998046875,
0.010009765625,
-0.038818359375,
0.021026611328125,
-0.0122833251953125,
0.019195556640625,
0.0019817352294921875,
0.045745849609375,
0.0281524658203125,
-0.0352783203125,
0.004543304443359375,
0.003215789794921875,
0.0306854248046875,
-0.01800537109375,
0.0124664306640625,
-0.0065155029296875,
0.00505828857421875,
0.00727081298828125,
-0.0283050537109375,
-0.01317596435546875,
-0.013092041015625,
0.007415771484375,
0.0416259765625,
0.00030303001403808594,
0.025634765625,
-0.01354217529296875,
-0.0128021240234375,
0.0274658203125,
-0.001270294189453125,
-0.03863525390625,
0.021942138671875,
-0.055999755859375,
0.017303466796875,
-0.0072784423828125,
0.04913330078125,
-0.00807952880859375,
0.019622802734375,
-0.037628173828125,
-0.00010401010513305664,
0.00812530517578125,
0.034912109375,
0.03521728515625,
0.036285400390625,
0.0562744140625,
-0.0187225341796875,
0.022796630859375,
0.036041259765625,
0.00839996337890625,
0.09088134765625,
-0.03729248046875,
0.0028781890869140625,
0.034271240234375,
0.0299530029296875,
-0.030426025390625,
-0.05670166015625,
-0.008544921875,
0.01392364501953125,
0.03814697265625,
-0.036529541015625,
0.03265380859375,
0.02410888671875,
-0.04180908203125,
-0.10443115234375,
0.062164306640625,
-0.0308837890625,
-0.04229736328125,
-0.035491943359375,
0.00992584228515625,
0.00646209716796875,
-0.04766845703125,
-0.0230865478515625,
-0.02813720703125,
-0.02166748046875,
0.037384033203125,
0.0189361572265625,
0.0101318359375,
0.048919677734375,
0.00550079345703125,
-0.0838623046875,
-0.01549530029296875,
-0.041748046875,
0.005725860595703125,
-0.0084686279296875,
-0.00782012939453125,
0.026885986328125,
0.0311737060546875,
-0.0236968994140625,
-0.0120697021484375,
0.0083465576171875,
-0.00563812255859375,
-0.0101776123046875,
-0.00875091552734375,
-0.0195770263671875,
0.006992340087890625,
0.0867919921875,
0.040863037109375,
0.019561767578125,
-0.035858154296875,
0.00832366943359375,
-0.0288238525390625,
-0.0251007080078125,
-0.0033550262451171875,
0.004825592041015625,
-0.028900146484375,
0.0205535888671875,
0.0082244873046875,
-0.020111083984375,
0.0158233642578125,
-0.01407623291015625,
-0.056610107421875,
0.01256561279296875,
-0.0095672607421875,
0.0029773712158203125,
-0.054473876953125,
0.01517486572265625,
0.080810546875,
-0.040008544921875,
0.02752685546875,
-0.008087158203125,
0.01141357421875,
0.053863525390625,
-0.01548004150390625,
0.004486083984375,
0.048492431640625,
-0.06353759765625,
-0.00408935546875,
0.0017070770263671875,
0.02587890625,
-0.02789306640625,
0.00136566162109375,
0.0116729736328125,
0.031951904296875,
-0.006168365478515625,
0.0182952880859375,
-0.03228759765625,
0.051361083984375,
-0.009521484375,
0.03558349609375,
-0.0268096923828125,
0.0111083984375,
-0.01416015625,
0.01312255859375,
0.005084991455078125,
0.00849151611328125,
0.03912353515625,
-0.01885986328125,
-0.00734710693359375,
-0.0040130615234375,
-0.053802490234375,
-0.04656982421875,
0.0122833251953125,
-0.0236663818359375,
-0.01367950439453125,
0.0178985595703125
] |
4c8948880906d08b0ae918fe9d3fa7591b42a4e3
|
Wordpress Stackexchange
Q: Deep customization of the comment form? I've been handed over a design to translate into WordPress plugin & theme. My question is regarding building a custom comment form.
The design used some custom scripts on the comment submit button. It handles 'submitting...' button state, animations, and checks. And it uses an anchor tag <a> with jQuery's .bind to submit the form.
I noticed that the comment_form function of WordPress did not offer a solution to change the submit button. I only needed to remove it as I'm handling it myself.
What made it worse is that WordPress has hard coded <input name="submit"> into the button, which made it impossible for jQuery to call .submit (more details on this issue here: https://stackoverflow.com/questions/12540953/property-submit-of-object-htmlformelement-is-not-a-function). So just hiding this button with CSS won't work.
If I prefer not to use the <input type="submit"> button of WordPress comment form, do I have any options to build my own button?
Thanks.
A: This is hard. Output buffering could solve that:
add_action( 'comment_form_field_comment', 'ob_start' );
add_action( 'comment_form', 'wpse_83898_replace_submit' );
function wpse_83898_replace_submit()
{
$html = ob_get_clean();
# do some magic
echo $html;
}
Just an idea, not tested.
|
Q: Deep customization of the comment form? I've been handed over a design to translate into WordPress plugin & theme. My question is regarding building a custom comment form.
The design used some custom scripts on the comment submit button. It handles 'submitting...' button state, animations, and checks. And it uses an anchor tag <a> with jQuery's .bind to submit the form.
I noticed that the comment_form function of WordPress did not offer a solution to change the submit button. I only needed to remove it as I'm handling it myself.
What made it worse is that WordPress has hard coded <input name="submit"> into the button, which made it impossible for jQuery to call .submit (more details on this issue here: https://stackoverflow.com/questions/12540953/property-submit-of-object-htmlformelement-is-not-a-function). So just hiding this button with CSS won't work.
If I prefer not to use the <input type="submit"> button of WordPress comment form, do I have any options to build my own button?
Thanks.
A: This is hard. Output buffering could solve that:
add_action( 'comment_form_field_comment', 'ob_start' );
add_action( 'comment_form', 'wpse_83898_replace_submit' );
function wpse_83898_replace_submit()
{
$html = ob_get_clean();
# do some magic
echo $html;
}
Just an idea, not tested.
|
wordpress
|
{
"language": "en",
"length": 191,
"provenance": "stackexchange_00019.jsonl.gz:428511",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83898"
}
|
[
0.048980712890625,
-0.0014171600341796875,
-0.016571044921875,
-0.033660888671875,
0.0238037109375,
-0.041015625,
0.032379150390625,
-0.00943756103515625,
-0.023345947265625,
0.0008602142333984375,
-0.00780487060546875,
-0.0245513916015625,
-0.035400390625,
-0.0458984375,
0.00875091552734375,
-0.0523681640625,
0.0321044921875,
0.0006246566772460938,
0.02960205078125,
-0.0207977294921875,
0.023040771484375,
-0.003173828125,
0.0198974609375,
0.0322265625,
0.01983642578125,
-0.03863525390625,
0.126708984375,
-0.002902984619140625,
0.00957489013671875,
-0.004146575927734375,
0.035430908203125,
-0.054473876953125,
0.03643798828125,
0.0194244384765625,
-0.041290283203125,
0.0193023681640625,
0.0006170272827148438,
0.007350921630859375,
-0.0187530517578125,
0.034210205078125,
0.056915283203125,
-0.03973388671875,
-0.0316162109375,
-0.0428466796875,
-0.026153564453125,
-0.0010499954223632812,
0.036712646484375,
-0.006160736083984375,
0.0113983154296875,
0.0016813278198242188,
0.00942230224609375,
0.042083740234375,
0.034210205078125,
-0.04541015625,
0.001155853271484375,
0.0175628662109375,
-0.045745849609375,
0.01058197021484375,
0.0113677978515625,
0.0609130859375,
0.024322509765625,
0.01197052001953125,
-0.0097808837890625,
-0.0213775634765625,
-0.01154327392578125,
-0.01010894775390625,
0.00861358642578125,
0.0200653076171875,
0.043121337890625,
-0.0020885467529296875,
-0.02105712890625,
0.015289306640625,
0.00833892822265625,
-0.01520538330078125,
0.0201568603515625,
-0.0288543701171875,
-0.0240936279296875,
-0.0181427001953125,
0.052825927734375,
0.0068206787109375,
0.0116424560546875,
-0.014862060546875,
0.01070404052734375,
-0.007350921630859375,
0.010589599609375,
0.0014505386352539062,
-0.006351470947265625,
-0.0149688720703125,
-0.036285400390625,
-0.01085662841796875,
-0.0168914794921875,
-0.07464599609375,
-0.04510498046875,
0.0291748046875,
0.0333251953125,
-0.0206146240234375,
-0.0018625259399414062,
-0.0088653564453125,
0.004337310791015625,
0.0122222900390625,
0.0555419921875,
-0.052215576171875,
0.063232421875,
-0.0205841064453125,
0.011871337890625,
0.017303466796875,
-0.00885009765625,
-0.01397705078125,
0.0298309326171875,
0.0095672607421875,
-0.00914764404296875,
-0.0052642822265625,
0.0020999908447265625,
-0.037841796875,
0.0244598388671875,
0.010650634765625,
-0.0318603515625,
0.04766845703125,
0.01218414306640625,
-0.0045318603515625,
-0.00899505615234375,
-0.016204833984375,
-0.001079559326171875,
-0.01708984375,
0.03863525390625,
-0.0032749176025390625,
-0.0279388427734375,
0.01611328125,
0.0203704833984375,
-0.0233612060546875,
-0.05352783203125,
0.0201568603515625,
0.12261962890625,
0.042449951171875,
0.046722412109375,
-0.0188140869140625,
0.029571533203125,
-0.036590576171875,
-0.0017242431640625,
0.049041748046875,
-0.00972747802734375,
-0.06365966796875,
-0.033172607421875,
0.00122833251953125,
-0.033966064453125,
0.037261962890625,
0.02783203125,
-0.0059356689453125,
-0.0092926025390625,
-0.09075927734375,
-0.0002880096435546875,
-0.030914306640625,
0.04461669921875,
0.006969451904296875,
-0.022216796875,
-0.039306640625,
0.0251922607421875,
-0.04351806640625,
0.003940582275390625,
-0.0589599609375,
-0.00894927978515625,
0.0035305023193359375,
0.027587890625,
-0.03076171875,
-0.0219879150390625,
-0.01861572265625,
-0.01580810546875,
-0.001735687255859375,
0.025115966796875,
0.046539306640625,
-0.0086822509765625,
-0.000033795833587646484,
-0.0230865478515625,
0.0328369140625,
0.0214080810546875,
0.028778076171875,
-0.034423828125,
0.0625,
0.0007996559143066406,
0.006397247314453125,
0.0197296142578125,
-0.050567626953125,
0.0677490234375,
0.00852203369140625,
-0.03759765625,
0.038787841796875,
0.0301666259765625,
0.06353759765625,
-0.0259246826171875,
0.0152130126953125,
0.04522705078125,
0.0216827392578125,
0.016754150390625,
0.00582122802734375,
0.01261138916015625,
-0.033843994140625,
-0.0129547119140625,
-0.00527191162109375,
-0.0128326416015625,
0.0230712890625,
-0.03912353515625,
-0.01275634765625,
0.00202178955078125,
0.039825439453125,
-0.062103271484375,
0.0574951171875,
-0.050506591796875,
0.0379638671875,
-0.0029582977294921875,
-0.00075531005859375,
0.0160980224609375,
0.00469207763671875,
-0.036285400390625,
-0.01226043701171875,
-0.024078369140625,
0.00691986083984375,
-0.040435791015625,
0.006450653076171875,
-0.0084686279296875,
0.07366943359375,
-0.0242462158203125,
-0.02728271484375,
-0.0272674560546875,
-0.036590576171875,
0.04229736328125,
0.003009796142578125,
-0.01555633544921875,
-0.01023101806640625,
0.0234527587890625,
0.002216339111328125,
-0.022369384765625,
0.045196533203125,
0.08349609375,
0.03155517578125,
-0.023773193359375,
0.0019330978393554688,
-0.01288604736328125,
-0.10540771484375,
-0.0257720947265625,
0.07568359375,
0.023193359375,
0.0119781494140625,
0.00750732421875,
0.0518798828125,
0.06353759765625,
0.034698486328125,
0.0249786376953125,
0.008148193359375,
0.0219573974609375,
0.00406646728515625,
-0.04144287109375,
-0.04547119140625,
0.03363037109375,
-0.06329345703125,
0.029815673828125,
0.033447265625,
-0.0222930908203125,
-0.04400634765625,
0.055694580078125,
-0.00675201416015625,
-0.0015239715576171875,
-0.0171966552734375,
-0.015533447265625,
-0.01239776611328125,
0.057403564453125,
-0.00977325439453125,
0.0347900390625,
0.01555633544921875,
-0.01422882080078125,
0.01200103759765625,
0.01140594482421875,
-0.048126220703125,
-0.00980377197265625,
-0.0025482177734375,
0.00908660888671875,
-0.01580810546875,
-0.034881591796875,
0.01422882080078125,
-0.00882720947265625,
-0.006317138671875,
-0.005817413330078125,
0.042083740234375,
-0.0121307373046875,
-0.0203094482421875,
-0.012664794921875,
-0.06011962890625,
-0.01495361328125,
-0.0170745849609375,
0.03515625,
-0.01152801513671875,
0.0213623046875,
-0.012908935546875,
-0.04156494140625,
0.049713134765625,
0.04034423828125,
-0.0628662109375,
0.004459381103515625,
-0.0302886962890625,
0.041015625,
-0.0160675048828125,
0.037109375,
0.0792236328125,
-0.0005707740783691406,
0.0219879150390625,
0.0016908645629882812,
-0.006519317626953125,
0.004619598388671875,
0.0130157470703125,
-0.0038013458251953125,
0.00030350685119628906,
-0.06365966796875,
-0.00588226318359375,
0.000988006591796875,
0.054229736328125,
-0.025909423828125,
-0.058746337890625,
-0.00429534912109375,
0.024810791015625,
-0.0252532958984375,
-0.006565093994140625,
0.0257568359375,
-0.035675048828125,
-0.0011463165283203125,
-0.00783538818359375,
-0.017578125,
-0.0199432373046875,
-0.007274627685546875,
0.001461029052734375,
-0.00450897216796875,
-0.00737762451171875,
-0.0312347412109375,
-0.0308837890625,
-0.068603515625,
-0.037872314453125,
-0.00418853759765625,
0.0105438232421875,
0.0166473388671875,
0.031951904296875,
0.0216064453125,
-0.03302001953125,
0.038299560546875,
-0.015625,
-0.015899658203125,
0.037322998046875,
0.0689697265625,
-0.059814453125,
0.033935546875,
0.001941680908203125,
-0.0006113052368164062,
0.047271728515625,
-0.0305023193359375,
-0.0250701904296875,
-0.0200347900390625,
-0.032623291015625,
-0.0019321441650390625,
0.024139404296875,
0.03057861328125,
-0.0241241455078125,
0.028350830078125,
-0.05255126953125,
-0.024566650390625,
0.0204620361328125,
-0.02691650390625,
-0.02105712890625,
-0.01202392578125,
-0.00508880615234375,
0.0097808837890625,
0.0276641845703125,
0.0438232421875,
0.033538818359375,
0.045257568359375,
0.00470733642578125,
-0.0033054351806640625,
-0.00559234619140625,
0.021026611328125,
-0.051727294921875,
0.01280975341796875,
-0.0123291015625,
0.0105133056640625,
0.005496978759765625,
0.0025501251220703125,
0.01016998291015625,
-0.0211181640625,
-0.00006115436553955078,
-0.08758544921875,
0.058837890625,
-0.0523681640625,
-0.0262451171875,
-0.05987548828125,
-0.009490966796875,
-0.001865386962890625,
0.07958984375,
-0.0267333984375,
-0.00782012939453125,
0.00859832763671875,
0.003696441650390625,
-0.021331787109375,
-0.01418304443359375,
-0.06646728515625,
-0.008544921875,
-0.054107666015625,
0.02044677734375,
-0.0024852752685546875,
-0.023193359375,
-0.0221405029296875,
0.0178680419921875,
-0.039276123046875,
-0.032501220703125,
0.00008374452590942383,
-0.03546142578125,
0.006732940673828125,
-0.01641845703125,
-0.02703857421875,
-0.00867462158203125,
0.0176849365234375,
-0.058197021484375,
-0.0299224853515625,
0.0038204193115234375,
-0.055633544921875,
0.0262603759765625,
0.0369873046875,
0.0197906494140625,
0.00177001953125,
0.0269317626953125,
0.01385498046875,
0.03131103515625,
-0.021270751953125,
-0.004703521728515625,
-0.004547119140625,
-0.0027065277099609375,
-0.0213470458984375,
0.00038814544677734375,
0.010955810546875,
0.032745361328125,
-0.01113128662109375,
0.06854248046875,
-0.026824951171875,
-0.016448974609375,
0.00479888916015625,
-0.04083251953125,
-0.021026611328125,
-0.039276123046875,
-0.049224853515625,
0.02947998046875,
-0.0270233154296875,
-0.00414276123046875,
-0.03131103515625,
-0.036773681640625,
0.0168609619140625,
-0.008544921875,
0.01490020751953125,
-0.0028095245361328125,
-0.007244110107421875,
0.0120391845703125,
-0.0258636474609375,
0.020050048828125,
-0.007335662841796875,
0.0120391845703125,
0.0214080810546875,
0.046051025390625,
0.0029754638671875,
-0.01264190673828125,
0.055938720703125,
0.00835418701171875,
0.0283966064453125,
-0.01141357421875,
0.0181121826171875,
0.004947662353515625,
-0.007801055908203125,
0.025634765625,
0.011077880859375,
0.004314422607421875,
-0.01702880859375,
-0.0111083984375,
0.01556396484375,
-0.04473876953125,
0.005462646484375,
0.02197265625,
-0.01092529296875,
-0.01248931884765625,
-0.0294342041015625,
0.00026535987854003906,
-0.054931640625,
0.06011962890625,
0.0183258056640625,
-0.005298614501953125,
0.03350830078125,
0.008544921875,
-0.00730133056640625,
0.0037994384765625,
-0.012298583984375,
-0.00559234619140625,
0.02734375,
0.0037136077880859375,
0.0133056640625,
-0.007038116455078125,
-0.00875091552734375,
0.0232086181640625,
0.021087646484375,
-0.0237884521484375,
0.01337432861328125,
-0.00272369384765625,
0.0249786376953125,
-0.0205078125,
-0.00261688232421875,
0.015289306640625,
0.0103759765625,
-0.00476837158203125,
0.0274658203125,
0.0054931640625,
0.0038814544677734375,
-0.020294189453125,
0.0129852294921875,
0.0252838134765625,
-0.02423095703125,
0.0227203369140625,
-0.01044464111328125,
0.0268096923828125,
-0.0169525146484375,
-0.00635528564453125,
0.0416259765625,
0.022247314453125,
0.023284912109375,
0.0105133056640625,
-0.0013408660888671875,
0.0034503936767578125,
-0.0110626220703125,
0.0023517608642578125,
-0.00600433349609375,
-0.007152557373046875,
0.039031982421875,
0.0173492431640625,
0.002994537353515625,
0.014251708984375,
-0.02581787109375,
-0.0153045654296875,
-0.005035400390625,
-0.0039520263671875,
-0.0010747909545898438,
-0.0224761962890625,
-0.0011968612670898438,
0.035003662109375,
0.01514434814453125,
0.006732940673828125,
-0.0015058517456054688,
-0.01174163818359375,
-0.0149688720703125,
-0.019561767578125,
0.0236053466796875,
-0.040313720703125,
0.007183074951171875,
0.01473236083984375,
-0.007137298583984375,
-0.003337860107421875,
0.0024204254150390625,
-0.069091796875,
-0.0283966064453125,
-0.01323699951171875,
0.01093292236328125,
0.043487548828125,
0.004070281982421875,
-0.00876617431640625,
-0.026885986328125,
0.007843017578125,
-0.0303192138671875,
-0.017822265625,
0.0540771484375,
0.0035800933837890625,
-0.024505615234375,
-0.0239105224609375,
-0.054443359375,
-0.0247802734375,
-0.064453125,
-0.04681396484375,
-0.049896240234375,
0.03533935546875,
-0.01458740234375,
0.01087188720703125,
-0.01189422607421875,
-0.0056915283203125,
0.00714111328125,
0.0162506103515625,
-0.00824737548828125,
0.033477783203125,
-0.04107666015625,
0.054901123046875,
0.011016845703125,
0.027923583984375,
-0.00432586669921875,
0.0193939208984375,
0.01715087890625,
-0.0075225830078125,
0.00711822509765625,
-0.0423583984375,
-0.035400390625,
-0.0295867919921875,
-0.0295867919921875,
0.072265625,
0.079345703125,
-0.009918212890625,
0.047119140625,
-0.00989532470703125,
-0.0036220550537109375,
-0.0328369140625,
-0.0201416015625,
-0.03668212890625,
0.045562744140625,
-0.007038116455078125,
-0.006847381591796875,
0.02685546875,
-0.0039825439453125,
0.01103973388671875,
-0.0228118896484375,
-0.00028634071350097656,
-0.01262664794921875,
-0.0012226104736328125,
-0.033203125,
0.032989501953125,
0.036285400390625,
0.00481414794921875,
0.024322509765625,
-0.0124053955078125,
0.0113677978515625,
0.0232696533203125,
0.02691650390625,
-0.0170440673828125,
-0.032989501953125,
0.06927490234375,
0.018585205078125,
-0.03900146484375,
0.0445556640625,
-0.03680419921875,
0.061004638671875,
0.03076171875,
0.07012939453125,
-0.08306884765625,
0.051116943359375,
0.0153961181640625,
-0.007328033447265625,
0.10797119140625,
-0.0109710693359375,
0.0252838134765625,
-0.0092926025390625,
0.022186279296875,
0.04205322265625,
-0.00954437255859375,
0.01375579833984375,
-0.0068206787109375,
-0.0236053466796875,
-0.03594970703125,
0.0307159423828125,
0.000225067138671875,
-0.0301971435546875,
-0.00637054443359375,
0.01192474365234375,
-0.0309600830078125,
-0.0258331298828125,
-0.01043701171875,
0.0120086669921875,
-0.048828125,
-0.0838623046875,
-0.004730224609375,
-0.0283203125,
-0.018157958984375,
0.022125244140625,
0.029693603515625,
0.006214141845703125,
0.046539306640625,
-0.01401519775390625,
0.028350830078125,
-0.00730133056640625,
0.0184478759765625,
-0.051483154296875,
-0.0232696533203125,
0.0128021240234375,
0.054412841796875,
-0.047943115234375,
0.046142578125,
-0.04168701171875,
-0.005146026611328125,
0.0141754150390625,
0.03436279296875,
0.07781982421875,
-0.00887298583984375,
-0.0401611328125,
0.0005865097045898438,
-0.03192138671875,
0.0208587646484375,
-0.033721923828125,
-0.0017995834350585938,
-0.041107177734375,
0.0006170272827148438,
-0.045684814453125,
-0.0335693359375,
0.002227783203125,
-0.06988525390625,
-0.11907958984375,
0.0750732421875,
0.053955078125,
0.06463623046875,
-0.050079345703125,
0.020263671875,
-0.013397216796875,
-0.01071929931640625,
-0.034149169921875,
0.03070068359375,
-0.01551055908203125,
0.0278778076171875,
-0.0139617919921875,
-0.00016951560974121094,
0.00838470458984375,
0.0262298583984375,
-0.0097198486328125,
-0.00417327880859375,
-0.0225677490234375,
0.0374755859375,
0.07171630859375,
0.007354736328125,
0.00922393798828125,
0.03485107421875,
0.0103302001953125,
0.0198974609375,
0.015655517578125,
-0.039520263671875,
0.0224761962890625,
-0.045074462890625,
-0.018310546875,
0.020355224609375,
-0.004306793212890625,
-0.0201568603515625,
-0.01129913330078125,
0.045928955078125,
-0.061981201171875,
-0.003620147705078125,
0.033538818359375,
0.009124755859375,
-0.046539306640625,
0.034515380859375,
-0.0088958740234375,
-0.044342041015625,
0.0015411376953125,
-0.0450439453125,
0.0404052734375,
-0.01071929931640625,
0.035980224609375,
0.01302337646484375,
0.016815185546875,
0.019989013671875,
-0.016876220703125,
0.0016794204711914062,
-0.0003883838653564453,
-0.005916595458984375,
0.028472900390625,
-0.0123443603515625,
0.0228271484375,
-0.0201568603515625,
-0.00882720947265625,
0.00693511962890625,
0.0304718017578125,
-0.0175628662109375,
0.00949859619140625,
0.00934600830078125,
0.037811279296875,
0.038848876953125,
-0.0247344970703125,
0.1019287109375,
-0.018768310546875,
-0.032318115234375,
-0.02496337890625,
-0.0192108154296875,
0.005130767822265625,
-0.026947021484375,
-0.004329681396484375,
0.0147705078125,
0.042083740234375,
0.0014543533325195312,
-0.00032019615173339844,
-0.02264404296875,
0.0262451171875,
0.03179931640625,
-0.0181884765625,
0.0638427734375,
-0.0028285980224609375,
-0.008056640625,
0.0022563934326171875,
0.0170135498046875,
0.0291748046875,
-0.0283660888671875,
0.0211944580078125,
0.0194091796875,
-0.004489898681640625,
-0.0012063980102539062,
0.02142333984375,
0.07281494140625,
0.01323699951171875,
-0.01546478271484375,
0.0245513916015625,
0.025238037109375,
0.005855560302734375,
-0.042083740234375,
-0.016632080078125,
-0.044189453125,
-0.004444122314453125,
0.01416015625,
0.0023708343505859375,
0.024871826171875,
-0.0240478515625,
0.0286407470703125,
0.018585205078125,
0.037261962890625,
0.0019626617431640625,
-0.01171112060546875,
0.04266357421875,
0.0090789794921875,
0.07965087890625,
0.059722900390625,
-0.025543212890625,
-0.021636962890625,
0.034912109375,
-0.034881591796875,
0.017242431640625,
0.04046630859375,
-0.0172882080078125,
0.0247344970703125,
-0.004596710205078125,
-0.024200439453125,
0.01153564453125,
-0.004322052001953125,
0.005321502685546875,
0.0309600830078125,
0.005153656005859375,
0.0024509429931640625,
-0.06256103515625,
-0.03472900390625,
-0.0311737060546875,
0.01318359375,
0.01446533203125,
0.0855712890625,
-0.00733184814453125,
0.0232696533203125,
-0.053131103515625,
0.0206756591796875,
-0.036346435546875,
-0.045989990234375,
0.0552978515625,
0.01313018798828125,
-0.0233612060546875,
-0.00899505615234375,
0.00981903076171875,
0.03631591796875,
0.0059967041015625,
-0.015533447265625,
0.01377105712890625,
-0.0127716064453125,
0.01145172119140625,
0.0140533447265625,
-0.0019140243530273438,
-0.0301971435546875,
0.005344390869140625,
0.01358795166015625,
-0.0220184326171875,
0.0160369873046875,
-0.00225067138671875,
0.0251922607421875,
0.06463623046875,
-0.05828857421875,
0.050872802734375,
0.0222930908203125,
-0.0318603515625,
0.0184326171875,
0.0275726318359375,
-0.09930419921875,
0.005527496337890625,
0.016876220703125,
-0.018096923828125,
0.0261077880859375,
0.005870819091796875,
-0.004093170166015625,
0.0163421630859375,
0.00011491775512695312,
-0.0018014907836914062,
0.0199127197265625,
0.0557861328125,
-0.00689697265625,
0.02783203125,
-0.0036602020263671875,
0.0021533966064453125,
0.0086669921875,
-0.0037593841552734375,
-0.023834228515625,
-0.02850341796875,
0.00832366943359375,
-0.002872467041015625,
0.012542724609375,
-0.022857666015625,
-0.00963592529296875,
-0.00864410400390625,
0.021820068359375,
0.0074920654296875,
-0.0615234375,
0.0081634521484375,
-0.01404571533203125,
0.052215576171875,
-0.028594970703125,
0.022125244140625,
-0.0091400146484375,
0.021240234375,
-0.05328369140625,
-0.0452880859375,
-0.03790283203125,
0.032867431640625,
-0.05426025390625,
0.03253173828125,
0.055389404296875,
-0.035064697265625,
-0.037933349609375,
0.05126953125,
0.026611328125,
0.095703125,
0.008880615234375,
-0.025299072265625,
0.01308441162109375,
-0.00402069091796875,
0.01080322265625,
-0.0379638671875,
0.00653076171875,
-0.06732177734375,
0.00885772705078125,
-0.01148223876953125,
0.0035152435302734375,
0.002685546875,
-0.04608154296875,
-0.08990478515625,
0.006439208984375,
0.0041961669921875,
-0.03265380859375,
0.00006365776062011719,
0.04534912109375,
0.0124359130859375,
-0.0301513671875,
-0.0019502639770507812,
-0.035400390625,
0.0024127960205078125,
-0.0057373046875,
-0.01094818115234375,
0.006084442138671875,
-0.0035457611083984375,
-0.0023193359375,
-0.05999755859375,
0.0004363059997558594,
0.008758544921875,
-0.0222320556640625,
-0.004638671875,
-0.01177215576171875,
0.01617431640625,
0.030426025390625,
-0.035400390625,
-0.05816650390625,
-0.00041484832763671875,
-0.02008056640625,
-0.01294708251953125,
-0.01009368896484375,
-0.01445770263671875,
-0.00034046173095703125,
0.022369384765625,
0.054046630859375,
0.0011386871337890625,
-0.036468505859375,
0.027099609375,
0.034454345703125,
-0.0195159912109375,
-0.0239410400390625,
0.029937744140625,
-0.0482177734375,
-0.040863037109375,
-0.0178070068359375,
0.00684356689453125,
-0.02911376953125,
-0.024078369140625,
0.00037860870361328125,
-0.032562255859375,
0.00667572021484375,
-0.01097869873046875,
0.0484619140625,
-0.01593017578125,
0.09954833984375,
-0.0567626953125,
-0.0006594657897949219,
0.0240325927734375,
0.016571044921875,
0.040313720703125,
0.022125244140625,
-0.009613037109375,
0.00612640380859375,
-0.00485992431640625,
0.018524169921875,
0.0159759521484375,
0.0287017822265625,
-0.00591278076171875,
-0.0045166015625,
0.01007080078125,
0.00945281982421875,
-0.01416778564453125,
-0.00893402099609375,
-0.0258026123046875,
0.0362548828125,
-0.027923583984375,
0.040771484375,
-0.039520263671875,
-0.02410888671875,
-0.037689208984375,
0.020111083984375,
0.01525115966796875,
-0.006626129150390625,
0.08184814453125,
-0.032684326171875,
-0.0009713172912597656,
0.0219268798828125,
-0.037200927734375,
-0.042816162109375,
0.03497314453125,
0.0267791748046875,
-0.003810882568359375,
0.0226287841796875
] |
3b138475ecfab69135dd6bd1ac92b114bab56242
|
Wordpress Stackexchange
Q: Specific upload folder for PDFs in custom Post type in WP multisite I need to filter uploads to a specific folder for a custom-post type called "document" only for PDFs.
So far, I have:
function custom_upload_directory( $args ) {
$base_directory = '/home/xxx/my_uploadfolder';
$base_url = 'http://xxxx/wp-content/uploads/my_uploadfolder';
$id = $_REQUEST['post_id'];
$parent = get_post( $id )->post_parent;
// Check the post-type of the current post
if( "document" == get_post_type( $id ) || "document" == get_post_type( $parent ) ) {
$args['path'] = $base_directory;
$args['url'] = $base_url;
$args['basedir'] = $base_directory;
$args['baseurl'] = $base_url;
}
return $args;
}
add_filter( 'upload_dir', 'custom_upload_directory' );
It works, but with some problems: : any kind of file is redirected in my_uploadfolder. Also, I can't delete these files from WP admin once there. Can somebody help?
A: you might consider using
if(get_post_mime_type($id) == 'application/pdf'){
...
}
to check for pdf files.
http://codex.wordpress.org/Function_Reference/get_post_mime_type
You might also take a look at the code behind the wp_delete_attachment() function and you can hook into it with the delete attachment action. To remove the files you can use unlink()
http://php.net/manual/en/function.unlink.php
|
Q: Specific upload folder for PDFs in custom Post type in WP multisite I need to filter uploads to a specific folder for a custom-post type called "document" only for PDFs.
So far, I have:
function custom_upload_directory( $args ) {
$base_directory = '/home/xxx/my_uploadfolder';
$base_url = 'http://xxxx/wp-content/uploads/my_uploadfolder';
$id = $_REQUEST['post_id'];
$parent = get_post( $id )->post_parent;
// Check the post-type of the current post
if( "document" == get_post_type( $id ) || "document" == get_post_type( $parent ) ) {
$args['path'] = $base_directory;
$args['url'] = $base_url;
$args['basedir'] = $base_directory;
$args['baseurl'] = $base_url;
}
return $args;
}
add_filter( 'upload_dir', 'custom_upload_directory' );
It works, but with some problems: : any kind of file is redirected in my_uploadfolder. Also, I can't delete these files from WP admin once there. Can somebody help?
A: you might consider using
if(get_post_mime_type($id) == 'application/pdf'){
...
}
to check for pdf files.
http://codex.wordpress.org/Function_Reference/get_post_mime_type
You might also take a look at the code behind the wp_delete_attachment() function and you can hook into it with the delete attachment action. To remove the files you can use unlink()
http://php.net/manual/en/function.unlink.php
A: The reason you're having trouble here is that you're applying a universal filter to upload_dir. Rather than doing this, use a conditional filter for upload_dir after first checking ['mime-type'] for application/pdf. You need to intercept the upload process at the wp_handle_upload action hook and alter the upload folder there. What you have posted is heading in the right direction, but you need to be working with the incoming $_POST data and applying the filter there by searching for uploading files ['mime-type'] which WordPress stores during the upload process.
A: I know this was 10 years ago but just incase someone is looking for code that works this will make a pdf folder in your uploads and put all pdf there so yourl will be siteurl/wp-content/uploads/pdf/filename.pdf
function custom_upload_directory( $args ) {
// Check if the uploaded file is a PDF
if ( ! empty( $_FILES['async-upload']['type'] ) && $_FILES['async-upload']['type'] === 'application/pdf' ) {
// Define the custom folder path
$custom_folder = WP_CONTENT_DIR . '/uploads/pdf/';
$custom_url = WP_CONTENT_URL . '/uploads/pdf/';
// Add the file name to the custom folder path
$file_name = $_FILES['async-upload']['name'];
$custom_folder = $custom_folder . $file_name;
$custom_url = $custom_url . $file_name;
$args['path'] = dirname($custom_folder);
$args['url'] = dirname($custom_url);
$args['basedir'] = dirname($custom_folder);
$args['baseurl'] = dirname($custom_url);
}
return $args;
}
add_filter( 'upload_dir', 'custom_upload_directory' );
|
wordpress
|
{
"language": "en",
"length": 385,
"provenance": "stackexchange_00019.jsonl.gz:428524",
"question_score": "14",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83933"
}
|
[
0.041046142578125,
0.00739288330078125,
-0.012725830078125,
-0.01171112060546875,
0.01418304443359375,
-0.039093017578125,
0.058929443359375,
-0.032806396484375,
0.0005369186401367188,
0.03076171875,
0.03173828125,
-0.01393890380859375,
0.012847900390625,
-0.051361083984375,
0.007083892822265625,
0.003170013427734375,
0.02508544921875,
0.0162811279296875,
0.06365966796875,
-0.006481170654296875,
-0.00130462646484375,
0.03387451171875,
0.053619384765625,
-0.022064208984375,
-0.0220184326171875,
0.046356201171875,
0.041168212890625,
-0.004871368408203125,
-0.03900146484375,
-0.046722412109375,
0.0054473876953125,
0.039398193359375,
0.004119873046875,
0.02276611328125,
-0.004810333251953125,
0.0179290771484375,
0.004299163818359375,
0.0164642333984375,
0.016448974609375,
0.0159149169921875,
0.0190887451171875,
-0.01058197021484375,
-0.0009255409240722656,
-0.033447265625,
-0.01268768310546875,
-0.018035888671875,
0.022979736328125,
-0.0132904052734375,
0.033905029296875,
0.054290771484375,
-0.01154327392578125,
-0.0255126953125,
-0.01328277587890625,
-0.01549530029296875,
-0.0183868408203125,
-0.04144287109375,
0.0026702880859375,
0.03985595703125,
0.0280303955078125,
-0.03814697265625,
-0.054595947265625,
0.0158538818359375,
0.0233917236328125,
0.0052947998046875,
-0.0246734619140625,
0.0163726806640625,
-0.0312042236328125,
0.00907135009765625,
-0.062744140625,
-0.049530029296875,
0.0183563232421875,
-0.049652099609375,
0.01328277587890625,
-0.047271728515625,
-0.006664276123046875,
0.0232696533203125,
-0.001873016357421875,
-0.00785064697265625,
-0.0008168220520019531,
-0.0232086181640625,
0.0214080810546875,
-0.03118896484375,
-0.055206298828125,
0.0184783935546875,
0.014984130859375,
0.05255126953125,
0.003932952880859375,
-0.037322998046875,
-0.0297393798828125,
0.0209808349609375,
-0.0288543701171875,
-0.0091094970703125,
0.02447509765625,
-0.0045928955078125,
-0.03729248046875,
0.00966644287109375,
0.031463623046875,
0.0282135009765625,
0.0164031982421875,
0.0198822021484375,
0.005573272705078125,
-0.045867919921875,
0.0218048095703125,
-0.033477783203125,
0.0260772705078125,
0.046478271484375,
0.0007824897766113281,
-0.044677734375,
0.01708984375,
0.00030112266540527344,
0.0063018798828125,
0.019561767578125,
0.0012521743774414062,
-0.02484130859375,
-0.0113067626953125,
0.00890350341796875,
-0.029815673828125,
0.01556396484375,
0.01100921630859375,
-0.002017974853515625,
-0.00716400146484375,
0.016387939453125,
0.025604248046875,
-0.055450439453125,
0.00533294677734375,
-0.011962890625,
-0.0222625732421875,
-0.04461669921875,
0.0234832763671875,
0.054840087890625,
-0.069091796875,
-0.002864837646484375,
0.041290283203125,
-0.016937255859375,
0.00942230224609375,
-0.029205322265625,
0.0277099609375,
0.016448974609375,
0.01270294189453125,
-0.0003387928009033203,
0.0478515625,
-0.0140228271484375,
-0.0158233642578125,
0.04071044921875,
-0.0240631103515625,
0.04913330078125,
0.0289764404296875,
-0.01116180419921875,
-0.037689208984375,
-0.060943603515625,
-0.0303802490234375,
0.0065155029296875,
0.07916259765625,
-0.02032470703125,
-0.031707763671875,
-0.0655517578125,
0.048370361328125,
-0.068603515625,
-0.020904541015625,
-0.08660888671875,
0.046234130859375,
-0.01555633544921875,
-0.00681304931640625,
-0.01456451416015625,
-0.0301666259765625,
0.019561767578125,
-0.07061767578125,
-0.018157958984375,
0.0245361328125,
-0.0019092559814453125,
0.0190887451171875,
-0.047576904296875,
-0.004726409912109375,
0.0088348388671875,
0.003314971923828125,
0.040802001953125,
-0.00005698204040527344,
0.03564453125,
0.016387939453125,
0.0311431884765625,
-0.00801849365234375,
-0.0257415771484375,
0.07489013671875,
-0.006511688232421875,
-0.05438232421875,
-0.002166748046875,
0.0277099609375,
0.04217529296875,
-0.0093841552734375,
0.0211181640625,
0.07318115234375,
0.012908935546875,
-0.00940704345703125,
-0.025634765625,
-0.021392822265625,
-0.01200103759765625,
-0.01523590087890625,
-0.01317596435546875,
-0.007747650146484375,
0.048736572265625,
-0.017425537109375,
0.0005936622619628906,
0.0280914306640625,
-0.002864837646484375,
0.027923583984375,
0.0035343170166015625,
-0.0019216537475585938,
0.03192138671875,
-0.0313720703125,
0.0164031982421875,
0.039794921875,
0.018463134765625,
-0.047515869140625,
-0.0020046234130859375,
-0.0012569427490234375,
0.0200042724609375,
0.031768798828125,
0.00850677490234375,
-0.0014944076538085938,
0.030853271484375,
-0.0362548828125,
-0.00036644935607910156,
-0.060516357421875,
0.008087158203125,
0.0287628173828125,
0.02880859375,
-0.01265716552734375,
0.01529693603515625,
0.0640869140625,
0.03936767578125,
0.0026073455810546875,
-0.0175933837890625,
-0.007343292236328125,
-0.0222930908203125,
-0.04742431640625,
-0.01470947265625,
-0.0171051025390625,
-0.067626953125,
0.007343292236328125,
0.06427001953125,
0.020721435546875,
0.03643798828125,
0.0033054351806640625,
0.032470703125,
0.05670166015625,
-0.0167388916015625,
0.004077911376953125,
0.0017566680908203125,
-0.0077972412109375,
0.0322265625,
-0.01045989990234375,
0.0226593017578125,
0.0158233642578125,
-0.01995849609375,
0.00951385498046875,
0.038177490234375,
-0.0033416748046875,
-0.0264129638671875,
0.0113677978515625,
0.0189971923828125,
0.0008959770202636719,
0.00797271728515625,
-0.022552490234375,
0.01030731201171875,
0.024444580078125,
0.0018548965454101562,
0.04547119140625,
0.0290069580078125,
-0.024078369140625,
-0.00408172607421875,
0.0136871337890625,
0.008880615234375,
0.0027484893798828125,
0.0214080810546875,
0.0770263671875,
-0.00441741943359375,
-0.0217742919921875,
-0.03375244140625,
0.042999267578125,
0.0118255615234375,
-0.0192108154296875,
0.0234222412109375,
-0.034942626953125,
-0.00783538818359375,
-0.02435302734375,
-0.041900634765625,
0.01148223876953125,
0.00792694091796875,
-0.002716064453125,
-0.010009765625,
0.00911712646484375,
0.032623291015625,
-0.0166168212890625,
0.0258026123046875,
0.035064697265625,
-0.0190582275390625,
0.049774169921875,
-0.03173828125,
0.042724609375,
-0.033447265625,
0.0184173583984375,
0.05523681640625,
-0.01309967041015625,
0.01226806640625,
0.0191497802734375,
0.01210784912109375,
0.0248565673828125,
0.0174713134765625,
0.0080108642578125,
-0.01371002197265625,
-0.0269927978515625,
-0.0091400146484375,
-0.00606536865234375,
-0.028594970703125,
0.005580902099609375,
-0.0241546630859375,
-0.00923919677734375,
-0.01885986328125,
-0.08489990234375,
-0.06304931640625,
0.0626220703125,
-0.0640869140625,
0.022491455078125,
-0.00652313232421875,
-0.03631591796875,
-0.047882080078125,
0.0294189453125,
-0.0034122467041015625,
-0.0067291259765625,
0.0059661865234375,
-0.000820159912109375,
-0.00855255126953125,
-0.04595947265625,
-0.015228271484375,
0.01800537109375,
0.0005612373352050781,
0.004070281982421875,
0.0599365234375,
-0.0032939910888671875,
-0.044464111328125,
-0.004024505615234375,
0.03436279296875,
0.0019626617431640625,
0.013153076171875,
0.0202178955078125,
-0.0230865478515625,
0.00983428955078125,
-0.00934600830078125,
0.0472412109375,
0.035064697265625,
-0.041290283203125,
-0.00873565673828125,
-0.01441192626953125,
-0.0030975341796875,
-0.0222015380859375,
0.00960540771484375,
0.019989013671875,
-0.0367431640625,
-0.044219970703125,
-0.06964111328125,
0.0222015380859375,
-0.01203155517578125,
0.0004494190216064453,
0.0237274169921875,
-0.0214080810546875,
-0.0127410888671875,
-0.004184722900390625,
0.048095703125,
0.03509521484375,
0.045928955078125,
-0.022796630859375,
0.005977630615234375,
0.0312347412109375,
0.006839752197265625,
0.04522705078125,
-0.022369384765625,
0.06195068359375,
0.0006923675537109375,
0.0110321044921875,
0.037567138671875,
-0.003253936767578125,
-0.01207733154296875,
-0.0287628173828125,
-0.058380126953125,
-0.07586669921875,
0.0447998046875,
-0.054901123046875,
0.0066070556640625,
-0.04876708984375,
-0.0238800048828125,
0.01064300537109375,
0.11224365234375,
-0.0301361083984375,
-0.013092041015625,
-0.0416259765625,
0.00701141357421875,
-0.00010478496551513672,
-0.0582275390625,
-0.0006766319274902344,
0.01119232177734375,
-0.040008544921875,
0.0125579833984375,
0.0158538818359375,
-0.0201263427734375,
-0.00608062744140625,
-0.028594970703125,
-0.052276611328125,
-0.0289306640625,
0.040740966796875,
-0.0256195068359375,
0.0239410400390625,
0.01751708984375,
0.019195556640625,
-0.016998291015625,
-0.020263671875,
-0.032958984375,
-0.07403564453125,
-0.010833740234375,
-0.007061004638671875,
0.0396728515625,
0.00313568115234375,
0.0110931396484375,
-0.005352020263671875,
0.06842041015625,
0.0283203125,
-0.00786590576171875,
-0.021820068359375,
-0.03778076171875,
-0.0093994140625,
0.0012569427490234375,
-0.0175018310546875,
-0.02294921875,
0.0152740478515625,
-0.022430419921875,
-0.051116943359375,
-0.0244140625,
-0.023590087890625,
0.0105438232421875,
0.007808685302734375,
-0.02496337890625,
-0.00836181640625,
-0.0214691162109375,
-0.078125,
0.022857666015625,
-0.046905517578125,
-0.0162506103515625,
-0.045196533203125,
-0.06280517578125,
0.05426025390625,
0.01290130615234375,
-0.01448822021484375,
-0.0030612945556640625,
0.061737060546875,
0.00867462158203125,
-0.033416748046875,
-0.06622314453125,
0.00205230712890625,
0.0296173095703125,
-0.015228271484375,
0.051971435546875,
0.041259765625,
-0.0081024169921875,
0.03704833984375,
-0.0033702850341796875,
-0.0002803802490234375,
-0.0287933349609375,
0.09320068359375,
-0.0129852294921875,
-0.0298004150390625,
0.028564453125,
-0.039581298828125,
0.01198577880859375,
-0.005069732666015625,
-0.004817962646484375,
-0.0191802978515625,
0.0166778564453125,
0.03582763671875,
0.0017232894897460938,
-0.0014600753784179688,
-0.031341552734375,
-0.04058837890625,
0.0004353523254394531,
-0.0052490234375,
0.040496826171875,
0.03424072265625,
-0.0181884765625,
0.05535888671875,
0.0309600830078125,
0.0163726806640625,
0.017547607421875,
0.0489501953125,
-0.0084381103515625,
0.04669189453125,
0.02532958984375,
0.002841949462890625,
-0.016204833984375,
-0.0026073455810546875,
0.01486968994140625,
0.0014171600341796875,
-0.01129150390625,
-0.0199127197265625,
-0.00241851806640625,
0.003963470458984375,
-0.00913238525390625,
-0.00272369384765625,
0.023956298828125,
0.000048041343688964844,
-0.03668212890625,
-0.01480865478515625,
-0.0238189697265625,
-0.01235198974609375,
-0.054901123046875,
0.00823974609375,
-0.0032596588134765625,
-0.019378662109375,
0.001491546630859375,
0.01076507568359375,
-0.017364501953125,
0.0039043426513671875,
-0.002628326416015625,
0.04254150390625,
0.069580078125,
0.01076507568359375,
0.0079345703125,
0.0193634033203125,
-0.0199127197265625,
0.0003414154052734375,
-0.0011949539184570312,
-0.0595703125,
-0.01271820068359375,
-0.002716064453125,
0.07342529296875,
-0.0156402587890625,
-0.032135009765625,
0.0275115966796875,
-0.04742431640625,
-0.01091766357421875,
-0.01019287109375,
0.00218963623046875,
-0.01385498046875,
0.01239776611328125,
0.0163421630859375,
-0.007709503173828125,
0.01025390625,
-0.033203125,
0.0208740234375,
-0.037384033203125,
-0.004756927490234375,
0.050689697265625,
-0.06182861328125,
0.0052947998046875,
0.0158233642578125,
-0.0134429931640625,
-0.00885772705078125,
0.01000213623046875,
-0.06011962890625,
-0.0294189453125,
-0.016143798828125,
-0.00592041015625,
0.036346435546875,
-0.0011758804321289062,
0.0072479248046875,
-0.026336669921875,
-0.006450653076171875,
-0.0277557373046875,
0.01367950439453125,
0.031707763671875,
-0.0039043426513671875,
-0.03631591796875,
-0.01241302490234375,
-0.039520263671875,
-0.0207977294921875,
-0.0245513916015625,
-0.030029296875,
-0.0302276611328125,
-0.0064849853515625,
-0.035369873046875,
0.023681640625,
0.003231048583984375,
0.038482666015625,
0.0061187744140625,
0.0143890380859375,
-0.0238800048828125,
0.023712158203125,
-0.00057220458984375,
0.0209197998046875,
0.01218414306640625,
0.027130126953125,
0.01523590087890625,
0.01543426513671875,
0.0038623809814453125,
-0.030303955078125,
-0.01806640625,
-0.060638427734375,
0.0218658447265625,
-0.002864837646484375,
0.0245819091796875,
0.029510498046875,
0.009002685546875,
0.0210723876953125,
-0.0178375244140625,
-0.006229400634765625,
-0.01557159423828125,
-0.033843994140625,
0.017486572265625,
0.00738525390625,
0.036865234375,
-0.07318115234375,
-0.0306396484375,
0.006175994873046875,
0.025970458984375,
0.006435394287109375,
0.0194549560546875,
-0.0235443115234375,
0.004184722900390625,
0.032562255859375,
-0.0000883340835571289,
0.0248870849609375,
0.01364898681640625,
-0.01157379150390625,
0.0237884521484375,
0.018707275390625,
0.028167724609375,
0.0173492431640625,
-0.0008115768432617188,
0.0159149169921875,
0.00373077392578125,
0.05767822265625,
-0.00940704345703125,
-0.01561737060546875,
0.040435791015625,
-0.0196990966796875,
0.01274871826171875,
0.03509521484375,
0.061279296875,
-0.052093505859375,
0.00737762451171875,
0.008941650390625,
-0.006031036376953125,
0.04937744140625,
-0.01082611083984375,
0.003421783447265625,
0.00627899169921875,
0.0318603515625,
-0.003795623779296875,
-0.0289459228515625,
0.01666259765625,
0.00852203369140625,
-0.0003857612609863281,
0.00116729736328125,
0.018310546875,
-0.0003337860107421875,
-0.0285797119140625,
-0.0516357421875,
0.0221099853515625,
-0.048126220703125,
-0.007640838623046875,
0.005977630615234375,
-0.0203094482421875,
-0.0140380859375,
-0.0533447265625,
-0.01068878173828125,
-0.026641845703125,
-0.01165771484375,
0.0082855224609375,
-0.0146026611328125,
0.06671142578125,
0.058502197265625,
0.0027751922607421875,
-0.019195556640625,
0.04144287109375,
-0.02484130859375,
-0.07452392578125,
-0.0285797119140625,
0.012786865234375,
0.0135345458984375,
-0.06103515625,
0.041168212890625,
-0.04931640625,
-0.0150909423828125,
0.0092620849609375,
0.00984954833984375,
0.0293426513671875,
-0.078857421875,
0.018646240234375,
0.04730224609375,
0.050018310546875,
-0.01247406005859375,
0.020172119140625,
0.01125335693359375,
-0.0701904296875,
-0.055389404296875,
0.0151214599609375,
-0.07464599609375,
-0.0160980224609375,
0.0225677490234375,
-0.0841064453125,
0.0760498046875,
-0.00897216796875,
0.0709228515625,
0.01568603515625,
0.00934600830078125,
-0.0175933837890625,
-0.0114898681640625,
-0.027923583984375,
0.039886474609375,
0.039886474609375,
-0.0204620361328125,
-0.0335693359375,
0.0047454833984375,
-0.023223876953125,
0.029449462890625,
0.052154541015625,
0.00133514404296875,
-0.0190582275390625,
0.005039215087890625,
0.06689453125,
0.06787109375,
0.017242431640625,
0.00998687744140625,
-0.005374908447265625,
-0.01302337646484375,
-0.0016775131225585938,
-0.0194549560546875,
0.007083892822265625,
-0.0008320808410644531,
-0.037445068359375,
0.0283050537109375,
0.008819580078125,
0.01351165771484375,
-0.01303863525390625,
0.0010528564453125,
-0.01849365234375,
-0.0188140869140625,
0.0219573974609375,
-0.02569580078125,
0.00868988037109375,
0.04681396484375,
0.07073974609375,
-0.077392578125,
-0.0033321380615234375,
-0.0257415771484375,
0.0611572265625,
0.0022792816162109375,
0.0108184814453125,
0.010955810546875,
0.0029277801513671875,
0.006687164306640625,
-0.010498046875,
-0.01201629638671875,
0.01306915283203125,
-0.0020618438720703125,
0.0278472900390625,
-0.004283905029296875,
0.009307861328125,
-0.03277587890625,
0.04681396484375,
0.0269317626953125,
0.01395416259765625,
-0.058319091796875,
-0.05596923828125,
0.01959228515625,
-0.007595062255859375,
-0.011199951171875,
0.0195465087890625,
0.0076751708984375,
-0.0184478759765625,
0.0158233642578125,
-0.057861328125,
-0.0021610260009765625,
0.0248870849609375,
0.053375244140625,
-0.017181396484375,
-0.03472900390625,
-0.036834716796875,
-0.04791259765625,
-0.025177001953125,
0.0211944580078125,
0.011138916015625,
-0.0174713134765625,
-0.0306549072265625,
0.04742431640625,
0.043548583984375,
0.016204833984375,
0.00014698505401611328,
0.04022216796875,
-0.037261962890625,
0.015655517578125,
-0.060089111328125,
-0.09185791015625,
0.0204620361328125,
0.053955078125,
0.051788330078125,
0.00897979736328125,
0.0278778076171875,
-0.01262664794921875,
-0.005664825439453125,
0.01311492919921875,
-0.0266265869140625,
-0.027862548828125,
0.0012826919555664062,
-0.040191650390625,
0.0020771026611328125,
0.007122039794921875,
-0.0150146484375,
-0.0056610107421875,
-0.0241851806640625,
0.044708251953125,
-0.0207672119140625,
0.039337158203125,
-0.00879669189453125,
-0.037506103515625,
0.05126953125,
-0.006229400634765625,
0.08477783203125,
-0.0031070709228515625,
-0.060150146484375,
0.004947662353515625,
-0.049530029296875,
-0.033050537109375,
0.0176849365234375,
0.035614013671875,
0.0033740997314453125,
-0.0027561187744140625,
-0.00020647048950195312,
-0.0264434814453125,
0.00006270408630371094,
0.025421142578125,
0.004962921142578125,
0.0340576171875,
0.019561767578125,
0.01366424560546875,
-0.0132904052734375,
0.0018053054809570312,
0.02984619140625,
0.01396942138671875,
-0.012237548828125,
0.07769775390625,
-0.027679443359375,
-0.01074981689453125,
-0.004764556884765625,
0.06805419921875,
-0.0643310546875,
-0.0181884765625,
0.04974365234375,
0.002353668212890625,
0.0159149169921875,
-0.00994110107421875,
0.021453857421875,
-0.0170440673828125,
0.032012939453125,
-0.060699462890625,
-0.0361328125,
-0.0143280029296875,
0.0309600830078125,
0.0196075439453125,
0.025115966796875,
-0.021453857421875,
-0.0007147789001464844,
-0.03778076171875,
-0.038055419921875,
0.060577392578125,
0.040191650390625,
-0.005817413330078125,
0.039154052734375,
0.0159149169921875,
-0.01702880859375,
0.05242919921875,
-0.043365478515625,
0.09100341796875,
0.043609619140625,
-0.034271240234375,
-0.056976318359375,
-0.0253448486328125,
-0.00946044921875,
-0.028594970703125,
0.004871368408203125,
0.0343017578125,
-0.0013437271118164062,
-0.0330810546875,
-0.05303955078125,
-0.0232391357421875,
-0.00682830810546875,
-0.026885986328125,
-0.001495361328125,
-0.007747650146484375,
-0.01751708984375,
-0.0081787109375,
-0.03253173828125,
-0.00421905517578125,
-0.028167724609375,
-0.0092315673828125,
0.0193939208984375,
0.0035552978515625,
-0.004566192626953125,
-0.0058441162109375,
0.0032100677490234375,
0.054595947265625,
0.032379150390625,
-0.08209228515625,
0.057891845703125,
-0.0227508544921875,
-0.006092071533203125,
0.0287322998046875,
0.034912109375,
-0.038818359375,
0.0165863037109375,
0.0017938613891601562,
-0.0584716796875,
-0.035003662109375,
0.09881591796875,
-0.022613525390625,
-0.0139007568359375,
0.0085601806640625,
-0.01454925537109375,
-0.0211334228515625,
0.01000213623046875,
0.0106658935546875,
0.051544189453125,
0.0174713134765625,
-0.0234527587890625,
-0.0213470458984375,
-0.00791168212890625,
-0.01678466796875,
-0.00998687744140625,
0.0264739990234375,
-0.02655029296875,
-0.0440673828125,
0.0218353271484375,
0.00010633468627929688,
0.0176544189453125,
-0.035797119140625,
-0.0672607421875,
0.053802490234375,
-0.0015630722045898438,
-0.041107177734375,
-0.0178070068359375,
0.019805908203125,
6.556510925292969e-7,
0.0194244384765625,
0.0014867782592773438,
-0.02764892578125,
-0.01351165771484375,
0.0029811859130859375,
0.007781982421875,
0.0050048828125,
-0.001018524169921875,
0.038177490234375,
-0.026458740234375,
0.041534423828125,
0.0291748046875,
-0.02020263671875,
0.0242919921875,
-0.0306243896484375,
0.0814208984375,
0.073974609375,
0.01007080078125,
0.0494384765625,
0.015411376953125,
-0.083740234375,
-0.0086517333984375,
-0.006298065185546875,
-0.047393798828125,
-0.01001739501953125,
0.039337158203125,
0.10308837890625,
0.016571044921875,
-0.00931549072265625,
-0.00977325439453125,
-0.011932373046875,
-0.0279541015625,
0.006549835205078125,
0.0163421630859375,
-0.0304412841796875,
0.012115478515625,
-0.0029888153076171875,
0.005397796630859375,
-0.02313232421875,
0.01166534423828125,
-0.018402099609375,
-0.021942138671875,
-0.0003457069396972656,
-0.0189056396484375,
-0.01509857177734375,
0.028961181640625,
0.03692626953125,
-0.01531982421875,
0.0323486328125,
-0.0228271484375,
0.003875732421875,
0.03363037109375,
0.00994110107421875,
0.0159149169921875,
0.0242767333984375,
-0.044097900390625,
-0.005123138427734375,
0.01708984375,
-0.046234130859375,
-0.0079345703125,
-0.00958251953125,
-0.007740020751953125,
-0.009033203125,
0.0007147789001464844,
-0.0294189453125,
0.0032806396484375,
0.008575439453125,
-0.0122833251953125,
0.0479736328125,
0.000301361083984375,
-0.007843017578125,
-0.0333251953125,
0.0231475830078125,
0.03961181640625,
-0.02069091796875,
0.06964111328125,
-0.025604248046875,
-0.00435638427734375,
-0.004974365234375,
-0.021087646484375,
-0.05535888671875,
0.027801513671875,
-0.0261383056640625,
0.01148223876953125,
0.0215911865234375
] |
57f1fcd4601d164cabde7c85584a10516dc40d1c
|
Wordpress Stackexchange
Q: Why is our post editor stuck at cols=40? We recently upgrade Wordpress and it appears that our post editor is a very narrow textarea. Its stuck at 40 characters wide. Its very challenging to work with. More specifically its stuck with these properties:
<textarea class="wp-editor-area" style="height: 360px" cols="40" name="content" id="content">
There doesn't appear to be any ability to drag to widen the textarea. Moreover, there is a giant wasted dead space to the right of the editor control.
I can't imagine what we could have done to cause this? I'd like to make posting blog articles easier, and the narrow editor makes it a bit painful to use.
A: You can use the following (mu-)plugin to change the height. You just need to adjust the height as you need it.
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Plugin Name: (#83974) WCM TinyMCE height
*/
add_filter( 'the_editor', 'wpse83974_tinymce_height' );
function wpse83974_tinymce_height( $html )
{
return str_replace(
array( 'cols="40"', ' style="height: 360' )
,array( 'cols="400"', ' style="height: 3600' )
,$html
);
}
|
Q: Why is our post editor stuck at cols=40? We recently upgrade Wordpress and it appears that our post editor is a very narrow textarea. Its stuck at 40 characters wide. Its very challenging to work with. More specifically its stuck with these properties:
<textarea class="wp-editor-area" style="height: 360px" cols="40" name="content" id="content">
There doesn't appear to be any ability to drag to widen the textarea. Moreover, there is a giant wasted dead space to the right of the editor control.
I can't imagine what we could have done to cause this? I'd like to make posting blog articles easier, and the narrow editor makes it a bit painful to use.
A: You can use the following (mu-)plugin to change the height. You just need to adjust the height as you need it.
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Plugin Name: (#83974) WCM TinyMCE height
*/
add_filter( 'the_editor', 'wpse83974_tinymce_height' );
function wpse83974_tinymce_height( $html )
{
return str_replace(
array( 'cols="40"', ' style="height: 360' )
,array( 'cols="400"', ' style="height: 3600' )
,$html
);
}
|
wordpress
|
{
"language": "en",
"length": 172,
"provenance": "stackexchange_00019.jsonl.gz:428535",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83974"
}
|
[
-0.06329345703125,
-0.02691650390625,
-0.07281494140625,
0.053680419921875,
-0.0277862548828125,
-0.041656494140625,
0.0112457275390625,
0.00127410888671875,
0.054229736328125,
0.0272674560546875,
-0.0100860595703125,
-0.0161590576171875,
0.0304107666015625,
-0.036102294921875,
-0.0299224853515625,
0.00341033935546875,
0.026214599609375,
0.0106964111328125,
0.0193634033203125,
-0.01511383056640625,
-0.0038013458251953125,
0.0288543701171875,
0.0019073486328125,
0.04473876953125,
-0.007965087890625,
0.05096435546875,
0.07769775390625,
-0.037139892578125,
-0.006526947021484375,
-0.02471923828125,
0.01195526123046875,
-0.0111236572265625,
0.04052734375,
0.0460205078125,
-0.0736083984375,
0.0268096923828125,
0.027862548828125,
0.0021533966064453125,
-0.0236053466796875,
0.051361083984375,
0.0352783203125,
-0.003932952880859375,
0.01367950439453125,
0.00925445556640625,
0.0005555152893066406,
-0.0648193359375,
0.07000732421875,
-0.0325927734375,
0.03131103515625,
-0.04339599609375,
-0.016632080078125,
0.051422119140625,
0.0011806488037109375,
-0.049163818359375,
-0.0206451416015625,
0.00495147705078125,
-0.0129241943359375,
-0.0011491775512695312,
0.01180267333984375,
0.0255279541015625,
0.007659912109375,
0.00991058349609375,
-0.01108551025390625,
-0.02362060546875,
0.00876617431640625,
-0.002719879150390625,
0.015716552734375,
0.0069580078125,
0.0102386474609375,
0.0139617919921875,
0.0024967193603515625,
-0.0172576904296875,
0.01538848876953125,
-0.038055419921875,
0.0277862548828125,
0.0242919921875,
-0.00720977783203125,
0.0124359130859375,
0.029144287109375,
-0.00868988037109375,
-0.0416259765625,
0.022308349609375,
-0.00838470458984375,
-0.0210113525390625,
0.00017774105072021484,
0.01175689697265625,
-0.0430908203125,
-0.0162200927734375,
-0.01186370849609375,
-0.048492431640625,
-0.0166168212890625,
-0.0361328125,
-0.028533935546875,
0.0046234130859375,
-0.01300811767578125,
-0.0283355712890625,
-0.0156402587890625,
-0.060150146484375,
-0.0307464599609375,
-0.00518035888671875,
0.034332275390625,
-0.0478515625,
0.081298828125,
-0.002506256103515625,
0.0211334228515625,
0.031951904296875,
-0.03582763671875,
0.02960205078125,
0.0633544921875,
0.03216552734375,
0.01690673828125,
0.0248260498046875,
-0.033660888671875,
-0.0261993408203125,
-0.0096282958984375,
0.024749755859375,
-0.051788330078125,
0.031280517578125,
0.005859375,
0.040252685546875,
-0.0223846435546875,
-0.0167236328125,
0.017303466796875,
0.0362548828125,
-0.0041046142578125,
-0.00400543212890625,
-0.01019287109375,
0.004467010498046875,
-0.0054931640625,
0.0255126953125,
-0.0164642333984375,
-0.0184173583984375,
0.024383544921875,
0.031524658203125,
-0.0009303092956542969,
-0.02301025390625,
-0.011260986328125,
-0.06231689453125,
-0.042877197265625,
0.04168701171875,
-0.04791259765625,
-0.001220703125,
0.05853271484375,
-0.059051513671875,
-0.041473388671875,
0.02191162109375,
0.01482391357421875,
0.007659912109375,
-0.02423095703125,
-0.092529296875,
0.02752685546875,
-0.0401611328125,
0.05718994140625,
0.0163726806640625,
-0.02215576171875,
-0.050628662109375,
0.08984375,
-0.0748291015625,
-0.03009033203125,
-0.09674072265625,
0.016357421875,
0.016845703125,
0.06414794921875,
-0.056396484375,
-0.07354736328125,
-0.02398681640625,
-0.082763671875,
-0.026031494140625,
0.03076171875,
0.053955078125,
0.0236053466796875,
0.035186767578125,
0.0275421142578125,
0.061553955078125,
0.0260009765625,
0.002044677734375,
-0.03546142578125,
-0.01153564453125,
0.0447998046875,
-0.0144195556640625,
-0.013580322265625,
-0.030303955078125,
0.037872314453125,
0.01441192626953125,
-0.0014410018920898438,
0.01451873779296875,
-0.0003304481506347656,
0.0128326416015625,
0.0004298686981201172,
0.0165252685546875,
-0.034271240234375,
0.0289154052734375,
-0.0019817352294921875,
0.007843017578125,
0.00044846534729003906,
-0.044921875,
0.0025005340576171875,
-0.0257110595703125,
0.003200531005859375,
0.0136871337890625,
0.0211639404296875,
-0.0041961669921875,
-0.0006685256958007812,
-0.0016946792602539062,
-0.045013427734375,
0.0167083740234375,
-0.0210418701171875,
0.017791748046875,
-0.0017757415771484375,
0.01531219482421875,
0.011444091796875,
0.0092620849609375,
-0.0112762451171875,
-0.026214599609375,
-0.0345458984375,
-0.01245880126953125,
0.0245208740234375,
0.0268096923828125,
-0.000255584716796875,
0.0308380126953125,
0.00339508056640625,
-0.0217742919921875,
-0.0016546249389648438,
0.053131103515625,
0.0017566680908203125,
-0.0102691650390625,
-0.020050048828125,
0.005329132080078125,
0.0160369873046875,
-0.0167999267578125,
0.0389404296875,
0.03192138671875,
0.059814453125,
0.0472412109375,
-0.0253448486328125,
-0.00829315185546875,
-0.021575927734375,
-0.0679931640625,
0.0008687973022460938,
0.0535888671875,
0.042388916015625,
0.021575927734375,
-0.04400634765625,
-0.06146240234375,
0.045166015625,
-0.0279083251953125,
0.00615692138671875,
-0.039703369140625,
-0.006877899169921875,
0.041290283203125,
0.029632568359375,
0.01507568359375,
-0.0071868896484375,
0.0012674331665039062,
0.0026493072509765625,
0.0267486572265625,
-0.0004658699035644531,
0.028839111328125,
-0.0174102783203125,
0.003086090087890625,
0.0014200210571289062,
-0.005161285400390625,
-0.00864410400390625,
-0.015167236328125,
0.0016498565673828125,
0.0357666015625,
0.048736572265625,
0.07061767578125,
-0.00797271728515625,
-0.0007419586181640625,
0.005855560302734375,
0.037872314453125,
-0.0090484619140625,
-0.02587890625,
-0.0083160400390625,
-0.01088714599609375,
-0.062286376953125,
0.046600341796875,
0.0284271240234375,
-0.03173828125,
-0.002513885498046875,
0.034210205078125,
0.0035381317138671875,
-0.00943756103515625,
0.0024433135986328125,
0.00809478759765625,
0.0119781494140625,
0.003936767578125,
0.0266876220703125,
0.01537322998046875,
0.0181884765625,
0.0128173828125,
-0.026336669921875,
0.06036376953125,
-0.0218353271484375,
-0.0191497802734375,
0.05218505859375,
-0.0249786376953125,
0.026519775390625,
0.0126800537109375,
0.07940673828125,
0.06121826171875,
0.006885528564453125,
0.018402099609375,
-0.0077056884765625,
0.02923583984375,
-0.029449462890625,
0.024017333984375,
-0.00576019287109375,
-0.0093994140625,
-0.021728515625,
0.0411376953125,
0.040985107421875,
0.024658203125,
0.02374267578125,
-0.00406646728515625,
-0.0198516845703125,
0.0462646484375,
-0.04498291015625,
-0.0261993408203125,
0.016632080078125,
-0.1270751953125,
-0.03350830078125,
-0.01177978515625,
-0.090576171875,
0.014007568359375,
0.02294921875,
-0.003910064697265625,
-0.00872802734375,
0.00347900390625,
-0.072265625,
-0.03826904296875,
-0.052978515625,
-0.00897216796875,
-0.01192474365234375,
0.01427459716796875,
0.00946807861328125,
0.021026611328125,
-0.0178680419921875,
-0.05145263671875,
-0.03094482421875,
-0.0287933349609375,
-0.02142333984375,
-0.0222625732421875,
0.0166778564453125,
-0.00431060791015625,
-0.01381683349609375,
0.0028839111328125,
-0.0015363693237304688,
0.0232391357421875,
-0.0242462158203125,
-0.00933837890625,
-0.00641632080078125,
-0.033050537109375,
0.0201873779296875,
0.0290985107421875,
-0.0093231201171875,
-0.03851318359375,
0.0440673828125,
-0.06414794921875,
-0.0286712646484375,
-0.009735107421875,
-0.051300048828125,
-0.00591278076171875,
0.0159912109375,
-0.0012884140014648438,
-0.0203094482421875,
0.01270294189453125,
-0.03326416015625,
0.0010433197021484375,
0.049407958984375,
-0.038177490234375,
0.023101806640625,
-0.0430908203125,
-0.048919677734375,
-0.0240020751953125,
-0.038848876953125,
-0.061370849609375,
0.05419921875,
-0.0189056396484375,
-0.0300140380859375,
-0.002323150634765625,
-0.01387786865234375,
0.0274505615234375,
-0.0372314453125,
0.049041748046875,
0.0048370361328125,
0.042694091796875,
-0.046630859375,
-0.040618896484375,
-0.0391845703125,
0.0673828125,
-0.06231689453125,
-0.004055023193359375,
0.020111083984375,
0.0011091232299804688,
0.01134490966796875,
-0.01230621337890625,
-0.059234619140625,
-0.017120361328125,
-0.03839111328125,
-0.0157470703125,
-0.0305023193359375,
-0.0272216796875,
-0.03363037109375,
0.08538818359375,
-0.03143310546875,
-0.01374053955078125,
0.0177154541015625,
0.012451171875,
0.01090240478515625,
-0.0008907318115234375,
-0.009613037109375,
0.01076507568359375,
0.002422332763671875,
-0.033721923828125,
-0.1263427734375,
-0.04010009765625,
0.047821044921875,
0.09442138671875,
-0.07086181640625,
0.053619384765625,
-0.06390380859375,
0.060516357421875,
-0.01168060302734375,
0.0413818359375,
-0.007694244384765625,
0.0308380126953125,
-0.03289794921875,
-0.030609130859375,
0.004245758056640625,
-0.044891357421875,
-0.0100860595703125,
-0.01934814453125,
0.007549285888671875,
0.012847900390625,
-0.041107177734375,
-0.0092010498046875,
-0.01181793212890625,
-0.01256561279296875,
-0.039794921875,
-0.01523590087890625,
0.0196075439453125,
0.054046630859375,
0.01275634765625,
0.00972747802734375,
-0.0465087890625,
-0.05413818359375,
0.04461669921875,
0.01232147216796875,
0.0229949951171875,
0.0016460418701171875,
0.056640625,
-0.004673004150390625,
-0.0364990234375,
-0.0018062591552734375,
-0.020477294921875,
0.041107177734375,
0.036041259765625,
0.0248565673828125,
0.0272674560546875,
-0.025238037109375,
0.016754150390625,
0.0438232421875,
0.0202484130859375,
-0.01332855224609375,
0.0304718017578125,
0.025543212890625,
0.023101806640625,
-0.00608062744140625,
0.050506591796875,
-0.02581787109375,
0.0195465087890625,
-0.034271240234375,
0.026123046875,
-0.03009033203125,
0.0250091552734375,
0.01103973388671875,
-0.0229034423828125,
-0.040679931640625,
-0.05291748046875,
0.0218353271484375,
-0.037689208984375,
0.0199127197265625,
-0.0033130645751953125,
0.00814056396484375,
0.0002925395965576172,
0.0040740966796875,
0.0175628662109375,
-0.00848388671875,
-0.0257415771484375,
0.018524169921875,
0.0401611328125,
0.00811767578125,
0.034210205078125,
-0.01334381103515625,
-0.005275726318359375,
-0.00746917724609375,
0.027496337890625,
-0.024169921875,
-0.04205322265625,
0.03387451171875,
0.049896240234375,
-0.021453857421875,
0.0086517333984375,
0.032318115234375,
0.0304412841796875,
0.0003161430358886719,
0.0162353515625,
0.01953125,
0.0028247833251953125,
-0.0213775634765625,
0.0033779144287109375,
-0.0421142578125,
-0.002521514892578125,
0.0296173095703125,
-0.0379638671875,
0.004863739013671875,
-0.0130462646484375,
-0.01270294189453125,
0.017303466796875,
0.01209259033203125,
0.038238525390625,
0.0178680419921875,
0.00047659873962402344,
-0.0345458984375,
0.049896240234375,
-0.00655364990234375,
-0.02691650390625,
0.004634857177734375,
0.027923583984375,
0.043243408203125,
0.018951416015625,
-0.01381683349609375,
0.004138946533203125,
-0.036224365234375,
0.0166778564453125,
0.0011301040649414062,
-0.01192474365234375,
-0.0421142578125,
0.0142364501953125,
0.059051513671875,
0.018798828125,
-0.0400390625,
-0.0005216598510742188,
-0.018524169921875,
-0.0275115966796875,
-0.0019521713256835938,
0.01473236083984375,
-0.0257568359375,
-0.007648468017578125,
-0.01139068603515625,
0.023651123046875,
-0.0022430419921875,
-0.0260467529296875,
-0.0413818359375,
-0.0496826171875,
0.00467681884765625,
0.0237579345703125,
0.038726806640625,
0.0148468017578125,
0.034820556640625,
-0.0223388671875,
-0.036590576171875,
-0.030364990234375,
0.0031566619873046875,
-0.00299072265625,
-0.0248565673828125,
-0.03387451171875,
-0.003124237060546875,
-0.01219940185546875,
-0.03155517578125,
-0.00188446044921875,
0.0079498291015625,
-0.0557861328125,
-0.02276611328125,
0.01136016845703125,
0.0220184326171875,
0.01861572265625,
-0.0115966796875,
-0.023895263671875,
0.00969696044921875,
0.00655364990234375,
0.028778076171875,
-0.042694091796875,
0.03338623046875,
0.0286407470703125,
0.007091522216796875,
-0.016448974609375,
0.0258636474609375,
0.0413818359375,
-0.028228759765625,
0.042816162109375,
0.00771331787109375,
-0.025115966796875,
-0.012939453125,
-0.035247802734375,
-0.0980224609375,
-0.01102447509765625,
-0.02825927734375,
-0.0011625289916992188,
-0.023895263671875,
-0.00394439697265625,
-0.0225677490234375,
0.039215087890625,
-0.026031494140625,
-0.0048828125,
0.000896453857421875,
-0.04803466796875,
0.006565093994140625,
0.00125885009765625,
0.018707275390625,
0.023101806640625,
-0.04986572265625,
-0.0002524852752685547,
0.058502197265625,
0.00849151611328125,
-0.0096435546875,
0.053466796875,
-0.01434326171875,
0.03472900390625,
0.036529541015625,
0.01175689697265625,
0.02838134765625,
-0.0177459716796875,
0.0022602081298828125,
0.0256500244140625,
0.05047607421875,
-0.00630950927734375,
-0.005146026611328125,
0.03631591796875,
-0.0233917236328125,
0.026397705078125,
0.0207366943359375,
0.0667724609375,
-0.037872314453125,
0.0217437744140625,
0.0194091796875,
-0.04193115234375,
0.041717529296875,
-0.034576416015625,
-0.007049560546875,
-0.031768798828125,
0.06842041015625,
0.00684356689453125,
-0.020355224609375,
0.0187225341796875,
0.0010833740234375,
-0.0030059814453125,
-0.0271759033203125,
0.019073486328125,
-0.0012607574462890625,
-0.0179443359375,
-0.0153350830078125,
0.025665283203125,
-0.0018634796142578125,
-0.0062255859375,
0.04052734375,
-0.039947509765625,
-0.00928497314453125,
-0.04327392578125,
-0.0173492431640625,
0.0171051025390625,
-0.0310821533203125,
0.004459381103515625,
0.009918212890625,
0.004543304443359375,
0.05328369140625,
-0.016021728515625,
0.01302337646484375,
0.0380859375,
-0.024749755859375,
0.02587890625,
-0.0015802383422851562,
-0.0032196044921875,
0.0116424560546875,
-0.0018339157104492188,
-0.00467681884765625,
0.00336456298828125,
-0.006465911865234375,
0.0023822784423828125,
0.0183258056640625,
0.004444122314453125,
0.0237274169921875,
-0.03521728515625,
0.08367919921875,
-0.0061187744140625,
-0.055633544921875,
-0.023406982421875,
-0.005218505859375,
-0.046173095703125,
-0.0155029296875,
-0.0185089111328125,
-0.048980712890625,
-0.01268768310546875,
-0.05633544921875,
-0.03509521484375,
0.052001953125,
0.047393798828125,
-0.037261962890625,
-0.0279083251953125,
0.039947509765625,
-0.036376953125,
0.0263214111328125,
0.0260162353515625,
-0.00382232666015625,
-0.0243377685546875,
-0.029144287109375,
0.00730133056640625,
0.00384521484375,
-0.020111083984375,
0.05462646484375,
0.012359619140625,
-0.0140380859375,
-0.041046142578125,
-0.00530242919921875,
0.0687255859375,
0.050994873046875,
0.0350341796875,
0.031402587890625,
0.02520751953125,
-0.0126495361328125,
0.026885986328125,
0.006237030029296875,
0.040313720703125,
-0.048126220703125,
-0.00441741943359375,
0.0156402587890625,
0.0037250518798828125,
-0.0121307373046875,
0.018341064453125,
-0.03192138671875,
-0.0350341796875,
0.0275115966796875,
0.0220947265625,
-0.019287109375,
-0.026947021484375,
0.032470703125,
0.035888671875,
-0.0745849609375,
-0.039642333984375,
-0.036865234375,
0.049835205078125,
0.035308837890625,
-0.01508331298828125,
-0.019500732421875,
-0.001659393310546875,
0.0303955078125,
-0.01148223876953125,
-0.0170440673828125,
0.04541015625,
-0.0129547119140625,
-0.00023508071899414062,
-0.0079498291015625,
-0.0034046173095703125,
-0.039825439453125,
0.006465911865234375,
0.07159423828125,
0.0130767822265625,
-0.01947021484375,
-0.0235443115234375,
0.007293701171875,
-0.0309295654296875,
-0.04937744140625,
-0.0191650390625,
-0.0634765625,
0.004253387451171875,
0.034088134765625,
-0.00202178955078125,
-0.031402587890625,
0.0030918121337890625,
0.033477783203125,
0.016326904296875,
0.015045166015625,
-0.0196075439453125,
-0.034698486328125,
-0.047454833984375,
-0.0155792236328125,
0.0121002197265625,
0.07440185546875,
0.037139892578125,
0.05242919921875,
0.0210113525390625,
-0.04193115234375,
-0.0178985595703125,
0.014312744140625,
0.0084381103515625,
0.0162811279296875,
-0.00820159912109375,
0.016876220703125,
-0.00949859619140625,
0.0256195068359375,
0.025482177734375,
0.004917144775390625,
0.032989501953125,
-0.01390838623046875,
-0.04071044921875,
0.01189422607421875,
-0.009490966796875,
-0.03570556640625,
-0.01282501220703125,
-0.0419921875,
-0.0080718994140625,
0.004436492919921875,
-0.0136871337890625,
-0.01009368896484375,
-0.0010499954223632812,
0.036651611328125,
0.01499176025390625,
0.025177001953125,
0.014617919921875,
0.0218963623046875,
0.0192413330078125,
0.0189056396484375,
-0.00424957275390625,
0.055694580078125,
-0.046478271484375,
-0.0131072998046875,
-0.0186920166015625,
0.0073089599609375,
0.01123046875,
0.0247650146484375,
-0.0018138885498046875,
0.040252685546875,
-0.0156097412109375,
-0.018280029296875,
-0.01091766357421875,
-0.017181396484375,
0.04791259765625,
0.0633544921875,
-0.005771636962890625,
0.0259246826171875,
-0.048614501953125,
-0.040008544921875,
-0.040283203125,
0.0565185546875,
0.016448974609375,
0.054656982421875,
-0.013153076171875,
0.040679931640625,
-0.0217742919921875,
-0.0061187744140625,
0.012054443359375,
-0.0254974365234375,
-0.0008263587951660156,
0.03424072265625,
0.0273590087890625,
-0.0283966064453125,
-0.050537109375,
0.0272064208984375,
0.007724761962890625,
-0.005008697509765625,
0.0149078369140625,
-0.01285552978515625,
0.01303863525390625,
-0.0008869171142578125,
-0.0208892822265625,
-0.034881591796875,
-0.0007233619689941406,
-0.033843994140625,
-0.028961181640625,
0.0301055908203125,
-0.03741455078125,
-0.0294189453125,
0.016387939453125,
0.02984619140625,
-0.0213775634765625,
0.045135498046875,
-0.0236358642578125,
0.048248291015625,
0.0272216796875,
0.0206756591796875,
0.01041412353515625,
0.0343017578125,
-0.0005059242248535156,
0.032440185546875,
0.02587890625,
0.002414703369140625,
0.040313720703125,
-0.02490234375,
0.08282470703125,
0.0216827392578125,
0.06103515625,
-0.004642486572265625,
-0.00687408447265625,
0.0286407470703125,
0.01251220703125,
-0.0026683807373046875,
0.0197296142578125,
-0.02227783203125,
0.0186767578125,
-0.0005068778991699219,
0.01361083984375,
0.0218505859375,
-0.0276336669921875,
-0.031646728515625,
-0.0357666015625,
0.026580810546875,
0.00829315185546875,
-0.0080413818359375,
-0.0170745849609375,
0.007598876953125,
-0.0091705322265625,
0.0204925537109375,
-0.003498077392578125,
0.02459716796875,
0.060028076171875,
-0.0208740234375,
0.00806427001953125,
-0.0213470458984375,
-0.0034427642822265625,
-0.0220794677734375,
0.008026123046875,
0.0224761962890625,
-0.0155792236328125,
-0.01332855224609375,
0.02642822265625,
0.0022830963134765625,
0.05987548828125,
-0.01079559326171875,
-0.00800323486328125,
0.08367919921875,
-0.0237579345703125,
-0.0282745361328125,
-0.0626220703125,
-0.03680419921875,
-0.020751953125,
0.037322998046875,
-0.0015163421630859375,
-0.0024871826171875,
0.00659942626953125,
-0.04010009765625,
-0.07373046875,
-0.025421142578125,
0.0126953125,
-0.03521728515625,
-0.01995849609375,
-0.033477783203125,
-0.0216064453125,
0.04583740234375,
-0.00760650634765625,
-0.01445770263671875,
-0.0121002197265625,
0.043182373046875,
0.00079345703125,
0.0195770263671875,
0.0577392578125,
-0.03936767578125,
0.003421783447265625,
0.0037212371826171875,
0.012359619140625,
-0.0170440673828125,
0.0019550323486328125,
0.0019369125366210938,
0.0284423828125,
0.063720703125,
0.0038547515869140625,
-0.0095977783203125,
-0.0142822265625,
-0.0679931640625,
-0.00412750244140625,
-0.018829345703125,
-0.03131103515625,
-0.0150299072265625,
0.0635986328125,
0.016510009765625,
0.0188446044921875,
-0.0183868408203125,
0.007083892822265625,
0.0112762451171875,
-0.0305633544921875,
-0.003231048583984375,
0.008056640625,
-0.059844970703125,
-0.0298614501953125,
-0.0008535385131835938,
0.0030498504638671875,
0.0293426513671875,
-0.0164337158203125,
0.00705718994140625,
-0.0222930908203125,
-0.003162384033203125,
-0.030914306640625,
-0.016357421875,
0.01398468017578125,
0.040557861328125,
-0.048248291015625,
-0.0269317626953125,
0.032257080078125,
-0.013214111328125,
-0.005321502685546875,
0.0338134765625,
-0.060943603515625,
0.00386810302734375,
-0.01503753662109375,
0.0430908203125,
-0.03466796875,
0.0295867919921875,
-0.05377197265625,
0.036224365234375,
-0.0157623291015625,
-0.01129150390625,
0.016357421875,
-0.00731658935546875,
-0.006313323974609375,
-0.0081939697265625,
-0.006160736083984375,
-0.0023479461669921875,
-0.0294952392578125,
-0.0027942657470703125,
-0.020721435546875,
0.0341796875,
0.017822265625,
-0.00783538818359375,
0.049285888671875,
0.004611968994140625,
0.016876220703125,
0.0238800048828125,
0.0255889892578125,
-0.0022106170654296875,
-0.0028095245361328125,
0.033782958984375,
0.005756378173828125,
-0.00365447998046875
] |
d751840fbd2d62a1ee7036cd6049a66309e64950
|
Wordpress Stackexchange
Q: Make thumbnails in woocommerce replace the main image instead of opening fancybox I would like the thumbnails underneath the main image on the single product page to replace the main image when they are either clicked or on hover, I prefer hover. Right now the thumbnails just open in their own fancybox. This is a very common feature on most big ecommerce sites and it's weird that it's not an option in woocommerce. Any help will be greatly appreciated.
A: I have just achieved the effect by my own. I will post it here in case others find this thread:
jQuery(document).on('click','.thumbnails .zoom', function(){
var photo_fullsize = jQuery(this).find('img').attr('src').replace('-100x132','');
jQuery('.woocommerce-main-image img').attr('src', photo_fullsize);
return false;
});
.replace('-100x132') eliminates the size from url of the image to return the full image and not the thumbnail. Replace it with your own thumbnails sizes.
My solution is based on:
*
*https://stackoverflow.com/questions/17307451/replace-main-image-with-thumbnail-on-click-with-jquery
*https://stackoverflow.com/questions/1149747/click-function-not-working-for-me
|
Q: Make thumbnails in woocommerce replace the main image instead of opening fancybox I would like the thumbnails underneath the main image on the single product page to replace the main image when they are either clicked or on hover, I prefer hover. Right now the thumbnails just open in their own fancybox. This is a very common feature on most big ecommerce sites and it's weird that it's not an option in woocommerce. Any help will be greatly appreciated.
A: I have just achieved the effect by my own. I will post it here in case others find this thread:
jQuery(document).on('click','.thumbnails .zoom', function(){
var photo_fullsize = jQuery(this).find('img').attr('src').replace('-100x132','');
jQuery('.woocommerce-main-image img').attr('src', photo_fullsize);
return false;
});
.replace('-100x132') eliminates the size from url of the image to return the full image and not the thumbnail. Replace it with your own thumbnails sizes.
My solution is based on:
*
*https://stackoverflow.com/questions/17307451/replace-main-image-with-thumbnail-on-click-with-jquery
*https://stackoverflow.com/questions/1149747/click-function-not-working-for-me
A: JavaScript solution
As the original answer already work with string replace, but has to get altered for each and every use case, here's a solution using a fast Regex .test() wrapped up in a self invoking function that uses the default method to prevent events (like following links) from happening.
This plugin will delete the first occurrence of any 2-4 digits separated by an x and followed by another 2-4 digits. Some examples
image-name-123x456.ext
image_name123x456.ext
imageName1230x45.ext
imageName12x4567.ext
Here's the actual plugin. You'll just have to fill in a single bit: The actual selector.
To Do: The only thing that you'll have to do is providing your actual selector (instead of .class-of-the-thumbnail-image) for the image. Best would be to (a) fill in some class and then add a filter to the thumbnail to add this class to every image that you want to target.
<?php
defined( 'ABSPATH' ) or exit;
/* Plugin Name: (#83993) Full image size */
add_action( 'wp_footer', 'wpse83993FullImageSize' );
function wpse83993FullImageSize()
{
?>
<script type="text/javascript">
( function( $ ) {
$( '.thumbnails .zoom' ).on( 'click', function( event ) {
event.preventDefault();
var $img = $( this ).find( 'img' ),
$src = $img.attr( 'src' ),
search = /^([-]?)([\d]{2,4})((\s*)(x)(\s*))([\d]{2,4})$/;
// Regex .test() is fast, so we use it *before* we actually do something
if ( search.test( $src ) ) {
var $url = $src.replace( search, '' );
$( '.class-of-the-thumbnail-image' ).attr( 'src', $url );
}
} );
} )( jQuery );
</script>
<?
}
One possible point where your plugin could hook in, would be to combine this with a filter on post_thumbnail_html. This filter has some arguments: $html, $post_id, $post_thumbnail_id, $size, $attr that you can use to alter the HTML.
Another, maybe even better would be the wp_get_attachment_image_attributes-filter inside wp_get_attachment_image(), which is called by get_the_post_thumbnail(), which itself is wrapped by the_post_thumbnail().
apply_filters( 'wp_get_attachment_image_attributes', $attr, $attachment );
Simply add something like the following to the plugin above:
add_filter( 'wp_get_attachment_image_attributes', 'wpse83993AddDefaultThumbnailClass', 20, 2 );
function wpse83993AddDefaultThumbnailClass( $atts, $attachment )
{
$atts['class'] .= "class-of-the-thumbnail-image";
return $atts;
}
Server side solution: PHP
Much easier than anything else is to use the following filter - in case it meets your use case.
apply_filters( 'post_thumbnail_size', $size );
You can add just call the full size for every post thumbnail and you're fine. Then downsize the image via CSS.
A: After Wordpress implemented responsive images in Wordpress 4.4, these other scripts tend to be buggy/not working because of the added srcset attributes.
Here is the snippet I use to fix issues with this:
$(document).on('click', '.thumbnails .zoom', function() {
var photo_fullsize = $(this).find('img').attr('src').replace('-180x180','');
var photo_srcset = $(this).find('img').attr('srcset').replace('-180x180','');
$('.woocommerce-main-image img').attr('src', photo_fullsize);
$('.woocommerce-main-image img').attr('srcset', photo_srcset);
return false;
});
A: I found this http://www.magictoolbox.com/magiczoomplus/ and it handles what I needed. I just set the zoom to inner so it doesn't open a zoom window and it has thumbnail hover that replaces the main image. Maybe this could help someone with a similar issue.
A: I had problems using the example from the accepted answer, so re-wrote it a bit, jJust in case anyone should need a working example, not dependant on thumbnail size replacement, which also disables the default PrettyPhoto action.
$(".thumbnails").find("a.zoom").unbind('click');
$('.thumbnails .zoom').on('click', function(e){
console.log( $('.thumbnails .zoom') );
var photo_fullsize = $(this).attr('href');
$('.woocommerce-main-image img').attr('src', photo_fullsize);
$('a.woocommerce-main-image').attr('href', photo_fullsize);
return false;
});
|
wordpress
|
{
"language": "en",
"length": 687,
"provenance": "stackexchange_00019.jsonl.gz:428542",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/83993"
}
|
[
0.039642333984375,
-0.033935546875,
0.00913238525390625,
-0.0157928466796875,
-0.006671905517578125,
-0.04180908203125,
0.07232666015625,
-0.0013341903686523438,
0.029449462890625,
0.02532958984375,
-0.0355224609375,
0.0078277587890625,
-0.004940032958984375,
-0.00997161865234375,
-0.0172271728515625,
-0.00154876708984375,
0.043060302734375,
-0.0240325927734375,
0.039154052734375,
0.00688934326171875,
0.01409912109375,
0.038848876953125,
0.024871826171875,
0.07684326171875,
0.027252197265625,
-0.032989501953125,
0.0888671875,
-0.01116943359375,
0.00565338134765625,
-0.0303802490234375,
0.0200347900390625,
0.01195526123046875,
0.043487548828125,
-0.0230255126953125,
-0.01177215576171875,
0.03045654296875,
0.01213836669921875,
-0.0209808349609375,
0.000396728515625,
0.005588531494140625,
0.02252197265625,
0.0008039474487304688,
-0.0081634521484375,
0.0179595947265625,
-0.0273590087890625,
-0.04815673828125,
0.020050048828125,
-0.036376953125,
0.03680419921875,
-0.0175323486328125,
0.017730712890625,
0.06304931640625,
0.035369873046875,
-0.017120361328125,
-0.00621795654296875,
0.0305633544921875,
-0.07806396484375,
0.035736083984375,
0.019439697265625,
0.0638427734375,
0.03045654296875,
0.01284027099609375,
-0.0230255126953125,
-0.0308990478515625,
-0.01180267333984375,
-0.0148162841796875,
-0.051513671875,
-0.0004105567932128906,
-0.032806396484375,
-0.0009450912475585938,
0.0455322265625,
-0.0259246826171875,
-0.0234527587890625,
-0.002033233642578125,
-0.0203857421875,
0.041351318359375,
0.0047149658203125,
0.0230712890625,
0.0164794921875,
0.01279449462890625,
0.06695556640625,
-0.0019321441650390625,
0.0286865234375,
0.01654052734375,
0.045257568359375,
0.0565185546875,
0.00966644287109375,
-0.040740966796875,
-0.0102081298828125,
0.0016117095947265625,
-0.0166015625,
-0.032867431640625,
-0.01446533203125,
0.06024169921875,
-0.0095367431640625,
-0.00623321533203125,
0.050445556640625,
0.032745361328125,
0.0309295654296875,
0.0144195556640625,
0.031829833984375,
-0.071533203125,
0.030548095703125,
-0.0311737060546875,
0.01511383056640625,
0.033935546875,
0.0012807846069335938,
-0.0028553009033203125,
0.02960205078125,
0.017486572265625,
0.00005519390106201172,
0.03558349609375,
-0.008270263671875,
-0.02667236328125,
0.00606536865234375,
-0.001514434814453125,
-0.03436279296875,
0.048248291015625,
-0.003482818603515625,
0.032012939453125,
0.0190887451171875,
0.017578125,
0.0238037109375,
0.0015249252319335938,
0.029052734375,
0.02789306640625,
-0.006374359130859375,
-0.0426025390625,
0.007350921630859375,
-0.007129669189453125,
-0.035888671875,
-0.01361083984375,
0.067138671875,
0.064697265625,
0.057373046875,
-0.01482391357421875,
0.00246429443359375,
-0.00974273681640625,
-0.00507354736328125,
-0.0005249977111816406,
0.034271240234375,
-0.0295257568359375,
-0.009490966796875,
0.0186004638671875,
0.06591796875,
0.00212860107421875,
0.006893157958984375,
0.02734375,
0.0218658447265625,
0.000965118408203125,
0.048187255859375,
-0.01154327392578125,
0.01407623291015625,
0.0224151611328125,
0.000016450881958007812,
0.0004565715789794922,
0.0655517578125,
-0.0258636474609375,
-0.0018720626831054688,
-0.06591796875,
0.020599365234375,
0.01116943359375,
0.0161285400390625,
-0.0142822265625,
-0.017669677734375,
-0.01824951171875,
-0.053314208984375,
-0.005084991455078125,
0.0283050537109375,
0.0257110595703125,
0.0181427001953125,
-0.009002685546875,
0.00975799560546875,
0.00966644287109375,
-0.01143646240234375,
0.01371002197265625,
0.0126190185546875,
0.045623779296875,
0.031890869140625,
0.039642333984375,
-0.00754547119140625,
-0.037445068359375,
0.11676025390625,
-0.060333251953125,
-0.00133514404296875,
0.0013942718505859375,
-0.001834869384765625,
-0.017120361328125,
-0.01480865478515625,
0.018463134765625,
-0.018585205078125,
0.042144775390625,
-0.0557861328125,
0.041229248046875,
0.025390625,
0.0016345977783203125,
-0.0262451171875,
-0.00864410400390625,
-0.0025177001953125,
-0.02984619140625,
0.060577392578125,
0.01102447509765625,
0.01274871826171875,
-0.001659393310546875,
-0.0238800048828125,
0.01412200927734375,
-0.0136566162109375,
0.02105712890625,
-0.06439208984375,
0.0487060546875,
0.052459716796875,
0.0577392578125,
-0.057708740234375,
-0.0231781005859375,
0.027313232421875,
-0.0004143714904785156,
0.0180816650390625,
0.046905517578125,
0.0017709732055664062,
0.07830810546875,
-0.0386962890625,
-0.0290679931640625,
-0.042724609375,
-0.00437164306640625,
0.03558349609375,
0.0501708984375,
-0.043182373046875,
0.026123046875,
-0.0179901123046875,
0.052825927734375,
-0.080810546875,
0.01448822021484375,
-0.0007824897766113281,
-0.027984619140625,
-0.052093505859375,
0.00101470947265625,
0.00927734375,
-0.032257080078125,
0.0034122467041015625,
0.050018310546875,
0.02349853515625,
0.0269927978515625,
0.01105499267578125,
0.0296478271484375,
0.0870361328125,
-0.00414276123046875,
0.00629425048828125,
-0.0016889572143554688,
-0.0258331298828125,
-0.037872314453125,
-0.00972747802734375,
-0.033416748046875,
0.037261962890625,
-0.034515380859375,
-0.0008606910705566406,
0.0416259765625,
-0.0181732177734375,
-0.00922393798828125,
0.00023818016052246094,
0.0208587646484375,
-0.0101165771484375,
0.0129852294921875,
0.0149078369140625,
-0.00937652587890625,
-0.01039886474609375,
0.0057220458984375,
0.01534271240234375,
0.003711700439453125,
-0.002483367919921875,
-0.0008072853088378906,
0.01302337646484375,
-0.0204315185546875,
-0.005950927734375,
0.03656005859375,
0.0195465087890625,
-0.03076171875,
-0.027862548828125,
-0.002544403076171875,
-0.006038665771484375,
-0.0042877197265625,
0.008087158203125,
0.01898193359375,
-0.0178375244140625,
0.00725555419921875,
-0.007770538330078125,
-0.0177459716796875,
0.01727294921875,
0.055023193359375,
0.006511688232421875,
-0.00634002685546875,
0.023162841796875,
0.0212860107421875,
-0.008087158203125,
0.028533935546875,
-0.00817108154296875,
-0.0024623870849609375,
0.04345703125,
-0.040283203125,
0.0572509765625,
-0.04058837890625,
0.0828857421875,
0.055938720703125,
-0.049102783203125,
0.03997802734375,
0.0009698867797851562,
-0.0225372314453125,
-0.0151214599609375,
0.0110015869140625,
-0.0222625732421875,
0.0120849609375,
-0.06512451171875,
0.0196685791015625,
0.00743865966796875,
0.0489501953125,
-0.051116943359375,
-0.0704345703125,
-0.019805908203125,
-0.00421142578125,
-0.066650390625,
-0.04339599609375,
-0.037841796875,
-0.08154296875,
-0.0293731689453125,
0.01067352294921875,
-0.0262298583984375,
0.021759033203125,
0.034515380859375,
0.007030487060546875,
-0.0058135986328125,
-0.033599853515625,
0.01067352294921875,
-0.0207366943359375,
-0.0232696533203125,
0.0189056396484375,
0.0267791748046875,
0.007770538330078125,
0.00875091552734375,
-0.022186279296875,
-0.0011806488037109375,
-0.01334381103515625,
0.018341064453125,
0.08001708984375,
0.0029735565185546875,
-0.029327392578125,
0.01303863525390625,
-0.0289764404296875,
-0.00998687744140625,
0.0009012222290039062,
0.01434326171875,
0.0243682861328125,
-0.029815673828125,
0.0229339599609375,
-0.0104522705078125,
-0.00936126708984375,
-0.0173187255859375,
0.04425048828125,
0.028228759765625,
0.0193023681640625,
0.026763916015625,
-0.0162811279296875,
-0.045135498046875,
-0.036376953125,
-0.07611083984375,
0.043548583984375,
0.055511474609375,
0.018707275390625,
-0.0099029541015625,
0.0024929046630859375,
0.05377197265625,
0.028533935546875,
0.023651123046875,
0.031585693359375,
-0.0029449462890625,
-0.0115509033203125,
0.0106658935546875,
-0.08428955078125,
0.029693603515625,
-0.0022220611572265625,
0.0294952392578125,
0.01337432861328125,
0.0173492431640625,
0.00731658935546875,
-0.0038471221923828125,
-0.026641845703125,
-0.034912109375,
0.015960693359375,
-0.018707275390625,
0.003326416015625,
-0.0230712890625,
-0.020233154296875,
-0.005687713623046875,
0.057891845703125,
-0.0535888671875,
-0.0206756591796875,
0.0208892822265625,
0.011810302734375,
0.011077880859375,
-0.015960693359375,
-0.04583740234375,
-0.02423095703125,
-0.10162353515625,
0.0103759765625,
0.017486572265625,
-0.0438232421875,
-0.00446319580078125,
-0.007450103759765625,
-0.058013916015625,
-0.04095458984375,
0.031158447265625,
0.017059326171875,
-0.0186920166015625,
0.0208892822265625,
-0.03411865234375,
0.027984619140625,
-0.01277923583984375,
-0.01241302490234375,
-0.060943603515625,
-0.0146026611328125,
0.0298309326171875,
0.04156494140625,
-0.053436279296875,
0.0653076171875,
-0.06536865234375,
0.037750244140625,
0.0005168914794921875,
0.034912109375,
-0.0118560791015625,
0.0267333984375,
0.01407623291015625,
-0.0140533447265625,
0.0037364959716796875,
-0.02374267578125,
0.00384521484375,
-0.045135498046875,
-0.06964111328125,
-0.036163330078125,
-0.0059814453125,
0.04583740234375,
0.026458740234375,
-0.0244293212890625,
-0.08978271484375,
-0.0302276611328125,
0.0228729248046875,
-0.0025234222412109375,
0.0006690025329589844,
-0.002193450927734375,
-0.017547607421875,
-0.0367431640625,
0.01403045654296875,
0.0230560302734375,
-0.041778564453125,
0.0074462890625,
0.0036983489990234375,
0.0252838134765625,
-0.0187530517578125,
0.0152587890625,
-0.00907135009765625,
0.032989501953125,
0.041290283203125,
-0.003177642822265625,
-0.01375579833984375,
-0.01751708984375,
0.0223846435546875,
0.02459716796875,
0.0266876220703125,
-0.0260467529296875,
0.07757568359375,
0.0008921623229980469,
-0.0087432861328125,
0.03521728515625,
-0.01062774658203125,
-0.034454345703125,
-0.01029205322265625,
-0.01277923583984375,
0.0276947021484375,
-0.020904541015625,
-0.00921630859375,
0.019683837890625,
-0.00945281982421875,
-0.004749298095703125,
-0.004688262939453125,
-0.020416259765625,
0.01367950439453125,
0.086181640625,
0.0379638671875,
-0.00669097900390625,
0.04473876953125,
0.07196044921875,
0.027587890625,
-0.0132904052734375,
0.008697509765625,
-0.04302978515625,
0.04376220703125,
0.0163421630859375,
0.00868988037109375,
0.0015592575073242188,
0.01442718505859375,
-0.041778564453125,
0.01690673828125,
-0.0189208984375,
-0.06494140625,
0.01512908935546875,
-0.018157958984375,
-0.026763916015625,
-0.0004973411560058594,
0.03582763671875,
-0.0218048095703125,
-0.0176544189453125,
-0.0243988037109375,
-0.035186767578125,
-0.045013427734375,
-0.0523681640625,
0.0255584716796875,
0.025665283203125,
-0.0184783935546875,
0.04107666015625,
-0.004547119140625,
0.034393310546875,
-0.0166473388671875,
-0.01328277587890625,
0.022430419921875,
-0.00984954833984375,
0.0266571044921875,
0.003406524658203125,
0.0112457275390625,
-0.009033203125,
0.0242156982421875,
-0.0030994415283203125,
0.0019197463989257812,
-0.033203125,
0.0338134765625,
0.00616455078125,
-0.0390625,
0.0263824462890625,
-0.01264190673828125,
0.021453857421875,
-0.0164947509765625,
-0.006313323974609375,
-0.045684814453125,
-0.039031982421875,
-0.01276397705078125,
0.00484466552734375,
0.00972747802734375,
-0.00020837783813476562,
-0.041107177734375,
-0.011474609375,
-0.0357666015625,
0.006626129150390625,
-0.01202392578125,
-0.035369873046875,
0.043548583984375,
0.050689697265625,
-0.00891876220703125,
-0.0345458984375,
-0.004245758056640625,
0.016082763671875,
0.0128173828125,
-0.0235748291015625,
-0.0149383544921875,
0.037841796875,
-0.03228759765625,
0.036529541015625,
-0.003810882568359375,
-0.043853759765625,
-0.055999755859375,
0.0209808349609375,
0.0267181396484375,
0.038360595703125,
-0.00809478759765625,
-0.01678466796875,
-0.029083251953125,
-0.0240020751953125,
0.06634521484375,
0.00818634033203125,
-0.018157958984375,
-0.03228759765625,
-0.0020885467529296875,
0.038177490234375,
-0.03070068359375,
-0.0335693359375,
0.044158935546875,
-0.0097198486328125,
-0.00930023193359375,
0.06781005859375,
-0.01296234130859375,
-0.0105438232421875,
0.01393890380859375,
-0.0010595321655273438,
-0.003139495849609375,
-0.0208740234375,
0.0189361572265625,
-0.0275421142578125,
-0.0177459716796875,
-0.01416778564453125,
-0.005832672119140625,
0.01071929931640625,
0.01543426513671875,
0.0499267578125,
0.07550048828125,
0.01441192626953125,
0.0074005126953125,
-0.003818511962890625,
0.0012426376342773438,
-0.037445068359375,
0.05078125,
-0.02801513671875,
0.01203155517578125,
0.0194854736328125,
-0.0238494873046875,
0.0073394775390625,
0.0126800537109375,
-0.021270751953125,
0.0167236328125,
-0.029205322265625,
0.009033203125,
0.059539794921875,
0.0215911865234375,
0.007297515869140625,
0.0487060546875,
-0.0135955810546875,
0.020538330078125,
0.0266571044921875,
0.003879547119140625,
-0.00821685791015625,
0.0225067138671875,
-0.00844573974609375,
0.012939453125,
0.031890869140625,
-0.01212310791015625,
-0.024658203125,
0.0007610321044921875,
-0.0203704833984375,
0.0260009765625,
0.01268768310546875,
0.047943115234375,
-0.032073974609375,
0.00417327880859375,
-0.00024068355560302734,
-0.035675048828125,
0.027252197265625,
0.01052093505859375,
-0.0166473388671875,
-0.0156402587890625,
0.027587890625,
-0.0137786865234375,
-0.00720977783203125,
0.01082611083984375,
0.01284027099609375,
-0.0216827392578125,
0.01995849609375,
-0.045684814453125,
-0.016448974609375,
-0.10687255859375,
-0.014312744140625,
0.06890869140625,
-0.043182373046875,
-0.03521728515625,
0.0347900390625,
-0.018707275390625,
0.02655029296875,
-0.021942138671875,
0.02056884765625,
-0.0026569366455078125,
0.030914306640625,
0.0321044921875,
0.019744873046875,
-0.0008234977722167969,
0.01311492919921875,
0.00853729248046875,
0.0098724365234375,
-0.0234375,
0.01457977294921875,
0.0243682861328125,
-0.01016998291015625,
0.0239410400390625,
0.00817108154296875,
-0.0662841796875,
0.00902557373046875,
-0.048828125,
0.0294952392578125,
-0.01043701171875,
-0.0004425048828125,
0.06829833984375,
-0.02728271484375,
-0.0236358642578125,
0.0235595703125,
0.047821044921875,
-0.0081787109375,
0.01238250732421875,
0.0284423828125,
-0.045135498046875,
-0.036834716796875,
0.004596710205078125,
-0.054473876953125,
0.002719879150390625,
-0.022186279296875,
-0.07330322265625,
0.0916748046875,
-0.0496826171875,
0.055145263671875,
0.0241851806640625,
0.019927978515625,
-0.0226287841796875,
-0.01000213623046875,
-0.00495147705078125,
0.01074981689453125,
-0.047149658203125,
0.0120849609375,
-0.01026153564453125,
0.0150604248046875,
-0.004833221435546875,
-0.01287841796875,
0.018463134765625,
0.0007395744323730469,
-0.016632080078125,
0.01525115966796875,
0.09051513671875,
0.026397705078125,
0.018524169921875,
0.035186767578125,
-0.034698486328125,
-0.053375244140625,
-0.0024261474609375,
0.0028400421142578125,
0.0160369873046875,
0.0010290145874023438,
-0.029205322265625,
-0.007495880126953125,
0.0253753662109375,
0.03662109375,
0.04351806640625,
0.0745849609375,
-0.027862548828125,
0.00876617431640625,
0.050384521484375,
-0.07464599609375,
0.00797271728515625,
0.0217437744140625,
-0.0026397705078125,
0.05279541015625,
-0.041961669921875,
0.011962890625,
0.0179901123046875,
-0.0034427642822265625,
0.0289306640625,
0.00997161865234375,
0.0039005279541015625,
0.077880859375,
0.007282257080078125,
0.005245208740234375,
0.0220489501953125,
0.01407623291015625,
-0.0120086669921875,
0.0000073909759521484375,
0.0189361572265625,
-0.008697509765625,
0.03009033203125,
0.04791259765625,
-0.001049041748046875,
-0.02044677734375,
-0.019073486328125,
0.00411224365234375,
-0.015625,
0.0062713623046875,
-0.01849365234375,
0.003940582275390625,
-0.062164306640625,
-0.048370361328125,
-0.0211944580078125,
0.00481414794921875,
0.036865234375,
0.0379638671875,
0.01201629638671875,
0.000141143798828125,
-0.06915283203125,
-0.00759124755859375,
-0.02996826171875,
0.00695037841796875,
0.028900146484375,
0.023681640625,
-0.025146484375,
0.047821044921875,
0.018035888671875,
-0.0018587112426757812,
0.0046844482421875,
0.01110076904296875,
-0.0191192626953125,
0.0109710693359375,
-0.0206451416015625,
-0.0255126953125,
-0.0028171539306640625,
0.033843994140625,
0.0017223358154296875,
0.03564453125,
0.04425048828125,
0.040557861328125,
-0.011993408203125,
0.0022563934326171875,
0.05157470703125,
-0.0118255615234375,
0.050262451171875,
-0.0012292861938476562,
0.038787841796875,
-0.00020360946655273438,
-0.0033416748046875,
-0.040557861328125,
0.057647705078125,
0.005695343017578125,
-0.030670166015625,
0.057647705078125,
-0.00901031494140625,
-0.018890380859375,
0.02593994140625,
-0.01397705078125,
0.089599609375,
0.0017414093017578125,
-0.060272216796875,
-0.0261993408203125,
-0.0106964111328125,
-0.036956787109375,
0.0285186767578125,
0.0259552001953125,
-0.06402587890625,
0.06890869140625,
-0.006557464599609375,
0.027557373046875,
-0.01555633544921875,
-0.038604736328125,
0.00926971435546875,
-0.0151214599609375,
0.022918701171875,
0.01200103759765625,
0.0014019012451171875,
0.0021190643310546875,
0.0176239013671875,
0.004131317138671875,
-0.01483154296875,
0.06585693359375,
-0.0251007080078125,
0.01346588134765625,
0.01537322998046875,
-0.02496337890625,
-0.018768310546875,
-0.009368896484375,
-0.0028858184814453125,
-0.06658935546875,
-0.027069091796875,
0.01279449462890625,
0.034027099609375,
-0.0136871337890625,
0.04193115234375,
-0.03753662109375,
-0.0187835693359375,
-0.02117919921875,
0.022796630859375,
0.027252197265625,
0.0155181884765625,
-0.0262451171875,
-0.007427215576171875,
0.0072784423828125,
-0.021484375,
0.00838470458984375,
-0.0193328857421875,
0.0300445556640625,
0.03204345703125,
0.045166015625,
-0.0091094970703125,
0.033935546875,
-0.0325927734375,
0.07098388671875,
0.047637939453125,
0.003826141357421875,
-0.006389617919921875,
0.013336181640625,
-0.0007386207580566406,
-0.01183319091796875,
0.033203125,
-0.01433563232421875,
0.008209228515625,
-0.047088623046875,
-0.00963592529296875,
0.005580902099609375,
-0.0164947509765625,
-0.06298828125,
-0.00806427001953125,
0.05224609375,
-0.0270843505859375,
-0.0216217041015625,
0.0286102294921875,
-0.006683349609375,
-0.0142974853515625,
0.0011873245239257812,
0.0012340545654296875,
0.0286712646484375,
0.0024929046630859375,
-0.005340576171875,
-0.0239410400390625,
0.0147705078125,
0.05718994140625,
-0.0936279296875,
0.0418701171875,
0.052459716796875,
0.00804901123046875,
0.01149749755859375,
-0.035400390625,
-0.0181427001953125,
-0.00962066650390625,
-0.0301361083984375,
-0.056304931640625,
-0.05682373046875,
0.0293426513671875,
-0.06170654296875,
0.0180206298828125,
0.043731689453125,
-0.0294342041015625,
-0.003509521484375,
0.00991058349609375,
0.01453399658203125,
0.086181640625,
-0.011199951171875,
-0.0308380126953125,
-0.0059051513671875,
0.005138397216796875,
0.0116119384765625,
-0.00836181640625,
0.0037403106689453125,
-0.02130126953125,
-0.00949859619140625,
0.0007762908935546875,
-0.0048675537109375,
0.0121307373046875,
-0.032562255859375,
-0.024200439453125,
0.046875,
0.005596160888671875,
-0.0088653564453125,
-0.0259246826171875,
-0.015899658203125,
-0.0171051025390625,
0.05389404296875,
-0.0113067626953125,
-0.00000852346420288086,
-0.0228271484375,
0.03485107421875,
0.0030651092529296875,
-0.0182952880859375,
0.035491943359375,
-0.0360107421875,
-0.01019287109375,
0.0248565673828125,
0.044952392578125,
-0.0014972686767578125,
0.0036258697509765625,
-0.00839996337890625,
0.0172271728515625,
0.03472900390625,
-0.019744873046875,
-0.04443359375,
-0.005611419677734375,
-0.045623779296875,
0.00396728515625,
0.0233001708984375,
-0.00516510009765625,
0.00004881620407104492,
0.0208282470703125,
-0.0023288726806640625,
0.0159149169921875,
-0.006198883056640625,
-0.00878143310546875,
0.0148468017578125,
-0.010467529296875,
-0.0041351318359375,
0.0217132568359375,
-0.06146240234375,
-0.0236358642578125,
0.00766754150390625,
-0.010528564453125,
0.01415252685546875,
0.026092529296875,
-0.038177490234375,
0.00933837890625,
0.0172576904296875,
0.00350189208984375,
-0.10443115234375,
0.025482177734375,
0.0687255859375,
-0.05523681640625,
-0.0283355712890625,
0.01187896728515625,
-0.017791748046875,
0.016082763671875,
-0.05072021484375,
-0.007167816162109375,
0.004093170166015625,
-0.0231781005859375,
0.01690673828125,
-0.00189971923828125,
0.018890380859375,
-0.0294189453125,
0.0108642578125,
-0.020050048828125,
0.027587890625,
0.002109527587890625,
0.0297393798828125,
0.024139404296875,
-0.01216888427734375,
0.00022649765014648438,
0.022003173828125,
-0.0186004638671875,
-0.00037932395935058594,
-0.01258087158203125,
0.0055389404296875,
0.0139007568359375,
0.00650787353515625,
0.04364013671875,
-0.0162811279296875,
0.0004935264587402344,
-0.006683349609375,
-0.07489013671875,
-0.02752685546875,
-0.0262603759765625,
0.0009670257568359375,
-0.036163330078125,
0.005580902099609375
] |
80a02f1239f992b89919060bc1ef1a6729a1bd3b
|
Wordpress Stackexchange
Q: Minimum Template Files for Theme Development WordPress has minimum theme template files as
*
*style.css
*index.php
and also some other files as listed here.
If the theme developer wants to build theme with less bells and whistles, what are some of the template files which should be included at minimum? There isn't any guidelines in the WordPress codex. Only thing that you can find is what files and when to include them. For making use of most of the WordPress functions without any conflict, there doesn't seem to be specific number mentioned for number of template files.
So how many files should be there when you build a theme from say raw html template?
A: Two - styles.css and index.php.
If you're gonna add additional functionality (some filters or actions) add to list functions.php.
If you're gonna add additional templates + number of templates
add screenshot of your theme + screenshot.(jpeg|png|gif)
It all depends on you. But minimum requirements are style.css and index.php.
|
Q: Minimum Template Files for Theme Development WordPress has minimum theme template files as
*
*style.css
*index.php
and also some other files as listed here.
If the theme developer wants to build theme with less bells and whistles, what are some of the template files which should be included at minimum? There isn't any guidelines in the WordPress codex. Only thing that you can find is what files and when to include them. For making use of most of the WordPress functions without any conflict, there doesn't seem to be specific number mentioned for number of template files.
So how many files should be there when you build a theme from say raw html template?
A: Two - styles.css and index.php.
If you're gonna add additional functionality (some filters or actions) add to list functions.php.
If you're gonna add additional templates + number of templates
add screenshot of your theme + screenshot.(jpeg|png|gif)
It all depends on you. But minimum requirements are style.css and index.php.
A: To have the theme listed:
*
*style.css
With at minimum this:
/*
Theme Name: Minimum Theme
Description: Test
Author: Test
Version: 1.0
*/
For the theme to be functional:
*
*index.php
index.php must have a post loop, so this would be the bare minimum functional index.php
<html>
<head><?php wp_head(); ?></head>
<body>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
the_title( '<h3>', '</h3>' );
the_content();
}
}
wp_footer();
?>
</body>
</html>
index.php is the defacto fallback for all template files WordPress might look for. All the rest are entirely optional, though I advise that you use them.
For more information on which templates are possible, see here:
http://codex.wordpress.org/Template_Hierarchy
|
wordpress
|
{
"language": "en",
"length": 276,
"provenance": "stackexchange_00019.jsonl.gz:428560",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84064"
}
|
[
-0.0112457275390625,
-0.036773681640625,
-0.0094757080078125,
-0.0006175041198730469,
-0.04119873046875,
-0.002773284912109375,
-0.0033550262451171875,
-0.01523590087890625,
-0.040191650390625,
0.015533447265625,
-0.0160064697265625,
0.033660888671875,
-0.0167388916015625,
-0.0100555419921875,
0.042999267578125,
-0.0296478271484375,
0.05328369140625,
-0.039642333984375,
0.0217742919921875,
-0.005290985107421875,
0.0249176025390625,
0.0213623046875,
0.0209503173828125,
0.08099365234375,
0.004314422607421875,
-0.03887939453125,
0.0697021484375,
-0.0189056396484375,
-0.022674560546875,
-0.045989990234375,
0.0145263671875,
0.060516357421875,
0.015777587890625,
0.0158233642578125,
-0.0137481689453125,
0.007350921630859375,
0.0009284019470214844,
-0.0019178390502929688,
0.0030536651611328125,
0.0278778076171875,
0.0017633438110351562,
-0.0034389495849609375,
0.04510498046875,
-0.0007543563842773438,
0.003971099853515625,
-0.0257720947265625,
0.002033233642578125,
-0.05120849609375,
-0.00131988525390625,
-0.031158447265625,
0.01204681396484375,
-0.013153076171875,
0.029296875,
-0.034912109375,
-0.0026607513427734375,
0.0094146728515625,
0.01296234130859375,
-0.01195526123046875,
0.03363037109375,
-0.036102294921875,
-0.044677734375,
-0.018280029296875,
0.034454345703125,
-0.006740570068359375,
-0.01216888427734375,
-0.016510009765625,
-0.042236328125,
0.037933349609375,
-0.02789306640625,
-0.0089263916015625,
0.01580810546875,
-0.032135009765625,
-0.008453369140625,
-0.041778564453125,
0.043670654296875,
0.035614013671875,
-0.035003662109375,
-0.006500244140625,
0.011383056640625,
0.03302001953125,
0.009002685546875,
-0.01302337646484375,
-0.023956298828125,
-0.05615234375,
0.060089111328125,
-0.006134033203125,
-0.0012617111206054688,
-0.01453399658203125,
-0.02734375,
-0.0213775634765625,
-0.029327392578125,
0.01177215576171875,
-0.045166015625,
-0.008697509765625,
-0.01499176025390625,
-0.0238494873046875,
0.006206512451171875,
0.040069580078125,
-0.007526397705078125,
0.0306854248046875,
-0.005184173583984375,
-0.0255889892578125,
0.052398681640625,
-0.032562255859375,
-0.01335906982421875,
0.07452392578125,
-0.00376129150390625,
0.0390625,
0.013671875,
0.027496337890625,
0.027191162109375,
-0.0264434814453125,
-0.0058441162109375,
-0.0178375244140625,
-0.0203094482421875,
0.0214080810546875,
-0.022674560546875,
0.005138397216796875,
-0.0007567405700683594,
0.004428863525390625,
0.01264190673828125,
0.0291595458984375,
0.0151824951171875,
-0.0034961700439453125,
-0.022674560546875,
-0.0185089111328125,
-0.0204620361328125,
-0.044952392578125,
0.02069091796875,
0.035400390625,
-0.01284027099609375,
0.0025463104248046875,
0.003650665283203125,
-0.0132293701171875,
-0.032501220703125,
-0.0249481201171875,
0.0111236572265625,
-0.005100250244140625,
-0.0106353759765625,
0.007965087890625,
-0.0238037109375,
-0.01202392578125,
0.0228118896484375,
-0.0283660888671875,
0.00009298324584960938,
-0.0014190673828125,
0.0236053466796875,
0.024932861328125,
-0.0115966796875,
0.0009031295776367188,
0.00487518310546875,
-0.009490966796875,
0.0225067138671875,
0.00936126708984375,
0.0084991455078125,
-0.036834716796875,
-0.00701141357421875,
-0.02081298828125,
0.01165771484375,
-0.028106689453125,
-0.033660888671875,
0.005741119384765625,
0.05206298828125,
-0.0185699462890625,
-0.0211181640625,
0.006366729736328125,
-0.0197296142578125,
-0.007183074951171875,
0.02349853515625,
-0.001804351806640625,
0.006053924560546875,
-0.039642333984375,
0.054595947265625,
0.016998291015625,
-0.0048370361328125,
0.033966064453125,
0.0227813720703125,
-0.0191497802734375,
-0.0031299591064453125,
0.07916259765625,
0.005615234375,
-0.021575927734375,
0.0214691162109375,
-0.0181121826171875,
-0.06903076171875,
0.0226898193359375,
-0.001552581787109375,
0.0697021484375,
0.051361083984375,
0.01407623291015625,
0.0259857177734375,
-0.02264404296875,
-0.006603240966796875,
-0.0101165771484375,
-0.0210418701171875,
-0.01251983642578125,
-0.00527191162109375,
0.02166748046875,
-0.019378662109375,
0.01026153564453125,
-0.01168060302734375,
0.0008554458618164062,
0.009246826171875,
-0.006717681884765625,
-0.02142333984375,
-0.0018587112426757812,
-0.01302337646484375,
0.0357666015625,
-0.01383209228515625,
0.0182037353515625,
0.0203704833984375,
0.00927734375,
-0.0236968994140625,
-0.041778564453125,
-0.0223388671875,
0.0177459716796875,
0.004299163818359375,
0.0274200439453125,
0.0218963623046875,
0.01342010498046875,
0.04150390625,
-0.0223541259765625,
0.0246429443359375,
0.0270233154296875,
0.0134735107421875,
0.01314544677734375,
-0.034576416015625,
-0.0053558349609375,
-0.015777587890625,
0.044036865234375,
-0.053863525390625,
0.02325439453125,
0.006134033203125,
0.018524169921875,
-0.043548583984375,
-0.003658294677734375,
-0.0303802490234375,
-0.01104736328125,
0.0008096694946289062,
0.037017822265625,
0.02801513671875,
0.01654052734375,
-0.0023746490478515625,
0.033538818359375,
0.068115234375,
-0.00019311904907226562,
0.00557708740234375,
0.020599365234375,
0.035400390625,
0.0361328125,
-0.0015668869018554688,
-0.043212890625,
0.01666259765625,
-0.083740234375,
-0.0002613067626953125,
0.0158843994140625,
-0.04803466796875,
-0.04901123046875,
0.01788330078125,
0.011932373046875,
0.012847900390625,
-0.022491455078125,
-0.0228729248046875,
-0.006023406982421875,
0.01309967041015625,
0.032745361328125,
0.01337432861328125,
0.01351165771484375,
-0.034637451171875,
0.04290771484375,
0.0179901123046875,
-0.042510986328125,
0.0143280029296875,
0.039886474609375,
-0.0252227783203125,
0.06842041015625,
-0.007061004638671875,
-0.020172119140625,
0.011322021484375,
0.035858154296875,
-0.0260162353515625,
-0.00946807861328125,
-0.0002391338348388672,
-0.015380859375,
0.0194244384765625,
-0.04962158203125,
0.0192413330078125,
-0.01898193359375,
0.04107666015625,
0.0153045654296875,
0.0204315185546875,
0.0199127197265625,
-0.0123138427734375,
0.040435791015625,
0.01348114013671875,
-0.0166168212890625,
0.040985107421875,
-0.0271759033203125,
0.03668212890625,
-0.016571044921875,
0.01226806640625,
0.05029296875,
-0.003173828125,
0.00537872314453125,
0.00003743171691894531,
0.01544189453125,
0.021820068359375,
-0.0005269050598144531,
-0.01666259765625,
-0.0249176025390625,
-0.0108642578125,
0.0007386207580566406,
0.01470947265625,
0.0023899078369140625,
-0.0006880760192871094,
-0.022613525390625,
-0.0247039794921875,
0.0100860595703125,
-0.038299560546875,
-0.013641357421875,
-0.001163482666015625,
-0.030548095703125,
-0.037841796875,
-0.011993408203125,
-0.0210723876953125,
0.00008130073547363281,
-0.0161895751953125,
-0.0079193115234375,
-0.035186767578125,
-0.04730224609375,
-0.0654296875,
-0.10272216796875,
-0.07598876953125,
-0.033935546875,
-0.007541656494140625,
0.007595062255859375,
-0.005008697509765625,
0.106689453125,
0.0001748800277709961,
-0.077392578125,
-0.037689208984375,
-0.00879669189453125,
-0.017059326171875,
0.00609588623046875,
0.042938232421875,
-0.0295867919921875,
0.017425537109375,
0.009918212890625,
-0.0438232421875,
0.050445556640625,
-0.039154052734375,
-0.0192718505859375,
-0.051727294921875,
-0.05584716796875,
-0.065673828125,
0.060943603515625,
0.0748291015625,
-0.09613037109375,
-0.0251617431640625,
-0.0872802734375,
-0.0587158203125,
0.007171630859375,
-0.037811279296875,
0.059539794921875,
0.032745361328125,
-0.0214385986328125,
0.007656097412109375,
0.0303955078125,
0.013580322265625,
-0.002773284912109375,
-0.03509521484375,
-0.019989013671875,
0.06640625,
0.0175933837890625,
0.031768798828125,
-0.005405426025390625,
0.01678466796875,
-0.0438232421875,
-0.005767822265625,
-0.00495147705078125,
-0.02734375,
-0.0207366943359375,
0.005680084228515625,
-0.033050537109375,
-0.031402587890625,
0.04974365234375,
-0.000054895877838134766,
0.0300140380859375,
-0.04376220703125,
-0.022308349609375,
-0.043670654296875,
0.062347412109375,
-0.00323486328125,
-0.01995849609375,
-0.0119476318359375,
0.0303802490234375,
-0.027862548828125,
-0.0640869140625,
0.0020198822021484375,
-0.0111846923828125,
-0.03985595703125,
0.01666259765625,
-0.0177459716796875,
-0.018524169921875,
0.005016326904296875,
-0.0531005859375,
-0.0124359130859375,
-0.04937744140625,
0.0079803466796875,
0.036041259765625,
0.0178680419921875,
0.005657196044921875,
0.0168914794921875,
-0.004825592041015625,
0.0089111328125,
-0.0196533203125,
-0.020233154296875,
-0.00325775146484375,
-0.039031982421875,
0.019927978515625,
0.03387451171875,
-0.0125885009765625,
0.01351165771484375,
0.0216827392578125,
-0.04302978515625,
0.001613616943359375,
0.0010509490966796875,
0.03594970703125,
-0.01371002197265625,
0.01093292236328125,
0.00782012939453125,
-0.01485443115234375,
-0.01708984375,
-0.024261474609375,
-0.0241241455078125,
0.038421630859375,
-0.006114959716796875,
0.0261077880859375,
0.01525115966796875,
-0.01363372802734375,
-0.006801605224609375,
0.00047516822814941406,
0.032073974609375,
0.02117919921875,
0.02508544921875,
-0.003589630126953125,
-0.0082550048828125,
0.0073699951171875,
0.040069580078125,
0.0269622802734375,
-0.01241302490234375,
0.00916290283203125,
0.07867431640625,
0.0231781005859375,
-0.039093017578125,
-0.09930419921875,
0.0218963623046875,
0.05035400390625,
0.04754638671875,
-0.003910064697265625,
-0.0098114013671875,
-0.04266357421875,
0.034149169921875,
0.0292816162109375,
-0.01131439208984375,
0.001171112060546875,
0.03472900390625,
-0.022186279296875,
-0.03961181640625,
0.0227813720703125,
-0.036712646484375,
0.01348114013671875,
0.024566650390625,
-0.005939483642578125,
-0.0271759033203125,
0.00592041015625,
0.04754638671875,
-0.01068115234375,
0.0075531005859375,
-0.045501708984375,
-0.01433563232421875,
-0.01502227783203125,
-0.01232147216796875,
0.06353759765625,
0.0255584716796875,
-0.0079193115234375,
0.03680419921875,
0.054107666015625,
-0.0098114013671875,
0.0297698974609375,
-0.00366973876953125,
0.007579803466796875,
-0.0108489990234375,
0.08319091796875,
-0.0143280029296875,
0.0034942626953125,
0.0030841827392578125,
0.0261993408203125,
0.02337646484375,
-0.031829833984375,
-0.023284912109375,
0.006076812744140625,
0.0222015380859375,
-0.002071380615234375,
-0.019927978515625,
0.060546875,
0.005100250244140625,
-0.0276641845703125,
-0.005550384521484375,
-0.048919677734375,
-0.040130615234375,
-0.060089111328125,
-0.0235137939453125,
0.005519866943359375,
-0.030059814453125,
0.039154052734375,
-0.047698974609375,
0.0211029052734375,
-0.036285400390625,
-0.0025196075439453125,
0.003009796142578125,
0.003116607666015625,
0.02154541015625,
0.01308441162109375,
0.0090789794921875,
-0.0023021697998046875,
-0.010467529296875,
0.02056884765625,
-0.050262451171875,
-0.0212554931640625,
-0.007198333740234375,
0.056396484375,
-0.050140380859375,
-0.03070068359375,
0.046234130859375,
-0.0195159912109375,
0.020111083984375,
-0.0160064697265625,
-0.0183563232421875,
-0.004245758056640625,
0.0024547576904296875,
-0.0240631103515625,
-0.002727508544921875,
-0.01476287841796875,
-0.01311492919921875,
0.0145263671875,
-0.0033512115478515625,
0.01222991943359375,
0.06976318359375,
-0.05572509765625,
0.00785064697265625,
0.01279449462890625,
-0.05322265625,
0.01357269287109375,
0.01308441162109375,
-0.1068115234375,
-0.08917236328125,
0.00484466552734375,
0.006122589111328125,
0.026702880859375,
-0.0108184814453125,
0.0026187896728515625,
-0.0180816650390625,
0.0020084381103515625,
0.026947021484375,
0.0163726806640625,
0.0084228515625,
-0.0296173095703125,
-0.04071044921875,
-0.0267181396484375,
-0.05023193359375,
-0.01763916015625,
-0.03460693359375,
-0.037200927734375,
-0.03826904296875,
0.019989013671875,
-0.021240234375,
-0.0004906654357910156,
0.0147857666015625,
0.0282440185546875,
-0.037017822265625,
0.039703369140625,
0.0132598876953125,
0.02606201171875,
-0.044219970703125,
0.06939697265625,
0.0034637451171875,
0.0210113525390625,
-0.0017566680908203125,
0.031463623046875,
0.0013952255249023438,
-0.01435089111328125,
0.02545166015625,
0.0226898193359375,
-0.0263519287109375,
-0.0289306640625,
-0.03515625,
-0.0190277099609375,
0.0885009765625,
-0.00997161865234375,
0.0007567405700683594,
-0.029693603515625,
-0.0004987716674804688,
-0.01092529296875,
0.06475830078125,
-0.025726318359375,
-0.0267181396484375,
0.0273895263671875,
0.0140533447265625,
0.049713134765625,
-0.0279693603515625,
-0.0323486328125,
0.0305023193359375,
-0.004558563232421875,
0.0238494873046875,
0.018280029296875,
-0.035858154296875,
0.0523681640625,
0.0277252197265625,
-0.0213775634765625,
0.013031005859375,
-0.002025604248046875,
0.01354217529296875,
-0.001926422119140625,
0.04937744140625,
-0.01485443115234375,
-0.0650634765625,
0.04473876953125,
0.022674560546875,
-0.03509521484375,
0.033599853515625,
-0.04443359375,
0.0059661865234375,
0.08935546875,
0.055999755859375,
-0.0953369140625,
-0.01983642578125,
-0.00299072265625,
-0.02166748046875,
0.006046295166015625,
-0.0007777214050292969,
-0.00946044921875,
-0.06256103515625,
0.0460205078125,
0.033721923828125,
0.009307861328125,
0.0170440673828125,
-0.002849578857421875,
-0.01490020751953125,
-0.0160369873046875,
0.049774169921875,
0.00644683837890625,
-0.03466796875,
-0.0021572113037109375,
0.01788330078125,
0.002155303955078125,
-0.006580352783203125,
0.04107666015625,
-0.01715087890625,
0.00905609130859375,
-0.0035114288330078125,
0.037445068359375,
-0.0036830902099609375,
-0.020477294921875,
-0.0274658203125,
-0.0037860870361328125,
0.0111541748046875,
0.029266357421875,
-0.031402587890625,
0.01036834716796875,
0.0040130615234375,
0.0271148681640625,
-0.030609130859375,
-0.0081024169921875,
0.0293121337890625,
-0.015716552734375,
-0.0207977294921875,
0.01763916015625,
-0.03619384765625,
-0.031036376953125,
-0.017059326171875,
-0.0012922286987304688,
0.07586669921875,
-0.01300811767578125,
-0.0250396728515625,
0.03271484375,
0.01129150390625,
-0.0291748046875,
-0.0223846435546875,
0.04425048828125,
-0.0504150390625,
0.007232666015625,
0.003932952880859375,
0.0245361328125,
0.0005235671997070312,
-0.0053253173828125,
-0.049896240234375,
0.092041015625,
-0.005420684814453125,
0.0333251953125,
0.039215087890625,
0.0274658203125,
-0.049896240234375,
0.01517486572265625,
0.0083465576171875,
0.02569580078125,
0.0125579833984375,
0.0172119140625,
0.003368377685546875,
-0.003246307373046875,
0.0164947509765625,
0.0355224609375,
0.05548095703125,
-0.0007843971252441406,
0.016387939453125,
0.018829345703125,
0.09490966796875,
0.03411865234375,
-0.011505126953125,
0.004955291748046875,
-0.025115966796875,
-0.035125732421875,
-0.046417236328125,
-0.0058746337890625,
0.0109405517578125,
-0.048309326171875,
-0.06036376953125,
-0.01332855224609375,
-0.00396728515625,
-0.01904296875,
0.0172576904296875,
-0.02880859375,
-0.03948974609375,
0.0018987655639648438,
0.01898193359375,
-0.0087890625,
-0.0088348388671875,
0.0177154541015625,
0.0212554931640625,
-0.053558349609375,
0.0093536376953125,
-0.032989501953125,
0.0465087890625,
0.001949310302734375,
-0.01369476318359375,
-0.007480621337890625,
0.004756927490234375,
0.015838623046875,
-0.0191497802734375,
-0.01163482666015625,
0.03387451171875,
-0.02313232421875,
0.046600341796875,
0.008636474609375,
0.02178955078125,
-0.03192138671875,
0.01155853271484375,
-0.01509857177734375,
0.0386962890625,
-0.03173828125,
-0.0007886886596679688,
0.00870513916015625,
0.02740478515625,
0.0017366409301757812,
-0.016082763671875,
0.020599365234375,
0.013763427734375,
0.03125,
-0.01316070556640625,
-0.01390838623046875,
0.0196990966796875,
-0.0228424072265625,
-0.01451873779296875,
-0.007678985595703125,
0.03375244140625,
0.036529541015625,
-0.00885009765625,
0.0347900390625,
0.01861572265625,
-0.00798797607421875,
-0.03424072265625,
0.039794921875,
0.0027980804443359375,
0.00881195068359375,
-0.020111083984375,
0.020843505859375,
0.021209716796875,
-0.0063934326171875,
0.00606536865234375,
0.010650634765625,
0.0089111328125,
0.01227569580078125,
0.01490020751953125,
0.01490020751953125,
0.0438232421875,
0.0106201171875,
-0.045074462890625,
-0.0054931640625,
-0.0110321044921875,
-0.0439453125,
-0.01165008544921875,
-0.041656494140625,
-0.0082855224609375,
0.01507568359375,
-0.02215576171875,
0.0172119140625,
-0.0264129638671875,
0.051025390625,
-0.038421630859375,
-0.0164642333984375,
0.00691986083984375,
-0.017608642578125,
0.037628173828125,
-0.007564544677734375,
-0.00650787353515625,
-0.01348114013671875,
-0.0241241455078125,
0.0182647705078125,
-0.00264739990234375,
-0.04119873046875,
-0.005977630615234375,
0.02740478515625,
-0.03057861328125,
0.0304718017578125,
0.040252685546875,
-0.00730133056640625,
-0.0047760009765625,
-0.00028443336486816406,
0.0211029052734375,
-0.00559234619140625,
0.031524658203125,
0.0206756591796875,
-0.03515625,
-0.033050537109375,
-0.0168914794921875,
0.04937744140625,
0.0094146728515625,
0.1134033203125,
-0.041717529296875,
0.00803375244140625,
0.015045166015625,
-0.00308990478515625,
0.0133056640625,
-0.00201416015625,
0.04522705078125,
-0.0026721954345703125,
-0.0162811279296875,
-0.024261474609375,
-0.0643310546875,
-0.0006160736083984375,
0.050079345703125,
-0.0310821533203125,
0.027252197265625,
0.00394439697265625,
0.01438140869140625,
-0.05609130859375,
-0.0097503662109375,
-0.0283355712890625,
-0.08538818359375,
-0.05712890625,
0.03863525390625,
-0.0133209228515625,
-0.00708770751953125,
-0.050628662109375,
0.019683837890625,
0.0186614990234375,
-0.019561767578125,
0.013824462890625,
-0.0137481689453125,
0.0270843505859375,
0.040252685546875,
0.023223876953125,
-0.05316162109375,
0.018463134765625,
-0.0137786865234375,
0.00795745849609375,
-0.007579803466796875,
0.0682373046875,
-0.014129638671875,
-0.04632568359375,
0.04107666015625,
0.05047607421875,
0.04150390625,
-0.044158935546875,
0.002315521240234375,
0.0655517578125,
-0.0192718505859375,
0.03717041015625,
0.0037384033203125,
-0.0055389404296875,
0.00128936767578125,
-0.033447265625,
0.0215911865234375,
-0.024444580078125,
-0.0367431640625,
-0.059814453125,
0.01617431640625,
0.01297760009765625,
-0.006320953369140625,
-0.02081298828125,
0.020538330078125,
-0.0295562744140625,
0.0264434814453125,
-0.0222320556640625,
0.0262603759765625,
-0.01409912109375,
0.0022640228271484375,
-0.0231475830078125,
-0.0261688232421875,
-0.009307861328125,
0.037811279296875,
0.007404327392578125,
0.033782958984375,
0.055450439453125,
-0.01788330078125,
0.0009427070617675781,
0.048858642578125,
0.0244293212890625,
0.10028076171875,
-0.027923583984375,
-0.0238494873046875,
0.0572509765625,
-0.00887298583984375,
-0.011932373046875,
-0.09466552734375,
-0.038909912109375,
-0.042877197265625,
0.060882568359375,
-0.0200347900390625,
0.00467681884765625,
0.01959228515625,
-0.04559326171875,
-0.10504150390625,
0.0728759765625,
-0.0377197265625,
-0.039459228515625,
-0.028900146484375,
0.009307861328125,
-0.0311126708984375,
0.01111602783203125,
-0.017852783203125,
-0.0007839202880859375,
0.0206756591796875,
0.041229248046875,
0.0240936279296875,
-0.044586181640625,
0.07659912109375,
0.001522064208984375,
-0.0401611328125,
0.006290435791015625,
0.015869140625,
-0.0084381103515625,
-0.01158905029296875,
-0.011810302734375,
0.028717041015625,
0.048248291015625,
-0.015838623046875,
-0.03582763671875,
0.0152587890625,
-0.023223876953125,
0.003322601318359375,
0.0057373046875,
-0.02520751953125,
-0.01190948486328125,
0.06597900390625,
0.03912353515625,
0.017059326171875,
-0.0137939453125,
0.01171875,
-0.023895263671875,
-0.022064208984375,
-0.009735107421875,
0.016571044921875,
-0.052459716796875,
-0.01175689697265625,
0.026641845703125,
-0.02838134765625,
0.001979827880859375,
-0.03411865234375,
-0.054107666015625,
0.0206451416015625,
-0.044921875,
0.0096588134765625,
-0.03955078125,
-0.0105743408203125,
0.069580078125,
-0.00969696044921875,
0.070068359375,
-0.033599853515625,
0.0396728515625,
0.0841064453125,
0.007293701171875,
0.0006098747253417969,
0.033782958984375,
-0.0243988037109375,
0.02716064453125,
0.0120697021484375,
0.0305023193359375,
-0.031890869140625,
0.0014047622680664062,
0.0034885406494140625,
0.0203704833984375,
-0.0016498565673828125,
0.00647735595703125,
-0.0152587890625,
0.06280517578125,
-0.00804901123046875,
0.07781982421875,
-0.0208282470703125,
0.031097412109375,
-0.0220489501953125,
0.05462646484375,
-0.0217132568359375,
-0.00542449951171875,
-0.0029239654541015625,
-0.034942626953125,
0.0033245086669921875,
0.0191650390625,
0.00136566162109375,
-0.020050048828125,
0.0269012451171875,
-0.0186004638671875,
-0.005786895751953125,
0.0187225341796875
] |
cfd46cbf730ba37422f58f4bfba20149be4add9b
|
Wordpress Stackexchange
Q: Action hook 'wp' firing twice... why? I noticed that when I hook into 'wp' it seems to be firing twice -- for example
add_action('wp', 'just_testing');
function just_testing(){
global $post;
error_log($post->ID);
}
returns into my error_log the following two entries:
[01-Feb-2013 13:06:58 UTC] 1120
[01-Feb-2013 13:06:58 UTC]
I searched google and stackexchange and the thread "What would cause the 'wp' action to fire twice per page (but only once per post) in Firefox only?" does not apply because I am getting the two firings in all browsers.
Thanks for any help!
A: It can happen if one of the files you include in the theme is returning 404 Not Found error. Like, if you're linking to a .js or .css or an image which does not exist on that location. Use the Inspector in your browser to see if you get any 404 errors, anywhere.
Fix them and try again.
|
Q: Action hook 'wp' firing twice... why? I noticed that when I hook into 'wp' it seems to be firing twice -- for example
add_action('wp', 'just_testing');
function just_testing(){
global $post;
error_log($post->ID);
}
returns into my error_log the following two entries:
[01-Feb-2013 13:06:58 UTC] 1120
[01-Feb-2013 13:06:58 UTC]
I searched google and stackexchange and the thread "What would cause the 'wp' action to fire twice per page (but only once per post) in Firefox only?" does not apply because I am getting the two firings in all browsers.
Thanks for any help!
A: It can happen if one of the files you include in the theme is returning 404 Not Found error. Like, if you're linking to a .js or .css or an image which does not exist on that location. Use the Inspector in your browser to see if you get any 404 errors, anywhere.
Fix them and try again.
A: Search for 'wp', and "wp" (quotes included) in the files of your plugins directory and sub-directories (default wp-content/plugins) and your current theme's directory and sub-directories (default wp-content/themes/YOUR-THEME).
In WP core files (3.5), the wp action is only fired once, with do_action_ref_array in wp-includes/class-wp.php. Probably a 3rd party (plugin/theme) is calling do_action('wp'....
Note: a quick way to rule out a misbehaving plugin is put your testing code in your theme's functions.php, rename your plugins directory to something like plugins.temp and access your front-end. Then, rename your plugins directory back to plugins.
|
wordpress
|
{
"language": "en",
"length": 241,
"provenance": "stackexchange_00019.jsonl.gz:428564",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84082"
}
|
[
0.0278778076171875,
0.00679779052734375,
-0.047821044921875,
-0.0210113525390625,
0.0255584716796875,
-0.034942626953125,
0.035003662109375,
0.00130462646484375,
-0.037109375,
0.039337158203125,
-0.0291595458984375,
0.042724609375,
0.010589599609375,
-0.007061004638671875,
-0.0009441375732421875,
-0.00995635986328125,
0.039520263671875,
-0.031524658203125,
0.0215911865234375,
-0.0035343170166015625,
0.02130126953125,
0.01000213623046875,
0.0171356201171875,
0.05377197265625,
0.02691650390625,
-0.032440185546875,
0.03594970703125,
-0.034637451171875,
0.01241302490234375,
-0.0242156982421875,
0.01201629638671875,
0.01367950439453125,
0.0240020751953125,
0.03533935546875,
-0.04229736328125,
-0.0026607513427734375,
0.004077911376953125,
0.01617431640625,
-0.02740478515625,
0.0654296875,
0.02691650390625,
-0.0172119140625,
0.039306640625,
-0.03961181640625,
0.02252197265625,
-0.034393310546875,
0.0592041015625,
-0.039520263671875,
0.0006279945373535156,
-0.032135009765625,
0.01508331298828125,
0.053436279296875,
0.0262603759765625,
-0.0152740478515625,
-0.0017747879028320312,
0.0218963623046875,
-0.036346435546875,
0.059478759765625,
0.0206451416015625,
0.028350830078125,
-0.01537322998046875,
0.002544403076171875,
-0.015167236328125,
-0.043731689453125,
0.00811767578125,
0.012908935546875,
-0.0142059326171875,
0.0168609619140625,
-0.013519287109375,
0.0229644775390625,
0.0038852691650390625,
-0.033355712890625,
-0.0172576904296875,
0.004718780517578125,
0.00901031494140625,
-0.052459716796875,
0.0251312255859375,
-0.00891876220703125,
-0.0062103271484375,
0.0484619140625,
-0.030364990234375,
-0.0535888671875,
-0.041595458984375,
0.01085662841796875,
0.00991058349609375,
0.05035400390625,
-0.00931549072265625,
-0.010833740234375,
-0.0274505615234375,
-0.055389404296875,
-0.02099609375,
-0.044189453125,
-0.02496337890625,
-0.034210205078125,
-0.0216522216796875,
-0.047332763671875,
0.0160369873046875,
0.0245208740234375,
-0.0244903564453125,
-0.0166015625,
-0.0205535888671875,
-0.021697998046875,
-0.003147125244140625,
-0.01065826416015625,
0.010162353515625,
0.0303802490234375,
0.0082244873046875,
0.01551055908203125,
0.0322265625,
0.00896453857421875,
-0.00559234619140625,
0.0338134765625,
0.03076171875,
-0.01641845703125,
-0.0197296142578125,
-0.048004150390625,
-0.037750244140625,
0.0308990478515625,
0.018524169921875,
-0.0158843994140625,
-0.00970458984375,
0.004863739013671875,
-0.0008602142333984375,
0.0023670196533203125,
0.0019330978393554688,
-0.019561767578125,
-0.01471710205078125,
-0.0164947509765625,
0.031982421875,
0.016815185546875,
-0.004337310791015625,
0.01220703125,
0.047637939453125,
-0.01163482666015625,
-0.025665283203125,
-0.020172119140625,
-0.0007686614990234375,
0.03338623046875,
0.0039043426513671875,
0.0181427001953125,
-0.0146026611328125,
-0.050628662109375,
-0.0175628662109375,
0.018798828125,
0.0443115234375,
0.018707275390625,
0.01004791259765625,
-0.005001068115234375,
0.03192138671875,
0.0138092041015625,
0.001644134521484375,
-0.0126190185546875,
0.006053924560546875,
0.038055419921875,
-0.022186279296875,
0.001041412353515625,
0.0238800048828125,
-0.041717529296875,
0.0146331787109375,
-0.038543701171875,
-0.0044403076171875,
-0.017486572265625,
0.00859832763671875,
-0.0478515625,
-0.06451416015625,
0.020599365234375,
-0.0287017822265625,
-0.00212860107421875,
0.0275421142578125,
0.039031982421875,
-0.00043272972106933594,
0.02008056640625,
0.026153564453125,
-0.0081634521484375,
-0.01424407958984375,
-0.013458251953125,
0.01264190673828125,
0.0295562744140625,
0.0265960693359375,
-0.0295257568359375,
-0.0335693359375,
-0.044097900390625,
0.07000732421875,
-0.0413818359375,
-0.060699462890625,
0.0246734619140625,
0.03851318359375,
0.0784912109375,
-0.003498077392578125,
0.0301666259765625,
0.02777099609375,
0.0234527587890625,
-0.01300048828125,
0.037628173828125,
-0.0026454925537109375,
-0.051727294921875,
-0.006000518798828125,
-0.0209197998046875,
-0.0164337158203125,
0.0143890380859375,
0.0275726318359375,
0.034210205078125,
-0.031646728515625,
0.0105743408203125,
-0.111083984375,
0.035552978515625,
-0.041778564453125,
0.033050537109375,
-0.047698974609375,
-0.028076171875,
0.0245208740234375,
-0.016204833984375,
-0.0126953125,
-0.02374267578125,
-0.0216522216796875,
0.029510498046875,
-0.04296875,
-0.00525665283203125,
-0.0104827880859375,
0.0219573974609375,
-0.004840850830078125,
-0.029998779296875,
-0.041534423828125,
-0.0396728515625,
0.0552978515625,
-0.00904083251953125,
-0.031982421875,
-0.0364990234375,
0.007793426513671875,
0.0015773773193359375,
-0.07373046875,
0.0640869140625,
0.0237274169921875,
0.0675048828125,
0.0002123117446899414,
-0.00628662109375,
-0.0037288665771484375,
-0.056182861328125,
0.01013946533203125,
0.045654296875,
0.039520263671875,
0.0229644775390625,
-0.00980377197265625,
0.01015472412109375,
0.0206298828125,
-0.043212890625,
0.018402099609375,
-0.007221221923828125,
-0.00836944580078125,
0.01369476318359375,
0.0019502639770507812,
0.00030517578125,
0.02392578125,
-0.037841796875,
-0.0137176513671875,
0.041717529296875,
-0.0103302001953125,
-0.031890869140625,
-0.0026397705078125,
-0.011688232421875,
0.0260009765625,
-0.0521240234375,
-0.052032470703125,
-0.016845703125,
0.01270294189453125,
-0.053558349609375,
-0.0067901611328125,
-0.0198516845703125,
0.0205230712890625,
-0.033477783203125,
0.02545166015625,
-0.05743408203125,
-0.00540924072265625,
0.03289794921875,
0.037811279296875,
-0.016357421875,
-0.0262298583984375,
-0.017791748046875,
0.011932373046875,
0.0101165771484375,
-0.0273284912109375,
0.037200927734375,
-0.0243072509765625,
-0.0215911865234375,
0.003509521484375,
-0.019683837890625,
-0.02362060546875,
-0.06488037109375,
0.043670654296875,
-0.004581451416015625,
0.016998291015625,
0.01520538330078125,
-0.0172576904296875,
0.048187255859375,
-0.02001953125,
-0.03314208984375,
0.002197265625,
-0.0325927734375,
0.0325927734375,
-0.0304107666015625,
0.0262298583984375,
0.057708740234375,
-0.010894775390625,
0.013702392578125,
0.0126495361328125,
0.015045166015625,
0.032135009765625,
-0.00843048095703125,
-0.01459503173828125,
0.0007634162902832031,
-0.0234527587890625,
0.031402587890625,
0.032867431640625,
0.041015625,
0.00482177734375,
-0.033538818359375,
-0.002105712890625,
0.030029296875,
-0.09814453125,
-0.1168212890625,
-0.0352783203125,
-0.0487060546875,
0.038055419921875,
-0.0013437271118164062,
-0.00994873046875,
-0.034393310546875,
0.02777099609375,
0.0211029052734375,
-0.006404876708984375,
0.00769805908203125,
-0.003307342529296875,
-0.01995849609375,
-0.059722900390625,
0.005512237548828125,
0.01303863525390625,
0.0255279541015625,
0.003536224365234375,
0.06500244140625,
0.020111083984375,
-0.039459228515625,
0.01366424560546875,
-0.0245361328125,
-0.03277587890625,
0.015899658203125,
-0.018646240234375,
-0.0187835693359375,
0.004161834716796875,
0.0018815994262695312,
-0.0279083251953125,
-0.021148681640625,
0.03204345703125,
-0.035919189453125,
-0.0004260540008544922,
-0.0152435302734375,
0.042022705078125,
0.0249786376953125,
-0.0204315185546875,
-0.039886474609375,
0.036041259765625,
-0.06689453125,
0.007415771484375,
-0.01165008544921875,
-0.035125732421875,
-0.050018310546875,
0.0311279296875,
-0.0209503173828125,
-0.04486083984375,
-0.004268646240234375,
0.00864410400390625,
0.00269317626953125,
0.0570068359375,
0.0021991729736328125,
0.02508544921875,
-0.02935791015625,
-0.02813720703125,
-0.058990478515625,
-0.017974853515625,
-0.03411865234375,
-0.0196990966796875,
-0.0305938720703125,
0.034912109375,
-0.0017681121826171875,
-0.0100555419921875,
-0.04144287109375,
0.007083892822265625,
0.0038509368896484375,
-0.02130126953125,
0.01314544677734375,
-0.0135498046875,
0.00024890899658203125,
-0.0174560546875,
0.01160430908203125,
-0.05126953125,
-0.0137939453125,
0.0111236572265625,
0.0352783203125,
-0.0457763671875,
-0.07958984375,
-0.01065826416015625,
0.0006175041198730469,
-0.054168701171875,
0.00928497314453125,
0.0028133392333984375,
-0.0218658447265625,
-0.017974853515625,
0.0197906494140625,
-0.04852294921875,
-0.0252227783203125,
0.0269012451171875,
-0.07623291015625,
0.014434814453125,
-0.006443023681640625,
-0.0163116455078125,
-0.0199127197265625,
-0.03387451171875,
-0.04400634765625,
-0.0572509765625,
-0.0109405517578125,
-0.03167724609375,
0.06427001953125,
0.042938232421875,
-0.042266845703125,
-0.01300811767578125,
0.0133819580078125,
0.015716552734375,
0.040771484375,
0.032318115234375,
-0.00882720947265625,
0.065185546875,
0.0013599395751953125,
0.03253173828125,
-0.0007877349853515625,
0.005283355712890625,
-0.0169525146484375,
-0.045623779296875,
0.0042572021484375,
-0.036773681640625,
-0.0007390975952148438,
-0.01776123046875,
-0.0250701904296875,
-0.03985595703125,
-0.022613525390625,
0.0071563720703125,
0.026702880859375,
0.0017004013061523438,
0.000980377197265625,
-0.0226593017578125,
-0.049163818359375,
0.021087646484375,
-0.0635986328125,
0.00244903564453125,
0.003978729248046875,
0.0587158203125,
0.02978515625,
0.00888824462890625,
0.039154052734375,
-0.00414276123046875,
0.01448822021484375,
0.0007843971252441406,
0.01549530029296875,
0.01177978515625,
0.004150390625,
-0.023529052734375,
-0.0032558441162109375,
-0.003749847412109375,
-0.0343017578125,
0.072021484375,
-0.0085906982421875,
0.0159912109375,
-0.0013933181762695312,
-0.0170135498046875,
0.0029296875,
0.01910400390625,
-0.00572967529296875,
-0.0020999908447265625,
0.032135009765625,
0.03973388671875,
-0.050018310546875,
0.032379150390625,
-0.017120361328125,
0.026031494140625,
-0.03143310546875,
0.0232391357421875,
0.0673828125,
0.049530029296875,
0.009796142578125,
-0.003997802734375,
0.04669189453125,
-0.0107421875,
0.0123748779296875,
0.0244903564453125,
-0.0284576416015625,
0.0263824462890625,
-0.0011816024780273438,
-0.03497314453125,
-0.0013570785522460938,
-0.0032329559326171875,
0.0276641845703125,
0.00836181640625,
-0.03668212890625,
-0.029632568359375,
0.006011962890625,
0.0009741783142089844,
-0.00783538818359375,
-0.024444580078125,
-0.0161285400390625,
0.0235137939453125,
-0.01374053955078125,
0.0283050537109375,
0.0394287109375,
-0.023193359375,
-0.00778961181640625,
-0.0225372314453125,
-0.0171356201171875,
-0.007671356201171875,
0.06805419921875,
-0.00290679931640625,
0.03076171875,
0.0228271484375,
-0.045501708984375,
0.008941650390625,
0.0041046142578125,
0.06488037109375,
0.032928466796875,
-0.059112548828125,
-0.0180206298828125,
0.06500244140625,
0.00736236572265625,
-0.049468994140625,
-0.018463134765625,
0.064697265625,
0.038543701171875,
-0.0172271728515625,
-0.031890869140625,
0.0015316009521484375,
0.00782012939453125,
-0.025726318359375,
0.02972412109375,
0.0284423828125,
-0.035858154296875,
-0.0204315185546875,
0.01348876953125,
0.01036834716796875,
-0.01090240478515625,
-0.002643585205078125,
-0.0010242462158203125,
0.0285491943359375,
0.03961181640625,
0.0166015625,
-0.0244598388671875,
0.033905029296875,
0.0262451171875,
0.0009741783142089844,
-0.012603759765625,
-0.002140045166015625,
-0.0202178955078125,
0.00909423828125,
-0.0233917236328125,
-0.010986328125,
0.047821044921875,
-0.048492431640625,
-0.0277557373046875,
-0.01424407958984375,
0.046478271484375,
-0.0401611328125,
0.01053619384765625,
0.057342529296875,
0.044708251953125,
-0.04925537109375,
0.0030078887939453125,
-0.01453399658203125,
0.011993408203125,
-0.005397796630859375,
-0.04791259765625,
-0.017791748046875,
-0.0238494873046875,
0.01727294921875,
0.0171661376953125,
0.00510406494140625,
-0.0173187255859375,
0.0027484893798828125,
0.01432037353515625,
0.0172271728515625,
0.0309295654296875,
-0.04296875,
0.0350341796875,
0.0035247802734375,
0.0197296142578125,
-0.0181427001953125,
0.012481689453125,
0.044891357421875,
-0.0157928466796875,
0.00788116455078125,
-0.04412841796875,
0.00823974609375,
-0.004039764404296875,
-0.005161285400390625,
-0.02386474609375,
0.0009264945983886719,
-0.005329132080078125,
-0.035888671875,
0.0170440673828125,
0.004604339599609375,
-0.01378631591796875,
0.046539306640625,
0.05621337890625,
-0.03448486328125,
0.0210113525390625,
-0.03851318359375,
-0.005611419677734375,
-0.003971099853515625,
0.0006737709045410156,
0.03289794921875,
-0.036285400390625,
0.01145172119140625,
0.03106689453125,
0.004375457763671875,
-0.01430511474609375,
0.00974273681640625,
0.00865936279296875,
0.053985595703125,
0.0017414093017578125,
0.042083740234375,
0.046051025390625,
0.036376953125,
-0.018646240234375,
-0.032806396484375,
0.0215301513671875,
-0.0025787353515625,
-0.0140533447265625,
-0.004833221435546875,
-0.0166168212890625,
0.024322509765625,
0.03363037109375,
0.07354736328125,
-0.048828125,
0.0188751220703125,
0.0161590576171875,
-0.035491943359375,
0.035919189453125,
-0.0231475830078125,
0.010009765625,
0.0024127960205078125,
0.054351806640625,
0.02886962890625,
-0.00775909423828125,
0.0306396484375,
0.0034732818603515625,
-0.0163726806640625,
-0.016693115234375,
0.0168609619140625,
0.0165252685546875,
-0.03973388671875,
0.0145416259765625,
0.048980712890625,
0.00469207763671875,
-0.0231475830078125,
-0.02117919921875,
0.004638671875,
-0.0413818359375,
-0.06964111328125,
-0.0274505615234375,
-0.0211944580078125,
-0.010467529296875,
0.01229095458984375,
-0.0025234222412109375,
0.03076171875,
-0.0015316009521484375,
0.0128631591796875,
-0.0190582275390625,
-0.025787353515625,
-0.0046539306640625,
-0.054443359375,
0.008270263671875,
0.021575927734375,
0.053436279296875,
-0.039276123046875,
0.0273895263671875,
-0.06103515625,
0.035369873046875,
0.0208587646484375,
0.002857208251953125,
0.030609130859375,
-0.035614013671875,
-0.01381683349609375,
0.030242919921875,
-0.051605224609375,
0.0007252693176269531,
-0.017333984375,
-0.01190185546875,
-0.044586181640625,
-0.015625,
-0.0182342529296875,
-0.035552978515625,
0.0097198486328125,
-0.014556884765625,
-0.0369873046875,
0.0692138671875,
0.0003910064697265625,
0.01320648193359375,
0.017059326171875,
0.01462554931640625,
-0.0264892578125,
-0.00196075439453125,
-0.049041748046875,
0.07794189453125,
0.027984619140625,
0.038818359375,
-0.0161285400390625,
0.01226043701171875,
0.0230255126953125,
-0.035064697265625,
0.01410675048828125,
0.0064849853515625,
-0.0199432373046875,
-0.002605438232421875,
0.0284576416015625,
0.006992340087890625,
-0.0088958740234375,
0.035003662109375,
0.006500244140625,
-0.0081329345703125,
0.0211334228515625,
0.0010213851928710938,
0.030487060546875,
-0.0200653076171875,
-0.009246826171875,
0.025146484375,
-0.00445556640625,
-0.0305938720703125,
0.00537109375,
-0.00004035234451293945,
-0.045928955078125,
0.00928497314453125,
0.00769805908203125,
0.05377197265625,
-0.033477783203125,
0.0699462890625,
0.038543701171875,
0.00433349609375,
0.0203094482421875,
-0.0447998046875,
0.061614990234375,
0.0285797119140625,
-0.0230255126953125,
0.01523590087890625,
0.0123748779296875,
-0.00525665283203125,
0.02447509765625,
-0.0035266876220703125,
0.0574951171875,
-0.00530242919921875,
0.06463623046875,
0.0104217529296875,
0.02386474609375,
-0.038818359375,
0.0352783203125,
0.044403076171875,
0.07354736328125,
-0.05157470703125,
-0.09515380859375,
0.0010633468627929688,
0.00421905517578125,
0.0240478515625,
0.042694091796875,
0.0168609619140625,
-0.01727294921875,
0.058868408203125,
0.0213623046875,
-0.0206298828125,
-0.0260467529296875,
0.00922393798828125,
0.0048370361328125,
0.03533935546875,
0.0161895751953125,
-0.006458282470703125,
-0.044281005859375,
0.0153350830078125,
0.033233642578125,
0.08306884765625,
-0.03179931640625,
0.0858154296875,
-0.036590576171875,
-0.02960205078125,
0.018890380859375,
0.00885772705078125,
-0.062408447265625,
0.019805908203125,
-0.06524658203125,
-0.09130859375,
0.0032558441162109375,
0.059722900390625,
0.01447296142578125,
0.039520263671875,
0.01250457763671875,
0.0345458984375,
0.0169830322265625,
0.0030460357666015625,
0.041748046875,
-0.00997161865234375,
-0.0018463134765625,
-0.0056915283203125,
-0.02587890625,
0.00768280029296875,
-0.02532958984375,
0.0004456043243408203,
-0.0267791748046875,
0.032867431640625,
-0.0011386871337890625,
-0.0188751220703125,
0.007965087890625,
-0.032989501953125,
0.06207275390625,
0.0268707275390625,
0.0501708984375,
0.040283203125,
-0.0704345703125,
0.00455474853515625,
-0.0238800048828125,
-0.0897216796875,
0.012054443359375,
0.0345458984375,
-0.034210205078125,
0.03436279296875,
0.051666259765625,
-0.0187530517578125,
0.002941131591796875,
0.00782012939453125,
0.0283355712890625,
0.026702880859375,
0.02471923828125,
0.03472900390625,
-0.01288604736328125,
-0.01233673095703125,
0.0258331298828125,
0.0309600830078125,
-0.0235595703125,
0.0251617431640625,
-0.010711669921875,
0.00835418701171875,
0.03778076171875,
0.00441741943359375,
0.02288818359375,
0.023193359375,
-0.003696441650390625,
0.00807952880859375,
0.00868988037109375,
-0.03082275390625,
-0.054718017578125,
0.06280517578125,
-0.0160369873046875,
0.0026397705078125,
0.05517578125,
-0.034088134765625,
0.0063934326171875,
0.01009368896484375,
0.045440673828125,
-0.01264190673828125,
-0.0369873046875,
-0.07000732421875,
0.0023784637451171875,
0.039337158203125,
0.037750244140625,
-0.0298919677734375,
0.0267486572265625,
-0.035888671875,
-0.01171112060546875,
0.018341064453125,
-0.028472900390625,
-0.013641357421875,
0.0013475418090820312,
-0.037841796875,
0.0316162109375,
-0.0220947265625,
-0.035125732421875,
0.01953125,
0.01439666748046875,
-0.0291595458984375,
-0.0028285980224609375,
0.010467529296875,
-0.03631591796875,
-0.01355743408203125,
0.0151214599609375,
-0.0160675048828125,
0.0005483627319335938,
-0.00980377197265625,
0.004840850830078125,
-0.037628173828125,
-0.016021728515625,
0.00583648681640625,
-0.00665283203125,
-0.01558685302734375,
0.018524169921875,
0.0178985595703125,
0.01265716552734375,
0.03228759765625,
-0.006221771240234375,
0.032745361328125,
0.0167694091796875,
-0.042999267578125,
0.019744873046875,
-0.00701141357421875,
0.0177154541015625,
0.01300048828125,
-0.016998291015625,
0.00024175643920898438,
0.0211639404296875,
-0.019500732421875,
-0.02508544921875,
-0.03021240234375,
0.024169921875,
-0.02581787109375,
-0.006748199462890625,
-0.0028533935546875,
-0.0159454345703125,
0.0035858154296875,
0.004459381103515625,
0.01030731201171875,
0.0504150390625,
0.048675537109375,
-0.0164337158203125,
0.00921630859375,
0.015869140625,
-0.01483154296875,
-0.0022754669189453125,
0.0216522216796875,
0.0163726806640625,
-0.03814697265625,
-0.0032291412353515625,
-0.01084136962890625,
0.004306793212890625,
-0.044525146484375,
-0.068603515625,
0.027740478515625,
0.006069183349609375,
-0.029144287109375,
-0.07513427734375,
0.0166473388671875,
0.016845703125,
-0.02703857421875,
-0.0394287109375,
0.0136566162109375,
-0.0284271240234375,
0.043609619140625,
0.026397705078125,
0.0296630859375,
0.01261138916015625,
0.061187744140625,
-0.0291595458984375,
0.0302734375,
0.0001327991485595703,
0.0106201171875,
0.0114288330078125,
-0.0225677490234375,
0.048828125,
0.048919677734375,
-0.0169219970703125,
0.03759765625,
0.015838623046875,
-0.0255126953125,
-0.01366424560546875,
-0.01023101806640625,
-0.0015630722045898438,
0.0223388671875,
0.0721435546875,
0.02386474609375,
0.012176513671875,
-0.048736572265625,
-0.01206207275390625,
-0.034423828125,
-0.039306640625,
0.0185546875,
0.00701141357421875,
-0.0260009765625,
0.03857421875,
-0.0052337646484375,
-0.0311431884765625,
0.035125732421875,
-0.037933349609375,
-0.05035400390625,
0.0232391357421875,
-0.00937652587890625,
0.0194091796875,
-0.052825927734375,
-0.0310516357421875,
0.07232666015625,
-0.035186767578125,
-0.00220489501953125,
0.033721923828125,
0.0172119140625,
0.0325927734375,
0.041656494140625,
0.0701904296875,
0.047576904296875,
-0.06427001953125,
-0.01080322265625,
0.040618896484375,
0.0033817291259765625,
-0.0241241455078125,
-0.058502197265625,
0.020904541015625,
0.01116180419921875,
-0.035675048828125,
0.006984710693359375,
0.0697021484375,
-0.048583984375,
-0.050567626953125,
0.07470703125,
-0.0174102783203125,
0.11669921875,
0.00152587890625,
0.039581298828125,
-0.0173492431640625,
0.00032639503479003906,
0.005878448486328125,
-0.01074981689453125,
-0.005352020263671875,
0.04217529296875,
-0.0012683868408203125,
-0.0491943359375,
0.034820556640625,
0.053558349609375,
0.033050537109375,
0.0228424072265625
] |
2ccfd1391f2f832974f15d937bb38838a3a31a6c
|
Wordpress Stackexchange
Q: Is it possible to change the log file location for WP_DEBUG_LOG? I use WP_DEBUG_LOG in my development environment and have no issues with debug.log being in the wp-content directory.
Sometimes I turn on WP_DEBUG in production when I need to debug something, and I still want to use the log but would like to redirect it to something outside my web root. Is this possible using WP_DEBUG_LOG?
A: Times change, and so do correct answers to technical questions.
The current answer as of late 2019 is simple. When defining the WP_DEBUG_LOG "constant" in wp-config.php, you can now provide a path where you want the file to be written.
define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
See Wordpress Support Documentation
|
Q: Is it possible to change the log file location for WP_DEBUG_LOG? I use WP_DEBUG_LOG in my development environment and have no issues with debug.log being in the wp-content directory.
Sometimes I turn on WP_DEBUG in production when I need to debug something, and I still want to use the log but would like to redirect it to something outside my web root. Is this possible using WP_DEBUG_LOG?
A: Times change, and so do correct answers to technical questions.
The current answer as of late 2019 is simple. When defining the WP_DEBUG_LOG "constant" in wp-config.php, you can now provide a path where you want the file to be written.
define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
See Wordpress Support Documentation
A: Yes, if you add some code to a plugin or a theme's functions.php like so:
if (defined('WP_DEBUG_LOG') && WP_DEBUG_LOG) {
ini_set( 'error_log', WP_CONTENT_DIR . '/debug.txt' );
}
Edit: someone else just presented me with the need to do this, so I have dropped some code into a simple plugin they can edit; it's available as a gist if anyone wants it.
A: It seems most of the answers here are not true anymore for WP version 5.1 and above since this change: https://make.wordpress.org/core/2019/01/23/miscellaneous-developer-focused-changes-in-5-1/
You can now define WP_DEBUG_LOG as a path in wp-config.php if you want to override the default wp-content/debug.log for example:
define( 'WP_DEBUG_LOG', 'wp-content/uploads/debug.log' );
A: It turns out that all WP_DEBUG_LOG does is:
ini_set( 'log_errors', 1 );
ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );
So, if you want to change the log location for WP_DEBUG_LOG in a plugin or theme, webaware's answer is best. If you just want to have it changed within wp-config.php you can replace define( 'WP_DEBUG_LOG', true ); with the above 2 lines and change the log file to wherever you want.
A: Looks like the WordPress code has changed since the last answer to this question was posted. The current wp_debug_mode() function related to those constants includes a test for whether WP_DEBUG_LOG equates to true or 1 -- in which case it behaves as others have described it.
However, you can also set that constant to a string -- your preferred file path -- and the log will be output there. For example, you can set it to a path outside of your directories for publicly accessible web content. You may have to play with file permissions to get that to work.
I came looking for this answer because the WordFence security plugin is complaining about my debug log being potentially accessible in /wp-content/
if ( in_array( strtolower( (string) WP_DEBUG_LOG ), array( 'true', '1' ), true ) ) {
$log_path = WP_CONTENT_DIR . '/debug.log';
} elseif ( is_string( WP_DEBUG_LOG ) ) {
$log_path = WP_DEBUG_LOG;
} else {
$log_path = false;
}
A: Afaik, you can't change the location for the default debug file. What you can change is the location for the MU error log as well as the location for the PHP error log file.
$ds = DIRECTORY_SEPARATOR;
# DEBUG
define( 'WP_DEBUG', true );
// file: ~/WP_CONTENT_DIR/debug.log
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'SAVEQUERIES', true );
# DEBUG: MU
define( 'DIEONDBERROR', true );
define( 'ERRORLOGFILE', WP_CONTENT_DIR.$ds.'logs'.$ds.'mu_error.log' );
@ini_set( 'log_errors', 'On' );
# PHP Error log location
@ini_set( 'error_log', WP_CONTENT_DIR.$ds.'logs'.$ds.'php_error.log' );
|
wordpress
|
{
"language": "en",
"length": 539,
"provenance": "stackexchange_00019.jsonl.gz:428581",
"question_score": "27",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84132"
}
|
[
0.05035400390625,
-0.01910400390625,
0.0016412734985351562,
-0.04345703125,
-0.0114593505859375,
-0.0181884765625,
0.012786865234375,
-0.0019817352294921875,
0.018402099609375,
0.00527191162109375,
0.009185791015625,
-0.036346435546875,
0.0018625259399414062,
-0.0312042236328125,
-0.022430419921875,
-0.02545166015625,
0.032196044921875,
-0.01003265380859375,
0.0223388671875,
-0.0167999267578125,
0.00865936279296875,
0.003391265869140625,
0.00441741943359375,
0.0894775390625,
0.0226593017578125,
0.009002685546875,
0.03936767578125,
-0.0254364013671875,
0.02386474609375,
-0.0058746337890625,
0.0260162353515625,
-0.02655029296875,
0.057647705078125,
0.037109375,
-0.08636474609375,
0.0130767822265625,
0.0244598388671875,
-0.0187835693359375,
-0.0386962890625,
0.07421875,
0.020477294921875,
-0.01174163818359375,
0.039520263671875,
-0.0179595947265625,
0.01213836669921875,
-0.01280975341796875,
0.01282501220703125,
-0.040802001953125,
0.0258026123046875,
0.0002429485321044922,
0.0081329345703125,
0.008148193359375,
0.007305145263671875,
-0.027008056640625,
-0.019073486328125,
-0.017852783203125,
-0.05419921875,
0.0531005859375,
0.003818511962890625,
0.0054473876953125,
0.007518768310546875,
0.03143310546875,
-0.00909423828125,
0.011810302734375,
0.0015382766723632812,
-0.0025691986083984375,
0.00893402099609375,
0.028350830078125,
-0.0294189453125,
0.01099395751953125,
0.03302001953125,
-0.023773193359375,
-0.01049041748046875,
0.0106658935546875,
-0.0084075927734375,
-0.032958984375,
0.043609619140625,
-0.011749267578125,
-0.004253387451171875,
0.03753662109375,
0.00601959228515625,
-0.07318115234375,
0.029815673828125,
-0.0020923614501953125,
0.00743865966796875,
0.0163726806640625,
0.005062103271484375,
0.0034732818603515625,
-0.019012451171875,
-0.01367950439453125,
-0.0312347412109375,
0.0037975311279296875,
-0.019683837890625,
0.0040283203125,
-0.0265350341796875,
-0.00681304931640625,
-0.0029392242431640625,
0.00750732421875,
-0.016448974609375,
-0.032623291015625,
-0.00904083251953125,
-0.00855255126953125,
-0.060577392578125,
0.0129241943359375,
-0.007659912109375,
0.056976318359375,
0.00258636474609375,
-0.00905609130859375,
0.0081939697265625,
0.0169830322265625,
0.01220703125,
-0.006916046142578125,
-0.0323486328125,
-0.07318115234375,
0.0114288330078125,
0.0809326171875,
-0.005706787109375,
0.017974853515625,
0.02191162109375,
0.0263671875,
0.0252227783203125,
0.034393310546875,
-0.02203369140625,
0.0038700103759765625,
-0.0321044921875,
-0.050201416015625,
-0.0265960693359375,
-0.007648468017578125,
-0.0018224716186523438,
0.03753662109375,
-0.01172637939453125,
-0.0005712509155273438,
0.01520538330078125,
0.002742767333984375,
-0.00601959228515625,
-0.0221099853515625,
-0.00363922119140625,
-0.0262908935546875,
-0.002044677734375,
0.022003173828125,
0.01482391357421875,
-0.02996826171875,
0.0070648193359375,
-0.0145721435546875,
-0.00383758544921875,
0.019927978515625,
0.03363037109375,
0.00931549072265625,
-0.0323486328125,
-0.05780029296875,
0.018646240234375,
0.007076263427734375,
0.004695892333984375,
0.01580810546875,
0.0517578125,
-0.055267333984375,
0.03668212890625,
-0.04736328125,
0.03680419921875,
-0.03594970703125,
-0.0262298583984375,
-0.001987457275390625,
0.03790283203125,
-0.03607177734375,
-0.025543212890625,
0.006366729736328125,
-0.039398193359375,
-0.0020046234130859375,
0.015655517578125,
0.022308349609375,
0.017303466796875,
0.002269744873046875,
-0.03717041015625,
-0.01739501953125,
-0.0020427703857421875,
-0.0158843994140625,
-0.03271484375,
0.00580596923828125,
0.0160675048828125,
0.0267486572265625,
0.0153045654296875,
-0.029815673828125,
-0.00177001953125,
0.0306243896484375,
-0.0130767822265625,
0.040130615234375,
0.01033782958984375,
0.045196533203125,
-0.005428314208984375,
0.01512908935546875,
-0.0103607177734375,
0.0308685302734375,
-0.02520751953125,
0.0360107421875,
-0.0059356689453125,
-0.0244903564453125,
-0.041015625,
-0.00677490234375,
-0.0260772705078125,
-0.006099700927734375,
-0.01300811767578125,
0.026397705078125,
-0.0304107666015625,
0.03167724609375,
-0.026580810546875,
0.005908966064453125,
-0.00380706787109375,
0.035980224609375,
0.04388427734375,
-0.0095977783203125,
-0.0257415771484375,
-0.0015163421630859375,
0.0555419921875,
-0.1142578125,
-0.06988525390625,
0.0633544921875,
-0.038177490234375,
0.03594970703125,
0.007274627685546875,
0.03961181640625,
-0.01422119140625,
-0.00846099853515625,
-0.01457977294921875,
-0.04547119140625,
0.02716064453125,
0.00039768218994140625,
-0.0185394287109375,
-0.01482391357421875,
0.051239013671875,
-0.006481170654296875,
0.0200958251953125,
0.036956787109375,
0.0300140380859375,
0.019500732421875,
0.00862884521484375,
-0.0133209228515625,
0.02081298828125,
-0.10772705078125,
0.0311737060546875,
0.056365966796875,
0.041656494140625,
0.0136260986328125,
-0.00452423095703125,
0.0157318115234375,
-0.00788116455078125,
-0.07708740234375,
0.0145721435546875,
-0.009857177734375,
0.015899658203125,
0.0022754669189453125,
-0.0157623291015625,
-0.026519775390625,
0.03900146484375,
-0.051300048828125,
0.0040283203125,
0.04241943359375,
0.0110626220703125,
-0.01091766357421875,
-0.020050048828125,
0.0270233154296875,
-0.010101318359375,
-0.00948333740234375,
-0.012969970703125,
-0.0004818439483642578,
-0.016265869140625,
-0.0006279945373535156,
-0.005817413330078125,
-0.0016326904296875,
-0.0126495361328125,
-0.0002579689025878906,
0.023834228515625,
-0.01407623291015625,
0.0032329559326171875,
0.0086822509765625,
-0.0246734619140625,
0.0265655517578125,
-0.02374267578125,
0.012939453125,
-0.004177093505859375,
-0.0018625259399414062,
-0.04248046875,
0.02471923828125,
-0.00164794921875,
-0.018096923828125,
-0.05267333984375,
-0.08819580078125,
0.0219268798828125,
-0.0209503173828125,
0.00969696044921875,
-0.042083740234375,
-0.006679534912109375,
0.03167724609375,
-0.0191497802734375,
0.053436279296875,
-0.003681182861328125,
-0.033477783203125,
0.06951904296875,
-0.04132080078125,
0.035491943359375,
-0.0192413330078125,
0.060028076171875,
0.072509765625,
-0.00858306884765625,
0.007663726806640625,
-0.0096588134765625,
0.044830322265625,
0.0027942657470703125,
-0.0274810791015625,
-0.042327880859375,
0.00684356689453125,
-0.053741455078125,
0.0078277587890625,
-0.0013980865478515625,
-0.031951904296875,
0.00441741943359375,
-0.0294189453125,
-0.0192413330078125,
-0.0125732421875,
-0.07318115234375,
-0.055572509765625,
-0.05419921875,
-0.09295654296875,
0.0276336669921875,
0.006237030029296875,
-0.041961669921875,
-0.0153656005859375,
0.048828125,
0.028594970703125,
0.03228759765625,
-0.01349639892578125,
-0.01898193359375,
-0.0189056396484375,
-0.045867919921875,
-0.0133819580078125,
0.0001468658447265625,
0.0027294158935546875,
-0.007648468017578125,
0.0604248046875,
-0.006412506103515625,
-0.0418701171875,
-0.037017822265625,
0.03936767578125,
0.00859832763671875,
-0.0290679931640625,
-0.0161590576171875,
-0.0208587646484375,
0.019622802734375,
-0.012481689453125,
-0.0010919570922851562,
-0.003772735595703125,
0.0290374755859375,
-0.02655029296875,
-0.00795745849609375,
0.001430511474609375,
0.01210784912109375,
-0.015350341796875,
0.0129241943359375,
-0.019866943359375,
-0.0267486572265625,
-0.0643310546875,
0.00823974609375,
0.004657745361328125,
-0.0209503173828125,
0.01885986328125,
-0.0006117820739746094,
-0.0193328857421875,
0.020172119140625,
-0.022613525390625,
0.0517578125,
0.032928466796875,
0.042144775390625,
0.002197265625,
0.036163330078125,
-0.0135650634765625,
-0.0019741058349609375,
-0.07586669921875,
0.0305023193359375,
-0.0254058837890625,
-0.02337646484375,
0.00554656982421875,
-0.015777587890625,
-0.02227783203125,
-0.01317596435546875,
-0.0203094482421875,
-0.0271759033203125,
0.025665283203125,
-0.06512451171875,
0.0026645660400390625,
-0.0255584716796875,
-0.00418853759765625,
-0.00511932373046875,
0.06304931640625,
-0.051971435546875,
0.00270843505859375,
-0.00859832763671875,
0.0104522705078125,
-0.0355224609375,
-0.058013916015625,
-0.062744140625,
0.00679779052734375,
-0.0122222900390625,
-0.0004837512969970703,
0.0051422119140625,
-0.01947021484375,
-0.04107666015625,
0.0286865234375,
-0.027862548828125,
-0.0234832763671875,
0.01523590087890625,
-0.033416748046875,
0.025146484375,
-0.0038738250732421875,
0.04443359375,
-0.0214691162109375,
0.00930023193359375,
-0.0440673828125,
-0.07073974609375,
-0.018218994140625,
-0.03564453125,
0.062225341796875,
0.0269622802734375,
-0.0182952880859375,
0.009735107421875,
0.05303955078125,
-0.0098419189453125,
0.0214996337890625,
0.0177001953125,
0.02569580078125,
-0.022552490234375,
0.029693603515625,
0.03411865234375,
-0.0019779205322265625,
-0.003787994384765625,
-0.025604248046875,
-0.0290985107421875,
0.0309906005859375,
-0.01503753662109375,
0.0372314453125,
0.0218658447265625,
-0.0207366943359375,
-0.0203704833984375,
-0.00496673583984375,
0.0124969482421875,
0.040802001953125,
0.0036449432373046875,
-0.007232666015625,
-0.0273284912109375,
-0.0268402099609375,
0.035919189453125,
-0.00861358642578125,
-0.01143646240234375,
0.00830078125,
0.05987548828125,
0.02301025390625,
-0.0182952880859375,
-0.033843994140625,
-0.005039215087890625,
0.027191162109375,
-0.035552978515625,
0.0421142578125,
0.01220703125,
-0.004791259765625,
0.028106689453125,
-0.034881591796875,
-0.01035308837890625,
-0.0160064697265625,
0.0045166015625,
-0.00021076202392578125,
-0.0284881591796875,
0.024658203125,
-0.0270233154296875,
0.0199127197265625,
0.03521728515625,
-0.01215362548828125,
0.01331329345703125,
0.02008056640625,
0.0167999267578125,
-0.0526123046875,
0.0018568038940429688,
-0.0167694091796875,
-0.049835205078125,
0.0017004013061523438,
-0.015228271484375,
0.0335693359375,
0.0258331298828125,
0.00806427001953125,
0.04681396484375,
0.060089111328125,
-0.0015192031860351562,
0.043975830078125,
0.0274658203125,
0.0235748291015625,
0.01497650146484375,
0.06732177734375,
0.0018463134765625,
-0.01861572265625,
-0.01708984375,
0.0279388427734375,
0.002590179443359375,
-0.04815673828125,
0.036346435546875,
-0.021636962890625,
-0.007427215576171875,
0.00907135009765625,
-0.046051025390625,
0.04833984375,
0.00865936279296875,
-0.0259552001953125,
0.008575439453125,
-0.07623291015625,
-0.03973388671875,
-0.04888916015625,
0.020416259765625,
-0.030242919921875,
0.00409698486328125,
0.05206298828125,
0.031494140625,
-0.06329345703125,
0.0626220703125,
-0.00623321533203125,
-0.00243377685546875,
-0.0196533203125,
0.03271484375,
0.027618408203125,
-0.0236053466796875,
0.0004527568817138672,
-0.003566741943359375,
0.02392578125,
-0.016632080078125,
0.0003075599670410156,
-0.0092926025390625,
0.0247344970703125,
-0.03240966796875,
-0.018829345703125,
0.0394287109375,
-0.035400390625,
0.02728271484375,
0.01617431640625,
-0.048370361328125,
-0.06951904296875,
0.00760650634765625,
-0.00899505615234375,
0.0091094970703125,
-0.08441162109375,
0.0228271484375,
-0.0164031982421875,
0.0091094970703125,
-0.00418853759765625,
-0.01593017578125,
-0.01499176025390625,
-0.026123046875,
-0.0172271728515625,
-0.057159423828125,
-0.0224151611328125,
0.005016326904296875,
-0.03228759765625,
-0.0272979736328125,
-0.0010766983032226562,
-0.0269012451171875,
0.00571441650390625,
-0.03924560546875,
0.013031005859375,
-0.01378631591796875,
-0.007724761962890625,
0.01132965087890625,
0.00428009033203125,
0.0516357421875,
0.035003662109375,
-0.035888671875,
0.00826263427734375,
-0.03179931640625,
-0.0165252685546875,
0.0168304443359375,
-0.001201629638671875,
-0.0258026123046875,
-0.023193359375,
0.01544189453125,
0.0163421630859375,
0.0002932548522949219,
-0.024658203125,
-0.0220184326171875,
-0.0027103424072265625,
0.0151824951171875,
-0.00164031982421875,
0.0015230178833007812,
0.05072021484375,
-0.0198516845703125,
0.01059722900390625,
0.018524169921875,
0.0304718017578125,
-0.006511688232421875,
-0.023590087890625,
0.0173187255859375,
0.032470703125,
-0.0210723876953125,
-0.04547119140625,
0.0288543701171875,
-0.0100250244140625,
0.0919189453125,
-0.01397705078125,
0.00910186767578125,
-0.009002685546875,
0.004009246826171875,
-0.0158233642578125,
0.012603759765625,
-0.0178070068359375,
0.028076171875,
-0.028411865234375,
0.00693511962890625,
0.01103973388671875,
-0.033447265625,
0.013092041015625,
-0.0142974853515625,
0.003536224365234375,
-0.0084228515625,
-0.0189361572265625,
-0.016510009765625,
0.04302978515625,
0.09259033203125,
0.0034084320068359375,
0.047760009765625,
0.0474853515625,
-0.001125335693359375,
0.0163726806640625,
0.043304443359375,
0.0107574462890625,
-0.001674652099609375,
0.068115234375,
0.01416015625,
-0.0181427001953125,
0.00389862060546875,
-0.037109375,
0.00794219970703125,
0.050140380859375,
0.0377197265625,
-0.07757568359375,
0.0203704833984375,
0.020355224609375,
0.02557373046875,
0.061370849609375,
-0.006740570068359375,
0.0203704833984375,
0.02215576171875,
0.00859832763671875,
-0.041168212890625,
-0.0163421630859375,
-0.00473785400390625,
-0.0311737060546875,
0.0115966796875,
0.0038013458251953125,
0.018798828125,
0.01153564453125,
-0.0850830078125,
0.0271148681640625,
0.06353759765625,
0.0102691650390625,
-0.00907135009765625,
0.005229949951171875,
-0.0118865966796875,
-0.0396728515625,
-0.055084228515625,
0.003002166748046875,
-0.0306854248046875,
-0.0162200927734375,
-0.028106689453125,
0.0095367431640625,
0.052734375,
0.047882080078125,
0.0012645721435546875,
-0.038818359375,
0.036468505859375,
0.005344390869140625,
0.0201416015625,
-0.00714874267578125,
0.025848388671875,
-0.0028629302978515625,
-0.07269287109375,
-0.0037364959716796875,
-0.06158447265625,
0.00811004638671875,
-0.0042877197265625,
-0.0380859375,
0.06671142578125,
-0.057098388671875,
0.0017032623291015625,
0.0012598037719726562,
0.002838134765625,
0.004665374755859375,
0.0007648468017578125,
0.035369873046875,
-0.04901123046875,
-0.01421356201171875,
0.0210113525390625,
-0.0020542144775390625,
-0.01403045654296875,
0.0015916824340820312,
-0.0000059604644775390625,
0.08758544921875,
-0.036834716796875,
-0.028717041015625,
0.031280517578125,
0.04052734375,
-0.02801513671875,
0.0362548828125,
-0.02081298828125,
0.0751953125,
0.043670654296875,
0.054473876953125,
-0.05780029296875,
-0.038787841796875,
0.03765869140625,
0.07635498046875,
0.031402587890625,
0.01241302490234375,
-0.01360321044921875,
-0.0030193328857421875,
0.0255126953125,
0.0026149749755859375,
-0.00553131103515625,
0.035491943359375,
-0.013336181640625,
0.012054443359375,
-0.01085662841796875,
-0.043548583984375,
0.01654052734375,
-0.01462554931640625,
-0.0384521484375,
0.01049041748046875,
0.0177154541015625,
0.00336456298828125,
0.001026153564453125,
0.0394287109375,
-0.035980224609375,
0.0054473876953125,
0.0251922607421875,
0.007198333740234375,
0.0022296905517578125,
0.0251312255859375,
0.0634765625,
-0.0501708984375,
-0.038726806640625,
-0.014373779296875,
0.048248291015625,
0.0243988037109375,
-0.0265350341796875,
0.0032939910888671875,
0.003284454345703125,
-0.01480865478515625,
-0.022125244140625,
-0.03558349609375,
0.0222930908203125,
-0.005420684814453125,
0.0364990234375,
0.06622314453125,
0.037261962890625,
0.058563232421875,
0.07208251953125,
0.002506256103515625,
0.0205078125,
-0.049774169921875,
-0.0211334228515625,
0.0089111328125,
0.0018281936645507812,
0.0014410018920898438,
-0.033721923828125,
-0.0001399517059326172,
-0.0212554931640625,
-0.0146484375,
-0.042266845703125,
-0.0091705322265625,
0.0128631591796875,
-0.0032672882080078125,
-0.005664825439453125,
0.001262664794921875,
0.0013275146484375,
-0.00774383544921875,
0.0081024169921875,
-0.035308837890625,
0.011444091796875,
0.0224609375,
0.03753662109375,
-0.0330810546875,
0.0115814208984375,
0.0029468536376953125,
-0.015869140625,
0.0195159912109375,
-0.0157470703125,
0.01849365234375,
-0.039031982421875,
-0.02081298828125,
-0.0081634521484375,
0.04010009765625,
0.050079345703125,
0.0183563232421875,
0.061004638671875,
0.0297393798828125,
-0.01739501953125,
-0.0071258544921875,
0.0029773712158203125,
-0.0230560302734375,
0.0196685791015625,
-0.046844482421875,
0.0194854736328125,
0.00962066650390625,
-0.003131866455078125,
-0.0213623046875,
0.0007266998291015625,
0.01715087890625,
-0.0187530517578125,
0.013092041015625,
0.0009136199951171875,
-0.022430419921875,
0.02886962890625,
-0.02569580078125,
0.029571533203125,
0.0015859603881835938,
-0.0296783447265625,
-0.01352691650390625,
0.01509857177734375,
0.016876220703125,
-0.0146026611328125,
0.037628173828125,
0.04730224609375,
-0.0141143798828125,
0.007122039794921875,
0.0276336669921875,
-0.051727294921875,
-0.005535125732421875,
0.0110931396484375,
-0.0465087890625,
0.021942138671875,
0.0071258544921875,
-0.0718994140625,
-0.044708251953125,
-0.049896240234375,
0.0469970703125,
0.022430419921875,
0.06964111328125,
-0.0175933837890625,
0.0269622802734375,
-0.01535797119140625,
-0.0003070831298828125,
-0.0258331298828125,
0.0008802413940429688,
-0.00377655029296875,
-0.005352020263671875,
-0.0023860931396484375,
0.00518035888671875,
-0.0472412109375,
0.06866455078125,
0.007152557373046875,
-0.011505126953125,
0.0780029296875,
-0.04681396484375,
-0.013519287109375,
-0.03472900390625,
-0.023406982421875,
-0.0254058837890625,
-0.0439453125,
0.015960693359375,
0.0499267578125,
-0.008148193359375,
-0.00894927978515625,
-0.03961181640625,
0.03125,
0.004047393798828125,
-0.01090240478515625,
0.019134521484375,
-0.0278167724609375,
0.0243072509765625,
0.03564453125,
-0.01922607421875,
-0.03399658203125,
-0.03729248046875,
-0.022918701171875,
0.0042266845703125,
-0.01293182373046875,
0.049530029296875,
-0.039398193359375,
0.0810546875,
-0.05169677734375,
-0.0239105224609375,
-0.0010347366333007812,
-0.01519775390625,
-0.0017910003662109375,
-0.0380859375,
0.0071258544921875,
-0.01047515869140625,
-0.000014126300811767578,
-0.00218963623046875,
0.01328277587890625,
-0.00678253173828125,
0.001880645751953125,
0.03289794921875,
-0.00635528564453125,
0.024932861328125,
-0.0153350830078125,
0.0662841796875,
0.01073455810546875,
-0.044525146484375,
0.0185546875,
-0.03375244140625,
0.028167724609375,
0.0242767333984375,
-0.0177001953125,
-0.0008635520935058594,
-0.00824737548828125,
-0.0350341796875,
-0.0264739990234375,
-0.0280914306640625,
0.0136260986328125,
-0.0202789306640625,
0.0298004150390625,
0.0413818359375,
-0.01141357421875,
0.0290374755859375,
0.03521728515625,
-0.00757598876953125,
0.0927734375,
-0.0771484375,
-0.032928466796875,
-0.036102294921875,
0.0229644775390625,
0.0205841064453125,
-0.01410675048828125,
0.004730224609375,
-0.020355224609375,
-0.02667236328125,
0.00432586669921875,
-0.0199737548828125,
-0.005535125732421875,
-0.06317138671875,
-0.11962890625,
-0.0029315948486328125,
0.0074615478515625,
-0.049072265625,
-0.03338623046875,
0.00598907470703125,
-0.0079193115234375,
0.0216217041015625,
0.01074981689453125,
-0.04437255859375,
-0.029022216796875,
0.0290679931640625,
0.016693115234375,
0.032958984375,
0.0164794921875,
0.034393310546875,
0.0036468505859375,
0.03277587890625,
0.0171661376953125,
-0.0044708251953125,
-0.018585205078125,
-0.0013570785522460938,
0.03887939453125,
0.037689208984375,
-0.0055389404296875,
0.06402587890625,
0.0303192138671875,
-0.018463134765625,
-0.0020732879638671875,
-0.016265869140625,
-0.0352783203125,
-0.006763458251953125,
0.090576171875,
0.035186767578125,
0.0287933349609375,
-0.0322265625,
-0.06884765625,
-0.036529541015625,
-0.0019512176513671875,
-0.0025787353515625,
0.018463134765625,
-0.07550048828125,
0.0114593505859375,
0.0141143798828125,
0.01123046875,
-0.0214691162109375,
0.01346588134765625,
-0.0009703636169433594,
-0.01200103759765625,
0.050537109375,
0.007778167724609375,
-0.0140533447265625,
-0.014129638671875,
0.056488037109375,
-0.016815185546875,
0.0535888671875,
-0.02734375,
0.038116455078125,
0.0738525390625,
-0.007152557373046875,
0.0223541259765625,
0.00543975830078125,
-0.038726806640625,
0.0206451416015625,
-0.0001595020294189453,
0.07476806640625,
-0.03741455078125,
-0.033843994140625,
0.0032863616943359375,
-0.00560760498046875,
-0.02093505859375,
-0.01605224609375,
0.0294952392578125,
0.0025882720947265625,
-0.013214111328125,
0.0838623046875,
0.01910400390625,
-0.022979736328125,
-0.016082763671875,
0.051025390625,
-0.05926513671875,
-0.0207061767578125,
-0.0595703125,
-0.020477294921875,
0.00943756103515625,
0.0411376953125,
0.03887939453125,
-0.0218505859375,
0.03692626953125,
0.0201263427734375,
0.0328369140625,
0.0006451606750488281
] |
97d564ef99e74417e2cb9ca46b10c54ef1707004
|
Wordpress Stackexchange
Q: Use WP_Query with have_posts()? Is it possible to use
$items = new WP_Query( $query_args );
with
<?php if(have_posts()): ?>
<?php while (have_posts()) : the_post(); ?>
without changing the loop to be
<?php while ($items->have_posts()) : $items->the_post();
Thanks.
A: global $wp_query;
$original_query = $wp_query;
$wp_query = null;
$wp_query = new WP_Query( $args );
if ( have_posts() ) :
while ( have_posts() ) : the_post();
the_title();
the_excerpt();
endwhile;
else:
echo 'no posts found';
endif;
$wp_query = null;
$wp_query = $original_query;
wp_reset_postdata();
http://codex.wordpress.org/Function_Reference/wp_reset_postdata
|
Q: Use WP_Query with have_posts()? Is it possible to use
$items = new WP_Query( $query_args );
with
<?php if(have_posts()): ?>
<?php while (have_posts()) : the_post(); ?>
without changing the loop to be
<?php while ($items->have_posts()) : $items->the_post();
Thanks.
A: global $wp_query;
$original_query = $wp_query;
$wp_query = null;
$wp_query = new WP_Query( $args );
if ( have_posts() ) :
while ( have_posts() ) : the_post();
the_title();
the_excerpt();
endwhile;
else:
echo 'no posts found';
endif;
$wp_query = null;
$wp_query = $original_query;
wp_reset_postdata();
http://codex.wordpress.org/Function_Reference/wp_reset_postdata
|
wordpress
|
{
"language": "en",
"length": 81,
"provenance": "stackexchange_00019.jsonl.gz:428663",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84429"
}
|
[
0.0535888671875,
0.002765655517578125,
0.007640838623046875,
-0.004192352294921875,
0.039947509765625,
-0.03887939453125,
0.0926513671875,
-0.032806396484375,
0.05615234375,
0.0224609375,
-0.07708740234375,
-0.03125,
0.0006499290466308594,
0.00933837890625,
-0.046142578125,
-0.045013427734375,
0.0572509765625,
-0.0587158203125,
0.0179901123046875,
-0.0017728805541992188,
0.0182647705078125,
0.035888671875,
0.054443359375,
0.044189453125,
0.00542449951171875,
0.01015472412109375,
0.06781005859375,
-0.0253448486328125,
-0.0162200927734375,
-0.024627685546875,
0.02178955078125,
0.017059326171875,
0.0302276611328125,
0.00904083251953125,
-0.006816864013671875,
0.0091400146484375,
0.01357269287109375,
-0.006336212158203125,
0.0101165771484375,
0.027618408203125,
-0.00861358642578125,
0.0012502670288085938,
-0.0124969482421875,
-0.005764007568359375,
-0.01010894775390625,
-0.03009033203125,
0.0156402587890625,
-0.022979736328125,
0.002071380615234375,
0.0013208389282226562,
0.0159149169921875,
-0.0017852783203125,
0.0290985107421875,
-0.03546142578125,
-0.01727294921875,
0.0064849853515625,
0.04937744140625,
-0.047637939453125,
0.047882080078125,
-0.052154541015625,
-0.054290771484375,
-0.026824951171875,
0.0531005859375,
-0.0003311634063720703,
0.0013713836669921875,
0.007778167724609375,
0.050628662109375,
0.007762908935546875,
-0.0294342041015625,
-0.0126800537109375,
0.0247344970703125,
-0.01390838623046875,
-0.018402099609375,
-0.00665283203125,
0.01053619384765625,
-0.033538818359375,
0.0071258544921875,
-0.035552978515625,
-0.0081939697265625,
0.057708740234375,
-0.01204681396484375,
-0.021820068359375,
-0.047576904296875,
-0.0107879638671875,
0.00867462158203125,
-0.006008148193359375,
-0.0160064697265625,
0.0174407958984375,
-0.0236968994140625,
-0.031402587890625,
-0.0104522705078125,
-0.02484130859375,
-0.02838134765625,
-0.0010051727294921875,
-0.01422119140625,
-0.0377197265625,
0.0311279296875,
0.04803466796875,
-0.01238250732421875,
0.01540374755859375,
-0.037200927734375,
-0.02252197265625,
-0.010162353515625,
-0.0197601318359375,
0.044403076171875,
0.04541015625,
-0.01947021484375,
-0.0010528564453125,
0.059967041015625,
0.0191192626953125,
0.01401519775390625,
0.049285888671875,
-0.0146484375,
-0.0399169921875,
-0.03570556640625,
0.041107177734375,
-0.010162353515625,
-0.026763916015625,
0.02587890625,
0.003246307373046875,
-0.0017194747924804688,
0.01139068603515625,
0.00493621826171875,
0.013702392578125,
-0.0011644363403320312,
0.0031642913818359375,
-0.004962921142578125,
-0.019439697265625,
-0.000797271728515625,
0.03814697265625,
-0.0168609619140625,
-0.0099334716796875,
0.05169677734375,
0.012603759765625,
-0.02679443359375,
-0.0223388671875,
-0.0142822265625,
-0.00616455078125,
0.02154541015625,
-0.021759033203125,
0.054656982421875,
-0.031829833984375,
-0.001705169677734375,
0.03643798828125,
0.015228271484375,
0.026519775390625,
0.0172271728515625,
-0.0013456344604492188,
-0.01049041748046875,
-0.0391845703125,
0.026336669921875,
-0.01558685302734375,
0.005706787109375,
0.018524169921875,
-0.0199127197265625,
-0.004077911376953125,
0.00688934326171875,
-0.01422119140625,
-0.0003447532653808594,
-0.0250396728515625,
-0.005908966064453125,
-0.00702667236328125,
0.0142669677734375,
-0.0516357421875,
-0.0670166015625,
0.02203369140625,
-0.031890869140625,
-0.01332855224609375,
0.0210723876953125,
0.00611114501953125,
0.038238525390625,
0.004909515380859375,
0.052947998046875,
0.00945281982421875,
-0.004749298095703125,
0.0009469985961914062,
-0.0040283203125,
-0.0202789306640625,
0.025146484375,
0.0180206298828125,
-0.029144287109375,
-0.0298614501953125,
0.0203857421875,
-0.018768310546875,
-0.0706787109375,
0.0299224853515625,
0.0037097930908203125,
0.0428466796875,
0.01174163818359375,
0.006877899169921875,
0.060821533203125,
0.0030574798583984375,
-0.050567626953125,
0.06658935546875,
0.004398345947265625,
-0.0394287109375,
-0.0200653076171875,
-0.0313720703125,
-0.006328582763671875,
-0.026397705078125,
0.039886474609375,
-0.0018444061279296875,
-0.0220794677734375,
-0.01364898681640625,
-0.09136962890625,
0.00980377197265625,
-0.0238189697265625,
0.027130126953125,
-0.006855010986328125,
0.0148162841796875,
0.027740478515625,
0.017120361328125,
-0.034820556640625,
-0.0093536376953125,
-0.046356201171875,
-0.00872039794921875,
-0.011871337890625,
0.013427734375,
-0.01001739501953125,
0.0175628662109375,
0.00806427001953125,
-0.02655029296875,
0.01025390625,
0.031524658203125,
0.08209228515625,
-0.032073974609375,
-0.0010776519775390625,
-0.036346435546875,
0.048126220703125,
-0.003627777099609375,
-0.049407958984375,
0.032135009765625,
0.031982421875,
0.061859130859375,
-0.00495147705078125,
0.0080108642578125,
0.00939178466796875,
-0.0462646484375,
0.02105712890625,
0.040008544921875,
0.028411865234375,
0.04656982421875,
-0.0294189453125,
-0.039459228515625,
0.05340576171875,
-0.04510498046875,
0.0017337799072265625,
-0.035614013671875,
0.0232086181640625,
0.046234130859375,
0.0211181640625,
-0.02386474609375,
0.007061004638671875,
0.034088134765625,
0.022918701171875,
-0.007419586181640625,
0.00917816162109375,
0.0408935546875,
-0.050262451171875,
0.01593017578125,
-0.0131378173828125,
-0.003997802734375,
0.006122589111328125,
-0.0244903564453125,
0.04229736328125,
0.0185546875,
0.060150146484375,
0.042388916015625,
-0.009552001953125,
-0.0005102157592773438,
-0.006175994873046875,
-0.022064208984375,
0.0034427642822265625,
-0.0092620849609375,
-0.056549072265625,
0.0513916015625,
-0.0443115234375,
0.021881103515625,
0.031646728515625,
-0.00579833984375,
-0.0214996337890625,
0.0021343231201171875,
-0.017974853515625,
-0.00787353515625,
-0.0193328857421875,
-0.03863525390625,
0.0253448486328125,
0.020050048828125,
0.01256561279296875,
0.00469970703125,
0.042633056640625,
0.00472259521484375,
-0.05389404296875,
0.057952880859375,
0.0022907257080078125,
-0.03765869140625,
-0.007251739501953125,
-0.04998779296875,
0.05426025390625,
-0.040740966796875,
0.03076171875,
0.056915283203125,
0.00007224082946777344,
0.013916015625,
0.0142364501953125,
-0.002132415771484375,
0.0167694091796875,
0.028533935546875,
0.002719879150390625,
-0.005001068115234375,
-0.056549072265625,
0.0012521743774414062,
0.0287322998046875,
0.0660400390625,
0.036773681640625,
-0.0345458984375,
0.0222625732421875,
0.0482177734375,
-0.0931396484375,
-0.1290283203125,
0.0070343017578125,
-0.056121826171875,
-0.00302886962890625,
-0.01100921630859375,
-0.035247802734375,
-0.011505126953125,
0.0098876953125,
0.0044708251953125,
-0.0093841552734375,
-0.0033016204833984375,
-0.0654296875,
-0.060302734375,
-0.0758056640625,
-0.02154541015625,
-0.0103607177734375,
0.0220947265625,
-0.00405120849609375,
0.06585693359375,
0.011962890625,
-0.0192108154296875,
0.00875091552734375,
0.00873565673828125,
-0.0191497802734375,
-0.0275726318359375,
0.030181884765625,
-0.006649017333984375,
-0.03375244140625,
-0.00032138824462890625,
0.04058837890625,
0.0281219482421875,
-0.034210205078125,
-0.00879669189453125,
0.006439208984375,
-0.0002684593200683594,
0.053436279296875,
0.00305938720703125,
-0.0404052734375,
0.041168212890625,
0.05548095703125,
-0.01117706298828125,
-0.033447265625,
-0.006076812744140625,
-0.051513671875,
-0.01131439208984375,
0.0183563232421875,
0.013275146484375,
-0.0186920166015625,
0.00745391845703125,
0.01030731201171875,
-0.027587890625,
0.00655364990234375,
-0.04486083984375,
0.0758056640625,
0.01451873779296875,
0.047332763671875,
-0.01126861572265625,
-0.01369476318359375,
-0.034881591796875,
0.0010929107666015625,
-0.0136871337890625,
0.00556182861328125,
-0.01100921630859375,
-0.01555633544921875,
-0.02960205078125,
-0.02362060546875,
0.03656005859375,
0.0240631103515625,
0.0273590087890625,
-0.010009765625,
-0.0484619140625,
-0.0012502670288085938,
0.059539794921875,
-0.025970458984375,
-0.027130126953125,
-0.026885986328125,
0.0100860595703125,
-0.039794921875,
-0.04852294921875,
-0.0017223358154296875,
-0.005100250244140625,
-0.044097900390625,
-0.0183868408203125,
-0.0283203125,
-0.029693603515625,
-0.007335662841796875,
-0.00568389892578125,
-0.0226898193359375,
-0.01485443115234375,
0.045440673828125,
-0.055084228515625,
0.03973388671875,
0.008056640625,
0.0189971923828125,
-0.0036258697509765625,
-0.0235443115234375,
-0.05218505859375,
-0.10723876953125,
-0.012451171875,
0.014984130859375,
0.06805419921875,
0.0002028942108154297,
-0.033721923828125,
-0.0246734619140625,
0.044525146484375,
0.04803466796875,
-0.004566192626953125,
0.0050811767578125,
-0.02606201171875,
-0.0175018310546875,
-0.0193328857421875,
0.00771331787109375,
-0.02374267578125,
0.0002357959747314453,
-0.0071868896484375,
0.0126800537109375,
-0.01074981689453125,
-0.057220458984375,
-0.020050048828125,
-0.045196533203125,
-0.01137542724609375,
-0.0174102783203125,
0.011077880859375,
0.003875732421875,
0.016082763671875,
-0.033721923828125,
0.00942230224609375,
0.016357421875,
-0.0189666748046875,
0.0194091796875,
0.021270751953125,
-0.0242156982421875,
0.020172119140625,
0.06695556640625,
0.015594482421875,
-0.0282135009765625,
-0.0635986328125,
-0.02569580078125,
0.01560211181640625,
-0.034820556640625,
0.0301666259765625,
0.0013380050659179688,
-0.027252197265625,
0.06939697265625,
-0.0103302001953125,
-0.0203704833984375,
0.0009341239929199219,
0.024261474609375,
0.020355224609375,
-0.00884246826171875,
0.00412750244140625,
0.0004949569702148438,
0.024932861328125,
0.038848876953125,
0.007244110107421875,
-0.04156494140625,
0.034820556640625,
0.04974365234375,
-0.033660888671875,
0.024169921875,
-0.0246734619140625,
-0.0237579345703125,
-0.000019073486328125,
-0.0013322830200195312,
0.0187225341796875,
0.040679931640625,
-0.00487518310546875,
0.00860595703125,
0.007843017578125,
0.0013971328735351562,
-0.0149078369140625,
0.038665771484375,
-0.01009368896484375,
0.038299560546875,
-0.01284027099609375,
-0.0128936767578125,
-0.0382080078125,
-0.006622314453125,
0.05712890625,
-0.00015938282012939453,
-0.042633056640625,
-0.00695037841796875,
-0.00580596923828125,
0.00548553466796875,
0.0212249755859375,
0.0227203369140625,
0.0445556640625,
0.0185699462890625,
-0.007663726806640625,
-0.0126953125,
-0.005687713623046875,
-0.021759033203125,
-0.036590576171875,
-0.01227569580078125,
0.0173797607421875,
-0.0166473388671875,
0.01509857177734375,
0.07598876953125,
-0.0272674560546875,
0.0677490234375,
-0.016448974609375,
0.01345062255859375,
-0.00794219970703125,
0.029266357421875,
0.0240631103515625,
0.00008064508438110352,
0.0197601318359375,
-0.00836181640625,
0.0060272216796875,
-0.0303192138671875,
-0.01111602783203125,
0.0197296142578125,
0.023193359375,
-0.006298065185546875,
-0.0177001953125,
0.03057861328125,
0.002735137939453125,
-0.0108489990234375,
0.0246124267578125,
-0.004665374755859375,
-0.0193328857421875,
-0.038909912109375,
-0.0157012939453125,
0.03021240234375,
-0.0077972412109375,
-0.0013408660888671875,
0.024688720703125,
-0.0180511474609375,
0.0048980712890625,
-0.0198516845703125,
0.0036373138427734375,
-0.021636962890625,
-0.00801849365234375,
0.000331878662109375,
-0.031494140625,
0.0012454986572265625,
0.007720947265625,
0.02325439453125,
-0.026885986328125,
-0.03302001953125,
0.043182373046875,
0.00637054443359375,
0.034393310546875,
-0.039520263671875,
-0.00830078125,
-0.0284271240234375,
-0.0128631591796875,
0.059783935546875,
0.0254669189453125,
-0.043670654296875,
-0.00994110107421875,
-0.044036865234375,
-0.0088348388671875,
0.0146331787109375,
-0.01358795166015625,
-0.0552978515625,
-0.018463134765625,
0.0038471221923828125,
0.0087890625,
-0.00907135009765625,
-0.0133056640625,
-0.0290374755859375,
0.01413726806640625,
0.0039005279541015625,
0.038177490234375,
-0.0098724365234375,
0.039764404296875,
0.0002892017364501953,
0.01904296875,
0.004642486572265625,
0.002490997314453125,
-0.0130462646484375,
-0.01004791259765625,
0.0178375244140625,
-0.09307861328125,
-0.031494140625,
-0.0164642333984375,
-0.036285400390625,
0.037506103515625,
-0.002513885498046875,
-0.00676727294921875,
0.00962066650390625,
-0.0548095703125,
-0.0198516845703125,
-0.009368896484375,
0.06463623046875,
-0.0733642578125,
-0.003223419189453125,
0.033477783203125,
-0.022796630859375,
-0.0213775634765625,
-0.01491546630859375,
-0.0086212158203125,
0.01299285888671875,
-0.0007615089416503906,
-0.0269622802734375,
0.0186614990234375,
-0.03912353515625,
0.058929443359375,
0.0572509765625,
-0.0009107589721679688,
0.045379638671875,
0.01113128662109375,
0.0004029273986816406,
0.01126861572265625,
-0.00862884521484375,
-0.0019445419311523438,
0.021575927734375,
0.0841064453125,
-0.0020599365234375,
-0.016632080078125,
0.05621337890625,
-0.041595458984375,
-0.006198883056640625,
0.0213470458984375,
0.051910400390625,
-0.01386260986328125,
-0.0028934478759765625,
0.0203857421875,
-0.021636962890625,
-0.00608062744140625,
-0.001773834228515625,
0.005985260009765625,
-0.0198211669921875,
0.05499267578125,
-0.0164794921875,
-0.00885009765625,
0.007625579833984375,
-0.01264190673828125,
0.01186370849609375,
-0.032318115234375,
0.0301361083984375,
0.0006341934204101562,
-0.078125,
0.033905029296875,
0.07049560546875,
-0.016204833984375,
-0.04132080078125,
0.0193023681640625,
-0.006618499755859375,
-0.0001691579818725586,
-0.086181640625,
0.0145721435546875,
-0.0011014938354492188,
-0.00658416748046875,
0.005252838134765625,
0.04205322265625,
0.0185089111328125,
0.0740966796875,
0.0021495819091796875,
0.01294708251953125,
0.03155517578125,
0.011444091796875,
-0.08428955078125,
-0.0137176513671875,
0.016571044921875,
0.0638427734375,
-0.0301513671875,
0.05267333984375,
-0.017059326171875,
-0.0280609130859375,
0.0011577606201171875,
0.00391387939453125,
0.0340576171875,
-0.0484619140625,
0.00942230224609375,
0.0141754150390625,
0.038665771484375,
0.0175933837890625,
-0.006366729736328125,
0.0157470703125,
-0.0304107666015625,
-0.022674560546875,
-0.002681732177734375,
-0.03350830078125,
-0.0291595458984375,
-0.0271453857421875,
-0.04498291015625,
0.09918212890625,
-0.016937255859375,
-0.006633758544921875,
0.0281524658203125,
0.039276123046875,
-0.02288818359375,
0.02752685546875,
-0.037261962890625,
0.043975830078125,
-0.0218505859375,
0.050079345703125,
-0.09088134765625,
-0.017059326171875,
0.00753021240234375,
0.05963134765625,
0.05755615234375,
-0.005161285400390625,
-0.0234832763671875,
-0.00746917724609375,
0.055694580078125,
0.07586669921875,
0.020599365234375,
0.003620147705078125,
0.0116119384765625,
0.07080078125,
0.0750732421875,
-0.05999755859375,
0.039520263671875,
-0.019256591796875,
-0.003551483154296875,
0.0199127197265625,
0.0125274658203125,
0.0133514404296875,
-0.0308074951171875,
0.013031005859375,
-0.038543701171875,
-0.019012451171875,
0.033721923828125,
-0.0014162063598632812,
0.00010257959365844727,
0.069091796875,
0.042694091796875,
-0.03369140625,
-0.0394287109375,
-0.031219482421875,
0.04681396484375,
-0.0009984970092773438,
0.0263519287109375,
0.03204345703125,
0.0113067626953125,
0.08465576171875,
0.006195068359375,
0.0212249755859375,
0.0239410400390625,
-0.0077362060546875,
0.0396728515625,
0.036956787109375,
0.032684326171875,
-0.033599853515625,
-0.00501251220703125,
0.0251312255859375,
0.06134033203125,
-0.039886474609375,
-0.057861328125,
-0.004177093505859375,
-0.0188446044921875,
0.00926971435546875,
-0.00841522216796875,
-0.00305938720703125,
0.0504150390625,
0.052581787109375,
-0.00524139404296875,
0.006587982177734375,
0.0250091552734375,
-0.02935791015625,
-0.00766754150390625,
-0.016357421875,
0.0089263916015625,
0.0321044921875,
-0.018707275390625,
0.01357269287109375,
-0.01039886474609375,
0.05426025390625,
0.00949859619140625,
0.0286712646484375,
-0.0477294921875,
-0.0211334228515625,
-0.01322174072265625,
0.029144287109375,
0.00391387939453125,
0.01525115966796875,
-0.0102996826171875,
-0.02392578125,
-0.00927734375,
0.00861358642578125,
0.054229736328125,
0.0028438568115234375,
0.05096435546875,
0.027862548828125,
-0.032501220703125,
0.00872039794921875,
-0.00799560546875,
-0.0212860107421875,
-0.006336212158203125,
-0.0067291259765625,
-0.0006375312805175781,
0.030426025390625,
-0.01203155517578125,
-0.0007233619689941406,
0.0482177734375,
0.003849029541015625,
0.01047515869140625,
0.0035400390625,
-0.00571441650390625,
-0.043609619140625,
0.0163726806640625,
0.0185089111328125,
0.08953857421875,
0.0240936279296875,
-0.06829833984375,
-0.03662109375,
0.006359100341796875,
-0.0283203125,
0.0399169921875,
0.052886962890625,
-0.01145172119140625,
-0.0068511962890625,
-0.01486968994140625,
0.004611968994140625,
0.0226593017578125,
-0.0237274169921875,
0.003963470458984375,
-0.0008225440979003906,
0.00684356689453125,
0.003070831298828125,
-0.052154541015625,
-0.032073974609375,
-0.01654052734375,
0.0089874267578125,
0.011474609375,
0.01171112060546875,
0.039947509765625,
0.0277252197265625,
-0.0355224609375,
0.0163116455078125,
-0.0249786376953125,
-0.01129913330078125,
-0.01010894775390625,
-0.0126190185546875,
-0.00373077392578125,
0.00759124755859375,
0.0161590576171875,
0.01369476318359375,
0.059661865234375,
-0.041839599609375,
0.0007991790771484375,
-0.02520751953125,
0.0245513916015625,
-0.03839111328125,
0.00799560546875,
-0.019073486328125,
0.0211639404296875,
0.01971435546875,
-0.006683349609375,
0.036834716796875,
-0.007244110107421875,
-0.0078582763671875,
0.0137481689453125,
-0.0080718994140625,
-0.035675048828125,
0.0245208740234375,
-0.0236968994140625,
0.0233917236328125,
0.0384521484375,
-0.00865936279296875,
-0.00473785400390625,
-0.00849151611328125,
-0.03155517578125,
-0.01410675048828125,
0.028594970703125,
-0.01348876953125,
0.0018358230590820312,
0.00860595703125,
-0.01291656494140625,
0.016845703125,
0.042694091796875,
-0.0026493072509765625,
0.01641845703125,
-0.0284423828125,
-0.0119476318359375,
0.0024929046630859375,
0.01446533203125,
-0.0333251953125,
-0.0369873046875,
-0.01409149169921875,
-0.028106689453125,
-0.018218994140625,
-0.07415771484375,
-0.033203125,
0.00037407875061035156,
0.0012197494506835938,
0.0064849853515625,
-0.03485107421875,
0.033233642578125,
-0.03155517578125,
-0.0106353759765625,
-0.03204345703125,
-0.0401611328125,
0.0146331787109375,
0.00824737548828125,
-0.0284271240234375,
0.007778167724609375,
-0.069091796875,
-0.02130126953125,
-0.020477294921875,
0.0199432373046875,
0.02447509765625,
-0.05609130859375,
-0.0207977294921875,
0.039703369140625,
0.0418701171875,
0.06451416015625,
0.0548095703125,
0.0180816650390625,
0.058990478515625,
0.01412200927734375,
-0.06597900390625,
-0.077880859375,
0.023651123046875,
-0.058990478515625,
0.0093994140625,
-0.0004088878631591797,
0.03173828125,
0.059478759765625,
-0.0160675048828125,
-0.10394287109375,
0.042022705078125,
-0.04705810546875,
-0.032470703125,
-0.033355712890625,
-0.0021381378173828125,
0.011016845703125,
-0.006801605224609375,
0.00928497314453125,
-0.0235595703125,
-0.03411865234375,
-0.00843048095703125,
0.0014858245849609375,
0.039337158203125,
0.0138092041015625,
0.013397216796875,
-0.06640625,
-0.018463134765625,
-0.0574951171875,
0.017730712890625,
0.03948974609375,
-0.01503753662109375,
0.01491546630859375,
0.054046630859375,
-0.0289764404296875,
-0.0222930908203125,
-0.042236328125,
-0.048248291015625,
-0.0038356781005859375,
0.034210205078125,
-0.0240936279296875,
0.00794219970703125,
0.041259765625,
0.044952392578125,
0.0263214111328125,
-0.030029296875,
-0.00974273681640625,
0.0082550048828125,
-0.0192413330078125,
-0.009124755859375,
0.025115966796875,
-0.0352783203125,
0.005710601806640625,
-0.01546478271484375,
-0.01343536376953125,
0.00012755393981933594,
-0.031951904296875,
-0.042999267578125,
-0.016693115234375,
-0.05059814453125,
0.0008826255798339844,
-0.016571044921875,
-0.0013875961303710938,
0.0022602081298828125,
-0.01361083984375,
0.0036106109619140625,
-0.0396728515625,
0.025634765625,
-0.00829315185546875,
-0.034027099609375,
0.0021152496337890625,
0.00800323486328125,
0.02801513671875,
-0.01435089111328125,
0.03411865234375,
-0.01898193359375,
0.032318115234375,
0.0146636962890625,
-0.0016660690307617188,
0.013153076171875,
-0.004634857177734375,
-0.0012054443359375,
0.018463134765625,
0.0246124267578125,
0.014007568359375,
0.02459716796875,
0.0249481201171875,
0.022491455078125,
0.0141448974609375,
0.034393310546875,
0.0051116943359375,
-0.03729248046875,
0.023834228515625,
-0.04779052734375,
-0.00849151611328125,
0.0235443115234375,
-0.03790283203125,
-0.0401611328125,
0.009368896484375,
0.0421142578125,
0.005657196044921875,
0.006008148193359375
] |
c429de5c672eb96acd0457d614f05216aa57712e
|
Wordpress Stackexchange
Q: Execute shortcode within shortcode I am using this plugin: http://wordpress.org/extend/plugins/worldcurrency/
Shortcode syntax:
[worldcurrency cur="EUR" value="25"]
However, I'm using Advanced custom fields and the shortcode for custom fields is not being executed within the shortcode for worldcurrency.
[worldcurrency curr="[acf field="fl_currency"]" value="25"]
Any remedies here?
Update
I think I need to be using the
add_filter('xx','do_shortcode');
somehow?
A: I haven't tried this, but you could try pseudo-changing the priority of your shortcode hook.
Basically, you force your shortcode to execute before it would normally. That link shows how to execute your shortcode separately - and, more importantly, before - the other shortcodes get implemented.
This works by caching and temporarily removing all existing shortcodes, executing yours, then reestablishing the other shortcodes.
|
Q: Execute shortcode within shortcode I am using this plugin: http://wordpress.org/extend/plugins/worldcurrency/
Shortcode syntax:
[worldcurrency cur="EUR" value="25"]
However, I'm using Advanced custom fields and the shortcode for custom fields is not being executed within the shortcode for worldcurrency.
[worldcurrency curr="[acf field="fl_currency"]" value="25"]
Any remedies here?
Update
I think I need to be using the
add_filter('xx','do_shortcode');
somehow?
A: I haven't tried this, but you could try pseudo-changing the priority of your shortcode hook.
Basically, you force your shortcode to execute before it would normally. That link shows how to execute your shortcode separately - and, more importantly, before - the other shortcodes get implemented.
This works by caching and temporarily removing all existing shortcodes, executing yours, then reestablishing the other shortcodes.
A: My answer involves changing the coding of world currency plugin.
Then write the shortcode like this:
[worldcurrency value="25"][acf field="fl_currency"][/worldcurrency]
In the code for the currency plugin, the value of the custom field will be available through the $content field.
Then just set the curr field to $content and you should be good to go.
A: If you look at the ACF shortcode in source (api.php), it just uses the API function get_field on the shortcode's field attribute.
If you look at the world currency shortcode in source (worldcurrency.php), it outputs a span with the worldcurrency class and a couple of custom attributes, which then get converted on the user side via javascript.
You could probably write your own shortcode that combines the two, using the output of world currency with ACF's get_field to fetch the attributes from fields you specify.
|
wordpress
|
{
"language": "en",
"length": 260,
"provenance": "stackexchange_00019.jsonl.gz:428678",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84479"
}
|
[
0.0008568763732910156,
-0.006927490234375,
0.0066986083984375,
0.016632080078125,
-0.0222930908203125,
-0.008941650390625,
0.01540374755859375,
-0.042633056640625,
-0.021240234375,
0.03668212890625,
-0.0155029296875,
0.01284027099609375,
0.0013875961303710938,
-0.02667236328125,
-0.00252532958984375,
-0.0279388427734375,
0.00992584228515625,
0.02301025390625,
0.0168914794921875,
-0.024322509765625,
0.01158905029296875,
-0.00684356689453125,
-0.0237884521484375,
0.022705078125,
0.0304718017578125,
-0.06561279296875,
0.1092529296875,
-0.0221710205078125,
0.02899169921875,
-0.01483917236328125,
0.037933349609375,
-0.01849365234375,
0.04339599609375,
0.017303466796875,
-0.04718017578125,
0.0303192138671875,
-0.029815673828125,
0.018310546875,
-0.0051422119140625,
0.0247039794921875,
0.049102783203125,
-0.0228729248046875,
0.06585693359375,
0.0301513671875,
0.01971435546875,
-0.0364990234375,
0.0673828125,
-0.0523681640625,
-0.0112457275390625,
0.0304107666015625,
0.02740478515625,
0.0007991790771484375,
0.04351806640625,
0.0017156600952148438,
-0.016265869140625,
-0.0270538330078125,
-0.0924072265625,
0.0299224853515625,
0.01763916015625,
0.11083984375,
0.03521728515625,
-0.0018529891967773438,
-0.03936767578125,
-0.07244873046875,
0.04486083984375,
0.00182342529296875,
0.0482177734375,
0.01462554931640625,
0.02459716796875,
0.06268310546875,
0.0099029541015625,
-0.00897979736328125,
0.005947113037109375,
-0.004344940185546875,
-0.04022216796875,
0.006031036376953125,
0.0272064208984375,
-0.0092620849609375,
0.01009368896484375,
-0.015167236328125,
0.0006380081176757812,
0.037506103515625,
-0.035003662109375,
0.0176544189453125,
-0.043182373046875,
0.00372314453125,
-0.014556884765625,
-0.0212860107421875,
-0.002376556396484375,
-0.04229736328125,
-0.016082763671875,
0.015472412109375,
-0.03662109375,
0.0010356903076171875,
-0.0413818359375,
0.007076263427734375,
0.006744384765625,
0.05255126953125,
0.0164031982421875,
0.03717041015625,
-0.01561737060546875,
-0.028350830078125,
0.0178375244140625,
-0.05126953125,
-0.0105133056640625,
0.0153961181640625,
0.00547027587890625,
0.0308990478515625,
0.0296478271484375,
0.01558685302734375,
-0.014739990234375,
0.003246307373046875,
-0.00815582275390625,
0.008331298828125,
-0.014678955078125,
-0.044677734375,
-0.0791015625,
0.01392364501953125,
-0.0185546875,
-0.0261688232421875,
0.031463623046875,
0.037139892578125,
0.02923583984375,
0.00629425048828125,
-0.0311279296875,
-0.0027179718017578125,
-0.013153076171875,
-0.06207275390625,
0.0026683807373046875,
0.01097869873046875,
-0.0306243896484375,
-0.0028514862060546875,
0.066162109375,
0.07135009765625,
0.0297088623046875,
0.006656646728515625,
0.042388916015625,
0.0037364959716796875,
0.0103759765625,
-0.0300140380859375,
0.05047607421875,
0.0171661376953125,
-0.0195159912109375,
0.017913818359375,
-0.005733489990234375,
-0.0083160400390625,
0.0184478759765625,
0.0445556640625,
-0.0203857421875,
-0.029388427734375,
0.00984954833984375,
0.005889892578125,
0.01168060302734375,
0.02410888671875,
0.00960540771484375,
0.0201416015625,
0.05889892578125,
-0.020599365234375,
-0.0025386810302734375,
-0.0164947509765625,
-0.0300750732421875,
-0.031707763671875,
-0.034149169921875,
-0.0684814453125,
-0.063232421875,
0.02215576171875,
0.01045989990234375,
0.00914764404296875,
0.03814697265625,
0.05328369140625,
0.012725830078125,
-0.03399658203125,
-0.00997161865234375,
0.0300445556640625,
0.0084686279296875,
0.0207672119140625,
-0.0220947265625,
0.0202178955078125,
0.04095458984375,
-0.030181884765625,
-0.0345458984375,
-0.03369140625,
0.0675048828125,
-0.007411956787109375,
-0.0272369384765625,
-0.04803466796875,
0.051727294921875,
0.04486083984375,
-0.0074310302734375,
0.049041748046875,
0.02752685546875,
0.01464080810546875,
0.0205078125,
0.00799560546875,
0.01372528076171875,
-0.037261962890625,
-0.0210113525390625,
-0.00933837890625,
-0.006679534912109375,
-0.01015472412109375,
0.05029296875,
-0.005580902099609375,
0.024078369140625,
-0.007843017578125,
-0.005321502685546875,
0.0014677047729492188,
0.0001647472381591797,
0.004425048828125,
-0.0296630859375,
-0.033477783203125,
0.0084075927734375,
-0.040191650390625,
0.01039886474609375,
-0.0219879150390625,
-0.0170745849609375,
0.022308349609375,
-0.01140594482421875,
0.0701904296875,
0.0100860595703125,
0.018157958984375,
0.025543212890625,
-0.074951171875,
0.030517578125,
0.020477294921875,
0.01454925537109375,
-0.01027679443359375,
-0.0122833251953125,
-0.0180816650390625,
0.0100250244140625,
0.014312744140625,
-0.01187896728515625,
0.00846099853515625,
-0.0960693359375,
-0.08465576171875,
-0.07916259765625,
-0.0093231201171875,
-0.06756591796875,
-0.0092010498046875,
0.024658203125,
0.0596923828125,
0.0477294921875,
0.0200042724609375,
0.0021915435791015625,
-0.037933349609375,
0.056854248046875,
0.0027179718017578125,
0.034423828125,
-0.05242919921875,
0.0200347900390625,
0.07958984375,
-0.0157318115234375,
0.01300811767578125,
-0.0184783935546875,
-0.0374755859375,
-0.0109405517578125,
0.026580810546875,
-0.01467132568359375,
-0.03302001953125,
0.033782958984375,
-0.011871337890625,
0.0246429443359375,
-0.01812744140625,
-0.03656005859375,
0.00208282470703125,
0.036712646484375,
-0.01168060302734375,
0.033843994140625,
0.0167999267578125,
-0.0017099380493164062,
0.0010499954223632812,
0.0011138916015625,
-0.04150390625,
-0.00037026405334472656,
0.035064697265625,
-0.0189361572265625,
-0.002948760986328125,
-0.0288848876953125,
-0.0011510848999023438,
-0.02349853515625,
0.007724761962890625,
0.0008373260498046875,
0.0234832763671875,
-0.006969451904296875,
-0.009857177734375,
0.00841522216796875,
-0.007732391357421875,
-0.00287628173828125,
0.0161895751953125,
0.0051422119140625,
-0.0253753662109375,
0.0130767822265625,
0.0074615478515625,
-0.0256195068359375,
0.0239410400390625,
0.03253173828125,
-0.04052734375,
0.0185089111328125,
-0.034912109375,
0.041412353515625,
-0.0196533203125,
0.007427215576171875,
0.06842041015625,
0.01371002197265625,
-0.0031070709228515625,
-0.0004227161407470703,
0.00826263427734375,
-0.01476287841796875,
-0.001834869384765625,
-0.0096588134765625,
0.0006403923034667969,
-0.01593017578125,
0.05401611328125,
0.0230560302734375,
0.036285400390625,
-0.00434112548828125,
-0.043365478515625,
0.00826263427734375,
0.021728515625,
-0.055206298828125,
-0.0643310546875,
0.017547607421875,
-0.01213836669921875,
0.03070068359375,
-0.053314208984375,
0.01438140869140625,
-0.01554107666015625,
-0.06134033203125,
0.004199981689453125,
0.0005016326904296875,
-0.0190582275390625,
-0.03338623046875,
-0.0462646484375,
-0.06927490234375,
-0.0255584716796875,
0.008087158203125,
-0.0005478858947753906,
0.0008597373962402344,
0.034027099609375,
-0.02484130859375,
-0.052764892578125,
-0.0206451416015625,
-0.03375244140625,
-0.0096893310546875,
0.007282257080078125,
0.0174407958984375,
-0.06134033203125,
0.042938232421875,
-0.01568603515625,
0.01141357421875,
0.047515869140625,
-0.0211639404296875,
0.0006546974182128906,
0.01041412353515625,
0.0102691650390625,
0.03155517578125,
0.01824951171875,
-0.015899658203125,
-0.01190185546875,
0.014495849609375,
-0.036865234375,
-0.0198211669921875,
-0.038116455078125,
-0.066650390625,
0.0011911392211914062,
0.051513671875,
0.0201416015625,
-0.02020263671875,
0.005218505859375,
0.00540924072265625,
-0.00159454345703125,
0.02252197265625,
0.0020427703857421875,
-0.0012359619140625,
-0.008941650390625,
0.0014505386352539062,
-0.0228424072265625,
0.035430908203125,
-0.006412506103515625,
0.0004138946533203125,
0.011688232421875,
0.02386474609375,
-0.01427459716796875,
0.0126190185546875,
-0.04766845703125,
-0.01064300537109375,
0.042572021484375,
0.01094818115234375,
0.037750244140625,
-0.017364501953125,
-0.0321044921875,
-0.004085540771484375,
0.079833984375,
-0.059356689453125,
0.0009431838989257812,
0.0048065185546875,
0.0023651123046875,
-0.0146331787109375,
-0.01053619384765625,
-0.059112548828125,
-0.00731658935546875,
-0.039520263671875,
0.00969696044921875,
0.006465911865234375,
-0.0187530517578125,
-0.0330810546875,
0.0033321380615234375,
-0.051116943359375,
-0.0206146240234375,
0.039794921875,
-0.0168304443359375,
0.024810791015625,
-0.01183319091796875,
-0.0019245147705078125,
-0.029388427734375,
-0.03607177734375,
0.003993988037109375,
-0.05364990234375,
0.0014133453369140625,
-0.013702392578125,
0.0316162109375,
0.058135986328125,
-0.102294921875,
-0.004978179931640625,
0.01152801513671875,
-0.035247802734375,
0.0185546875,
-0.0293731689453125,
0.01708984375,
-0.00933837890625,
0.0528564453125,
-0.021240234375,
0.023681640625,
0.0229644775390625,
0.047576904296875,
-0.005523681640625,
0.026031494140625,
-0.047698974609375,
-0.060272216796875,
-0.004016876220703125,
-0.056304931640625,
-0.057525634765625,
-0.048980712890625,
-0.0192413330078125,
0.0076751708984375,
-0.01219940185546875,
0.0025787353515625,
-0.07147216796875,
-0.0364990234375,
0.034637451171875,
-0.0272064208984375,
0.018341064453125,
0.01690673828125,
0.059906005859375,
-0.0040283203125,
-0.0133819580078125,
-0.09527587890625,
-0.0166168212890625,
0.040130615234375,
0.0313720703125,
0.003932952880859375,
-0.007625579833984375,
-0.045440673828125,
0.041900634765625,
0.0214691162109375,
0.0153045654296875,
-0.0176849365234375,
0.06378173828125,
-0.00971221923828125,
-0.0189361572265625,
0.0157928466796875,
-0.009521484375,
-0.0221405029296875,
0.0094146728515625,
0.032196044921875,
-0.0313720703125,
0.010101318359375,
0.01294708251953125,
0.03021240234375,
-0.007781982421875,
0.00861358642578125,
-0.0191802978515625,
0.00782012939453125,
0.04150390625,
0.002910614013671875,
-0.0008096694946289062,
0.0079193115234375,
-0.0160369873046875,
-0.01800537109375,
-0.00763702392578125,
0.032745361328125,
-0.00286865234375,
-0.0182952880859375,
0.00836181640625,
0.015716552734375,
-0.0223236083984375,
0.040374755859375,
0.004180908203125,
0.031890869140625,
0.004215240478515625,
-0.0093841552734375,
-0.066650390625,
-0.008270263671875,
-0.0445556640625,
-0.031585693359375,
-0.018585205078125,
-0.00098419189453125,
0.00977325439453125,
0.019195556640625,
0.026214599609375,
-0.0121612548828125,
0.0304718017578125,
-0.00763702392578125,
-0.0290374755859375,
-0.0220489501953125,
-0.0161895751953125,
-0.02313232421875,
0.016326904296875,
-0.0513916015625,
0.0189971923828125,
0.029022216796875,
0.042510986328125,
0.04241943359375,
0.021209716796875,
0.0173187255859375,
-0.0143585205078125,
-0.00376129150390625,
0.00037097930908203125,
-0.01065826416015625,
-0.0202789306640625,
-0.00670623779296875,
0.0082550048828125,
0.03515625,
-0.0306396484375,
-0.0223388671875,
0.0280914306640625,
-0.00026702880859375,
-0.0270843505859375,
-0.01247406005859375,
0.00634002685546875,
0.0080718994140625,
-0.0170440673828125,
-0.0012197494506835938,
-0.0008873939514160156,
0.032440185546875,
-0.0062255859375,
-0.011016845703125,
-0.0269775390625,
0.033111572265625,
-0.0249786376953125,
0.03729248046875,
-0.004047393798828125,
-0.035491943359375,
0.0264434814453125,
0.0016202926635742188,
-0.0290374755859375,
0.0218353271484375,
-0.029266357421875,
-0.01495361328125,
-0.00959014892578125,
0.053558349609375,
-0.0122528076171875,
0.01505279541015625,
-0.0222320556640625,
-0.0058441162109375,
-0.018798828125,
-0.00626373291015625,
0.06793212890625,
0.03851318359375,
-0.027130126953125,
0.0146636962890625,
-0.03369140625,
-0.0179595947265625,
-0.0062408447265625,
-0.02490234375,
-0.0389404296875,
-0.021148681640625,
0.0117950439453125,
0.0244293212890625,
-0.023345947265625,
-0.048614501953125,
-0.00439453125,
0.021759033203125,
0.0248260498046875,
0.07086181640625,
-0.001979827880859375,
0.0187225341796875,
0.0394287109375,
0.0283966064453125,
0.02191162109375,
0.007282257080078125,
-0.0046539306640625,
-0.030120849609375,
0.009521484375,
-0.0002713203430175781,
-0.0391845703125,
-0.0044403076171875,
-0.0165863037109375,
0.015228271484375,
0.0574951171875,
-0.01459503173828125,
0.0440673828125,
-0.019622802734375,
0.008636474609375,
-0.0210113525390625,
0.0035572052001953125,
-0.03759765625,
-0.018096923828125,
0.051910400390625,
-0.06396484375,
0.00212860107421875,
0.003528594970703125,
-0.00803375244140625,
0.053619384765625,
-0.0577392578125,
0.038909912109375,
0.037261962890625,
-0.0087432861328125,
0.050018310546875,
0.0276336669921875,
-0.059844970703125,
-0.00907135009765625,
0.0224151611328125,
-0.032806396484375,
-0.017425537109375,
0.03924560546875,
0.035675048828125,
-0.033233642578125,
0.0148468017578125,
-0.0172882080078125,
-0.028839111328125,
-0.0316162109375,
-0.01067352294921875,
0.044403076171875,
0.080810546875,
0.08624267578125,
-0.10833740234375,
-0.001697540283203125,
0.0031890869140625,
-0.0433349609375,
0.004230499267578125,
-0.02197265625,
0.01441192626953125,
0.006839752197265625,
0.0225067138671875,
0.048858642578125,
-0.026824951171875,
0.01338958740234375,
0.036407470703125,
-0.0189666748046875,
-0.0284576416015625,
0.0211029052734375,
0.0128936767578125,
-0.006008148193359375,
0.0157623291015625,
0.015594482421875,
-0.01096343994140625,
-0.034637451171875,
-0.0012063980102539062,
0.0274810791015625,
-0.03302001953125,
-0.0599365234375,
0.0306549072265625,
-0.0012683868408203125,
-0.0067138671875,
-0.0006527900695800781,
0.0173492431640625,
0.0721435546875,
0.056915283203125,
0.002384185791015625,
0.00849151611328125,
0.00795745849609375,
0.09490966796875,
0.004413604736328125,
-0.048980712890625,
-0.0193939208984375,
0.047576904296875,
-0.055755615234375,
0.01383209228515625,
0.006916046142578125,
0.0029754638671875,
0.00279998779296875,
-0.0105743408203125,
0.0247802734375,
-0.0239715576171875,
-0.00891876220703125,
0.0220794677734375,
0.025360107421875,
0.0030155181884765625,
-0.01551055908203125,
0.033905029296875,
-0.00605010986328125,
0.009674072265625,
0.00244140625,
-0.01284027099609375,
-0.03106689453125,
-0.043487548828125,
-0.103759765625,
0.128662109375,
-0.0142669677734375,
0.05548095703125,
-0.02105712890625,
0.04937744140625,
-0.0016727447509765625,
0.014801025390625,
-0.04217529296875,
0.08203125,
0.035308837890625,
0.03192138671875,
-0.07952880859375,
-0.0271759033203125,
-0.00016796588897705078,
0.0390625,
0.01241302490234375,
0.007549285888671875,
-0.020172119140625,
0.0185089111328125,
0.0601806640625,
0.0011930465698242188,
-0.01386260986328125,
0.04974365234375,
0.0184326171875,
0.0148162841796875,
0.01329803466796875,
0.02130126953125,
0.048492431640625,
-0.03375244140625,
-0.032196044921875,
0.05120849609375,
-0.0024662017822265625,
0.003665924072265625,
0.0162506103515625,
0.032867431640625,
0.004589080810546875,
0.002002716064453125,
0.00677490234375,
-0.016571044921875,
-0.016357421875,
0.0531005859375,
-0.005023956298828125,
0.023101806640625,
-0.05364990234375,
-0.005718231201171875,
0.0177001953125,
-0.01263427734375,
0.0186309814453125,
0.04742431640625,
0.0175018310546875,
0.034912109375,
0.00933074951171875,
0.0232391357421875,
0.0230865478515625,
-0.0036182403564453125,
-0.01241302490234375,
-0.0041656494140625,
0.00661468505859375,
-0.001392364501953125,
0.07855224609375,
0.0070037841796875,
-0.0174560546875,
-0.037109375,
0.00516510009765625,
0.0195159912109375,
0.00843048095703125,
-0.02264404296875,
-0.01251220703125,
-0.0020236968994140625,
-0.024658203125,
0.00160980224609375,
-0.0241851806640625,
0.0114898681640625,
0.01055145263671875,
0.045013427734375,
0.0172119140625,
0.039947509765625,
-0.065673828125,
-0.025726318359375,
-0.0260009765625,
0.021392822265625,
-0.0081634521484375,
0.033843994140625,
0.004314422607421875,
0.0301666259765625,
-0.029815673828125,
-0.009490966796875,
0.02392578125,
0.0115966796875,
-0.017913818359375,
-0.0251617431640625,
-0.006237030029296875,
-0.038177490234375,
-0.003696441650390625,
0.0191497802734375,
0.00286102294921875,
0.0369873046875,
0.038177490234375,
0.054931640625,
0.0303955078125,
-0.004596710205078125,
0.0299224853515625,
-0.0021839141845703125,
-0.040435791015625,
-0.0005469322204589844,
-0.036834716796875,
0.0162811279296875,
-0.0092010498046875,
-0.0075836181640625,
0.0257110595703125,
0.0250396728515625,
-0.0421142578125,
0.0293426513671875,
0.0003705024719238281,
-0.0196990966796875,
0.020538330078125,
0.0088043212890625,
0.034454345703125,
-0.0012340545654296875,
0.0202178955078125,
-0.0006618499755859375,
-0.00690460205078125,
-0.0853271484375,
0.0197906494140625,
0.052337646484375,
0.003963470458984375,
-0.01448822021484375,
0.01537322998046875,
-0.0182647705078125,
-0.0194244384765625,
0.0309295654296875,
0.020721435546875,
-0.035736083984375,
0.00673675537109375,
-0.00848388671875,
-0.038299560546875,
-0.00783538818359375,
-0.0038509368896484375,
0.020294189453125,
0.03436279296875,
-0.0147857666015625,
0.02471923828125,
0.02728271484375,
0.0249786376953125,
-0.030914306640625,
0.0518798828125,
0.036590576171875,
-0.00751495361328125,
0.0192108154296875,
-0.00797271728515625,
-0.034332275390625,
0.0185089111328125,
0.0167083740234375,
0.03515625,
-0.020660400390625,
-0.0183868408203125,
-0.0223846435546875,
0.0208587646484375,
0.0301971435546875,
0.053253173828125,
-0.0212860107421875,
-0.0294036865234375,
-0.05487060546875,
-0.022979736328125,
0.03924560546875,
0.039398193359375,
-0.00652313232421875,
0.0015878677368164062,
0.0246734619140625,
-0.0010538101196289062,
0.031707763671875,
0.003185272216796875,
0.06402587890625,
0.02728271484375,
-0.0096588134765625,
0.0828857421875,
0.00635528564453125,
-0.0277557373046875,
0.04351806640625,
0.02056884765625,
-0.06658935546875,
0.012969970703125,
-0.01776123046875,
-0.0296630859375,
0.03289794921875,
0.0186004638671875,
-0.01224517822265625,
0.0194854736328125,
0.009765625,
-0.03973388671875,
0.00890350341796875,
-0.0190582275390625,
-0.0211029052734375,
-0.0008840560913085938,
0.00252532958984375,
-0.005130767822265625,
0.0251312255859375,
-0.0305328369140625,
-0.005077362060546875,
-0.020751953125,
0.04083251953125,
0.0211334228515625,
-0.0457763671875,
-0.010101318359375,
0.0168304443359375,
0.01259613037109375,
0.0202178955078125,
-0.007843017578125,
0.01146697998046875,
0.00392913818359375,
-0.021484375,
-0.029144287109375,
-0.0158538818359375,
0.039581298828125,
0.00315093994140625,
0.0206298828125,
0.03515625,
-0.0233917236328125,
-0.056396484375,
-0.0005207061767578125,
0.01430511474609375,
0.0377197265625,
0.043914794921875,
-0.0230560302734375,
0.0282745361328125,
-0.031951904296875,
-0.048492431640625,
-0.03619384765625,
0.035369873046875,
-0.06939697265625,
-0.032958984375,
-0.0223236083984375,
0.0196075439453125,
0.0279998779296875,
-0.032745361328125,
-0.05694580078125,
-0.01049041748046875,
-0.005275726318359375,
-0.0229339599609375,
-0.06378173828125,
0.004985809326171875,
0.01763916015625,
-0.01244354248046875,
-0.0308837890625,
-0.0037899017333984375,
-0.0465087890625,
0.0247955322265625,
0.021331787109375,
0.0011463165283203125,
0.0166778564453125,
0.0257415771484375,
-0.04656982421875,
0.033966064453125,
0.0005941390991210938,
0.014404296875,
0.01739501953125,
-0.03143310546875,
0.031524658203125,
0.0024356842041015625,
-0.036407470703125,
-0.053375244140625,
0.025970458984375,
-0.014984130859375,
0.00727081298828125,
-0.05450439453125,
-0.017242431640625,
-0.0216522216796875,
0.057891845703125,
-0.006847381591796875,
0.008056640625,
-0.0171356201171875,
0.01263427734375,
0.042449951171875,
0.029205322265625,
-0.011474609375,
-0.0084686279296875,
-0.0210418701171875,
-0.042633056640625,
-0.035247802734375,
0.01387786865234375,
-0.0225982666015625,
0.01337432861328125,
-0.01486968994140625,
-0.0165252685546875,
0.0103607177734375,
-0.0110015869140625,
-0.0245819091796875,
-0.0005497932434082031,
0.055389404296875,
-0.0173492431640625,
0.033477783203125,
0.004245758056640625,
0.004184722900390625,
0.03936767578125,
0.038818359375,
-0.009124755859375,
0.0288238525390625,
-0.045135498046875,
0.01328277587890625,
-0.0018367767333984375,
0.02978515625,
-0.043121337890625,
0.0277099609375,
-0.0155029296875,
0.019622802734375,
-0.0029430389404296875,
0.0137786865234375,
-0.01306915283203125,
0.0275421142578125,
0.0228271484375,
0.0208587646484375,
-0.039581298828125,
0.1143798828125,
-0.02410888671875,
0.037017822265625,
-0.0271759033203125,
0.0248260498046875,
0.0006365776062011719,
0.0100555419921875,
0.0111846923828125,
0.053619384765625,
0.0243377685546875,
0.017303466796875,
-0.002803802490234375,
0.0291595458984375,
0.025421142578125,
-0.024993896484375
] |
5a0efa7a08b5dd19b3e2cfb3d91e798bb7bda68a
|
Wordpress Stackexchange
Q: Restrict users on multisite WordPress install I have a series of sites that I maintain as part of a WordPress multisite install. I'd like to be able to create users accounts that are restricted to viewing only a single one of these sites. Is this possible?
Once this is accomplished, is there a way to determine this permission status programmatically? I'd like to be able to get a list of all the sites the current user has access to, or at the very least, test if the user has permission to access a specific site.
A: Use is_user_member_of_blog() to check if the current user has been assigned to the blog in wp-admin/network/site-users.php. Then hook into template_redirect and run the test:
add_action( 'template_redirect', function() {
if ( ! is_user_member_of_blog() )
die( 'Please ask the network administrator to get access to this blog.' );
});
|
Q: Restrict users on multisite WordPress install I have a series of sites that I maintain as part of a WordPress multisite install. I'd like to be able to create users accounts that are restricted to viewing only a single one of these sites. Is this possible?
Once this is accomplished, is there a way to determine this permission status programmatically? I'd like to be able to get a list of all the sites the current user has access to, or at the very least, test if the user has permission to access a specific site.
A: Use is_user_member_of_blog() to check if the current user has been assigned to the blog in wp-admin/network/site-users.php. Then hook into template_redirect and run the test:
add_action( 'template_redirect', function() {
if ( ! is_user_member_of_blog() )
die( 'Please ask the network administrator to get access to this blog.' );
});
|
wordpress
|
{
"language": "en",
"length": 144,
"provenance": "stackexchange_00019.jsonl.gz:428685",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84506"
}
|
[
0.051971435546875,
-0.006832122802734375,
0.0264739990234375,
0.013671875,
-0.0142364501953125,
-0.0286407470703125,
0.0389404296875,
-0.05078125,
0.048309326171875,
-0.004543304443359375,
-0.027587890625,
-0.00740814208984375,
-0.0130615234375,
-0.03460693359375,
-0.0118255615234375,
-0.0280303955078125,
0.0231781005859375,
-0.0026760101318359375,
0.00463104248046875,
-0.01332855224609375,
-0.00424957275390625,
0.0030345916748046875,
-0.0077667236328125,
0.0341796875,
-0.019378662109375,
-0.005466461181640625,
0.06585693359375,
-0.028839111328125,
-0.0066680908203125,
-0.0460205078125,
-0.0064849853515625,
0.01678466796875,
0.016204833984375,
0.0157318115234375,
-0.034881591796875,
-0.01235198974609375,
-0.0011882781982421875,
0.00701141357421875,
-0.00766754150390625,
0.03369140625,
-0.003665924072265625,
0.0029659271240234375,
-0.0168304443359375,
0.047088623046875,
-0.0171661376953125,
-0.100341796875,
0.06793212890625,
-0.0311737060546875,
0.00746917724609375,
0.005466461181640625,
0.0216522216796875,
-0.0181121826171875,
0.042572021484375,
-0.0305633544921875,
-0.01399993896484375,
0.0179290771484375,
0.0258026123046875,
-0.00004357099533081055,
0.041656494140625,
-0.036285400390625,
-0.04022216796875,
-0.006107330322265625,
0.0264739990234375,
-0.019775390625,
0.0016040802001953125,
-0.0275726318359375,
-0.0251312255859375,
0.0250091552734375,
-0.030792236328125,
-0.007099151611328125,
0.018951416015625,
-0.0159759521484375,
0.01059722900390625,
0.001079559326171875,
-0.0229339599609375,
-0.02227783203125,
0.0025653839111328125,
-0.030303955078125,
0.026458740234375,
-0.006458282470703125,
-0.02850341796875,
-0.032470703125,
-0.039886474609375,
-0.006229400634765625,
-0.0140838623046875,
0.0194854736328125,
-0.02099609375,
0.01019287109375,
0.0028438568115234375,
0.020904541015625,
-0.0132293701171875,
0.04766845703125,
0.0171966552734375,
0.0168304443359375,
-0.0361328125,
-0.000053822994232177734,
0.047760009765625,
0.0809326171875,
-0.01462554931640625,
-0.03448486328125,
-0.01435089111328125,
-0.01824951171875,
-0.08447265625,
-0.01059722900390625,
0.006591796875,
0.048370361328125,
0.01324462890625,
0.036376953125,
0.021636962890625,
0.0193328857421875,
0.00521087646484375,
-0.0145721435546875,
-0.037567138671875,
-0.0211029052734375,
-0.05157470703125,
0.008575439453125,
-0.045166015625,
-0.044586181640625,
-0.015869140625,
-0.037109375,
-0.0230712890625,
0.0080718994140625,
0.0079345703125,
0.015777587890625,
-0.01107025146484375,
-0.017333984375,
0.00302886962890625,
-0.022003173828125,
-0.0184783935546875,
0.04888916015625,
-0.0221405029296875,
-0.0004050731658935547,
0.0108795166015625,
0.01226043701171875,
-0.01055145263671875,
-0.0187835693359375,
-0.0083770751953125,
0.03265380859375,
-0.005008697509765625,
0.01039886474609375,
0.0020465850830078125,
-0.0252532958984375,
0.0007104873657226562,
-0.0263671875,
0.0015192031860351562,
0.03924560546875,
0.025634765625,
0.01332855224609375,
-0.0056304931640625,
-0.049346923828125,
-0.005825042724609375,
-0.01259613037109375,
0.0188446044921875,
-0.0079803466796875,
0.0169677734375,
-0.04730224609375,
0.01392364501953125,
-0.037872314453125,
0.017242431640625,
-0.0257110595703125,
0.027862548828125,
0.01397705078125,
0.0194854736328125,
-0.0047149658203125,
-0.0251007080078125,
-0.0290679931640625,
-0.032012939453125,
-0.00897216796875,
0.022216796875,
-0.0166168212890625,
-0.042083740234375,
-0.013946533203125,
0.054534912109375,
0.0304412841796875,
-0.004711151123046875,
0.0650634765625,
0.0010957717895507812,
-0.00045800209045410156,
0.02301025390625,
0.05023193359375,
-0.01439666748046875,
-0.0278167724609375,
0.06304931640625,
-0.019744873046875,
-0.0511474609375,
0.0254669189453125,
-0.006938934326171875,
0.01509857177734375,
0.0276641845703125,
-0.00047659873962402344,
0.033477783203125,
0.033905029296875,
0.0128021240234375,
0.01323699951171875,
0.00420379638671875,
-0.061065673828125,
-0.0083770751953125,
-0.0157928466796875,
-0.00424957275390625,
-0.0010290145874023438,
0.0816650390625,
-0.036041259765625,
0.043548583984375,
-0.03399658203125,
-0.019195556640625,
-0.014923095703125,
-0.00958251953125,
-0.004848480224609375,
-0.0187835693359375,
0.01384735107421875,
0.01371002197265625,
-0.00395965576171875,
-0.00623321533203125,
-0.0287933349609375,
-0.0022182464599609375,
0.0035686492919921875,
-0.015777587890625,
0.054229736328125,
0.025054931640625,
0.0082550048828125,
0.034210205078125,
-0.01540374755859375,
0.036529541015625,
-0.0209197998046875,
0.03179931640625,
-0.0238800048828125,
-0.00984954833984375,
-0.01088714599609375,
0.01294708251953125,
0.0257568359375,
-0.0180511474609375,
0.0008320808410644531,
0.0013589859008789062,
0.0357666015625,
-0.0036334991455078125,
0.014556884765625,
0.006336212158203125,
-0.04266357421875,
0.00020623207092285156,
0.0219268798828125,
0.0325927734375,
0.019256591796875,
-0.00875091552734375,
-0.00453948974609375,
0.053070068359375,
-0.0672607421875,
-0.0106964111328125,
0.01030731201171875,
-0.0038051605224609375,
0.06610107421875,
0.0021762847900390625,
0.044464111328125,
-0.0003447532653808594,
0.01267242431640625,
-0.0013713836669921875,
0.032989501953125,
-0.0203094482421875,
0.01226806640625,
0.00592041015625,
-0.0183868408203125,
0.0008015632629394531,
0.0053253173828125,
0.014007568359375,
-0.0017232894897460938,
0.0194091796875,
0.0017652511596679688,
0.01265716552734375,
0.00933837890625,
-0.0149078369140625,
-0.00249481201171875,
0.0199737548828125,
-0.05230712890625,
0.003322601318359375,
0.018646240234375,
0.038909912109375,
0.007770538330078125,
-0.040802001953125,
-0.0086517333984375,
0.010467529296875,
0.005718231201171875,
-0.0167694091796875,
0.04193115234375,
-0.050537109375,
-0.023040771484375,
-0.01345062255859375,
-0.038604736328125,
-0.0110931396484375,
0.005542755126953125,
-0.0032711029052734375,
-0.0408935546875,
0.004779815673828125,
-0.01343536376953125,
-0.031463623046875,
0.0258026123046875,
0.0109100341796875,
-0.049591064453125,
-0.015838623046875,
-0.06292724609375,
0.0628662109375,
-0.044952392578125,
0.01540374755859375,
0.0782470703125,
-0.01349639892578125,
0.0303497314453125,
-0.007843017578125,
0.004405975341796875,
-0.0161590576171875,
0.012298583984375,
0.00029850006103515625,
-0.029693603515625,
-0.0225830078125,
0.0247650146484375,
0.00635528564453125,
-0.0209503173828125,
0.0147705078125,
-0.0166168212890625,
-0.00042724609375,
-0.0178070068359375,
-0.038330078125,
0.001163482666015625,
-0.031829833984375,
-0.06976318359375,
0.0275726318359375,
-0.0296630859375,
-0.0186920166015625,
-0.01264190673828125,
-0.0005741119384765625,
0.030914306640625,
-0.042022705078125,
-0.0177001953125,
-0.04412841796875,
-0.048431396484375,
-0.0416259765625,
0.045257568359375,
-0.005657196044921875,
0.011260986328125,
-0.0080718994140625,
0.052978515625,
-0.0221710205078125,
-0.06964111328125,
-0.0643310546875,
0.01076507568359375,
0.004825592041015625,
-0.04217529296875,
-0.0587158203125,
0.01172637939453125,
0.0089569091796875,
0.0130157470703125,
-0.029388427734375,
-0.0203704833984375,
0.037689208984375,
-0.0287933349609375,
0.0264434814453125,
-0.015777587890625,
0.047515869140625,
-0.03009033203125,
-0.052978515625,
0.017425537109375,
0.00968170166015625,
-0.042022705078125,
-0.0031452178955078125,
-0.0025272369384765625,
-0.0301513671875,
0.01280975341796875,
0.0263519287109375,
-0.028167724609375,
0.0174560546875,
-0.0189666748046875,
0.052001953125,
0.02655029296875,
-0.0087890625,
0.021026611328125,
0.03619384765625,
0.016815185546875,
0.02862548828125,
-0.036376953125,
0.0171966552734375,
-0.0125579833984375,
-0.0211181640625,
-0.021484375,
0.016693115234375,
-0.03460693359375,
0.028228759765625,
-0.06988525390625,
-0.0284271240234375,
0.0426025390625,
-0.0174102783203125,
0.053009033203125,
-0.07177734375,
-0.039886474609375,
-0.0516357421875,
0.10400390625,
-0.0382080078125,
-0.0130767822265625,
-0.01108551025390625,
-0.00212860107421875,
-0.0017480850219726562,
0.00829315185546875,
-0.033782958984375,
-0.006053924560546875,
-0.041748046875,
-0.0207672119140625,
-0.03387451171875,
-0.0164947509765625,
-0.01238250732421875,
-0.08978271484375,
-0.0175933837890625,
-0.04534912109375,
0.01551055908203125,
-0.0295562744140625,
0.021728515625,
-0.00872802734375,
0.0220489501953125,
-0.03216552734375,
0.0214691162109375,
-0.059295654296875,
-0.06243896484375,
-0.01934814453125,
-0.01715087890625,
0.05712890625,
0.00452423095703125,
0.0266876220703125,
-0.0182037353515625,
0.03778076171875,
-0.0167083740234375,
0.0166473388671875,
-0.0189666748046875,
0.01462554931640625,
0.024505615234375,
-0.021820068359375,
-0.0204620361328125,
-0.018890380859375,
-0.0182342529296875,
-0.02789306640625,
-0.0245361328125,
-0.00943756103515625,
-0.0242462158203125,
-0.020172119140625,
0.00841522216796875,
-0.0121612548828125,
-0.05975341796875,
-0.0341796875,
0.01092529296875,
0.02386474609375,
-0.008514404296875,
0.0099334716796875,
-0.040313720703125,
-0.06280517578125,
0.029266357421875,
-0.031982421875,
-0.00775909423828125,
0.00753021240234375,
0.0733642578125,
0.0224609375,
0.0002548694610595703,
0.0005679130554199219,
0.02392578125,
0.03253173828125,
-0.005786895751953125,
0.07403564453125,
0.03948974609375,
-0.01406097412109375,
0.043243408203125,
0.01432037353515625,
-0.0123291015625,
0.0199127197265625,
0.016510009765625,
0.024322509765625,
-0.025726318359375,
0.00897979736328125,
0.0197296142578125,
-0.0246429443359375,
-0.0199127197265625,
-0.0250244140625,
-0.003665924072265625,
-0.01108551025390625,
0.0506591796875,
0.0163116455078125,
0.0010776519775390625,
-0.052642822265625,
-0.038543701171875,
0.017791748046875,
-0.03704833984375,
0.0037975311279296875,
0.00632476806640625,
-0.0029239654541015625,
0.00311279296875,
0.0161895751953125,
-0.0087432861328125,
0.00860595703125,
-0.0048370361328125,
-0.0017271041870117188,
0.035858154296875,
-0.01261138916015625,
-0.01248931884765625,
0.005947113037109375,
-0.0189666748046875,
0.07171630859375,
-0.0159759521484375,
-0.07757568359375,
0.034698486328125,
-0.004558563232421875,
0.0640869140625,
0.04193115234375,
-0.00797271728515625,
0.040496826171875,
-0.00018036365509033203,
-0.045989990234375,
0.001964569091796875,
-0.01233673095703125,
-0.050018310546875,
-0.05859375,
0.006801605224609375,
-0.0228118896484375,
0.01087188720703125,
0.0360107421875,
0.03802490234375,
-0.028350830078125,
0.046875,
-0.0102386474609375,
0.051788330078125,
0.08758544921875,
-0.033172607421875,
-0.00594329833984375,
0.07061767578125,
-0.0567626953125,
-0.00873565673828125,
0.0078125,
0.0088043212890625,
-0.0031261444091796875,
0.00917816162109375,
0.0188140869140625,
0.03289794921875,
0.025054931640625,
-0.0289764404296875,
-0.0286865234375,
-0.0125732421875,
0.049835205078125,
0.006183624267578125,
-0.05517578125,
-0.01971435546875,
0.021209716796875,
0.03533935546875,
-0.0360107421875,
0.005496978759765625,
-0.0192108154296875,
-0.033203125,
-0.0179901123046875,
0.03759765625,
-0.01849365234375,
-0.0213775634765625,
-0.01129913330078125,
-0.04315185546875,
-0.0219268798828125,
0.0012979507446289062,
-0.0184478759765625,
0.004947662353515625,
-0.0097503662109375,
-0.033966064453125,
0.0166778564453125,
-0.00279998779296875,
0.0345458984375,
-0.07427978515625,
0.0185394287109375,
-0.06689453125,
-0.0194091796875,
0.07489013671875,
0.054656982421875,
-0.06298828125,
0.0269012451171875,
-0.041595458984375,
-0.0193634033203125,
-0.04119873046875,
-0.043304443359375,
-0.05609130859375,
-0.01287078857421875,
0.01210784912109375,
0.01267242431640625,
0.00868988037109375,
-0.0156097412109375,
-0.006557464599609375,
0.015899658203125,
0.014434814453125,
0.0144500732421875,
-0.0103607177734375,
0.055328369140625,
-0.001018524169921875,
0.06744384765625,
0.0261077880859375,
0.03924560546875,
0.01012420654296875,
-0.0538330078125,
0.00821685791015625,
-0.01593017578125,
-0.0309600830078125,
-0.00783538818359375,
0.0032558441162109375,
0.01348876953125,
0.04534912109375,
-0.015838623046875,
-0.01128387451171875,
-0.00894927978515625,
0.01073455810546875,
-0.02569580078125,
-0.032806396484375,
-0.007038116455078125,
-0.0238494873046875,
-0.011810302734375,
-0.0085296630859375,
0.034912109375,
-0.0088958740234375,
-0.0221405029296875,
0.0340576171875,
-0.001010894775390625,
0.0266265869140625,
0.0199432373046875,
-0.04449462890625,
0.03729248046875,
0.07586669921875,
0.01018524169921875,
0.081298828125,
0.0250244140625,
0.027374267578125,
0.0709228515625,
-0.024566650390625,
-0.0280609130859375,
0.0110626220703125,
0.0050506591796875,
-0.01473236083984375,
0.013458251953125,
0.00909423828125,
0.002658843994140625,
-0.00725555419921875,
0.040008544921875,
0.0521240234375,
-0.072509765625,
0.00862884521484375,
0.0141448974609375,
-0.00473785400390625,
-0.006595611572265625,
-0.02740478515625,
-0.00925445556640625,
-0.044708251953125,
0.09112548828125,
-0.0182647705078125,
-0.018341064453125,
0.020843505859375,
-0.0325927734375,
-0.00640869140625,
-0.005344390869140625,
0.037689208984375,
0.01287841796875,
0.0168914794921875,
-0.006500244140625,
-0.036376953125,
0.040496826171875,
-0.0157623291015625,
-0.019622802734375,
-0.008087158203125,
-0.031768798828125,
-0.05615234375,
-0.0206146240234375,
-0.02435302734375,
0.0020904541015625,
-0.002536773681640625,
0.010162353515625,
0.0177764892578125,
0.06805419921875,
-0.021087646484375,
0.01030731201171875,
0.05291748046875,
-0.01448822021484375,
-0.028961181640625,
-0.005512237548828125,
0.0165863037109375,
0.01080322265625,
-0.0262603759765625,
0.0286712646484375,
-0.0216217041015625,
-0.013153076171875,
-0.0045318603515625,
-0.0008096694946289062,
0.031768798828125,
-0.0253448486328125,
0.0034275054931640625,
0.05181884765625,
0.036346435546875,
-0.0208282470703125,
-0.0002512931823730469,
0.026336669921875,
-0.0784912109375,
-0.069580078125,
0.0259246826171875,
-0.046600341796875,
-0.00394439697265625,
0.0309906005859375,
-0.046142578125,
0.051666259765625,
-0.0009341239929199219,
0.039215087890625,
0.0226898193359375,
0.0031642913818359375,
-0.01555633544921875,
-0.0019521713256835938,
-0.05078125,
0.0377197265625,
0.037750244140625,
0.061676025390625,
-0.050201416015625,
-0.0175323486328125,
0.01322174072265625,
0.045013427734375,
0.0347900390625,
0.025177001953125,
-0.05438232421875,
-0.0360107421875,
-0.0262908935546875,
0.0135498046875,
-0.0148773193359375,
0.058197021484375,
0.0031337738037109375,
0.039337158203125,
0.0169830322265625,
-0.045806884765625,
0.028411865234375,
-0.0302581787109375,
-0.0187530517578125,
0.005218505859375,
-0.025787353515625,
-0.0546875,
-0.004253387451171875,
0.0187835693359375,
-0.10986328125,
0.01666259765625,
0.055755615234375,
0.00679779052734375,
-0.0003139972686767578,
0.014129638671875,
0.0207672119140625,
-0.00469207763671875,
0.06964111328125,
-0.044403076171875,
0.06121826171875,
0.00762939453125,
-0.0162506103515625,
0.0109405517578125,
0.0166168212890625,
-0.047576904296875,
0.029388427734375,
-0.0049285888671875,
0.03924560546875,
-0.0254364013671875,
0.017333984375,
0.020172119140625,
0.01387786865234375,
-0.0263519287109375,
0.0075836181640625,
0.058929443359375,
0.02227783203125,
-0.01383209228515625,
-0.0209503173828125,
0.008087158203125,
0.018463134765625,
0.016632080078125,
0.0251922607421875,
0.040985107421875,
0.07196044921875,
0.084228515625,
-0.055389404296875,
0.00746917724609375,
0.039337158203125,
0.0238494873046875,
-0.010528564453125,
-0.024169921875,
-0.006710052490234375,
-0.00873565673828125,
-0.008636474609375,
-0.0357666015625,
-0.010009765625,
0.00661468505859375,
0.013580322265625,
0.031982421875,
0.004756927490234375,
-0.00464630126953125,
-0.021331787109375,
0.036376953125,
-0.0196990966796875,
0.016143798828125,
-0.06280517578125,
-0.06353759765625,
-0.0051727294921875,
0.060699462890625,
-0.006084442138671875,
0.006336212158203125,
0.0015716552734375,
0.023712158203125,
0.0014104843139648438,
-0.00775146484375,
0.024383544921875,
-0.0164947509765625,
0.034088134765625,
-0.043975830078125,
0.0021343231201171875,
-0.02691650390625,
-0.029296875,
-0.0174102783203125,
0.0195465087890625,
0.0024318695068359375,
-0.025177001953125,
0.04974365234375,
-0.004833221435546875,
-0.0048065185546875,
0.0160980224609375,
0.005298614501953125,
0.01316070556640625,
0.0031604766845703125,
-0.0694580078125,
0.00868988037109375,
-0.034088134765625,
-0.062469482421875,
0.007495880126953125,
0.03826904296875,
-0.0216217041015625,
0.006206512451171875,
-0.01168060302734375,
-0.00875091552734375,
0.03228759765625,
-0.01486968994140625,
0.000028073787689208984,
0.009429931640625,
0.01201629638671875,
-0.00759124755859375,
-0.063232421875,
-0.0203399658203125,
-0.0143890380859375,
0.022216796875,
-0.00811004638671875,
0.0751953125,
-0.00460052490234375,
0.01319122314453125,
-0.0004940032958984375,
0.01355743408203125,
-0.014678955078125,
-0.0206146240234375,
0.02783203125,
0.006908416748046875,
0.00870513916015625,
-0.01020050048828125,
-0.0340576171875,
0.046112060546875,
0.0160980224609375,
0.003459930419921875,
0.047119140625,
-0.025482177734375,
0.0003180503845214844,
0.012603759765625,
0.03387451171875,
-0.0462646484375,
-0.077880859375,
-0.0880126953125,
-0.0108184814453125,
0.016021728515625,
0.0369873046875,
0.0100860595703125,
0.036224365234375,
-0.03515625,
-0.0333251953125,
-0.01629638671875,
-0.028778076171875,
-0.056365966796875,
0.00650787353515625,
0.016998291015625,
-0.019256591796875,
0.01041412353515625,
-0.0009098052978515625,
-0.0255126953125,
0.0291900634765625,
-0.0249786376953125,
0.0205230712890625,
-0.0269317626953125,
0.00860595703125,
0.0119781494140625,
0.040374755859375,
-0.0018243789672851562,
0.0125885009765625,
0.0089874267578125,
-0.00753021240234375,
-0.02020263671875,
-0.044952392578125,
-0.0452880859375,
-0.0615234375,
0.0225982666015625,
0.023590087890625,
-0.0219268798828125,
-0.021270751953125,
-0.0408935546875,
-0.0157928466796875,
0.040618896484375,
-0.0054931640625,
-0.0277862548828125,
0.0298309326171875,
-0.043243408203125,
0.018798828125,
-0.00441741943359375,
-0.004589080810546875,
0.00827789306640625,
0.0162811279296875,
-0.0186004638671875,
0.01812744140625,
-0.0172576904296875,
0.005157470703125,
0.004364013671875,
0.01142120361328125,
0.0419921875,
-0.020355224609375,
0.002685546875,
0.01326751708984375,
0.00421905517578125,
0.046661376953125,
-0.04046630859375,
-0.0099945068359375,
0.0176544189453125,
-0.02569580078125,
-0.01528167724609375,
-0.034881591796875,
-0.0012369155883789062,
-0.020782470703125,
-0.0280914306640625,
-0.009857177734375,
0.0017213821411132812,
0.0167083740234375,
-0.035430908203125,
-0.04888916015625,
0.06280517578125,
-0.019561767578125,
-0.0233154296875,
-0.0670166015625,
0.00643157958984375,
0.004970550537109375,
-0.006671905517578125,
-0.0291900634765625,
0.0260162353515625,
-0.016387939453125,
0.0244598388671875,
0.018157958984375,
-0.0308685302734375,
0.023712158203125,
0.016937255859375,
-0.046783447265625,
0.03192138671875,
0.027618408203125,
-0.0177154541015625,
0.01340484619140625,
-0.037933349609375,
0.0380859375,
0.05322265625,
-0.0052337646484375,
-0.0184326171875,
0.018524169921875,
-0.03131103515625,
-0.024444580078125,
-0.02484130859375,
-0.055206298828125,
-0.046875,
0.08758544921875,
0.08697509765625,
0.03155517578125,
-0.018798828125,
-0.049346923828125,
-0.047454833984375,
-0.046844482421875,
-0.0234222412109375,
0.041229248046875,
-0.10614013671875,
0.00820159912109375,
0.03619384765625,
-0.047454833984375,
0.0252685546875,
0.019195556640625,
-0.0701904296875,
0.0413818359375,
0.00799560546875,
-0.0038623809814453125,
-0.0701904296875,
0.0173797607421875,
0.0213470458984375,
-0.033447265625,
-0.035003662109375,
-0.006259918212890625,
-0.006153106689453125,
-0.041748046875,
-0.0396728515625,
0.01239013671875,
-0.0010957717895507812,
-0.046295166015625,
0.007022857666015625,
-0.0031719207763671875,
0.041046142578125,
-0.03778076171875,
-0.0204620361328125,
-0.006427764892578125,
0.0215606689453125,
-0.008270263671875,
0.021575927734375,
0.012664794921875,
0.0181884765625,
0.002960205078125,
0.036834716796875,
-0.02838134765625,
0.0390625,
-0.036407470703125,
0.025634765625,
0.0057220458984375,
0.010467529296875,
0.0372314453125,
0.01515960693359375,
-0.0019197463989257812,
0.0245208740234375,
0.00334930419921875,
-0.04705810546875,
0.051910400390625,
0.0104827880859375,
0.02996826171875,
0.0189208984375
] |
9a3845f8d3814adfc709d58e2b4f0e37f9b2d96a
|
Wordpress Stackexchange
Q: Arrange custom fields with drag and drop? I am making theme for hotel and i made custom metabox with list of various custom fields that i would need in posts.
What i did is i made a list of fields like
*
*booking
*wifienabled
*coffe
*pool
*spa
and so on...
Problem is that currently i can show those custom fields in website frontend only by order how i added them in array, if i change places in my list custom fields will change places in website frontend.
Is it possible that custom fields have specific order? Some kind of drag and drop to rearange those fields and change order of display in frontend?
A: In this example of repeatable custom fields, we can see that the following jQuery is needed:
$('#repeatable-fieldset-one tbody').sortable({
opacity: 0.6,
revert: true,
cursor: 'move',
handle: '.sort'
});
And the HTML it controls is (simplified):
<table id="repeatable-fieldset-one" width="100%">
<thead>
<tr>
<th width="2%"></th>
<th width="30%">Name</th>
<th width="60%">URL</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
if ( $repeatable_fields ) :
foreach ( $repeatable_fields as $field ) {
?>
<tr>
<td><a class="button remove-row" href="#">-</a></td>
<td>NAME FIELD</td>
<td>URL FIELD</td>
<td><a class="sort">|||</a></td>
</tr>
<?php
}
endif;
|
Q: Arrange custom fields with drag and drop? I am making theme for hotel and i made custom metabox with list of various custom fields that i would need in posts.
What i did is i made a list of fields like
*
*booking
*wifienabled
*coffe
*pool
*spa
and so on...
Problem is that currently i can show those custom fields in website frontend only by order how i added them in array, if i change places in my list custom fields will change places in website frontend.
Is it possible that custom fields have specific order? Some kind of drag and drop to rearange those fields and change order of display in frontend?
A: In this example of repeatable custom fields, we can see that the following jQuery is needed:
$('#repeatable-fieldset-one tbody').sortable({
opacity: 0.6,
revert: true,
cursor: 'move',
handle: '.sort'
});
And the HTML it controls is (simplified):
<table id="repeatable-fieldset-one" width="100%">
<thead>
<tr>
<th width="2%"></th>
<th width="30%">Name</th>
<th width="60%">URL</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
if ( $repeatable_fields ) :
foreach ( $repeatable_fields as $field ) {
?>
<tr>
<td><a class="button remove-row" href="#">-</a></td>
<td>NAME FIELD</td>
<td>URL FIELD</td>
<td><a class="sort">|||</a></td>
</tr>
<?php
}
endif;
|
wordpress
|
{
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:428688",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84519"
}
|
[
0.03778076171875,
0.00731658935546875,
-0.01454925537109375,
-0.04107666015625,
0.026153564453125,
-0.0095062255859375,
0.007049560546875,
-0.020782470703125,
0.00022804737091064453,
0.0228271484375,
0.0009946823120117188,
-0.0183868408203125,
-0.01346588134765625,
-0.0291900634765625,
-0.03118896484375,
-0.0408935546875,
0.01751708984375,
-0.0200958251953125,
0.0166168212890625,
-0.0194244384765625,
0.01422882080078125,
-0.01470184326171875,
0.0200653076171875,
0.01239013671875,
0.03997802734375,
-0.0089569091796875,
0.00637054443359375,
-0.05419921875,
0.03485107421875,
-0.008270263671875,
0.018310546875,
0.0025730133056640625,
0.001834869384765625,
0.0100555419921875,
0.0173492431640625,
-0.01654052734375,
0.0496826171875,
-0.0018930435180664062,
0.0007038116455078125,
0.05047607421875,
0.01395416259765625,
-0.020477294921875,
-0.0192108154296875,
-0.0198516845703125,
0.00588226318359375,
-0.042022705078125,
0.033843994140625,
-0.05157470703125,
0.03399658203125,
0.02960205078125,
0.00063323974609375,
0.0025424957275390625,
-0.00954437255859375,
-0.0005245208740234375,
-0.003894805908203125,
-0.00948333740234375,
-0.0229339599609375,
-0.0543212890625,
0.00466156005859375,
0.035491943359375,
0.0264892578125,
-0.007114410400390625,
0.00621795654296875,
-0.00519561767578125,
-0.04742431640625,
-0.0200958251953125,
-0.0283966064453125,
-0.0018053054809570312,
-0.0091552734375,
-0.044830322265625,
0.027435302734375,
-0.00472259521484375,
-0.00908660888671875,
-0.027069091796875,
-0.008636474609375,
0.0003571510314941406,
0.0106658935546875,
-0.0318603515625,
-0.0017337799072265625,
-0.0074310302734375,
-0.0246124267578125,
0.03021240234375,
-0.0184783935546875,
-0.0533447265625,
0.022613525390625,
-0.00853729248046875,
-0.025177001953125,
-0.005962371826171875,
0.01477813720703125,
-0.025390625,
-0.0006079673767089844,
-0.040313720703125,
-0.026580810546875,
0.037811279296875,
0.019317626953125,
-0.026641845703125,
0.0050048828125,
-0.0074005126953125,
0.0206146240234375,
-0.0190582275390625,
0.0193023681640625,
-0.02984619140625,
-0.01300048828125,
-0.0024871826171875,
0.0154266357421875,
-0.0204925537109375,
-0.0304718017578125,
0.0025539398193359375,
0.063232421875,
0.045806884765625,
-0.0176849365234375,
0.038543701171875,
0.0283050537109375,
0.048614501953125,
-0.04998779296875,
-0.0394287109375,
-0.0128326416015625,
0.0064544677734375,
-0.041717529296875,
0.01078033447265625,
0.0026149749755859375,
-0.0049285888671875,
0.0132598876953125,
-0.027008056640625,
0.0170745849609375,
-0.003047943115234375,
-0.045684814453125,
0.0079345703125,
0.0016994476318359375,
0.0010662078857421875,
-0.043975830078125,
0.01318359375,
0.0733642578125,
0.056182861328125,
0.032745361328125,
-0.004199981689453125,
0.0149993896484375,
-0.03167724609375,
-0.0123138427734375,
0.01312255859375,
0.0179901123046875,
-0.0016584396362304688,
0.0107269287109375,
-0.00191497802734375,
-0.006771087646484375,
0.0193939208984375,
0.025299072265625,
0.0033016204833984375,
-0.006069183349609375,
-0.06402587890625,
0.0009813308715820312,
-0.0063018798828125,
0.041656494140625,
0.0299530029296875,
-0.01555633544921875,
0.0230255126953125,
0.06988525390625,
-0.03045654296875,
-0.039703369140625,
-0.043304443359375,
0.0189208984375,
0.0026988983154296875,
0.01399993896484375,
-0.07794189453125,
-0.0567626953125,
-0.0286407470703125,
-0.06732177734375,
0.0004401206970214844,
0.043121337890625,
0.036407470703125,
0.01540374755859375,
-0.019439697265625,
0.02935791015625,
0.0572509765625,
0.01309967041015625,
0.043060302734375,
0.006328582763671875,
-0.005496978759765625,
0.0246429443359375,
-0.003620147705078125,
-0.04339599609375,
-0.037811279296875,
0.0306243896484375,
-0.03131103515625,
-0.06414794921875,
0.042327880859375,
-0.0204315185546875,
0.042266845703125,
0.04302978515625,
0.00115966796875,
0.027191162109375,
0.00751495361328125,
0.017669677734375,
0.0266876220703125,
-0.01451873779296875,
-0.01305389404296875,
-0.019287109375,
0.03375244140625,
-0.0249786376953125,
-0.03277587890625,
-0.0159912109375,
-0.015838623046875,
0.032470703125,
0.0204925537109375,
0.05859375,
0.0013093948364257812,
0.003925323486328125,
0.011688232421875,
-0.0297698974609375,
-0.003932952880859375,
0.0321044921875,
0.005542755126953125,
-0.0401611328125,
0.0177459716796875,
-0.01137542724609375,
0.0180206298828125,
0.0302734375,
0.0308990478515625,
-0.002048492431640625,
-0.00978851318359375,
0.0225372314453125,
-0.0665283203125,
-0.0020160675048828125,
0.046905517578125,
0.03912353515625,
0.0018768310546875,
-0.03472900390625,
-0.0236968994140625,
0.0189971923828125,
-0.004241943359375,
-0.00406646728515625,
0.05438232421875,
0.005767822265625,
0.032318115234375,
-0.019439697265625,
-0.00592803955078125,
0.01922607421875,
-0.04205322265625,
0.014892578125,
0.033966064453125,
0.032928466796875,
0.011749267578125,
0.0270538330078125,
0.050048828125,
0.0552978515625,
0.01114654541015625,
0.0238494873046875,
-0.0004374980926513672,
0.005626678466796875,
0.06378173828125,
-0.036834716796875,
0.0298614501953125,
0.018707275390625,
0.02545166015625,
-0.01082611083984375,
0.053497314453125,
-0.0406494140625,
0.024505615234375,
-0.005519866943359375,
-0.0024261474609375,
-0.01479339599609375,
-0.0297393798828125,
0.0206146240234375,
-0.040435791015625,
0.034515380859375,
0.0241851806640625,
0.01245880126953125,
-0.00763702392578125,
-0.05206298828125,
0.0487060546875,
0.034088134765625,
-0.028228759765625,
-0.005756378173828125,
0.0261993408203125,
-0.039642333984375,
0.026336669921875,
-0.01849365234375,
0.00542449951171875,
-0.015899658203125,
-0.01280975341796875,
-0.02789306640625,
0.0222625732421875,
-0.045257568359375,
-0.013946533203125,
-0.005496978759765625,
-0.055572509765625,
-0.0028362274169921875,
0.006481170654296875,
0.022918701171875,
0.0172119140625,
0.0236968994140625,
0.005069732666015625,
-0.0090789794921875,
0.036163330078125,
-0.0260467529296875,
-0.024322509765625,
-0.019805908203125,
-0.0180511474609375,
0.039703369140625,
-0.045623779296875,
-0.0445556640625,
0.052764892578125,
-0.022064208984375,
0.002353668212890625,
-0.0164642333984375,
0.01557159423828125,
-0.0162200927734375,
0.0178375244140625,
-0.005039215087890625,
-0.06884765625,
-0.0031642913818359375,
-0.00839996337890625,
0.052581787109375,
0.047088623046875,
0.030853271484375,
-0.036712646484375,
0.00640106201171875,
0.0552978515625,
-0.07122802734375,
-0.1090087890625,
0.0284271240234375,
-0.030059814453125,
-0.01349639892578125,
0.01230621337890625,
-0.0266876220703125,
-0.0141754150390625,
0.033782958984375,
0.004131317138671875,
-0.0010223388671875,
-0.0277862548828125,
0.00015425682067871094,
-0.020599365234375,
-0.026031494140625,
-0.005718231201171875,
0.0194854736328125,
0.00533294677734375,
-0.0006346702575683594,
0.0697021484375,
0.0035457611083984375,
-0.044525146484375,
-0.028472900390625,
0.00391387939453125,
-0.0173492431640625,
-0.01430511474609375,
0.03155517578125,
-0.0233154296875,
0.00927734375,
0.016448974609375,
0.0238189697265625,
0.0179443359375,
-0.032196044921875,
-0.037078857421875,
-0.0413818359375,
-0.017852783203125,
-0.0272064208984375,
-0.01056671142578125,
0.04150390625,
-0.0160980224609375,
-0.01175689697265625,
-0.04840087890625,
-0.0211029052734375,
0.0219573974609375,
0.0016651153564453125,
-0.027801513671875,
-0.032318115234375,
-0.0028247833251953125,
-0.0231170654296875,
0.05218505859375,
0.0215606689453125,
0.033172607421875,
-0.016021728515625,
-0.006359100341796875,
0.00273895263671875,
0.0107421875,
0.0216827392578125,
-0.0161590576171875,
0.05810546875,
-0.0020236968994140625,
-0.00014472007751464844,
0.021881103515625,
0.0052490234375,
-0.010986328125,
0.01453399658203125,
-0.031280517578125,
-0.06927490234375,
0.038726806640625,
-0.015777587890625,
-0.01293182373046875,
0.00493621826171875,
-0.0284271240234375,
0.04351806640625,
0.09552001953125,
-0.05767822265625,
-0.0090789794921875,
0.00360107421875,
-0.0060272216796875,
0.0029392242431640625,
0.052093505859375,
-0.07470703125,
-0.0027904510498046875,
-0.09637451171875,
0.01849365234375,
0.00414276123046875,
-0.0283203125,
-0.00524139404296875,
0.02032470703125,
-0.05078125,
-0.0305328369140625,
0.01551055908203125,
0.0217742919921875,
0.004283905029296875,
0.0009489059448242188,
0.01187896728515625,
-0.01020050048828125,
0.0190277099609375,
-0.0209808349609375,
-0.048858642578125,
-0.007122039794921875,
-0.003841400146484375,
0.04095458984375,
-0.005157470703125,
-0.0059661865234375,
-0.025604248046875,
0.040740966796875,
0.0031871795654296875,
-0.03228759765625,
0.019317626953125,
-0.0032863616943359375,
0.01384735107421875,
0.020843505859375,
-0.005573272705078125,
-0.009918212890625,
-0.0202484130859375,
-0.01123809814453125,
-0.017059326171875,
0.00884246826171875,
0.007640838623046875,
0.010833740234375,
0.046600341796875,
-0.0115814208984375,
-0.00652313232421875,
-0.023468017578125,
-0.038543701171875,
0.006031036376953125,
-0.02008056640625,
-0.01514434814453125,
-0.0168914794921875,
-0.005405426025390625,
-0.034698486328125,
-0.0065460205078125,
0.012237548828125,
0.0361328125,
0.04522705078125,
0.0196990966796875,
0.0174407958984375,
-0.07550048828125,
-0.0027313232421875,
0.041961669921875,
0.06439208984375,
0.01448822021484375,
0.00469970703125,
-0.01922607421875,
0.0027751922607421875,
0.02142333984375,
-0.02203369140625,
-0.0010957717895507812,
0.0298614501953125,
-0.0017223358154296875,
-0.02447509765625,
-0.0022335052490234375,
-0.0185089111328125,
0.037994384765625,
0.0178070068359375,
0.00818634033203125,
0.011138916015625,
0.0123291015625,
0.015472412109375,
0.00568389892578125,
-0.05889892578125,
-0.031402587890625,
-0.036041259765625,
0.004642486572265625,
-0.0350341796875,
0.05010986328125,
0.0163421630859375,
-0.01023101806640625,
0.039306640625,
0.01541900634765625,
0.021728515625,
0.00832366943359375,
0.0093231201171875,
0.0091705322265625,
0.03045654296875,
0.03167724609375,
0.0289306640625,
-0.0135650634765625,
-0.0207366943359375,
0.07220458984375,
0.0093841552734375,
-0.051116943359375,
-0.01947021484375,
0.0025272369384765625,
0.0537109375,
-0.01122283935546875,
0.002918243408203125,
-0.023590087890625,
0.06512451171875,
0.023773193359375,
0.035430908203125,
0.059326171875,
0.06109619140625,
0.005584716796875,
-0.0258026123046875,
0.0248870849609375,
-0.02276611328125,
-0.029754638671875,
0.07769775390625,
0.00841522216796875,
0.0195159912109375,
-0.0200958251953125,
0.056915283203125,
0.0831298828125,
-0.002628326416015625,
0.01605224609375,
-0.00804901123046875,
-0.01206207275390625,
-0.0307769775390625,
-0.01727294921875,
-0.026458740234375,
-0.0169677734375,
0.00543975830078125,
0.034454345703125,
-0.0025691986083984375,
0.0013866424560546875,
0.01496124267578125,
0.006381988525390625,
-0.01473236083984375,
0.0303955078125,
-0.01323699951171875,
-0.050445556640625,
-0.005481719970703125,
-0.005199432373046875,
-0.004383087158203125,
-0.025054931640625,
0.017730712890625,
-0.0009560585021972656,
-0.032928466796875,
0.00917816162109375,
-0.04852294921875,
0.033660888671875,
-0.0399169921875,
-0.041412353515625,
-0.043792724609375,
0.00830078125,
0.036834716796875,
-0.060791015625,
-0.0640869140625,
0.0112152099609375,
-0.0313720703125,
0.0172119140625,
-0.0419921875,
0.022064208984375,
-0.05096435546875,
0.0285491943359375,
-0.080322265625,
0.007503509521484375,
0.042510986328125,
0.0312347412109375,
-0.0153961181640625,
-0.0005893707275390625,
-0.056884765625,
-0.0115966796875,
-0.03118896484375,
-0.0458984375,
-0.00742340087890625,
-0.0032482147216796875,
0.011199951171875,
0.0177764892578125,
-0.005035400390625,
-0.048431396484375,
0.002803802490234375,
0.0072021484375,
0.010711669921875,
0.0242919921875,
-0.0178070068359375,
0.042205810546875,
-0.0030384063720703125,
0.0271453857421875,
0.0172119140625,
0.0178985595703125,
-0.0059967041015625,
-0.01485443115234375,
0.00011068582534790039,
-0.04376220703125,
-0.036895751953125,
-0.0042266845703125,
-0.041473388671875,
0.04107666015625,
0.054229736328125,
-0.00727081298828125,
0.01506805419921875,
-0.015777587890625,
0.0066986083984375,
-0.0157012939453125,
0.0199432373046875,
-0.017974853515625,
0.00305938720703125,
-0.006595611572265625,
-0.005672454833984375,
0.0031795501708984375,
-0.016021728515625,
-0.038787841796875,
0.045623779296875,
0.004215240478515625,
0.010955810546875,
0.0238189697265625,
-0.060089111328125,
0.0223846435546875,
0.044525146484375,
0.048187255859375,
0.07171630859375,
-0.01099395751953125,
0.040771484375,
0.019927978515625,
0.005146026611328125,
0.0188751220703125,
-0.034332275390625,
0.07330322265625,
0.00040721893310546875,
-0.03802490234375,
0.053741455078125,
-0.0450439453125,
0.009521484375,
0.0125579833984375,
0.044891357421875,
-0.0660400390625,
0.035247802734375,
0.01316070556640625,
0.01306915283203125,
0.043182373046875,
0.007904052734375,
0.0223846435546875,
0.0296630859375,
-0.064697265625,
0.03131103515625,
-0.044586181640625,
-0.037689208984375,
0.02044677734375,
-0.0039005279541015625,
-0.0022029876708984375,
-0.03436279296875,
-0.0247650146484375,
0.017578125,
-0.055511474609375,
-0.0276641845703125,
-0.01043701171875,
0.00954437255859375,
0.0062408447265625,
0.00426483154296875,
-0.03558349609375,
-0.032379150390625,
-0.002101898193359375,
0.00079345703125,
-0.0245819091796875,
-0.007381439208984375,
-0.0157470703125,
0.041290283203125,
0.021209716796875,
-0.0054779052734375,
0.00586700439453125,
-0.0275115966796875,
0.015411376953125,
0.025665283203125,
-0.01444244384765625,
-0.01442718505859375,
-0.0180206298828125,
-0.0316162109375,
-0.00498199462890625,
-0.007427215576171875,
-0.00841522216796875,
-0.0291290283203125,
0.0291290283203125,
0.08624267578125,
0.007568359375,
-0.0584716796875,
0.00615692138671875,
0.048126220703125,
0.00344085693359375,
0.025238037109375,
-0.0013151168823242188,
-0.0972900390625,
-0.06756591796875,
0.021270751953125,
-0.078369140625,
0.004909515380859375,
0.0249481201171875,
-0.056854248046875,
0.0792236328125,
0.0011844635009765625,
0.02581787109375,
-0.0302581787109375,
0.03289794921875,
-0.0005712509155273438,
0.0307464599609375,
-0.040679931640625,
0.040985107421875,
-0.01448822021484375,
0.038543701171875,
-0.07757568359375,
-0.009063720703125,
-0.00832366943359375,
0.017730712890625,
0.02569580078125,
0.007843017578125,
-0.00489044189453125,
-0.002048492431640625,
0.054534912109375,
0.07269287109375,
0.0099334716796875,
-0.0158538818359375,
-0.003887176513671875,
0.05670166015625,
0.001934051513671875,
-0.00676727294921875,
0.0199127197265625,
0.006145477294921875,
-0.0794677734375,
0.042266845703125,
0.006877899169921875,
-0.0034027099609375,
-0.0210113525390625,
0.0196685791015625,
-0.045928955078125,
-0.0171051025390625,
0.032257080078125,
0.0160369873046875,
-0.01003265380859375,
0.041839599609375,
0.041168212890625,
-0.053955078125,
-0.054290771484375,
-0.0058746337890625,
0.027252197265625,
0.025299072265625,
0.058380126953125,
0.0232696533203125,
0.022186279296875,
0.0178070068359375,
0.01120758056640625,
0.035491943359375,
0.02703857421875,
-0.02996826171875,
0.041015625,
-0.0211181640625,
-0.019683837890625,
-0.07159423828125,
0.0289306640625,
0.02642822265625,
0.0430908203125,
-0.052825927734375,
-0.0254058837890625,
0.01151275634765625,
-0.01058197021484375,
0.0023670196533203125,
-0.00966644287109375,
-0.0013790130615234375,
-0.0657958984375,
-0.051849365234375,
-0.032562255859375,
-0.0053558349609375,
0.0125732421875,
0.00403594970703125,
0.01219940185546875,
0.040771484375,
-0.015625,
-0.02484130859375,
-0.047576904296875,
0.00350189208984375,
0.00939178466796875,
0.040679931640625,
0.0474853515625,
0.026519775390625,
0.052978515625,
-0.03448486328125,
-0.030426025390625,
0.0175628662109375,
0.0169677734375,
0.0193939208984375,
-0.015625,
0.02105712890625,
-0.0016241073608398438,
0.0212249755859375,
0.0185546875,
0.047943115234375,
0.0665283203125,
0.035552978515625,
-0.0155181884765625,
0.00296783447265625,
0.03399658203125,
-0.021453857421875,
-0.0323486328125,
-0.0287322998046875,
-0.01666259765625,
0.01959228515625,
0.009979248046875,
0.00516510009765625,
0.0079193115234375,
0.0072174072265625,
-0.0280609130859375,
0.050262451171875,
-0.004241943359375,
0.01511383056640625,
-0.0018138885498046875,
-0.040252685546875,
0.0012388229370117188,
-0.01202392578125,
-0.08282470703125,
-0.00124359130859375,
-0.03509521484375,
-0.053253173828125,
0.037872314453125,
0.042816162109375,
-0.0256500244140625,
0.0266265869140625,
0.0064544677734375,
-0.046142578125,
-0.0002868175506591797,
0.026702880859375,
0.039306640625,
0.04833984375,
-0.01401519775390625,
0.02581787109375,
-0.03863525390625,
-0.01412200927734375,
0.00940704345703125,
0.01373291015625,
-0.00452423095703125,
0.035614013671875,
0.007732391357421875,
0.021484375,
-0.0166015625,
-0.013946533203125,
0.0163726806640625,
-0.018280029296875,
0.08746337890625,
0.025543212890625,
-0.0192108154296875,
-0.03814697265625,
0.03131103515625,
-0.00934600830078125,
0.04412841796875,
-0.07342529296875,
-0.032196044921875,
0.01934814453125,
0.0204925537109375,
-0.0207977294921875,
0.006725311279296875,
-0.0220489501953125,
-0.033355712890625,
-0.0008306503295898438,
-0.00015175342559814453,
-0.0017862319946289062,
0.00791168212890625,
0.004238128662109375,
-0.00484466552734375,
0.04559326171875,
-0.0186767578125,
0.024658203125,
-0.006122589111328125,
0.07330322265625,
0.046112060546875,
-0.0003788471221923828,
-0.05194091796875,
0.018280029296875,
-0.004253387451171875,
-0.007965087890625,
0.0146484375,
0.034423828125,
0.033782958984375,
-0.02606201171875,
0.0306549072265625,
0.03802490234375,
0.054779052734375,
0.01036834716796875,
0.01258087158203125,
0.0188751220703125,
-0.0005025863647460938,
-0.00867462158203125,
0.0203094482421875,
-0.0192108154296875,
-0.007091522216796875,
-0.01324462890625,
0.019927978515625,
-0.0212860107421875,
-0.02008056640625,
-0.08782958984375,
-0.0292510986328125,
0.00774383544921875,
0.0152435302734375,
-0.052154541015625,
0.01079559326171875,
0.0219879150390625,
-0.007701873779296875,
-0.0201873779296875,
0.03790283203125,
0.0040435791015625,
0.061309814453125,
-0.032806396484375,
-0.025421142578125,
-0.00884246826171875,
0.0242156982421875,
-0.0200653076171875,
0.0013093948364257812,
0.0146331787109375,
0.00310516357421875,
-0.0125579833984375,
-0.0309600830078125,
-0.01190948486328125,
0.00974273681640625,
0.045806884765625,
-0.0184173583984375,
0.0153350830078125,
0.035003662109375,
-0.0229034423828125,
-0.07794189453125,
-0.0168304443359375,
-0.0013885498046875,
0.028564453125,
-0.0290374755859375,
0.0239410400390625,
0.0272369384765625,
-0.02093505859375,
-0.07379150390625,
0.055572509765625,
-0.02581787109375,
-0.0229034423828125,
-0.02825927734375,
-0.020538330078125,
-0.004913330078125,
0.07861328125,
0.006591796875,
-0.031494140625,
-0.04296875,
0.00556182861328125,
0.01226806640625,
0.03460693359375,
0.00994110107421875,
0.01398468017578125,
-0.07855224609375,
0.00798797607421875,
-0.01305389404296875,
0.0262908935546875,
-0.010650634765625,
-0.01213836669921875,
0.0239410400390625,
0.01220703125,
-0.0277252197265625,
-0.052764892578125,
0.022186279296875,
0.00839996337890625,
0.0071563720703125,
-0.0231170654296875,
-0.048248291015625,
-0.00629425048828125,
0.031097412109375,
0.06915283203125,
0.019195556640625,
-0.05010986328125,
0.003017425537109375,
-0.0249786376953125,
0.00485992431640625,
-0.03668212890625,
-0.01447296142578125,
-0.050262451171875,
-0.0325927734375,
-0.01403045654296875,
-0.0243072509765625,
0.01192474365234375,
0.043701171875,
-0.041961669921875,
0.0260772705078125,
0.06536865234375,
0.01242828369140625,
-0.12066650390625,
0.06878662109375,
0.068115234375,
-0.0579833984375,
-0.0257415771484375,
-0.003082275390625,
-0.0259246826171875,
0.0255889892578125,
-0.0283660888671875,
-0.0498046875,
-0.04071044921875,
-0.0264892578125,
0.03594970703125,
-0.050445556640625,
0.057342529296875,
-0.05084228515625,
0.0010519027709960938,
-0.0172882080078125,
0.00737762451171875,
0.008636474609375,
0.004680633544921875,
-0.01079559326171875,
0.01148223876953125,
0.00679779052734375,
0.0141754150390625,
-0.0221710205078125,
0.031341552734375,
-0.0246429443359375,
0.0374755859375,
0.029541015625,
-0.008544921875,
0.060302734375,
-0.0033740997314453125,
0.00917816162109375,
-0.01390838623046875,
-0.0207061767578125,
-0.006313323974609375,
-0.00028324127197265625,
-0.01226806640625,
-0.024932861328125,
0.006969451904296875
] |
f0abba0d1938ac79f11bfe6ffe5deb3dcd344a48
|
Wordpress Stackexchange
Q: Including categories in search results I am trying to include categories in search results. I've been searching for hours now with no solution.
By "including categories" I don't mean search in a certain category, I mean let's say I have a bicycle store and have many companies included in the site; a user searched for BMX mountain cross for example. It will return the category BMX first (by clicking you'll be sent to the category page) and the posts related to the search term like WordPress normally does.
Does anyone have any clues or could point me to the right direction?
A: Use get_terms(), then you don't need to use a custom query to the database.
$terms = get_terms( 'category', array(
'name__like' => $s,
'hide_empty' => true // Optional
) );
if ( count($terms) > 0 ){
echo '<ul>';
foreach ( $terms as $term ) {
echo '<li><a href="' . esc_url( get_term_link( $term ) ) . '" title="' . esc_attr( $term->name ) . '">' . esc_html( $term->name ) . '</a></li>';
}
echo '</ul>';
}
Based on birgire's answer on a similar question: https://wordpress.stackexchange.com/a/239680/50432
|
Q: Including categories in search results I am trying to include categories in search results. I've been searching for hours now with no solution.
By "including categories" I don't mean search in a certain category, I mean let's say I have a bicycle store and have many companies included in the site; a user searched for BMX mountain cross for example. It will return the category BMX first (by clicking you'll be sent to the category page) and the posts related to the search term like WordPress normally does.
Does anyone have any clues or could point me to the right direction?
A: Use get_terms(), then you don't need to use a custom query to the database.
$terms = get_terms( 'category', array(
'name__like' => $s,
'hide_empty' => true // Optional
) );
if ( count($terms) > 0 ){
echo '<ul>';
foreach ( $terms as $term ) {
echo '<li><a href="' . esc_url( get_term_link( $term ) ) . '" title="' . esc_attr( $term->name ) . '">' . esc_html( $term->name ) . '</a></li>';
}
echo '</ul>';
}
Based on birgire's answer on a similar question: https://wordpress.stackexchange.com/a/239680/50432
A: I'm using this code in my search.php above the main loop:
$search_term = explode( ' ', get_search_query( false ) );
global $wpdb;
$select = "
SELECT DISTINCT t.*, tt.*
FROM wp_terms AS t
INNER JOIN wp_term_taxonomy AS tt
ON t.term_id = tt.term_id
WHERE tt.taxonomy IN ('category')";
$first = true;
foreach ( $search_term as $s ){
if ( $first ){
$select .= " AND (t.name LIKE '%s')";
$string_replace[] = '%'.$wpdb->esc_like( $s ).'%';
$first = false;
}else{
$select .= " OR (t.name LIKE '%s')";
$string_replace[] = '%'. $wpdb->esc_like( $s ).'%';
}
}
$select .= " ORDER BY t.name ASC";
$terms = $wpdb->get_results( $wpdb->prepare( $select, $string_replace ) );
if ( count($terms) > 0 ){
echo '<ul>';
foreach ( $terms as $term ) {
echo '<li><a href="'.esc_url( get_term_link( $term ) ).'" title="'.esc_attr( $term->name ).'">' . esc_html( $term->name ) . '</a></li>';
}
echo '</ul>';
}
This code does an extra DB query, but search for categories not only associated to returned posts, but does an extra seach for each word in a search term and brings all found categories - even empty.
A: I've created a custom search results page that matches the keyword (s) with categories, posts, cpt's...
Here's sthe code for the categories (it also shows a category ACF field for images:
<?php
// post categories in results
$terms = get_terms( 'post', array(
'name__like' => $s,
'hide_empty' => false // Optional
) );
?>
<?php
// list post categories in results
if ( count($terms) > 0 ) {
echo '<div class="sr-categories">';
echo '<h3 class="search-title">Category results</h3>';
?>
<div class="posts-wrap posts-layout-default row">
<?php
foreach ( $terms as $term ) { ?>
<?php
echo '<article class="sub-cat-row col-md-4 col-sm-6 col-xs-6 col-xxs-12">';
echo '<a href="' . esc_url( get_term_link( $term ) ) . '" title="' . esc_attr( $term->name ) . '">';
$taximg_id = get_field('image', $term);
$taxsize = "grid-image"; // (thumbnail, medium, large, full or custom size)
$taximage = wp_get_attachment_image_src( $taximg_id, $taxsize );
if($taximg_id) { ?>
<img src="<?php echo $taximage[0]; ?>" alt="" class="img-responsive" />
<?php } else { ?>
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/default-image-600x400.png" alt="" title="" />
<?php }
echo '<div class="sc-title text-center">' . esc_html( $term->name ) . '</div></a>';
echo '</article>';
//get_template_part('template-parts/loop/content','listevents');
wp_reset_postdata();
}
?>
</div>
<?php echo '</div>'; // eof sr-events
} else {
echo 'No Event categories found';
}
?>
A: Obviously possible, if it works like this, I'm using TwentyTwelve, you have to edit search.php. You will find the loop there:
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
So, the loop is taking the post_format(). So you have to edit content.php. Here you will find these:
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
Just change that to:
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_category(); ?><br/>
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
If everything goes right, than it will echo the Category associated the search result. But if everything goes right like we want. :)
A: Based on the @PhilOwen answer, I added the following to the top of my theme's search.php page:
// post categories in results
$terms = get_terms( 'taxonomy-goes-here', array(
'name__like' => $s,
'hide_empty' => false // Optional
) );
if ( count($terms) > 0 ) {
foreach ( $terms as $term ) {
echo '<h2><a href="' . esc_url( get_term_link( $term ) ) . '" title="' . esc_attr( $term->name ) . '">';
echo esc_html( $term->name );
echo '</a></h2>';
}
}
I think it will often make sense to display the taxonomy term matches–if they exist–above the specific items, as they would be higher up in the hierarchy of data.
A: I found a better way and wanted to share
no need that use $wpdb
this code work for me:
$val = get_search_query();
$categories = get_terms( ['taxonomy' => 'product_cat'] );
foreach($categories as $cat){
if (stristr($cat->name , $val)){
echo '<tr><td><a href="'.get_term_link( $cat ).'" >' .$cat->name.'</a></td></tr>';
break;
}
this code search in product category and It does not need to be exactly the same
A: PROBLEM: As of march 2022, wordpress doesn't search for category or tag.
SOLUTION/WORKAROUND: Use a plugin to allow searching for category or tag. I've tested it with the free version of the Relevanssi-Plugin. https://www.relevanssi.com/features/. Other Plugins may work, too.
DISCLAIMER: I am not affiliated with relevanssi or any other wp search plugin vendor.
|
wordpress
|
{
"language": "en",
"length": 909,
"provenance": "stackexchange_00019.jsonl.gz:428696",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84549"
}
|
[
0.06451416015625,
0.0167236328125,
-0.0268707275390625,
-0.022064208984375,
0.04473876953125,
-0.0633544921875,
0.06695556640625,
-0.0222625732421875,
-0.0038623809814453125,
0.0088958740234375,
-0.054473876953125,
-0.01288604736328125,
-0.042266845703125,
-0.01396942138671875,
-0.0207977294921875,
-0.06927490234375,
0.00620269775390625,
0.00714111328125,
0.034149169921875,
-0.00797271728515625,
0.0166473388671875,
0.00641632080078125,
0.0294342041015625,
-0.0101776123046875,
0.01267242431640625,
-0.0281829833984375,
0.08282470703125,
-0.03509521484375,
0.0191650390625,
-0.03314208984375,
0.016571044921875,
-0.0022144317626953125,
0.0196075439453125,
-0.0133514404296875,
0.03326416015625,
0.04541015625,
0.0418701171875,
-0.0192108154296875,
0.0238494873046875,
0.034912109375,
0.024566650390625,
-0.00795745849609375,
0.044281005859375,
-0.0059814453125,
0.022918701171875,
-0.045013427734375,
0.044342041015625,
-0.06317138671875,
0.004337310791015625,
-0.07269287109375,
0.0211944580078125,
0.00873565673828125,
0.036895751953125,
-0.061309814453125,
-0.00661468505859375,
0.05230712890625,
0.014617919921875,
-0.00846099853515625,
0.045166015625,
-0.0355224609375,
-0.05279541015625,
-0.02252197265625,
0.042572021484375,
-0.0303955078125,
-0.01910400390625,
0.005924224853515625,
0.022796630859375,
0.01000213623046875,
-0.038848876953125,
-0.0450439453125,
0.0255889892578125,
-0.0174407958984375,
-0.01432037353515625,
-0.003673553466796875,
-0.01535797119140625,
-0.03912353515625,
0.0143280029296875,
-0.048828125,
-0.006511688232421875,
0.0302886962890625,
0.017303466796875,
0.03448486328125,
-0.0306549072265625,
-0.044097900390625,
0.0275726318359375,
-0.018463134765625,
-0.00257110595703125,
-0.01369476318359375,
-0.04833984375,
-0.017303466796875,
-0.0197906494140625,
-0.03082275390625,
-0.05438232421875,
0.0297698974609375,
0.00429534912109375,
-0.008087158203125,
0.0242767333984375,
0.06201171875,
-0.00777435302734375,
0.01265716552734375,
-0.0231170654296875,
-0.0213470458984375,
0.002315521240234375,
-0.042816162109375,
0.035919189453125,
0.038482666015625,
-0.0260162353515625,
0.0304718017578125,
0.08673095703125,
0.027191162109375,
0.03302001953125,
0.06982421875,
-0.00917816162109375,
-0.0207977294921875,
-0.01314544677734375,
0.021331787109375,
-0.0300750732421875,
0.0295257568359375,
-0.00324249267578125,
0.0209503173828125,
0.0171966552734375,
0.044891357421875,
0.01128387451171875,
-0.04376220703125,
-0.00952911376953125,
-0.00948333740234375,
-0.032073974609375,
-0.03179931640625,
-0.0015621185302734375,
-0.027130126953125,
-0.016632080078125,
0.05792236328125,
0.005382537841796875,
-0.005031585693359375,
-0.035736083984375,
0.00817108154296875,
-0.0033473968505859375,
-0.01015472412109375,
-0.0142974853515625,
-0.01120758056640625,
0.036865234375,
0.01788330078125,
0.02410888671875,
-0.0110321044921875,
0.044952392578125,
-0.027801513671875,
0.006591796875,
0.0452880859375,
0.00847625732421875,
-0.00853729248046875,
0.0654296875,
-0.01105499267578125,
0.054412841796875,
-0.015594482421875,
-0.0869140625,
0.002017974853515625,
-0.0182952880859375,
-0.010284423828125,
-0.054779052734375,
-0.044219970703125,
0.01800537109375,
0.00748443603515625,
0.023712158203125,
-0.0350341796875,
-0.0360107421875,
-0.01184844970703125,
-0.052764892578125,
-0.0132904052734375,
0.004062652587890625,
-0.020263671875,
0.0203399658203125,
-0.005367279052734375,
0.009490966796875,
-0.018463134765625,
0.0059051513671875,
-0.007129669189453125,
0.00913238525390625,
0.01025390625,
0.0306549072265625,
0.022674560546875,
-0.0011882781982421875,
-0.0178070068359375,
0.06591796875,
-0.022552490234375,
-0.033782958984375,
0.042572021484375,
0.00659942626953125,
0.041168212890625,
-0.007076263427734375,
0.00458526611328125,
0.039825439453125,
0.040374755859375,
-0.030242919921875,
-0.004459381103515625,
-0.0211181640625,
-0.0133514404296875,
-0.012115478515625,
-0.004825592041015625,
-0.0168609619140625,
0.0164794921875,
0.041259765625,
-0.0188446044921875,
0.01421356201171875,
-0.00243377685546875,
-0.0260772705078125,
0.00615692138671875,
-0.00701141357421875,
0.01959228515625,
-0.011505126953125,
0.0201568603515625,
-0.003833770751953125,
-0.01175689697265625,
0.0007081031799316406,
-0.029693603515625,
-0.00466156005859375,
0.017242431640625,
0.01407623291015625,
0.0227203369140625,
-0.001842498779296875,
-0.01522064208984375,
0.01355743408203125,
-0.030517578125,
0.018096923828125,
0.054229736328125,
0.0572509765625,
-0.00826263427734375,
-0.01406097412109375,
-0.032562255859375,
-0.005107879638671875,
0.0297698974609375,
-0.1236572265625,
0.033782958984375,
0.057464599609375,
0.072021484375,
-0.0155487060546875,
0.016082763671875,
0.027587890625,
-0.0074310302734375,
-0.00821685791015625,
0.0225677490234375,
0.032470703125,
0.01019287109375,
-0.018310546875,
-0.033203125,
0.0262451171875,
-0.0787353515625,
-0.005420684814453125,
-0.01983642578125,
-0.0171661376953125,
0.041473388671875,
0.033905029296875,
0.0245819091796875,
-0.007465362548828125,
-0.0102386474609375,
-0.01071929931640625,
0.024383544921875,
0.0047454833984375,
-0.00800323486328125,
-0.01528167724609375,
-0.00963592529296875,
0.0142669677734375,
-0.039703369140625,
-0.053375244140625,
-0.006923675537109375,
0.0221405029296875,
-0.0110321044921875,
0.0274658203125,
0.025726318359375,
-0.0161590576171875,
-0.019256591796875,
0.00850677490234375,
0.03173828125,
-0.0027675628662109375,
0.0301055908203125,
0.0044097900390625,
0.0006227493286132812,
-0.024169921875,
-0.0007786750793457031,
0.01073455810546875,
0.0164794921875,
0.004730224609375,
0.041595458984375,
0.0214996337890625,
-0.004161834716796875,
-0.041717529296875,
-0.06414794921875,
0.032928466796875,
0.043304443359375,
-0.02996826171875,
-0.01374053955078125,
0.0198211669921875,
0.036285400390625,
-0.010040283203125,
0.01226043701171875,
-0.04217529296875,
-0.00009387731552124023,
0.030059814453125,
-0.01482391357421875,
0.01593017578125,
-0.00865936279296875,
0.04071044921875,
0.045196533203125,
0.00907135009765625,
-0.0177154541015625,
0.002979278564453125,
-0.0124359130859375,
0.0142669677734375,
0.017059326171875,
-0.0049591064453125,
-0.032562255859375,
-0.03643798828125,
-0.007015228271484375,
0.032684326171875,
0.026031494140625,
0.0187225341796875,
-0.02642822265625,
0.01190948486328125,
0.019134521484375,
-0.06390380859375,
-0.060150146484375,
0.04315185546875,
-0.04217529296875,
0.00273895263671875,
0.039154052734375,
-0.031768798828125,
-0.0307159423828125,
0.069580078125,
-0.010528564453125,
0.032257080078125,
-0.02880859375,
-0.06884765625,
-0.034088134765625,
-0.076171875,
0.0139007568359375,
-0.007534027099609375,
-0.00333404541015625,
-0.005168914794921875,
0.07635498046875,
0.01558685302734375,
-0.053680419921875,
-0.011627197265625,
0.07720947265625,
-0.0309295654296875,
-0.0101318359375,
0.0030956268310546875,
-0.035430908203125,
-0.006465911865234375,
-0.01139068603515625,
0.0261077880859375,
0.00933837890625,
0.0035343170166015625,
0.01629638671875,
0.0002741813659667969,
0.0221099853515625,
0.038330078125,
-0.03509521484375,
-0.02239990234375,
0.052215576171875,
0.0271148681640625,
-0.01105499267578125,
0.0058135986328125,
-0.0282135009765625,
-0.0185699462890625,
-0.013336181640625,
-0.003330230712890625,
0.0097198486328125,
-0.02874755859375,
0.01522064208984375,
0.00323486328125,
-0.005573272705078125,
-0.0242767333984375,
-0.035064697265625,
0.01263427734375,
0.00536346435546875,
0.0169219970703125,
0.012054443359375,
-0.0126800537109375,
-0.03253173828125,
0.019256591796875,
-0.017913818359375,
0.0282440185546875,
0.003070831298828125,
0.00942230224609375,
-0.0204925537109375,
-0.050140380859375,
0.040191650390625,
0.004638671875,
0.0208587646484375,
-0.038238525390625,
-0.035797119140625,
-0.0256195068359375,
0.08172607421875,
-0.0301513671875,
-0.035186767578125,
-0.037689208984375,
0.0036754608154296875,
0.00749969482421875,
-0.0251312255859375,
0.004428863525390625,
-0.0244293212890625,
-0.0888671875,
0.021209716796875,
-0.0035400390625,
-0.0205230712890625,
-0.01042938232421875,
0.034576416015625,
-0.054046630859375,
-0.03778076171875,
0.017059326171875,
-0.0051422119140625,
0.0140533447265625,
-0.01605224609375,
-0.0083770751953125,
-0.0207977294921875,
-0.0023708343505859375,
-0.018585205078125,
-0.0229644775390625,
0.0006074905395507812,
-0.0015878677368164062,
0.004459381103515625,
0.0072021484375,
-0.01125335693359375,
-0.00962066650390625,
0.03912353515625,
0.009918212890625,
-0.01078033447265625,
0.01788330078125,
0.001766204833984375,
-0.002468109130859375,
0.0418701171875,
0.0166168212890625,
-0.01537322998046875,
0.0005588531494140625,
-0.0018062591552734375,
-0.0225830078125,
0.04364013671875,
-0.0241546630859375,
0.006992340087890625,
-0.025909423828125,
-0.02764892578125,
-0.0022411346435546875,
-0.0200042724609375,
-0.00852203369140625,
0.0020046234130859375,
-0.013427734375,
0.0021152496337890625,
0.0031261444091796875,
-0.002353668212890625,
0.0382080078125,
0.056976318359375,
-0.01491546630859375,
-0.00492095947265625,
0.026702880859375,
0.015869140625,
-0.048614501953125,
-0.027740478515625,
-0.01007843017578125,
0.022918701171875,
-0.022857666015625,
0.033660888671875,
-0.003810882568359375,
-0.02862548828125,
0.08392333984375,
-0.0196533203125,
0.03680419921875,
-0.031524658203125,
0.0142059326171875,
0.009429931640625,
-0.004375457763671875,
0.0153045654296875,
0.02423095703125,
0.006683349609375,
0.017425537109375,
-0.00640869140625,
-0.01873779296875,
0.0228729248046875,
0.0164337158203125,
-0.0364990234375,
0.023651123046875,
-0.0015859603881835938,
0.007205963134765625,
-0.018310546875,
0.019256591796875,
0.05731201171875,
0.058807373046875,
-0.01509857177734375,
0.0250091552734375,
0.0379638671875,
-0.0163116455078125,
-0.002307891845703125,
-0.017791748046875,
-0.0200347900390625,
0.0159149169921875,
-0.0321044921875,
-0.03729248046875,
0.0184478759765625,
0.002269744873046875,
0.005573272705078125,
-0.01230621337890625,
-0.031341552734375,
-0.01335906982421875,
0.01180267333984375,
-0.0037479400634765625,
0.034088134765625,
0.0235748291015625,
0.02838134765625,
0.0121612548828125,
0.0263214111328125,
0.01092529296875,
-0.00791168212890625,
0.007076263427734375,
-0.01053619384765625,
-0.0243682861328125,
0.00396728515625,
-0.0161285400390625,
0.0243988037109375,
0.05401611328125,
-0.04400634765625,
0.054046630859375,
-0.008453369140625,
0.0082244873046875,
-0.01433563232421875,
0.032470703125,
0.018280029296875,
-0.02972412109375,
0.002071380615234375,
0.0179290771484375,
0.0169677734375,
-0.025390625,
0.00032591819763183594,
-0.00762176513671875,
0.0114593505859375,
-0.0163726806640625,
-0.0239715576171875,
0.05035400390625,
-0.006084442138671875,
-0.01369476318359375,
-0.01812744140625,
-0.0124053955078125,
0.00873565673828125,
-0.0423583984375,
-0.035858154296875,
0.01050567626953125,
0.0267791748046875,
-0.031280517578125,
0.0295257568359375,
-0.020263671875,
0.0142669677734375,
0.004306793212890625,
-0.02886962890625,
0.01568603515625,
0.035614013671875,
-0.03887939453125,
-0.0149993896484375,
0.0231781005859375,
-0.0225372314453125,
-0.0161590576171875,
-0.0179290771484375,
-0.0335693359375,
0.0526123046875,
-0.012176513671875,
0.0745849609375,
-0.026092529296875,
-0.032135009765625,
0.038787841796875,
0.0041961669921875,
0.043731689453125,
0.019561767578125,
-0.045257568359375,
0.00530242919921875,
-0.04302978515625,
-0.005870819091796875,
0.027587890625,
-0.008087158203125,
-0.020111083984375,
-0.0338134765625,
0.03265380859375,
0.0215606689453125,
0.01332855224609375,
0.00002384185791015625,
-0.0604248046875,
0.017608642578125,
0.0399169921875,
0.026214599609375,
-0.01568603515625,
0.026702880859375,
0.01132965087890625,
0.0133056640625,
-0.01328277587890625,
0.0004253387451171875,
-0.0174560546875,
0.004032135009765625,
-0.0251312255859375,
-0.08447265625,
-0.018890380859375,
0.038177490234375,
-0.07086181640625,
0.0841064453125,
0.0863037109375,
0.016754150390625,
-0.0225372314453125,
0.00514984130859375,
0.0119476318359375,
-0.00010520219802856445,
0.045074462890625,
0.0421142578125,
-0.0321044921875,
0.073486328125,
0.0204010009765625,
0.0178375244140625,
-0.0294342041015625,
-0.040618896484375,
0.0216217041015625,
0.01020050048828125,
0.0307464599609375,
-0.03070068359375,
-0.0211639404296875,
0.0389404296875,
0.04034423828125,
0.0211639404296875,
0.0282745361328125,
0.0057525634765625,
0.01371002197265625,
-0.03741455078125,
-0.0178985595703125,
0.0234375,
-0.00009065866470336914,
0.0225982666015625,
-0.0246124267578125,
-0.0019321441650390625,
0.014678955078125,
-0.0278167724609375,
-0.0264739990234375,
0.032318115234375,
0.00917816162109375,
-0.0267486572265625,
-0.0272216796875,
-0.01294708251953125,
-0.011749267578125,
-0.0189361572265625,
0.0250701904296875,
-0.0218505859375,
-0.01029205322265625,
-0.0196533203125,
-0.0174560546875,
-0.031524658203125,
-0.014129638671875,
0.0207977294921875,
-0.01424407958984375,
0.006122589111328125,
0.0020771026611328125,
0.0101776123046875,
-0.0458984375,
-0.008636474609375,
0.031829833984375,
-0.01177215576171875,
-0.019683837890625,
-0.0220184326171875,
0.0310211181640625,
-0.01137542724609375,
-0.054779052734375,
0.035552978515625,
-0.0338134765625,
0.01800537109375,
0.01282501220703125,
0.0003452301025390625,
0.029205322265625,
0.04290771484375,
0.003246307373046875,
-0.0095672607421875,
0.01491546630859375,
-0.032073974609375,
0.01456451416015625,
0.0185699462890625,
0.023590087890625,
0.031341552734375,
-0.06011962890625,
0.004421234130859375,
-0.04241943359375,
0.03692626953125,
-0.03857421875,
-0.0582275390625,
0.08612060546875,
-0.032745361328125,
-0.00896453857421875,
-0.00392913818359375,
0.06890869140625,
0.01519775390625,
-0.0003731250762939453,
0.042877197265625,
-0.02520751953125,
0.0087890625,
0.0191192626953125,
0.0167236328125,
0.012298583984375,
0.0029201507568359375,
-0.052825927734375,
0.009918212890625,
-0.044769287109375,
0.043914794921875,
0.0171661376953125,
-0.0075836181640625,
0.0281219482421875,
-0.0086212158203125,
-0.036163330078125,
0.04656982421875,
0.0209503173828125,
0.0278167724609375,
-0.063720703125,
-0.02227783203125,
0.006626129150390625,
0.0654296875,
0.033294677734375,
-0.00386810302734375,
0.0037212371826171875,
0.0183258056640625,
0.0609130859375,
0.044189453125,
-0.007049560546875,
0.0091094970703125,
0.006526947021484375,
0.0247039794921875,
0.06634521484375,
-0.02777099609375,
0.03302001953125,
-0.00122833251953125,
0.00908660888671875,
0.0287017822265625,
0.0206451416015625,
0.045684814453125,
-0.002368927001953125,
0.01904296875,
0.0131683349609375,
-0.0177764892578125,
-0.001682281494140625,
-0.01708984375,
0.01207733154296875,
0.03326416015625,
0.0263519287109375,
-0.08636474609375,
-0.01568603515625,
-0.037384033203125,
0.039031982421875,
-0.0016088485717773438,
0.036346435546875,
0.028961181640625,
0.015350341796875,
0.08502197265625,
-0.0273284912109375,
0.0145416259765625,
-0.00994873046875,
-0.01165771484375,
0.045806884765625,
0.018096923828125,
0.03253173828125,
-0.048309326171875,
-0.0223846435546875,
0.059814453125,
0.0753173828125,
-0.03497314453125,
-0.07568359375,
-0.00644683837890625,
0.0116424560546875,
0.040435791015625,
0.030609130859375,
0.039031982421875,
0.0382080078125,
0.084716796875,
-0.047698974609375,
-0.0032958984375,
0.0144195556640625,
0.02197265625,
-0.021942138671875,
-0.0282745361328125,
0.00800323486328125,
-0.0016498565673828125,
-0.0341796875,
0.0204925537109375,
0.0148162841796875,
0.05029296875,
-0.0023097991943359375,
0.047943115234375,
-0.06207275390625,
-0.018524169921875,
-0.007537841796875,
-0.00698089599609375,
-0.021575927734375,
0.007587432861328125,
-0.0195770263671875,
-0.016143798828125,
0.0136871337890625,
0.031463623046875,
-0.0103912353515625,
0.0108489990234375,
0.04022216796875,
0.06817626953125,
-0.005462646484375,
-0.0254669189453125,
0.04425048828125,
-0.007080078125,
-0.0283966064453125,
-0.0416259765625,
0.046417236328125,
0.07867431640625,
0.036407470703125,
0.002979278564453125,
0.016998291015625,
0.08758544921875,
-0.001323699951171875,
0.0204010009765625,
0.00653839111328125,
-0.033172607421875,
0.029266357421875,
0.00675201416015625,
0.078857421875,
0.03607177734375,
-0.10052490234375,
-0.005313873291015625,
-0.033050537109375,
-0.07867431640625,
0.03936767578125,
0.0445556640625,
-0.0264129638671875,
0.009521484375,
0.0399169921875,
-0.04791259765625,
0.045928955078125,
0.01282501220703125,
-0.006565093994140625,
-0.0015544891357421875,
0.0234832763671875,
-0.0237884521484375,
-0.00429534912109375,
0.0019006729125976562,
0.034942626953125,
0.01873779296875,
-0.007167816162109375,
0.027496337890625,
0.0091094970703125,
-0.005954742431640625,
-0.0029697418212890625,
-0.0049896240234375,
0.0008568763732910156,
-0.0248260498046875,
0.03704833984375,
-0.016693115234375,
-0.0168304443359375,
-0.0130462646484375,
-0.0034198760986328125,
0.005466461181640625,
0.0389404296875,
-0.035064697265625,
-0.0230255126953125,
0.0148773193359375,
0.01141357421875,
-0.015167236328125,
0.08050537109375,
-0.0128173828125,
-0.004913330078125,
-0.021820068359375,
-0.0303497314453125,
0.0281982421875,
0.0253448486328125,
0.01238250732421875,
0.0017595291137695312,
0.0225372314453125,
0.0265350341796875,
-0.001888275146484375,
0.04132080078125,
-0.01263427734375,
0.029144287109375,
0.0059967041015625,
0.01389312744140625,
0.005405426025390625,
-0.018585205078125,
-0.003162384033203125,
0.01444244384765625,
-0.00936126708984375,
-0.005657196044921875,
-0.024749755859375,
-0.035369873046875,
0.02862548828125,
0.030853271484375,
-0.0036563873291015625,
0.0196380615234375,
-0.0103302001953125,
-0.0277862548828125,
-0.0057830810546875,
-0.003940582275390625,
-0.031890869140625,
-0.011932373046875,
-0.023651123046875,
-0.0045318603515625,
-0.0006542205810546875,
-0.05975341796875,
-0.030548095703125,
0.00824737548828125,
0.04541015625,
0.0205230712890625,
-0.04364013671875,
0.025726318359375,
-0.0127410888671875,
0.045166015625,
0.00027441978454589844,
-0.061248779296875,
0.0160980224609375,
0.06219482421875,
-0.0294647216796875,
0.032470703125,
-0.0288848876953125,
-0.07220458984375,
-0.02471923828125,
-0.0038852691650390625,
0.012298583984375,
-0.0164794921875,
-0.031982421875,
0.002742767333984375,
-0.00308990478515625,
0.0386962890625,
0.0452880859375,
-0.0343017578125,
-0.0096893310546875,
0.01364898681640625,
-0.0289306640625,
-0.0155181884765625,
0.02667236328125,
-0.020050048828125,
-0.0153350830078125,
0.0531005859375,
-0.017974853515625,
0.0174560546875,
-0.03424072265625,
-0.10614013671875,
0.064208984375,
-0.00492095947265625,
-0.05181884765625,
-0.03570556640625,
-0.0151824951171875,
-0.0028438568115234375,
0.01537322998046875,
-0.0223388671875,
-0.00994110107421875,
-0.037750244140625,
0.0257720947265625,
0.027252197265625,
-0.007205963134765625,
0.0263214111328125,
0.019134521484375,
-0.11358642578125,
-0.013336181640625,
-0.038330078125,
0.01141357421875,
-0.0020904541015625,
-0.004119873046875,
0.00714111328125,
0.034820556640625,
-0.041961669921875,
-0.0271759033203125,
-0.0185546875,
-0.0106353759765625,
0.0244140625,
-0.044281005859375,
-0.044189453125,
-0.0261383056640625,
0.043060302734375,
-0.00524139404296875,
0.012054443359375,
-0.0110321044921875,
-0.031219482421875,
-0.02447509765625,
0.01141357421875,
0.0083465576171875,
0.01003265380859375,
-0.043609619140625,
0.01885986328125,
0.0029010772705078125,
0.002216339111328125,
0.0082550048828125,
-0.0159454345703125,
-0.034881591796875,
-0.025604248046875,
-0.048919677734375,
0.0009250640869140625,
-0.0687255859375,
0.04217529296875,
0.00853729248046875,
-0.0372314453125,
-0.06597900390625,
0.000988006591796875,
-0.0102081298828125,
-0.04852294921875,
-0.05926513671875,
-0.01751708984375,
0.00514984130859375,
0.03973388671875,
0.003993988037109375,
0.040191650390625,
-0.0259857177734375,
0.055908203125,
0.03778076171875,
-0.016326904296875,
0.0235137939453125,
0.0032596588134765625,
0.01065826416015625,
-0.04901123046875,
0.086181640625,
0.04046630859375,
0.055908203125,
-0.0093536376953125,
-0.0377197265625,
-0.0175018310546875,
0.02740478515625,
0.0231170654296875,
-0.01702880859375,
0.0703125,
-0.04296875,
0.0030231475830078125,
0.00458526611328125,
-0.03607177734375,
-0.0028743743896484375,
-0.0119781494140625,
0.01020050048828125,
-0.0284271240234375,
0.01371002197265625
] |
ff083d11f97fe92ffcf5eeb4393fd48d2c89e733
|
Wordpress Stackexchange
Q: How to override core is_ssl() function? I am looking to override a function in functions.php through a theme or plugin. Specifically, is_ssl(), which does not have any filter or action hooks. Obviously, the easy why would be to update functions.php itself, but this will leave issues with upgrade and compatibility. How could this be done.
Edit:
The goal is to overwrite is_ssl() function to return true when specific flag is set in the request header.
Is it possible with the override-function?
A: If you look at the source of the is_ssl() function you'll see it checks various $_SERVER variables. Therefore, you could try adding this to a plugin:
if ( isset( $_SERVER['HTTP_MY_CUSTOM_HEADER'] ) )
$_SERVER['HTTPS'] = 'on';
You'd need to call that code as early as possible, ie. directly in the plugin body rather than on a hook.
|
Q: How to override core is_ssl() function? I am looking to override a function in functions.php through a theme or plugin. Specifically, is_ssl(), which does not have any filter or action hooks. Obviously, the easy why would be to update functions.php itself, but this will leave issues with upgrade and compatibility. How could this be done.
Edit:
The goal is to overwrite is_ssl() function to return true when specific flag is set in the request header.
Is it possible with the override-function?
A: If you look at the source of the is_ssl() function you'll see it checks various $_SERVER variables. Therefore, you could try adding this to a plugin:
if ( isset( $_SERVER['HTTP_MY_CUSTOM_HEADER'] ) )
$_SERVER['HTTPS'] = 'on';
You'd need to call that code as early as possible, ie. directly in the plugin body rather than on a hook.
A: You cannot override a function once it is defined. That is pure PHP. Some functions are wrapped in a conditional that lets you cheat around this-- look at pluggable.php. Otherwise, you just can't do it. You'll get a fatal error.
Your best bet to solve this is probably a child theme but without a lot of details I couldn't say how to go about it, and even so success depends on how cooperative your 'parent' theme is. It may be written inis uch a way as to make this very hard on you.
A: There is no easy way to do this...or at least no mass-adopted way anymore. Namespace wont really work here and every update will erase a hard edit unless its in a config (messy way to do it). vQmod is an angle, but never tried it with Wordpress.
Plugins are executed before that function, so if its proxy/balancer/SSL support you need then you can spoof the $_SERVER['HTTPS'] to be 'on'. An array merge might work good here for this if you are dealing with multiple header triggers.
Keep in mind, if you are making this a plugin, prefix your folder and script(s) so they sort at the top of the file list. Example is something like -my-router.php found in -my-router folder. The dash will sort plugin to top which should render first in chain. This is needed in case other plugins call is_ssl() or something like wp_enqueue_style() before your your plugin mitigates it.
A: After considerable research, I believe that there is no good answer to this.
The best answer would be to modify $_SERVER early on, but not every environment allows you to do this. Unfortunately, a direct hack is the only way to do this.
This is necessary behind load balancers that obfuscate ssl origin. Implementing Wordpress in Azure using Active Directory Authentication (which forces ssl, but sends all results to port 80, non-ssl), my solution was to modify is_ssl to always return true.
|
wordpress
|
{
"language": "en",
"length": 469,
"provenance": "stackexchange_00019.jsonl.gz:428712",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84611"
}
|
[
0.050872802734375,
-0.0005388259887695312,
-0.01557159423828125,
-0.01090240478515625,
0.01453399658203125,
-0.03704833984375,
0.050018310546875,
-0.0101470947265625,
-0.0153961181640625,
0.0146942138671875,
0.03839111328125,
0.0005002021789550781,
-0.032867431640625,
-0.049102783203125,
0.00543212890625,
-0.01206207275390625,
0.03607177734375,
-0.0019779205322265625,
0.0293426513671875,
-0.0137176513671875,
0.0307464599609375,
0.0127716064453125,
0.0024890899658203125,
0.08050537109375,
0.01806640625,
-0.01383209228515625,
0.0865478515625,
-0.0245361328125,
0.012054443359375,
-0.005218505859375,
0.01137542724609375,
-0.0251922607421875,
0.0022487640380859375,
0.07794189453125,
-0.096923828125,
-0.047760009765625,
-0.01300811767578125,
0.0299835205078125,
-0.033203125,
0.04705810546875,
0.05169677734375,
-0.027618408203125,
-0.00826263427734375,
0.052642822265625,
-0.01355743408203125,
-0.03814697265625,
0.050201416015625,
-0.02685546875,
0.0185699462890625,
0.031890869140625,
0.006053924560546875,
0.00312042236328125,
0.0165252685546875,
-0.021026611328125,
-0.0228424072265625,
-0.006885528564453125,
-0.045135498046875,
0.043609619140625,
0.021514892578125,
0.01435089111328125,
-0.01036834716796875,
-0.0047607421875,
0.014984130859375,
-0.009033203125,
0.020233154296875,
-0.0214385986328125,
0.001445770263671875,
0.028411865234375,
-0.077392578125,
-0.0009393692016601562,
0.043304443359375,
-0.0294189453125,
0.009857177734375,
0.006626129150390625,
-0.0293731689453125,
-0.017303466796875,
0.01605224609375,
0.010955810546875,
0.02227783203125,
-0.016326904296875,
0.01019287109375,
-0.002094268798828125,
0.0037384033203125,
0.008392333984375,
-0.019317626953125,
0.02362060546875,
-0.0008769035339355469,
-0.033294677734375,
0.0097808837890625,
0.009063720703125,
-0.0167388916015625,
0.034759521484375,
0.03961181640625,
-0.010986328125,
-0.02728271484375,
-0.034454345703125,
0.0161590576171875,
0.01763916015625,
0.00461578369140625,
-0.0037250518798828125,
0.0240478515625,
-0.0576171875,
0.0283203125,
-0.0196990966796875,
-0.0275726318359375,
0.047698974609375,
0.0037784576416015625,
0.004817962646484375,
-0.004215240478515625,
0.0289154052734375,
0.0098724365234375,
-0.04150390625,
-0.044830322265625,
-0.0036907196044921875,
-0.016632080078125,
0.0178985595703125,
-0.057159423828125,
-0.0214385986328125,
-0.037322998046875,
0.003391265869140625,
0.03253173828125,
0.053314208984375,
-0.030670166015625,
-0.0208740234375,
0.006710052490234375,
-0.01241302490234375,
-0.0227813720703125,
-0.005279541015625,
0.0207977294921875,
0.042877197265625,
-0.058197021484375,
-0.01277923583984375,
0.07763671875,
0.03619384765625,
0.036102294921875,
-0.0311279296875,
0.0306854248046875,
-0.0294189453125,
-0.0199737548828125,
0.039337158203125,
0.006717681884765625,
-0.05072021484375,
-0.02459716796875,
-0.0006804466247558594,
0.01364898681640625,
-0.003414154052734375,
0.0249786376953125,
0.0247955322265625,
0.010009765625,
-0.019805908203125,
0.0279693603515625,
-0.0082244873046875,
0.0240020751953125,
0.015472412109375,
-0.0279541015625,
0.0285797119140625,
0.0189971923828125,
0.0007572174072265625,
-0.04119873046875,
-0.017242431640625,
-0.0238494873046875,
-0.027679443359375,
-0.0058746337890625,
-0.017974853515625,
-0.034271240234375,
0.0310821533203125,
-0.00963592529296875,
0.0145416259765625,
0.02264404296875,
0.022796630859375,
0.0157928466796875,
0.03851318359375,
-0.01364898681640625,
0.02728271484375,
0.0107269287109375,
-0.0238189697265625,
0.002201080322265625,
0.0506591796875,
0.0274810791015625,
0.036590576171875,
-0.003910064697265625,
-0.053070068359375,
0.08453369140625,
-0.033355712890625,
-0.05072021484375,
0.04644775390625,
-0.01445770263671875,
0.05804443359375,
0.04071044921875,
0.005184173583984375,
-0.0110931396484375,
-0.016571044921875,
-0.00972747802734375,
0.02215576171875,
-0.03167724609375,
-0.0533447265625,
0.01175689697265625,
-0.0006103515625,
-0.0293426513671875,
0.02886962890625,
-0.002986907958984375,
0.0106353759765625,
-0.017425537109375,
0.030303955078125,
0.0201568603515625,
-0.021026611328125,
0.01031494140625,
-0.006847381591796875,
0.0185394287109375,
0.04644775390625,
-0.009124755859375,
0.01416778564453125,
-0.01617431640625,
-0.026397705078125,
-0.00977325439453125,
-0.004364013671875,
0.01149749755859375,
0.02899169921875,
-0.0010251998901367188,
0.032989501953125,
-0.004856109619140625,
0.0015821456909179688,
-0.0243377685546875,
-0.00562286376953125,
-0.004505157470703125,
0.0169677734375,
-0.006771087646484375,
0.006298065185546875,
0.032012939453125,
0.007965087890625,
0.041290283203125,
-0.0085296630859375,
0.048828125,
0.05657958984375,
-0.00963592529296875,
-0.024078369140625,
-0.0039825439453125,
-0.05548095703125,
0.0002510547637939453,
0.044036865234375,
0.05316162109375,
0.039825439453125,
-0.006160736083984375,
-0.03533935546875,
0.052032470703125,
-0.03466796875,
0.0231475830078125,
-0.044464111328125,
0.035797119140625,
-0.0030078887939453125,
-0.026123046875,
-0.037628173828125,
0.05731201171875,
-0.0701904296875,
0.0537109375,
0.057861328125,
0.00934600830078125,
-0.04095458984375,
-0.009185791015625,
0.0243377685546875,
0.0059356689453125,
0.01146697998046875,
-0.03900146484375,
0.0267181396484375,
0.014495849609375,
-0.017974853515625,
0.000017344951629638672,
0.007007598876953125,
0.0084991455078125,
-0.031829833984375,
0.01024627685546875,
-0.034088134765625,
-0.009185791015625,
0.03369140625,
0.0227203369140625,
-0.01338958740234375,
-0.034393310546875,
0.00272369384765625,
-0.01416015625,
0.027496337890625,
-0.012664794921875,
0.0399169921875,
-0.0616455078125,
-0.01727294921875,
-0.023712158203125,
0.0006852149963378906,
-0.0088043212890625,
0.023284912109375,
0.051116943359375,
0.01419830322265625,
0.061279296875,
-0.0104827880859375,
-0.01495361328125,
0.050537109375,
-0.042999267578125,
-0.027984619140625,
0.00774383544921875,
-0.035797119140625,
0.0295867919921875,
-0.0240020751953125,
0.062469482421875,
0.055816650390625,
-0.004638671875,
0.00588226318359375,
-0.00252532958984375,
-0.03997802734375,
-0.0270233154296875,
-0.01456451416015625,
-0.041717529296875,
-0.0003681182861328125,
-0.07562255859375,
0.026885986328125,
0.01242828369140625,
-0.0298309326171875,
0.0248565673828125,
-0.032501220703125,
-0.0131072998046875,
-0.0005407333374023438,
-0.06591796875,
-0.040985107421875,
-0.035369873046875,
-0.0404052734375,
0.0200958251953125,
0.0167236328125,
-0.0018625259399414062,
-0.008941650390625,
0.023040771484375,
0.009735107421875,
-0.0150299072265625,
-0.030059814453125,
-0.053955078125,
-0.0648193359375,
-0.077880859375,
0.006999969482421875,
0.00933074951171875,
0.017547607421875,
0.0038242340087890625,
0.042938232421875,
-0.00585174560546875,
-0.064453125,
-0.0220947265625,
0.017242431640625,
-0.0182342529296875,
-0.0035343170166015625,
-0.0161285400390625,
0.00200653076171875,
-0.0228729248046875,
0.006763458251953125,
-0.0186767578125,
-0.017730712890625,
0.017181396484375,
-0.00977325439453125,
-0.018341064453125,
-0.006595611572265625,
-0.01334381103515625,
-0.0124053955078125,
0.017059326171875,
-0.01629638671875,
-0.016357421875,
-0.054473876953125,
-0.0097198486328125,
0.0166778564453125,
-0.0261077880859375,
0.0003771781921386719,
0.0000457763671875,
-0.0152435302734375,
-0.00791168212890625,
0.0172882080078125,
-0.0036754608154296875,
-0.0263824462890625,
0.04449462890625,
-0.03985595703125,
0.0233917236328125,
-0.005550384521484375,
0.0140228271484375,
-0.03997802734375,
0.039825439453125,
-0.00473785400390625,
-0.031707763671875,
-0.00481414794921875,
0.0190582275390625,
0.00478363037109375,
-0.0261383056640625,
-0.045074462890625,
-0.047149658203125,
0.036834716796875,
-0.04925537109375,
0.020782470703125,
-0.037139892578125,
-0.00739288330078125,
-0.0033206939697265625,
0.1036376953125,
0.01230621337890625,
-0.00739288330078125,
0.009552001953125,
0.002902984619140625,
-0.038909912109375,
-0.0071563720703125,
-0.056640625,
0.0063629150390625,
-0.11065673828125,
0.022247314453125,
-0.0032863616943359375,
-0.0306549072265625,
0.007266998291015625,
-0.00913238525390625,
-0.0255126953125,
-0.055023193359375,
0.00431060791015625,
0.0121612548828125,
-0.04034423828125,
0.040130615234375,
-0.04901123046875,
0.00908660888671875,
0.01157379150390625,
-0.0183868408203125,
-0.066162109375,
-0.00571441650390625,
-0.05426025390625,
0.0689697265625,
0.033935546875,
-0.0035991668701171875,
0.0038471221923828125,
0.051788330078125,
0.032623291015625,
-0.003543853759765625,
0.036590576171875,
-0.03216552734375,
0.0716552734375,
0.04010009765625,
0.0338134765625,
0.019012451171875,
-0.007343292236328125,
0.0183258056640625,
-0.03192138671875,
0.031158447265625,
0.0161590576171875,
-0.026275634765625,
0.07159423828125,
-0.05810546875,
-0.0252532958984375,
-0.025848388671875,
-0.0531005859375,
0.004894256591796875,
-0.054718017578125,
0.01076507568359375,
-0.022003173828125,
-0.054351806640625,
0.045257568359375,
-0.0201263427734375,
-0.042236328125,
0.0137786865234375,
0.04010009765625,
0.01297760009765625,
-0.0149993896484375,
-0.033660888671875,
0.0250244140625,
0.00994873046875,
-0.02789306640625,
0.03900146484375,
-0.01445770263671875,
-0.0104522705078125,
0.05377197265625,
-0.034271240234375,
0.006351470947265625,
0.005817413330078125,
0.0228271484375,
0.033172607421875,
0.0173492431640625,
-0.01453399658203125,
0.034210205078125,
-0.007259368896484375,
-0.023223876953125,
0.0224609375,
0.0193328857421875,
0.0340576171875,
-0.024261474609375,
0.0313720703125,
-0.031402587890625,
0.0027370452880859375,
-0.060150146484375,
0.0312347412109375,
-0.0166168212890625,
0.022613525390625,
0.021820068359375,
-0.006664276123046875,
0.0266571044921875,
-0.01508331298828125,
0.025054931640625,
-0.06195068359375,
0.0309600830078125,
-0.0908203125,
0.0679931640625,
-0.06463623046875,
-0.01195526123046875,
-0.040283203125,
-0.0123443603515625,
0.10223388671875,
0.016571044921875,
-0.058349609375,
0.023101806640625,
-0.0199127197265625,
-0.0341796875,
-0.002193450927734375,
-0.032440185546875,
-0.00917816162109375,
-0.015960693359375,
-0.0217437744140625,
-0.0009889602661132812,
-0.052001953125,
-0.01181793212890625,
-0.0260467529296875,
0.019561767578125,
0.033172607421875,
-0.02899169921875,
-0.0042724609375,
0.0274658203125,
0.04345703125,
-0.0114593505859375,
-0.00835418701171875,
0.003658294677734375,
0.0290374755859375,
-0.029815673828125,
0.034759521484375,
0.0243072509765625,
0.00482940673828125,
-0.0474853515625,
0.0257720947265625,
-0.02899169921875,
-0.04888916015625,
-0.00200653076171875,
0.01995849609375,
0.019256591796875,
0.0426025390625,
-0.00942230224609375,
0.0268402099609375,
-0.035064697265625,
0.0531005859375,
0.06292724609375,
-0.0230712890625,
-0.01495361328125,
-0.01479339599609375,
0.007843017578125,
0.02838134765625,
-0.01537322998046875,
0.017181396484375,
-0.002132415771484375,
0.040496826171875,
-0.0075225830078125,
-0.01556396484375,
0.019744873046875,
0.0278472900390625,
0.0096435546875,
-0.0137176513671875,
0.003444671630859375,
-0.0399169921875,
-0.00447845458984375,
-0.045318603515625,
0.0016431808471679688,
0.03460693359375,
-0.025177001953125,
0.05810546875,
-0.0029296875,
-0.0458984375,
0.0697021484375,
0.0157928466796875,
0.05303955078125,
0.022918701171875,
-0.047882080078125,
-0.0127410888671875,
-0.0270233154296875,
-0.0023479461669921875,
-0.0019073486328125,
-0.02447509765625,
-0.037017822265625,
0.012939453125,
0.0257110595703125,
0.03192138671875,
-0.021697998046875,
-0.050323486328125,
-0.0023365020751953125,
0.01378631591796875,
0.02398681640625,
0.045318603515625,
-0.0131988525390625,
0.08428955078125,
0.0260162353515625,
0.038665771484375,
0.0261383056640625,
0.049163818359375,
-0.029205322265625,
-0.01474761962890625,
-0.00720977783203125,
-0.0292205810546875,
-0.016357421875,
-0.0272979736328125,
-0.014373779296875,
0.0174407958984375,
0.07183837890625,
-0.00579833984375,
0.02545166015625,
0.0017042160034179688,
-0.006443023681640625,
-0.022918701171875,
0.017333984375,
0.00460052490234375,
0.034637451171875,
0.00772857666015625,
-0.002002716064453125,
-0.0303802490234375,
-0.0302886962890625,
-0.006259918212890625,
0.0328369140625,
0.0174560546875,
0.0047760009765625,
-0.0253143310546875,
-0.0452880859375,
0.045501708984375,
0.068115234375,
-0.0232696533203125,
0.041900634765625,
0.004367828369140625,
0.00418853759765625,
0.03466796875,
-0.00980377197265625,
-0.009735107421875,
0.0103302001953125,
0.0196075439453125,
-0.00963592529296875,
-0.00665283203125,
-0.00684356689453125,
-0.0126800537109375,
0.0218505859375,
0.06646728515625,
0.07769775390625,
-0.1092529296875,
0.01457977294921875,
0.027557373046875,
0.018310546875,
0.0345458984375,
0.005809783935546875,
-0.011871337890625,
0.0021419525146484375,
0.025604248046875,
-0.0203094482421875,
-0.02734375,
0.0251617431640625,
0.015167236328125,
-0.02642822265625,
-0.0249176025390625,
0.048492431640625,
0.032501220703125,
0.0168914794921875,
0.0213623046875,
-0.00865936279296875,
0.00832366943359375,
0.0135345458984375,
0.0325927734375,
-0.0011453628540039062,
-0.029022216796875,
-0.04864501953125,
-0.0095367431640625,
0.003719329833984375,
-0.055419921875,
0.0298309326171875,
-0.0308990478515625,
0.041473388671875,
0.0233917236328125,
-0.00847625732421875,
-0.0097808837890625,
0.00026416778564453125,
-0.0204620361328125,
0.0036411285400390625,
-0.02789306640625,
0.0191497802734375,
0.03302001953125,
-0.0394287109375,
0.02874755859375,
-0.00809478759765625,
-0.022064208984375,
0.0088653564453125,
0.0117034912109375,
0.07293701171875,
-0.0269927978515625,
-0.01953125,
0.0242462158203125,
-0.01617431640625,
-0.0074310302734375,
-0.010406494140625,
0.07830810546875,
-0.048065185546875,
-0.0024433135986328125,
0.0255126953125,
0.016510009765625,
-0.0546875,
-0.000044465065002441406,
-0.054290771484375,
0.10986328125,
0.00786590576171875,
0.0264739990234375,
-0.0003428459167480469,
0.04248046875,
-0.0087738037109375,
0.035430908203125,
-0.015960693359375,
0.044677734375,
0.04052734375,
0.0257568359375,
-0.01007843017578125,
-0.0017747879028320312,
0.00022864341735839844,
0.0235443115234375,
0.053985595703125,
0.018218994140625,
-0.014251708984375,
-0.005603790283203125,
0.040008544921875,
0.05340576171875,
0.007656097412109375,
0.01348114013671875,
-0.0182647705078125,
0.026458740234375,
0.048675537109375,
-0.05059814453125,
0.0263671875,
-0.017669677734375,
-0.0012369155883789062,
-0.003734588623046875,
0.0170135498046875,
-0.00666046142578125,
-0.0196533203125,
-0.01224517822265625,
-0.043212890625,
0.00437164306640625,
0.0229034423828125,
0.0248260498046875,
0.0172882080078125,
0.00501251220703125,
-0.0147857666015625,
0.0257110595703125,
0.0294189453125,
-0.002857208251953125,
0.0258026123046875,
-0.03179931640625,
0.006282806396484375,
0.0411376953125,
0.0265045166015625,
-0.019744873046875,
0.005702972412109375,
0.0021343231201171875,
0.0081939697265625,
-0.0009784698486328125,
-0.0029850006103515625,
0.0262451171875,
0.013427734375,
0.0308074951171875,
0.075927734375,
0.0271148681640625,
-0.01010894775390625,
-0.0265350341796875,
-0.043426513671875,
-0.0028781890869140625,
-0.013031005859375,
0.0239410400390625,
-0.0034732818603515625,
0.0249176025390625,
-0.0293121337890625,
-0.0160369873046875,
0.01462554931640625,
-0.02215576171875,
0.00879669189453125,
0.0255889892578125,
0.021759033203125,
0.025604248046875,
-0.029022216796875,
-0.022003173828125,
-0.024139404296875,
-0.0169830322265625,
-0.0203857421875,
0.0213165283203125,
0.0247039794921875,
0.034576416015625,
0.0244903564453125,
-0.01110076904296875,
0.007293701171875,
0.009979248046875,
-0.035491943359375,
-0.0057525634765625,
-0.01251983642578125,
-0.040191650390625,
-0.0308837890625,
0.04248046875,
0.0301055908203125,
-0.000675201416015625,
0.036895751953125,
0.042816162109375,
-0.0119171142578125,
-0.0028285980224609375,
0.059783935546875,
-0.004924774169921875,
0.0245361328125,
-0.054718017578125,
0.0218505859375,
-0.01401519775390625,
-0.008544921875,
-0.0013799667358398438,
-0.01125335693359375,
0.034271240234375,
-0.004138946533203125,
0.043548583984375,
-0.0015478134155273438,
-0.0118560791015625,
-0.0214691162109375,
-0.01029205322265625,
0.0361328125,
0.032623291015625,
-0.0173492431640625,
0.0018444061279296875,
-0.016082763671875,
-0.051605224609375,
0.0225982666015625,
0.035552978515625,
-0.018890380859375,
0.00927734375,
0.03582763671875,
-0.056427001953125,
0.0753173828125,
0.01291656494140625,
-0.0174560546875,
0.0012187957763671875,
0.0165557861328125,
-0.0233612060546875,
-0.00839996337890625,
-0.0151519775390625,
-0.0056304931640625,
0.0682373046875,
-0.0026416778564453125,
0.038787841796875,
-0.0321044921875,
0.0157318115234375,
0.026824951171875,
-0.012237548828125,
0.001743316650390625,
0.01605224609375,
-0.01552581787109375,
-0.020660400390625,
0.01438140869140625,
-0.00363922119140625,
-0.05340576171875,
0.009490966796875,
0.034576416015625,
-0.0276031494140625,
0.03204345703125,
-0.00823974609375,
0.0099029541015625,
-0.04412841796875,
-0.004337310791015625,
-0.0279693603515625,
-0.03302001953125,
-0.01316070556640625,
0.00836944580078125,
0.0017557144165039062,
0.0115509033203125,
0.0079498291015625,
0.039093017578125,
-0.0114288330078125,
0.007625579833984375,
-0.0236968994140625,
-0.022125244140625,
-0.056121826171875,
0.017974853515625,
-0.0247650146484375,
-0.0254669189453125,
-0.038238525390625,
-0.03082275390625,
-0.006313323974609375,
-0.005035400390625,
0.0194854736328125,
-0.0294952392578125,
0.0186767578125,
-0.0096588134765625,
0.026580810546875,
0.018280029296875,
-0.005706787109375,
0.00411224365234375,
0.04864501953125,
-0.0259552001953125,
-0.050933837890625,
-0.0167388916015625,
-0.0122833251953125,
-0.01197052001953125,
-0.0178375244140625,
-0.0121917724609375,
0.0114898681640625,
-0.081298828125,
0.00817108154296875,
0.00283050537109375,
0.0308685302734375,
-0.02325439453125,
-0.0143585205078125,
-0.0257568359375,
-0.04742431640625,
0.0733642578125,
-0.022918701171875,
0.042816162109375,
-0.005626678466796875,
0.040557861328125,
-0.07159423828125,
-0.032440185546875,
-0.017181396484375,
0.0269927978515625,
-0.04522705078125,
0.040008544921875,
0.07476806640625,
-0.01476287841796875,
-0.07232666015625,
0.041473388671875,
0.0007300376892089844,
0.09576416015625,
-0.064208984375,
-0.0184173583984375,
0.0252532958984375,
0.00402069091796875,
-0.021697998046875,
-0.0498046875,
0.0144195556640625,
-0.042266845703125,
-0.00930023193359375,
-0.020538330078125,
0.030029296875,
0.0246429443359375,
-0.0283050537109375,
-0.03460693359375,
0.04815673828125,
-0.006866455078125,
-0.0250701904296875,
-0.05291748046875,
0.026031494140625,
-0.00024771690368652344,
0.0294647216796875,
-0.01261138916015625,
0.0019969940185546875,
-0.014556884765625,
0.023468017578125,
0.037994384765625,
0.01125335693359375,
-0.018463134765625,
0.07928466796875,
-0.076416015625,
0.06201171875,
0.0131378173828125,
0.0219573974609375,
-0.022674560546875,
-0.0013132095336914062,
0.032623291015625,
0.0272216796875,
-0.01131439208984375,
0.0305023193359375,
0.037841796875,
0.0225067138671875,
0.005100250244140625,
-0.0234375,
-0.02752685546875,
-0.0097503662109375,
0.033721923828125,
0.032745361328125,
0.01021575927734375,
-0.02398681640625,
-0.06414794921875,
-0.029632568359375,
0.005970001220703125,
-0.00717926025390625,
0.0099029541015625,
-0.055389404296875,
0.01313018798828125,
0.016876220703125,
-0.0280914306640625,
-0.00025653839111328125,
-0.004695892333984375,
-0.036865234375,
0.01219940185546875,
-0.004974365234375,
-0.0261077880859375,
0.00853729248046875,
0.0183563232421875,
0.07879638671875,
-0.046173095703125,
0.01163482666015625,
0.01354217529296875,
-0.0008249282836914062,
0.033660888671875,
-0.032257080078125,
0.00759124755859375,
0.040679931640625,
-0.032012939453125,
-0.0100250244140625,
0.0131988525390625,
0.0149688720703125,
-0.001739501953125,
-0.01049041748046875,
-0.0117340087890625,
0.0162200927734375,
0.006198883056640625,
0.0143280029296875,
-0.02716064453125,
0.044769287109375,
-0.00771331787109375,
0.046539306640625,
-0.0085296630859375,
0.007328033447265625,
0.0082855224609375,
0.01329803466796875,
0.006832122802734375,
0.00124359130859375,
0.04412841796875,
-0.035125732421875,
0.01386260986328125,
0.030609130859375,
0.012481689453125,
0.017364501953125,
-0.00231170654296875,
-0.067626953125,
-0.0119781494140625,
-0.00493621826171875
] |
2e0c4fc9f52150e26e5ebede5a7ad917e430329e
|
Wordpress Stackexchange
Q: PHP unit testing WordPress? Given how WordPress is written and how it interacts with a database and given how its not very much OOP oriented, is there a way to unit test a theme? is there a way unit test a framework (not a theme framework) that interacts with WordPress, that is, for example, can you write a unit test for dealing with the loop, dealing with the widgets?
If so does any one have any examples? I know how to write unit tests, but I have never tried to write one for a theme.
Thoughts?
A: There is nothing stopping you from writing your own unit testing for themes/plugins using PHPUnit or some other testing platform.
As for WordPress, it has an official Unit Tests here:
*
*http://unit-tests.svn.wordpress.org/trunk/
*https://github.com/kurtpayne/wordpress-unit-tests (github mirror)
There are several build scripts that can automate unit testing found here, including WP-CLI that have built in unit testing, though you have to obviously write your own code.
I also found this plugin today via scibu's twitter rant :)
http://wordpress.org/extend/plugins/razor/
There are a few more in the repo:
http://wordpress.org/extend/plugins/tags/phpunit
Also check out this: Tutorials for Unit-Testing in WordPress and for unit-test.svn.wordpress.org?
|
Q: PHP unit testing WordPress? Given how WordPress is written and how it interacts with a database and given how its not very much OOP oriented, is there a way to unit test a theme? is there a way unit test a framework (not a theme framework) that interacts with WordPress, that is, for example, can you write a unit test for dealing with the loop, dealing with the widgets?
If so does any one have any examples? I know how to write unit tests, but I have never tried to write one for a theme.
Thoughts?
A: There is nothing stopping you from writing your own unit testing for themes/plugins using PHPUnit or some other testing platform.
As for WordPress, it has an official Unit Tests here:
*
*http://unit-tests.svn.wordpress.org/trunk/
*https://github.com/kurtpayne/wordpress-unit-tests (github mirror)
There are several build scripts that can automate unit testing found here, including WP-CLI that have built in unit testing, though you have to obviously write your own code.
I also found this plugin today via scibu's twitter rant :)
http://wordpress.org/extend/plugins/razor/
There are a few more in the repo:
http://wordpress.org/extend/plugins/tags/phpunit
Also check out this: Tutorials for Unit-Testing in WordPress and for unit-test.svn.wordpress.org?
A: I wrote the Travis-CI powered PHPunit testing library for Jigoshop and Easy Digital Downloads both of which are Ecommerce WP plugins developed on Github. The library employed could be easily converted to work for themes. The nice thing about the Travis-CI powered suite is that we can use it to quickly test multiple PHP and WP versions. If you're theme is a premium theme, and thus putting it on a free Github repo isn't an option, the suite works on Private Github repos with Travis-CI.
Alternatively, you can use the one found in Jigoshop and use commandline powered PHPUnit.
|
wordpress
|
{
"language": "en",
"length": 295,
"provenance": "stackexchange_00019.jsonl.gz:428736",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84677"
}
|
[
0.043792724609375,
-0.003887176513671875,
0.0009703636169433594,
-0.0260162353515625,
0.001163482666015625,
-0.0249481201171875,
0.048919677734375,
-0.00807952880859375,
-0.01861572265625,
0.021881103515625,
-0.025054931640625,
0.0181427001953125,
-0.0299224853515625,
-0.009979248046875,
-0.0005998611450195312,
-0.031951904296875,
0.01078033447265625,
-0.009857177734375,
0.01512908935546875,
-0.0149688720703125,
0.01556396484375,
0.00897216796875,
0.0084991455078125,
-0.007678985595703125,
0.0306243896484375,
0.0030689239501953125,
0.0621337890625,
-0.005950927734375,
0.03399658203125,
0.0014123916625976562,
0.03228759765625,
-0.04083251953125,
0.00812530517578125,
0.04949951171875,
-0.0572509765625,
-0.042999267578125,
-0.03363037109375,
0.0294036865234375,
-0.01849365234375,
0.0233001708984375,
0.0189361572265625,
-0.00467681884765625,
0.0011873245239257812,
0.04803466796875,
-0.0014200210571289062,
-0.06646728515625,
0.040191650390625,
-0.06793212890625,
0.0153045654296875,
-0.048248291015625,
0.002414703369140625,
0.0023784637451171875,
0.0218658447265625,
-0.0226287841796875,
-0.007720947265625,
0.026519775390625,
0.00821685791015625,
-0.0009045600891113281,
0.04766845703125,
-0.0170440673828125,
-0.039764404296875,
-0.0301666259765625,
0.03369140625,
-0.01117706298828125,
0.011077880859375,
-0.0227508544921875,
-0.007648468017578125,
0.00878143310546875,
0.0246734619140625,
0.03271484375,
0.0216827392578125,
0.0162811279296875,
-0.018463134765625,
-0.01316070556640625,
0.014434814453125,
-0.06103515625,
0.05902099609375,
-0.047515869140625,
-0.0264892578125,
0.054290771484375,
0.0243682861328125,
-0.0347900390625,
-0.040283203125,
0.0112152099609375,
-0.0078125,
0.046051025390625,
0.01120758056640625,
-0.0197906494140625,
-0.06622314453125,
-0.0163726806640625,
-0.037322998046875,
-0.01334381103515625,
-0.08734130859375,
0.0106964111328125,
0.01934814453125,
-0.00827789306640625,
0.0157470703125,
-0.037872314453125,
0.0200347900390625,
-0.002414703369140625,
0.060333251953125,
-0.084716796875,
0.05926513671875,
0.006504058837890625,
-0.007244110107421875,
0.0357666015625,
0.0010786056518554688,
0.0228729248046875,
0.0229339599609375,
0.0204010009765625,
0.02093505859375,
-0.0156707763671875,
-0.019989013671875,
-0.09173583984375,
0.0121612548828125,
0.06201171875,
-0.00533294677734375,
-0.0022029876708984375,
0.031280517578125,
-0.02349853515625,
-0.0176544189453125,
-0.004058837890625,
0.0141448974609375,
-0.00811004638671875,
0.0295257568359375,
0.0159912109375,
-0.00356292724609375,
-0.01456451416015625,
0.0216827392578125,
-0.0121002197265625,
-0.002918243408203125,
0.0226898193359375,
0.0255126953125,
0.0233154296875,
-0.01422119140625,
0.0036640167236328125,
0.0184326171875,
0.0026149749755859375,
-0.015899658203125,
0.0416259765625,
-0.00624847412109375,
-0.039398193359375,
0.00516510009765625,
-0.019683837890625,
-0.01308441162109375,
0.0216522216796875,
0.0206756591796875,
0.004261016845703125,
-0.017120361328125,
-0.03271484375,
-0.01299285888671875,
-0.033660888671875,
-0.0206756591796875,
0.023223876953125,
0.0523681640625,
0.003864288330078125,
-0.0280303955078125,
0.002777099609375,
0.049713134765625,
0.02392578125,
-0.01512908935546875,
-0.025299072265625,
0.012115478515625,
0.004787445068359375,
-0.008544921875,
0.0302886962890625,
0.0157318115234375,
0.01123046875,
0.02398681640625,
0.029815673828125,
-0.030670166015625,
-0.03375244140625,
0.055938720703125,
0.0244140625,
-0.0255279541015625,
0.046875,
-0.02264404296875,
0.0694580078125,
0.04949951171875,
-0.01163482666015625,
-0.0014247894287109375,
-0.035400390625,
0.148193359375,
-0.033111572265625,
-0.00858306884765625,
-0.0333251953125,
0.01446533203125,
0.01044464111328125,
0.004886627197265625,
0.0288543701171875,
0.00922393798828125,
-0.0171661376953125,
-0.01174163818359375,
0.04638671875,
0.0159759521484375,
-0.031402587890625,
-0.060211181640625,
-0.0006833076477050781,
-0.0228729248046875,
-0.0487060546875,
-0.0018463134765625,
0.023345947265625,
-0.00601959228515625,
0.0005002021789550781,
-0.03619384765625,
0.0189971923828125,
-0.0283966064453125,
0.029052734375,
0.0024566650390625,
0.0299224853515625,
-0.004878997802734375,
-0.0131988525390625,
0.01062774658203125,
-0.03179931640625,
-0.01861572265625,
-0.0232391357421875,
-0.0007548332214355469,
-0.00742340087890625,
-0.01385498046875,
-0.02496337890625,
-0.01143646240234375,
-0.004405975341796875,
-0.019073486328125,
0.061126708984375,
-0.0090484619140625,
0.0193634033203125,
-0.0215606689453125,
0.029449462890625,
0.010589599609375,
0.0312347412109375,
0.0238494873046875,
-0.04144287109375,
0.0386962890625,
0.0308074951171875,
-0.0209808349609375,
-0.01129150390625,
0.004638671875,
-0.05523681640625,
0.0022983551025390625,
0.051513671875,
0.0282745361328125,
0.05145263671875,
-0.020843505859375,
-0.0127410888671875,
0.061492919921875,
-0.04119873046875,
0.010650634765625,
-0.006862640380859375,
0.03912353515625,
0.056610107421875,
-0.023956298828125,
-0.0205230712890625,
0.024139404296875,
-0.004047393798828125,
-0.01184844970703125,
0.039276123046875,
-0.0161285400390625,
0.0139617919921875,
-0.037109375,
-0.0014696121215820312,
0.005702972412109375,
-0.04571533203125,
-0.0173492431640625,
-0.0291900634765625,
0.06439208984375,
-0.0036411285400390625,
0.038604736328125,
0.026153564453125,
-0.0284881591796875,
0.026824951171875,
0.01419830322265625,
-0.0289154052734375,
-0.0027751922607421875,
0.0457763671875,
0.04730224609375,
0.023590087890625,
-0.02587890625,
-0.036224365234375,
0.0260467529296875,
0.0256805419921875,
0.0005202293395996094,
0.057281494140625,
0.038818359375,
-0.0193939208984375,
-0.0232696533203125,
-0.028167724609375,
0.006702423095703125,
-0.03314208984375,
-0.01544952392578125,
0.006988525390625,
0.0307769775390625,
0.0005059242248535156,
-0.056671142578125,
0.047760009765625,
-0.0285797119140625,
-0.01751708984375,
0.0305023193359375,
-0.018798828125,
0.03857421875,
-0.0262451171875,
0.02142333984375,
0.052642822265625,
-0.0182037353515625,
0.00148773193359375,
0.01560211181640625,
-0.0189971923828125,
0.007183074951171875,
0.033355712890625,
0.01214599609375,
-0.0099334716796875,
-0.03546142578125,
0.01425933837890625,
0.03680419921875,
0.059600830078125,
0.0006775856018066406,
-0.0269622802734375,
-0.005828857421875,
0.0443115234375,
-0.01690673828125,
-0.039703369140625,
0.0306243896484375,
-0.039703369140625,
-0.0110015869140625,
-0.00008350610733032227,
-0.0224761962890625,
-0.0174407958984375,
0.0103759765625,
-0.009674072265625,
-0.06805419921875,
-0.024200439453125,
-0.05841064453125,
-0.11419677734375,
-0.078369140625,
-0.019744873046875,
-0.01800537109375,
0.0133209228515625,
0.00807952880859375,
0.0060882568359375,
-0.00958251953125,
-0.047119140625,
-0.010040283203125,
0.038238525390625,
-0.0041961669921875,
-0.00838470458984375,
0.01861572265625,
-0.01983642578125,
-0.04254150390625,
0.0060882568359375,
0.0166473388671875,
0.009918212890625,
-0.023651123046875,
-0.008026123046875,
0.00501251220703125,
-0.00878143310546875,
0.0078887939453125,
0.0304718017578125,
-0.0196685791015625,
-0.04315185546875,
-0.000530242919921875,
-0.06549072265625,
-0.006473541259765625,
0.0208587646484375,
-0.0167694091796875,
0.00962066650390625,
-0.01561737060546875,
-0.01605224609375,
0.005950927734375,
0.0034885406494140625,
-0.0003674030303955078,
0.00897979736328125,
0.05218505859375,
-0.0165252685546875,
0.0184783935546875,
-0.0182342529296875,
-0.04168701171875,
-0.0257415771484375,
0.01169586181640625,
-0.026611328125,
-0.033111572265625,
-0.0277862548828125,
-0.0128173828125,
-0.0290679931640625,
0.0016317367553710938,
-0.04095458984375,
0.004451751708984375,
0.0253448486328125,
0.0007152557373046875,
0.040618896484375,
-0.035919189453125,
-0.007904052734375,
-0.044525146484375,
0.04632568359375,
-0.058502197265625,
-0.0216522216796875,
-0.0260009765625,
0.01454925537109375,
-0.025146484375,
-0.027069091796875,
-0.0268402099609375,
-0.0182647705078125,
-0.05291748046875,
0.00125885009765625,
-0.0165863037109375,
-0.03057861328125,
0.006237030029296875,
-0.00130462646484375,
-0.02203369140625,
-0.039337158203125,
0.00836181640625,
-0.0235595703125,
0.0311126708984375,
-0.016082763671875,
0.0171051025390625,
-0.04730224609375,
0.0172119140625,
-0.050323486328125,
-0.059326171875,
-0.01259613037109375,
-0.0516357421875,
0.0853271484375,
0.0272674560546875,
0.0202484130859375,
-0.0161285400390625,
0.05047607421875,
0.026458740234375,
0.0011053085327148438,
0.017425537109375,
-0.017120361328125,
0.027496337890625,
0.0164337158203125,
0.01263427734375,
-0.00295257568359375,
-0.025543212890625,
-0.0258941650390625,
-0.03643798828125,
0.0168304443359375,
0.00286865234375,
0.009979248046875,
0.02166748046875,
-0.016998291015625,
0.0221710205078125,
-0.03485107421875,
-0.02349853515625,
0.031982421875,
-0.0297088623046875,
0.0124053955078125,
-0.0469970703125,
-0.0028076171875,
0.03497314453125,
0.027587890625,
-0.019775390625,
0.01122283935546875,
0.034759521484375,
0.0197906494140625,
-0.033233642578125,
-0.0406494140625,
-0.00788116455078125,
0.01812744140625,
0.040618896484375,
-0.0196075439453125,
-0.0516357421875,
-0.0199432373046875,
0.02923583984375,
-0.00968170166015625,
-0.004764556884765625,
-0.0108795166015625,
0.059051513671875,
-0.0059661865234375,
-0.033447265625,
0.02520751953125,
-0.0036029815673828125,
-0.011077880859375,
-0.005741119384765625,
-0.005252838134765625,
-0.018768310546875,
0.031219482421875,
0.0277099609375,
-0.043792724609375,
0.0538330078125,
0.0012617111206054688,
-0.05780029296875,
0.0200042724609375,
-0.0745849609375,
0.0153656005859375,
-0.0121612548828125,
0.00669097900390625,
0.0196533203125,
0.0241851806640625,
-0.0019989013671875,
0.0625,
0.055755615234375,
-0.004730224609375,
0.0289154052734375,
0.053253173828125,
-0.0180206298828125,
-0.004276275634765625,
-0.0079803466796875,
0.06268310546875,
-0.01351165771484375,
-0.0513916015625,
-0.004947662353515625,
0.001995086669921875,
0.049652099609375,
0.034423828125,
0.004756927490234375,
0.040924072265625,
-0.01092529296875,
-0.01739501953125,
0.006931304931640625,
-0.036376953125,
-0.0226287841796875,
-0.032989501953125,
-0.018707275390625,
-0.0022296905517578125,
-0.00732421875,
0.0640869140625,
-0.0018520355224609375,
-0.023956298828125,
0.034210205078125,
-0.01453399658203125,
0.0535888671875,
0.007244110107421875,
0.061370849609375,
0.0209503173828125,
-0.05169677734375,
-0.00714111328125,
0.0125274658203125,
-0.0390625,
-0.0026226043701171875,
-0.03936767578125,
0.02752685546875,
0.013946533203125,
-0.02178955078125,
0.01444244384765625,
-0.0007677078247070312,
0.0009565353393554688,
-0.009063720703125,
-0.01068115234375,
-0.02386474609375,
-0.0047454833984375,
-0.01399993896484375,
-0.01345062255859375,
0.022064208984375,
0.020355224609375,
0.0013380050659179688,
-0.0005440711975097656,
-0.02874755859375,
-0.01483917236328125,
0.00750732421875,
-0.023162841796875,
-0.027923583984375,
-0.0129852294921875,
-0.06036376953125,
-0.0345458984375,
0.01300048828125,
-0.037811279296875,
-0.00870513916015625,
-0.0126495361328125,
-0.0286712646484375,
0.037841796875,
-0.0211639404296875,
0.0019235610961914062,
-0.02911376953125,
0.005519866943359375,
-0.0728759765625,
-0.01538848876953125,
0.075927734375,
0.0523681640625,
-0.01605224609375,
-0.0005583763122558594,
-0.040130615234375,
-0.028289794921875,
-0.03643798828125,
-0.026275634765625,
-0.07672119140625,
0.00897216796875,
0.004917144775390625,
0.01666259765625,
-0.0090179443359375,
-0.0261993408203125,
-0.03265380859375,
0.0246429443359375,
0.0303497314453125,
0.025604248046875,
0.010955810546875,
0.06201171875,
-0.004756927490234375,
0.058074951171875,
0.0408935546875,
0.033843994140625,
-0.049163818359375,
-0.033905029296875,
0.019561767578125,
0.0343017578125,
-0.034332275390625,
-0.03125,
-0.008544921875,
-0.0200958251953125,
0.06793212890625,
-0.0178070068359375,
-0.0312042236328125,
-0.0251617431640625,
-0.002628326416015625,
-0.0208587646484375,
0.09759521484375,
-0.005107879638671875,
-0.0202178955078125,
-0.036468505859375,
-0.016632080078125,
-0.0173492431640625,
-0.01139068603515625,
0.022674560546875,
-0.02545166015625,
0.0009107589721679688,
-0.032135009765625,
-0.0005183219909667969,
-0.041412353515625,
0.081787109375,
0.052947998046875,
-0.0184326171875,
0.0276336669921875,
0.0139923095703125,
-0.00875091552734375,
-0.005828857421875,
0.0294342041015625,
-0.026275634765625,
-0.0362548828125,
0.0382080078125,
0.01381683349609375,
-0.0263214111328125,
0.0207977294921875,
-0.0283050537109375,
-0.010955810546875,
0.01004791259765625,
0.0161285400390625,
-0.032440185546875,
-0.0008940696716308594,
-0.002197265625,
0.004405975341796875,
0.00830078125,
-0.0096435546875,
0.01287841796875,
0.0215606689453125,
0.03094482421875,
0.00397491455078125,
-0.029937744140625,
0.0234832763671875,
0.0020275115966796875,
-0.006526947021484375,
-0.0304107666015625,
0.0537109375,
0.0225677490234375,
-0.07550048828125,
0.06683349609375,
0.045745849609375,
0.0261993408203125,
-0.0010919570922851562,
0.008026123046875,
-0.0017366409301757812,
-0.0262451171875,
-0.0157012939453125,
0.0272064208984375,
-0.026763916015625,
0.01154327392578125,
-0.01042938232421875,
0.005054473876953125,
0.00804901123046875,
0.036346435546875,
-0.0106658935546875,
-0.0215911865234375,
0.0149688720703125,
-0.02764892578125,
-0.0455322265625,
-0.0069732666015625,
0.032470703125,
0.041839599609375,
-0.047760009765625,
0.0301055908203125,
-0.0335693359375,
-0.0017137527465820312,
-0.01312255859375,
-0.001277923583984375,
0.06378173828125,
-0.0031108856201171875,
-0.037078857421875,
0.0185699462890625,
0.020263671875,
0.004917144775390625,
-0.0176544189453125,
0.020050048828125,
-0.053466796875,
-0.01319122314453125,
-0.0133819580078125,
-0.016082763671875,
0.0025501251220703125,
-0.020050048828125,
-0.0479736328125,
0.06549072265625,
0.01409912109375,
-0.0021800994873046875,
0.0081787109375,
0.0253753662109375,
-0.040130615234375,
-0.0018520355224609375,
-0.0234527587890625,
0.049224853515625,
-0.0208587646484375,
0.004085540771484375,
-0.0191497802734375,
0.0182647705078125,
-0.004718780517578125,
-0.002094268798828125,
0.006175994873046875,
0.0040130615234375,
-0.052215576171875,
-0.01340484619140625,
0.01021575927734375,
0.01971435546875,
0.0192108154296875,
0.05133056640625,
0.0020046234130859375,
0.021881103515625,
0.051666259765625,
-0.00701141357421875,
0.04351806640625,
-0.007389068603515625,
-0.02239990234375,
0.0241241455078125,
0.0208740234375,
-0.01067352294921875,
0.0006241798400878906,
0.0184326171875,
-0.0223541259765625,
0.0030841827392578125,
0.00890350341796875,
0.03228759765625,
0.01209259033203125,
0.0281829833984375,
0.0208892822265625,
-0.00792694091796875,
-0.0129852294921875,
-0.0218353271484375,
0.03851318359375,
-0.002986907958984375,
0.0205078125,
0.043670654296875,
0.0250701904296875,
-0.0218505859375,
0.0224609375,
0.0241851806640625,
0.0292510986328125,
-0.0283050537109375,
-0.004344940185546875,
0.026123046875,
0.0274658203125,
-0.0002949237823486328,
0.00586700439453125,
0.0369873046875,
0.01103973388671875,
-0.00835418701171875,
-0.049835205078125,
-0.0008721351623535156,
0.0006999969482421875,
0.006076812744140625,
0.02374267578125,
0.01256561279296875,
-0.036651611328125,
0.01091766357421875,
0.0128021240234375,
-0.0185089111328125,
-0.0181427001953125,
0.0006232261657714844,
-0.0080413818359375,
-0.025390625,
0.056365966796875,
0.01200103759765625,
0.0126190185546875,
-0.008148193359375,
-0.01413726806640625,
0.0171966552734375,
-0.0187530517578125,
0.055084228515625,
-0.048919677734375,
-0.00152587890625,
0.0240631103515625,
0.006916046142578125,
-0.060638427734375,
-0.017364501953125,
-0.0189361572265625,
-0.0614013671875,
-0.03472900390625,
0.055999755859375,
0.00835418701171875,
0.00675201416015625,
0.006378173828125,
0.046600341796875,
0.0227203369140625,
-0.00867462158203125,
0.040679931640625,
0.0080108642578125,
-0.0543212890625,
0.006214141845703125,
-0.01313018798828125,
0.0005083084106445312,
0.0042572021484375,
0.003551483154296875,
0.092529296875,
-0.0269317626953125,
0.001697540283203125,
0.07061767578125,
-0.0005125999450683594,
0.0201416015625,
0.0209808349609375,
-0.01099395751953125,
0.0347900390625,
0.032012939453125,
-0.07635498046875,
-0.0352783203125,
-0.0009965896606445312,
0.0009794235229492188,
0.007488250732421875,
0.035064697265625,
0.020263671875,
-0.0006976127624511719,
0.039947509765625,
-0.0206451416015625,
0.005329132080078125,
0.0130462646484375,
0.01364898681640625,
-0.0301361083984375,
0.03485107421875,
0.003108978271484375,
-0.0623779296875,
-0.027740478515625,
-0.0278167724609375,
0.04425048828125,
-0.0011148452758789062,
0.07861328125,
-0.0283203125,
0.0143280029296875,
-0.021636962890625,
-0.00911712646484375,
-0.006977081298828125,
-0.036163330078125,
0.0367431640625,
0.007747650146484375,
-0.00030159950256347656,
-0.002635955810546875,
-0.00786590576171875,
0.0212554931640625,
0.023406982421875,
-0.01922607421875,
-0.02850341796875,
-0.006847381591796875,
0.0255279541015625,
0.0207366943359375,
0.02606201171875,
0.004467010498046875,
-0.033599853515625,
-0.0164031982421875,
0.0244293212890625,
0.029296875,
0.0728759765625,
-0.0236968994140625,
0.00933837890625,
-0.00894927978515625,
-0.039031982421875,
-0.009796142578125,
0.00467681884765625,
-0.032623291015625,
0.0199127197265625,
0.00720977783203125,
-0.065185546875,
0.042572021484375,
0.01230621337890625,
-0.0256195068359375,
0.048187255859375,
0.0472412109375,
0.03167724609375,
-0.052001953125,
0.03985595703125,
0.0369873046875,
0.036529541015625,
-0.0038623809814453125,
-0.00611114501953125,
0.057403564453125,
-0.024169921875,
-0.0218658447265625,
-0.02276611328125,
-0.029022216796875,
-0.0684814453125,
0.007541656494140625,
0.01309967041015625,
-0.033538818359375,
-0.0014181137084960938,
-0.01131439208984375,
0.01873779296875,
0.0240325927734375,
0.0002608299255371094,
-0.0433349609375,
0.0033206939697265625,
-0.0231475830078125,
0.04608154296875,
-0.0199737548828125,
0.01849365234375,
-0.01300048828125,
-0.006359100341796875,
-0.0182647705078125,
-0.0445556640625,
-0.02642822265625,
0.050506591796875,
0.00348663330078125,
0.052398681640625,
0.0609130859375,
-0.06549072265625,
-0.0278472900390625,
0.058746337890625,
0.07965087890625,
0.10089111328125,
0.030120849609375,
-0.01027679443359375,
0.040130615234375,
0.0168304443359375,
-0.00957489013671875,
-0.09393310546875,
-0.021331787109375,
-0.027801513671875,
0.042938232421875,
0.0019817352294921875,
-0.0181427001953125,
-0.01064300537109375,
-0.0655517578125,
-0.11651611328125,
0.017242431640625,
-0.01386260986328125,
-0.05517578125,
-0.04901123046875,
0.022430419921875,
0.003559112548828125,
-0.00986480712890625,
-0.0149993896484375,
-0.0182342529296875,
-0.0106658935546875,
0.0290374755859375,
0.0211334228515625,
0.0423583984375,
-0.0036525726318359375,
0.035888671875,
0.0008182525634765625,
0.05316162109375,
0.037994384765625,
0.004299163818359375,
-0.005786895751953125,
-0.0009293556213378906,
-0.0033359527587890625,
0.031982421875,
-0.039398193359375,
-0.052581787109375,
-0.0221099853515625,
0.0010356903076171875,
-0.0264892578125,
-0.018646240234375,
-0.051055908203125,
-0.01439666748046875,
0.12298583984375,
0.06207275390625,
0.0379638671875,
-0.03753662109375,
-0.018707275390625,
-0.0185699462890625,
-0.01050567626953125,
-0.0152130126953125,
0.01541900634765625,
-0.07049560546875,
-0.022125244140625,
0.0095672607421875,
0.00803375244140625,
0.00992584228515625,
-0.00154876708984375,
-0.032196044921875,
-0.02880859375,
-0.00860595703125,
-0.021636962890625,
-0.029388427734375,
-0.02166748046875,
0.049652099609375,
-0.033721923828125,
0.0164947509765625,
-0.00555419921875,
0.0184478759765625,
0.02294921875,
0.0028553009033203125,
0.034332275390625,
-0.00004678964614868164,
-0.042449951171875,
0.039215087890625,
-0.0025920867919921875,
0.0174102783203125,
-0.0396728515625,
-0.045440673828125,
-0.02117919921875,
-0.00884246826171875,
0.006011962890625,
-0.023712158203125,
-0.01336669921875,
-0.0310211181640625,
-0.00965118408203125,
0.0478515625,
0.0288543701171875,
0.025177001953125,
0.00569915771484375,
0.04388427734375,
0.0196990966796875,
-0.05865478515625,
0.01108551025390625,
-0.040863037109375,
0.01053619384765625,
-0.0025844573974609375,
0.0186920166015625,
-0.0416259765625,
0.039276123046875,
0.00902557373046875,
-0.00457000732421875,
0.03118896484375
] |
dece5b5f31d660f66146f2040a6194923614ad13
|
Wordpress Stackexchange
Q: Is there any way to use get_template_part() with folders? I'm wondering if there is any way to use get_template_part() with folders? My main folder has a lot of files now because I put every re-usable element in a separate file. I'd like to put them in folders then.
There is no information about that in Codex: http://codex.wordpress.org/Function_Reference/get_template_part
A: In fact you can, I have a folder in my theme directory called /partials/ in in that folder I have files such as latest-articles.php, latest-news.php and latest-statements.php and I load these files using get_template_part() like:
get_template_part('partials/latest', 'news');
get_template_part('partials/latest', 'articles');
get_template_part('partials/latest', 'statements');
Just dont forget to omit the .php from the file name.
|
Q: Is there any way to use get_template_part() with folders? I'm wondering if there is any way to use get_template_part() with folders? My main folder has a lot of files now because I put every re-usable element in a separate file. I'd like to put them in folders then.
There is no information about that in Codex: http://codex.wordpress.org/Function_Reference/get_template_part
A: In fact you can, I have a folder in my theme directory called /partials/ in in that folder I have files such as latest-articles.php, latest-news.php and latest-statements.php and I load these files using get_template_part() like:
get_template_part('partials/latest', 'news');
get_template_part('partials/latest', 'articles');
get_template_part('partials/latest', 'statements');
Just dont forget to omit the .php from the file name.
A: I'm afraid not. If in codex isn't something you would like to know, try to follow the link to the source and have a look yourself to the code and try to manage it out.
I had a look and the get_template_part function is defined as below:
function get_template_part( $slug, $name = null ) {
do_action( "get_template_part_{$slug}", $slug, $name );
$templates = array();
if ( isset($name) )
$templates[] = "{$slug}-{$name}.php";
$templates[] = "{$slug}.php";
locate_template($templates, true, false);
}
From this, you can read out, that get_template_part function just creates an intended php file name and calls function locate_template. This in not useful, so I had a look also on locate_template function:
function locate_template($template_names, $load = false, $require_once = true ) {
$located = '';
foreach ( (array) $template_names as $template_name ) {
if ( !$template_name )
continue;
if ( file_exists(STYLESHEETPATH . '/' . $template_name)) {
$located = STYLESHEETPATH . '/' . $template_name;
break;
} else if ( file_exists(TEMPLATEPATH . '/' . $template_name) ) {
$located = TEMPLATEPATH . '/' . $template_name;
break;
}
}
if ( $load && '' != $located )
load_template( $located, $require_once );
return $located;
}
Get locate template searches for php file called from get_template_part. But you can call locate_template directly from you code. And this is useful.
Try out this code instead of get_template_part('loop-sigle.php') function (your file is located in mydir inside your theme):
locate_template( 'mydir/loop-single.php', true, true );
A: The notes of function get_template_part() says:
Notes
- Uses: locate_template()
- Uses: do_action() Calls 'get_template_part_{$slug}' action.
Wich allows you to make use of locate_template(), wich says:
Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which inherit from a parent theme can just overload one file.
If you define TEMPLATEPATH with the subdirectory you want to use, get_template_part() will search for the files in your subdirectory.
|
wordpress
|
{
"language": "en",
"length": 412,
"provenance": "stackexchange_00019.jsonl.gz:428747",
"question_score": "32",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84721"
}
|
[
-0.01513671875,
-0.03619384765625,
0.0144805908203125,
-0.0096588134765625,
-0.024505615234375,
0.01064300537109375,
0.0141143798828125,
-0.007450103759765625,
0.00909423828125,
0.0241241455078125,
-0.0299072265625,
-0.003803253173828125,
-0.00800323486328125,
-0.01007080078125,
-0.019317626953125,
-0.02044677734375,
0.051483154296875,
-0.02850341796875,
0.036468505859375,
0.01018524169921875,
-0.0093231201171875,
0.03839111328125,
0.0516357421875,
0.048828125,
-0.01116180419921875,
0.0231781005859375,
0.046844482421875,
-0.0012292861938476562,
-0.034332275390625,
-0.047943115234375,
0.004871368408203125,
0.0537109375,
0.01824951171875,
0.006687164306640625,
-0.00453948974609375,
-0.00327301025390625,
0.034515380859375,
-0.00787353515625,
0.01099395751953125,
0.018157958984375,
0.00901031494140625,
-0.001003265380859375,
0.0259246826171875,
0.058135986328125,
-0.0157012939453125,
-0.02642822265625,
0.007610321044921875,
-0.0256805419921875,
-0.0016803741455078125,
0.0124359130859375,
0.0252227783203125,
-0.0299530029296875,
0.042755126953125,
-0.01100921630859375,
-0.0117950439453125,
-0.0199432373046875,
-0.00629425048828125,
0.0052947998046875,
0.038543701171875,
-0.044921875,
-0.03765869140625,
-0.01084136962890625,
0.034088134765625,
-0.005741119384765625,
-0.0027141571044921875,
-0.005947113037109375,
-0.00836944580078125,
0.01617431640625,
-0.04608154296875,
-0.01141357421875,
0.027679443359375,
-0.0254669189453125,
0.00508880615234375,
-0.06866455078125,
0.0192718505859375,
0.051239013671875,
-0.02960205078125,
-0.0259552001953125,
0.01116943359375,
-0.007801055908203125,
-0.004657745361328125,
0.01343536376953125,
-0.056182861328125,
-0.0380859375,
0.036346435546875,
0.017608642578125,
-0.0089111328125,
-0.0217132568359375,
-0.0300445556640625,
0.0063629150390625,
-0.0285797119140625,
-0.0014352798461914062,
-0.01788330078125,
0.01873779296875,
-0.004512786865234375,
-0.0055084228515625,
0.0268402099609375,
0.07061767578125,
-0.0389404296875,
0.01904296875,
-0.02178955078125,
-0.024017333984375,
0.03350830078125,
-0.049041748046875,
0.0038394927978515625,
0.050628662109375,
-0.01235198974609375,
0.00997161865234375,
0.034820556640625,
0.037078857421875,
0.0255584716796875,
0.01129150390625,
-0.01187896728515625,
-0.05438232421875,
-0.0169219970703125,
0.047882080078125,
-0.0010900497436523438,
-0.008880615234375,
0.034454345703125,
-0.012939453125,
0.017791748046875,
0.031768798828125,
0.0111541748046875,
-0.022918701171875,
-0.0024662017822265625,
-0.00287628173828125,
-0.031829833984375,
-0.03729248046875,
0.006702423095703125,
0.04937744140625,
-0.02984619140625,
-0.01197052001953125,
-0.0199432373046875,
-0.01025390625,
-0.032012939453125,
-0.0212249755859375,
0.0049591064453125,
-0.01544952392578125,
0.00431060791015625,
-0.0174407958984375,
0.0007100105285644531,
0.001312255859375,
0.035491943359375,
-0.0106048583984375,
-0.0172271728515625,
-0.0161895751953125,
0.0242767333984375,
0.039825439453125,
-0.01165008544921875,
-0.01512908935546875,
-0.0051727294921875,
0.031158447265625,
0.018798828125,
-0.0024013519287109375,
0.0158538818359375,
-0.0648193359375,
-0.010894775390625,
-0.05120849609375,
0.05029296875,
-0.026458740234375,
0.0105133056640625,
-0.00997161865234375,
-0.00807952880859375,
-0.048431396484375,
-0.070068359375,
0.004375457763671875,
-0.00641632080078125,
-0.003948211669921875,
0.0199127197265625,
0.024658203125,
0.01242828369140625,
-0.0212554931640625,
0.00881195068359375,
0.03411865234375,
0.017242431640625,
0.029998779296875,
0.01715087890625,
0.007503509521484375,
-0.00843048095703125,
0.05224609375,
0.0032062530517578125,
-0.032501220703125,
0.0178680419921875,
-0.0203857421875,
-0.03143310546875,
-0.0019397735595703125,
0.0091400146484375,
0.00914764404296875,
0.0144500732421875,
0.01763916015625,
0.0247802734375,
0.01904296875,
-0.00499725341796875,
-0.00988006591796875,
0.0101776123046875,
-0.0010509490966796875,
-0.016021728515625,
0.003692626953125,
-0.002231597900390625,
-0.021453857421875,
-0.02606201171875,
-0.004848480224609375,
0.0255584716796875,
0.0182037353515625,
-0.0024166107177734375,
0.0037689208984375,
-0.0106964111328125,
0.02911376953125,
-0.0328369140625,
0.0218658447265625,
0.028289794921875,
0.00795745849609375,
-0.032257080078125,
-0.00867462158203125,
-0.0192413330078125,
0.007160186767578125,
-0.033416748046875,
0.04443359375,
-0.003284454345703125,
0.06158447265625,
0.003631591796875,
-0.0142974853515625,
-0.0007405281066894531,
-0.007282257080078125,
0.0030670166015625,
0.025054931640625,
-0.0435791015625,
0.01268768310546875,
-0.05859375,
0.06121826171875,
-0.110107421875,
0.014434814453125,
-0.0321044921875,
-0.0006270408630371094,
-0.029510498046875,
-0.01009368896484375,
-0.019989013671875,
0.0004239082336425781,
0.0068511962890625,
0.0338134765625,
0.047332763671875,
0.0445556640625,
0.0037288665771484375,
-0.0308074951171875,
0.09234619140625,
-0.0175628662109375,
0.00916290283203125,
-0.03521728515625,
0.01395416259765625,
0.03594970703125,
0.00641632080078125,
-0.0012998580932617188,
0.0176544189453125,
-0.0171661376953125,
-0.01457977294921875,
0.0439453125,
-0.01538848876953125,
-0.01397705078125,
-0.00812530517578125,
0.0408935546875,
-0.0016880035400390625,
0.04522705078125,
0.01128387451171875,
0.0088348388671875,
0.01080322265625,
0.053558349609375,
0.023193359375,
0.03350830078125,
-0.0173187255859375,
0.035888671875,
-0.01174163818359375,
-0.032623291015625,
0.01007843017578125,
0.0697021484375,
0.0167999267578125,
-0.031158447265625,
-0.00820159912109375,
-0.030364990234375,
-0.0017538070678710938,
0.0233001708984375,
-0.016998291015625,
0.0316162109375,
-0.0125732421875,
-0.01451873779296875,
-0.0355224609375,
-0.0543212890625,
0.01351165771484375,
0.0210113525390625,
0.024688720703125,
0.023590087890625,
0.026947021484375,
0.047027587890625,
-0.0098114013671875,
0.0418701171875,
-0.0025653839111328125,
0.0089111328125,
0.09014892578125,
0.0179901123046875,
0.0126953125,
0.015960693359375,
0.022857666015625,
0.0232696533203125,
-0.014495849609375,
-0.0048675537109375,
0.007221221923828125,
0.0121917724609375,
0.040130615234375,
-0.0019969940185546875,
0.0021514892578125,
-0.030364990234375,
-0.02679443359375,
-0.020294189453125,
0.01432037353515625,
0.035552978515625,
-0.008880615234375,
-0.0465087890625,
-0.0033416748046875,
-0.006114959716796875,
-0.08013916015625,
-0.06781005859375,
0.057891845703125,
-0.06500244140625,
-0.05145263671875,
-0.0068206787109375,
-0.053192138671875,
-0.0218353271484375,
0.0204010009765625,
-0.00675201416015625,
0.03192138671875,
-0.0236663818359375,
-0.03369140625,
-0.00791168212890625,
-0.04412841796875,
0.029815673828125,
-0.0024127960205078125,
-0.01238250732421875,
-0.0168304443359375,
0.0758056640625,
-0.013946533203125,
-0.053955078125,
-0.058990478515625,
0.03961181640625,
-0.0011091232299804688,
-0.027008056640625,
0.0340576171875,
-0.0291595458984375,
-0.01012420654296875,
-0.005596160888671875,
-0.0006628036499023438,
0.042694091796875,
-0.0240020751953125,
-0.010650634765625,
-0.01435089111328125,
0.0084991455078125,
0.007965087890625,
0.055938720703125,
0.019317626953125,
-0.00453948974609375,
0.0240020751953125,
-0.037750244140625,
-0.061431884765625,
0.0005941390991210938,
-0.0745849609375,
0.032562255859375,
0.0535888671875,
0.006687164306640625,
0.003448486328125,
0.0113372802734375,
0.0274658203125,
0.016876220703125,
0.0057220458984375,
0.000606536865234375,
0.033111572265625,
0.0004439353942871094,
0.0352783203125,
-0.03692626953125,
0.033905029296875,
-0.003856658935546875,
0.01214599609375,
0.01415252685546875,
0.03717041015625,
-0.005741119384765625,
0.0204925537109375,
-0.036041259765625,
-0.04071044921875,
0.06829833984375,
-0.00977325439453125,
0.0203094482421875,
-0.06829833984375,
-0.04180908203125,
-0.035186767578125,
0.09765625,
-0.042449951171875,
-0.048828125,
-0.0099029541015625,
0.03900146484375,
-0.044281005859375,
-0.0845947265625,
0.00885009765625,
-0.01367950439453125,
-0.01351165771484375,
-0.009674072265625,
-0.03094482421875,
-0.0213470458984375,
-0.0018520355224609375,
-0.04437255859375,
0.005886077880859375,
-0.026397705078125,
0.01166534423828125,
-0.0108795166015625,
0.01058197021484375,
0.0297393798828125,
-0.0222625732421875,
0.0205230712890625,
-0.015228271484375,
-0.038421630859375,
-0.055633544921875,
-0.0251007080078125,
-0.02899169921875,
0.0606689453125,
0.0462646484375,
-0.036529541015625,
-0.005367279052734375,
0.04901123046875,
-0.032135009765625,
0.01055145263671875,
0.0237579345703125,
0.0511474609375,
-0.005016326904296875,
0.00595855712890625,
0.0227813720703125,
-0.0260467529296875,
0.006618499755859375,
-0.0277099609375,
-0.058074951171875,
-0.0093994140625,
-0.035400390625,
0.037017822265625,
-0.00011843442916870117,
-0.0174560546875,
0.002895355224609375,
-0.006519317626953125,
-0.006397247314453125,
0.001132965087890625,
0.0147552490234375,
-0.03216552734375,
0.004795074462890625,
-0.0180816650390625,
0.037139892578125,
0.03619384765625,
-0.01483154296875,
0.004703521728515625,
0.07366943359375,
0.0167236328125,
-0.038299560546875,
-0.051422119140625,
0.0268402099609375,
0.0552978515625,
-0.0003020763397216797,
0.02484130859375,
0.023681640625,
-0.0452880859375,
0.05413818359375,
0.0179901123046875,
-0.02410888671875,
0.021575927734375,
0.0545654296875,
0.00981903076171875,
-0.003604888916015625,
-0.013763427734375,
-0.006198883056640625,
0.0038585662841796875,
0.045928955078125,
-0.007171630859375,
-0.03607177734375,
-0.033203125,
0.06793212890625,
0.0036182403564453125,
0.00859832763671875,
-0.07659912109375,
-0.0654296875,
-0.003124237060546875,
0.0256500244140625,
0.0631103515625,
0.0181732177734375,
0.004199981689453125,
0.07470703125,
0.05853271484375,
-0.0008950233459472656,
0.01995849609375,
0.004425048828125,
0.01461029052734375,
0.0141143798828125,
0.01702880859375,
-0.00948333740234375,
0.0005660057067871094,
-0.006526947021484375,
0.0104827880859375,
-0.0012159347534179688,
-0.02783203125,
-0.007183074951171875,
-0.0102996826171875,
0.039276123046875,
0.007389068603515625,
-0.037689208984375,
0.034210205078125,
0.01239013671875,
-0.0209503173828125,
0.0022792816162109375,
-0.039825439453125,
-0.0325927734375,
-0.039886474609375,
0.0210418701171875,
0.033782958984375,
-0.0197296142578125,
0.0122528076171875,
0.019134521484375,
0.03125,
0.00214385986328125,
-0.0123291015625,
0.0029144287109375,
-0.021728515625,
0.00893402099609375,
0.009002685546875,
0.0017642974853515625,
0.0185699462890625,
-0.0207977294921875,
0.03619384765625,
-0.03143310546875,
0.01067352294921875,
-0.01171112060546875,
0.05218505859375,
-0.035797119140625,
-0.05084228515625,
0.039764404296875,
-0.04986572265625,
0.0022296905517578125,
-0.01222991943359375,
-0.0133819580078125,
-0.021026611328125,
-0.005458831787109375,
0.024566650390625,
0.0158843994140625,
0.003170013427734375,
-0.0208740234375,
0.037200927734375,
-0.031494140625,
-0.005374908447265625,
0.052490234375,
-0.05560302734375,
-0.01007843017578125,
0.005863189697265625,
-0.043670654296875,
-0.0215911865234375,
0.03912353515625,
-0.1044921875,
-0.0203399658203125,
-0.0231781005859375,
-0.0216827392578125,
0.045013427734375,
-0.0157623291015625,
0.01012420654296875,
-0.0015716552734375,
-0.017578125,
0.0085906982421875,
0.0179901123046875,
0.0067138671875,
-0.00540924072265625,
-0.05450439453125,
0.01457977294921875,
-0.055694580078125,
-0.00262451171875,
-0.0501708984375,
-0.0693359375,
-0.044830322265625,
-0.001529693603515625,
-0.0261688232421875,
0.0224609375,
0.0011415481567382812,
0.019561767578125,
-0.00252532958984375,
0.021331787109375,
-0.0234222412109375,
0.049102783203125,
-0.0084228515625,
0.06890869140625,
-0.006252288818359375,
0.051055908203125,
0.000988006591796875,
0.0192108154296875,
-0.05682373046875,
0.0026111602783203125,
0.006404876708984375,
-0.046356201171875,
0.01371002197265625,
-0.00612640380859375,
-0.00487518310546875,
0.00726318359375,
0.0384521484375,
0.0127716064453125,
0.0027313232421875,
-0.049652099609375,
-0.005340576171875,
-0.020355224609375,
0.0665283203125,
-0.048980712890625,
-0.03790283203125,
0.0181732177734375,
-0.0192718505859375,
-0.0293426513671875,
0.0082550048828125,
-0.052734375,
0.05218505859375,
0.0108489990234375,
0.011688232421875,
0.003360748291015625,
-0.044586181640625,
0.05560302734375,
0.05682373046875,
0.005619049072265625,
0.0251007080078125,
0.006969451904296875,
0.00372314453125,
-0.0177764892578125,
0.019134521484375,
0.031951904296875,
-0.004772186279296875,
0.07818603515625,
0.0121002197265625,
0.0170745849609375,
0.0692138671875,
-0.034759521484375,
0.02294921875,
0.04827880859375,
0.036865234375,
-0.060272216796875,
-0.0095062255859375,
-0.00815582275390625,
-0.0230560302734375,
0.02349853515625,
-0.0085601806640625,
-0.0160369873046875,
-0.035430908203125,
0.05169677734375,
0.03472900390625,
-0.00278472900390625,
0.0214691162109375,
0.001369476318359375,
-0.03021240234375,
-0.01042938232421875,
0.04840087890625,
0.006683349609375,
0.0099334716796875,
-0.0173797607421875,
-0.01088714599609375,
-0.0106048583984375,
-0.0109710693359375,
0.040557861328125,
-0.02618408203125,
0.01284027099609375,
0.005878448486328125,
0.023712158203125,
-0.01885986328125,
-0.0056610107421875,
-0.004497528076171875,
0.004573822021484375,
0.004474639892578125,
0.02899169921875,
-0.018768310546875,
-0.0025787353515625,
0.012969970703125,
-0.0195465087890625,
-0.037078857421875,
0.007648468017578125,
0.01534271240234375,
0.004283905029296875,
0.005161285400390625,
0.0074462890625,
-0.032257080078125,
0.0035190582275390625,
-0.00794219970703125,
-0.0091094970703125,
0.060150146484375,
-0.0246429443359375,
-0.021453857421875,
0.037322998046875,
0.010711669921875,
-0.033966064453125,
0.028167724609375,
0.01519775390625,
-0.0279083251953125,
0.004611968994140625,
0.0325927734375,
-0.01183319091796875,
-0.0239410400390625,
0.0257720947265625,
-0.054840087890625,
0.09869384765625,
0.019500732421875,
0.030181884765625,
0.043060302734375,
0.03778076171875,
-0.05987548828125,
-0.004852294921875,
-0.032989501953125,
0.011627197265625,
0.01358795166015625,
0.031829833984375,
-0.03857421875,
0.0018930435180664062,
-0.007411956787109375,
0.03704833984375,
0.01885986328125,
-0.00139617919921875,
-0.01436614990234375,
-0.019775390625,
0.05548095703125,
0.0791015625,
0.035858154296875,
-0.0037364959716796875,
-0.005496978759765625,
0.0340576171875,
0.0219268798828125,
-0.062347412109375,
0.0195159912109375,
-0.0206146240234375,
-0.0281524658203125,
0.0121917724609375,
-0.0104522705078125,
-0.03729248046875,
-0.0027713775634765625,
0.01190948486328125,
-0.044647216796875,
-0.0140380859375,
0.0341796875,
-0.0264129638671875,
-0.0022487640380859375,
0.00605010986328125,
0.034515380859375,
-0.066650390625,
-0.007694244384765625,
-0.0191497802734375,
0.04559326171875,
0.02239990234375,
0.0225677490234375,
-0.0003838539123535156,
0.005168914794921875,
0.042205810546875,
0.01093292236328125,
0.0010509490966796875,
0.02606201171875,
0.016754150390625,
0.037750244140625,
0.0011320114135742188,
0.0283355712890625,
-0.037384033203125,
0.014892578125,
0.0274658203125,
0.035125732421875,
-0.02972412109375,
-0.016357421875,
0.01004791259765625,
-0.0109405517578125,
-0.02197265625,
-0.007144927978515625,
-0.034881591796875,
0.03240966796875,
0.042205810546875,
-0.0196075439453125,
-0.057586669921875,
-0.0009784698486328125,
0.0296783447265625,
-0.015838623046875,
-0.0293121337890625,
0.0379638671875,
-0.046600341796875,
-0.0221405029296875,
0.045196533203125,
0.006801605224609375,
0.011138916015625,
-0.03265380859375,
0.0665283203125,
-0.01922607421875,
0.000926971435546875,
0.0242462158203125,
0.0306396484375,
-0.0292510986328125,
-0.01934814453125,
-0.007843017578125,
-0.0477294921875,
-0.008331298828125,
0.019073486328125,
0.0528564453125,
-0.0265960693359375,
0.0298614501953125,
0.00899505615234375,
-0.026702880859375,
-0.0030345916748046875,
-0.03155517578125,
-0.016021728515625,
0.049713134765625,
-0.0343017578125,
0.03033447265625,
-0.00980377197265625,
-0.009307861328125,
-0.042999267578125,
-0.002960205078125,
0.051361083984375,
-0.032867431640625,
0.007350921630859375,
-0.0146331787109375,
-0.006801605224609375,
0.047882080078125,
-0.029449462890625,
0.0160369873046875,
-0.01506805419921875,
-0.0040740966796875,
0.03240966796875,
-0.06146240234375,
-0.03271484375,
-0.0017423629760742188,
0.026123046875,
-0.018310546875,
0.040679931640625,
-0.002643585205078125,
0.03692626953125,
-0.007579803466796875,
-0.054779052734375,
0.0262451171875,
0.006351470947265625,
0.0236358642578125,
0.0494384765625,
-0.0562744140625,
-0.035125732421875,
-0.0640869140625,
0.0499267578125,
0.033416748046875,
0.1146240234375,
-0.032379150390625,
0.03509521484375,
0.00460052490234375,
-0.00041484832763671875,
-0.005451202392578125,
-0.005146026611328125,
0.04241943359375,
-0.0019321441650390625,
-0.02154541015625,
-0.033843994140625,
-0.04412841796875,
-0.01055145263671875,
0.05340576171875,
-0.061553955078125,
0.0015392303466796875,
0.0087127685546875,
0.00997161865234375,
-0.041229248046875,
0.005340576171875,
-0.01421356201171875,
-0.0252227783203125,
-0.030426025390625,
-0.002674102783203125,
0.0306854248046875,
0.0282135009765625,
-0.022613525390625,
0.0192108154296875,
0.0285797119140625,
-0.0499267578125,
0.03143310546875,
-0.0144805908203125,
0.0595703125,
0.03778076171875,
0.00649261474609375,
-0.0384521484375,
-0.0279083251953125,
-0.020721435546875,
0.001514434814453125,
-0.00785064697265625,
0.0570068359375,
-0.043182373046875,
-0.0217132568359375,
0.01372528076171875,
0.016204833984375,
0.05755615234375,
-0.00904083251953125,
0.016876220703125,
-0.0005102157592773438,
0.009765625,
0.00897979736328125,
-0.063720703125,
-0.022247314453125,
-0.0389404296875,
-0.0063629150390625,
0.01458740234375,
-0.0170440673828125,
-0.02679443359375,
0.00730133056640625,
-0.00457000732421875,
0.0120849609375,
0.00959014892578125,
-0.053955078125,
0.0231170654296875,
0.004558563232421875,
0.033966064453125,
-0.0178680419921875,
-0.01058197021484375,
0.0057373046875,
0.0211944580078125,
-0.030914306640625,
0.002880096435546875,
-0.01340484619140625,
-0.0015478134155273438,
0.00765228271484375,
0.02850341796875,
0.0623779296875,
-0.01459503173828125,
0.005390167236328125,
0.0472412109375,
0.00685882568359375,
0.0977783203125,
-0.08441162109375,
-0.0294189453125,
-0.01099395751953125,
-0.01499176025390625,
-0.004608154296875,
0.01471710205078125,
0.007289886474609375,
-0.024200439453125,
-0.02606201171875,
0.00977325439453125,
-0.0301971435546875,
-0.0283203125,
-0.056549072265625,
-0.0875244140625,
0.0577392578125,
-0.013519287109375,
-0.04119873046875,
-0.04046630859375,
0.0006799697875976562,
0.0081634521484375,
-0.0241241455078125,
-0.0256805419921875,
-0.01262664794921875,
-0.0265655517578125,
0.034271240234375,
0.0229644775390625,
0.040283203125,
0.0328369140625,
0.01517486572265625,
-0.020599365234375,
0.01010894775390625,
-0.01560211181640625,
-0.006099700927734375,
-0.0404052734375,
0.0163421630859375,
0.01285552978515625,
0.06573486328125,
0.004039764404296875,
-0.01410675048828125,
0.0254058837890625,
-0.035614013671875,
-0.006420135498046875,
-0.0272216796875,
-0.03985595703125,
-0.01447296142578125,
0.04766845703125,
0.062042236328125,
0.00418853759765625,
-0.034881591796875,
-0.018035888671875,
0.0041961669921875,
-0.03863525390625,
0.00841522216796875,
0.03265380859375,
-0.039337158203125,
0.0163421630859375,
0.005283355712890625,
-0.005367279052734375,
-0.023773193359375,
-0.0307159423828125,
-0.0281219482421875,
-0.0138092041015625,
-0.03521728515625,
0.0086669921875,
0.00782012939453125,
0.00989532470703125,
0.04022216796875,
-0.02276611328125,
0.004467010498046875,
-0.0212554931640625,
0.01105499267578125,
0.0137176513671875,
-0.015106201171875,
0.028961181640625,
0.0723876953125,
-0.0433349609375,
-0.007320404052734375,
0.03704833984375,
0.027862548828125,
-0.00493621826171875,
0.0006694793701171875,
0.0038623809814453125,
-0.005695343017578125,
-0.0041656494140625,
-0.04559326171875,
-0.0229339599609375,
0.06640625,
-0.0259552001953125,
0.139892578125,
-0.0084228515625,
0.0748291015625,
0.006988525390625,
0.0266265869140625,
-0.03399658203125,
0.006618499755859375,
-0.006710052490234375,
-0.0333251953125,
-0.0206146240234375,
-0.00011783838272094727,
-0.032501220703125,
-0.0743408203125,
0.0281219482421875,
-0.0347900390625,
0.004970550537109375,
0.0293731689453125
] |
3ca8425e9b59c1707dbc523090c3ac6225e7d691
|
Wordpress Stackexchange
Q: Get only the first term by taxonomy Maybe it's a stupid question but I can't find the answer.
I have a custom taxonomy (directores) and each director is a term. Some times a film has more than one director. I need to print only the first director no all directors from one film.
Thanks!!!
A: how about use get_the_terms() function?
please try this code
$directores = get_the_terms( $post->ID, 'directores' );
$director = $directores[0];
// print object from first director
print_r($director);
// or get the director name
echo $director->name;
|
Q: Get only the first term by taxonomy Maybe it's a stupid question but I can't find the answer.
I have a custom taxonomy (directores) and each director is a term. Some times a film has more than one director. I need to print only the first director no all directors from one film.
Thanks!!!
A: how about use get_the_terms() function?
please try this code
$directores = get_the_terms( $post->ID, 'directores' );
$director = $directores[0];
// print object from first director
print_r($director);
// or get the director name
echo $director->name;
A: Finally I read the Wordpress doc Reference/get terms
$args = array('number' => '1',);
$terms = get_terms('director', $args );
foreach( $terms as $term ){
echo $term->name ;
}
A: use this code for access first texonomy from custom post type in wordpress
how about use get_the_terms() function?
please try this code
$works = get_the_terms( $post->ID, 'work' );
$director = $works[0];
// print object from first director
print_r($director);
// or get the director name
echo $director->name;
|
wordpress
|
{
"language": "en",
"length": 164,
"provenance": "stackexchange_00019.jsonl.gz:428770",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84802"
}
|
[
0.00017440319061279297,
-0.01549530029296875,
-0.0380859375,
-0.00302886962890625,
-0.022003173828125,
-0.037078857421875,
0.0207672119140625,
0.0030193328857421875,
-0.003173828125,
0.039764404296875,
-0.0345458984375,
0.005115509033203125,
-0.046356201171875,
-0.015960693359375,
-0.0262603759765625,
-0.047698974609375,
0.0158538818359375,
-0.01268768310546875,
0.012969970703125,
-0.0215606689453125,
0.019927978515625,
-0.006694793701171875,
0.0241546630859375,
0.0065765380859375,
0.01012420654296875,
0.002986907958984375,
0.03814697265625,
-0.03265380859375,
0.0011682510375976562,
-0.038238525390625,
0.00986480712890625,
0.0193328857421875,
0.00963592529296875,
-0.0133819580078125,
0.040618896484375,
-0.0213623046875,
-0.0008497238159179688,
0.0027637481689453125,
0.039215087890625,
-0.0341796875,
0.0090179443359375,
0.004974365234375,
-0.044921875,
0.02606201171875,
-0.031463623046875,
-0.044464111328125,
-0.002307891845703125,
-0.03143310546875,
0.0096588134765625,
-0.0131988525390625,
0.00574493408203125,
-0.0171051025390625,
0.02490234375,
-0.0038928985595703125,
-0.0138702392578125,
-0.002410888671875,
0.0086669921875,
-0.067626953125,
0.020599365234375,
-0.038299560546875,
-0.019256591796875,
-0.032012939453125,
0.0595703125,
0.032470703125,
-0.044097900390625,
0.0214080810546875,
-0.0418701171875,
0.01045989990234375,
0.0094146728515625,
-0.0675048828125,
-0.022064208984375,
-0.0101318359375,
0.01148223876953125,
0.01468658447265625,
-0.021697998046875,
-0.055419921875,
0.0137786865234375,
-0.039154052734375,
0.022003173828125,
0.0142822265625,
-0.0298004150390625,
-0.042755126953125,
-0.08935546875,
0.035552978515625,
-0.026458740234375,
0.058319091796875,
-0.01549530029296875,
-0.01184844970703125,
-0.036834716796875,
0.01149749755859375,
-0.0196990966796875,
0.023223876953125,
-0.01416778564453125,
-0.0241546630859375,
-0.019805908203125,
-0.0248870849609375,
0.0042877197265625,
0.062164306640625,
-0.05029296875,
-0.0225830078125,
-0.0628662109375,
0.01456451416015625,
-0.053924560546875,
-0.0248870849609375,
0.0428466796875,
0.008819580078125,
-0.0105133056640625,
-0.0609130859375,
0.0601806640625,
0.005329132080078125,
-0.004909515380859375,
0.11834716796875,
-0.0119171142578125,
-0.016693115234375,
-0.018768310546875,
0.022369384765625,
-0.025665283203125,
0.01190185546875,
0.01474761962890625,
0.0098419189453125,
0.006694793701171875,
0.04296875,
0.01520538330078125,
-0.04022216796875,
-0.017730712890625,
-0.0211639404296875,
-0.01444244384765625,
-0.035308837890625,
0.0215911865234375,
-0.003032684326171875,
-0.026336669921875,
0.0159149169921875,
0.02093505859375,
0.0222015380859375,
0.01474761962890625,
-0.0004639625549316406,
0.00539398193359375,
0.05389404296875,
0.037811279296875,
-0.01177978515625,
0.017730712890625,
-0.0026149749755859375,
0.043243408203125,
0.0260162353515625,
-0.053314208984375,
-0.0024013519287109375,
0.0176849365234375,
0.037689208984375,
-0.04345703125,
-0.0533447265625,
0.014251708984375,
-0.0005784034729003906,
0.0216827392578125,
0.0220947265625,
-0.021209716796875,
0.019866943359375,
0.034210205078125,
-0.01296234130859375,
-0.039825439453125,
-0.02337646484375,
0.0374755859375,
0.002117156982421875,
-0.0191497802734375,
0.032073974609375,
0.0110626220703125,
-0.01097869873046875,
-0.01203155517578125,
0.001811981201171875,
0.005031585693359375,
0.023101806640625,
0.00557708740234375,
0.027923583984375,
-0.0064697265625,
0.00005042552947998047,
-0.0013093948364257812,
-0.01512908935546875,
-0.021942138671875,
-0.033905029296875,
0.0245513916015625,
0.0367431640625,
0.007488250732421875,
-0.02764892578125,
-0.0196075439453125,
0.0166778564453125,
-0.026885986328125,
0.01306915283203125,
0.01023101806640625,
0.0357666015625,
0.004047393798828125,
0.0130615234375,
0.034912109375,
0.033660888671875,
-0.06982421875,
0.02447509765625,
0.004695892333984375,
0.027099609375,
-0.0237884521484375,
0.00826263427734375,
-0.006748199462890625,
-0.0206756591796875,
0.036346435546875,
-0.01367950439453125,
0.02777099609375,
-0.038970947265625,
-0.0177764892578125,
0.002681732177734375,
-0.005611419677734375,
0.0253143310546875,
-0.0290985107421875,
0.0287933349609375,
0.02557373046875,
-0.00806427001953125,
-0.041656494140625,
0.0196685791015625,
-0.010406494140625,
-0.027801513671875,
-0.01311492919921875,
0.04034423828125,
-0.0009474754333496094,
-0.01605224609375,
0.019287109375,
-0.03143310546875,
0.0462646484375,
0.035400390625,
0.0347900390625,
0.02154541015625,
-0.0175323486328125,
0.008453369140625,
0.063720703125,
0.0238189697265625,
0.025482177734375,
-0.01375579833984375,
-0.01058197021484375,
-0.00562286376953125,
-0.0205078125,
0.016937255859375,
0.0460205078125,
-0.001003265380859375,
0.00986480712890625,
0.0201568603515625,
0.047576904296875,
0.033233642578125,
-0.024444580078125,
-0.042694091796875,
0.061676025390625,
-0.058807373046875,
-0.0201263427734375,
-0.01702880859375,
0.03094482421875,
0.0469970703125,
-0.007801055908203125,
-0.0006351470947265625,
0.0173187255859375,
-0.02569580078125,
0.03997802734375,
0.023162841796875,
0.000072479248046875,
-0.0018091201782226562,
0.00435638427734375,
0.01198577880859375,
-0.0080108642578125,
-0.029083251953125,
-0.0178985595703125,
-0.01189422607421875,
0.003509521484375,
0.0313720703125,
-0.004436492919921875,
-0.0019216537475585938,
-0.07330322265625,
0.029571533203125,
0.04718017578125,
0.032196044921875,
-0.005443572998046875,
0.052337646484375,
0.046234130859375,
-0.0275421142578125,
0.00992584228515625,
-0.039886474609375,
-0.0237274169921875,
0.0061798095703125,
-0.0013475418090820312,
0.025848388671875,
-0.006744384765625,
-0.00986480712890625,
-0.0256500244140625,
-0.01568603515625,
0.0249176025390625,
0.03448486328125,
-0.04559326171875,
-0.0203704833984375,
0.0285491943359375,
0.0243072509765625,
-0.0240478515625,
0.002758026123046875,
-0.03729248046875,
0.00013768672943115234,
-0.038665771484375,
-0.021484375,
0.01483154296875,
-0.033172607421875,
-0.0222015380859375,
0.0389404296875,
0.0209503173828125,
-0.0369873046875,
-0.008056640625,
-0.0168609619140625,
-0.0005335807800292969,
0.01024627685546875,
-0.0160064697265625,
-0.024078369140625,
-0.0587158203125,
-0.04205322265625,
0.0023345947265625,
0.0802001953125,
-0.048553466796875,
-0.0423583984375,
-0.02008056640625,
0.01025390625,
-0.0345458984375,
-0.02008056640625,
0.0285491943359375,
-0.038482666015625,
0.004779815673828125,
-0.00312042236328125,
-0.0168609619140625,
-0.0155181884765625,
0.009185791015625,
-0.0042572021484375,
0.061920166015625,
-0.027008056640625,
-0.004581451416015625,
0.021087646484375,
-0.038543701171875,
0.01739501953125,
0.0186920166015625,
-0.00323486328125,
0.0116729736328125,
0.05181884765625,
0.032806396484375,
-0.037078857421875,
0.0537109375,
0.061676025390625,
-0.01122283935546875,
0.046112060546875,
0.0225067138671875,
0.0130462646484375,
-0.06298828125,
0.035614013671875,
-0.067626953125,
-0.022430419921875,
-0.00493621826171875,
-0.041473388671875,
-0.0017147064208984375,
0.0012102127075195312,
0.040374755859375,
0.035980224609375,
-0.02606201171875,
0.0282745361328125,
0.098876953125,
-0.0109405517578125,
0.01410675048828125,
0.007198333740234375,
0.0091552734375,
0.043182373046875,
-0.00302886962890625,
-0.041015625,
-0.0183258056640625,
0.024810791015625,
-0.025482177734375,
0.01261138916015625,
-0.049346923828125,
0.006893157958984375,
0.0212249755859375,
-0.00716400146484375,
-0.006412506103515625,
0.03607177734375,
0.040283203125,
-0.0166015625,
0.005931854248046875,
0.0163116455078125,
0.01476287841796875,
-0.00003600120544433594,
-0.0236968994140625,
-0.028594970703125,
-0.027984619140625,
0.0112152099609375,
-0.11279296875,
-0.018218994140625,
-0.05450439453125,
0.02001953125,
-0.022430419921875,
0.0426025390625,
-0.050506591796875,
-0.017608642578125,
0.02679443359375,
0.0223236083984375,
-0.0308990478515625,
-0.052337646484375,
-0.049896240234375,
-0.0243682861328125,
-0.0921630859375,
-0.00858306884765625,
-0.007049560546875,
-0.036285400390625,
0.004207611083984375,
0.01458740234375,
-0.0482177734375,
-0.031890869140625,
0.01000213623046875,
-0.0870361328125,
0.007770538330078125,
0.0033168792724609375,
0.0011444091796875,
-0.01120758056640625,
0.00054168701171875,
-0.0755615234375,
-0.019256591796875,
-0.00965118408203125,
0.0187530517578125,
0.0031890869140625,
-0.0298614501953125,
0.01158905029296875,
-0.019683837890625,
0.0291290283203125,
-0.0074920654296875,
0.008544921875,
0.007633209228515625,
0.0191802978515625,
0.016937255859375,
0.0220794677734375,
0.0019931793212890625,
-0.00913238525390625,
-0.032745361328125,
-0.04437255859375,
0.0089569091796875,
0.03558349609375,
-0.0137176513671875,
0.04986572265625,
-0.030548095703125,
0.0232086181640625,
-0.06903076171875,
-0.048004150390625,
-0.03826904296875,
-0.005420684814453125,
-0.0199127197265625,
-0.002735137939453125,
-0.060791015625,
-0.062225341796875,
0.032867431640625,
0.00890350341796875,
-0.01470184326171875,
-0.01222991943359375,
0.06939697265625,
0.0178070068359375,
-0.03839111328125,
-0.0047149658203125,
0.01062774658203125,
0.03680419921875,
-0.004467010498046875,
0.019378662109375,
0.005908966064453125,
-0.027618408203125,
0.06329345703125,
-0.0083160400390625,
0.0248870849609375,
0.0298309326171875,
0.025421142578125,
-0.00379180908203125,
-0.036224365234375,
0.03570556640625,
-0.0083160400390625,
-0.04595947265625,
-0.0391845703125,
-0.054443359375,
0.0300140380859375,
0.0029773712158203125,
0.01189422607421875,
-0.01541900634765625,
0.04754638671875,
-0.0155181884765625,
-0.0306854248046875,
0.00841522216796875,
0.041961669921875,
0.005123138427734375,
0.0423583984375,
-0.0076904296875,
0.010009765625,
0.004528045654296875,
0.0006108283996582031,
0.048614501953125,
0.042510986328125,
0.01251983642578125,
0.024688720703125,
0.0537109375,
-0.016845703125,
-0.0078277587890625,
-0.0048828125,
0.04156494140625,
-0.0179901123046875,
-0.059234619140625,
-0.00489044189453125,
-0.01544952392578125,
0.0213470458984375,
0.03436279296875,
-0.0252685546875,
0.0268707275390625,
0.023590087890625,
0.004253387451171875,
0.0038928985595703125,
-0.035003662109375,
-0.006954193115234375,
-0.0179595947265625,
0.019317626953125,
0.00750732421875,
-0.0096893310546875,
0.02752685546875,
0.04473876953125,
0.0166778564453125,
0.0301055908203125,
-0.0306396484375,
-0.0113067626953125,
-0.058441162109375,
0.042236328125,
0.03216552734375,
-0.01190948486328125,
-0.00016045570373535156,
0.0262603759765625,
0.0225067138671875,
-0.0233306884765625,
-0.0012788772583007812,
0.0166015625,
0.01580810546875,
-0.023284912109375,
-0.0289154052734375,
0.03302001953125,
-0.0159454345703125,
-0.01019287109375,
0.0037212371826171875,
0.0206298828125,
0.0175628662109375,
-0.0236053466796875,
-0.0199432373046875,
0.0265655517578125,
0.01204681396484375,
-0.0215911865234375,
0.06817626953125,
-0.0077972412109375,
0.04364013671875,
-0.0236663818359375,
-0.0025577545166015625,
-0.01424407958984375,
0.01270294189453125,
-0.03912353515625,
-0.02020263671875,
0.0204925537109375,
-0.034515380859375,
-0.019378662109375,
-0.00751495361328125,
-0.0211944580078125,
0.0160064697265625,
-0.0273895263671875,
0.049896240234375,
-0.027435302734375,
-0.0290679931640625,
-0.029449462890625,
0.00984954833984375,
0.041259765625,
0.0350341796875,
-0.044036865234375,
0.0274200439453125,
-0.05413818359375,
0.018951416015625,
-0.017852783203125,
-0.0648193359375,
-0.004550933837890625,
-0.0198822021484375,
-0.04034423828125,
-0.002105712890625,
0.03765869140625,
0.08111572265625,
0.0240020751953125,
0.037567138671875,
-0.047607421875,
-0.0132598876953125,
-0.002162933349609375,
0.04150390625,
-0.0007586479187011719,
0.0254669189453125,
0.006641387939453125,
0.01061248779296875,
-0.0284881591796875,
-0.0026302337646484375,
-0.025726318359375,
-0.0804443359375,
0.006237030029296875,
0.00472259521484375,
-0.00916290283203125,
0.0401611328125,
0.0157318115234375,
0.0208892822265625,
0.0154266357421875,
0.0074005126953125,
0.0058746337890625,
0.005367279052734375,
-0.052642822265625,
0.04803466796875,
-0.00518798828125,
0.036407470703125,
-0.0267791748046875,
0.06298828125,
-0.000007927417755126953,
-0.01959228515625,
0.031494140625,
-0.032867431640625,
0.04547119140625,
0.03424072265625,
0.0390625,
-0.0496826171875,
-0.051605224609375,
-0.00252532958984375,
0.0239105224609375,
0.0153656005859375,
0.06121826171875,
0.01071929931640625,
-0.02734375,
-0.0169525146484375,
-0.01116943359375,
0.01111602783203125,
-0.0191192626953125,
0.0194549560546875,
0.02001953125,
-0.011077880859375,
-0.02215576171875,
-0.06591796875,
-0.01126861572265625,
0.05291748046875,
0.0114288330078125,
0.006252288818359375,
-0.00991058349609375,
0.00841522216796875,
0.0024566650390625,
-0.007511138916015625,
-0.02783203125,
0.005580902099609375,
0.0181884765625,
-0.0147247314453125,
0.0104217529296875,
0.01126861572265625,
0.0005044937133789062,
-0.0186309814453125,
0.0272369384765625,
0.0203399658203125,
-0.0015611648559570312,
-0.01178741455078125,
0.014373779296875,
-0.0013427734375,
-0.001804351806640625,
0.018707275390625,
-0.0028362274169921875,
0.0023288726806640625,
-0.035430908203125,
0.0184783935546875,
-0.02001953125,
-0.01430511474609375,
0.01380157470703125,
0.0189666748046875,
0.0079193115234375,
0.0192718505859375,
0.00530242919921875,
-0.01450347900390625,
0.00540924072265625,
-0.06640625,
-0.01055908203125,
-0.042083740234375,
0.0010814666748046875,
0.059356689453125,
-0.045257568359375,
0.033233642578125,
0.0190887451171875,
-0.01036834716796875,
-0.0274200439453125,
-0.08624267578125,
0.03900146484375,
-0.0290374755859375,
0.004669189453125,
0.00913238525390625,
0.051361083984375,
-0.005519866943359375,
-0.007122039794921875,
0.0201263427734375,
-0.052337646484375,
-0.01294708251953125,
0.0159759521484375,
-0.0221710205078125,
-0.0034580230712890625,
0.00716400146484375,
-0.06683349609375,
0.066650390625,
0.0188140869140625,
0.0271148681640625,
-0.0038814544677734375,
0.01904296875,
-0.00433349609375,
0.01800537109375,
-0.0352783203125,
0.0260009765625,
0.035797119140625,
0.038421630859375,
-0.025390625,
-0.01448822021484375,
0.00589752197265625,
0.040679931640625,
0.06878662109375,
0.0002999305725097656,
0.01806640625,
0.0034160614013671875,
0.0775146484375,
0.044769287109375,
-0.0291748046875,
-0.0032825469970703125,
0.0423583984375,
0.0265350341796875,
0.042999267578125,
0.027587890625,
0.05322265625,
-0.0439453125,
-0.01337432861328125,
0.0465087890625,
0.01467132568359375,
0.0175323486328125,
0.0115203857421875,
-0.03021240234375,
-0.024658203125,
-0.0013074874877929688,
0.013458251953125,
0.01537322998046875,
-0.002532958984375,
0.040313720703125,
0.040374755859375,
-0.01149749755859375,
0.031707763671875,
-0.03277587890625,
0.05419921875,
0.01512908935546875,
0.0173797607421875,
0.07794189453125,
0.012115478515625,
0.047271728515625,
0.021148681640625,
0.0251312255859375,
-0.007511138916015625,
0.0311737060546875,
0.002147674560546875,
-0.025238037109375,
-0.002193450927734375,
-0.06951904296875,
-0.00370025634765625,
0.012542724609375,
0.0254669189453125,
-0.039154052734375,
-0.0406494140625,
0.01131439208984375,
0.0162811279296875,
-0.0016307830810546875,
0.04046630859375,
0.0235443115234375,
0.12890625,
0.131591796875,
-0.0841064453125,
0.01983642578125,
0.034271240234375,
0.0565185546875,
-0.021820068359375,
-0.0640869140625,
-0.050384521484375,
-0.031646728515625,
-0.02166748046875,
0.0037937164306640625,
0.022735595703125,
0.034881591796875,
0.00916290283203125,
0.035247802734375,
-0.023529052734375,
-0.0114898681640625,
-0.001018524169921875,
0.032135009765625,
-0.01245880126953125,
-0.00026106834411621094,
-0.0025768280029296875,
-0.0022678375244140625,
-0.035980224609375,
-0.003086090087890625,
0.0303802490234375,
-0.0343017578125,
-0.0033931732177734375,
0.0019140243530273438,
0.00646209716796875,
-0.0006113052368164062,
0.04876708984375,
-0.0106048583984375,
-0.00974273681640625,
-0.0252838134765625,
0.007556915283203125,
0.0237884521484375,
0.004863739013671875,
0.0020503997802734375,
0.04266357421875,
0.023834228515625,
-0.02850341796875,
0.0692138671875,
-0.0087127685546875,
-0.007633209228515625,
0.0196380615234375,
0.0226287841796875,
0.07379150390625,
0.0203857421875,
-0.0291748046875,
0.03179931640625,
-0.04888916015625,
-0.035552978515625,
0.0125885009765625,
0.016571044921875,
-0.023895263671875,
0.051483154296875,
0.0224761962890625,
0.0124969482421875,
-0.0128173828125,
0.00673675537109375,
0.01187896728515625,
-0.01369476318359375,
0.01947021484375,
0.0091400146484375,
-0.01397705078125,
0.017822265625,
0.016754150390625,
-0.010955810546875,
0.0147247314453125,
0.0296630859375,
0.012786865234375,
0.01171875,
-0.02471923828125,
0.043060302734375,
-0.058380126953125,
-0.04058837890625,
0.0692138671875,
-0.01548004150390625,
-0.00982666015625,
-0.0025043487548828125,
-0.05615234375,
-0.0054473876953125,
0.06256103515625,
-0.03460693359375,
0.03619384765625,
-0.004695892333984375,
0.0109405517578125,
-0.076171875,
0.08026123046875,
0.0031299591064453125,
-0.0283660888671875,
-0.036834716796875,
-0.0295562744140625,
0.059417724609375,
0.10760498046875,
0.03924560546875,
0.0029735565185546875,
0.01462554931640625,
-0.051422119140625,
0.03204345703125,
-0.026519775390625,
0.01274871826171875,
0.0254974365234375,
0.0261993408203125,
0.0207977294921875,
-0.00548553466796875,
-0.015869140625,
-0.0019397735595703125,
0.0158233642578125,
-0.0243988037109375,
0.00843048095703125,
-0.0156402587890625,
-0.039276123046875,
-0.0209808349609375,
0.044342041015625,
0.017822265625,
0.0183563232421875,
-0.039154052734375,
-0.00635528564453125,
-0.0401611328125,
-0.055572509765625,
-0.0301055908203125,
-0.0104522705078125,
-0.0103759765625,
0.01409912109375,
0.0166473388671875,
-0.05194091796875,
-0.00949859619140625,
-0.004741668701171875,
0.037384033203125,
0.02752685546875,
-0.0333251953125,
0.0270538330078125,
-0.03265380859375,
-0.0182647705078125,
0.029815673828125,
-0.0278472900390625,
0.0309295654296875,
0.042144775390625,
-0.037384033203125,
-0.033599853515625,
-0.0034465789794921875,
0.00861358642578125,
-0.0316162109375,
-0.0080108642578125,
-0.0081024169921875,
0.01050567626953125,
0.021392822265625,
0.028900146484375,
-0.0101776123046875,
0.06591796875,
-0.01435089111328125,
-0.0379638671875,
-0.024871826171875,
0.006046295166015625,
-0.01483154296875,
0.00557708740234375,
0.041595458984375,
-0.049072265625,
-0.04486083984375,
0.01148223876953125,
-0.00418853759765625,
0.0109405517578125,
-0.0301513671875,
-0.038177490234375,
0.0850830078125,
-0.003322601318359375,
-0.020050048828125,
-0.033111572265625,
-0.006053924560546875,
-0.030670166015625,
0.017303466796875,
0.003448486328125,
-0.03997802734375,
0.0180816650390625,
0.0548095703125,
0.01139068603515625,
0.034088134765625,
0.033538818359375,
0.01166534423828125,
-0.016815185546875,
0.00925445556640625,
-0.028289794921875,
-0.0022983551025390625,
0.01824951171875,
-0.014678955078125,
0.0225982666015625,
0.0083465576171875,
-0.041229248046875,
-0.014251708984375,
0.0037403106689453125,
-0.01227569580078125,
0.00391387939453125,
-0.0347900390625,
-0.03729248046875,
-0.0223388671875,
0.056915283203125,
0.044891357421875,
0.0167999267578125,
-0.025970458984375,
-0.036773681640625,
0.011444091796875,
-0.04180908203125,
0.009002685546875,
0.0394287109375,
-0.0850830078125,
-0.01406097412109375,
0.0126953125,
-0.011322021484375,
0.0187530517578125,
-0.011871337890625,
-0.040374755859375,
-0.00914764404296875,
-0.05377197265625,
0.006771087646484375,
-0.0693359375,
0.0843505859375,
-0.0038890838623046875,
-0.0305023193359375,
-0.036712646484375,
-0.01459503173828125,
-0.0286407470703125,
-0.031707763671875,
-0.03533935546875,
-0.035400390625,
-0.004791259765625,
0.023193359375,
0.00893402099609375,
0.014617919921875,
0.0177764892578125,
0.0341796875,
0.012054443359375,
-0.0149688720703125,
0.01326751708984375,
0.013671875,
-0.007472991943359375,
-0.03619384765625,
-0.00032067298889160156,
0.008209228515625,
0.0232391357421875,
-0.0318603515625,
0.030426025390625,
-0.016845703125,
0.026458740234375,
-0.025360107421875,
-0.005695343017578125,
0.0164337158203125,
-0.01392364501953125,
-0.00537872314453125,
0.0213623046875,
-0.01345062255859375,
-0.018768310546875,
-0.0005121231079101562,
0.0007739067077636719,
-0.0023784637451171875,
-0.005924224853515625
] |
67b393919807d1b125df0bd2a4c5fe9092ead807
|
Wordpress Stackexchange
Q: How to add subscript and superscript in WordPress page titles It is possible to add subscript and superscript in a WordPress page title? I need to add pages with "H2O" in the title.
I have been searching, but cannot find anything with answers... only a few non-answered threads on wordpress.org forums.
A: You can use markup in titles. H<sub>2</sub>O will work just fine. I would use H₂O with a real ₂ because markup will be stripped in title attributes and in feeds.
Note that WordPress will not create a pretty permalink for the correct character. The slug for my example will look like this: h2o-h%e2%82%82o.
You need my plugin Germanix URL to get h2o for both variants.
|
Q: How to add subscript and superscript in WordPress page titles It is possible to add subscript and superscript in a WordPress page title? I need to add pages with "H2O" in the title.
I have been searching, but cannot find anything with answers... only a few non-answered threads on wordpress.org forums.
A: You can use markup in titles. H<sub>2</sub>O will work just fine. I would use H₂O with a real ₂ because markup will be stripped in title attributes and in feeds.
Note that WordPress will not create a pretty permalink for the correct character. The slug for my example will look like this: h2o-h%e2%82%82o.
You need my plugin Germanix URL to get h2o for both variants.
|
wordpress
|
{
"language": "en",
"length": 118,
"provenance": "stackexchange_00019.jsonl.gz:428781",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84846"
}
|
[
0.0010700225830078125,
0.00031638145446777344,
-0.0294342041015625,
-0.007625579833984375,
-0.00701904296875,
-0.0200347900390625,
0.020660400390625,
-0.0257568359375,
-0.0238800048828125,
0.0036754608154296875,
0.0007114410400390625,
0.0191497802734375,
0.001216888427734375,
-0.0306243896484375,
0.040496826171875,
-0.0221405029296875,
0.01314544677734375,
-0.0189971923828125,
-0.0012035369873046875,
0.0038814544677734375,
0.01461029052734375,
0.00687408447265625,
-0.0109405517578125,
0.003337860107421875,
0.0037975311279296875,
-0.044952392578125,
0.116455078125,
-0.0244293212890625,
-0.003173828125,
-0.041839599609375,
0.0232696533203125,
0.007427215576171875,
0.0160675048828125,
0.0063018798828125,
0.01543426513671875,
0.041168212890625,
0.00968170166015625,
-0.0012416839599609375,
0.0257568359375,
0.00942230224609375,
0.02716064453125,
0.0015821456909179688,
0.0322265625,
0.0308074951171875,
0.0025787353515625,
-0.04827880859375,
0.04931640625,
-0.026763916015625,
0.016357421875,
-0.02288818359375,
0.00179290771484375,
-0.00644683837890625,
0.01393890380859375,
-0.01438140869140625,
-0.012451171875,
-0.0092926025390625,
0.003955841064453125,
0.0258026123046875,
0.0316162109375,
-0.032501220703125,
-0.0257720947265625,
0.003101348876953125,
0.020538330078125,
0.0032806396484375,
-0.01122283935546875,
0.00505828857421875,
0.0225830078125,
-0.0007333755493164062,
-0.01995849609375,
-0.01611328125,
0.013641357421875,
-0.0136260986328125,
0.01541900634765625,
-0.03497314453125,
0.0279083251953125,
-0.01181793212890625,
0.0025539398193359375,
-0.00424957275390625,
0.0034923553466796875,
0.025848388671875,
0.057220458984375,
0.0030498504638671875,
-0.00122833251953125,
0.010528564453125,
0.0297088623046875,
0.032012939453125,
0.01274871826171875,
-0.042144775390625,
-0.051544189453125,
-0.038665771484375,
-0.040618896484375,
-0.0205535888671875,
-0.0237884521484375,
-0.025787353515625,
-0.038726806640625,
-0.00720977783203125,
0.006946563720703125,
0.026031494140625,
0.0305328369140625,
0.08917236328125,
0.01708984375,
-0.05224609375,
0.11309814453125,
-0.072509765625,
0.00040268898010253906,
0.05419921875,
-0.0291595458984375,
0.062255859375,
0.044097900390625,
0.0270233154296875,
0.01551055908203125,
-0.034881591796875,
0.055084228515625,
-0.0194854736328125,
-0.0194244384765625,
0.0205230712890625,
0.035003662109375,
0.0144500732421875,
0.0187225341796875,
0.0016355514526367188,
0.03369140625,
0.05303955078125,
0.0220489501953125,
-0.058868408203125,
0.0130462646484375,
0.014923095703125,
-0.028350830078125,
-0.06280517578125,
-0.05511474609375,
0.035858154296875,
-0.016204833984375,
0.01317596435546875,
0.065673828125,
0.041351318359375,
-0.01250457763671875,
-0.032196044921875,
0.013519287109375,
-0.05316162109375,
-0.028076171875,
0.01354217529296875,
0.00809478759765625,
-0.0142822265625,
0.015167236328125,
-0.0223846435546875,
-0.0194244384765625,
0.0082244873046875,
-0.0092620849609375,
0.0267791748046875,
0.022186279296875,
-0.05706787109375,
0.0265045166015625,
-0.052764892578125,
0.054595947265625,
-0.003818511962890625,
-0.0860595703125,
-0.0298919677734375,
-0.0251922607421875,
-0.0264434814453125,
-0.005222320556640625,
-0.046356201171875,
-0.0131683349609375,
-0.0042724609375,
0.0233154296875,
0.01030731201171875,
0.0263824462890625,
0.004756927490234375,
-0.01171875,
0.0212249755859375,
0.01529693603515625,
0.048553466796875,
0.01071929931640625,
0.0031375885009765625,
-0.0280303955078125,
-0.0273284912109375,
-0.0211639404296875,
-0.0400390625,
-0.0140228271484375,
0.0184326171875,
0.01397705078125,
0.0545654296875,
0.0157928466796875,
-0.021636962890625,
0.035919189453125,
0.00399017333984375,
-0.03057861328125,
-0.0193939208984375,
-0.01220703125,
0.0166168212890625,
0.039794921875,
0.0108642578125,
0.00736236572265625,
-0.01155853271484375,
-0.04962158203125,
0.00453948974609375,
0.036163330078125,
-0.0211181640625,
-0.01258087158203125,
-0.031524658203125,
0.00878143310546875,
-0.0022525787353515625,
-0.06427001953125,
0.03076171875,
-0.0207977294921875,
0.0517578125,
0.00860595703125,
0.0081787109375,
-0.002979278564453125,
0.026885986328125,
0.017822265625,
-0.00890350341796875,
-0.018524169921875,
-0.034881591796875,
0.034637451171875,
-0.0850830078125,
-0.04132080078125,
0.02166748046875,
0.0013952255249023438,
0.017578125,
-0.0015439987182617188,
0.0004475116729736328,
0.022125244140625,
-0.020294189453125,
0.0150299072265625,
0.030120849609375,
0.054107666015625,
-0.022003173828125,
-0.0174560546875,
-0.029815673828125,
0.0279083251953125,
-0.01399993896484375,
-0.055267333984375,
0.0670166015625,
0.071044921875,
0.054412841796875,
-0.047637939453125,
0.005962371826171875,
-0.0374755859375,
-0.0260467529296875,
-0.0220184326171875,
0.0478515625,
0.0301055908203125,
0.0679931640625,
0.02752685546875,
0.0239410400390625,
0.043914794921875,
-0.037994384765625,
0.033599853515625,
-0.027008056640625,
-0.006954193115234375,
0.03497314453125,
-0.017913818359375,
0.018890380859375,
0.01367950439453125,
-0.025390625,
-0.0113525390625,
0.0406494140625,
-0.0226593017578125,
-0.0008745193481445312,
0.0023021697998046875,
-0.0250396728515625,
0.0280914306640625,
0.0102996826171875,
-0.0389404296875,
-0.0046539306640625,
0.024261474609375,
0.048309326171875,
0.033538818359375,
0.047149658203125,
-0.013702392578125,
0.036468505859375,
-0.00026154518127441406,
-0.0323486328125,
0.0009465217590332031,
0.01428985595703125,
0.005764007568359375,
0.006244659423828125,
-0.036651611328125,
0.0063629150390625,
0.00771331787109375,
-0.010528564453125,
-0.00887298583984375,
0.0040130615234375,
-0.0189666748046875,
-0.01593017578125,
0.00649261474609375,
-0.06707763671875,
-0.0003814697265625,
-0.0005660057067871094,
0.037384033203125,
-0.0040740966796875,
0.0132598876953125,
0.01210784912109375,
-0.0199432373046875,
0.043548583984375,
0.0665283203125,
-0.0394287109375,
0.0880126953125,
-0.05108642578125,
0.050048828125,
-0.041900634765625,
0.1048583984375,
0.05987548828125,
-0.041259765625,
0.0153350830078125,
0.01096343994140625,
-0.01087188720703125,
-0.0223236083984375,
0.049163818359375,
0.01232147216796875,
-0.0262603759765625,
-0.039581298828125,
0.0054779052734375,
0.0032196044921875,
0.0223846435546875,
-0.036376953125,
-0.042022705078125,
-0.0187530517578125,
0.0024509429931640625,
-0.07159423828125,
-0.0634765625,
0.05908203125,
-0.0095977783203125,
-0.00199127197265625,
0.0180511474609375,
0.0016679763793945312,
-0.0264434814453125,
0.0343017578125,
-0.0256805419921875,
-0.0281982421875,
-0.01467132568359375,
-0.02899169921875,
-0.06646728515625,
-0.045074462890625,
-0.03863525390625,
-0.011016845703125,
-0.0066375732421875,
0.004352569580078125,
-0.0214691162109375,
-0.01320648193359375,
-0.01666259765625,
-0.0007486343383789062,
0.08599853515625,
0.00612640380859375,
-0.049530029296875,
-0.0025501251220703125,
-0.060791015625,
-0.00949859619140625,
-0.0139007568359375,
-0.02508544921875,
-0.003955841064453125,
0.029083251953125,
0.0255126953125,
-0.04180908203125,
0.02728271484375,
-0.0178680419921875,
0.02581787109375,
0.05291748046875,
0.037872314453125,
0.01131439208984375,
-0.0260009765625,
-0.0267333984375,
0.0152435302734375,
-0.0137939453125,
-0.0183563232421875,
0.0138092041015625,
-0.0197296142578125,
-0.0322265625,
0.022705078125,
-0.0014820098876953125,
0.00844573974609375,
-0.0010805130004882812,
-0.0031566619873046875,
-0.05816650390625,
-0.007415771484375,
-0.00572967529296875,
0.0078277587890625,
0.00487518310546875,
-0.0172119140625,
0.061553955078125,
0.02252197265625,
-0.0029926300048828125,
-0.016845703125,
0.04156494140625,
-0.0253753662109375,
0.005977630615234375,
-0.0201263427734375,
-0.111328125,
0.036407470703125,
-0.0265350341796875,
0.0284881591796875,
-0.0164031982421875,
0.03436279296875,
0.0114898681640625,
-0.03564453125,
-0.00421142578125,
0.0281524658203125,
-0.042877197265625,
-0.055023193359375,
-0.0015001296997070312,
-0.0291595458984375,
-0.06292724609375,
0.01788330078125,
-0.0222625732421875,
-0.01392364501953125,
-0.0254058837890625,
-0.0254364013671875,
-0.0208282470703125,
-0.039794921875,
0.01493072509765625,
-0.028839111328125,
-0.03729248046875,
0.080078125,
-0.0704345703125,
0.054962158203125,
-0.049591064453125,
-0.0181884765625,
-0.054046630859375,
-0.01007843017578125,
0.00481414794921875,
0.046417236328125,
-0.01611328125,
-0.0302581787109375,
-0.0105133056640625,
0.03863525390625,
-0.0170440673828125,
0.042236328125,
-0.005664825439453125,
0.0015354156494140625,
-0.0030517578125,
0.040313720703125,
0.0166778564453125,
-0.0025730133056640625,
-0.006740570068359375,
-0.0161590576171875,
-0.01100921630859375,
0.05462646484375,
-0.0179290771484375,
0.039764404296875,
-0.01776123046875,
-0.0019741058349609375,
0.0118560791015625,
-0.027191162109375,
-0.0034160614013671875,
0.0193939208984375,
0.0030803680419921875,
-0.01056671142578125,
-0.034149169921875,
0.01100921630859375,
0.036651611328125,
0.031463623046875,
0.01277923583984375,
-0.0045013427734375,
0.023468017578125,
0.0005588531494140625,
-0.0478515625,
-0.00916290283203125,
0.025634765625,
0.0171661376953125,
-0.048187255859375,
0.039642333984375,
0.0135650634765625,
-0.00557708740234375,
0.039215087890625,
-0.03765869140625,
-0.0016689300537109375,
-0.033721923828125,
0.01099395751953125,
-0.0009050369262695312,
-0.0335693359375,
0.0237579345703125,
-0.00452423095703125,
0.05938720703125,
0.0165863037109375,
-0.01125335693359375,
-0.007007598876953125,
-0.03466796875,
0.019287109375,
0.007694244384765625,
0.01519775390625,
-0.023193359375,
-0.0277252197265625,
0.0040130615234375,
0.01177978515625,
0.01355743408203125,
-0.005138397216796875,
0.0175933837890625,
-0.0208282470703125,
-0.0087738037109375,
-0.0025005340576171875,
0.00470733642578125,
0.0011138916015625,
-0.0165557861328125,
0.03240966796875,
-0.028564453125,
-0.02923583984375,
0.016937255859375,
-0.0161895751953125,
0.06591796875,
0.021087646484375,
-0.03521728515625,
-0.0019073486328125,
-0.01494598388671875,
0.02239990234375,
0.0009207725524902344,
0.020904541015625,
-0.01503753662109375,
0.023651123046875,
-0.000032067298889160156,
0.0098724365234375,
0.0303192138671875,
0.0308837890625,
-0.0173492431640625,
0.01488494873046875,
0.00426483154296875,
-0.005458831787109375,
-0.00304412841796875,
0.0927734375,
0.0428466796875,
0.036590576171875,
-0.039031982421875,
0.0030040740966796875,
0.02789306640625,
0.01155853271484375,
0.0030307769775390625,
0.0179290771484375,
-0.0194091796875,
0.0263519287109375,
0.036651611328125,
0.0025424957275390625,
0.0155181884765625,
0.0118408203125,
0.0237579345703125,
0.01026153564453125,
-0.007144927978515625,
-0.0108489990234375,
-0.048980712890625,
0.0032444000244140625,
-0.004482269287109375,
-0.0273590087890625,
-0.0074615478515625,
-0.0027217864990234375,
-0.026123046875,
0.007747650146484375,
-0.00617218017578125,
0.00695037841796875,
-0.0135345458984375,
-0.02581787109375,
0.032073974609375,
-0.0284881591796875,
0.044952392578125,
-0.029266357421875,
-0.052154541015625,
-0.01319122314453125,
0.0177459716796875,
0.01140594482421875,
-0.064453125,
-0.052581787109375,
-0.0106048583984375,
-0.0212249755859375,
0.0740966796875,
-0.027130126953125,
0.05072021484375,
-0.01390838623046875,
-0.034820556640625,
0.0248870849609375,
0.0164642333984375,
0.037750244140625,
0.0298614501953125,
-0.016998291015625,
0.0039005279541015625,
-0.036956787109375,
-0.019989013671875,
-0.00846099853515625,
-0.044281005859375,
-0.0214691162109375,
-0.0214691162109375,
-0.0075836181640625,
0.0226593017578125,
-0.0390625,
-0.05078125,
-0.035858154296875,
0.034576416015625,
0.045440673828125,
0.06988525390625,
-0.033721923828125,
0.02618408203125,
0.03936767578125,
-0.0236968994140625,
-0.01270294189453125,
0.051055908203125,
0.07110595703125,
-0.0218048095703125,
0.0224609375,
-0.00362396240234375,
-0.0095977783203125,
-0.0208892822265625,
0.0229034423828125,
-0.0150909423828125,
0.01261138916015625,
-0.01276397705078125,
0.04449462890625,
-0.00029206275939941406,
0.0265045166015625,
-0.002399444580078125,
-0.062469482421875,
-0.0159149169921875,
-0.029693603515625,
0.043731689453125,
-0.032379150390625,
0.032684326171875,
0.0010395050048828125,
0.01502227783203125,
-0.006099700927734375,
-0.031768798828125,
0.006988525390625,
0.034515380859375,
-0.007781982421875,
-0.0008521080017089844,
-0.00493621826171875,
0.030670166015625,
0.0113677978515625,
0.00803375244140625,
0.025970458984375,
-0.045166015625,
0.007778167724609375,
-0.0280914306640625,
0.009674072265625,
-0.00922393798828125,
-0.01605224609375,
-0.0017271041870117188,
-0.0276336669921875,
-0.0028705596923828125,
-0.005359649658203125,
0.07586669921875,
0.02227783203125,
-0.07855224609375,
-0.011810302734375,
-0.02874755859375,
-0.0063018798828125,
0.032470703125,
0.0061798095703125,
0.0138092041015625,
-0.008758544921875,
0.00984954833984375,
0.0164337158203125,
-0.00795745849609375,
0.017242431640625,
0.0091400146484375,
-0.0091705322265625,
-0.014434814453125,
0.06390380859375,
0.03289794921875,
0.0260009765625,
-0.021270751953125,
-0.0120086669921875,
0.0053558349609375,
-0.03436279296875,
-0.004138946533203125,
0.01320648193359375,
-0.0350341796875,
-0.057098388671875,
0.008209228515625,
-0.0091552734375,
0.005542755126953125,
-0.00807952880859375,
0.051361083984375,
0.023162841796875,
0.063232421875,
-0.0108795166015625,
0.003490447998046875,
0.034027099609375,
-0.0082550048828125,
0.058929443359375,
-0.0013952255249023438,
0.0105438232421875,
-0.0201568603515625,
-0.07305908203125,
-0.0125274658203125,
-0.05206298828125,
0.0226593017578125,
-0.00464630126953125,
-0.00885009765625,
0.0498046875,
-0.0124969482421875,
-0.029541015625,
0.0273895263671875,
-0.01629638671875,
-0.00859832763671875,
0.006496429443359375,
0.016387939453125,
-0.032928466796875,
-0.018463134765625,
0.0160675048828125,
-0.032989501953125,
0.0013828277587890625,
0.017120361328125,
-0.0404052734375,
0.05877685546875,
0.005825042724609375,
-0.00848388671875,
-0.0098419189453125,
0.03155517578125,
-0.0189666748046875,
0.0116729736328125,
-0.0225067138671875,
0.028533935546875,
-0.0305938720703125,
0.021392822265625,
-0.0423583984375,
-0.007564544677734375,
0.007022857666015625,
0.033966064453125,
-0.0171661376953125,
-0.015167236328125,
-0.0168609619140625,
-0.0015344619750976562,
0.0670166015625,
0.0750732421875,
0.053466796875,
0.0010089874267578125,
0.0015735626220703125,
-0.032318115234375,
-0.0308685302734375,
0.031707763671875,
0.03118896484375,
-0.052978515625,
-0.055206298828125,
0.024871826171875,
0.00824737548828125,
-0.01042938232421875,
0.0020465850830078125,
-0.017303466796875,
-0.0479736328125,
0.01325225830078125,
0.0202789306640625,
0.02203369140625,
0.0300445556640625,
0.014129638671875,
-0.005588531494140625,
0.023193359375,
-0.01042938232421875,
-0.00992584228515625,
0.026458740234375,
-0.009368896484375,
-0.00537872314453125,
0.015838623046875,
0.020263671875,
-0.007343292236328125,
-0.00042891502380371094,
-0.01200103759765625,
0.0234832763671875,
-0.006427764892578125,
0.0135498046875,
0.01322174072265625,
0.026519775390625,
-0.0240631103515625,
0.01381683349609375,
0.05950927734375,
0.03466796875,
-0.031219482421875,
0.005893707275390625,
0.016876220703125,
0.007152557373046875,
-0.004917144775390625,
-0.034332275390625,
0.0013875961303710938,
-0.00957489013671875,
-0.003940582275390625,
0.032867431640625,
-0.0135040283203125,
0.0184478759765625,
-0.00682830810546875,
0.032135009765625,
0.05889892578125,
-0.0170440673828125,
0.023223876953125,
-0.04736328125,
0.00274658203125,
0.00815582275390625,
0.09918212890625,
0.04644775390625,
0.051361083984375,
-0.048431396484375,
-0.0552978515625,
-0.01806640625,
0.01221466064453125,
0.033966064453125,
-0.0054931640625,
-0.00560760498046875,
0.00438690185546875,
0.0303802490234375,
0.007671356201171875,
0.03533935546875,
0.015106201171875,
0.06915283203125,
0.07220458984375,
-0.031646728515625,
-0.01009368896484375,
0.0318603515625,
-0.01010894775390625,
0.0267181396484375,
-0.0168609619140625,
0.062042236328125,
0.060150146484375,
0.0009055137634277344,
-0.0267486572265625,
0.01593017578125,
0.08062744140625,
-0.018341064453125,
0.02081298828125,
0.00356292724609375,
-0.00267791748046875,
0.06829833984375,
0.02593994140625,
0.044647216796875,
0.0244293212890625,
-0.0968017578125,
-0.004390716552734375,
-0.0274505615234375,
-0.07635498046875,
0.046600341796875,
0.054595947265625,
-0.03192138671875,
-0.0106964111328125,
0.052276611328125,
-0.026885986328125,
0.002155303955078125,
0.03253173828125,
0.031646728515625,
0.02899169921875,
0.027740478515625,
0.032928466796875,
-0.0206756591796875,
0.0145111083984375,
0.0288238525390625,
0.007106781005859375,
0.010711669921875,
-0.00846099853515625,
0.0212860107421875,
0.01169586181640625,
0.01137542724609375,
-0.0010786056518554688,
-0.01229095458984375,
0.006923675537109375,
0.01273345947265625,
-0.01529693603515625,
0.00001817941665649414,
-0.003940582275390625,
-0.02520751953125,
0.048004150390625,
0.0008296966552734375,
0.0023040771484375,
0.040283203125,
-0.024627685546875,
0.0035991668701171875,
-0.015380859375,
0.0079498291015625,
-0.016754150390625,
-0.03302001953125,
-0.018524169921875,
0.0028629302978515625,
0.01441192626953125,
0.02508544921875,
-0.01995849609375,
0.04937744140625,
-0.023040771484375,
-0.0243682861328125,
0.0208282470703125,
-0.0709228515625,
0.006496429443359375,
0.0271759033203125,
-0.00434112548828125,
0.01018524169921875,
0.042236328125,
-0.0017108917236328125,
0.0103302001953125,
0.027587890625,
0.0169830322265625,
0.021484375,
-0.0272979736328125,
-0.056671142578125,
-0.027923583984375,
-0.0117340087890625,
-0.0148773193359375,
-0.0005002021789550781,
-0.0300140380859375,
-0.026519775390625,
-0.03155517578125,
-0.017974853515625,
-0.03167724609375,
-0.0307769775390625,
-0.0048675537109375,
0.0286102294921875,
-0.018829345703125,
-0.011932373046875,
-0.0692138671875,
-0.03179931640625,
0.0007328987121582031,
-0.0362548828125,
0.0277862548828125,
-0.02618408203125,
-0.0254364013671875,
0.00687408447265625,
-0.0340576171875,
0.014129638671875,
-0.0243988037109375,
-0.00032258033752441406,
-0.043426513671875,
-0.08441162109375,
-0.055755615234375,
0.0704345703125,
-0.06866455078125,
0.00902557373046875,
0.0282440185546875,
-0.0248260498046875,
-0.01715087890625,
-0.01776123046875,
0.018035888671875,
0.0142059326171875,
0.0265960693359375,
-0.015869140625,
0.01433563232421875,
0.004383087158203125,
-0.01129913330078125,
-0.062744140625,
0.0018301010131835938,
-0.046722412109375,
-0.007579803466796875,
0.0031261444091796875,
0.0037822723388671875,
0.0095672607421875,
-0.0283050537109375,
-0.0341796875,
0.083984375,
-0.000568389892578125,
-0.0158843994140625,
-0.01385498046875,
-0.0178070068359375,
-0.0259552001953125,
0.0545654296875,
0.01053619384765625,
-0.00984954833984375,
-0.01401519775390625,
0.027801513671875,
0.004016876220703125,
0.0298614501953125,
0.0196533203125,
0.03594970703125,
-0.002857208251953125,
0.03021240234375,
0.01142120361328125,
-0.0306243896484375,
-0.0140533447265625,
-0.01190185546875,
0.016143798828125,
0.0233612060546875,
-0.050750732421875,
-0.0279998779296875,
-0.0191802978515625,
0.046142578125,
0.004974365234375,
-0.048858642578125,
-0.06817626953125,
-0.04071044921875,
0.0755615234375,
0.0447998046875,
0.02825927734375,
-0.01248931884765625,
0.00345611572265625,
-0.0582275390625,
-0.039276123046875,
0.01311492919921875,
0.0013265609741210938,
-0.01068115234375,
0.03350830078125,
0.00782012939453125,
0.0024166107177734375,
-0.001430511474609375,
-0.029815673828125,
-0.0234832763671875,
-0.0159912109375,
-0.01380157470703125,
0.006359100341796875,
-0.0125579833984375,
-0.01209259033203125,
0.0560302734375,
-0.059539794921875,
-0.0504150390625,
0.0164031982421875,
0.01297760009765625,
-0.0203094482421875,
-0.03204345703125,
-0.0128631591796875,
-0.06378173828125,
0.0472412109375,
0.045623779296875,
-0.0010013580322265625,
0.0299072265625,
-0.004459381103515625,
-0.032806396484375,
0.0019779205322265625,
0.04107666015625,
0.006076812744140625,
0.034210205078125,
-0.048431396484375,
0.06256103515625,
0.0050506591796875,
0.06781005859375,
-0.0113067626953125,
-0.03399658203125,
-0.0316162109375,
0.0238800048828125,
-0.006275177001953125,
-0.0038604736328125,
0.0194244384765625,
0.01132965087890625,
-0.007598876953125,
0.0050506591796875,
-0.042877197265625,
-0.048858642578125,
0.021514892578125,
-0.01010894775390625,
-0.013519287109375,
0.021484375
] |
5ebc8088a80e8bd0da2c01de13293c067d688ee8
|
Wordpress Stackexchange
Q: order of date column in custom post type I have a custom post type and trying to set custom columns, the date column is there by default, and it appears right after the title. Do I have to unset the date first and then re-apply it, or is there a more elegant way of achieving this:
function custom_columns($columns) {
unset( $columns['date'] );
$columns = array_merge($columns, array(
'title' => 'Alert Title',
'region' => 'Region',
'date' => 'Date',
)
);
return $columns;
}
A: That's the only thing there is to do: array manipulation.
The filter manage_edit-CPT_columns is fired in class-wp-list-table.php:
add_filter( "manage_{$this->screen->id}_columns", array( &$this, 'get_columns' ), 0 );
Which in turn dispatches the function get_columns() in the sub-class class-wp-posts-list-table.php.
And, inside it, one filter for taxonomies, and others for post/page/cpt columns.
And all of them dealing with array elements.
Maybe a one line solution exists with some PHP function, but two lines is valid code too.
|
Q: order of date column in custom post type I have a custom post type and trying to set custom columns, the date column is there by default, and it appears right after the title. Do I have to unset the date first and then re-apply it, or is there a more elegant way of achieving this:
function custom_columns($columns) {
unset( $columns['date'] );
$columns = array_merge($columns, array(
'title' => 'Alert Title',
'region' => 'Region',
'date' => 'Date',
)
);
return $columns;
}
A: That's the only thing there is to do: array manipulation.
The filter manage_edit-CPT_columns is fired in class-wp-list-table.php:
add_filter( "manage_{$this->screen->id}_columns", array( &$this, 'get_columns' ), 0 );
Which in turn dispatches the function get_columns() in the sub-class class-wp-posts-list-table.php.
And, inside it, one filter for taxonomies, and others for post/page/cpt columns.
And all of them dealing with array elements.
Maybe a one line solution exists with some PHP function, but two lines is valid code too.
|
wordpress
|
{
"language": "en",
"length": 156,
"provenance": "stackexchange_00019.jsonl.gz:428782",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84847"
}
|
[
0.041748046875,
-0.0155029296875,
-0.00843048095703125,
-0.0498046875,
0.0033092498779296875,
-0.024810791015625,
0.0191497802734375,
0.0011463165283203125,
0.017974853515625,
-0.0189056396484375,
-0.0027484893798828125,
-0.0248565673828125,
-0.06500244140625,
-0.043212890625,
-0.0186614990234375,
-0.05474853515625,
0.0408935546875,
-0.037628173828125,
0.0208282470703125,
-0.00788116455078125,
0.01291656494140625,
0.0310516357421875,
0.01495361328125,
0.047027587890625,
0.0216217041015625,
0.0192718505859375,
0.044097900390625,
0.0088348388671875,
0.036102294921875,
0.0086822509765625,
0.033966064453125,
-0.06494140625,
0.018585205078125,
-0.00548553466796875,
0.016387939453125,
0.0258636474609375,
0.01213836669921875,
-0.00937652587890625,
-0.005100250244140625,
0.0239410400390625,
0.00685882568359375,
0.0019350051879882812,
-0.0089569091796875,
-0.0217742919921875,
-0.017669677734375,
-0.023895263671875,
0.003192901611328125,
-0.009613037109375,
0.020111083984375,
-0.017791748046875,
0.0019235610961914062,
0.008544921875,
0.0278778076171875,
-0.0303802490234375,
-0.0219879150390625,
-0.029571533203125,
-0.0007042884826660156,
-0.011444091796875,
0.019805908203125,
0.0152435302734375,
-0.00909423828125,
0.0018634796142578125,
0.004657745361328125,
-0.02362060546875,
0.0011892318725585938,
0.01375579833984375,
0.06512451171875,
0.00844573974609375,
-0.046295166015625,
-0.0023059844970703125,
0.031494140625,
-0.0205841064453125,
0.0080413818359375,
-0.055999755859375,
0.01751708984375,
0.038421630859375,
-0.027496337890625,
-0.0211334228515625,
0.01971435546875,
-0.005565643310546875,
0.00351715087890625,
-0.0137786865234375,
0.0053863525390625,
-0.056854248046875,
0.035736083984375,
-0.013397216796875,
-0.018402099609375,
0.0002593994140625,
-0.0230712890625,
-0.0418701171875,
-0.0165863037109375,
-0.0126190185546875,
-0.04345703125,
-0.01446533203125,
-0.0086669921875,
-0.033660888671875,
0.04254150390625,
0.08709716796875,
-0.0246124267578125,
-0.0037059783935546875,
-0.034271240234375,
-0.003692626953125,
-0.027801513671875,
-0.02679443359375,
-0.002025604248046875,
-0.0233306884765625,
-0.0002770423889160156,
-0.00774383544921875,
-0.0025196075439453125,
0.034271240234375,
-0.03778076171875,
-0.00934600830078125,
0.0029468536376953125,
0.01220703125,
-0.04473876953125,
-0.01374053955078125,
-0.024566650390625,
-0.029693603515625,
-0.0186920166015625,
-0.00897216796875,
0.00004667043685913086,
0.00013875961303710938,
-0.01494598388671875,
-0.0172271728515625,
0.0280609130859375,
-0.0005202293395996094,
-0.046173095703125,
0.0294647216796875,
-0.03076171875,
0.0182647705078125,
-0.034881591796875,
0.003131866455078125,
0.07281494140625,
0.06170654296875,
0.031585693359375,
-0.0177764892578125,
0.0443115234375,
-0.03277587890625,
-0.01190948486328125,
0.004039764404296875,
0.0225677490234375,
-0.01296234130859375,
-0.018951416015625,
-0.0014181137084960938,
-0.0006990432739257812,
0.020172119140625,
0.0254974365234375,
0.013031005859375,
-0.00991058349609375,
-0.037445068359375,
0.005290985107421875,
0.0090789794921875,
0.04986572265625,
0.0192718505859375,
-0.055511474609375,
-0.004070281982421875,
0.0141754150390625,
-0.021881103515625,
-0.029083251953125,
-0.051361083984375,
-0.004673004150390625,
-0.010894775390625,
-0.04827880859375,
-0.061859130859375,
-0.0836181640625,
0.032073974609375,
0.010498046875,
-0.004039764404296875,
0.02294921875,
-0.0287017822265625,
-0.02435302734375,
-0.01494598388671875,
0.01474761962890625,
-0.0013751983642578125,
-0.006267547607421875,
0.047576904296875,
-0.013458251953125,
-0.04376220703125,
0.0232391357421875,
0.0279083251953125,
-0.01299285888671875,
-0.0341796875,
-0.044281005859375,
0.0229339599609375,
-0.0484619140625,
0.024688720703125,
-0.0012865066528320312,
0.037933349609375,
0.026336669921875,
0.01454925537109375,
0.0046539306640625,
0.0242767333984375,
-0.053131103515625,
0.01702880859375,
-0.007396697998046875,
-0.0150146484375,
-0.019744873046875,
-0.00742340087890625,
-0.01003265380859375,
0.0076446533203125,
-0.029388427734375,
0.043212890625,
-0.03387451171875,
0.0233612060546875,
-0.036834716796875,
0.00951385498046875,
-0.025726318359375,
0.0430908203125,
-0.030609130859375,
-0.009613037109375,
0.0286102294921875,
0.006439208984375,
-0.0362548828125,
-0.01556396484375,
-0.0178680419921875,
0.02386474609375,
0.010711669921875,
0.0026531219482421875,
-0.0286712646484375,
-0.012542724609375,
-0.0211181640625,
-0.018310546875,
-0.01226043701171875,
0.061492919921875,
0.05670166015625,
0.0031185150146484375,
-0.0195770263671875,
-0.0196990966796875,
0.06048583984375,
0.01806640625,
-0.0204315185546875,
0.006870269775390625,
0.007778167724609375,
0.00970458984375,
-0.052398681640625,
-0.006626129150390625,
-0.01473236083984375,
-0.02490234375,
0.01038360595703125,
0.048065185546875,
0.012298583984375,
0.006824493408203125,
-0.01407623291015625,
0.01837158203125,
0.008941650390625,
-0.01027679443359375,
0.011260986328125,
-0.0003440380096435547,
0.022247314453125,
0.038787841796875,
0.025390625,
-0.0120697021484375,
0.011322021484375,
-0.0092926025390625,
0.038177490234375,
0.005794525146484375,
-0.0262298583984375,
-0.0210723876953125,
0.032501220703125,
-0.0287322998046875,
0.01044464111328125,
-0.05670166015625,
-0.03515625,
-0.0114898681640625,
0.035308837890625,
0.00589752197265625,
0.032379150390625,
0.0224609375,
-0.040771484375,
0.0084381103515625,
0.0222015380859375,
0.010467529296875,
0.008148193359375,
0.00759124755859375,
-0.0283660888671875,
0.028900146484375,
-0.002246856689453125,
0.007633209228515625,
-0.00739288330078125,
-0.01025390625,
-0.0158538818359375,
-0.0044708251953125,
-0.01351165771484375,
-0.00028967857360839844,
0.007289886474609375,
-0.03607177734375,
0.0228424072265625,
0.033966064453125,
-0.0297088623046875,
-0.011505126953125,
0.0225067138671875,
-0.00937652587890625,
-0.051025390625,
0.0140838623046875,
-0.01251220703125,
-0.0238800048828125,
-0.0226287841796875,
-0.0216522216796875,
0.034088134765625,
-0.0399169921875,
-0.007625579833984375,
0.055267333984375,
-0.0092620849609375,
0.0100555419921875,
0.0045623779296875,
0.006717681884765625,
0.01494598388671875,
-0.002292633056640625,
-0.01105499267578125,
-0.005859375,
-0.0482177734375,
0.0238037109375,
0.0418701171875,
0.09503173828125,
-0.011444091796875,
-0.04217529296875,
-0.007099151611328125,
0.048583984375,
-0.042510986328125,
-0.0572509765625,
0.019744873046875,
-0.0187835693359375,
0.004638671875,
-0.0203857421875,
-0.0032100677490234375,
-0.0162200927734375,
-0.009674072265625,
0.01129913330078125,
-0.0018625259399414062,
-0.022491455078125,
-0.0312347412109375,
-0.02001953125,
-0.04803466796875,
-0.0226593017578125,
0.005084991455078125,
0.004856109619140625,
-0.0197601318359375,
0.12164306640625,
-0.0006017684936523438,
-0.0921630859375,
-0.034942626953125,
-0.0419921875,
-0.014068603515625,
0.03173828125,
0.02447509765625,
-0.02911376953125,
0.0215606689453125,
0.00011235475540161133,
0.02490234375,
0.028045654296875,
-0.03485107421875,
-0.0224609375,
-0.0237884521484375,
0.006221771240234375,
-0.0079803466796875,
0.0308380126953125,
0.0185699462890625,
0.017303466796875,
0.01427459716796875,
-0.035003662109375,
-0.037261962890625,
0.0005168914794921875,
-0.034423828125,
-0.0009851455688476562,
0.0215606689453125,
0.006679534912109375,
-0.05816650390625,
0.038055419921875,
-0.0004436969757080078,
0.00461578369140625,
0.03057861328125,
-0.0090789794921875,
0.0299072265625,
0.0008063316345214844,
-0.01062774658203125,
-0.033935546875,
0.035858154296875,
-0.01320648193359375,
0.0006480216979980469,
0.0084991455078125,
0.0116119384765625,
-0.01983642578125,
0.00713348388671875,
-0.06842041015625,
-0.10198974609375,
0.062164306640625,
-0.048095703125,
-0.02490234375,
-0.03558349609375,
-0.01030731201171875,
0.024627685546875,
0.09100341796875,
-0.0772705078125,
-0.00835418701171875,
0.007038116455078125,
0.0255279541015625,
-0.03424072265625,
-0.048004150390625,
-0.04473876953125,
-0.028411865234375,
-0.112060546875,
0.01236724853515625,
-0.004810333251953125,
-0.0232696533203125,
-0.03021240234375,
0.031646728515625,
-0.08465576171875,
-0.04229736328125,
0.04150390625,
0.006900787353515625,
-0.0241851806640625,
0.06561279296875,
-0.03375244140625,
0.0308380126953125,
-0.032745361328125,
0.006862640380859375,
-0.09490966796875,
-0.02239990234375,
-0.0008535385131835938,
0.0523681640625,
-0.0221405029296875,
0.0010747909545898438,
-0.0455322265625,
0.0272369384765625,
0.044464111328125,
-0.0113372802734375,
0.0255126953125,
-0.034027099609375,
0.0302581787109375,
0.00040531158447265625,
0.007663726806640625,
-0.0261688232421875,
-0.013214111328125,
-0.0295257568359375,
-0.01560211181640625,
0.02716064453125,
-0.0272369384765625,
0.0369873046875,
-0.00687408447265625,
-0.0117034912109375,
0.039276123046875,
-0.010833740234375,
-0.02764892578125,
0.053466796875,
-0.03955078125,
0.021087646484375,
-0.037567138671875,
-0.0177154541015625,
0.0288848876953125,
0.0218963623046875,
-0.00881195068359375,
-0.00705718994140625,
0.07659912109375,
0.025604248046875,
-0.019134521484375,
-0.004642486572265625,
-0.0091094970703125,
0.0308990478515625,
0.00992584228515625,
0.03033447265625,
-0.003997802734375,
-0.022491455078125,
0.06634521484375,
-0.005603790283203125,
-0.0184478759765625,
-0.0110015869140625,
0.051300048828125,
0.006320953369140625,
-0.01509857177734375,
0.00885009765625,
-0.0341796875,
0.01275634765625,
0.0195465087890625,
0.0131988525390625,
-0.02996826171875,
0.0282440185546875,
0.059112548828125,
-0.007598876953125,
-0.0164642333984375,
-0.037567138671875,
-0.029541015625,
0.0247802734375,
-0.02178955078125,
0.031463623046875,
0.01290130615234375,
-0.006099700927734375,
-0.0058746337890625,
-0.0165557861328125,
0.02264404296875,
0.00035381317138671875,
-0.01363372802734375,
0.00476837158203125,
0.0433349609375,
0.003810882568359375,
0.034027099609375,
0.0128326416015625,
-0.006748199462890625,
0.06640625,
-0.0030498504638671875,
-0.017425537109375,
-0.030426025390625,
-0.033477783203125,
0.006359100341796875,
0.007488250732421875,
-0.05706787109375,
0.002101898193359375,
0.058258056640625,
-0.01070404052734375,
0.0269317626953125,
-0.051727294921875,
0.05535888671875,
-0.029571533203125,
0.0085601806640625,
0.041412353515625,
-0.021453857421875,
0.01297760009765625,
0.0301971435546875,
0.05859375,
-0.019287109375,
-0.038818359375,
0.054779052734375,
0.06976318359375,
0.0517578125,
0.02423095703125,
-0.044219970703125,
-0.047576904296875,
0.058685302734375,
-0.046539306640625,
-0.01004791259765625,
0.0070037841796875,
-0.0204620361328125,
-0.00592803955078125,
-0.018646240234375,
-0.01256561279296875,
0.059326171875,
0.00006937980651855469,
-0.0206451416015625,
-0.0027294158935546875,
0.03961181640625,
-0.0002970695495605469,
0.0046539306640625,
-0.033111572265625,
-0.0197601318359375,
0.0223541259765625,
-0.01471710205078125,
0.049652099609375,
-0.04925537109375,
0.05413818359375,
-0.01641845703125,
0.052154541015625,
-0.038818359375,
-0.05157470703125,
-0.01378631591796875,
-0.0007753372192382812,
-0.0028591156005859375,
-0.00687408447265625,
-0.034698486328125,
-0.002227783203125,
-0.0153961181640625,
0.01384735107421875,
-0.0589599609375,
0.060211181640625,
-0.0181732177734375,
-0.000652313232421875,
-0.0299224853515625,
0.019256591796875,
0.043304443359375,
0.06280517578125,
-0.032501220703125,
-0.0101318359375,
-0.046173095703125,
-0.0181121826171875,
-0.06146240234375,
-0.0765380859375,
-0.0345458984375,
0.0152587890625,
0.0216217041015625,
0.0203704833984375,
-0.006290435791015625,
-0.0635986328125,
-0.0097503662109375,
-0.016204833984375,
0.0305938720703125,
0.0015172958374023438,
-0.0016460418701171875,
0.091064453125,
-0.00414276123046875,
0.05194091796875,
0.0311279296875,
0.0546875,
-0.022796630859375,
-0.027496337890625,
0.04571533203125,
-0.02752685546875,
-0.034576416015625,
-0.0260772705078125,
-0.06182861328125,
-0.04486083984375,
0.00798797607421875,
-0.0195465087890625,
0.03399658203125,
-0.02496337890625,
-0.01233673095703125,
-0.0160675048828125,
0.01715087890625,
-0.0472412109375,
0.0284423828125,
0.022979736328125,
0.004238128662109375,
0.052490234375,
-0.0379638671875,
-0.01495361328125,
0.0197601318359375,
-0.0286712646484375,
0.04608154296875,
0.00750732421875,
-0.0308380126953125,
0.060089111328125,
0.0467529296875,
0.0143280029296875,
0.040130615234375,
0.020843505859375,
0.0194244384765625,
0.0026149749755859375,
-0.023468017578125,
-0.0023555755615234375,
-0.0052337646484375,
0.050079345703125,
-0.004596710205078125,
-0.016143798828125,
0.027099609375,
-0.0264129638671875,
0.0263671875,
0.047454833984375,
0.0706787109375,
-0.0916748046875,
0.0139923095703125,
0.0267333984375,
0.005802154541015625,
0.029205322265625,
-0.00826263427734375,
0.0011577606201171875,
-0.01393890380859375,
0.0292510986328125,
-0.0255279541015625,
-0.035919189453125,
-0.0020389556884765625,
-0.001190185546875,
-0.01534271240234375,
0.0033130645751953125,
0.0165863037109375,
0.0102996826171875,
-0.0036449432373046875,
-0.01407623291015625,
-0.02777099609375,
0.0250244140625,
-0.0018262863159179688,
0.023895263671875,
-0.020721435546875,
-0.007251739501953125,
-0.0821533203125,
-0.028717041015625,
-0.041839599609375,
-0.04156494140625,
0.0159912109375,
-0.006496429443359375,
0.0090484619140625,
0.019378662109375,
-0.017608642578125,
0.02557373046875,
-0.00601959228515625,
-0.062469482421875,
-0.02911376953125,
-0.0268707275390625,
0.00824737548828125,
0.03643798828125,
0.01560211181640625,
0.0281829833984375,
0.02056884765625,
-0.048065185546875,
-0.00606536865234375,
-0.005199432373046875,
0.048797607421875,
-0.01392364501953125,
-0.021575927734375,
0.0248870849609375,
0.0167388916015625,
-0.0002524852752685547,
0.00923919677734375,
0.030303955078125,
-0.028289794921875,
0.006954193115234375,
0.0012464523315429688,
-0.00377655029296875,
-0.005344390869140625,
0.0017862319946289062,
-0.036102294921875,
0.06939697265625,
-0.016082763671875,
0.018310546875,
0.0295257568359375,
0.017547607421875,
-0.022857666015625,
0.004535675048828125,
-0.0308685302734375,
0.02764892578125,
-0.045013427734375,
0.0660400390625,
-0.09710693359375,
-0.0212554931640625,
-0.004413604736328125,
0.06756591796875,
0.04229736328125,
-0.004680633544921875,
0.0093536376953125,
0.001079559326171875,
0.088623046875,
0.08282470703125,
0.02508544921875,
-0.0181732177734375,
-0.0184326171875,
0.038726806640625,
-0.0038738250732421875,
-0.00757598876953125,
0.02642822265625,
-0.00308990478515625,
-0.082763671875,
0.014495849609375,
0.03692626953125,
0.05340576171875,
0.00814056396484375,
-0.01474761962890625,
-0.020355224609375,
-0.0020961761474609375,
0.03125,
-0.01934814453125,
0.01381683349609375,
0.020294189453125,
0.06707763671875,
-0.052276611328125,
-0.058807373046875,
-0.00389862060546875,
0.052398681640625,
0.037811279296875,
0.033538818359375,
0.026397705078125,
0.011810302734375,
0.01059722900390625,
-0.021240234375,
0.0052490234375,
-0.0004048347473144531,
-0.031707763671875,
0.0280914306640625,
-0.005218505859375,
0.01062774658203125,
-0.030548095703125,
0.0191650390625,
0.038787841796875,
0.032867431640625,
-0.032958984375,
-0.0031280517578125,
0.032958984375,
0.0059356689453125,
-0.0163421630859375,
-0.051025390625,
-0.03546142578125,
-0.05267333984375,
-0.0019779205322265625,
-0.03387451171875,
-0.005565643310546875,
0.0262603759765625,
0.05023193359375,
-0.0006055831909179688,
0.0172576904296875,
-0.03515625,
-0.0279998779296875,
-0.031463623046875,
0.0548095703125,
0.02227783203125,
0.032623291015625,
-0.04498291015625,
0.070068359375,
-0.0274200439453125,
-0.0006551742553710938,
-0.0162200927734375,
0.005481719970703125,
0.020538330078125,
0.0102386474609375,
-0.005840301513671875,
0.004726409912109375,
-0.01316070556640625,
0.020782470703125,
0.034576416015625,
0.01230621337890625,
0.0718994140625,
0.038299560546875,
-0.0289459228515625,
0.00458526611328125,
0.012176513671875,
-0.0220947265625,
-0.0498046875,
-0.0389404296875,
0.005214691162109375,
0.02435302734375,
-0.0011615753173828125,
0.05902099609375,
-0.003696441650390625,
0.02569580078125,
-0.0322265625,
0.04205322265625,
-0.0030517578125,
-0.004390716552734375,
0.04351806640625,
-0.0016498565673828125,
0.0537109375,
0.001312255859375,
-0.0096588134765625,
0.0235137939453125,
-0.04443359375,
-0.06402587890625,
0.005054473876953125,
0.033966064453125,
0.0163116455078125,
-0.022705078125,
0.010833740234375,
-0.01103973388671875,
-0.0103607177734375,
0.00574493408203125,
0.0228271484375,
0.0101318359375,
0.020416259765625,
0.01806640625,
-0.06671142578125,
-0.022430419921875,
-0.024383544921875,
0.0041046142578125,
-0.004817962646484375,
0.03253173828125,
0.028076171875,
0.0199127197265625,
0.007419586181640625,
0.023345947265625,
-0.026824951171875,
-0.026519775390625,
0.08367919921875,
-0.00858306884765625,
-0.005817413330078125,
-0.01248931884765625,
0.002971649169921875,
0.00031828880310058594,
0.04034423828125,
-0.048858642578125,
0.0151824951171875,
-0.052734375,
0.0155181884765625,
-0.0251312255859375,
0.016632080078125,
-0.0226898193359375,
-0.01313018798828125,
-0.0037136077880859375,
-0.00653076171875,
0.025390625,
0.0205841064453125,
0.007747650146484375,
-0.01044464111328125,
0.009307861328125,
-0.0310821533203125,
0.039825439453125,
-0.022125244140625,
0.07666015625,
0.03961181640625,
-0.01552581787109375,
-0.032501220703125,
0.002056121826171875,
-0.00829315185546875,
0.0013818740844726562,
0.0271148681640625,
0.00948333740234375,
0.01168060302734375,
0.006977081298828125,
0.01141357421875,
0.01568603515625,
0.0265960693359375,
-0.013946533203125,
0.0106353759765625,
0.025543212890625,
-0.017578125,
-0.029541015625,
-0.022247314453125,
-0.04205322265625,
-0.0295562744140625,
0.005634307861328125,
0.0114288330078125,
0.0042877197265625,
-0.035980224609375,
-0.055419921875,
-0.0272216796875,
0.005672454833984375,
-0.0035686492919921875,
-0.028717041015625,
0.043182373046875,
-0.0273284912109375,
-0.0439453125,
-0.01605224609375,
-0.039794921875,
0.0239105224609375,
0.04364013671875,
0.01125335693359375,
-0.01001739501953125,
-0.0341796875,
0.009796142578125,
-0.0270233154296875,
0.00777435302734375,
0.034149169921875,
-0.0036163330078125,
-0.015228271484375,
-0.006458282470703125,
0.0024700164794921875,
0.0322265625,
-0.0458984375,
-0.0164337158203125,
0.02508544921875,
-0.01050567626953125,
-0.013641357421875,
-0.06280517578125,
0.0013275146484375,
-0.061920166015625,
0.004364013671875,
-0.0009965896606445312,
0.0019159317016601562,
0.0301055908203125,
-0.03106689453125,
-0.0419921875,
0.09515380859375,
-0.01486968994140625,
-0.0032901763916015625,
-0.034332275390625,
0.026763916015625,
-0.005832672119140625,
0.0199432373046875,
0.00882720947265625,
-0.041595458984375,
0.0005078315734863281,
0.00672149658203125,
-0.01071929931640625,
0.034210205078125,
0.0056304931640625,
0.0002646446228027344,
-0.05841064453125,
-0.020172119140625,
-0.03826904296875,
-0.01763916015625,
-0.0016603469848632812,
-0.01502227783203125,
0.032318115234375,
0.031707763671875,
-0.02423095703125,
-0.01123046875,
0.019622802734375,
0.01493072509765625,
-0.00830078125,
-0.0208587646484375,
-0.056243896484375,
-0.014862060546875,
0.06500244140625,
0.0982666015625,
0.029144287109375,
-0.0467529296875,
-0.0005207061767578125,
-0.0173492431640625,
-0.036865234375,
-0.0283660888671875,
0.0207061767578125,
-0.06024169921875,
-0.0286712646484375,
0.016571044921875,
-0.013946533203125,
0.0306396484375,
0.00032806396484375,
0.006374359130859375,
0.006298065185546875,
0.039398193359375,
-0.01666259765625,
-0.03155517578125,
0.0751953125,
0.0046539306640625,
-0.029815673828125,
0.008087158203125,
-0.0308990478515625,
-0.0176544189453125,
-0.0160675048828125,
-0.034881591796875,
-0.04156494140625,
-0.01508331298828125,
0.00783538818359375,
0.0190277099609375,
-0.00789642333984375,
0.028839111328125,
-0.0209197998046875,
0.01131439208984375,
-0.0246124267578125,
-0.004833221435546875,
0.0016803741455078125,
-0.0291748046875,
-0.00921630859375,
0.0165252685546875,
0.000568389892578125,
0.07696533203125,
0.006622314453125,
0.055816650390625,
0.0083465576171875,
0.0179595947265625,
0.0086822509765625,
-0.01355743408203125,
0.02960205078125,
-0.019775390625,
0.0009016990661621094,
-0.012115478515625,
-0.03546142578125,
-0.020233154296875,
-0.0321044921875,
-0.01279449462890625,
-0.019805908203125,
-0.004970550537109375
] |
3db93308c6e1bcf01b6dda246f66f9d21835b576
|
Wordpress Stackexchange
Q: WP_UnitTestCase missing? I was looking at tests for wordpress and some, if not all the classes have WP_UnitTestCase but I cannot find the class, why do I care? I have downloaded The most up to date version of this from github which is the same set of tests.
Why does this matter so much? Because when ever I run one of the tests via phpunit filename.php I get the error from php unit stating that its missing WP_UnitTestCase.
So my question is:
Where is this class, why is it missing if it works for the WordPress developers?
A: This class is defined in includes/testcase.php. If you checkout the entire repo, you should have it. To check out the entire repo, you should be running something along the lines of:
svn co https://unit-tests.svn.wordpress.org/trunk wordpress-tests
|
Q: WP_UnitTestCase missing? I was looking at tests for wordpress and some, if not all the classes have WP_UnitTestCase but I cannot find the class, why do I care? I have downloaded The most up to date version of this from github which is the same set of tests.
Why does this matter so much? Because when ever I run one of the tests via phpunit filename.php I get the error from php unit stating that its missing WP_UnitTestCase.
So my question is:
Where is this class, why is it missing if it works for the WordPress developers?
A: This class is defined in includes/testcase.php. If you checkout the entire repo, you should have it. To check out the entire repo, you should be running something along the lines of:
svn co https://unit-tests.svn.wordpress.org/trunk wordpress-tests
|
wordpress
|
{
"language": "en",
"length": 134,
"provenance": "stackexchange_00019.jsonl.gz:428792",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84890"
}
|
[
0.0290374755859375,
-0.01558685302734375,
-0.0298004150390625,
-0.0173797607421875,
-0.007793426513671875,
-0.0477294921875,
0.033111572265625,
0.008087158203125,
-0.0007491111755371094,
0.007099151611328125,
-0.057647705078125,
0.006923675537109375,
-0.00829315185546875,
-0.00032448768615722656,
-0.004177093505859375,
-0.041259765625,
0.023345947265625,
-0.0145111083984375,
0.0213470458984375,
-0.0037479400634765625,
0.01348114013671875,
0.026519775390625,
-0.00830078125,
0.0252685546875,
0.019287109375,
-0.0173797607421875,
0.035308837890625,
-0.0242462158203125,
0.025543212890625,
-0.007007598876953125,
0.01129150390625,
0.0134735107421875,
0.0246124267578125,
0.006519317626953125,
-0.03533935546875,
-0.053436279296875,
-0.021484375,
0.0007452964782714844,
-0.045928955078125,
0.0426025390625,
0.00799560546875,
-0.002132415771484375,
0.0150604248046875,
-0.01377105712890625,
0.01445770263671875,
-0.0439453125,
0.023681640625,
-0.04718017578125,
0.0216217041015625,
-0.01251983642578125,
-0.0150146484375,
0.00823974609375,
0.004444122314453125,
-0.013275146484375,
-0.00726318359375,
0.0074920654296875,
0.017913818359375,
0.0219573974609375,
0.020538330078125,
-0.027618408203125,
-0.0357666015625,
0.01445770263671875,
0.01502227783203125,
0.006145477294921875,
-0.004268646240234375,
0.01323699951171875,
0.01096343994140625,
-0.00672149658203125,
0.026947021484375,
0.00594329833984375,
-0.00865936279296875,
0.005970001220703125,
-0.024993896484375,
0.0233612060546875,
-0.004146575927734375,
-0.05828857421875,
0.051849365234375,
-0.056121826171875,
-0.01450347900390625,
0.061065673828125,
0.02056884765625,
-0.0135650634765625,
-0.061798095703125,
0.019134521484375,
0.00426483154296875,
0.046478271484375,
-0.00395965576171875,
-0.032073974609375,
-0.0230255126953125,
-0.0124053955078125,
-0.00748443603515625,
-0.036224365234375,
-0.06396484375,
0.05462646484375,
0.034149169921875,
-0.024078369140625,
0.040283203125,
0.0296173095703125,
0.007656097412109375,
-0.01323699951171875,
0.053070068359375,
-0.068359375,
0.0167694091796875,
-0.01074981689453125,
-0.014739990234375,
0.01311492919921875,
-0.015533447265625,
0.01523590087890625,
0.00981903076171875,
0.0229644775390625,
-0.00736236572265625,
-0.0660400390625,
-0.0239715576171875,
-0.098876953125,
0.03033447265625,
0.04864501953125,
-0.01515960693359375,
0.0245361328125,
0.046417236328125,
-0.0418701171875,
0.01055908203125,
0.0203857421875,
-0.0037822723388671875,
-0.0222320556640625,
0.0196533203125,
-0.0014142990112304688,
-0.0196685791015625,
-0.0092010498046875,
0.04473876953125,
0.011810302734375,
-0.00884246826171875,
0.006244659423828125,
0.033782958984375,
0.01092529296875,
-0.005462646484375,
-0.00983428955078125,
0.0008897781372070312,
0.016754150390625,
-0.029815673828125,
0.0394287109375,
-0.05474853515625,
-0.0306396484375,
0.03900146484375,
-0.04888916015625,
0.0300445556640625,
0.0253448486328125,
0.034271240234375,
0.006114959716796875,
-0.0157012939453125,
-0.037078857421875,
0.017181396484375,
0.0007920265197753906,
0.01959228515625,
0.015228271484375,
-0.03350830078125,
-0.0105133056640625,
-0.003040313720703125,
-0.0338134765625,
-0.001491546630859375,
-0.029876708984375,
0.0115814208984375,
-0.024658203125,
-0.0081634521484375,
0.002819061279296875,
-0.02142333984375,
0.041412353515625,
-0.00418853759765625,
-0.005504608154296875,
0.025909423828125,
0.0237884521484375,
-0.03326416015625,
-0.03179931640625,
0.06439208984375,
0.032958984375,
-0.019287109375,
0.0589599609375,
0.009368896484375,
0.034515380859375,
0.022369384765625,
-0.01090240478515625,
-0.036834716796875,
-0.05072021484375,
0.08453369140625,
-0.040771484375,
-0.00041031837463378906,
-0.036956787109375,
0.01409912109375,
0.015960693359375,
0.0021953582763671875,
0.034515380859375,
0.0016183853149414062,
0.0039825439453125,
-0.033843994140625,
0.072998046875,
0.0232391357421875,
-0.008544921875,
-0.073974609375,
0.016876220703125,
-0.0172271728515625,
-0.076171875,
-0.03338623046875,
0.01064300537109375,
-0.0195159912109375,
-0.00417327880859375,
-0.047088623046875,
-0.007572174072265625,
-0.02032470703125,
0.036285400390625,
-0.0335693359375,
-0.0007662773132324219,
0.002178192138671875,
-0.031036376953125,
0.027862548828125,
-0.06048583984375,
-0.0129241943359375,
0.0196685791015625,
-0.0100250244140625,
-0.0017805099487304688,
-0.0159454345703125,
0.002864837646484375,
-0.020477294921875,
-0.00908660888671875,
-0.0258636474609375,
0.0254058837890625,
0.002506256103515625,
0.034423828125,
-0.0248260498046875,
0.02618408203125,
0.04559326171875,
0.0312347412109375,
0.06158447265625,
-0.04388427734375,
0.038421630859375,
0.0277252197265625,
-0.0244293212890625,
-0.0072021484375,
-0.006031036376953125,
-0.043487548828125,
0.005146026611328125,
0.043670654296875,
0.02874755859375,
0.035003662109375,
0.006931304931640625,
0.016448974609375,
0.07769775390625,
-0.016204833984375,
0.00420379638671875,
-0.007167816162109375,
-0.001495361328125,
0.03997802734375,
0.042877197265625,
0.004398345947265625,
0.00406646728515625,
0.01473236083984375,
-0.011566162109375,
0.017425537109375,
-0.012603759765625,
0.0133819580078125,
-0.01171112060546875,
-0.00009459257125854492,
-0.0008158683776855469,
-0.06378173828125,
-0.01450347900390625,
-0.041748046875,
0.056915283203125,
-0.002040863037109375,
0.0258941650390625,
0.0202178955078125,
-0.0199432373046875,
0.0125274658203125,
0.01134490966796875,
-0.031219482421875,
0.00702667236328125,
0.0655517578125,
0.059051513671875,
0.0477294921875,
-0.0148162841796875,
-0.061065673828125,
0.0234527587890625,
0.06500244140625,
-0.01016998291015625,
0.018768310546875,
0.0216522216796875,
-0.0164337158203125,
-0.0178070068359375,
-0.019866943359375,
0.033294677734375,
-0.0175933837890625,
-0.029510498046875,
-0.04364013671875,
-0.01367950439453125,
0.01995849609375,
-0.032806396484375,
0.02325439453125,
0.01094818115234375,
-0.025787353515625,
0.03277587890625,
-0.01233673095703125,
0.0225372314453125,
-0.00914764404296875,
0.01134490966796875,
0.041259765625,
-0.0009503364562988281,
-0.00939178466796875,
0.0196075439453125,
-0.01511383056640625,
0.01009368896484375,
0.0215301513671875,
0.002166748046875,
0.00505828857421875,
-0.0660400390625,
0.005664825439453125,
0.0306396484375,
0.04656982421875,
-0.0169525146484375,
-0.029083251953125,
-0.0173492431640625,
0.0209197998046875,
-0.050567626953125,
-0.060943603515625,
0.0011796951293945312,
-0.0301666259765625,
0.0086212158203125,
0.010101318359375,
-0.0152587890625,
-0.025390625,
0.03436279296875,
-0.0032958984375,
-0.0238800048828125,
-0.050140380859375,
-0.07318115234375,
-0.104248046875,
-0.08203125,
-0.0197296142578125,
-0.006496429443359375,
0.00928497314453125,
0.006866455078125,
0.0338134765625,
-0.004726409912109375,
-0.02923583984375,
-0.00531005859375,
0.0322265625,
-0.00691986083984375,
-0.0154571533203125,
-0.0084228515625,
-0.014495849609375,
-0.017242431640625,
0.0016660690307617188,
0.0183563232421875,
0.00595855712890625,
-0.00040340423583984375,
0.00021409988403320312,
-0.0032253265380859375,
-0.035369873046875,
-0.0090789794921875,
0.061431884765625,
-0.0030803680419921875,
-0.05548095703125,
0.01751708984375,
-0.066650390625,
0.0280914306640625,
0.0010223388671875,
0.01035308837890625,
0.051239013671875,
-0.0279998779296875,
-0.0247650146484375,
0.01447296142578125,
0.027618408203125,
-0.00304412841796875,
0.010101318359375,
0.059600830078125,
-0.0010833740234375,
-0.02166748046875,
-0.02581787109375,
-0.0462646484375,
-0.0195465087890625,
0.0179595947265625,
-0.03265380859375,
-0.0340576171875,
-0.016357421875,
-0.0158538818359375,
-0.01232147216796875,
-0.0115966796875,
0.0013151168823242188,
-0.018707275390625,
0.04376220703125,
-0.0021114349365234375,
0.05352783203125,
-0.057647705078125,
-0.029632568359375,
-0.041534423828125,
0.08099365234375,
-0.0301513671875,
-0.031982421875,
-0.0233917236328125,
0.01219940185546875,
-0.047119140625,
-0.01739501953125,
0.0017194747924804688,
-0.015838623046875,
-0.01525115966796875,
-0.01702880859375,
-0.019195556640625,
-0.01209259033203125,
0.0270233154296875,
-0.04302978515625,
0.0281829833984375,
-0.039031982421875,
0.011383056640625,
-0.038818359375,
0.0287628173828125,
0.0092620849609375,
0.00634002685546875,
-0.01512908935546875,
0.016632080078125,
-0.06109619140625,
-0.0960693359375,
-0.00261688232421875,
-0.05657958984375,
0.053192138671875,
0.0128631591796875,
-0.009185791015625,
-0.0182342529296875,
0.0266265869140625,
0.01995849609375,
-0.00893402099609375,
0.025482177734375,
-0.0209197998046875,
0.01053619384765625,
0.07476806640625,
0.030792236328125,
0.0085601806640625,
0.01361083984375,
-0.01534271240234375,
-0.0655517578125,
0.0299072265625,
-0.019622802734375,
0.037933349609375,
0.010772705078125,
-0.039154052734375,
0.03411865234375,
-0.0170135498046875,
-0.0120697021484375,
0.0496826171875,
-0.0252838134765625,
0.033935546875,
-0.039154052734375,
0.01910400390625,
-0.01215362548828125,
0.01116180419921875,
-0.03411865234375,
0.01495361328125,
-0.035614013671875,
0.0283355712890625,
-0.028411865234375,
0.015838623046875,
-0.0196075439453125,
0.00841522216796875,
0.0304718017578125,
-0.0091705322265625,
-0.03466796875,
-0.01458740234375,
0.01494598388671875,
-0.01078033447265625,
0.0222930908203125,
-0.0018281936645507812,
0.0250244140625,
-0.004974365234375,
-0.042205810546875,
0.03448486328125,
-0.00820159912109375,
-0.03826904296875,
0.0085906982421875,
0.006755828857421875,
-0.035614013671875,
0.044525146484375,
0.03753662109375,
-0.038543701171875,
0.05718994140625,
-0.010467529296875,
-0.0484619140625,
0.00563812255859375,
-0.0928955078125,
0.045135498046875,
0.038604736328125,
-0.0112762451171875,
0.045135498046875,
0.0328369140625,
0.003009796142578125,
0.04180908203125,
0.01371002197265625,
-0.0037174224853515625,
0.02386474609375,
0.044769287109375,
-0.00849151611328125,
0.0148468017578125,
-0.016082763671875,
0.09246826171875,
0.006359100341796875,
-0.047943115234375,
0.0218963623046875,
0.007671356201171875,
0.02606201171875,
0.01546478271484375,
-0.00485992431640625,
0.04290771484375,
0.020751953125,
-0.0238800048828125,
-0.0099029541015625,
-0.04730224609375,
0.004322052001953125,
-0.05401611328125,
0.02685546875,
0.0008835792541503906,
0.00046539306640625,
0.04345703125,
0.0094757080078125,
-0.04290771484375,
0.034637451171875,
-0.0010652542114257812,
0.0278167724609375,
-0.024993896484375,
0.08343505859375,
0.022735595703125,
-0.064697265625,
-0.0001577138900756836,
0.04833984375,
-0.0292816162109375,
-0.03082275390625,
-0.050079345703125,
0.028228759765625,
0.041778564453125,
-0.0379638671875,
0.00043272972106933594,
0.01561737060546875,
0.005878448486328125,
-0.0075225830078125,
-0.0124053955078125,
0.0236968994140625,
0.00960540771484375,
0.004337310791015625,
-0.00579071044921875,
0.003948211669921875,
0.030029296875,
-0.001483917236328125,
-0.0082550048828125,
-0.02032470703125,
-0.013458251953125,
0.03948974609375,
-0.051055908203125,
-0.01325225830078125,
-0.0103607177734375,
-0.016845703125,
-0.00669097900390625,
-0.0092010498046875,
0.00916290283203125,
-0.01041412353515625,
-0.016876220703125,
-0.04339599609375,
0.058624267578125,
-0.028961181640625,
0.02447509765625,
-0.039794921875,
-0.003887176513671875,
-0.0601806640625,
0.0060272216796875,
0.029632568359375,
0.040191650390625,
-0.01422882080078125,
-0.00027060508728027344,
-0.01357269287109375,
-0.0211639404296875,
0.0066375732421875,
-0.01200103759765625,
-0.037506103515625,
-0.00783538818359375,
-0.0004799365997314453,
0.0139923095703125,
-0.0245208740234375,
-0.0311431884765625,
-0.040924072265625,
0.03955078125,
0.03924560546875,
0.0264434814453125,
-0.0212860107421875,
0.10205078125,
-0.019439697265625,
0.060577392578125,
0.018951416015625,
0.060211181640625,
-0.01165008544921875,
-0.0247344970703125,
0.027618408203125,
0.030609130859375,
-0.0206451416015625,
-0.03387451171875,
-0.012176513671875,
-0.016693115234375,
0.0887451171875,
-0.023223876953125,
-0.05029296875,
0.007137298583984375,
-0.0014286041259765625,
-0.017303466796875,
0.080322265625,
0.03863525390625,
-0.0086822509765625,
-0.04119873046875,
-0.0222320556640625,
0.00655364990234375,
-0.01457977294921875,
0.0289306640625,
-0.028289794921875,
-0.024871826171875,
-0.0202484130859375,
0.0265350341796875,
-0.0008530616760253906,
0.05572509765625,
0.02978515625,
-0.005218505859375,
0.0313720703125,
0.0204010009765625,
-0.0030422210693359375,
-0.031005859375,
0.05084228515625,
-0.061737060546875,
-0.06109619140625,
0.0670166015625,
0.040802001953125,
-0.0477294921875,
0.0450439453125,
-0.03668212890625,
-0.0281524658203125,
0.004154205322265625,
0.00006669759750366211,
-0.0147247314453125,
-0.00341796875,
-0.0166778564453125,
0.01338958740234375,
-0.0011663436889648438,
0.01514434814453125,
-0.027374267578125,
-0.044464111328125,
-0.00240325927734375,
-0.03509521484375,
-0.041259765625,
-0.00751495361328125,
-0.00722503662109375,
-0.0095062255859375,
-0.0258331298828125,
0.038238525390625,
0.0312347412109375,
-0.048126220703125,
0.06884765625,
0.015716552734375,
0.031707763671875,
0.0028667449951171875,
-0.0001437664031982422,
-0.00731658935546875,
-0.0273284912109375,
-0.01514434814453125,
0.0148468017578125,
-0.04241943359375,
-0.0019092559814453125,
-0.007293701171875,
-0.00984954833984375,
0.016510009765625,
0.0221405029296875,
-0.01425933837890625,
-0.0144805908203125,
-0.00368499755859375,
-0.0257720947265625,
-0.00209808349609375,
-0.035247802734375,
0.0579833984375,
0.0298309326171875,
-0.0968017578125,
0.040069580078125,
-0.0101318359375,
-0.031951904296875,
-0.004207611083984375,
0.0090484619140625,
0.04583740234375,
-0.0120391845703125,
-0.0203094482421875,
0.0159759521484375,
0.024749755859375,
0.0150299072265625,
-0.01043701171875,
0.00897216796875,
-0.0290069580078125,
-0.00141143798828125,
-0.0162506103515625,
0.005615234375,
0.0135040283203125,
-0.0029582977294921875,
-0.05755615234375,
0.052276611328125,
0.0035533905029296875,
0.042022705078125,
0.040863037109375,
-0.0112152099609375,
-0.0391845703125,
-0.024383544921875,
-0.024688720703125,
0.041351318359375,
-0.025054931640625,
0.03350830078125,
-0.0139923095703125,
-0.0005464553833007812,
0.01812744140625,
0.016510009765625,
0.01007843017578125,
0.006488800048828125,
-0.055328369140625,
-0.00458526611328125,
0.04193115234375,
0.0418701171875,
0.0177154541015625,
0.05145263671875,
0.0012979507446289062,
0.00139617919921875,
0.036346435546875,
0.01309967041015625,
0.037200927734375,
-0.0005140304565429688,
-0.036285400390625,
0.019012451171875,
0.018341064453125,
-0.0018148422241210938,
0.00789642333984375,
0.01239776611328125,
-0.0220794677734375,
0.0001538991928100586,
0.020538330078125,
-0.02874755859375,
-0.00146484375,
0.0095977783203125,
0.00891876220703125,
-0.025970458984375,
-0.0330810546875,
-0.00714874267578125,
0.02679443359375,
0.01169586181640625,
0.0074462890625,
0.0916748046875,
0.02960205078125,
-0.0059661865234375,
0.0160064697265625,
0.025115966796875,
-0.02410888671875,
0.00965118408203125,
0.04736328125,
0.053314208984375,
0.0322265625,
0.0220794677734375,
0.051116943359375,
-0.0003058910369873047,
0.0225372314453125,
-0.04107666015625,
-0.0170440673828125,
0.007503509521484375,
0.014617919921875,
-0.012847900390625,
-0.0228729248046875,
-0.003948211669921875,
-0.03009033203125,
0.002506256103515625,
-0.02093505859375,
-0.014312744140625,
-0.0015115737915039062,
-0.0188751220703125,
-0.0228271484375,
-0.05078125,
0.082275390625,
0.0297088623046875,
-0.003871917724609375,
0.006404876708984375,
0.01544952392578125,
0.038665771484375,
-0.024322509765625,
0.06585693359375,
-0.044464111328125,
-0.003787994384765625,
0.007160186767578125,
-0.00977325439453125,
-0.040863037109375,
-0.0139312744140625,
-0.004848480224609375,
-0.0318603515625,
-0.016265869140625,
0.044677734375,
0.0210723876953125,
0.0179595947265625,
0.00502777099609375,
0.0234375,
0.00902557373046875,
0.0025081634521484375,
0.03668212890625,
-0.01390838623046875,
-0.05584716796875,
0.00580596923828125,
0.006511688232421875,
0.0222625732421875,
0.0008077621459960938,
0.00780487060546875,
0.048614501953125,
0.01036834716796875,
-0.00432586669921875,
0.035919189453125,
0.01116943359375,
-0.01309967041015625,
0.004180908203125,
-0.00205230712890625,
0.03253173828125,
0.038421630859375,
-0.018951416015625,
-0.01300811767578125,
-0.0007147789001464844,
0.004398345947265625,
-0.0012178421020507812,
0.035400390625,
0.04864501953125,
-0.0248870849609375,
0.04998779296875,
-0.01751708984375,
-0.0167083740234375,
0.0200042724609375,
0.03289794921875,
-0.03692626953125,
0.028045654296875,
0.01593017578125,
-0.08782958984375,
-0.059661865234375,
-0.037933349609375,
0.052490234375,
-0.002384185791015625,
0.09234619140625,
-0.0225372314453125,
0.01332855224609375,
-0.03607177734375,
-0.00930023193359375,
-0.0254058837890625,
-0.04046630859375,
0.043792724609375,
-0.0124664306640625,
-0.01146697998046875,
0.0074615478515625,
-0.033599853515625,
0.0261993408203125,
0.034698486328125,
-0.0171966552734375,
0.00048542022705078125,
0.00817108154296875,
0.0190887451171875,
-0.006103515625,
0.04150390625,
-0.006214141845703125,
-0.034881591796875,
-0.0106048583984375,
0.015655517578125,
0.0185394287109375,
0.04705810546875,
-0.019622802734375,
-0.0266876220703125,
-0.0013685226440429688,
-0.094482421875,
0.01438140869140625,
-0.02764892578125,
0.01214599609375,
0.0176544189453125,
0.0528564453125,
-0.043792724609375,
0.00189971923828125,
0.0007948875427246094,
-0.0290679931640625,
0.041290283203125,
0.00035500526428222656,
0.00849151611328125,
-0.017822265625,
0.01015472412109375,
-0.0036468505859375,
-0.003910064697265625,
-0.0240936279296875,
-0.0276031494140625,
0.033294677734375,
-0.0218963623046875,
-0.0166473388671875,
-0.04156494140625,
-0.0341796875,
-0.068115234375,
0.0240325927734375,
0.03326416015625,
-0.0236663818359375,
0.02105712890625,
-0.0211029052734375,
-0.0020999908447265625,
0.0205841064453125,
-0.006008148193359375,
-0.028411865234375,
0.019134521484375,
-0.029876708984375,
0.005992889404296875,
-0.019775390625,
0.0211029052734375,
-0.00452423095703125,
0.0221710205078125,
-0.0173492431640625,
-0.00647735595703125,
-0.0118560791015625,
0.013671875,
-0.0003521442413330078,
0.050018310546875,
0.06805419921875,
-0.044464111328125,
-0.036163330078125,
0.03521728515625,
0.0428466796875,
0.0848388671875,
-0.0112152099609375,
-0.0195159912109375,
0.00684356689453125,
0.01194000244140625,
0.003753662109375,
-0.045440673828125,
0.0097808837890625,
-0.036834716796875,
-0.001953125,
-0.01995849609375,
-0.01149749755859375,
-0.0101165771484375,
-0.07147216796875,
-0.1376953125,
-0.01214599609375,
-0.01428985595703125,
-0.055419921875,
-0.045013427734375,
0.0323486328125,
0.0100860595703125,
0.00634002685546875,
-0.0180511474609375,
-0.0014801025390625,
-0.0014142990112304688,
0.0253448486328125,
0.01202392578125,
0.04327392578125,
-0.0036773681640625,
0.00830841064453125,
-0.00998687744140625,
0.0190887451171875,
0.01336669921875,
0.00856781005859375,
-0.008514404296875,
-0.0026874542236328125,
0.014678955078125,
0.06658935546875,
-0.0172271728515625,
-0.07415771484375,
-0.01189422607421875,
-0.04010009765625,
-0.002880096435546875,
0.0118865966796875,
-0.058074951171875,
-0.025421142578125,
0.0953369140625,
0.037353515625,
0.0369873046875,
-0.01483154296875,
0.0180511474609375,
-0.01523590087890625,
-0.03369140625,
-0.00666046142578125,
0.009979248046875,
-0.026580810546875,
-0.0163116455078125,
-0.004398345947265625,
-0.00991058349609375,
-0.01422119140625,
-0.0053253173828125,
-0.048828125,
-0.005901336669921875,
-0.024749755859375,
-0.0020294189453125,
-0.038909912109375,
-0.00873565673828125,
0.032440185546875,
-0.0281829833984375,
-0.0004944801330566406,
0.0017108917236328125,
0.005626678466796875,
0.008758544921875,
0.017974853515625,
0.037384033203125,
0.00643157958984375,
-0.034393310546875,
0.036956787109375,
0.011444091796875,
-0.00879669189453125,
-0.041961669921875,
-0.029144287109375,
-0.0104217529296875,
-0.01335906982421875,
-0.0031585693359375,
-0.00672149658203125,
0.0292510986328125,
-0.0264892578125,
-0.004489898681640625,
0.00867462158203125,
0.0157623291015625,
0.044036865234375,
-0.01318359375,
0.06268310546875,
0.029266357421875,
-0.047027587890625,
0.0254669189453125,
-0.006465911865234375,
0.01131439208984375,
0.010589599609375,
0.035125732421875,
-0.0452880859375,
0.0565185546875,
0.046295166015625,
0.014862060546875,
0.0281524658203125
] |
1fb535f4d13923edcdb52f8a399bef6ad6e3bd45
|
Wordpress Stackexchange
Q: Get current menu_order WordPress implements a simple order functionality by default.
What's the common method, to retrieve the menu_order for the current post or page?
A: You can try following code:
get_post_field( 'menu_order', $post_id);
|
Q: Get current menu_order WordPress implements a simple order functionality by default.
What's the common method, to retrieve the menu_order for the current post or page?
A: You can try following code:
get_post_field( 'menu_order', $post_id);
A: If you have the post with an $id:
$thispost = get_post($id);
$menu_order = $thispost->menu_order;
WordPress itself does not provide a function to get the menu_order, so you have to query the post-Object. If you are outside the loop, you can use the above function, however inside the loop you could also achieve this by:
global $post;
$menu_order = $post->menu_order;
The Menuorder is mainly used for Database Queries, as the Name says, do determine the Order of the output (if the menuorder is selected to be the order criteria).
|
wordpress
|
{
"language": "en",
"length": 124,
"provenance": "stackexchange_00019.jsonl.gz:428807",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84943"
}
|
[
0.060638427734375,
-0.0043182373046875,
0.03228759765625,
0.0063323974609375,
0.0159149169921875,
-0.030731201171875,
0.07183837890625,
-0.0318603515625,
0.01552581787109375,
0.01210784912109375,
-0.011932373046875,
-0.030120849609375,
-0.03460693359375,
-0.0307159423828125,
-0.0287322998046875,
-0.038055419921875,
0.04901123046875,
-0.017852783203125,
0.051788330078125,
0.0094757080078125,
0.004848480224609375,
0.04241943359375,
0.054656982421875,
0.044097900390625,
0.056610107421875,
-0.0099334716796875,
-0.0003447532653808594,
-0.00597381591796875,
0.032867431640625,
0.00687408447265625,
0.0340576171875,
-0.037994384765625,
0.00907135009765625,
-0.01352691650390625,
0.0269012451171875,
0.00785064697265625,
-0.01200103759765625,
0.00936126708984375,
0.024017333984375,
-0.00679779052734375,
0.02679443359375,
-0.00832366943359375,
0.00856781005859375,
-0.00434112548828125,
-0.0156707763671875,
-0.05230712890625,
0.03887939453125,
-0.00540924072265625,
-0.0023097991943359375,
-0.004791259765625,
0.012664794921875,
0.0037860870361328125,
0.00931549072265625,
0.0071868896484375,
-0.0173187255859375,
-0.0228271484375,
0.0167236328125,
-0.058807373046875,
0.03350830078125,
-0.010528564453125,
-0.029632568359375,
-0.0250701904296875,
0.0396728515625,
-0.0252838134765625,
-0.002132415771484375,
0.013763427734375,
0.0479736328125,
0.0228729248046875,
-0.05291748046875,
0.0035247802734375,
0.043670654296875,
-0.0250244140625,
-0.0034236907958984375,
0.018341064453125,
0.00469970703125,
-0.064697265625,
0.005054473876953125,
-0.06494140625,
0.0107879638671875,
0.05120849609375,
-0.0030994415283203125,
0.0083770751953125,
-0.0714111328125,
-0.0002636909484863281,
-0.021270751953125,
-0.003814697265625,
-0.0181121826171875,
-0.0048980712890625,
-0.0307464599609375,
-0.036651611328125,
-0.0287628173828125,
-0.02520751953125,
-0.0237884521484375,
-0.025543212890625,
-0.04132080078125,
-0.0281982421875,
0.0419921875,
0.06597900390625,
-0.032562255859375,
-0.009613037109375,
-0.0295867919921875,
-0.021148681640625,
0.00437164306640625,
-0.02166748046875,
-0.01143646240234375,
-0.0045166015625,
0.01546478271484375,
-0.0008344650268554688,
0.021575927734375,
0.0303192138671875,
-0.02099609375,
0.018096923828125,
-0.00922393798828125,
-0.03875732421875,
0.0131683349609375,
0.0152435302734375,
-0.044830322265625,
0.04486083984375,
0.01360321044921875,
0.00811767578125,
-0.01102447509765625,
0.016754150390625,
0.0184478759765625,
-0.0210723876953125,
0.0009098052978515625,
-0.0008554458618164062,
-0.021728515625,
-0.0308685302734375,
-0.0275421142578125,
0.050048828125,
-0.0281829833984375,
-0.01422882080078125,
0.02935791015625,
0.0302734375,
-0.01198577880859375,
-0.03851318359375,
0.006809234619140625,
-0.06695556640625,
0.00789642333984375,
0.00798797607421875,
-0.00547027587890625,
-0.0260009765625,
0.0026302337646484375,
-0.017608642578125,
-0.021697998046875,
0.00998687744140625,
0.007659912109375,
0.003143310546875,
-0.0217742919921875,
-0.000682830810546875,
-0.0517578125,
0.01641845703125,
0.0138092041015625,
0.0101165771484375,
0.0165557861328125,
0.0172576904296875,
0.018035888671875,
0.0016546249389648438,
-0.00965118408203125,
-0.00792694091796875,
-0.0280609130859375,
-0.0196380615234375,
0.0207061767578125,
-0.0254364013671875,
-0.05145263671875,
0.0406494140625,
-0.00894927978515625,
-0.0166778564453125,
0.03033447265625,
0.007228851318359375,
0.0242767333984375,
-0.033111572265625,
0.0198822021484375,
0.0131378173828125,
-0.006862640380859375,
0.0237274169921875,
-0.00896453857421875,
-0.037109375,
0.0134124755859375,
0.0509033203125,
-0.0142669677734375,
-0.03277587890625,
-0.05059814453125,
0.0102081298828125,
-0.050201416015625,
0.045501708984375,
0.017486572265625,
0.07269287109375,
0.0218505859375,
0.0287933349609375,
0.0087738037109375,
-0.005390167236328125,
-0.08258056640625,
0.02423095703125,
0.0082550048828125,
0.02154541015625,
-0.01038360595703125,
0.025299072265625,
-0.0036716461181640625,
-0.047271728515625,
-0.02655029296875,
-0.0004987716674804688,
-0.007678985595703125,
0.023712158203125,
-0.01397705078125,
-0.0094451904296875,
0.0037994384765625,
0.0272064208984375,
0.028167724609375,
-0.01488494873046875,
0.00334930419921875,
-0.004276275634765625,
-0.0038242340087890625,
-0.0472412109375,
-0.06573486328125,
0.036041259765625,
-0.053192138671875,
0.012725830078125,
-0.033203125,
0.036895751953125,
-0.06158447265625,
-0.03515625,
-0.052886962890625,
-0.005451202392578125,
0.0083770751953125,
-0.0010833740234375,
-0.0170440673828125,
-0.01401519775390625,
0.0244140625,
0.005031585693359375,
0.01421356201171875,
0.00795745849609375,
0.0160980224609375,
0.0068359375,
-0.0286712646484375,
-0.0137481689453125,
0.01023101806640625,
-0.04730224609375,
0.00576019287109375,
0.048797607421875,
0.029296875,
0.035980224609375,
0.0156402587890625,
0.01047515869140625,
0.05267333984375,
-0.02301025390625,
0.00919342041015625,
-0.0182037353515625,
0.00007927417755126953,
0.0516357421875,
0.01346588134765625,
0.0229339599609375,
0.006015777587890625,
0.0277862548828125,
-0.0211029052734375,
0.05352783203125,
-0.0009365081787109375,
0.0274200439453125,
-0.0031147003173828125,
0.0031909942626953125,
-0.004852294921875,
0.0080413818359375,
-0.00913238525390625,
0.003505706787109375,
0.02490234375,
0.019683837890625,
0.03863525390625,
0.035888671875,
-0.0281524658203125,
-0.008453369140625,
0.006885528564453125,
0.04071044921875,
0.00046944618225097656,
0.007080078125,
-0.0277099609375,
-0.01540374755859375,
-0.01525115966796875,
-0.0013151168823242188,
-0.0043182373046875,
-0.01131439208984375,
-0.005023956298828125,
-0.005931854248046875,
-0.0023746490478515625,
0.0005726814270019531,
0.00594329833984375,
-0.08062744140625,
0.017120361328125,
0.0289764404296875,
0.0069580078125,
0.00836181640625,
0.024017333984375,
0.02032470703125,
-0.030181884765625,
0.056793212890625,
-0.0196685791015625,
-0.00965118408203125,
0.0169219970703125,
-0.0061798095703125,
0.003231048583984375,
-0.0142974853515625,
0.0156402587890625,
0.037689208984375,
-0.00933837890625,
0.008270263671875,
0.005615234375,
-0.004062652587890625,
0.006381988525390625,
0.01053619384765625,
-0.0029449462890625,
0.0178680419921875,
-0.054656982421875,
0.03485107421875,
0.0095977783203125,
0.02008056640625,
-0.0208740234375,
-0.045989990234375,
-0.0177001953125,
0.005428314208984375,
-0.1019287109375,
-0.0904541015625,
-0.0007824897766113281,
-0.058685302734375,
0.0063629150390625,
-0.001434326171875,
-0.014556884765625,
-0.00499725341796875,
0.0151824951171875,
0.01116180419921875,
0.01439666748046875,
-0.01006317138671875,
-0.06903076171875,
-0.0239105224609375,
-0.083251953125,
0.0298614501953125,
-0.0160980224609375,
0.018707275390625,
0.00762176513671875,
0.0689697265625,
0.0027523040771484375,
-0.055145263671875,
-0.0012750625610351562,
-0.0243377685546875,
-0.0208740234375,
0.02166748046875,
0.01409912109375,
-0.0221405029296875,
0.00766754150390625,
0.011260986328125,
-0.01055908203125,
0.010009765625,
-0.00811767578125,
-0.0239715576171875,
-0.030059814453125,
0.01235198974609375,
0.010009765625,
0.02496337890625,
0.0147705078125,
0.0117645263671875,
0.03961181640625,
-0.0250701904296875,
-0.02313232421875,
-0.0218048095703125,
-0.04351806640625,
0.01512908935546875,
0.019683837890625,
-0.005680084228515625,
-0.0218658447265625,
0.03228759765625,
0.01216888427734375,
0.00498199462890625,
0.007678985595703125,
-0.019622802734375,
0.03375244140625,
0.0015077590942382812,
0.01238250732421875,
-0.0221710205078125,
0.040130615234375,
-0.00629425048828125,
0.022491455078125,
0.0165863037109375,
0.02142333984375,
-0.0101776123046875,
0.00675201416015625,
-0.04034423828125,
-0.040924072265625,
0.04022216796875,
-0.027191162109375,
0.0205841064453125,
-0.0404052734375,
-0.0263671875,
-0.01354217529296875,
0.10601806640625,
0.0106353759765625,
-0.02392578125,
-0.0161895751953125,
0.0034961700439453125,
-0.031707763671875,
-0.040069580078125,
-0.0205535888671875,
-0.00817108154296875,
-0.07159423828125,
-0.0078887939453125,
-0.0255889892578125,
-0.0240020751953125,
-0.0128173828125,
0.0153656005859375,
-0.050933837890625,
-0.03436279296875,
0.0538330078125,
-0.06304931640625,
0.022979736328125,
0.04779052734375,
-0.002788543701171875,
0.0139617919921875,
-0.036865234375,
-0.018798828125,
-0.044158935546875,
-0.0164794921875,
-0.02081298828125,
0.056488037109375,
0.040771484375,
-0.0217132568359375,
0.004817962646484375,
0.035552978515625,
0.00357818603515625,
0.04046630859375,
0.00844573974609375,
0.03253173828125,
0.0273590087890625,
-0.043670654296875,
-0.017303466796875,
-0.047637939453125,
-0.0020923614501953125,
-0.0081787109375,
-0.029296875,
-0.025726318359375,
-0.04034423828125,
0.0010690689086914062,
-0.00888824462890625,
-0.036773681640625,
-0.07122802734375,
-0.045257568359375,
-0.0298004150390625,
0.01483917236328125,
-0.0372314453125,
0.021636962890625,
-0.0275726318359375,
-0.07122802734375,
0.0214385986328125,
-0.02288818359375,
-0.01531219482421875,
0.00039577484130859375,
0.047607421875,
0.0194091796875,
-0.0017251968383789062,
-0.0031795501708984375,
-0.002166748046875,
0.0220489501953125,
0.0167236328125,
0.0391845703125,
0.0205230712890625,
-0.01532745361328125,
0.035186767578125,
0.0193328857421875,
-0.005176544189453125,
-0.02392578125,
0.0450439453125,
-0.006561279296875,
-0.002895355224609375,
-0.00005155801773071289,
-0.03851318359375,
0.0231170654296875,
0.0411376953125,
-0.033721923828125,
-0.0198822021484375,
-0.045440673828125,
0.0611572265625,
-0.0272064208984375,
0.040985107421875,
-0.051055908203125,
-0.028228759765625,
0.0014715194702148438,
0.043670654296875,
0.0180206298828125,
0.04376220703125,
-0.012603759765625,
0.04547119140625,
0.04150390625,
-0.0022296905517578125,
0.0068359375,
0.047882080078125,
0.008941650390625,
0.03802490234375,
-0.00821685791015625,
0.0025005340576171875,
-0.0191192626953125,
-0.00814056396484375,
0.0784912109375,
-0.01343536376953125,
-0.048431396484375,
-0.0223541259765625,
-0.006381988525390625,
0.022003173828125,
0.0237579345703125,
-0.056976318359375,
0.0303192138671875,
0.036712646484375,
-0.0190582275390625,
0.00862884521484375,
-0.038604736328125,
-0.003875732421875,
-0.0311431884765625,
0.045257568359375,
-0.0016908645629882812,
0.010986328125,
0.0254364013671875,
0.08526611328125,
-0.01244354248046875,
0.056365966796875,
-0.015533447265625,
0.027740478515625,
-0.0139617919921875,
0.020263671875,
-0.002689361572265625,
0.01448822021484375,
0.0272064208984375,
-0.006938934326171875,
0.0333251953125,
-0.015960693359375,
-0.0267486572265625,
0.007694244384765625,
-0.003025054931640625,
-0.0195465087890625,
0.017364501953125,
0.0384521484375,
0.0311126708984375,
-0.008270263671875,
0.036468505859375,
0.01224517822265625,
-0.04833984375,
-0.030853271484375,
0.0222015380859375,
0.038238525390625,
-0.01019287109375,
-0.01837158203125,
0.046112060546875,
0.024627685546875,
0.0518798828125,
-0.029693603515625,
-0.0235595703125,
0.020538330078125,
0.0294952392578125,
-0.0108489990234375,
0.01043701171875,
0.01611328125,
-0.056243896484375,
-0.04248046875,
-0.0000909566879272461,
-0.010345458984375,
0.05718994140625,
-0.0279388427734375,
0.039215087890625,
-0.052001953125,
0.0099639892578125,
-0.04412841796875,
0.0080413818359375,
0.052398681640625,
0.038848876953125,
-0.0198974609375,
-0.005466461181640625,
-0.06280517578125,
-0.032684326171875,
0.0179901123046875,
-0.03167724609375,
-0.036346435546875,
-0.02203369140625,
-0.0135040283203125,
0.006931304931640625,
0.02587890625,
0.0421142578125,
-0.0238494873046875,
0.0102996826171875,
0.0037250518798828125,
0.02069091796875,
0.0109710693359375,
0.11083984375,
-0.0234832763671875,
0.07452392578125,
0.023101806640625,
0.049774169921875,
-0.0655517578125,
-0.006832122802734375,
0.023101806640625,
-0.0036525726318359375,
-0.04425048828125,
-0.01910400390625,
-0.020721435546875,
-0.032073974609375,
-0.000024497509002685547,
-0.0192413330078125,
0.0285491943359375,
-0.006549835205078125,
0.0137939453125,
-0.0196685791015625,
-0.0450439453125,
-0.04425048828125,
-0.0294342041015625,
0.0081787109375,
-0.01042938232421875,
0.00909423828125,
0.00044083595275878906,
0.0210418701171875,
0.0008645057678222656,
-0.037506103515625,
0.01739501953125,
0.019317626953125,
-0.050048828125,
0.073486328125,
0.07928466796875,
0.0191650390625,
0.03509521484375,
-0.002788543701171875,
0.0098876953125,
-0.00853729248046875,
0.01226806640625,
-0.019500732421875,
-0.0001901388168334961,
0.054046630859375,
0.007232666015625,
-0.010284423828125,
0.040374755859375,
-0.0258941650390625,
0.0494384765625,
0.0267486572265625,
0.10833740234375,
-0.059661865234375,
0.04058837890625,
0.0509033203125,
-0.051849365234375,
0.01461029052734375,
0.013519287109375,
-0.018707275390625,
-0.0203094482421875,
0.035736083984375,
-0.06329345703125,
-0.0195159912109375,
0.01393890380859375,
-0.020751953125,
-0.011932373046875,
-0.0173492431640625,
0.049285888671875,
-0.003177642822265625,
0.0197906494140625,
-0.053863525390625,
-0.0205535888671875,
-0.00473785400390625,
-0.033782958984375,
0.0184783935546875,
0.006938934326171875,
0.020263671875,
-0.00823974609375,
0.075927734375,
-0.029998779296875,
0.04541015625,
0.016387939453125,
-0.016845703125,
-0.018951416015625,
0.038604736328125,
-0.035064697265625,
0.0197906494140625,
0.004520416259765625,
-0.03948974609375,
-0.0025653839111328125,
-0.037506103515625,
0.02313232421875,
0.033660888671875,
-0.03564453125,
0.0158233642578125,
0.0030422210693359375,
-0.039093017578125,
-0.0230255126953125,
-0.04376220703125,
0.09033203125,
-0.0711669921875,
0.0026493072509765625,
0.0066986083984375,
0.0543212890625,
0.01331329345703125,
-0.0016307830810546875,
0.019073486328125,
-0.0022487640380859375,
0.051177978515625,
0.00513458251953125,
0.0609130859375,
0.003997802734375,
0.006420135498046875,
-0.04498291015625,
0.0689697265625,
-0.0085906982421875,
-0.0006570816040039062,
0.0078582763671875,
0.031585693359375,
-0.003421783447265625,
0.025115966796875,
-0.043243408203125,
0.045684814453125,
0.0015497207641601562,
0.020294189453125,
-0.08172607421875,
-0.0206298828125,
-0.024169921875,
0.053955078125,
0.05029296875,
0.0177459716796875,
-0.04931640625,
-0.00829315185546875,
0.058319091796875,
0.073974609375,
0.02508544921875,
0.030517578125,
0.0119476318359375,
0.01383209228515625,
0.0401611328125,
-0.0290985107421875,
0.0194549560546875,
-0.0157928466796875,
-0.002223968505859375,
0.03228759765625,
0.020599365234375,
0.01184844970703125,
-0.0029296875,
-0.006137847900390625,
-0.032745361328125,
0.0111236572265625,
0.0251617431640625,
0.0012416839599609375,
-0.00901031494140625,
0.0660400390625,
0.031402587890625,
-0.01177215576171875,
-0.0242767333984375,
-0.030364990234375,
0.0279388427734375,
0.0060577392578125,
0.0164947509765625,
0.0242156982421875,
0.03338623046875,
0.0104217529296875,
-0.037933349609375,
0.005466461181640625,
-0.0017442703247070312,
-0.0411376953125,
0.06231689453125,
0.0221710205078125,
0.02459716796875,
-0.027923583984375,
-0.0295562744140625,
0.0273590087890625,
0.0731201171875,
-0.030517578125,
0.0245513916015625,
0.0216217041015625,
-0.00617218017578125,
-0.0020389556884765625,
-0.04547119140625,
0.0211334228515625,
0.00838470458984375,
-0.0200042724609375,
-0.03875732421875,
-0.01409912109375,
0.028961181640625,
0.040863037109375,
-0.00811767578125,
-0.00238037109375,
-0.051971435546875,
-0.0181884765625,
-0.057403564453125,
0.05535888671875,
0.0290069580078125,
0.0233001708984375,
-0.040740966796875,
0.0853271484375,
0.00565338134765625,
0.0133514404296875,
-0.00370025634765625,
0.0433349609375,
0.01021575927734375,
0.0073394775390625,
-0.0096588134765625,
-0.0248565673828125,
-0.01220703125,
0.0258941650390625,
0.0243988037109375,
0.03045654296875,
0.03338623046875,
-0.006450653076171875,
-0.03192138671875,
0.0037441253662109375,
0.039154052734375,
-0.0179443359375,
-0.021148681640625,
-0.013275146484375,
-0.0261688232421875,
0.0079498291015625,
-0.0168609619140625,
0.031341552734375,
0.0018968582153320312,
0.02386474609375,
-0.0079193115234375,
0.050994873046875,
0.006763458251953125,
0.03436279296875,
0.0204315185546875,
-0.00960540771484375,
-0.024566650390625,
0.01947021484375,
-0.0877685546875,
-0.0345458984375,
-0.05487060546875,
0.02630615234375,
0.04315185546875,
0.03875732421875,
0.039306640625,
-0.0178375244140625,
-0.003421783447265625,
0.010589599609375,
-0.006519317626953125,
-0.01551055908203125,
0.0333251953125,
0.04742431640625,
0.01346588134765625,
0.04376220703125,
-0.059722900390625,
-0.036712646484375,
-0.01666259765625,
0.00826263427734375,
0.04248046875,
-0.05364990234375,
0.0657958984375,
0.0421142578125,
-0.01181793212890625,
0.0099334716796875,
-0.0236358642578125,
-0.015838623046875,
0.0244293212890625,
0.0017566680908203125,
-0.0027599334716796875,
-0.0196075439453125,
-0.01253509521484375,
-0.0020236968994140625,
0.06378173828125,
-0.017578125,
-0.005157470703125,
-0.0255889892578125,
0.031982421875,
-0.043548583984375,
0.0239105224609375,
-0.01224517822265625,
-0.0233001708984375,
-0.00843048095703125,
-0.015350341796875,
0.025360107421875,
0.055145263671875,
0.0267333984375,
0.0052032470703125,
0.0048980712890625,
-0.04486083984375,
0.004741668701171875,
-0.000995635986328125,
0.0257568359375,
0.03619384765625,
-0.01555633544921875,
0.0308990478515625,
0.00807952880859375,
-0.014678955078125,
0.020599365234375,
0.023773193359375,
-0.031982421875,
0.0212554931640625,
-0.0283660888671875,
0.06097412109375,
-0.0166778564453125,
0.0521240234375,
-0.0006437301635742188,
-0.003795623779296875,
0.0002390146255493164,
0.01910400390625,
-0.0079345703125,
-0.0210418701171875,
-0.0162506103515625,
-0.0260772705078125,
-0.0222015380859375,
-0.00434112548828125,
-0.01070404052734375,
-0.0195770263671875,
0.0162506103515625,
-0.04107666015625,
-0.007144927978515625,
-0.0209197998046875,
0.03271484375,
-0.024749755859375,
-0.0003249645233154297,
-0.0330810546875,
-0.036834716796875,
-0.0304412841796875,
0.0224609375,
0.03582763671875,
-0.0214691162109375,
0.0172882080078125,
-0.0233612060546875,
-0.050872802734375,
-0.0170745849609375,
0.01396942138671875,
0.01409912109375,
-0.02496337890625,
-0.0213165283203125,
0.03802490234375,
0.017822265625,
0.08575439453125,
0.028961181640625,
-0.03814697265625,
0.01010894775390625,
0.004978179931640625,
-0.01470947265625,
-0.046630859375,
0.029083251953125,
-0.067138671875,
-0.0006251335144042969,
-0.061614990234375,
0.0243377685546875,
0.04132080078125,
-0.02813720703125,
-0.07513427734375,
0.051544189453125,
-0.042572021484375,
-0.0328369140625,
-0.029876708984375,
-0.0232696533203125,
0.0005865097045898438,
0.006633758544921875,
-0.00927734375,
-0.051116943359375,
-0.04498291015625,
0.03350830078125,
0.00632476806640625,
0.05072021484375,
0.0199737548828125,
0.0041656494140625,
-0.055450439453125,
-0.01120758056640625,
-0.050750732421875,
0.0223541259765625,
0.014434814453125,
-0.006221771240234375,
-0.0023193359375,
0.02459716796875,
-0.058990478515625,
-0.043701171875,
-0.0287628173828125,
0.0228271484375,
-0.006984710693359375,
-0.0151519775390625,
0.00617218017578125,
0.0174102783203125,
0.008544921875,
0.049102783203125,
-0.0040740966796875,
-0.041168212890625,
-0.00301361083984375,
-0.003265380859375,
-0.04217529296875,
-0.03387451171875,
0.0298309326171875,
-0.0797119140625,
-0.026763916015625,
-0.004383087158203125,
-0.017425537109375,
-0.027374267578125,
0.01097869873046875,
-0.04840087890625,
-0.0031108856201171875,
-0.0168304443359375,
-0.005847930908203125,
-0.05780029296875,
-0.00949859619140625,
0.08233642578125,
-0.060516357421875,
-0.017059326171875,
0.019439697265625,
0.007274627685546875,
0.0257720947265625,
0.0037841796875,
0.0023555755615234375,
0.033172607421875,
-0.046539306640625,
-0.039581298828125,
0.02593994140625,
0.02508544921875,
0.028778076171875,
-0.01453399658203125,
-0.0201416015625,
0.0305023193359375,
0.029449462890625,
0.031280517578125,
-0.0285797119140625,
0.01496124267578125,
0.0323486328125,
-0.01038360595703125,
-0.0129547119140625,
0.0537109375,
0.0081939697265625,
0.03912353515625,
-0.01509857177734375,
-0.0235748291015625,
0.039154052734375,
-0.060821533203125,
-0.005374908447265625,
0.007568359375,
-0.0072174072265625,
-0.0100250244140625,
0.0202178955078125,
-0.01251983642578125,
-0.0034122467041015625,
0.00901031494140625
] |
3617948fde46884b6a092847251899b2ba345d87
|
Wordpress Stackexchange
Q: Theme Customization API and child themes I've recently developed a parent theme that makes heavy use of the Theme Customization API. Is there an easy way to port these settings when a user activates one of my child themes? Currently, the data previously saved in the Customize screen disappears when activating a child theme. Of course, once they reactivate the parent theme, the settings return.
Any dealt with this yet?
A: There is already an answer about this question with explicable examples How do I get a parent theme modification from a child theme?.
You can also check about get_theme_mod here https://developer.wordpress.org/reference/functions/get_theme_mod/
|
Q: Theme Customization API and child themes I've recently developed a parent theme that makes heavy use of the Theme Customization API. Is there an easy way to port these settings when a user activates one of my child themes? Currently, the data previously saved in the Customize screen disappears when activating a child theme. Of course, once they reactivate the parent theme, the settings return.
Any dealt with this yet?
A: There is already an answer about this question with explicable examples How do I get a parent theme modification from a child theme?.
You can also check about get_theme_mod here https://developer.wordpress.org/reference/functions/get_theme_mod/
|
wordpress
|
{
"language": "en",
"length": 103,
"provenance": "stackexchange_00019.jsonl.gz:428810",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84965"
}
|
[
-0.01114654541015625,
-0.0030460357666015625,
-0.01125335693359375,
-0.0191650390625,
-0.0008339881896972656,
0.0067291259765625,
0.0157928466796875,
-0.0159454345703125,
-0.035308837890625,
0.02734375,
0.0111083984375,
-0.003818511962890625,
-0.007080078125,
-0.0305938720703125,
-0.00688934326171875,
-0.03411865234375,
0.036895751953125,
-0.01399993896484375,
0.01434326171875,
-0.01136016845703125,
-0.0240936279296875,
0.0016088485717773438,
0.041595458984375,
0.0784912109375,
0.05572509765625,
-0.0192718505859375,
-0.0108489990234375,
-0.0238037109375,
0.031890869140625,
-0.00982666015625,
0.0285491943359375,
-0.00030875205993652344,
0.005615234375,
-0.0059661865234375,
0.04443359375,
-0.029083251953125,
0.0203857421875,
-0.006572723388671875,
0.0167083740234375,
0.0207366943359375,
0.0142974853515625,
-0.01499176025390625,
-0.016754150390625,
0.015289306640625,
-0.0209503173828125,
-0.048553466796875,
0.0298309326171875,
-0.0249176025390625,
-0.0224456787109375,
0.0108184814453125,
0.0419921875,
-0.0241851806640625,
0.046661376953125,
-0.0226287841796875,
-0.012481689453125,
-0.020416259765625,
0.0052490234375,
0.0141754150390625,
0.0377197265625,
-0.0272674560546875,
-0.050018310546875,
-0.0017328262329101562,
0.022216796875,
-0.01485443115234375,
0.0499267578125,
0.009918212890625,
-0.0217742919921875,
0.034698486328125,
-0.062255859375,
0.03900146484375,
0.0389404296875,
-0.0740966796875,
0.004638671875,
0.00034332275390625,
-0.0076446533203125,
-0.02239990234375,
-0.0261688232421875,
-0.026580810546875,
0.038543701171875,
0.01306915283203125,
0.0139923095703125,
0.021148681640625,
-0.0289459228515625,
-0.054290771484375,
0.038177490234375,
-0.029693603515625,
-0.003276824951171875,
-0.012237548828125,
-0.02386474609375,
0.006931304931640625,
-0.023651123046875,
-0.062042236328125,
-0.01401519775390625,
0.069580078125,
0.006954193115234375,
0.01532745361328125,
0.031707763671875,
0.0202789306640625,
-0.0139617919921875,
0.01177215576171875,
0.0013723373413085938,
-0.046722412109375,
0.04974365234375,
-0.039215087890625,
0.00794219970703125,
0.0018472671508789062,
0.00931549072265625,
-0.040924072265625,
0.025604248046875,
0.01364898681640625,
-0.023040771484375,
0.0670166015625,
0.02130126953125,
0.002872467041015625,
-0.0248260498046875,
-0.00901031494140625,
-0.0068817138671875,
0.01178741455078125,
0.005092620849609375,
-0.005214691162109375,
-0.01132965087890625,
0.007793426513671875,
-0.035675048828125,
-0.0159149169921875,
-0.0205230712890625,
-0.037506103515625,
-0.041351318359375,
0.025604248046875,
0.01233673095703125,
0.0256805419921875,
-0.0295257568359375,
-0.003124237060546875,
0.06793212890625,
0.04534912109375,
0.023834228515625,
-0.0312347412109375,
0.011505126953125,
-0.01088714599609375,
0.0186767578125,
-0.0037212371826171875,
0.045318603515625,
-0.03765869140625,
-0.020599365234375,
0.028778076171875,
-0.00390625,
0.0079193115234375,
0.0091094970703125,
0.016082763671875,
0.0079803466796875,
-0.0482177734375,
0.05029296875,
-0.040313720703125,
0.01122283935546875,
0.0246734619140625,
0.031463623046875,
-0.01177978515625,
0.05682373046875,
-0.03289794921875,
0.00994873046875,
-0.0477294921875,
0.00327301025390625,
-0.016082763671875,
-0.006008148193359375,
0.02001953125,
-0.0237884521484375,
0.0207366943359375,
0.0224761962890625,
0.00348663330078125,
0.00797271728515625,
-0.0236358642578125,
0.04351806640625,
-0.0222625732421875,
-0.06817626953125,
-0.0027637481689453125,
0.0253448486328125,
0.00553131103515625,
-0.02093505859375,
0.006855010986328125,
0.036651611328125,
0.003971099853515625,
0.004180908203125,
-0.03173828125,
0.0127716064453125,
0.023162841796875,
-0.0362548828125,
0.031158447265625,
-0.005268096923828125,
0.0294952392578125,
0.0025577545166015625,
0.0241851806640625,
-0.0147857666015625,
0.032958984375,
-0.05230712890625,
-0.0099945068359375,
0.00962066650390625,
0.01678466796875,
-0.02471923828125,
0.0017614364624023438,
-0.0140838623046875,
-0.001041412353515625,
-0.0290679931640625,
-0.031219482421875,
0.037933349609375,
-0.0158233642578125,
0.0006403923034667969,
-0.007404327392578125,
-0.0181732177734375,
0.038055419921875,
0.0029354095458984375,
0.0227508544921875,
-0.006816864013671875,
-0.030731201171875,
-0.000919342041015625,
0.0019140243530273438,
0.003543853759765625,
0.0098876953125,
0.0014553070068359375,
0.0426025390625,
0.028228759765625,
0.0252227783203125,
0.06329345703125,
0.005191802978515625,
0.04022216796875,
0.015594482421875,
0.029266357421875,
-0.0167999267578125,
-0.014739990234375,
-0.026641845703125,
0.0299835205078125,
-0.00605010986328125,
0.01509857177734375,
0.0322265625,
0.034393310546875,
0.0018482208251953125,
-0.039215087890625,
-0.01418304443359375,
-0.0189361572265625,
-0.05340576171875,
0.004001617431640625,
0.06396484375,
0.0204315185546875,
0.033721923828125,
-0.0234375,
-0.0033969879150390625,
0.0650634765625,
0.01284027099609375,
0.005306243896484375,
-0.007732391357421875,
0.050872802734375,
0.052398681640625,
-0.007625579833984375,
-0.0491943359375,
0.005519866943359375,
-0.046234130859375,
0.0311431884765625,
-0.0034275054931640625,
-0.0263671875,
-0.0167999267578125,
-0.0110626220703125,
-0.00004690885543823242,
0.00862884521484375,
-0.0167236328125,
-0.0125274658203125,
-0.006496429443359375,
0.003826141357421875,
0.04461669921875,
0.0212860107421875,
0.01513671875,
-0.038177490234375,
0.03472900390625,
0.01837158203125,
0.00439453125,
0.004848480224609375,
0.035797119140625,
0.02569580078125,
0.00013065338134765625,
-0.00733184814453125,
-0.0294342041015625,
0.0002899169921875,
0.019622802734375,
-0.01018524169921875,
0.0014562606811523438,
-0.031097412109375,
-0.0173797607421875,
0.0239410400390625,
-0.036224365234375,
-0.010711669921875,
0.024505615234375,
-0.01155853271484375,
0.019683837890625,
0.01322174072265625,
0.0655517578125,
-0.01242828369140625,
0.0284423828125,
0.02362060546875,
0.02032470703125,
-0.0172576904296875,
-0.0213623046875,
0.02569580078125,
-0.0274200439453125,
0.000035643577575683594,
0.055633544921875,
-0.006916046142578125,
0.01947021484375,
0.01082611083984375,
0.00038552284240722656,
0.036865234375,
0.007648468017578125,
0.0254058837890625,
-0.018402099609375,
0.0012302398681640625,
0.00853729248046875,
0.021575927734375,
0.03692626953125,
-0.0194091796875,
-0.052581787109375,
-0.0148468017578125,
0.01532745361328125,
-0.05352783203125,
-0.0322265625,
-0.001232147216796875,
-0.061279296875,
-0.0240325927734375,
-0.038665771484375,
-0.043365478515625,
0.01201629638671875,
-0.0421142578125,
-0.00534820556640625,
0.03082275390625,
-0.062744140625,
-0.0135955810546875,
-0.0670166015625,
-0.07220458984375,
-0.061767578125,
0.020233154296875,
-0.00946807861328125,
-0.017791748046875,
0.07568359375,
-0.00949859619140625,
-0.06500244140625,
-0.037353515625,
-0.01114654541015625,
0.01119232177734375,
0.00521087646484375,
0.003208160400390625,
-0.003444671630859375,
0.0303802490234375,
0.008392333984375,
-0.021514892578125,
0.0267486572265625,
-0.0280303955078125,
-0.0265350341796875,
-0.0126953125,
0.030364990234375,
-0.03411865234375,
0.0562744140625,
0.054229736328125,
0.0018711090087890625,
-0.009429931640625,
-0.05108642578125,
-0.0479736328125,
0.0006718635559082031,
-0.06951904296875,
0.005283355712890625,
0.050384521484375,
0.012725830078125,
-0.01018524169921875,
-0.01100921630859375,
0.0201568603515625,
-0.0196380615234375,
0.00492095947265625,
-0.021392822265625,
0.072509765625,
0.00798797607421875,
0.01345062255859375,
-0.03082275390625,
0.0171356201171875,
-0.0252227783203125,
0.014923095703125,
-0.0016326904296875,
0.00024628639221191406,
-0.011962890625,
-0.027313232421875,
-0.04864501953125,
-0.041748046875,
0.02984619140625,
-0.0029926300048828125,
0.0274810791015625,
-0.0247802734375,
-0.0281982421875,
0.00281524658203125,
0.08660888671875,
-0.0596923828125,
-0.0144500732421875,
-0.000040590763092041016,
0.0174407958984375,
-0.05413818359375,
-0.0094146728515625,
-0.06195068359375,
-0.0033206939697265625,
-0.0902099609375,
-0.00257110595703125,
-0.016876220703125,
-0.0281219482421875,
-0.0010271072387695312,
0.01280975341796875,
-0.044097900390625,
-0.038818359375,
0.0289764404296875,
-0.0163421630859375,
0.0148162841796875,
-0.0084686279296875,
-0.0021839141845703125,
-0.01279449462890625,
-0.01085662841796875,
-0.01340484619140625,
-0.0328369140625,
-0.015472412109375,
-0.0136260986328125,
0.033599853515625,
0.045440673828125,
-0.06182861328125,
0.0198974609375,
0.05572509765625,
0.029022216796875,
0.05206298828125,
-0.0185546875,
-0.019195556640625,
0.0008592605590820312,
-0.02484130859375,
-0.0066375732421875,
-0.023529052734375,
-0.01294708251953125,
-0.00800323486328125,
-0.035125732421875,
0.01534271240234375,
-0.00518035888671875,
0.0186920166015625,
0.032073974609375,
-0.0266876220703125,
-0.04107666015625,
-0.01483917236328125,
-0.04302978515625,
-0.024261474609375,
-0.012542724609375,
-0.0183258056640625,
0.002292633056640625,
-0.03564453125,
0.01407623291015625,
-0.024566650390625,
-0.006122589111328125,
0.006542205810546875,
0.047607421875,
0.032745361328125,
-0.0075531005859375,
0.01407623291015625,
-0.021453857421875,
0.0285797119140625,
0.0291900634765625,
0.0189666748046875,
-0.003108978271484375,
-0.03997802734375,
0.048492431640625,
0.0231475830078125,
-0.00745391845703125,
0.0009713172912597656,
0.0740966796875,
-0.002857208251953125,
-0.011871337890625,
0.020599365234375,
0.01345062255859375,
-0.0105438232421875,
-0.00344085693359375,
-0.02215576171875,
-0.0179595947265625,
-0.030548095703125,
0.0303192138671875,
-0.002044677734375,
0.027740478515625,
-0.0400390625,
-0.01450347900390625,
0.010650634765625,
0.004734039306640625,
-0.0192718505859375,
0.0079498291015625,
0.0015268325805664062,
-0.04498291015625,
-0.0599365234375,
0.039794921875,
-0.02764892578125,
0.052154541015625,
-0.057037353515625,
0.07122802734375,
-0.044158935546875,
0.005237579345703125,
-0.0251617431640625,
-0.003078460693359375,
0.04681396484375,
-0.032379150390625,
-0.030487060546875,
-0.02520751953125,
-0.02691650390625,
0.033447265625,
0.0229034423828125,
-0.02069091796875,
0.02392578125,
0.0286865234375,
-0.005954742431640625,
0.003269195556640625,
-0.01189422607421875,
0.01904296875,
-0.03936767578125,
-0.006587982177734375,
-0.004665374755859375,
-0.01105499267578125,
0.01250457763671875,
0.043060302734375,
-0.01132965087890625,
0.03033447265625,
-0.01387786865234375,
-0.034698486328125,
-0.0307464599609375,
0.024383544921875,
0.01232147216796875,
0.00545501708984375,
0.0384521484375,
-0.0276336669921875,
0.069580078125,
-0.0143280029296875,
-0.0242156982421875,
0.045166015625,
0.05780029296875,
0.019012451171875,
0.004245758056640625,
-0.02154541015625,
-0.01922607421875,
-0.0203399658203125,
-0.004703521728515625,
-0.036834716796875,
-0.02166748046875,
0.0048675537109375,
0.033599853515625,
0.0291290283203125,
0.018646240234375,
-0.027679443359375,
0.020477294921875,
-0.040191650390625,
-0.00701141357421875,
0.0108795166015625,
-0.05316162109375,
0.0264739990234375,
0.0283355712890625,
-0.049774169921875,
0.005077362060546875,
0.007244110107421875,
-0.062408447265625,
-0.063232421875,
0.0035114288330078125,
-0.0163116455078125,
0.0300445556640625,
-0.002025604248046875,
0.0153656005859375,
-0.04913330078125,
0.030120849609375,
-0.03704833984375,
-0.0088958740234375,
0.06768798828125,
0.0098114013671875,
-0.0675048828125,
0.019256591796875,
-0.055908203125,
0.0024738311767578125,
-0.06439208984375,
-0.07586669921875,
-0.06707763671875,
0.0012722015380859375,
-0.016448974609375,
0.022857666015625,
-0.024169921875,
-0.011474609375,
-0.024505615234375,
0.0186004638671875,
0.0007228851318359375,
0.02569580078125,
0.00024890899658203125,
0.0728759765625,
-0.02587890625,
0.0438232421875,
0.0152740478515625,
0.010284423828125,
-0.045562744140625,
-0.0033817291259765625,
0.01561737060546875,
0.021148681640625,
-0.026947021484375,
-0.0374755859375,
0.0138397216796875,
0.006031036376953125,
0.06689453125,
-0.01019287109375,
0.054901123046875,
-0.044342041015625,
0.0027599334716796875,
-0.01165771484375,
0.0226898193359375,
-0.08135986328125,
-0.020904541015625,
0.045013427734375,
-0.040496826171875,
-0.036407470703125,
0.0161590576171875,
-0.0111846923828125,
0.03167724609375,
0.0068511962890625,
0.01541900634765625,
0.0091094970703125,
-0.073486328125,
0.06634521484375,
0.064208984375,
-0.017120361328125,
0.044403076171875,
-0.007488250732421875,
-0.0021514892578125,
0.01325225830078125,
0.0271148681640625,
-0.0438232421875,
-0.004169464111328125,
-0.0014858245849609375,
0.0004930496215820312,
-0.0014524459838867188,
-0.0243377685546875,
-0.006328582763671875,
-0.0244293212890625,
0.0078582763671875,
0.046478271484375,
-0.04193115234375,
0.00501251220703125,
0.01338958740234375,
0.0200653076171875,
0.00543212890625,
0.013702392578125,
-0.0096282958984375,
-0.01273345947265625,
-0.01496124267578125,
-0.0243072509765625,
-0.01454925537109375,
0.0024776458740234375,
-0.00897979736328125,
-0.005153656005859375,
-0.0303955078125,
0.02471923828125,
0.00274658203125,
0.01551055908203125,
-0.0008068084716796875,
-0.006885528564453125,
0.00246429443359375,
-0.01177978515625,
0.007785797119140625,
0.0048065185546875,
-0.0394287109375,
-0.07061767578125,
-0.0060577392578125,
-0.01081085205078125,
-0.02484130859375,
-0.03131103515625,
-0.040985107421875,
0.024261474609375,
0.0469970703125,
-0.04705810546875,
0.004886627197265625,
0.0091094970703125,
0.00440216064453125,
-0.03192138671875,
-0.0060272216796875,
0.02825927734375,
0.017059326171875,
-0.058441162109375,
0.0159912109375,
-0.047607421875,
0.0011844635009765625,
-0.0190582275390625,
0.02191162109375,
0.05841064453125,
-0.03179931640625,
-0.0146026611328125,
0.05535888671875,
0.0229339599609375,
-0.031097412109375,
-0.031829833984375,
0.0208740234375,
-0.05242919921875,
-0.0011348724365234375,
-0.01544189453125,
0.0033359527587890625,
0.0017528533935546875,
-0.03863525390625,
-0.046051025390625,
0.1253662109375,
-0.040679931640625,
0.0430908203125,
0.02520751953125,
0.0517578125,
-0.03094482421875,
0.01165771484375,
-0.0102691650390625,
0.05902099609375,
0.040252685546875,
0.0142364501953125,
-0.039215087890625,
-0.0154266357421875,
-0.00005441904067993164,
0.055694580078125,
0.05645751953125,
-0.0008716583251953125,
-0.0246734619140625,
0.003551483154296875,
0.0277099609375,
-0.025115966796875,
-0.0450439453125,
0.0714111328125,
-0.01739501953125,
-0.011932373046875,
0.032257080078125,
-0.030242919921875,
0.010772705078125,
0.01274871826171875,
-0.00937652587890625,
0.0010309219360351562,
-0.004222869873046875,
-0.02301025390625,
0.0216827392578125,
0.0266571044921875,
-0.028106689453125,
-0.0009593963623046875,
0.0082855224609375,
-0.033294677734375,
-0.006046295166015625,
0.01617431640625,
0.0312042236328125,
-0.01274871826171875,
0.0005526542663574219,
-0.018035888671875,
0.033538818359375,
0.0213470458984375,
0.0212554931640625,
-0.076904296875,
0.01094818115234375,
-0.058563232421875,
-0.0343017578125,
-0.013427734375,
0.09271240234375,
-0.10845947265625,
0.04083251953125,
0.0275115966796875,
0.038421630859375,
-0.006195068359375,
0.0084991455078125,
-0.0129547119140625,
0.040771484375,
-0.023284912109375,
-0.0701904296875,
0.0220489501953125,
0.02197265625,
-0.0004303455352783203,
0.0362548828125,
0.030059814453125,
-0.0158843994140625,
0.04595947265625,
-0.01837158203125,
-0.0016145706176757812,
0.03399658203125,
0.04296875,
0.01708984375,
0.062469482421875,
-0.08294677734375,
-0.037872314453125,
-0.004787445068359375,
-0.04180908203125,
0.0013895034790039062,
0.0214080810546875,
0.04254150390625,
0.0303497314453125,
-0.019683837890625,
-0.0152130126953125,
-0.0203399658203125,
0.004566192626953125,
0.0273895263671875,
0.01226806640625,
-0.02459716796875,
0.0169525146484375,
0.01385498046875,
0.0280609130859375,
0.00860595703125,
-0.007244110107421875,
0.040740966796875,
0.0386962890625,
-0.03240966796875,
-0.01345062255859375,
0.0233917236328125,
-0.0106353759765625,
0.02716064453125,
-0.031707763671875,
0.0245208740234375,
0.023590087890625,
-0.0050201416015625,
-0.0190277099609375,
-0.007354736328125,
0.062744140625,
0.00273895263671875,
0.035675048828125,
-0.00362396240234375,
-0.004665374755859375,
0.01274871826171875,
0.0157318115234375,
0.047607421875,
0.0330810546875,
-0.08050537109375,
-0.0240325927734375,
-0.00685882568359375,
-0.01404571533203125,
0.02581787109375,
0.03924560546875,
-0.027496337890625,
0.039825439453125,
-0.0340576171875,
-0.0104827880859375,
0.0119171142578125,
0.00885772705078125,
-0.0199432373046875,
0.0023555755615234375,
0.00998687744140625,
-0.0100860595703125,
-0.0908203125,
-0.0399169921875,
-0.055206298828125,
0.029937744140625,
0.007007598876953125,
0.06304931640625,
0.00212860107421875,
0.0341796875,
-0.003452301025390625,
0.0176849365234375,
-0.0281829833984375,
-0.02044677734375,
0.048187255859375,
-0.01261138916015625,
-0.00738525390625,
-0.0025634765625,
-0.08172607421875,
0.033966064453125,
0.0321044921875,
0.00785064697265625,
0.035919189453125,
0.01629638671875,
0.0002772808074951172,
-0.0278472900390625,
-0.00811767578125,
-0.0333251953125,
-0.04052734375,
-0.03521728515625,
0.009033203125,
-0.012725830078125,
-0.0218963623046875,
-0.0246734619140625,
-0.0090789794921875,
0.0540771484375,
0.007373809814453125,
0.01499176025390625,
0.047515869140625,
0.01383209228515625,
0.0271453857421875,
-0.016357421875,
-0.060546875,
0.013458251953125,
-0.0084381103515625,
-0.005306243896484375,
0.0164642333984375,
0.04522705078125,
0.036407470703125,
-0.01528167724609375,
0.040283203125,
0.05450439453125,
0.046966552734375,
-0.033905029296875,
0.0007386207580566406,
0.0692138671875,
-0.01053619384765625,
0.040557861328125,
-0.07135009765625,
-0.0302276611328125,
-0.0804443359375,
0.023834228515625,
0.044342041015625,
-0.03741455078125,
0.0199737548828125,
-0.03509521484375,
0.0213470458984375,
0.048370361328125,
0.010101318359375,
-0.048309326171875,
0.029937744140625,
-0.033050537109375,
0.038970947265625,
0.00848388671875,
-0.0188140869140625,
0.0018815994262695312,
-0.00986480712890625,
-0.00827789306640625,
0.001552581787109375,
-0.033172607421875,
0.005229949951171875,
0.0019044876098632812,
0.0288848876953125,
0.021270751953125,
-0.0006756782531738281,
0.0176239013671875,
0.0672607421875,
0.0206451416015625,
0.11395263671875,
-0.03125,
-0.033538818359375,
-0.0181884765625,
0.0105743408203125,
0.01505279541015625,
0.003749847412109375,
0.023162841796875,
-0.0235137939453125,
-0.02728271484375,
-0.041748046875,
0.0019502639770507812,
0.01214599609375,
-0.04827880859375,
-0.049560546875,
0.033660888671875,
-0.0098114013671875,
-0.044586181640625,
-0.029632568359375,
0.021148681640625,
-0.0030193328857421875,
-0.0146331787109375,
-0.003566741943359375,
-0.01074981689453125,
0.00962066650390625,
0.0222625732421875,
-0.0016088485717773438,
0.0518798828125,
-0.0203704833984375,
-0.00897216796875,
-0.0753173828125,
-0.00661468505859375,
-0.027008056640625,
0.0181427001953125,
0.00629425048828125,
-0.00634765625,
0.0184173583984375,
0.03314208984375,
-0.037322998046875,
-0.032440185546875,
-0.006496429443359375,
0.0103912353515625,
-0.0250396728515625,
-0.0046234130859375,
0.0203094482421875,
0.0201263427734375,
0.0262908935546875,
0.04852294921875,
-0.007541656494140625,
-0.036529541015625,
-0.01629638671875,
-0.0257720947265625,
-0.022308349609375,
-0.01036834716796875,
0.0136871337890625,
-0.059173583984375,
0.0029163360595703125,
0.00891876220703125,
-0.0002281665802001953,
0.0057220458984375,
-0.023162841796875,
-0.020538330078125,
-0.00444793701171875,
0.0121612548828125,
0.020751953125,
-0.06439208984375,
-0.044097900390625,
-0.0018453598022460938,
-0.00495147705078125,
-0.00264739990234375,
-0.01259613037109375,
0.0390625,
-0.009613037109375,
0.049591064453125,
0.045501708984375,
0.05096435546875,
-0.06964111328125,
-0.0045623779296875,
0.01312255859375,
0.037933349609375,
-0.0357666015625,
-0.035552978515625,
-0.003692626953125,
-0.0037975311279296875,
0.001979827880859375,
-0.01291656494140625,
-0.0202178955078125,
0.058319091796875,
-0.007114410400390625,
0.03582763671875,
-0.01407623291015625,
0.03558349609375,
-0.029296875,
0.042938232421875,
-0.031494140625,
0.0148162841796875,
-0.021209716796875,
-0.00021708011627197266,
0.00926971435546875,
-0.051910400390625,
0.0310516357421875,
-0.056854248046875,
0.046051025390625,
-0.01145172119140625,
-0.0221099853515625,
0.049163818359375
] |
5aa0172dda2df50efd88cced9ea3e069bacf033c
|
Wordpress Stackexchange
Q: How to get the number of posts in a selected category? I would like to show the number of posts on the category page. How is it possible? I tried to find a solution but no luck..
Thank you!
A: $category = get_the_category();
echo $category[0]->category_count;
See /Function_Reference/get_the_category
|
Q: How to get the number of posts in a selected category? I would like to show the number of posts on the category page. How is it possible? I tried to find a solution but no luck..
Thank you!
A: $category = get_the_category();
echo $category[0]->category_count;
See /Function_Reference/get_the_category
A: If you are on a category archive you don't need to query all the posts of the category like Christopher Ross suggested and you can't use get_the_category() like Max Yudin suggested unless you are already in the loop.
What you can do is simply get the current category object using get_queried_object() which will hold the post count, ex:
$category = get_queried_object();
echo $category->count;
A: If you are on the category page(archive) just use:
$cat= get_the_category();
echo $cat[0]->count;
This works on looping as well. But if you want to show the category count of a specific category anywhere on the site. Use this function:
function wt_get_category_count($catID) {
global $wpdb;
$SQL = "SELECT $wpdb->term_taxonomy.count FROM $wpdb->terms, $wpdb->term_taxonomy WHERE $wpdb->terms.term_id=$wpdb->term_taxonomy.term_id AND $wpdb->term_taxonomy.term_id=$catID";
return $wpdb->get_var($SQL);
}
echo wt_get_category_count(2);
|
wordpress
|
{
"language": "en",
"length": 173,
"provenance": "stackexchange_00019.jsonl.gz:428824",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/84992"
}
|
[
0.042266845703125,
0.0015048980712890625,
-0.0027904510498046875,
-0.004070281982421875,
0.03082275390625,
-0.040313720703125,
0.073486328125,
-0.0185089111328125,
-0.00200653076171875,
-0.0107574462890625,
-0.043121337890625,
-0.01409149169921875,
-0.042877197265625,
-0.0264434814453125,
-0.00638580322265625,
-0.068359375,
0.035675048828125,
-0.00676727294921875,
0.037078857421875,
-0.006137847900390625,
0.007366180419921875,
0.038482666015625,
0.0215301513671875,
0.07098388671875,
0.024749755859375,
-0.014984130859375,
0.028533935546875,
-0.0306854248046875,
0.006740570068359375,
-0.045440673828125,
0.01708984375,
0.03839111328125,
0.0169219970703125,
0.001461029052734375,
0.00428009033203125,
0.0193939208984375,
0.015960693359375,
-0.0026378631591796875,
0.0172119140625,
0.012359619140625,
0.04388427734375,
-0.0266265869140625,
0.0543212890625,
-0.0260467529296875,
0.0229644775390625,
-0.00475311279296875,
0.014984130859375,
-0.0684814453125,
0.0227813720703125,
-0.08941650390625,
0.0193634033203125,
0.0159149169921875,
0.04681396484375,
-0.06243896484375,
-0.0176849365234375,
0.0293731689453125,
0.019927978515625,
0.002960205078125,
0.0645751953125,
-0.038421630859375,
-0.06829833984375,
-0.047149658203125,
0.05145263671875,
-0.034271240234375,
-0.0112762451171875,
-0.0007033348083496094,
0.00858306884765625,
0.0170440673828125,
-0.0014095306396484375,
-0.021728515625,
0.0172882080078125,
-0.01091766357421875,
-0.0125885009765625,
0.0137176513671875,
-0.0233612060546875,
-0.038818359375,
0.0172882080078125,
-0.029388427734375,
0.0181427001953125,
0.0267333984375,
-0.004673004150390625,
0.005031585693359375,
-0.028656005859375,
-0.0025730133056640625,
-0.00536346435546875,
0.0174407958984375,
-0.0160675048828125,
-0.0162353515625,
-0.0205078125,
-0.0145416259765625,
-0.00958251953125,
0.0016412734985351562,
-0.032806396484375,
0.0098114013671875,
0.00934600830078125,
-0.042572021484375,
0.0162811279296875,
0.0298309326171875,
-0.0217132568359375,
-0.0312042236328125,
-0.01068878173828125,
-0.0234832763671875,
-0.058074951171875,
-0.009063720703125,
0.0236663818359375,
0.01129913330078125,
-0.020355224609375,
0.02972412109375,
0.0653076171875,
0.045745849609375,
-0.0026874542236328125,
0.047576904296875,
-0.018402099609375,
-0.01108551025390625,
-0.0262603759765625,
0.006786346435546875,
-0.0426025390625,
0.0029506683349609375,
0.0004279613494873047,
-0.01849365234375,
0.00217437744140625,
0.0224609375,
0.0246124267578125,
-0.0165252685546875,
-0.000728607177734375,
0.00543212890625,
-0.01274871826171875,
-0.049560546875,
0.027801513671875,
0.00255584716796875,
-0.031402587890625,
0.034027099609375,
0.005809783935546875,
-0.0303192138671875,
-0.0301361083984375,
-0.0031261444091796875,
-0.0203094482421875,
-0.04034423828125,
-0.00151824951171875,
-0.0030384063720703125,
-0.01523590087890625,
-0.015350341796875,
0.04241943359375,
-0.030029296875,
0.01552581787109375,
-0.005641937255859375,
0.0112152099609375,
0.025634765625,
0.0168609619140625,
-0.0206298828125,
0.026519775390625,
0.0036449432373046875,
0.004581451416015625,
0.00865936279296875,
0.01116180419921875,
0.0179290771484375,
-0.0125732421875,
0.0031108856201171875,
-0.020843505859375,
0.0140228271484375,
0.07122802734375,
0.0195465087890625,
-0.004085540771484375,
0.024169921875,
-0.0272369384765625,
-0.01056671142578125,
-0.044830322265625,
-0.0212554931640625,
0.0115203857421875,
0.015106201171875,
-0.0066375732421875,
0.005908966064453125,
0.0033588409423828125,
0.002819061279296875,
0.00244140625,
0.01178741455078125,
-0.0176849365234375,
-0.02264404296875,
0.0270233154296875,
0.06304931640625,
-0.00019669532775878906,
-0.0241546630859375,
-0.01540374755859375,
0.015167236328125,
-0.01313018798828125,
0.0268402099609375,
0.01824951171875,
0.037139892578125,
-0.0174102783203125,
0.01502227783203125,
-0.0052337646484375,
0.045440673828125,
-0.046661376953125,
-0.021881103515625,
-0.006160736083984375,
0.0132293701171875,
-0.01001739501953125,
0.01023101806640625,
0.00019097328186035156,
-0.012237548828125,
0.043487548828125,
-0.0110321044921875,
-0.0030670166015625,
0.0143280029296875,
-0.012359619140625,
-0.01129150390625,
0.004978179931640625,
0.00010824203491210938,
0.010040283203125,
0.0362548828125,
0.01253509521484375,
-0.0079498291015625,
0.002643585205078125,
-0.055877685546875,
-0.0267486572265625,
0.02349853515625,
-0.0202789306640625,
-0.04559326171875,
-0.034759521484375,
-0.023406982421875,
-0.04595947265625,
0.016143798828125,
-0.06280517578125,
0.03875732421875,
0.053009033203125,
-0.00453948974609375,
-0.022552490234375,
-0.035491943359375,
0.0194549560546875,
0.0214385986328125,
-0.07965087890625,
0.02459716796875,
0.01410675048828125,
0.0281982421875,
-0.0303955078125,
-0.01806640625,
-0.0008454322814941406,
-0.036468505859375,
0.006557464599609375,
0.047454833984375,
0.03643798828125,
-0.00794219970703125,
-0.0195159912109375,
-0.0178375244140625,
0.042510986328125,
-0.04205322265625,
-0.01317596435546875,
0.0004444122314453125,
0.018707275390625,
0.049713134765625,
0.048004150390625,
0.0113983154296875,
0.01059722900390625,
0.0129241943359375,
0.0217437744140625,
0.032806396484375,
0.0184478759765625,
0.007129669189453125,
-0.0275421142578125,
0.01495361328125,
0.0123291015625,
-0.01485443115234375,
-0.0567626953125,
0.0035533905029296875,
0.0222320556640625,
0.00591278076171875,
0.0207977294921875,
0.031494140625,
-0.01123809814453125,
-0.000152587890625,
0.0023365020751953125,
-0.0206451416015625,
-0.00728607177734375,
0.00803375244140625,
-0.044586181640625,
0.010009765625,
-0.048675537109375,
0.0240325927734375,
-0.0009098052978515625,
-0.0157928466796875,
-0.025726318359375,
0.052825927734375,
-0.0137481689453125,
-0.023681640625,
-0.05078125,
-0.06500244140625,
0.00002384185791015625,
0.003849029541015625,
-0.0435791015625,
0.018890380859375,
0.032928466796875,
0.047149658203125,
-0.00945281982421875,
-0.0024852752685546875,
-0.02685546875,
0.0272064208984375,
0.02532958984375,
-0.0572509765625,
0.04449462890625,
-0.024932861328125,
0.042388916015625,
0.06982421875,
-0.0108642578125,
0.017486572265625,
0.0151824951171875,
-0.020416259765625,
0.0330810546875,
0.0185546875,
0.0059661865234375,
-0.0030422210693359375,
-0.049346923828125,
0.0242462158203125,
0.0265960693359375,
0.04510498046875,
0.00675201416015625,
-0.03594970703125,
0.0022754669189453125,
0.01421356201171875,
-0.08087158203125,
-0.0731201171875,
0.0211639404296875,
-0.072998046875,
0.00911712646484375,
-0.004589080810546875,
-0.041168212890625,
-0.0283050537109375,
0.0228118896484375,
0.00667572021484375,
-0.01320648193359375,
-0.029937744140625,
-0.03460693359375,
-0.05706787109375,
-0.061614990234375,
-0.020111083984375,
-0.001399993896484375,
0.00815582275390625,
-0.0021915435791015625,
0.0885009765625,
-0.0107879638671875,
-0.09027099609375,
-0.03619384765625,
0.003330230712890625,
-0.0227813720703125,
0.009063720703125,
0.01288604736328125,
0.0301971435546875,
-0.03985595703125,
0.0303802490234375,
-0.0026760101318359375,
0.01088714599609375,
-0.0325927734375,
-0.0176544189453125,
-0.00626373291015625,
-0.00009578466415405273,
0.0250244140625,
0.00659942626953125,
-0.011962890625,
0.01404571533203125,
0.02093505859375,
-0.034332275390625,
-0.0045928955078125,
-0.016845703125,
-0.035736083984375,
-0.0280914306640625,
0.017791748046875,
-0.00373077392578125,
-0.027984619140625,
-0.01434326171875,
-0.0283660888671875,
-0.0200653076171875,
-0.021759033203125,
-0.056793212890625,
0.07562255859375,
-0.004840850830078125,
0.0084075927734375,
0.0222320556640625,
-0.05908203125,
-0.048553466796875,
0.0643310546875,
-0.035247802734375,
0.005832672119140625,
-0.01197052001953125,
0.044891357421875,
0.00360107421875,
-0.0640869140625,
0.05108642578125,
-0.0037708282470703125,
-0.035888671875,
-0.0100555419921875,
-0.03131103515625,
0.0087127685546875,
0.08685302734375,
-0.0282745361328125,
-0.03973388671875,
-0.038848876953125,
0.0172576904296875,
-0.0178375244140625,
-0.049560546875,
0.01038360595703125,
-0.031524658203125,
-0.085693359375,
-0.0029315948486328125,
-0.004238128662109375,
-0.040557861328125,
-0.01432037353515625,
0.035369873046875,
-0.057403564453125,
-0.0241241455078125,
0.04010009765625,
-0.05560302734375,
0.019989013671875,
-0.023468017578125,
0.0009822845458984375,
-0.039581298828125,
-0.01085662841796875,
-0.0362548828125,
-0.01224517822265625,
0.002666473388671875,
-0.011871337890625,
-0.004550933837890625,
0.00360107421875,
0.00600433349609375,
0.01230621337890625,
0.032440185546875,
0.035797119140625,
0.038818359375,
0.0047149658203125,
-0.00047469139099121094,
-0.0015821456909179688,
-0.01320648193359375,
0.0201873779296875,
-0.03857421875,
-0.0174560546875,
-0.0389404296875,
-0.00016319751739501953,
0.020416259765625,
-0.0440673828125,
0.0171966552734375,
-0.0650634765625,
0.007663726806640625,
-0.039703369140625,
-0.0084075927734375,
0.0007801055908203125,
-0.002201080322265625,
-0.0241851806640625,
0.01299285888671875,
-0.0012645721435546875,
-0.0220184326171875,
0.0275726318359375,
0.0245361328125,
-0.008087158203125,
0.00762939453125,
0.074462890625,
0.00485992431640625,
-0.017303466796875,
-0.0830078125,
0.0099029541015625,
0.047027587890625,
0.00495147705078125,
0.035400390625,
0.024993896484375,
-0.034912109375,
0.06890869140625,
0.0301513671875,
0.010467529296875,
-0.022430419921875,
0.051727294921875,
0.01227569580078125,
0.002986907958984375,
-0.00830841064453125,
-0.0134124755859375,
0.035308837890625,
0.013702392578125,
-0.0260467529296875,
0.01413726806640625,
0.0012102127075195312,
0.006366729736328125,
-0.0141143798828125,
0.0182037353515625,
0.0001800060272216797,
-0.0164642333984375,
0.00974273681640625,
0.0177459716796875,
0.05072021484375,
0.0384521484375,
-0.00559234619140625,
0.034423828125,
0.034515380859375,
0.0181121826171875,
0.01021575927734375,
0.0308837890625,
-0.007595062255859375,
0.04656982421875,
-0.0161285400390625,
0.0019989013671875,
-0.008880615234375,
0.0109405517578125,
-0.032989501953125,
-0.01485443115234375,
-0.052154541015625,
-0.0091552734375,
0.0133514404296875,
0.0325927734375,
0.04119873046875,
-0.03363037109375,
0.033447265625,
0.0191802978515625,
-0.007320404052734375,
0.01450347900390625,
-0.0295867919921875,
-0.035064697265625,
-0.033111572265625,
0.010498046875,
-0.0006814002990722656,
-0.00982666015625,
0.033782958984375,
0.06048583984375,
-0.0293426513671875,
0.062255859375,
-0.0114593505859375,
0.0267791748046875,
0.0120849609375,
0.0297393798828125,
0.027130126953125,
-0.035400390625,
-0.0015516281127929688,
-0.0199432373046875,
-0.0184478759765625,
-0.042816162109375,
-0.01152801513671875,
0.01195526123046875,
0.0207366943359375,
0.01306915283203125,
-0.0024318695068359375,
0.02252197265625,
0.01505279541015625,
-0.020263671875,
0.005840301513671875,
-0.00902557373046875,
-0.009033203125,
-0.0277099609375,
-0.0162200927734375,
0.02423095703125,
0.00830841064453125,
-0.0087890625,
-0.01000213623046875,
-0.0290374755859375,
0.0271453857421875,
-0.01233673095703125,
0.00403594970703125,
0.002895355224609375,
0.005229949951171875,
-0.08489990234375,
-0.01351165771484375,
0.0208587646484375,
-0.027618408203125,
-0.0243988037109375,
0.001811981201171875,
-0.04083251953125,
0.01464080810546875,
-0.004180908203125,
0.06585693359375,
-0.0217437744140625,
-0.033294677734375,
0.01904296875,
-0.002811431884765625,
0.0653076171875,
0.034576416015625,
-0.02874755859375,
-0.0010156631469726562,
-0.050567626953125,
-0.0281219482421875,
0.037017822265625,
-0.001285552978515625,
-0.029815673828125,
-0.0202178955078125,
0.0134124755859375,
0.0240020751953125,
-0.0021533966064453125,
-0.01349639892578125,
-0.042877197265625,
0.006805419921875,
0.036865234375,
0.033111572265625,
0.01276397705078125,
0.0309906005859375,
0.017364501953125,
0.0302581787109375,
0.0218658447265625,
0.0298004150390625,
-0.0053253173828125,
-0.0391845703125,
0.0189666748046875,
-0.015350341796875,
-0.003387451171875,
0.0163421630859375,
-0.0174560546875,
-0.0809326171875,
-0.0229339599609375,
0.00213623046875,
-0.021820068359375,
-0.011993408203125,
0.01214599609375,
-0.004474639892578125,
-0.0119171142578125,
0.0204925537109375,
-0.0225982666015625,
0.0220489501953125,
0.01293182373046875,
0.033599853515625,
-0.006107330322265625,
0.0044403076171875,
-0.0003478527069091797,
-0.0084991455078125,
0.01080322265625,
-0.0035533905029296875,
-0.04290771484375,
0.069091796875,
0.05963134765625,
0.01837158203125,
0.019073486328125,
0.02398681640625,
0.0087738037109375,
-0.051605224609375,
0.0204620361328125,
0.022796630859375,
-0.0277557373046875,
0.046875,
-0.0018405914306640625,
-0.01253509521484375,
0.0252838134765625,
-0.04010009765625,
-0.01401519775390625,
0.01508331298828125,
0.03155517578125,
-0.02459716796875,
0.004703521728515625,
0.01245880126953125,
-0.01568603515625,
0.0012416839599609375,
0.01209259033203125,
-0.02783203125,
-0.0382080078125,
0.053680419921875,
-0.036590576171875,
-0.006549835205078125,
0.0163116455078125,
-0.01519775390625,
-0.00862884521484375,
-0.00502777099609375,
0.016998291015625,
0.0162506103515625,
-0.026641845703125,
-0.00012814998626708984,
0.0181732177734375,
0.0083465576171875,
-0.0367431640625,
-0.0004532337188720703,
0.023193359375,
0.0180511474609375,
-0.04931640625,
0.0728759765625,
-0.0247955322265625,
0.0328369140625,
-0.0134124755859375,
-0.009735107421875,
-0.01303863525390625,
0.05291748046875,
-0.0242156982421875,
0.004669189453125,
0.039642333984375,
-0.06781005859375,
0.0181427001953125,
0.018798828125,
0.0236358642578125,
0.0215911865234375,
-0.03387451171875,
-0.00030994415283203125,
-0.0367431640625,
0.0205535888671875,
-0.01873779296875,
-0.0024700164794921875,
0.0858154296875,
-0.0202789306640625,
-0.0288848876953125,
0.0248260498046875,
0.0350341796875,
-0.00958251953125,
-0.0081329345703125,
-0.001682281494140625,
0.004894256591796875,
0.07440185546875,
-0.005767822265625,
0.0732421875,
0.0211334228515625,
0.0014772415161132812,
-0.04656982421875,
0.0307159423828125,
-0.01556396484375,
0.016510009765625,
0.01708984375,
0.0029315948486328125,
0.00048661231994628906,
-0.00855255126953125,
-0.06439208984375,
0.0655517578125,
0.0160064697265625,
0.046783447265625,
-0.0628662109375,
-0.0139617919921875,
0.006565093994140625,
0.037994384765625,
0.054595947265625,
0.0019626617431640625,
0.032928466796875,
-0.0120086669921875,
0.0325927734375,
0.052001953125,
-0.0165557861328125,
-0.01445770263671875,
0.0208282470703125,
0.0117950439453125,
0.05657958984375,
-0.0274505615234375,
0.0176849365234375,
0.0146331787109375,
0.0169525146484375,
0.0369873046875,
0.012664794921875,
0.009002685546875,
-0.0094146728515625,
-0.002986907958984375,
-0.044525146484375,
-0.001758575439453125,
0.019195556640625,
0.013214111328125,
-0.0210723876953125,
0.1068115234375,
0.0540771484375,
-0.041534423828125,
-0.0058441162109375,
-0.0479736328125,
0.0599365234375,
-0.030426025390625,
0.04266357421875,
0.01004791259765625,
0.0076751708984375,
0.098876953125,
-0.0220947265625,
0.01064300537109375,
0.0178680419921875,
-0.0190887451171875,
0.074462890625,
0.03094482421875,
0.0222930908203125,
-0.034698486328125,
0.0017375946044921875,
0.0294189453125,
0.08447265625,
-0.052947998046875,
-0.03631591796875,
0.015777587890625,
0.026153564453125,
0.00701904296875,
0.0231475830078125,
0.0345458984375,
0.046630859375,
0.09173583984375,
-0.03900146484375,
-0.04705810546875,
0.011199951171875,
0.07452392578125,
0.01123809814453125,
-0.023406982421875,
-0.0220794677734375,
-0.093017578125,
-0.0217132568359375,
-0.0149078369140625,
0.01079559326171875,
0.061004638671875,
0.0281829833984375,
0.0203094482421875,
-0.06683349609375,
-0.029388427734375,
0.0164337158203125,
0.01401519775390625,
0.01031494140625,
-0.0228729248046875,
0.0249176025390625,
-0.01180267333984375,
-0.01178741455078125,
0.0031719207763671875,
0.0016641616821289062,
-0.0264739990234375,
0.04345703125,
0.07379150390625,
0.0017004013061523438,
-0.035247802734375,
0.04132080078125,
-0.0014667510986328125,
-0.025665283203125,
-0.04278564453125,
0.030120849609375,
0.026702880859375,
0.0199737548828125,
0.0247802734375,
0.0205078125,
0.060272216796875,
-0.01520538330078125,
0.023834228515625,
0.004474639892578125,
-0.0325927734375,
0.038421630859375,
-0.0180816650390625,
0.0677490234375,
0.00670623779296875,
-0.07440185546875,
-0.023712158203125,
-0.0144500732421875,
-0.0240478515625,
0.043426513671875,
0.0396728515625,
-0.03759765625,
0.03179931640625,
-0.022613525390625,
-0.033843994140625,
0.01861572265625,
0.005832672119140625,
0.01032257080078125,
0.0162506103515625,
-0.00206756591796875,
-0.01091766357421875,
-0.04351806640625,
-0.036956787109375,
-0.005828857421875,
0.032745361328125,
0.02484130859375,
-0.008270263671875,
0.0287017822265625,
0.03216552734375,
-0.0350341796875,
0.04364013671875,
-0.05035400390625,
-0.0384521484375,
0.051849365234375,
0.00949859619140625,
0.002471923828125,
-0.01515960693359375,
-0.04412841796875,
0.00927734375,
0.049530029296875,
-0.0255889892578125,
0.00447845458984375,
-0.005908966064453125,
0.01287841796875,
-0.01666259765625,
0.019500732421875,
-0.0149993896484375,
0.00795745849609375,
0.0022068023681640625,
-0.038604736328125,
0.03424072265625,
0.0192108154296875,
0.0257110595703125,
0.024749755859375,
-0.051910400390625,
-0.01218414306640625,
-0.011688232421875,
0.00418853759765625,
-0.047607421875,
0.032745361328125,
-0.050323486328125,
0.032440185546875,
0.03216552734375,
-0.0116729736328125,
0.02996826171875,
0.0217437744140625,
-0.01264190673828125,
0.0248565673828125,
-0.0098114013671875,
-0.0199737548828125,
0.003265380859375,
0.037078857421875,
-0.0087890625,
0.0233001708984375,
-0.034088134765625,
0.0099029541015625,
0.015777587890625,
0.0025920867919921875,
-0.03399658203125,
-0.056671142578125,
-0.0019283294677734375,
0.00728607177734375,
-0.016693115234375,
0.004238128662109375,
-0.0018138885498046875,
-0.009979248046875,
0.01163482666015625,
-0.01490020751953125,
0.0003876686096191406,
0.0137939453125,
-0.040252685546875,
0.0157928466796875,
-0.04791259765625,
-0.03948974609375,
0.039794921875,
0.042877197265625,
-0.0673828125,
0.034393310546875,
-0.0162506103515625,
-0.0751953125,
-0.00849151611328125,
0.044677734375,
0.040740966796875,
-0.062347412109375,
0.0107421875,
0.037322998046875,
0.053619384765625,
0.086669921875,
0.0400390625,
0.006023406982421875,
0.0017232894897460938,
0.0254974365234375,
-0.0625,
-0.052276611328125,
0.045135498046875,
-0.0138092041015625,
-0.047271728515625,
-0.034912109375,
0.0227813720703125,
0.040863037109375,
-0.0247344970703125,
-0.0836181640625,
0.05535888671875,
-0.042572021484375,
-0.036529541015625,
-0.04925537109375,
-0.00882720947265625,
0.006866455078125,
0.01447296142578125,
-0.01751708984375,
-0.00772857666015625,
-0.05078125,
0.0202789306640625,
0.02496337890625,
0.006290435791015625,
0.037384033203125,
-0.0163726806640625,
-0.07305908203125,
0.006435394287109375,
-0.01326751708984375,
0.032501220703125,
0.00666046142578125,
0.0104217529296875,
0.003520965576171875,
0.036834716796875,
-0.052947998046875,
-0.01337432861328125,
-0.03564453125,
0.0253448486328125,
0.0307159423828125,
-0.04302978515625,
-0.032440185546875,
-0.0634765625,
0.0181121826171875,
-0.018463134765625,
0.0179901123046875,
0.004528045654296875,
-0.03424072265625,
-0.03253173828125,
-0.0040740966796875,
-0.0211944580078125,
0.01151275634765625,
-0.0682373046875,
0.0045623779296875,
0.0009360313415527344,
0.0005121231079101562,
0.003734588623046875,
-0.029205322265625,
-0.026763916015625,
-0.0301361083984375,
-0.062042236328125,
0.005672454833984375,
-0.034423828125,
0.0034999847412109375,
-0.0164031982421875,
-0.01215362548828125,
-0.0299530029296875,
-0.00437164306640625,
-0.0024356842041015625,
-0.041900634765625,
0.035919189453125,
-0.0061492919921875,
0.0025730133056640625,
0.0081634521484375,
0.026580810546875,
0.01372528076171875,
-0.0055084228515625,
-0.00926971435546875,
0.0200653076171875,
-0.0006108283996582031,
0.0252227783203125,
0.00296783447265625,
0.0258941650390625,
-0.004058837890625,
0.044891357421875,
0.01006317138671875,
0.031280517578125,
0.016448974609375,
-0.004192352294921875,
0.0030193328857421875,
0.052276611328125,
-0.0297393798828125,
-0.032562255859375,
-0.0187835693359375,
-0.049102783203125,
-0.0185089111328125,
-0.00255584716796875,
-0.0236358642578125,
-0.050537109375,
0.0298614501953125,
0.018951416015625,
0.0013027191162109375,
0.0301361083984375
] |
a4a1e13c9748822706041f86f760bda15e652fd3
|
Wordpress Stackexchange
Q: How to add a class to ul tags created by the WordPress editor Tinymce? I want to set a special styling for the ul tags created by Tinymce only, which means only for posts and pages, I only found this filter tiny_mce_before_init with an example on how to add custom style options to an existing style dropdown.
so is there a way to add a class to ul tags created by the WordPress editor ?
A: Is that really necessary? Try to modify you theme's page.php and single.php in a way it's wrapp the_content(); template tag with a div of specified class or id. This way:
...
<div id="post_content_from_tinymce">
<?php the_content(); ?>
</div>
...
And use that id in your stylesheet:
#post_content_from_tinymces ul{ ... }
This might be enaught in most cases. Adding posibility to add custom class to UL would demand to write a tinyMCE plugin and still, you would have to click extra button to set style every time you're creating a post/page.
|
Q: How to add a class to ul tags created by the WordPress editor Tinymce? I want to set a special styling for the ul tags created by Tinymce only, which means only for posts and pages, I only found this filter tiny_mce_before_init with an example on how to add custom style options to an existing style dropdown.
so is there a way to add a class to ul tags created by the WordPress editor ?
A: Is that really necessary? Try to modify you theme's page.php and single.php in a way it's wrapp the_content(); template tag with a div of specified class or id. This way:
...
<div id="post_content_from_tinymce">
<?php the_content(); ?>
</div>
...
And use that id in your stylesheet:
#post_content_from_tinymces ul{ ... }
This might be enaught in most cases. Adding posibility to add custom class to UL would demand to write a tinyMCE plugin and still, you would have to click extra button to set style every time you're creating a post/page.
A: It's always a good idea to look at Wordpress Codex before asking. TinyMCE Custom Styles
<?php
// Insert 'styleselect' into the $buttons array
function my_mce_buttons_2( $buttons ) {
array_unshift( $buttons, 'styleselect' );
return $buttons;
}
// Use 'mce_buttons' for button row #1, mce_buttons_3' for button row #3
add_filter('mce_buttons_2', 'my_mce_buttons_2');
function my_mce_before_init_insert_formats( $init_array ) {
$style_formats = array(
array(
'title' => 'Custom UL class', // Title to show in dropdown
'selector' => 'ul', // Element to add class to
'classes' => 'custom-ul-class' // CSS class to add
)
);
$init_array['style_formats'] = json_encode( $style_formats );
return $init_array;
}
add_filter( 'tiny_mce_before_init', 'my_mce_before_init_insert_formats' );
In editor: first create an unnumbered list, then apply the style.
Update after acceptance.
If you want to append a class to all <ul> elements added through TinyMCE you can do it prior to inserting into or updating the database:
<?php
add_filter('wp_insert_post_data', 'my_add_ul_class_on_insert');
function my_add_ul_class_on_insert( $postarr ) {
$postarr['post_content'] = str_replace('<ul>', '<ul class="my-custom-class">', $postarr['post_content'] );
return $postarr;
}
Tune str_replace() function needle if <ul> elements already has any attributes. Or use preg_replace() there.
|
wordpress
|
{
"language": "en",
"length": 340,
"provenance": "stackexchange_00019.jsonl.gz:428838",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85054"
}
|
[
0.0290069580078125,
-0.01302337646484375,
-0.01517486572265625,
0.004474639892578125,
0.0017719268798828125,
-0.041473388671875,
0.046661376953125,
-0.0106964111328125,
-0.04022216796875,
0.01873779296875,
0.00025391578674316406,
0.034332275390625,
-0.033416748046875,
-0.0268707275390625,
0.028076171875,
-0.029052734375,
0.04241943359375,
-0.00563812255859375,
0.052093505859375,
-0.006824493408203125,
0.009490966796875,
0.0128326416015625,
0.055419921875,
0.0035152435302734375,
0.03515625,
-0.0419921875,
0.06573486328125,
-0.00858306884765625,
0.0269775390625,
-0.013336181640625,
0.0269012451171875,
-0.042266845703125,
0.0341796875,
0.051513671875,
-0.06640625,
0.0221405029296875,
-0.00013756752014160156,
0.011474609375,
-0.00922393798828125,
0.026763916015625,
0.039154052734375,
-0.0298309326171875,
-0.0020122528076171875,
0.057525634765625,
-0.016998291015625,
-0.03857421875,
0.04888916015625,
-0.0270538330078125,
0.0106201171875,
-0.06195068359375,
-0.0194091796875,
-0.01222991943359375,
-0.004154205322265625,
-0.07757568359375,
-0.02374267578125,
0.0125732421875,
-0.0284423828125,
0.019622802734375,
0.00867462158203125,
-0.005008697509765625,
0.00457000732421875,
-0.0001729726791381836,
0.01055145263671875,
-0.0030269622802734375,
0.00958251953125,
-0.00391387939453125,
0.0232086181640625,
0.0182647705078125,
0.0017919540405273438,
0.0146331787109375,
0.01342010498046875,
-0.009613037109375,
0.00435638427734375,
-0.0214996337890625,
0.0022907257080078125,
-0.032135009765625,
0.0207672119140625,
-0.044342041015625,
-0.018585205078125,
0.0124664306640625,
0.04425048828125,
0.0103302001953125,
-0.01450347900390625,
-0.012237548828125,
0.007808685302734375,
-0.0017566680908203125,
0.00022792816162109375,
-0.0240936279296875,
-0.0133514404296875,
-0.0123748779296875,
-0.0223388671875,
-0.044952392578125,
0.01045989990234375,
0.029052734375,
-0.0226898193359375,
-0.00992584228515625,
0.003704071044921875,
0.037445068359375,
0.01059722900390625,
0.041473388671875,
0.007343292236328125,
-0.04852294921875,
0.0728759765625,
-0.058380126953125,
0.0125732421875,
0.03167724609375,
0.008056640625,
0.058380126953125,
0.056549072265625,
0.0186004638671875,
0.01372528076171875,
0.0267181396484375,
-0.0017547607421875,
0.00923919677734375,
-0.0238037109375,
-0.03607177734375,
-0.046875,
0.02532958984375,
-0.0141754150390625,
-0.006374359130859375,
0.01273345947265625,
0.044952392578125,
0.00994873046875,
-0.03662109375,
-0.0253143310546875,
-0.013702392578125,
-0.0087432861328125,
-0.044830322265625,
0.0225067138671875,
-0.0273590087890625,
-0.00665283203125,
0.04058837890625,
0.02056884765625,
0.02734375,
0.003742218017578125,
0.01152801513671875,
0.035247802734375,
-0.016387939453125,
-0.014801025390625,
0.0235595703125,
0.01073455810546875,
-0.0094146728515625,
0.00408172607421875,
-0.03204345703125,
-0.001117706298828125,
0.046905517578125,
0.0305938720703125,
-0.0156097412109375,
-0.022979736328125,
-0.081787109375,
0.058197021484375,
-0.0582275390625,
0.042938232421875,
0.006744384765625,
-0.025146484375,
-0.042236328125,
0.0205841064453125,
-0.026641845703125,
-0.00007873773574829102,
-0.057220458984375,
-0.00019478797912597656,
-0.00130462646484375,
0.045989990234375,
-0.039794921875,
-0.030670166015625,
-0.0099029541015625,
-0.0816650390625,
-0.0109405517578125,
0.01983642578125,
0.01235198974609375,
-0.038330078125,
-0.005245208740234375,
0.02838134765625,
0.01812744140625,
-0.0127105712890625,
0.031494140625,
-0.0081787109375,
0.017364501953125,
0.04931640625,
-0.01154327392578125,
-0.006317138671875,
-0.038360595703125,
0.0916748046875,
-0.0121612548828125,
-0.033416748046875,
0.019134521484375,
-0.0058441162109375,
0.06243896484375,
0.0298614501953125,
0.02581787109375,
-0.0267181396484375,
-0.01155853271484375,
-0.00555419921875,
-0.00888824462890625,
0.023529052734375,
-0.004413604736328125,
-0.05926513671875,
-0.011077880859375,
-0.0009775161743164062,
-0.00794219970703125,
0.00807952880859375,
0.004604339599609375,
0.01433563232421875,
-0.005344390869140625,
-0.0082855224609375,
0.0109405517578125,
0.0050811767578125,
0.0257720947265625,
-0.0236053466796875,
-0.0167083740234375,
-0.002349853515625,
-0.022216796875,
0.021728515625,
-0.07452392578125,
-0.01727294921875,
0.045684814453125,
0.035491943359375,
0.0109405517578125,
0.0191192626953125,
-0.0310211181640625,
0.036834716796875,
-0.005290985107421875,
0.02239990234375,
0.049041748046875,
0.01346588134765625,
-0.01232147216796875,
0.0005483627319335938,
-0.006092071533203125,
0.00441741943359375,
0.0242462158203125,
-0.016082763671875,
-0.0078887939453125,
0.0154876708984375,
0.043701171875,
-0.03472900390625,
-0.03076171875,
-0.052276611328125,
-0.060821533203125,
0.02130126953125,
0.04638671875,
0.0272216796875,
0.00894927978515625,
-0.006694793701171875,
0.01139068603515625,
0.046112060546875,
0.045379638671875,
0.043701171875,
-0.026519775390625,
0.006134033203125,
0.0447998046875,
0.0296630859375,
-0.0070648193359375,
0.00704193115234375,
-0.02337646484375,
0.0211944580078125,
0.00507354736328125,
-0.0035648345947265625,
0.014923095703125,
0.016387939453125,
-0.0107574462890625,
0.00394439697265625,
0.047088623046875,
-0.00960540771484375,
0.0166778564453125,
0.053680419921875,
0.0136566162109375,
0.057342529296875,
0.043609619140625,
0.0005612373352050781,
0.00821685791015625,
-0.006694793701171875,
-0.0113677978515625,
0.01406097412109375,
0.018157958984375,
-0.0290679931640625,
0.0298919677734375,
-0.0214996337890625,
-0.007015228271484375,
0.04364013671875,
0.0091705322265625,
-0.0309600830078125,
0.044830322265625,
0.033416748046875,
-0.0139312744140625,
-0.0232391357421875,
-0.05255126953125,
0.0209197998046875,
-0.036041259765625,
0.021087646484375,
-0.044525146484375,
-0.005016326904296875,
0.01004791259765625,
-0.03704833984375,
0.052886962890625,
0.0101318359375,
-0.047943115234375,
0.08203125,
0.01447296142578125,
0.01258087158203125,
0.0177001953125,
0.05987548828125,
0.041015625,
-0.0257720947265625,
0.01788330078125,
0.01031494140625,
0.0296173095703125,
0.0010204315185546875,
0.0246124267578125,
0.0236358642578125,
-0.019195556640625,
0.017822265625,
0.0254974365234375,
0.0269775390625,
0.041229248046875,
0.0031108856201171875,
-0.0234375,
0.0074615478515625,
0.033447265625,
0.0081634521484375,
0.0153656005859375,
0.03863525390625,
-0.0645751953125,
0.006221771240234375,
-0.01910400390625,
-0.05316162109375,
-0.0147247314453125,
0.01131439208984375,
-0.0034275054931640625,
-0.0259246826171875,
0.0006322860717773438,
-0.0173492431640625,
-0.0136566162109375,
-0.0217132568359375,
0.0255126953125,
-0.00811767578125,
0.006671905517578125,
0.01186370849609375,
0.07733154296875,
0.00934600830078125,
-0.035675048828125,
0.0141448974609375,
-0.01092529296875,
-0.03076171875,
0.007259368896484375,
-0.0286407470703125,
-0.033905029296875,
0.007343292236328125,
-0.0023479461669921875,
-0.039398193359375,
0.00801849365234375,
0.0170440673828125,
-0.01202392578125,
0.001804351806640625,
0.019500732421875,
0.0218048095703125,
0.0119171142578125,
0.003978729248046875,
0.05462646484375,
0.04510498046875,
-0.00986480712890625,
-0.054229736328125,
0.03656005859375,
-0.01195526123046875,
0.034820556640625,
-0.037994384765625,
-0.0053253173828125,
-0.0005006790161132812,
0.0714111328125,
-0.013397216796875,
0.0139923095703125,
0.047088623046875,
-0.046234130859375,
0.027618408203125,
-0.0121002197265625,
-0.01959228515625,
-0.005573272705078125,
0.022705078125,
-0.01020050048828125,
0.006908416748046875,
0.0013818740844726562,
0.0038661956787109375,
-0.0278778076171875,
0.01428985595703125,
-0.061309814453125,
-0.0281524658203125,
0.005443572998046875,
-0.05584716796875,
0.038726806640625,
-0.02838134765625,
-0.00313568115234375,
0.01267242431640625,
0.09515380859375,
-0.034332275390625,
-0.0109710693359375,
0.01861572265625,
0.01377105712890625,
-0.03326416015625,
-0.009613037109375,
-0.064453125,
-0.00911712646484375,
-0.12164306640625,
0.0245513916015625,
0.0156707763671875,
-0.04364013671875,
-0.058502197265625,
0.042938232421875,
-0.11279296875,
-0.03326416015625,
0.0274658203125,
-0.020477294921875,
0.004848480224609375,
0.0158538818359375,
-0.021453857421875,
0.003704071044921875,
-0.0000909566879272461,
-0.037567138671875,
-0.05987548828125,
-0.0269012451171875,
-0.0303802490234375,
0.069091796875,
0.0312347412109375,
-0.026458740234375,
0.0037899017333984375,
0.052001953125,
-0.0159454345703125,
0.0005369186401367188,
0.01128387451171875,
0.034576416015625,
0.006008148193359375,
-0.0250396728515625,
-0.0160980224609375,
-0.031280517578125,
0.00565338134765625,
0.0396728515625,
-0.04571533203125,
0.005817413330078125,
-0.032806396484375,
-0.046783447265625,
0.05096435546875,
-0.06951904296875,
-0.052490234375,
-0.044097900390625,
0.020782470703125,
0.014617919921875,
0.0147705078125,
0.011322021484375,
-0.041778564453125,
-0.036102294921875,
0.01117706298828125,
0.0081024169921875,
0.0008454322814941406,
0.0036334991455078125,
0.040557861328125,
0.034332275390625,
-0.0228118896484375,
-0.00580596923828125,
-0.007038116455078125,
0.0262908935546875,
-0.012176513671875,
0.03338623046875,
-0.0001443624496459961,
-0.015899658203125,
0.0293426513671875,
-0.020599365234375,
0.0144195556640625,
-0.052581787109375,
0.09765625,
-0.01062774658203125,
-0.000030517578125,
-0.0019989013671875,
-0.015228271484375,
0.0008177757263183594,
-0.0238494873046875,
0.001399993896484375,
-0.004489898681640625,
0.06329345703125,
0.0062255859375,
-0.0017642974853515625,
-0.0098419189453125,
-0.007293701171875,
-0.0310516357421875,
0.00603485107421875,
0.026458740234375,
0.02630615234375,
0.022979736328125,
-0.00453948974609375,
0.005962371826171875,
0.01016998291015625,
-0.027679443359375,
0.0258331298828125,
-0.0206298828125,
0.0300445556640625,
-0.0029315948486328125,
0.01092529296875,
-0.030487060546875,
0.01421356201171875,
-0.0213775634765625,
0.048980712890625,
0.05889892578125,
-0.01520538330078125,
-0.00469207763671875,
0.005077362060546875,
0.03204345703125,
-0.046966552734375,
-0.004085540771484375,
0.015625,
-0.01073455810546875,
-0.0114288330078125,
-0.0022735595703125,
-0.0205078125,
-0.0010166168212890625,
-0.0159149169921875,
0.0103912353515625,
0.00870513916015625,
-0.023773193359375,
-0.0245208740234375,
0.025543212890625,
0.047119140625,
-0.0199737548828125,
-0.01497650146484375,
0.0098876953125,
-0.00376129150390625,
0.046966552734375,
0.031097412109375,
-0.01499176025390625,
-0.019989013671875,
0.04119873046875,
-0.024261474609375,
-0.0106964111328125,
0.0194549560546875,
0.037353515625,
0.0302886962890625,
0.00377655029296875,
-0.039031982421875,
-0.00799560546875,
-0.0455322265625,
0.0007052421569824219,
-0.0182342529296875,
-0.01056671142578125,
-0.0096588134765625,
0.00033020973205566406,
0.01812744140625,
0.013427734375,
0.005035400390625,
-0.047149658203125,
-0.001354217529296875,
-0.034759521484375,
0.022491455078125,
0.017425537109375,
-0.042236328125,
0.05938720703125,
0.031005859375,
-0.031829833984375,
0.001911163330078125,
-0.00803375244140625,
-0.04498291015625,
-0.031524658203125,
-0.0015020370483398438,
-0.015960693359375,
0.02777099609375,
0.0012006759643554688,
0.050628662109375,
-0.0220184326171875,
-0.033477783203125,
-0.040557861328125,
0.0163726806640625,
0.00809478759765625,
0.005008697509765625,
0.0247802734375,
-0.030975341796875,
-0.036346435546875,
-0.042724609375,
-0.0165252685546875,
-0.026824951171875,
0.0014247894287109375,
-0.0051727294921875,
0.0175933837890625,
0.0181732177734375,
-0.00077056884765625,
-0.055938720703125,
-0.0396728515625,
-0.004444122314453125,
0.043792724609375,
-0.0176849365234375,
-0.0106658935546875,
0.04290771484375,
-0.01336669921875,
0.067626953125,
0.0000769495964050293,
0.0017147064208984375,
-0.01427459716796875,
-0.0128021240234375,
0.00588226318359375,
-0.031585693359375,
-0.0171661376953125,
-0.0189971923828125,
-0.026519775390625,
0.0380859375,
0.0692138671875,
-0.004253387451171875,
0.0234375,
-0.00528717041015625,
0.0011425018310546875,
-0.026031494140625,
0.003849029541015625,
-0.00542449951171875,
0.00092315673828125,
0.036895751953125,
0.00237274169921875,
0.051422119140625,
-0.020904541015625,
-0.0167694091796875,
0.0094757080078125,
-0.010986328125,
0.0452880859375,
-0.01503753662109375,
0.002979278564453125,
0.0211181640625,
0.008270263671875,
-0.034820556640625,
-0.007396697998046875,
0.005580902099609375,
-0.01690673828125,
-0.04400634765625,
-0.0163421630859375,
-0.0202178955078125,
0.0307464599609375,
0.0531005859375,
-0.0111541748046875,
-0.0031909942626953125,
0.023895263671875,
-0.0197296142578125,
0.006488800048828125,
0.048675537109375,
0.06549072265625,
-0.0631103515625,
0.00034618377685546875,
-0.0002684593200683594,
-0.0195770263671875,
0.037567138671875,
0.019012451171875,
-0.01351165771484375,
-0.0430908203125,
0.083251953125,
-0.03582763671875,
0.020599365234375,
0.05621337890625,
-0.02935791015625,
0.006374359130859375,
-0.0261383056640625,
0.023956298828125,
-0.00496673583984375,
0.025634765625,
-0.037567138671875,
-0.0245361328125,
0.01666259765625,
-0.0303192138671875,
0.023223876953125,
-0.0136260986328125,
-0.00537109375,
-0.04351806640625,
0.01959228515625,
0.005443572998046875,
-0.00849151611328125,
0.032379150390625,
0.00152587890625,
-0.0097503662109375,
0.026458740234375,
-0.0254058837890625,
0.025299072265625,
-0.0019931793212890625,
-0.036285400390625,
-0.01120758056640625,
-0.006023406982421875,
0.03192138671875,
-0.03387451171875,
-0.011749267578125,
0.01053619384765625,
-0.0230712890625,
-0.03948974609375,
-0.003253936767578125,
-0.01611328125,
0.027496337890625,
-0.038055419921875,
-0.0028018951416015625,
0.007572174072265625,
0.02752685546875,
0.030731201171875,
-0.032623291015625,
0.0147705078125,
-0.060089111328125,
-0.016021728515625,
-0.00951385498046875,
0.002147674560546875,
0.01215362548828125,
-0.03515625,
-0.05474853515625,
0.102783203125,
-0.029815673828125,
0.002044677734375,
0.0049896240234375,
0.053192138671875,
-0.0168914794921875,
0.0287628173828125,
0.00992584228515625,
0.0123748779296875,
0.0033283233642578125,
-0.0246124267578125,
-0.01514434814453125,
0.00173187255859375,
0.0012607574462890625,
0.046142578125,
-0.00385284423828125,
-0.004016876220703125,
-0.049102783203125,
-0.002475738525390625,
0.039154052734375,
0.04681396484375,
0.0311279296875,
0.02020263671875,
-0.0162506103515625,
-0.0152587890625,
-0.02435302734375,
-0.004913330078125,
0.01497650146484375,
-0.0131988525390625,
-0.034698486328125,
0.0220794677734375,
-0.007053375244140625,
-0.0212860107421875,
0.03662109375,
-0.0201416015625,
-0.0184478759765625,
0.02618408203125,
-0.0116729736328125,
-0.00800323486328125,
-0.0002529621124267578,
0.046630859375,
0.0211944580078125,
-0.044830322265625,
-0.09014892578125,
-0.0158538818359375,
0.024261474609375,
-0.01090240478515625,
0.0138702392578125,
-0.016845703125,
0.0010585784912109375,
0.024871826171875,
-0.0176849365234375,
-0.0018720626831054688,
0.024169921875,
-0.010040283203125,
0.01763916015625,
0.0003783702850341797,
0.002902984619140625,
-0.0609130859375,
-0.01190185546875,
0.0360107421875,
0.035888671875,
-0.0295257568359375,
-0.00833892822265625,
0.0031890869140625,
0.0156707763671875,
-0.01204681396484375,
-0.03253173828125,
-0.0038623809814453125,
-0.04559326171875,
-0.01387786865234375,
-0.0206298828125,
-0.01271820068359375,
-0.0011510848999023438,
0.00997161865234375,
-0.007778167724609375,
-0.0024318695068359375,
0.0273284912109375,
-0.012603759765625,
-0.0419921875,
-0.00928497314453125,
-0.01212310791015625,
0.05926513671875,
0.0372314453125,
0.035186767578125,
-0.0131072998046875,
-0.04241943359375,
-0.0204010009765625,
0.00630950927734375,
0.0286865234375,
-0.003475189208984375,
0.0002765655517578125,
0.00936126708984375,
0.01555633544921875,
0.01268768310546875,
-0.0188140869140625,
0.016143798828125,
0.0123443603515625,
0.00081634521484375,
-0.0204925537109375,
-0.0157623291015625,
-0.0245208740234375,
-0.045135498046875,
-0.0179443359375,
-0.039276123046875,
-0.000545501708984375,
0.0218048095703125,
-0.0179595947265625,
0.0169219970703125,
-0.0244293212890625,
0.055908203125,
-0.03436279296875,
0.01325225830078125,
0.010101318359375,
-0.032257080078125,
0.00726318359375,
-0.041961669921875,
0.0285186767578125,
-0.0182037353515625,
-0.052093505859375,
-0.006565093994140625,
-0.01030731201171875,
-0.059234619140625,
0.0305328369140625,
0.043121337890625,
-0.0240478515625,
0.0006265640258789062,
0.00923919677734375,
-0.032379150390625,
0.0276031494140625,
-0.0017652511596679688,
0.00740814208984375,
0.0213470458984375,
-0.001190185546875,
0.0014820098876953125,
-0.08233642578125,
-0.03131103515625,
-0.045135498046875,
0.04931640625,
0.016815185546875,
0.032623291015625,
0.002593994140625,
0.049713134765625,
-0.058258056640625,
0.016998291015625,
-0.0216064453125,
-0.05755615234375,
0.05755615234375,
0.0406494140625,
0.0003228187561035156,
-0.0259246826171875,
-0.0225982666015625,
0.038665771484375,
0.0084075927734375,
-0.0212554931640625,
-0.0107269287109375,
0.008331298828125,
0.00510406494140625,
0.005573272705078125,
0.059417724609375,
-0.01490020751953125,
-0.0005588531494140625,
-0.03375244140625,
-0.028411865234375,
0.0355224609375,
0.00867462158203125,
0.002170562744140625,
0.01085662841796875,
0.01517486572265625,
-0.01096343994140625,
0.0175933837890625,
-0.0080108642578125,
0.0321044921875,
0.03192138671875,
-0.0027217864990234375,
-0.04327392578125,
0.0286865234375,
-0.00444793701171875,
-0.003475189208984375,
0.032440185546875,
0.0249481201171875,
0.035430908203125,
-0.041961669921875,
0.0625,
0.043060302734375,
0.055694580078125,
-0.0157928466796875,
0.008758544921875,
0.065673828125,
-0.01255035400390625,
0.00476837158203125,
0.012420654296875,
-0.039306640625,
-0.064697265625,
0.03240966796875,
0.0347900390625,
-0.0217437744140625,
0.0262451171875,
-0.10101318359375,
-0.018341064453125,
0.04840087890625,
0.0280914306640625,
-0.077880859375,
0.036224365234375,
-0.001495361328125,
0.034210205078125,
0.0102996826171875,
0.01035308837890625,
-0.007568359375,
0.0073394775390625,
-0.04400634765625,
-0.0273590087890625,
-0.04339599609375,
0.0275726318359375,
-0.045196533203125,
0.0249481201171875,
0.04437255859375,
-0.0333251953125,
0.0125885009765625,
0.01372528076171875,
0.031280517578125,
0.06707763671875,
-0.035888671875,
-0.0157470703125,
0.059661865234375,
-0.0439453125,
-0.01678466796875,
-0.0643310546875,
0.0011129379272460938,
-0.11322021484375,
0.002300262451171875,
0.041290283203125,
-0.03533935546875,
0.006114959716796875,
-0.04974365234375,
-0.1029052734375,
0.0921630859375,
-0.0120697021484375,
-0.0416259765625,
0.03643798828125,
0.025970458984375,
-0.0195770263671875,
-0.03271484375,
0.0024776458740234375,
0.000858306884765625,
0.06707763671875,
0.0180816650390625,
0.010345458984375,
0.06573486328125,
0.0084686279296875,
-0.006580352783203125,
-0.05303955078125,
-0.02386474609375,
-0.049224853515625,
0.040863037109375,
-0.00009608268737792969,
-0.012664794921875,
0.0195770263671875,
0.0175323486328125,
-0.052215576171875,
-0.054229736328125,
-0.0048675537109375,
0.0132293701171875,
0.0168609619140625,
-0.0235748291015625,
-0.09613037109375,
-0.07342529296875,
0.1064453125,
0.0341796875,
0.0386962890625,
0.0245361328125,
0.0038776397705078125,
-0.026153564453125,
-0.0732421875,
0.004688262939453125,
0.04205322265625,
-0.0645751953125,
-0.00223541259765625,
0.045135498046875,
0.00763702392578125,
-0.0039005279541015625,
0.0009984970092773438,
-0.033294677734375,
-0.0109710693359375,
-0.0220184326171875,
0.0148162841796875,
-0.0726318359375,
0.0234527587890625,
0.036407470703125,
-0.0238037109375,
0.0038394927978515625,
0.0087127685546875,
-0.020721435546875,
0.025238037109375,
0.051971435546875,
-0.02838134765625,
-0.0103759765625,
-0.0178070068359375,
0.0399169921875,
-0.019134521484375,
0.0087890625,
-0.039642333984375,
0.0249176025390625,
-0.041778564453125,
-0.0013093948364257812,
0.0230560302734375,
-0.0189971923828125,
-0.00958251953125,
-0.01035308837890625,
0.024078369140625,
0.011138916015625,
-0.0047454833984375,
-0.01812744140625,
-0.0178680419921875,
0.03717041015625,
0.006832122802734375,
-0.007656097412109375,
0.0322265625,
-0.0321044921875,
0.01136016845703125,
-0.0195159912109375,
0.024322509765625,
-0.0020236968994140625,
-0.002880096435546875,
-0.0223388671875,
-0.0242919921875,
0.004146575927734375
] |
8f7ecbd4ee39c0ac747b90982c05f245595be768
|
Wordpress Stackexchange
Q: Display posts from an author using search parameters (not author template/query_posts) Is there a way to retrieve a list of all the posts by an author using search (example: ?s&author=xxx)? I can't use query_posts or author template (don't ask why, take it as a condition).
And it should be a public query (the filter in admin panel isn't good).
If isn't available by default as a search parameter, do you know how to add it smoothly through functions.php (without flooding WP with db queries or requests that slow it down).
A: This is what I was looking for:
/?s=+&author_name=username
|
Q: Display posts from an author using search parameters (not author template/query_posts) Is there a way to retrieve a list of all the posts by an author using search (example: ?s&author=xxx)? I can't use query_posts or author template (don't ask why, take it as a condition).
And it should be a public query (the filter in admin panel isn't good).
If isn't available by default as a search parameter, do you know how to add it smoothly through functions.php (without flooding WP with db queries or requests that slow it down).
A: This is what I was looking for:
/?s=+&author_name=username
|
wordpress
|
{
"language": "en",
"length": 100,
"provenance": "stackexchange_00019.jsonl.gz:428839",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85058"
}
|
[
0.05010986328125,
0.007007598876953125,
0.05218505859375,
0.0009417533874511719,
-0.005756378173828125,
-0.001483917236328125,
0.04278564453125,
-0.05694580078125,
0.0179443359375,
0.04144287109375,
-0.040985107421875,
-0.005519866943359375,
-0.0020904541015625,
-0.0012645721435546875,
-0.02972412109375,
-0.04998779296875,
0.0357666015625,
-0.0192413330078125,
0.036956787109375,
-0.00542449951171875,
0.0291900634765625,
-0.000308990478515625,
0.06610107421875,
0.022308349609375,
0.039459228515625,
0.005664825439453125,
0.0693359375,
-0.03411865234375,
0.044586181640625,
-0.01229095458984375,
0.034332275390625,
-0.03826904296875,
-0.0130615234375,
0.0249481201171875,
0.010986328125,
0.02783203125,
-0.03302001953125,
0.04925537109375,
0.042205810546875,
-0.017822265625,
0.0212554931640625,
-0.0091094970703125,
-0.0560302734375,
0.03985595703125,
-0.03289794921875,
-0.0711669921875,
0.041656494140625,
-0.022918701171875,
0.03656005859375,
0.016021728515625,
-0.01186370849609375,
0.00992584228515625,
-0.00689697265625,
-0.0244140625,
-0.01318359375,
-0.0108795166015625,
0.052490234375,
0.0089874267578125,
0.0347900390625,
-0.1009521484375,
-0.053558349609375,
0.0172271728515625,
0.050323486328125,
0.06353759765625,
0.01421356201171875,
0.01611328125,
0.04669189453125,
0.018951416015625,
-0.032135009765625,
-0.01291656494140625,
0.004505157470703125,
-0.033203125,
-0.01549530029296875,
0.032440185546875,
-0.0277252197265625,
-0.052032470703125,
0.0012845993041992188,
-0.044036865234375,
0.011993408203125,
0.033447265625,
-0.02508544921875,
-0.0267791748046875,
-0.054901123046875,
-0.02374267578125,
0.01262664794921875,
0.001102447509765625,
-0.00823974609375,
-0.0036773681640625,
-0.0297393798828125,
-0.01548004150390625,
-0.0183868408203125,
-0.049041748046875,
-0.0487060546875,
0.0323486328125,
0.015716552734375,
-0.04034423828125,
0.0170745849609375,
0.055816650390625,
-0.00861358642578125,
0.01275634765625,
-0.04852294921875,
-0.0138702392578125,
-0.012115478515625,
-0.046966552734375,
0.004421234130859375,
0.06640625,
0.01318359375,
0.061859130859375,
0.0261383056640625,
0.0170440673828125,
0.02166748046875,
-0.03680419921875,
-0.03564453125,
-0.00811767578125,
-0.038116455078125,
0.0198822021484375,
-0.049560546875,
-0.01052093505859375,
0.00603485107421875,
0.001033782958984375,
0.0276031494140625,
0.0243682861328125,
0.00206756591796875,
0.0099334716796875,
-0.0004477500915527344,
-0.012176513671875,
-0.0203704833984375,
-0.01617431640625,
0.014129638671875,
-0.0186309814453125,
-0.014190673828125,
0.0226593017578125,
0.0146484375,
0.0186309814453125,
-0.0028839111328125,
-0.004215240478515625,
-0.00954437255859375,
-0.0059051513671875,
-0.0018434524536132812,
-0.0229949951171875,
0.00888824462890625,
-0.0182952880859375,
0.0034389495849609375,
0.012969970703125,
0.011260986328125,
-0.016693115234375,
0.023345947265625,
0.048431396484375,
-0.007472991943359375,
-0.00677490234375,
-0.00691986083984375,
0.06646728515625,
0.0152435302734375,
0.00879669189453125,
0.0113677978515625,
-0.0040740966796875,
0.0499267578125,
-0.0267486572265625,
-0.015777587890625,
-0.030792236328125,
0.033447265625,
0.0107574462890625,
0.00839996337890625,
0.00984954833984375,
0.0015697479248046875,
-0.03350830078125,
-0.0249176025390625,
-0.0002111196517944336,
0.018035888671875,
-0.013824462890625,
0.003017425537109375,
-0.00384521484375,
0.019195556640625,
0.0290069580078125,
0.01097869873046875,
0.02728271484375,
0.0012845993041992188,
0.033447265625,
-0.012725830078125,
0.054718017578125,
0.022613525390625,
-0.03558349609375,
0.028076171875,
-0.0089263916015625,
-0.08343505859375,
0.0599365234375,
0.01445770263671875,
0.0992431640625,
0.0161590576171875,
0.002315521240234375,
0.06298828125,
0.003662109375,
-0.03411865234375,
0.034515380859375,
-0.00274658203125,
-0.0309906005859375,
-0.013397216796875,
-0.01226043701171875,
0.0015392303466796875,
0.00490570068359375,
0.0225677490234375,
-0.00487518310546875,
0.0169830322265625,
0.0061492919921875,
-0.03424072265625,
0.02081298828125,
-0.0204010009765625,
0.00870513916015625,
0.005832672119140625,
0.042572021484375,
0.0203857421875,
0.0186920166015625,
-0.052825927734375,
0.00809478759765625,
-0.0102691650390625,
0.014984130859375,
-0.006961822509765625,
-0.0053253173828125,
0.0070343017578125,
-0.0035228729248046875,
0.0081024169921875,
-0.0182647705078125,
-0.00007408857345581055,
0.036834716796875,
0.054473876953125,
-0.022796630859375,
-0.0032176971435546875,
-0.0399169921875,
0.031494140625,
0.004451751708984375,
-0.048919677734375,
0.0209503173828125,
0.01190948486328125,
0.0372314453125,
-0.02362060546875,
0.00540924072265625,
0.032012939453125,
0.02099609375,
0.0247039794921875,
0.016693115234375,
0.02166748046875,
-0.00916290283203125,
-0.01519012451171875,
-0.006168365478515625,
0.0732421875,
0.01343536376953125,
0.01174163818359375,
-0.01143646240234375,
0.0153350830078125,
0.049896240234375,
-0.002532958984375,
-0.004425048828125,
0.017669677734375,
-0.0885009765625,
0.005420684814453125,
0.05511474609375,
0.0301971435546875,
0.06317138671875,
-0.07293701171875,
0.0201873779296875,
0.000995635986328125,
0.0149078369140625,
-0.01279449462890625,
0.005359649658203125,
0.01419830322265625,
0.0021457672119140625,
0.00803375244140625,
-0.000052928924560546875,
-0.0615234375,
0.00995635986328125,
0.0296630859375,
0.0219573974609375,
0.01541900634765625,
0.024383544921875,
-0.03765869140625,
-0.0192718505859375,
0.00801849365234375,
0.001712799072265625,
-0.0267181396484375,
-0.0030040740966796875,
0.00948333740234375,
0.01149749755859375,
-0.01148223876953125,
0.003101348876953125,
-0.00226593017578125,
-0.06048583984375,
0.024322509765625,
0.06378173828125,
-0.0027866363525390625,
0.0254364013671875,
0.039215087890625,
0.0242919921875,
-0.0032863616943359375,
0.0296783447265625,
-0.052764892578125,
0.0063934326171875,
-0.00444793701171875,
-0.085693359375,
0.05908203125,
-0.052703857421875,
0.044525146484375,
0.07293701171875,
-0.00429534912109375,
0.033447265625,
0.001583099365234375,
0.0182037353515625,
0.0157928466796875,
0.01898193359375,
-0.0006356239318847656,
-0.0147552490234375,
-0.016693115234375,
-0.0045623779296875,
0.0235137939453125,
0.08001708984375,
-0.005992889404296875,
-0.046875,
-0.0007901191711425781,
0.0455322265625,
-0.0615234375,
-0.051116943359375,
0.0174560546875,
-0.05517578125,
-0.050628662109375,
-0.01334381103515625,
-0.040252685546875,
0.024871826171875,
-0.00042819976806640625,
-0.01380157470703125,
0.0246124267578125,
-0.03985595703125,
-0.07855224609375,
-0.039764404296875,
-0.08544921875,
0.034210205078125,
-0.0003650188446044922,
0.01354217529296875,
0.0106964111328125,
0.053802490234375,
0.0052490234375,
-0.0625,
-0.0122222900390625,
0.0435791015625,
-0.010498046875,
0.017181396484375,
-0.01323699951171875,
0.00901031494140625,
0.01004791259765625,
0.00571441650390625,
0.00823211669921875,
0.047698974609375,
-0.03338623046875,
0.0025501251220703125,
-0.004779815673828125,
0.014404296875,
0.0270233154296875,
0.0233001708984375,
0.006389617919921875,
0.024383544921875,
0.040679931640625,
-0.0262298583984375,
-0.0173797607421875,
-0.0098876953125,
-0.04351806640625,
0.0229339599609375,
0.0249176025390625,
-0.005893707275390625,
-0.037139892578125,
0.01558685302734375,
0.0404052734375,
0.025146484375,
-0.01242828369140625,
-0.0086517333984375,
0.00812530517578125,
0.02581787109375,
0.06689453125,
0.00234222412109375,
-0.0239105224609375,
-0.051910400390625,
-0.0038814544677734375,
-0.02130126953125,
-0.021636962890625,
-0.00984954833984375,
-0.0157318115234375,
0.00528717041015625,
-0.0172271728515625,
0.056060791015625,
0.002902984619140625,
0.01788330078125,
-0.048736572265625,
-0.038238525390625,
-0.0494384765625,
0.06329345703125,
0.0241241455078125,
-0.0186767578125,
0.01922607421875,
0.0156707763671875,
-0.0631103515625,
-0.05084228515625,
-0.029693603515625,
-0.0034275054931640625,
-0.038360595703125,
0.0005459785461425781,
-0.038543701171875,
-0.0121917724609375,
-0.0186309814453125,
0.0008549690246582031,
0.0009870529174804688,
-0.026275634765625,
0.0098876953125,
-0.01175689697265625,
0.02215576171875,
-0.0272369384765625,
-0.0009508132934570312,
-0.0109100341796875,
0.01363372802734375,
-0.044036865234375,
-0.0726318359375,
-0.028106689453125,
0.01207733154296875,
0.048736572265625,
-0.0110321044921875,
-0.01519775390625,
-0.004177093505859375,
0.05718994140625,
0.0003223419189453125,
0.050750732421875,
0.022552490234375,
0.0024662017822265625,
0.032562255859375,
-0.041290283203125,
0.01136016845703125,
-0.033782958984375,
-0.00011098384857177734,
-0.0153045654296875,
-0.00463104248046875,
-0.00807952880859375,
-0.0560302734375,
-0.03607177734375,
-0.042999267578125,
-0.0097503662109375,
-0.033294677734375,
-0.040130615234375,
-0.0011377334594726562,
0.039276123046875,
-0.031097412109375,
0.0267486572265625,
-0.043731689453125,
-0.050262451171875,
0.067138671875,
0.04888916015625,
-0.008544921875,
-0.01416015625,
0.06329345703125,
0.01336669921875,
-0.0538330078125,
-0.0210113525390625,
-0.009979248046875,
0.01277923583984375,
-0.0095367431640625,
0.009368896484375,
0.0012578964233398438,
-0.0172882080078125,
0.006832122802734375,
-0.0228118896484375,
-0.0121612548828125,
-0.004955291748046875,
0.033782958984375,
-0.0107879638671875,
-0.037933349609375,
0.038482666015625,
-0.02374267578125,
0.022308349609375,
0.0289154052734375,
0.004268646240234375,
-0.00836944580078125,
0.0443115234375,
0.0411376953125,
-0.0447998046875,
0.01050567626953125,
-0.018157958984375,
0.00473785400390625,
-0.005573272705078125,
-0.0225067138671875,
0.0205535888671875,
0.0198974609375,
-0.005252838134765625,
-0.0242462158203125,
0.003299713134765625,
-0.004787445068359375,
0.01132965087890625,
-0.01617431640625,
0.027618408203125,
0.03851318359375,
-0.047119140625,
0.001377105712890625,
-0.002803802490234375,
-0.0087738037109375,
0.05517578125,
0.00553131103515625,
-0.07171630859375,
0.04522705078125,
-0.0183868408203125,
-0.0018644332885742188,
0.037017822265625,
-0.00994110107421875,
0.01242828369140625,
0.0560302734375,
0.01922607421875,
0.0094757080078125,
0.0007901191711425781,
0.04962158203125,
-0.016326904296875,
0.053009033203125,
-0.003963470458984375,
0.0230865478515625,
0.0045318603515625,
0.09710693359375,
-0.0311737060546875,
0.054718017578125,
-0.0176544189453125,
0.01433563232421875,
-0.0419921875,
0.041961669921875,
0.0192413330078125,
-0.00626373291015625,
0.046966552734375,
-0.027069091796875,
0.00928497314453125,
-0.01023101806640625,
0.04022216796875,
-0.004268646240234375,
0.00859832763671875,
0.057342529296875,
-0.003143310546875,
0.01226043701171875,
-0.0465087890625,
-0.026641845703125,
0.006549835205078125,
0.0276641845703125,
0.017791748046875,
-0.045440673828125,
-0.042633056640625,
0.015869140625,
0.035186767578125,
-0.00838470458984375,
-0.024932861328125,
-0.03741455078125,
-0.0005445480346679688,
-0.016998291015625,
-0.00440216064453125,
-0.0066070556640625,
-0.0092620849609375,
-0.033111572265625,
-0.022918701171875,
0.0013704299926757812,
-0.0290679931640625,
-0.00396728515625,
-0.03167724609375,
-0.023468017578125,
0.0887451171875,
-0.00592803955078125,
0.02838134765625,
-0.01316070556640625,
-0.00446319580078125,
0.03656005859375,
0.020965576171875,
0.0478515625,
0.0127410888671875,
-0.06787109375,
0.0292510986328125,
-0.046844482421875,
0.0036945343017578125,
0.025970458984375,
-0.01629638671875,
-0.0509033203125,
-0.039398193359375,
0.0297698974609375,
0.010711669921875,
0.007366180419921875,
-0.0271759033203125,
-0.01294708251953125,
0.00350189208984375,
0.0175628662109375,
-0.0106964111328125,
0.01311492919921875,
0.059112548828125,
-0.0229339599609375,
0.031890869140625,
0.0173492431640625,
0.03228759765625,
-0.04046630859375,
-0.0154876708984375,
0.00640106201171875,
-0.05316162109375,
-0.0251312255859375,
0.0157623291015625,
-0.040252685546875,
-0.0009708404541015625,
0.0054473876953125,
0.0003402233123779297,
-0.007465362548828125,
-0.026458740234375,
-0.004680633544921875,
-0.00785064697265625,
0.04815673828125,
0.01416015625,
0.00046253204345703125,
0.0109405517578125,
0.01526641845703125,
0.0257720947265625,
-0.0201263427734375,
-0.01316070556640625,
-0.019134521484375,
0.0152740478515625,
-0.016143798828125,
-0.0080108642578125,
-0.02874755859375,
0.03521728515625,
0.08111572265625,
0.02410888671875,
0.04986572265625,
0.032958984375,
0.0211029052734375,
-0.0027618408203125,
-0.01654052734375,
-0.004669189453125,
0.0029811859130859375,
0.0227508544921875,
0.00594329833984375,
0.0163726806640625,
0.024200439453125,
-0.0179443359375,
-0.01259613037109375,
0.005207061767578125,
0.0267333984375,
-0.042572021484375,
0.007389068603515625,
0.0208740234375,
0.007396697998046875,
-0.01519775390625,
0.00789642333984375,
-0.01947021484375,
-0.038543701171875,
0.04345703125,
-0.025970458984375,
0.00984954833984375,
0.005130767822265625,
-0.0114898681640625,
0.0222320556640625,
-0.062408447265625,
0.042938232421875,
0.0009589195251464844,
-0.03839111328125,
0.0245361328125,
0.031463623046875,
0.005321502685546875,
-0.04107666015625,
0.01338958740234375,
0.0017538070678710938,
0.0235443115234375,
-0.027923583984375,
0.058197021484375,
-0.03948974609375,
0.029815673828125,
-0.0008101463317871094,
0.044952392578125,
-0.0023651123046875,
0.03857421875,
-0.0022678375244140625,
-0.0051116943359375,
0.033294677734375,
-0.0275421142578125,
0.01415252685546875,
-0.040069580078125,
-0.0234375,
0.0743408203125,
-0.0279541015625,
0.031524658203125,
0.0284576416015625,
0.001617431640625,
-0.01116180419921875,
-0.004581451416015625,
0.0697021484375,
-0.0182647705078125,
-0.0220184326171875,
0.02410888671875,
0.018035888671875,
-0.01776123046875,
0.0161285400390625,
-0.0224761962890625,
-0.053070068359375,
0.003391265869140625,
0.007366180419921875,
-0.0189056396484375,
0.01568603515625,
0.010162353515625,
-0.040771484375,
0.050750732421875,
0.00799560546875,
0.00919342041015625,
0.0125885009765625,
0.0184478759765625,
0.0007119178771972656,
0.01611328125,
-0.040252685546875,
0.046600341796875,
0.0235748291015625,
0.04779052734375,
-0.040496826171875,
-0.01352691650390625,
0.0157012939453125,
0.040496826171875,
0.08404541015625,
0.00859832763671875,
-0.0362548828125,
-0.0096588134765625,
0.048370361328125,
0.0271453857421875,
-0.02191162109375,
0.0408935546875,
0.03240966796875,
0.0206756591796875,
0.045867919921875,
-0.0384521484375,
0.02264404296875,
-0.01343536376953125,
0.0343017578125,
0.038421630859375,
0.01439666748046875,
0.03955078125,
0.002288818359375,
-0.056884765625,
-0.030242919921875,
-0.0169219970703125,
0.0215606689453125,
-0.052001953125,
0.02166748046875,
0.037811279296875,
0.080078125,
-0.06072998046875,
-0.055450439453125,
-0.0169830322265625,
0.054046630859375,
0.033721923828125,
0.021759033203125,
0.0298614501953125,
0.0205078125,
0.033203125,
-0.0203094482421875,
0.022491455078125,
0.008636474609375,
-0.017303466796875,
0.04974365234375,
-0.011749267578125,
0.0089111328125,
-0.07708740234375,
-0.01175689697265625,
0.0450439453125,
0.063720703125,
-0.032806396484375,
-0.058319091796875,
0.00632476806640625,
-0.0210113525390625,
0.0010356903076171875,
0.017425537109375,
-0.01293182373046875,
0.04864501953125,
0.06549072265625,
-0.040771484375,
-0.01120758056640625,
0.0034027099609375,
0.037872314453125,
-0.0198974609375,
-0.017059326171875,
-0.0052490234375,
-0.0193328857421875,
-0.016510009765625,
-0.02587890625,
0.01248931884765625,
0.0247802734375,
0.0266265869140625,
0.00153350830078125,
-0.0049285888671875,
-0.00603485107421875,
-0.0010728836059570312,
-0.0015621185302734375,
-0.007701873779296875,
0.01540374755859375,
-0.0211639404296875,
0.006168365478515625,
-0.00433349609375,
0.031280517578125,
0.040283203125,
0.0176544189453125,
0.042510986328125,
0.0156402587890625,
-0.034423828125,
0.00865936279296875,
0.036529541015625,
-0.0272674560546875,
0.00791168212890625,
-0.01230621337890625,
0.005786895751953125,
0.032135009765625,
-0.01157379150390625,
-0.0195159912109375,
0.0104827880859375,
0.060272216796875,
-0.0245513916015625,
0.0207061767578125,
0.006671905517578125,
-0.02886962890625,
0.02459716796875,
-0.00438690185546875,
0.020538330078125,
0.0036373138427734375,
-0.07696533203125,
-0.0111846923828125,
-0.0247650146484375,
-0.047119140625,
0.03118896484375,
0.0439453125,
-0.0221710205078125,
0.00738525390625,
-0.0311126708984375,
-0.00289154052734375,
-0.0193328857421875,
-0.025390625,
0.03680419921875,
0.01849365234375,
-0.024627685546875,
0.006103515625,
-0.07232666015625,
-0.040374755859375,
0.0003914833068847656,
0.008758544921875,
-0.002109527587890625,
0.033416748046875,
0.0271453857421875,
-0.0016412734985351562,
0.006134033203125,
0.0369873046875,
-0.062042236328125,
-0.019866943359375,
0.0675048828125,
-0.0703125,
-0.017791748046875,
0.01451873779296875,
-0.0269317626953125,
0.0645751953125,
0.00421905517578125,
0.00759124755859375,
0.061004638671875,
-0.0185699462890625,
-0.00567626953125,
-0.028350830078125,
-0.02838134765625,
-0.03607177734375,
-0.01296234130859375,
-0.0010251998901367188,
-0.005184173583984375,
0.00885009765625,
-0.0162811279296875,
-0.0067901611328125,
0.0097808837890625,
0.0162506103515625,
-0.0555419921875,
0.0214385986328125,
-0.0293426513671875,
0.032745361328125,
0.04058837890625,
0.0258636474609375,
0.0061187744140625,
0.003292083740234375,
-0.019195556640625,
0.03564453125,
-0.004611968994140625,
0.00489044189453125,
0.00412750244140625,
-0.0277099609375,
-0.0246429443359375,
-0.022186279296875,
0.034149169921875,
0.020416259765625,
-0.0026264190673828125,
-0.05633544921875,
0.00951385498046875,
-0.029510498046875,
0.01215362548828125,
-0.030487060546875,
-0.00850677490234375,
0.01439666748046875,
0.006649017333984375,
0.01160430908203125,
-0.0435791015625,
-0.0614013671875,
-0.01226043701171875,
-0.0038661956787109375,
-0.0177154541015625,
-0.0234375,
0.02154541015625,
-0.03424072265625,
0.0018596649169921875,
-0.057891845703125,
-0.034454345703125,
0.026580810546875,
0.07806396484375,
-0.022674560546875,
0.048126220703125,
-0.0247955322265625,
-0.0908203125,
-0.005542755126953125,
0.0308990478515625,
0.0374755859375,
-0.0207977294921875,
-0.0018606185913085938,
0.050506591796875,
0.02716064453125,
0.11163330078125,
-0.027099609375,
-0.0021533966064453125,
0.028778076171875,
0.0101470947265625,
-0.042816162109375,
-0.1080322265625,
0.02337646484375,
-0.06646728515625,
0.00872802734375,
0.0022335052490234375,
0.0189971923828125,
0.0367431640625,
-0.0015707015991210938,
-0.034820556640625,
0.0875244140625,
-0.0180816650390625,
-0.0211181640625,
-0.0212554931640625,
-0.0117034912109375,
0.006549835205078125,
-0.0286102294921875,
0.0030975341796875,
-0.0236663818359375,
-0.06866455078125,
-0.0079803466796875,
-0.00940704345703125,
-0.0013332366943359375,
0.04278564453125,
-0.0143890380859375,
-0.046417236328125,
-0.016082763671875,
-0.023590087890625,
-0.030059814453125,
0.026519775390625,
-0.041351318359375,
0.0272674560546875,
0.044464111328125,
-0.03582763671875,
-0.021209716796875,
0.0002124309539794922,
0.006195068359375,
-0.0178985595703125,
-0.01617431640625,
-0.032318115234375,
0.0008530616760253906,
0.0304107666015625,
0.059814453125,
0.02056884765625,
-0.044891357421875,
0.00926971435546875,
-0.003170013427734375,
-0.00135040283203125,
-0.0237274169921875,
-0.002323150634765625,
-0.0196380615234375,
0.0017147064208984375,
-0.03338623046875,
-0.017608642578125,
0.0144500732421875,
-0.0218353271484375,
-0.035430908203125,
-0.0024471282958984375,
-0.0225372314453125,
-0.00371551513671875,
-0.033111572265625,
0.0294189453125,
0.0010538101196289062,
-0.0097198486328125,
-0.01702880859375,
0.004558563232421875,
-0.0159454345703125,
-0.0252685546875,
0.0018520355224609375,
-0.005382537841796875,
0.0186309814453125,
0.003810882568359375,
0.00115966796875,
0.01474761962890625,
-0.0065765380859375,
0.000007212162017822266,
0.0113677978515625,
-0.03515625,
0.045013427734375,
0.00559234619140625,
0.0226593017578125,
-0.0094757080078125,
0.04254150390625,
0.0107269287109375,
0.0887451171875,
-0.01519775390625,
0.0174713134765625,
-0.0174713134765625,
0.044189453125,
-0.00634002685546875,
-0.007740020751953125,
0.0231475830078125,
-0.0148468017578125,
-0.0110015869140625,
0.005794525146484375,
-0.01153564453125,
-0.039093017578125,
0.0176239013671875,
0.0135498046875,
0.005176544189453125,
0.0259246826171875
] |
8518ea67e9021971787c349cba23cc9e12eb0301
|
Wordpress Stackexchange
Q: Rewrite the base-url for single posts I want to append the URL when viewing a single post.
For example when im on a post I want the url to be something like: example.com/mypage/mypage/single-post-article
The default url is example.com/single-post-article
I did not find something here on WPSE or the goooglz, but I have read about wp-rewrite and tried add_post_type_support to the post but no luck!
add_post_type_support( 'post', array(
'rewrite' => array('slug' => '/bla/bla/')
));
Do I need to use wp_rewrite?
Update
I did get this to work by run register_post_type on the post_type "post" again. But is this the best way?
register_post_type( 'post', array(
'public' => true,
'_builtin' => false,
'_edit_link' => 'post.php?post=%d',
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array( 'slug' => '/mypage/mypage' ),
'query_var' => false,
'pages' => false,
'supports' => array(
'title',
'editor',
'author',
'thumbnail',
'excerpt',
'revisions
),
));
A: Go to your Settings > Permalinks page and set your permalinks to:
/mypage/mypage/%postname%/
If you don't want categories to append /mypage/mypage, you can change their permastruct:
function wpa85084_category_permastruct(){
global $wp_rewrite;
$wp_rewrite->extra_permastructs['category']['struct'] = '/category/%category%';
}
add_action( 'init', 'wpa85084_category_permastruct' );
|
Q: Rewrite the base-url for single posts I want to append the URL when viewing a single post.
For example when im on a post I want the url to be something like: example.com/mypage/mypage/single-post-article
The default url is example.com/single-post-article
I did not find something here on WPSE or the goooglz, but I have read about wp-rewrite and tried add_post_type_support to the post but no luck!
add_post_type_support( 'post', array(
'rewrite' => array('slug' => '/bla/bla/')
));
Do I need to use wp_rewrite?
Update
I did get this to work by run register_post_type on the post_type "post" again. But is this the best way?
register_post_type( 'post', array(
'public' => true,
'_builtin' => false,
'_edit_link' => 'post.php?post=%d',
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array( 'slug' => '/mypage/mypage' ),
'query_var' => false,
'pages' => false,
'supports' => array(
'title',
'editor',
'author',
'thumbnail',
'excerpt',
'revisions
),
));
A: Go to your Settings > Permalinks page and set your permalinks to:
/mypage/mypage/%postname%/
If you don't want categories to append /mypage/mypage, you can change their permastruct:
function wpa85084_category_permastruct(){
global $wp_rewrite;
$wp_rewrite->extra_permastructs['category']['struct'] = '/category/%category%';
}
add_action( 'init', 'wpa85084_category_permastruct' );
A: Did you try flushing your rewrite rules after you defined them?
flush_rewrite_rules();
|
wordpress
|
{
"language": "en",
"length": 198,
"provenance": "stackexchange_00019.jsonl.gz:428845",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85084"
}
|
[
0.042266845703125,
-0.0056610107421875,
-0.007022857666015625,
-0.07501220703125,
-0.0005922317504882812,
0.0080718994140625,
0.004398345947265625,
0.0015592575073242188,
-0.052490234375,
-0.0023975372314453125,
0.000031054019927978516,
0.00206756591796875,
-0.019012451171875,
-0.05902099609375,
0.055267333984375,
-0.01214599609375,
0.0201263427734375,
-0.01430511474609375,
0.002960205078125,
-0.001529693603515625,
0.00011044740676879883,
-0.01445770263671875,
0.0177001953125,
0.0132904052734375,
-0.007770538330078125,
-0.0206451416015625,
0.051025390625,
-0.05224609375,
-0.0184173583984375,
-0.051544189453125,
0.0030956268310546875,
0.0308837890625,
0.029296875,
-0.006504058837890625,
0.0081329345703125,
0.0063323974609375,
-0.00978851318359375,
-0.005596160888671875,
-0.0028209686279296875,
0.0122222900390625,
0.0252685546875,
-0.018707275390625,
0.0184478759765625,
0.0114288330078125,
0.0272674560546875,
-0.0389404296875,
0.0299835205078125,
-0.0748291015625,
0.01114654541015625,
-0.002521514892578125,
-0.00260162353515625,
0.03057861328125,
-0.0022220611572265625,
-0.020660400390625,
-0.00565338134765625,
-0.0139312744140625,
-0.02044677734375,
-0.0328369140625,
0.032379150390625,
-0.0126495361328125,
-0.0250244140625,
-0.04156494140625,
0.03515625,
0.0047760009765625,
-0.01509857177734375,
-0.00955963134765625,
-0.00998687744140625,
0.037933349609375,
-0.04833984375,
-0.032623291015625,
0.0258026123046875,
-0.0277862548828125,
-0.016632080078125,
-0.0146942138671875,
-0.0307769775390625,
0.0160675048828125,
0.00008618831634521484,
-0.01158905029296875,
0.01459503173828125,
0.016265869140625,
0.019012451171875,
0.0057830810546875,
0.0433349609375,
-0.04345703125,
0.03851318359375,
-0.01061248779296875,
-0.0110015869140625,
-0.0220947265625,
-0.043121337890625,
-0.01224517822265625,
-0.0222015380859375,
-0.0262451171875,
-0.0250701904296875,
-0.00792694091796875,
0.00201416015625,
-0.006710052490234375,
0.004276275634765625,
0.0185546875,
0.018310546875,
0.0195159912109375,
0.049957275390625,
-0.06707763671875,
0.062347412109375,
-0.04052734375,
0.021514892578125,
0.048553466796875,
0.01251983642578125,
0.02093505859375,
0.054107666015625,
-0.0090789794921875,
-0.0033664703369140625,
0.07891845703125,
-0.00942230224609375,
0.01222991943359375,
-0.02227783203125,
-0.00921630859375,
-0.0712890625,
-0.0066070556640625,
-0.035736083984375,
-0.00200653076171875,
-0.022857666015625,
0.0260467529296875,
0.002780914306640625,
-0.0030765533447265625,
-0.0007319450378417969,
0.0023441314697265625,
0.016082763671875,
-0.04864501953125,
-0.00016260147094726562,
0.01824951171875,
-0.0086669921875,
0.0082855224609375,
0.0421142578125,
0.044036865234375,
0.0212554931640625,
-0.0259857177734375,
0.040130615234375,
-0.034515380859375,
-0.015045166015625,
0.03369140625,
-0.0304412841796875,
-0.01287841796875,
0.024932861328125,
-0.026519775390625,
0.0195770263671875,
0.01229095458984375,
0.01385498046875,
0.024261474609375,
0.027923583984375,
-0.0201263427734375,
-0.0030002593994140625,
0.0030670166015625,
0.049407958984375,
-0.017120361328125,
-0.00957489013671875,
-0.03851318359375,
0.02606201171875,
-0.03021240234375,
-0.01385498046875,
-0.032257080078125,
0.04449462890625,
0.007904052734375,
0.03070068359375,
-0.0188751220703125,
-0.0465087890625,
-0.0200958251953125,
-0.07867431640625,
-0.02105712890625,
0.00388336181640625,
-0.0007796287536621094,
-0.0035686492919921875,
-0.00682830810546875,
-0.03729248046875,
-0.0019092559814453125,
0.0019483566284179688,
0.005519866943359375,
-0.042083740234375,
0.0027370452880859375,
0.01441192626953125,
0.0792236328125,
0.0166015625,
-0.020599365234375,
0.002349853515625,
0.024932861328125,
-0.06951904296875,
0.077392578125,
-0.0032100677490234375,
0.08740234375,
0.005859375,
0.005001068115234375,
0.001094818115234375,
0.02349853515625,
-0.0118560791015625,
-0.00884246826171875,
0.00862884521484375,
-0.022918701171875,
0.006328582763671875,
-0.01419830322265625,
-0.0181732177734375,
0.0091705322265625,
0.01149749755859375,
0.01103973388671875,
0.02166748046875,
0.02783203125,
0.0024776458740234375,
0.01971435546875,
-0.0095367431640625,
0.0298919677734375,
-0.01433563232421875,
0.00891876220703125,
0.0267333984375,
0.01486968994140625,
-0.01168060302734375,
-0.067138671875,
-0.0225982666015625,
0.058563232421875,
0.033233642578125,
0.0201263427734375,
-0.00959014892578125,
0.0234222412109375,
0.009979248046875,
-0.028778076171875,
-0.0211181640625,
0.050994873046875,
0.06231689453125,
0.003276824951171875,
-0.0198822021484375,
-0.029693603515625,
-0.01305389404296875,
0.004566192626953125,
-0.108642578125,
0.059814453125,
0.015899658203125,
0.00598907470703125,
-0.0264434814453125,
0.00933837890625,
0.007598876953125,
-0.01212310791015625,
-0.004547119140625,
0.04486083984375,
0.025299072265625,
0.0072021484375,
-0.0118560791015625,
0.011566162109375,
0.02099609375,
-0.01479339599609375,
0.01374053955078125,
-0.00676727294921875,
-0.0031890869140625,
0.052215576171875,
0.05633544921875,
0.0088348388671875,
0.007129669189453125,
-0.0316162109375,
-0.0014085769653320312,
0.0273590087890625,
-0.02166748046875,
0.01491546630859375,
-0.01351165771484375,
-0.01299285888671875,
0.0193634033203125,
0.020172119140625,
-0.0056915283203125,
0.01367950439453125,
0.0156402587890625,
0.037139892578125,
0.047760009765625,
0.049957275390625,
-0.003696441650390625,
0.0152587890625,
-0.00911712646484375,
0.0031566619873046875,
-0.003353118896484375,
0.0047760009765625,
0.029510498046875,
-0.044952392578125,
-0.009918212890625,
0.01080322265625,
0.0020122528076171875,
-0.01324462890625,
-0.0179290771484375,
0.01849365234375,
-0.040252685546875,
-0.01232147216796875,
-0.02728271484375,
-0.0396728515625,
-0.004711151123046875,
-0.006870269775390625,
0.033172607421875,
0.0075531005859375,
0.057586669921875,
-0.0135650634765625,
-0.0118255615234375,
0.0090179443359375,
0.01314544677734375,
-0.033477783203125,
0.0262451171875,
-0.0675048828125,
0.06842041015625,
-0.06689453125,
0.039154052734375,
0.048614501953125,
-0.041046142578125,
0.02911376953125,
-0.003971099853515625,
0.021942138671875,
-0.0037078857421875,
0.020294189453125,
-0.0183868408203125,
-0.035919189453125,
-0.0208587646484375,
-0.023773193359375,
0.0272369384765625,
0.01507568359375,
0.0259246826171875,
-0.01309967041015625,
0.0234832763671875,
0.0362548828125,
-0.04351806640625,
-0.0677490234375,
-0.0008778572082519531,
-0.08477783203125,
0.014617919921875,
0.0217132568359375,
-0.038726806640625,
-0.0207366943359375,
0.07586669921875,
0.01029205322265625,
0.021728515625,
-0.0038700103759765625,
-0.08099365234375,
-0.037689208984375,
-0.0770263671875,
-0.026885986328125,
-0.017333984375,
0.004703521728515625,
0.0271148681640625,
0.01442718505859375,
0.030181884765625,
-0.01373291015625,
0.049102783203125,
0.0291900634765625,
-0.033721923828125,
-0.0213623046875,
-0.0160369873046875,
0.00370025634765625,
0.002307891845703125,
-0.007312774658203125,
0.05963134765625,
0.03460693359375,
-0.024688720703125,
0.026611328125,
-0.006053924560546875,
0.007663726806640625,
0.001285552978515625,
0.01006317138671875,
0.0408935546875,
0.0246734619140625,
0.0163726806640625,
-0.021942138671875,
-0.04278564453125,
-0.0056304931640625,
-0.04986572265625,
-0.0082855224609375,
0.03466796875,
0.0101318359375,
-0.031707763671875,
0.02801513671875,
0.0005245208740234375,
0.01837158203125,
0.07427978515625,
-0.036102294921875,
0.0155029296875,
-0.029052734375,
-0.03790283203125,
-0.055908203125,
0.0235595703125,
-0.026580810546875,
0.00930023193359375,
0.00858306884765625,
-0.0287017822265625,
0.0011835098266601562,
-0.0294189453125,
-0.01419830322265625,
-0.037994384765625,
0.0233306884765625,
-0.08062744140625,
0.01253509521484375,
-0.053680419921875,
0.00074005126953125,
-0.0238494873046875,
0.060943603515625,
-0.031829833984375,
-0.016021728515625,
-0.021026611328125,
0.01050567626953125,
-0.039306640625,
-0.051666259765625,
-0.042144775390625,
0.005214691162109375,
-0.06298828125,
-0.0148468017578125,
0.0038280487060546875,
-0.04962158203125,
0.0185546875,
-0.01666259765625,
-0.022125244140625,
-0.035797119140625,
0.03887939453125,
-0.0238800048828125,
0.002025604248046875,
0.056854248046875,
-0.00666046142578125,
0.022430419921875,
-0.05615234375,
0.0064849853515625,
-0.072998046875,
-0.0176239013671875,
0.0051116943359375,
0.0645751953125,
-0.01557159423828125,
-0.006664276123046875,
-0.0169219970703125,
0.060638427734375,
0.0013303756713867188,
-0.005157470703125,
0.01776123046875,
0.00832366943359375,
0.0022335052490234375,
0.031768798828125,
0.0175933837890625,
-0.0012102127075195312,
0.0223388671875,
-0.0028896331787109375,
-0.049530029296875,
0.0190887451171875,
-0.0179443359375,
0.0142822265625,
0.0124969482421875,
-0.030853271484375,
-0.033660888671875,
-0.033294677734375,
-0.0205535888671875,
0.039215087890625,
-0.0208587646484375,
0.00737762451171875,
-0.04046630859375,
-0.07135009765625,
0.03875732421875,
-0.0235748291015625,
-0.0064544677734375,
0.0183868408203125,
0.019317626953125,
0.0032863616943359375,
-0.0273895263671875,
-0.0255889892578125,
0.0197296142578125,
0.032623291015625,
-0.01421356201171875,
0.055328369140625,
0.0196685791015625,
0.0006432533264160156,
0.030609130859375,
-0.01383209228515625,
0.01027679443359375,
-0.017974853515625,
0.011444091796875,
-0.0024738311767578125,
-0.0200042724609375,
0.0126190185546875,
-0.0166015625,
0.0149993896484375,
0.041595458984375,
-0.0168914794921875,
-0.00479888916015625,
-0.006500244140625,
0.0239410400390625,
-0.00679779052734375,
0.005603790283203125,
-0.042083740234375,
-0.020721435546875,
-0.0002428293228149414,
0.051483154296875,
0.05218505859375,
0.01326751708984375,
0.01140594482421875,
0.025482177734375,
0.0418701171875,
-0.007694244384765625,
0.0155792236328125,
0.0057525634765625,
0.0256500244140625,
0.0264892578125,
0.00485992431640625,
-0.00913238525390625,
-0.00862884521484375,
0.003574371337890625,
-0.0030918121337890625,
0.03662109375,
-0.012176513671875,
0.028350830078125,
-0.00360107421875,
0.00022995471954345703,
-0.01323699951171875,
0.011627197265625,
0.0215911865234375,
0.0190582275390625,
-0.00003343820571899414,
-0.0030364990234375,
-0.0161895751953125,
-0.005588531494140625,
-0.031005859375,
0.0236663818359375,
-0.005184173583984375,
-0.00687408447265625,
0.0291900634765625,
0.01548004150390625,
0.0200653076171875,
0.0014944076538085938,
-0.0264892578125,
-0.0108642578125,
0.042144775390625,
0.0184326171875,
0.0185089111328125,
-0.017791748046875,
-0.01294708251953125,
0.01416778564453125,
0.03460693359375,
-0.055633544921875,
-0.019927978515625,
0.0273284912109375,
0.048492431640625,
0.0024433135986328125,
-0.0098114013671875,
-0.01033782958984375,
0.007221221923828125,
-0.0268707275390625,
0.021209716796875,
-0.01568603515625,
-0.040252685546875,
-0.0207366943359375,
0.0199432373046875,
0.03656005859375,
-0.0130157470703125,
-0.02008056640625,
-0.0003612041473388672,
-0.01141357421875,
0.03369140625,
0.01522064208984375,
0.001079559326171875,
0.01453399658203125,
-0.01369476318359375,
0.0190582275390625,
-0.0293121337890625,
0.0308380126953125,
-0.0197906494140625,
0.059234619140625,
-0.07086181640625,
-0.048431396484375,
0.046234130859375,
-0.0018777847290039062,
0.046539306640625,
0.003143310546875,
-0.048736572265625,
0.0692138671875,
0.00975799560546875,
0.0328369140625,
-0.007415771484375,
-0.053680419921875,
0.019805908203125,
-0.060638427734375,
-0.003856658935546875,
0.029327392578125,
-0.0166015625,
-0.032379150390625,
-0.028167724609375,
0.04315185546875,
0.0298004150390625,
0.00604248046875,
-0.0199432373046875,
-0.0195770263671875,
0.00702667236328125,
0.0134429931640625,
0.0501708984375,
-0.021087646484375,
0.0860595703125,
-0.0228118896484375,
0.052001953125,
-0.003536224365234375,
0.028289794921875,
-0.0037136077880859375,
-0.01904296875,
-0.0186614990234375,
-0.035919189453125,
-0.007099151611328125,
0.00876617431640625,
-0.0288238525390625,
0.04254150390625,
0.0770263671875,
0.0169525146484375,
-0.0228271484375,
0.00653839111328125,
-0.0004105567932128906,
-0.0357666015625,
0.012237548828125,
-0.0161285400390625,
0.0167694091796875,
-0.03778076171875,
0.04425048828125,
0.08343505859375,
-0.032806396484375,
-0.02154541015625,
-0.02813720703125,
-0.004322052001953125,
0.00226593017578125,
0.0304412841796875,
-0.042083740234375,
0.032745361328125,
0.100341796875,
0.039337158203125,
0.0662841796875,
0.02520751953125,
0.034912109375,
0.0230255126953125,
-0.006988525390625,
0.0091552734375,
0.043548583984375,
0.0322265625,
-0.003665924072265625,
0.01319122314453125,
0.032073974609375,
-0.0002875328063964844,
0.0084991455078125,
0.04034423828125,
0.050262451171875,
-0.07373046875,
0.0169677734375,
0.01641845703125,
0.03277587890625,
0.061553955078125,
0.0305938720703125,
0.00469207763671875,
-0.007450103759765625,
-0.0003440380096435547,
0.0263519287109375,
0.01523590087890625,
0.0211639404296875,
0.005733489990234375,
0.001277923583984375,
-0.016632080078125,
0.0300140380859375,
0.006069183349609375,
-0.03155517578125,
-0.005970001220703125,
0.021759033203125,
-0.01296234130859375,
-0.01641845703125,
-0.0377197265625,
0.03509521484375,
-0.047210693359375,
-0.04058837890625,
0.0489501953125,
-0.0252227783203125,
0.0242156982421875,
0.04296875,
0.00214385986328125,
-0.005466461181640625,
0.0261077880859375,
-0.01123046875,
0.0294647216796875,
0.0018777847290039062,
-0.040802001953125,
0.043701171875,
-0.01061248779296875,
0.015045166015625,
-0.0036182403564453125,
-0.03436279296875,
-0.00807952880859375,
-0.01519775390625,
-0.0225982666015625,
-0.0174407958984375,
-0.06292724609375,
0.06622314453125,
-0.060394287109375,
0.006439208984375,
-0.020233154296875,
0.022247314453125,
0.0285491943359375,
-0.007457733154296875,
0.00589752197265625,
-0.020233154296875,
-0.02447509765625,
-0.0179901123046875,
-0.053466796875,
0.031951904296875,
-0.040557861328125,
-0.055938720703125,
0.10076904296875,
-0.0004737377166748047,
0.062469482421875,
0.0273284912109375,
0.0380859375,
-0.023590087890625,
0.006893157958984375,
-0.0117034912109375,
0.05242919921875,
0.027984619140625,
0.03173828125,
-0.01239776611328125,
-0.0096435546875,
0.022003173828125,
0.039306640625,
0.0673828125,
0.0255126953125,
-0.042755126953125,
0.01546478271484375,
0.04327392578125,
-0.00817108154296875,
-0.0328369140625,
0.06182861328125,
-0.0069122314453125,
0.013763427734375,
0.03515625,
0.0092926025390625,
0.03228759765625,
0.0124359130859375,
-0.049896240234375,
0.02252197265625,
0.027099609375,
0.035552978515625,
0.006397247314453125,
-0.005176544189453125,
-0.03570556640625,
0.0112457275390625,
0.035888671875,
-0.00975799560546875,
0.00579833984375,
0.0172576904296875,
-0.0084991455078125,
-0.033294677734375,
-0.018341064453125,
-0.0247955322265625,
0.0302581787109375,
-0.0243377685546875,
0.0009703636169433594,
0.00823211669921875,
0.016021728515625,
0.0293731689453125,
-0.007305145263671875,
-0.01329803466796875,
0.031951904296875,
0.00795745849609375,
0.06304931640625,
0.03668212890625,
0.039703369140625,
-0.0034008026123046875,
0.0313720703125,
0.03399658203125,
0.06182861328125,
-0.050506591796875,
-0.0443115234375,
0.0027561187744140625,
0.0095672607421875,
0.00926971435546875,
-0.0186614990234375,
0.01151275634765625,
-0.0271453857421875,
0.0207977294921875,
-0.05255126953125,
-0.01788330078125,
0.0450439453125,
0.046539306640625,
-0.0206298828125,
-0.052154541015625,
-0.0290069580078125,
-0.0291595458984375,
-0.0430908203125,
0.00553131103515625,
0.0251007080078125,
0.05859375,
0.03375244140625,
0.026763916015625,
0.010833740234375,
-0.0325927734375,
0.00279998779296875,
0.026611328125,
0.0170745849609375,
0.004215240478515625,
-0.0283660888671875,
-0.0479736328125,
0.0233306884765625,
0.042388916015625,
0.062255859375,
0.036651611328125,
0.052032470703125,
0.01861572265625,
-0.01922607421875,
0.0126800537109375,
0.042724609375,
-0.01071929931640625,
0.031494140625,
-0.0294036865234375,
0.0157012939453125,
-0.005950927734375,
-0.01751708984375,
-0.0047760009765625,
-0.006587982177734375,
0.018310546875,
0.00897216796875,
0.007366180419921875,
0.006175994873046875,
-0.0341796875,
0.06488037109375,
-0.00809478759765625,
0.08404541015625,
0.024566650390625,
-0.053497314453125,
0.0063934326171875,
-0.0287322998046875,
-0.1072998046875,
0.03656005859375,
0.05535888671875,
-0.025238037109375,
0.001285552978515625,
-0.0147857666015625,
0.02911376953125,
0.007293701171875,
-0.0298309326171875,
-0.016754150390625,
-0.01116180419921875,
0.0460205078125,
-0.00010496377944946289,
-0.0413818359375,
-0.0236053466796875,
0.00656890869140625,
0.046661376953125,
-0.01007080078125,
0.131591796875,
-0.05169677734375,
-0.01080322265625,
-0.0192718505859375,
0.0401611328125,
-0.05584716796875,
-0.01540374755859375,
-0.00502777099609375,
-0.00638580322265625,
0.0270538330078125,
0.008056640625,
0.002513885498046875,
-0.00650787353515625,
0.061492919921875,
-0.055389404296875,
-0.01113128662109375,
-0.00450897216796875,
0.02606201171875,
-0.03778076171875,
0.019378662109375,
-0.031280517578125,
-0.054351806640625,
-0.05841064453125,
-0.007625579833984375,
0.0243377685546875,
0.00569915771484375,
-0.0206756591796875,
0.061981201171875,
0.02484130859375,
0.018280029296875,
-0.00323486328125,
-0.0185546875,
-0.0023040771484375,
0.032440185546875,
0.001178741455078125,
-0.00331878662109375,
0.0301361083984375,
-0.0181121826171875,
0.01464080810546875,
0.0119476318359375,
0.01953125,
0.023101806640625,
-0.05059814453125,
-0.0042877197265625,
-0.0249481201171875,
-0.0002570152282714844,
-0.0284271240234375,
0.0033130645751953125,
-0.0202178955078125,
0.0174407958984375,
0.005550384521484375,
0.0180206298828125,
-0.02215576171875,
-0.0229949951171875,
-0.00200653076171875,
0.005496978759765625,
-0.004146575927734375,
-0.0440673828125,
-0.025604248046875,
0.0232086181640625,
0.043487548828125,
-0.0045318603515625,
-0.0377197265625,
0.037811279296875,
-0.04461669921875,
0.0673828125,
-0.0204925537109375,
0.0059661865234375,
-0.003711700439453125,
0.0221710205078125,
-0.0787353515625,
-0.0157012939453125,
-0.048095703125,
-0.0272064208984375,
-0.07159423828125,
0.0173187255859375,
0.061004638671875,
-0.0243988037109375,
-0.031768798828125,
-0.0219573974609375,
-0.037322998046875,
0.051605224609375,
-0.03656005859375,
-0.02423095703125,
0.01515960693359375,
0.0184478759765625,
-0.0222930908203125,
-0.058135986328125,
-0.0079193115234375,
-0.0256500244140625,
0.0088653564453125,
0.0164794921875,
-0.01438140869140625,
0.0217132568359375,
-0.039215087890625,
-0.06536865234375,
0.059356689453125,
-0.0025386810302734375,
-0.031402587890625,
-0.01494598388671875,
-0.035675048828125,
-0.033660888671875,
0.032958984375,
-0.0015420913696289062,
-0.0075531005859375,
-0.0272216796875,
0.044769287109375,
0.023681640625,
0.05059814453125,
-0.0151519775390625,
0.037078857421875,
-0.0202178955078125,
0.0255889892578125,
0.0038852691650390625,
0.005023956298828125,
0.039093017578125,
-0.0210723876953125,
0.05450439453125,
0.06365966796875,
-0.019744873046875,
0.039337158203125,
-0.01528167724609375,
-0.04913330078125,
0.0140838623046875,
-0.03472900390625,
-0.05877685546875,
-0.03656005859375,
0.060699462890625,
0.00373077392578125,
0.0243072509765625,
0.0026264190673828125,
-0.039459228515625,
-0.029541015625,
-0.01543426513671875,
0.00397491455078125,
0.0222930908203125,
-0.064208984375,
0.017486572265625,
0.01055145263671875,
0.0024776458740234375,
-0.024627685546875,
0.00910186767578125,
-0.01363372802734375,
-0.00240325927734375,
0.0199432373046875,
-0.0023288726806640625,
-0.0301666259765625,
0.004364013671875,
0.046295166015625,
-0.040191650390625,
-0.0311737060546875,
-0.000011265277862548828,
0.00916290283203125,
-0.01214599609375,
-0.044586181640625,
-0.02801513671875,
0.0455322265625,
-0.016998291015625,
-0.01922607421875,
0.0233154296875,
0.0101318359375,
0.00107574462890625,
0.027984619140625,
-0.029296875,
0.040069580078125,
0.0275115966796875,
0.03961181640625,
-0.03997802734375,
0.045379638671875,
0.026397705078125,
0.042327880859375,
-0.0233001708984375,
0.005523681640625,
-0.01146697998046875,
0.0174560546875,
-0.030059814453125,
0.024566650390625,
0.00922393798828125,
-0.0220947265625,
0.003765106201171875,
0.002605438232421875,
-0.0226898193359375,
-0.017913818359375,
-0.002536773681640625,
-0.01273345947265625,
-0.0061492919921875,
0.00446319580078125
] |
8e8fa4072506016650ffda2a520fe543e9810516
|
Wordpress Stackexchange
Q: Display edit link if post author is current user I am creating an author.php page and listing all the posts from an author. Although admins can see the posts' edit links i want to echo the link if logged in user is the current user
for example
if testuser is logged in and current page is /author/testuser he can see edit post links
but
if testuser is logged in and current page is /author/theee he cant see the links
currently i have
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
$th = $curauth->nickname;
$cu = $current_user->user_login;
if ( $th = $curauth ) {
edit_post_link('edit', '', '');
} else {
}
but still only admins can see the links.
A: If you just have to modify the author.php page, this piece of code will probably work :
<?php
if( is_user_logged_in() && is_author(get_current_user_id()) ) {
edit_post_link('edit', '', '');
}
?>
The first part of the conditions checks if there is a user logged.
The second one will be true if the current page is the author page of the current user.
|
Q: Display edit link if post author is current user I am creating an author.php page and listing all the posts from an author. Although admins can see the posts' edit links i want to echo the link if logged in user is the current user
for example
if testuser is logged in and current page is /author/testuser he can see edit post links
but
if testuser is logged in and current page is /author/theee he cant see the links
currently i have
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
$th = $curauth->nickname;
$cu = $current_user->user_login;
if ( $th = $curauth ) {
edit_post_link('edit', '', '');
} else {
}
but still only admins can see the links.
A: If you just have to modify the author.php page, this piece of code will probably work :
<?php
if( is_user_logged_in() && is_author(get_current_user_id()) ) {
edit_post_link('edit', '', '');
}
?>
The first part of the conditions checks if there is a user logged.
The second one will be true if the current page is the author page of the current user.
A: I think the post edit link should be visible to post author and moderator(editor user or how have that capability)
So my proposed code is like this
global $post;
$current_user = wp_get_current_user();
if(current_user_can( 'edit_others_posts', $post->ID ) && ($post->post_author == $current_user->ID)) {
//show edit link
}
A: Placed in your theme's functions.php this should globally alter the behavior of edit_post_link. It should work on all of your archives, not just your author archives-- anything that uses edit_post_link.
function limit_edit_Link_wpse_85214($link) {
global $post,$current_user;
get_currentuserinfo();
if ($post->post_author == $current_user->ID) {
return $link;
}
return false;
}
add_filter('get_edit_post_link','limit_edit_Link_wpse_85214');
If will only work reliably inside a Loop, which is the only place you should be using edit_post_link anyway.
If you want this to work only for your author archive pages, just paste that code before the Loop in the author.php template and don't put it in function.php. It shouldn't effect anything but that page then. Or you can just use the guts for the function to make your conditional, like you were trying to do.
A: I could not get the @Mat solution to work. It looks correct, however.
WP stores the value of $post->post_author as a string. However, get_the_author_meta( 'ID' ) and get_current_user_id() each return an integer, so strict comparison works in the second part of the IF statement.
If you replace get_the_author_meta( 'ID' ) with $post->post_author you must use == and not === as the comparison operator because the value of $post->post_author is a string and get_current_user_id() returns an integer.
Test:
<?php echo 'Author ID type: ' . gettype( get_the_author_meta( 'ID' ) ) . '<br>'; ?>
<?php echo 'Current user ID type: ' . gettype( get_current_user_id() ); ?>
<?php
echo 'Is logged in user the author? ';
if ( get_the_author_meta( 'ID' ) == get_current_user_id() ) {
echo 'TRUE <br>';
} else {
echo 'FALSE';
}
?>
Solution using strict comparison operator that works for me:
<?php if ( is_user_logged_in() && get_the_author_meta( 'ID' ) === get_current_user_id() ) : ?>
//...
<?php endif; ?>
|
wordpress
|
{
"language": "en",
"length": 510,
"provenance": "stackexchange_00019.jsonl.gz:428878",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85214"
}
|
[
0.06494140625,
0.0166778564453125,
-0.0073089599609375,
-0.0361328125,
0.0246429443359375,
-0.043121337890625,
0.0167999267578125,
-0.016937255859375,
-0.0020503997802734375,
0.0292816162109375,
-0.0166015625,
0.00836181640625,
-0.01473236083984375,
-0.01458740234375,
-0.01441192626953125,
-0.017730712890625,
-0.004764556884765625,
0.006824493408203125,
0.018157958984375,
-0.0096588134765625,
0.0025386810302734375,
-0.0217742919921875,
0.0103912353515625,
-0.01041412353515625,
0.009674072265625,
-0.01541900634765625,
0.10302734375,
-0.0183868408203125,
0.022857666015625,
-0.01393890380859375,
0.018585205078125,
-0.056182861328125,
0.00849151611328125,
0.035003662109375,
-0.017333984375,
0.00539398193359375,
0.034149169921875,
-0.001667022705078125,
0.00783538818359375,
0.041961669921875,
0.01485443115234375,
0.00991058349609375,
-0.0584716796875,
0.00848388671875,
-0.05682373046875,
-0.0555419921875,
0.021484375,
0.0257110595703125,
0.03466796875,
0.055145263671875,
-0.0025081634521484375,
0.0273590087890625,
-0.02435302734375,
0.05242919921875,
-0.01291656494140625,
0.00193023681640625,
-0.0007615089416503906,
0.00722503662109375,
0.037353515625,
-0.070068359375,
-0.043853759765625,
-0.03515625,
0.04534912109375,
0.0198974609375,
0.015380859375,
-0.00012958049774169922,
0.041107177734375,
0.029266357421875,
-0.0183563232421875,
-0.0210113525390625,
-0.01042938232421875,
0.002979278564453125,
-0.006866455078125,
0.018402099609375,
-0.0117645263671875,
-0.04296875,
0.0021820068359375,
-0.0288543701171875,
0.00024628639221191406,
0.03399658203125,
-0.0275421142578125,
0.01148223876953125,
-0.0380859375,
-0.01407623291015625,
0.0026149749755859375,
0.0234222412109375,
-0.02423095703125,
-0.01654052734375,
-0.0223846435546875,
0.0309906005859375,
-0.026123046875,
0.017303466796875,
0.007801055908203125,
-0.009002685546875,
-0.01422119140625,
-0.0187225341796875,
0.046142578125,
0.0748291015625,
-0.0297393798828125,
-0.0333251953125,
-0.01285552978515625,
-0.0230255126953125,
-0.034576416015625,
-0.020477294921875,
0.0029506683349609375,
0.0806884765625,
0.0257415771484375,
0.0478515625,
0.02447509765625,
0.0003814697265625,
0.0421142578125,
-0.0258941650390625,
-0.0248870849609375,
-0.04681396484375,
0.02130126953125,
0.042266845703125,
-0.035430908203125,
0.0218658447265625,
-0.0012359619140625,
0.0234375,
-0.0161285400390625,
0.00949859619140625,
0.00262451171875,
-0.0241851806640625,
0.025970458984375,
0.00788116455078125,
-0.01605224609375,
-0.0008387565612792969,
-0.0109710693359375,
0.019683837890625,
-0.043853759765625,
0.02447509765625,
0.08563232421875,
0.006561279296875,
-0.0039215087890625,
-0.0259857177734375,
-0.0199432373046875,
-0.021240234375,
-0.02667236328125,
0.031768798828125,
-0.0439453125,
-0.022918701171875,
0.03656005859375,
-0.06695556640625,
-0.0152740478515625,
0.06170654296875,
0.02008056640625,
-0.027008056640625,
-0.0175628662109375,
-0.08551025390625,
-0.01488494873046875,
-0.0272979736328125,
0.010955810546875,
-0.004833221435546875,
0.04949951171875,
-0.02008056640625,
0.0247650146484375,
-0.033203125,
0.0286102294921875,
0.005626678466796875,
0.04168701171875,
0.0104827880859375,
0.024383544921875,
-0.034759521484375,
-0.07330322265625,
-0.0175628662109375,
-0.07220458984375,
-0.01312255859375,
0.0213775634765625,
-0.0034008026123046875,
0.028350830078125,
-0.01532745361328125,
0.010528564453125,
0.0438232421875,
0.019317626953125,
0.0031871795654296875,
-0.03363037109375,
0.05322265625,
0.0174407958984375,
0.023284912109375,
0.01476287841796875,
-0.0262298583984375,
0.035736083984375,
-0.0030956268310546875,
-0.0289459228515625,
0.029327392578125,
-0.006092071533203125,
0.0364990234375,
0.0343017578125,
0.01041412353515625,
0.00710296630859375,
0.0161285400390625,
-0.02618408203125,
0.005321502685546875,
-0.0178070068359375,
-0.0401611328125,
0.0248870849609375,
-0.00847625732421875,
-0.01092529296875,
0.0293121337890625,
-0.0007276535034179688,
-0.0229339599609375,
-0.004795074462890625,
-0.01947021484375,
-0.0941162109375,
-0.005695343017578125,
-0.0313720703125,
0.039825439453125,
0.01776123046875,
0.01282501220703125,
0.0119171142578125,
0.011871337890625,
-0.0203399658203125,
-0.01519775390625,
-0.0318603515625,
0.0037994384765625,
-0.005023956298828125,
0.040771484375,
0.006031036376953125,
0.0209503173828125,
0.004940032958984375,
0.0000941157341003418,
0.009521484375,
-0.0133514404296875,
0.043701171875,
-0.01953125,
-0.0108642578125,
-0.03363037109375,
0.023162841796875,
0.0017328262329101562,
-0.022003173828125,
0.0288848876953125,
0.0173797607421875,
0.0411376953125,
-0.03619384765625,
-0.0226287841796875,
-0.0144805908203125,
-0.0247344970703125,
0.0186614990234375,
0.045867919921875,
0.04425048828125,
-0.020477294921875,
-0.007122039794921875,
-0.002696990966796875,
0.007495880126953125,
-0.0212554931640625,
0.0211334228515625,
-0.0285797119140625,
0.0174102783203125,
0.05950927734375,
-0.004180908203125,
0.0164642333984375,
-0.002399444580078125,
-0.032379150390625,
0.005084991455078125,
0.02655029296875,
0.0120391845703125,
0.0423583984375,
-0.048553466796875,
0.0038356781005859375,
-0.033966064453125,
-0.0242767333984375,
0.00980377197265625,
-0.036376953125,
-0.00003170967102050781,
-0.017181396484375,
0.002986907958984375,
-0.00992584228515625,
-0.019287109375,
-0.0279998779296875,
0.026763916015625,
0.00870513916015625,
0.0006017684936523438,
0.024688720703125,
0.0235595703125,
-0.01001739501953125,
-0.0204010009765625,
-0.0016393661499023438,
-0.004673004150390625,
-0.0017910003662109375,
-0.04205322265625,
-0.054473876953125,
0.0133514404296875,
0.00647735595703125,
0.020294189453125,
-0.02276611328125,
0.042572021484375,
-0.0184326171875,
0.045166015625,
0.0029697418212890625,
0.042236328125,
-0.00685882568359375,
-0.03741455078125,
0.07855224609375,
-0.034088134765625,
-0.038177490234375,
-0.017364501953125,
-0.05792236328125,
0.068115234375,
-0.033172607421875,
0.04595947265625,
0.0823974609375,
-0.00717926025390625,
0.03924560546875,
-0.0082855224609375,
-0.006870269775390625,
-0.04345703125,
0.036712646484375,
0.0193023681640625,
-0.02923583984375,
0.0196685791015625,
0.05230712890625,
0.00738525390625,
0.01044464111328125,
-0.0165863037109375,
-0.0321044921875,
-0.017333984375,
-0.0026397705078125,
-0.0714111328125,
-0.059661865234375,
-0.04986572265625,
-0.1116943359375,
0.0168914794921875,
-0.0283660888671875,
-0.044921875,
0.0127410888671875,
0.0151214599609375,
0.0167083740234375,
-0.0313720703125,
-0.0176849365234375,
-0.045013427734375,
-0.040771484375,
-0.051361083984375,
0.01812744140625,
-0.00574493408203125,
0.003551483154296875,
-0.00431060791015625,
0.00860595703125,
-0.0172882080078125,
-0.052215576171875,
-0.03192138671875,
0.005474090576171875,
-0.0003769397735595703,
-0.0194244384765625,
-0.04425048828125,
0.0218505859375,
0.0154266357421875,
0.0117645263671875,
0.0179901123046875,
-0.0017223358154296875,
-0.0035552978515625,
-0.01381683349609375,
0.00797271728515625,
-0.017364501953125,
0.0673828125,
0.0081634521484375,
-0.0423583984375,
0.051483154296875,
0.08892822265625,
-0.01090240478515625,
-0.0017719268798828125,
-0.0306549072265625,
-0.041656494140625,
0.054412841796875,
0.05010986328125,
-0.0117034912109375,
0.0007567405700683594,
-0.02020263671875,
0.0121002197265625,
0.03533935546875,
-0.0007123947143554688,
0.0019245147705078125,
-0.0033359527587890625,
0.000598907470703125,
0.003154754638671875,
0.00472259521484375,
0.0201416015625,
-0.01340484619140625,
0.0125885009765625,
-0.0005502700805664062,
0.006694793701171875,
-0.00853729248046875,
-0.01483917236328125,
-0.042510986328125,
-0.024658203125,
0.0312042236328125,
-0.006435394287109375,
0.0233001708984375,
-0.045928955078125,
-0.02630615234375,
-0.039794921875,
0.0634765625,
-0.015777587890625,
-0.0279998779296875,
0.001789093017578125,
0.011871337890625,
-0.049896240234375,
-0.01502227783203125,
-0.05120849609375,
0.0086822509765625,
-0.036041259765625,
0.010284423828125,
0.00763702392578125,
-0.0073089599609375,
-0.029388427734375,
0.05194091796875,
-0.043182373046875,
0.0016756057739257812,
0.0149078369140625,
0.01544189453125,
0.0005884170532226562,
0.034912109375,
-0.044158935546875,
0.0509033203125,
-0.0195159912109375,
-0.01439666748046875,
-0.080322265625,
-0.012237548828125,
-0.01004791259765625,
0.060577392578125,
0.0028743743896484375,
0.00640106201171875,
-0.046661376953125,
0.02545166015625,
0.00392913818359375,
-0.0088348388671875,
0.0225372314453125,
-0.005069732666015625,
0.038909912109375,
0.0260162353515625,
0.0030879974365234375,
-0.0029048919677734375,
-0.00849151611328125,
-0.0011625289916992188,
-0.033935546875,
-0.018157958984375,
-0.0413818359375,
-0.03851318359375,
0.003292083740234375,
-0.0285491943359375,
-0.0760498046875,
-0.0517578125,
0.03277587890625,
0.058502197265625,
0.007770538330078125,
0.034637451171875,
-0.044952392578125,
-0.085693359375,
0.0160980224609375,
-0.0306854248046875,
-0.0256500244140625,
0.003055572509765625,
0.05377197265625,
0.0308685302734375,
0.004932403564453125,
0.01468658447265625,
0.02496337890625,
0.04248046875,
-0.0025043487548828125,
0.053619384765625,
0.048919677734375,
-0.0240936279296875,
0.0225830078125,
0.029937744140625,
0.00293731689453125,
0.0005884170532226562,
0.0256805419921875,
-0.0033397674560546875,
-0.027313232421875,
0.0192718505859375,
-0.0111083984375,
0.01337432861328125,
-0.01432037353515625,
-0.020355224609375,
-0.004436492919921875,
0.01537322998046875,
0.0310821533203125,
-0.01044464111328125,
0.0275421142578125,
-0.0166168212890625,
-0.036285400390625,
0.00212860107421875,
-0.015960693359375,
0.029266357421875,
0.023345947265625,
-0.0029144287109375,
0.03472900390625,
0.021728515625,
-0.0213165283203125,
-0.01605224609375,
-0.01068115234375,
-0.00934600830078125,
0.02032470703125,
-0.036895751953125,
-0.0204010009765625,
-0.00670623779296875,
-0.0223846435546875,
0.10223388671875,
0.0168914794921875,
-0.05877685546875,
0.056549072265625,
-0.0301971435546875,
0.0087432861328125,
0.0170440673828125,
0.0084381103515625,
0.0261688232421875,
-0.0167694091796875,
-0.02081298828125,
-0.005878448486328125,
-0.00849151611328125,
-0.0187835693359375,
-0.035919189453125,
0.0139923095703125,
-0.01152801513671875,
0.004322052001953125,
-0.00685882568359375,
0.063720703125,
0.01409912109375,
0.0167236328125,
-0.021514892578125,
0.0254058837890625,
0.0280303955078125,
0.0098114013671875,
0.02288818359375,
0.0335693359375,
-0.0207672119140625,
-0.0062713623046875,
0.005649566650390625,
-0.024749755859375,
-0.015777587890625,
0.01264190673828125,
0.0281982421875,
0.0201873779296875,
-0.0011262893676757812,
0.0126800537109375,
-0.0017747879028320312,
-0.01308441162109375,
0.05682373046875,
0.044952392578125,
-0.0693359375,
-0.006683349609375,
0.0543212890625,
0.01953125,
-0.03271484375,
-0.01593017578125,
-0.012786865234375,
-0.0178375244140625,
0.019378662109375,
-0.0073089599609375,
-0.00037860870361328125,
0.01038360595703125,
-0.02337646484375,
-0.014801025390625,
-0.0235595703125,
0.01300048828125,
0.0177459716796875,
0.01629638671875,
-0.04449462890625,
-0.0262603759765625,
0.04736328125,
0.0085601806640625,
-0.01180267333984375,
-0.038970947265625,
0.005809783935546875,
0.03131103515625,
-0.0281982421875,
0.07757568359375,
0.00775909423828125,
-0.07830810546875,
0.035064697265625,
-0.05572509765625,
0.0131072998046875,
-0.0003781318664550781,
-0.055084228515625,
-0.030426025390625,
-0.041748046875,
0.0178375244140625,
0.0156707763671875,
0.0001232624053955078,
-0.0248260498046875,
-0.046234130859375,
0.01395416259765625,
0.0291290283203125,
0.043243408203125,
0.0193939208984375,
0.09210205078125,
0.00989532470703125,
0.06903076171875,
0.05792236328125,
0.058990478515625,
-0.0650634765625,
-0.0286102294921875,
0.00864410400390625,
-0.00959014892578125,
-0.018096923828125,
-0.0158538818359375,
0.005615234375,
-0.008209228515625,
0.04144287109375,
-0.00514984130859375,
-0.034210205078125,
-0.0014581680297851562,
0.00281524658203125,
-0.010467529296875,
-0.01291656494140625,
0.060455322265625,
-0.037628173828125,
0.0026187896728515625,
-0.00439453125,
0.01548004150390625,
-0.00318145751953125,
-0.0024890899658203125,
-0.0213470458984375,
0.01136016845703125,
-0.0258636474609375,
0.01837158203125,
-0.038909912109375,
0.0513916015625,
0.09246826171875,
0.002468109130859375,
0.07061767578125,
0.037628173828125,
0.04119873046875,
0.0655517578125,
-0.04229736328125,
0.0043487548828125,
0.0435791015625,
0.039337158203125,
-0.0162811279296875,
0.0076141357421875,
0.026824951171875,
-0.0183868408203125,
-0.005306243896484375,
0.0638427734375,
0.048004150390625,
-0.087158203125,
0.0069732666015625,
0.01190185546875,
0.011016845703125,
0.0233917236328125,
-0.0035839080810546875,
-0.0104522705078125,
0.0244293212890625,
0.045013427734375,
-0.052734375,
-0.01486968994140625,
0.046966552734375,
0.0011196136474609375,
-0.00811767578125,
-0.053863525390625,
0.06256103515625,
-0.00020205974578857422,
-0.010711669921875,
-0.00412750244140625,
-0.0072784423828125,
-0.0241851806640625,
-0.0286407470703125,
-0.00508880615234375,
0.0166015625,
-0.004993438720703125,
-0.03619384765625,
0.0511474609375,
-0.03741455078125,
0.019378662109375,
0.02166748046875,
0.021820068359375,
0.035400390625,
0.04901123046875,
-0.00501251220703125,
0.0142669677734375,
0.0204620361328125,
-0.0042877197265625,
0.0065460205078125,
-0.041473388671875,
-0.0234527587890625,
0.079833984375,
-0.0207061767578125,
0.0194854736328125,
0.0245208740234375,
0.0009627342224121094,
-0.01418304443359375,
-0.05560302734375,
0.07025146484375,
-0.0038299560546875,
-0.037017822265625,
0.006778717041015625,
-0.01134490966796875,
-0.0240478515625,
-0.0015106201171875,
-0.0035228729248046875,
-0.051666259765625,
-0.04339599609375,
-0.01354217529296875,
-0.07415771484375,
0.0156707763671875,
-0.035369873046875,
-0.05548095703125,
0.032318115234375,
-0.027435302734375,
0.053192138671875,
-0.003932952880859375,
-0.005222320556640625,
0.038818359375,
-0.006374359130859375,
-0.04473876953125,
0.08111572265625,
0.01470947265625,
0.06756591796875,
-0.074951171875,
-0.0179595947265625,
0.0289764404296875,
0.03564453125,
0.052093505859375,
0.025634765625,
-0.044769287109375,
-0.0265655517578125,
-0.0190887451171875,
-0.0183868408203125,
-0.0313720703125,
0.07244873046875,
-0.014801025390625,
-0.00173187255859375,
0.0214691162109375,
0.0020904541015625,
0.02667236328125,
0.0160980224609375,
-0.05633544921875,
0.0257110595703125,
0.01226806640625,
0.0102081298828125,
-0.022186279296875,
0.00943756103515625,
-0.029937744140625,
-0.0106964111328125,
0.024627685546875,
-0.00820159912109375,
-0.01491546630859375,
0.04107666015625,
0.068115234375,
-0.0498046875,
-0.028289794921875,
-0.0211944580078125,
0.05487060546875,
0.045867919921875,
-0.000008881092071533203,
0.01727294921875,
0.01442718505859375,
-0.0229339599609375,
0.01038360595703125,
-0.0087432861328125,
0.0221710205078125,
0.008087158203125,
0.0361328125,
0.05108642578125,
0.01143646240234375,
0.0010986328125,
0.022857666015625,
0.049072265625,
0.060546875,
-0.044342041015625,
-0.0167236328125,
-0.0022716522216796875,
-0.0254364013671875,
0.00682830810546875,
0.01049041748046875,
0.01544189453125,
0.044891357421875,
0.02294921875,
-0.0469970703125,
0.005115509033203125,
0.007656097412109375,
0.0194091796875,
-0.0037250518798828125,
-0.0224151611328125,
-0.03338623046875,
0.017608642578125,
-0.03204345703125,
-0.02056884765625,
0.0073699951171875,
0.0006203651428222656,
0.04315185546875,
-0.0029888153076171875,
0.07965087890625,
0.0036678314208984375,
0.00826263427734375,
0.0084381103515625,
-0.03680419921875,
-0.005504608154296875,
-0.0198822021484375,
-0.03857421875,
-0.03887939453125,
0.0350341796875,
0.019989013671875,
-0.002971649169921875,
0.000009775161743164062,
-0.005950927734375,
-0.01666259765625,
-0.007488250732421875,
0.00954437255859375,
-0.018157958984375,
0.00566864013671875,
-0.0005936622619628906,
0.031646728515625,
0.0215301513671875,
0.006603240966796875,
-0.0228729248046875,
0.03466796875,
0.044677734375,
-0.033203125,
0.035400390625,
0.0086669921875,
-0.0046844482421875,
0.013336181640625,
0.01361846923828125,
0.016845703125,
0.0013380050659179688,
-0.0443115234375,
0.0186309814453125,
-0.060394287109375,
-0.054290771484375,
0.0202484130859375,
0.0279541015625,
-0.017303466796875,
0.0272064208984375,
-0.006664276123046875,
0.008819580078125,
-0.003627777099609375,
-0.0153350830078125,
0.017303466796875,
0.0234222412109375,
0.0106201171875,
0.01465606689453125,
-0.0132904052734375,
-0.00027871131896972656,
0.006313323974609375,
0.01509857177734375,
0.01085662841796875,
0.0347900390625,
-0.006542205810546875,
0.0013179779052734375,
-0.01415252685546875,
0.046875,
-0.08953857421875,
-0.0186004638671875,
0.06689453125,
-0.06549072265625,
-0.03985595703125,
0.0254364013671875,
-0.061126708984375,
0.068359375,
-0.00800323486328125,
0.03704833984375,
0.055694580078125,
-0.007843017578125,
0.01007080078125,
0.01351165771484375,
0.01071929931640625,
-0.0272064208984375,
-0.05072021484375,
-0.0124664306640625,
0.0184478759765625,
-0.0029048919677734375,
0.004306793212890625,
-0.00118255615234375,
0.0267791748046875,
-0.0189971923828125,
-0.042388916015625,
-0.003292083740234375,
-0.0087127685546875,
-0.017547607421875,
0.0244140625,
-0.0016508102416992188,
0.0016727447509765625,
0.0169830322265625,
-0.00112152099609375,
0.004611968994140625,
0.0253753662109375,
-0.01004791259765625,
0.018890380859375,
0.0023326873779296875,
0.03546142578125,
0.00894927978515625,
0.0552978515625,
-0.0002111196517944336,
0.01233673095703125,
-0.005596160888671875,
0.010498046875,
0.01654052734375,
-0.005886077880859375,
-0.032989501953125,
-0.01436614990234375,
-0.01180267333984375,
-0.004344940185546875,
0.00315093994140625,
-0.07080078125,
-0.050048828125,
0.00788116455078125,
0.0120086669921875,
-0.0254974365234375,
-0.0122833251953125,
-0.0102691650390625,
-0.036224365234375,
0.050201416015625,
-0.051055908203125,
-0.02996826171875,
0.00399017333984375,
0.0182647705078125,
-0.01459503173828125,
0.061676025390625,
-0.0306396484375,
-0.060546875,
0.0279388427734375,
0.0093536376953125,
0.033233642578125,
-0.00864410400390625,
-0.03790283203125,
0.0043792724609375,
0.005191802978515625,
0.039398193359375,
-0.00838470458984375,
-0.019500732421875,
-0.015655517578125,
0.00655364990234375,
0.004589080810546875,
-0.022186279296875,
0.0130615234375,
-0.0267333984375,
-0.019287109375,
0.0009565353393554688,
-0.0014667510986328125,
0.029449462890625,
-0.01148223876953125,
-0.033203125,
0.0606689453125,
0.00988006591796875,
-0.031463623046875,
0.006031036376953125,
0.0238494873046875,
-0.034912109375,
0.048583984375,
0.0274810791015625,
-0.0712890625,
0.0100250244140625,
0.016815185546875,
0.01824951171875,
0.0196685791015625,
0.027130126953125,
0.0084381103515625,
-0.03466796875,
0.0045013427734375,
-0.010986328125,
0.00811767578125,
-0.0019378662109375,
0.0130157470703125,
0.0215301513671875,
0.024658203125,
-0.0176239013671875,
0.0548095703125,
0.004360198974609375,
0.002590179443359375,
-0.000461578369140625,
-0.058929443359375,
-0.0126953125,
-0.003871917724609375,
0.053070068359375,
0.02886962890625,
0.0090179443359375,
-0.0247344970703125,
-0.014617919921875,
-0.0269317626953125,
-0.03277587890625,
0.0142669677734375,
0.0192413330078125,
-0.06298828125,
0.003620147705078125,
0.0203399658203125,
-0.023956298828125,
-0.035888671875,
0.03778076171875,
-0.060638427734375,
0.00017178058624267578,
-0.01073455810546875,
-0.0120697021484375,
-0.058929443359375,
0.031494140625,
0.03619384765625,
-0.02911376953125,
0.0013761520385742188,
0.0156097412109375,
-0.0229644775390625,
0.024871826171875,
0.01898193359375,
0.0149688720703125,
0.00290679931640625,
-0.030242919921875,
-0.007190704345703125,
0.026519775390625,
0.042236328125,
0.0178985595703125,
-0.04388427734375,
-0.043182373046875,
0.0186004638671875,
0.00028514862060546875,
0.005924224853515625,
0.00537109375,
0.00717926025390625,
0.01471710205078125,
0.07586669921875,
-0.0231475830078125,
0.025726318359375,
-0.01226806640625,
0.034759521484375,
0.0177764892578125,
-0.011688232421875,
0.038330078125,
-0.014251708984375,
-0.01410675048828125,
-0.0333251953125,
-0.00527191162109375,
-0.0799560546875,
0.0179290771484375,
-0.0185089111328125,
0.00397491455078125,
0.04150390625
] |
6450494782fec40ea9eb63487973afffbcb81a47
|
Wordpress Stackexchange
Q: How to disable Jetpack modules such as Stats? I want to disable some of the Jetpack modules such as Stats in order to check if they make the web site slower or not. But I couldn't see an option to disable modules one by one.
Of course, one can disable the Jetpack plugin as a whole. Is there a way to disable Stats module only?
A: If you press the "Learn More" button for each Jetpack Module, you will get a "Deactivate" button showing up to the right.
There is also a fork call Jetpack Lite
http://wordpress.org/extend/plugins/jetpack-lite/
A NOT official "lite" fork of Jetpack plugin containing only Stats and
WP.me Shortlinks modules. All other modules removed (files and code).
|
Q: How to disable Jetpack modules such as Stats? I want to disable some of the Jetpack modules such as Stats in order to check if they make the web site slower or not. But I couldn't see an option to disable modules one by one.
Of course, one can disable the Jetpack plugin as a whole. Is there a way to disable Stats module only?
A: If you press the "Learn More" button for each Jetpack Module, you will get a "Deactivate" button showing up to the right.
There is also a fork call Jetpack Lite
http://wordpress.org/extend/plugins/jetpack-lite/
A NOT official "lite" fork of Jetpack plugin containing only Stats and
WP.me Shortlinks modules. All other modules removed (files and code).
A: The process to deactivate a module on Jetpack has changed.
Instructions are here: Control Jetpack’s Modules on One Page
Basically, you need to go to /wp-admin/admin.php?page=jetpack_modules and there you can find a Deactivate button for every module.
A: Functions to disable and remove from the settings page individual jetpack modules.
function jherve_kill_monitor ( $modules ) {
unset( $modules['monitor'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jherve_kill_monitor' );
function jherve_kill_sso ( $modules ) {
unset( $modules['sso'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jherve_kill_sso' );
function jeherve_kill_notes ( $modules ) {
unset( $modules['notes'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_notes' );
function jeherve_kill_comments ( $modules ) {
unset( $modules['comments'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_comments' );
function jeherve_kill_carousel ( $modules ) {
unset( $modules['carousel'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_carousel' );
function jeherve_kill_likes ( $modules ) {
unset( $modules['likes'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_likes' );
function jeherve_kill_post_by_email ( $modules ) {
unset( $modules['post-by-email'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_post_by_email' );
function jeherve_kill_omnisearch ( $modules ) {
unset( $modules['omnisearch'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_omnisearch' );
function jeherve_kill_gravatar_hovercards ( $modules ) {
unset( $modules['gravatar-hovercards'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_gravatar_hovercards' );
function jeherve_kill_contact_form ( $modules ) {
unset( $modules['contact-form'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_contact_form' );
function jeherve_kill_widget_visibility ( $modules ) {
unset( $modules['widget-visibility'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_widget_visibility' );
function jeherve_kill_photon ( $modules ) {
unset( $modules['photon'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_photon' );
function jeherve_kill_videopress ( $modules ) {
unset( $modules['videopress'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_videopress' );
function jeherve_kill_latex ( $modules ) {
unset( $modules['latex'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_latex' );
function jeherve_kill_enhanced_distribution ( $modules ) {
unset( $modules['enhanced-distribution'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_enhanced_distribution' );
function jeherve_kill_infinite_scroll ( $modules ) {
unset( $modules['infinite-scroll'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_infinite_scroll' );
function jeherve_kill_subscriptions ( $modules ) {
unset( $modules['subscriptions'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_subscriptions' );
function jeherve_kill_tiled_gallery ( $modules ) {
unset( $modules['tiled-gallery'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_tiled_gallery' );
function jeherve_kill_vaultpress ( $modules ) {
unset( $modules['vaultpress'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_vaultpress' );
function jeherve_kill_mobile_push ( $modules ) {
unset( $modules['mobile-push'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_mobile_push');
function jeherve_kill_stats ( $modules ) {
unset( $modules['stats'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_stats' );
function jeherve_kill_sharedaddy ( $modules ) {
unset( $modules['sharedaddy'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_sharedaddy' );
function jeherve_kill_after_the_deadline ( $modules ) {
unset( $modules['after-the-deadline'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_after_the_deadline' );
function jeherve_kill_publicize ( $modules ) {
unset( $modules['publicize'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_publicize' );
function jeherve_kill_gplus_authorship ( $modules ) {
unset( $modules['gplus-authorship'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_gplus_authorship' );
function jeherve_kill_shortcodes ( $modules ) {
unset( $modules['shortcodes'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_shortcodes' );
function jeherve_kill_minileven ( $modules ) {
unset( $modules['minileven'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_minileven' );
function jeherve_kill_custom_css ( $modules ) {
unset( $modules['custom-css'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_custom_css' );
function jeherve_kill_widgets ( $modules ) {
unset( $modules['widgets'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_widgets' );
function jeherve_kill_wpcc ( $modules ) {
unset( $modules['wpcc'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_wpcc' );
function jeherve_kill_json_api ( $modules ) {
unset( $modules['json-api'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_json_api' );
function jeherve_kill_shortlinks ( $modules ) {
unset( $modules['shortlinks'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_shortlinks' );
A: There is an easy way to disable each module without any codes.
GO to Jetpack dashboard and scroll to the bottom. Find "Modules" tab on the footer and click it.
Inside that you can find all the modules and you can activate/deactivate each module as you wish. That is how I deactivated WP Stats module without any code.
|
wordpress
|
{
"language": "en",
"length": 741,
"provenance": "stackexchange_00019.jsonl.gz:428898",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85284"
}
|
[
0.0160369873046875,
-0.0257720947265625,
-0.0129241943359375,
-0.0064544677734375,
-0.021636962890625,
-0.01290130615234375,
0.01470947265625,
0.005947113037109375,
-0.0205078125,
0.0144195556640625,
-0.00200653076171875,
0.0077667236328125,
-0.00984954833984375,
-0.028076171875,
0.018280029296875,
-0.031707763671875,
0.004974365234375,
0.0275726318359375,
0.019073486328125,
-0.017120361328125,
0.0154571533203125,
0.00020229816436767578,
-0.022308349609375,
0.06689453125,
-0.0296478271484375,
0.016571044921875,
0.0296173095703125,
-0.01291656494140625,
-0.040374755859375,
-0.02880859375,
-0.012451171875,
0.04840087890625,
-0.0058746337890625,
0.0654296875,
-0.05963134765625,
-0.0018558502197265625,
-0.0183563232421875,
0.04180908203125,
0.0176544189453125,
-0.0010385513305664062,
0.007625579833984375,
-0.011322021484375,
-0.0210723876953125,
0.002353668212890625,
-0.03936767578125,
0.00724029541015625,
-0.01392364501953125,
-0.023468017578125,
0.0309295654296875,
0.0210723876953125,
0.00406646728515625,
-0.0006480216979980469,
0.0176239013671875,
-0.0185546875,
-0.0246429443359375,
-0.033111572265625,
-0.0253143310546875,
0.05072021484375,
0.01055908203125,
0.034637451171875,
-0.005832672119140625,
0.06024169921875,
-0.032440185546875,
-0.0264739990234375,
0.0235595703125,
-0.0202178955078125,
-0.0504150390625,
0.03424072265625,
-0.0272064208984375,
0.04571533203125,
0.030548095703125,
-0.06341552734375,
0.01336669921875,
0.0183258056640625,
-0.0273895263671875,
-0.05230712890625,
0.04058837890625,
-0.004634857177734375,
0.0006728172302246094,
0.01468658447265625,
-0.0081329345703125,
-0.003841400146484375,
-0.0667724609375,
-0.0008172988891601562,
-0.0056915283203125,
0.02178955078125,
-0.0104217529296875,
-0.01244354248046875,
-0.0243988037109375,
0.0237884521484375,
-0.01543426513671875,
-0.011566162109375,
-0.01556396484375,
0.04168701171875,
0.0078277587890625,
0.00004088878631591797,
0.0300140380859375,
-0.0250701904296875,
-0.006809234619140625,
-0.033966064453125,
0.044677734375,
-0.0538330078125,
-0.0009455680847167969,
0.006378173828125,
0.0035400390625,
-0.0175018310546875,
-0.03436279296875,
-0.051605224609375,
0.03424072265625,
0.043609619140625,
-0.00754547119140625,
0.0074462890625,
-0.03546142578125,
0.0249481201171875,
-0.032562255859375,
0.00897216796875,
-0.06610107421875,
0.0081329345703125,
-0.034423828125,
0.041534423828125,
0.00513458251953125,
0.005657196044921875,
-0.032867431640625,
-0.01776123046875,
0.0245819091796875,
-0.01522064208984375,
-0.037872314453125,
0.03961181640625,
0.014404296875,
0.0105133056640625,
-0.01123046875,
-0.0187225341796875,
0.00769805908203125,
0.032745361328125,
0.010101318359375,
0.0015916824340820312,
0.0455322265625,
-0.050048828125,
-0.028045654296875,
0.024017333984375,
-0.0201263427734375,
-0.01192474365234375,
-0.0131072998046875,
-0.051239013671875,
0.0091094970703125,
-0.01617431640625,
-0.0029144287109375,
0.03631591796875,
0.034515380859375,
0.005153656005859375,
0.027557373046875,
-0.0299835205078125,
0.03277587890625,
0.01727294921875,
-0.000579833984375,
0.03558349609375,
0.051513671875,
0.0006666183471679688,
-0.06536865234375,
-0.0178375244140625,
-0.005764007568359375,
-0.0244293212890625,
-0.0176239013671875,
0.01111602783203125,
-0.0177764892578125,
0.026519775390625,
0.03515625,
0.005329132080078125,
0.00965118408203125,
0.0031948089599609375,
-0.0379638671875,
-0.01343536376953125,
0.01245880126953125,
-0.014068603515625,
-0.010284423828125,
0.0197906494140625,
-0.0175628662109375,
0.0034770965576171875,
0.0181732177734375,
-0.01264190673828125,
-0.0253753662109375,
-0.0440673828125,
0.01535797119140625,
0.0089569091796875,
-0.0292510986328125,
0.0199432373046875,
-0.00209808349609375,
0.0047760009765625,
0.0158538818359375,
-0.01190948486328125,
0.03448486328125,
0.025177001953125,
0.0264892578125,
0.001094818115234375,
0.004871368408203125,
-0.072021484375,
-0.0002899169921875,
-0.0249481201171875,
-0.00972747802734375,
0.005279541015625,
0.010162353515625,
0.0277099609375,
-0.0457763671875,
-0.0004916191101074219,
-0.0712890625,
-0.0017309188842773438,
-0.0023174285888671875,
0.020233154296875,
-0.059539794921875,
0.05084228515625,
0.03619384765625,
0.0162200927734375,
-0.0662841796875,
0.07000732421875,
0.0565185546875,
-0.02587890625,
0.018341064453125,
0.0158233642578125,
0.006927490234375,
-0.006694793701171875,
0.025665283203125,
-0.012481689453125,
0.043701171875,
0.054412841796875,
-0.0025424957275390625,
-0.01087188720703125,
0.0054473876953125,
-0.00968170166015625,
0.003665924072265625,
0.0135345458984375,
0.019134521484375,
-0.00824737548828125,
-0.004913330078125,
0.004119873046875,
-0.0037593841552734375,
0.0197906494140625,
0.02142333984375,
-0.05548095703125,
-0.0063629150390625,
0.02587890625,
0.03173828125,
0.036773681640625,
-0.01459503173828125,
-0.006000518798828125,
0.017547607421875,
-0.0516357421875,
-0.004856109619140625,
0.0154571533203125,
-0.0144195556640625,
-0.0323486328125,
0.0125579833984375,
-0.0114898681640625,
0.051300048828125,
0.064453125,
-0.0088958740234375,
0.0254669189453125,
-0.04302978515625,
-0.061859130859375,
0.0158233642578125,
0.044158935546875,
0.01561737060546875,
0.05865478515625,
0.028778076171875,
0.006580352783203125,
0.05364990234375,
-0.0095062255859375,
0.034698486328125,
0.017852783203125,
-0.0118865966796875,
0.0102996826171875,
0.0077056884765625,
-0.0220184326171875,
-0.01904296875,
0.027313232421875,
0.08001708984375,
-0.0268402099609375,
-0.027862548828125,
-0.02081298828125,
-0.0021266937255859375,
0.00803375244140625,
-0.01369476318359375,
-0.01435089111328125,
-0.007904052734375,
-0.0167236328125,
0.0179443359375,
-0.06817626953125,
0.003498077392578125,
0.0021610260009765625,
-0.04736328125,
-0.051910400390625,
-0.032867431640625,
0.053619384765625,
0.00615692138671875,
0.00018393993377685547,
0.059295654296875,
-0.01187896728515625,
0.005100250244140625,
-0.0477294921875,
0.028594970703125,
-0.0227508544921875,
0.08197021484375,
0.0753173828125,
-0.003604888916015625,
0.012237548828125,
0.0176239013671875,
-0.00356292724609375,
0.0303192138671875,
-0.00756072998046875,
0.0004112720489501953,
-0.003475189208984375,
-0.0672607421875,
-0.0197906494140625,
0.0224456787109375,
-0.032073974609375,
0.031829833984375,
0.0017290115356445312,
-0.0144195556640625,
-0.0012454986572265625,
-0.07177734375,
-0.049957275390625,
0.040283203125,
-0.042572021484375,
0.019439697265625,
0.01025390625,
-0.02490234375,
-0.0300140380859375,
0.06182861328125,
0.00734710693359375,
-0.005115509033203125,
-0.00750732421875,
-0.0180511474609375,
-0.013885498046875,
-0.039276123046875,
-0.0084075927734375,
0.006103515625,
0.016204833984375,
0.019378662109375,
0.061248779296875,
0.004573822021484375,
-0.0204010009765625,
0.04083251953125,
-0.0523681640625,
-0.0308837890625,
0.0168914794921875,
0.01395416259765625,
-0.0318603515625,
0.003940582275390625,
0.007625579833984375,
0.0362548828125,
0.00521087646484375,
-0.0078277587890625,
-0.020416259765625,
-0.005008697509765625,
0.015655517578125,
0.022613525390625,
0.0145263671875,
-0.0027008056640625,
-0.003551483154296875,
-0.003643035888671875,
-0.0618896484375,
-0.06268310546875,
0.002445220947265625,
-0.06890869140625,
-0.007137298583984375,
0.05474853515625,
-0.0003304481506347656,
-0.033050537109375,
0.0014801025390625,
0.052276611328125,
0.03173828125,
0.01183319091796875,
0.017242431640625,
0.0027751922607421875,
-0.0015239715576171875,
0.020660400390625,
-0.0251922607421875,
0.0157623291015625,
-0.022857666015625,
0.0306243896484375,
-0.0067291259765625,
-0.0037689208984375,
-0.0546875,
0.050750732421875,
-0.0670166015625,
0.01038360595703125,
0.01175689697265625,
-0.04766845703125,
0.007537841796875,
0.006465911865234375,
0.025054931640625,
-0.004673004150390625,
0.021240234375,
-0.0187835693359375,
-0.00669097900390625,
-0.0350341796875,
-0.013519287109375,
-0.042266845703125,
-0.01094818115234375,
-0.05010986328125,
0.008544921875,
-0.0863037109375,
-0.006015777587890625,
-0.0025615692138671875,
-0.03887939453125,
-0.0162506103515625,
0.0012187957763671875,
-0.047760009765625,
-0.04229736328125,
0.03973388671875,
0.013397216796875,
-0.00612640380859375,
0.0074005126953125,
0.0086669921875,
-0.044403076171875,
-0.0280914306640625,
0.0289306640625,
-0.052642822265625,
-0.019866943359375,
0.018646240234375,
0.048858642578125,
0.0142669677734375,
-0.064208984375,
0.008087158203125,
0.050567626953125,
0.006969451904296875,
-0.0526123046875,
0.00897216796875,
0.0022296905517578125,
-0.047576904296875,
0.0526123046875,
-0.0016107559204101562,
-0.00927734375,
-0.0135498046875,
0.02044677734375,
-0.0306396484375,
0.02587890625,
0.0081939697265625,
-0.003932952880859375,
0.0648193359375,
-0.050323486328125,
-0.02410888671875,
-0.060577392578125,
-0.054931640625,
-0.00971221923828125,
-0.0435791015625,
0.01549530029296875,
-0.06304931640625,
-0.0153961181640625,
0.070068359375,
-0.0172576904296875,
0.0220794677734375,
-0.0245819091796875,
0.0906982421875,
0.007694244384765625,
-0.01236724853515625,
0.01751708984375,
0.0027294158935546875,
0.0144805908203125,
-0.0299072265625,
0.06365966796875,
0.042205810546875,
0.009796142578125,
0.01085662841796875,
-0.00948333740234375,
-0.029266357421875,
-0.05218505859375,
0.0533447265625,
0.00504302978515625,
0.007266998291015625,
-0.012054443359375,
-0.0255279541015625,
0.07080078125,
0.015411376953125,
0.011077880859375,
-0.01641845703125,
0.052337646484375,
0.021331787109375,
-0.0164031982421875,
-0.01157379150390625,
-0.00970458984375,
-0.052459716796875,
0.03521728515625,
0.0178680419921875,
-0.01561737060546875,
-0.0122833251953125,
0.01076507568359375,
0.016937255859375,
0.0013408660888671875,
-0.01515960693359375,
0.003231048583984375,
0.0252838134765625,
-0.034515380859375,
-0.0137176513671875,
0.03778076171875,
-0.06719970703125,
-0.0082244873046875,
-0.0017633438110351562,
0.022247314453125,
-0.0189666748046875,
-0.07440185546875,
-0.00433349609375,
-0.014984130859375,
-0.0009355545043945312,
0.03240966796875,
0.047637939453125,
0.0318603515625,
0.0300445556640625,
-0.0169219970703125,
-0.0227203369140625,
0.012298583984375,
0.0311126708984375,
-0.037872314453125,
-0.0582275390625,
-0.0182952880859375,
-0.0203704833984375,
0.00743865966796875,
0.01335906982421875,
-0.03387451171875,
0.024017333984375,
-0.004657745361328125,
0.041473388671875,
0.0011768341064453125,
0.0203704833984375,
0.00431060791015625,
0.031951904296875,
-0.01085662841796875,
-0.006649017333984375,
-0.01507568359375,
0.003108978271484375,
0.0367431640625,
0.05096435546875,
0.00429534912109375,
0.0071258544921875,
-0.045745849609375,
-0.004161834716796875,
-0.0226898193359375,
0.0031833648681640625,
0.014404296875,
-0.036163330078125,
-0.0238800048828125,
-0.0171661376953125,
0.0018358230590820312,
0.0394287109375,
-0.0181732177734375,
0.00787353515625,
-0.039794921875,
-0.0340576171875,
-0.070068359375,
0.053009033203125,
-0.0675048828125,
-0.023834228515625,
0.0057373046875,
-0.0124359130859375,
-0.02227783203125,
-0.0035076141357421875,
-0.058074951171875,
-0.016632080078125,
-0.0011167526245117188,
-0.0125274658203125,
0.0207977294921875,
-0.0377197265625,
0.050689697265625,
-0.025604248046875,
0.004016876220703125,
-0.02789306640625,
0.0217132568359375,
0.002780914306640625,
0.01561737060546875,
-0.048675537109375,
-0.0026836395263671875,
-0.038970947265625,
-0.034515380859375,
-0.029266357421875,
0.0007910728454589844,
-0.07574462890625,
0.01320648193359375,
0.0036296844482421875,
0.026947021484375,
-0.0233154296875,
-0.04058837890625,
0.022186279296875,
-0.004161834716796875,
-0.00045561790466308594,
0.0193939208984375,
-0.03271484375,
0.060638427734375,
-0.004573822021484375,
0.0379638671875,
-0.00982666015625,
0.019805908203125,
0.01026153564453125,
-0.0026035308837890625,
0.046905517578125,
0.0276336669921875,
-0.0236358642578125,
-0.047271728515625,
-0.00537109375,
-0.070068359375,
0.0177764892578125,
-0.02227783203125,
0.01708984375,
-0.017486572265625,
0.0233154296875,
-0.0172576904296875,
-0.029937744140625,
-0.0181121826171875,
-0.00565338134765625,
0.0014476776123046875,
-0.01349639892578125,
-0.0176239013671875,
0.01025390625,
-0.06915283203125,
0.032745361328125,
0.034515380859375,
-0.0074310302734375,
-0.001537322998046875,
-0.004108428955078125,
0.01849365234375,
0.053955078125,
-0.01776123046875,
0.039337158203125,
0.02386474609375,
0.0004699230194091797,
0.01824951171875,
0.0179595947265625,
0.04461669921875,
-0.0247344970703125,
0.0628662109375,
0.0028972625732421875,
-0.0019273757934570312,
0.039703369140625,
-0.037811279296875,
0.00759124755859375,
-0.000396728515625,
0.027587890625,
-0.0216217041015625,
0.007740020751953125,
-0.015625,
-0.00731658935546875,
0.0338134765625,
-0.051971435546875,
-0.005260467529296875,
-0.035919189453125,
0.018829345703125,
0.049285888671875,
-0.047454833984375,
-0.02655029296875,
0.00927734375,
-0.0160980224609375,
0.02105712890625,
0.01464080810546875,
0.006015777587890625,
0.004528045654296875,
-0.0260467529296875,
-0.0022373199462890625,
-0.01081085205078125,
-0.0118408203125,
-0.0121307373046875,
0.0330810546875,
-0.0693359375,
-0.103759765625,
-0.018951416015625,
0.01311492919921875,
-0.059478759765625,
-0.018280029296875,
-0.01507568359375,
0.01499176025390625,
0.06903076171875,
-0.04595947265625,
0.0330810546875,
0.034515380859375,
0.00795745849609375,
-0.038604736328125,
-0.0098419189453125,
0.0244293212890625,
-0.00433349609375,
0.0267333984375,
0.0208892822265625,
0.0038585662841796875,
-0.052734375,
-0.011322021484375,
0.038238525390625,
0.04901123046875,
0.02325439453125,
-0.02703857421875,
0.050445556640625,
0.028961181640625,
-0.048858642578125,
-0.026214599609375,
0.0267181396484375,
-0.0173492431640625,
0.031829833984375,
-0.016845703125,
0.004146575927734375,
-0.0189971923828125,
-0.059417724609375,
-0.0296783447265625,
0.111572265625,
-0.046173095703125,
-0.0032482147216796875,
-0.01168060302734375,
0.0609130859375,
0.0278167724609375,
0.0697021484375,
-0.028778076171875,
0.05731201171875,
-0.041229248046875,
0.0679931640625,
-0.0023860931396484375,
0.009063720703125,
0.045379638671875,
0.01045989990234375,
0.0157623291015625,
-0.00681304931640625,
0.049224853515625,
-0.02813720703125,
0.03302001953125,
0.0169219970703125,
-0.020355224609375,
-0.01043701171875,
-0.033111572265625,
0.01183319091796875,
0.0015659332275390625,
-0.0589599609375,
0.00287628173828125,
0.00913238525390625,
-0.052825927734375,
-0.007373809814453125,
0.0128631591796875,
0.0226287841796875,
-0.002254486083984375,
0.0391845703125,
0.027191162109375,
-0.01690673828125,
-0.03179931640625,
0.036529541015625,
0.018829345703125,
0.0474853515625,
0.038848876953125,
0.0231170654296875,
-0.00444793701171875,
-0.02056884765625,
0.06207275390625,
0.0036373138427734375,
0.047821044921875,
0.01184844970703125,
0.0117645263671875,
0.0254669189453125,
-0.0173187255859375,
0.025421142578125,
0.026519775390625,
-0.052154541015625,
-0.01551055908203125,
-0.0006151199340820312,
0.03192138671875,
-0.0243072509765625,
0.014373779296875,
0.00429534912109375,
-0.0075225830078125,
-0.010223388671875,
-0.0869140625,
0.009246826171875,
-0.00225067138671875,
-0.010498046875,
0.030181884765625,
-0.0286407470703125,
-0.0257568359375,
0.06494140625,
0.0090179443359375,
-0.038330078125,
-0.0214385986328125,
0.030303955078125,
0.0096435546875,
0.021881103515625,
0.0253448486328125,
-0.056976318359375,
0.004657745361328125,
-0.01136016845703125,
-0.01226806640625,
0.0217742919921875,
0.012237548828125,
0.02789306640625,
-0.037322998046875,
-0.0165863037109375,
-0.0167236328125,
0.053680419921875,
-0.04888916015625,
0.024322509765625,
-0.07073974609375,
-0.095703125,
-0.00839996337890625,
0.05682373046875,
0.0197601318359375,
0.0103302001953125,
0.04730224609375,
0.05523681640625,
-0.0019350051879882812,
-0.004169464111328125,
0.07415771484375,
-0.00724029541015625,
-0.028594970703125,
-0.002681732177734375,
-0.0200653076171875,
0.01461029052734375,
-0.0026569366455078125,
-0.01239013671875,
0.049102783203125,
-0.0070037841796875,
-0.005344390869140625,
0.0172576904296875,
0.007007598876953125,
-0.044769287109375,
0.00569915771484375,
0.0177459716796875,
0.059814453125,
0.03753662109375,
-0.06036376953125,
0.0024509429931640625,
-0.0562744140625,
-0.00978851318359375,
0.0247802734375,
0.0204315185546875,
-0.015655517578125,
0.03955078125,
0.01129150390625,
-0.015869140625,
0.010833740234375,
-0.0178375244140625,
0.02691650390625,
-0.0133209228515625,
0.00295257568359375,
-0.006801605224609375,
-0.01983642578125,
0.00634002685546875,
0.004062652587890625,
0.0173797607421875,
-0.0014057159423828125,
0.1009521484375,
-0.031890869140625,
0.0036640167236328125,
0.008697509765625,
-0.0165557861328125,
0.0369873046875,
0.01763916015625,
-0.053955078125,
0.0117340087890625,
0.03131103515625,
-0.01363372802734375,
-0.06036376953125,
0.0217742919921875,
0.033050537109375,
-0.0009713172912597656,
0.046173095703125,
0.001705169677734375,
0.006992340087890625,
-0.0252532958984375,
-0.0013990402221679688,
-0.046661376953125,
-0.04803466796875,
-0.0264129638671875,
-0.0007767677307128906,
-0.022796630859375,
-0.034698486328125,
-0.01708984375,
-0.0224761962890625,
0.01479339599609375,
0.02154541015625,
-0.0179290771484375,
0.065673828125,
-0.0293426513671875,
0.01375579833984375,
-0.04132080078125,
-0.00510406494140625,
0.043426513671875,
-0.004421234130859375,
0.005107879638671875,
0.0233154296875,
0.04290771484375,
0.0135040283203125,
-0.019805908203125,
0.0189056396484375,
0.0478515625,
0.03912353515625,
-0.0152587890625,
0.01953125,
0.0438232421875,
-0.006740570068359375,
-0.008209228515625,
-0.042572021484375,
-0.002445220947265625,
-0.02874755859375,
-0.023193359375,
0.03216552734375,
-0.0225677490234375,
0.01122283935546875,
-0.0171966552734375,
-0.0038280487060546875,
0.023834228515625,
-0.02130126953125,
-0.0022258758544921875,
0.0012950897216796875,
-0.050048828125,
0.006633758544921875,
-0.0160369873046875,
0.0300140380859375,
-0.0250396728515625,
-0.0122528076171875,
-0.041595458984375,
-0.054412841796875,
-0.050262451171875,
0.064208984375,
-0.036468505859375,
0.0200347900390625,
0.036529541015625,
0.00733184814453125,
0.00817108154296875,
-0.0009317398071289062,
-0.012176513671875,
0.0574951171875,
-0.07244873046875,
-0.0059356689453125,
0.022064208984375,
0.0187225341796875,
-0.01922607421875,
-0.0289764404296875,
-0.0024890899658203125,
0.007724761962890625,
-0.0086517333984375,
-0.036376953125,
0.02093505859375,
0.01035308837890625,
-0.0183868408203125,
-0.01296234130859375,
-0.0306243896484375,
0.00606536865234375,
-0.0281524658203125,
-0.026763916015625,
0.0211334228515625,
0.0239410400390625,
-0.039825439453125,
-0.00830078125,
-0.00177764892578125,
-0.0186004638671875,
-0.00458526611328125,
0.017730712890625,
-0.048431396484375,
0.0260009765625,
0.006832122802734375,
-0.0552978515625,
0.059417724609375,
0.051025390625,
-0.010772705078125,
-0.00878143310546875,
0.004207611083984375,
0.0238494873046875,
0.01337432861328125,
-0.02728271484375,
0.0538330078125,
0.0021839141845703125,
0.01788330078125,
-0.00872039794921875,
-0.022796630859375,
-0.036407470703125,
-0.00585174560546875,
0.08892822265625,
0.08612060546875,
0.034515380859375,
-0.05291748046875,
-0.0078887939453125,
-0.0511474609375,
0.048858642578125,
-0.023223876953125,
-0.03045654296875,
-0.0440673828125,
-0.0137786865234375,
0.0157623291015625,
0.0269317626953125,
0.0092620849609375,
-0.04644775390625,
-0.0162200927734375,
-0.0265045166015625,
-0.009796142578125,
0.0160064697265625,
-0.01849365234375,
0.046173095703125,
-0.053924560546875,
-0.00649261474609375,
-0.006282806396484375,
-0.019775390625,
-0.0184478759765625,
-0.044403076171875,
0.018402099609375,
0.029937744140625,
0.01235198974609375,
-0.043182373046875,
0.033721923828125,
-0.0027751922607421875,
0.033660888671875,
-0.044708251953125,
-0.045257568359375,
-0.0182647705078125,
0.0225982666015625,
0.0094451904296875,
0.0443115234375,
-0.04327392578125,
0.0238037109375,
0.03369140625,
-0.0088348388671875,
0.008514404296875,
-0.018890380859375,
0.00675201416015625,
0.0011663436889648438,
-0.0242462158203125,
-0.01824951171875,
0.018096923828125,
-0.046966552734375,
0.010955810546875,
0.0283966064453125,
0.0187225341796875,
-0.0025386810302734375,
0.03265380859375,
0.006580352783203125,
0.006664276123046875,
0.0151519775390625
] |
7c6e22d4888658f80146d90450d92cbc87c14bb4
|
Wordpress Stackexchange
Q: Clearing cookie on logout and session expiration I would like to clear the session cookie when a user logs out or when their session expires. I understand that wp_clear_auth_cookie(); clears the cookie but I am struggling to understand how to implement it. I am using the following code to log a user out automatically if they are inactive for 10 minutes. (I think I found that in here too)
function myplugin_cookie_expiration( $expiration, $user_id, $remember ) {
return $remember ? $expiration : 600;
}
add_filter( 'auth_cookie_expiration', 'myplugin_cookie_expiration', 99, 3 );
Could someone kindly direct me to the right direction to achieve this result?
A: Try setting $experation to a negative integer:
function myplugin_cookie_expiration( $expiration, $user_id, $remember ) {
return $remember ? $expiration : -600;
}
add_filter( 'auth_cookie_expiration', 'myplugin_cookie_expiration', 99, 3 );
From the w3schools PHP page on cookies:
<?php
// set the expiration date to one hour ago
setcookie("user", "", time()-3600);
?>
|
Q: Clearing cookie on logout and session expiration I would like to clear the session cookie when a user logs out or when their session expires. I understand that wp_clear_auth_cookie(); clears the cookie but I am struggling to understand how to implement it. I am using the following code to log a user out automatically if they are inactive for 10 minutes. (I think I found that in here too)
function myplugin_cookie_expiration( $expiration, $user_id, $remember ) {
return $remember ? $expiration : 600;
}
add_filter( 'auth_cookie_expiration', 'myplugin_cookie_expiration', 99, 3 );
Could someone kindly direct me to the right direction to achieve this result?
A: Try setting $experation to a negative integer:
function myplugin_cookie_expiration( $expiration, $user_id, $remember ) {
return $remember ? $expiration : -600;
}
add_filter( 'auth_cookie_expiration', 'myplugin_cookie_expiration', 99, 3 );
From the w3schools PHP page on cookies:
<?php
// set the expiration date to one hour ago
setcookie("user", "", time()-3600);
?>
|
wordpress
|
{
"language": "en",
"length": 152,
"provenance": "stackexchange_00019.jsonl.gz:428901",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85295"
}
|
[
0.0684814453125,
0.047088623046875,
-0.006450653076171875,
-0.0296173095703125,
0.054229736328125,
-0.035980224609375,
0.031646728515625,
-0.05047607421875,
0.0150909423828125,
0.01092529296875,
-0.0278167724609375,
-0.0014400482177734375,
-0.041351318359375,
-0.028167724609375,
-0.0172882080078125,
-0.039154052734375,
0.00931549072265625,
0.0018415451049804688,
0.002223968505859375,
-0.02178955078125,
-0.00482940673828125,
-0.0232696533203125,
0.015533447265625,
-0.002017974853515625,
0.0023593902587890625,
-0.00031638145446777344,
0.057861328125,
-0.00860595703125,
-0.0023403167724609375,
-0.02032470703125,
0.012542724609375,
-0.01222991943359375,
0.004779815673828125,
0.060028076171875,
-0.057373046875,
0.005218505859375,
-0.04852294921875,
0.04949951171875,
0.01236724853515625,
0.00959014892578125,
0.013153076171875,
-0.0242919921875,
-0.006565093994140625,
-0.027313232421875,
-0.00962066650390625,
0.00864410400390625,
0.01526641845703125,
-0.0230255126953125,
0.003864288330078125,
0.0263824462890625,
0.03717041015625,
-0.031585693359375,
0.035186767578125,
-0.016876220703125,
-0.0266571044921875,
-0.008270263671875,
-0.0022792816162109375,
0.0006275177001953125,
0.0386962890625,
-0.0183563232421875,
-0.03289794921875,
-0.027740478515625,
0.0287628173828125,
-0.0203704833984375,
-0.0028018951416015625,
-0.0194549560546875,
-0.034088134765625,
0.0164642333984375,
-0.03582763671875,
0.0123291015625,
0.061676025390625,
-0.0239410400390625,
-0.021881103515625,
0.029998779296875,
-0.042388916015625,
-0.01849365234375,
0.00714111328125,
-0.0022258758544921875,
0.0193328857421875,
0.0288848876953125,
-0.023101806640625,
-0.02117919921875,
-0.039398193359375,
-0.0127105712890625,
0.020751953125,
0.0220947265625,
-0.00742340087890625,
-0.0164337158203125,
0.001415252685546875,
-0.0098419189453125,
-0.01995849609375,
-0.0164337158203125,
0.0272674560546875,
-0.0167388916015625,
-0.034912109375,
-0.0283203125,
0.0189056396484375,
0.037017822265625,
0.0007500648498535156,
-0.022613525390625,
0.005992889404296875,
-0.022552490234375,
-0.0369873046875,
-0.01300048828125,
-0.017974853515625,
0.04962158203125,
0.038299560546875,
0.005741119384765625,
-0.0207672119140625,
-0.0036029815673828125,
0.00798797607421875,
-0.05706787109375,
-0.026458740234375,
-0.045440673828125,
-0.027435302734375,
0.04559326171875,
-0.021270751953125,
-0.0127105712890625,
0.015869140625,
-0.033935546875,
-0.0491943359375,
-0.036346435546875,
-0.0300750732421875,
0.033477783203125,
0.030731201171875,
-0.01434326171875,
0.006229400634765625,
0.0548095703125,
-0.00040531158447265625,
0.030853271484375,
-0.05133056640625,
0.0198822021484375,
0.06463623046875,
-0.01776123046875,
-0.00774383544921875,
-0.0261688232421875,
0.07147216796875,
-0.032196044921875,
-0.002010345458984375,
0.02227783203125,
0.0126495361328125,
-0.03704833984375,
-0.03131103515625,
0.01654052734375,
0.0177001953125,
0.0096588134765625,
0.007465362548828125,
0.00479888916015625,
0.0250244140625,
-0.032470703125,
0.0167388916015625,
-0.0357666015625,
0.024139404296875,
0.001995086669921875,
0.0017147064208984375,
-0.0160369873046875,
0.010009765625,
-0.0224609375,
0.0025386810302734375,
-0.0134429931640625,
0.01203155517578125,
-0.0155792236328125,
-0.0341796875,
-0.0338134765625,
-0.051544189453125,
0.0004832744598388672,
-0.0008959770202636719,
0.0010328292846679688,
0.040618896484375,
-0.0198974609375,
0.031524658203125,
-0.037689208984375,
0.0227203369140625,
0.0275726318359375,
0.0108795166015625,
0.04913330078125,
-0.048431396484375,
0.023101806640625,
0.0313720703125,
-0.053924560546875,
-0.037811279296875,
-0.047119140625,
0.0238189697265625,
0.00983428955078125,
-0.01012420654296875,
-0.00714874267578125,
0.01247406005859375,
0.0090179443359375,
-0.0286102294921875,
0.019317626953125,
0.001678466796875,
0.0325927734375,
-0.00980377197265625,
0.0650634765625,
0.006076812744140625,
-0.047088623046875,
-0.0084381103515625,
0.010101318359375,
-0.0202178955078125,
-0.04766845703125,
0.03790283203125,
0.0269012451171875,
-0.0302886962890625,
-0.0245819091796875,
-0.09869384765625,
-0.0012454986572265625,
-0.0210418701171875,
0.037567138671875,
0.00635528564453125,
0.028167724609375,
0.0116119384765625,
-0.004573822021484375,
-0.0177154541015625,
-0.02587890625,
-0.02679443359375,
-0.0158538818359375,
-0.01227569580078125,
0.07421875,
-0.0028514862060546875,
0.07025146484375,
-0.002155303955078125,
-0.061981201171875,
0.0120391845703125,
-0.02838134765625,
0.04541015625,
-0.01338958740234375,
-0.007213592529296875,
-0.0281524658203125,
0.0157928466796875,
-0.0130615234375,
-0.0260162353515625,
0.0638427734375,
0.0158843994140625,
0.02972412109375,
-0.0203857421875,
0.00457763671875,
0.0082855224609375,
-0.036651611328125,
-0.00821685791015625,
0.032745361328125,
0.04864501953125,
0.0035266876220703125,
-0.0222625732421875,
-0.0191192626953125,
0.0237884521484375,
-0.05859375,
0.0007185935974121094,
-0.00557708740234375,
-0.0136566162109375,
0.0181884765625,
-0.005954742431640625,
-0.00582122802734375,
0.025848388671875,
-0.0384521484375,
-0.0149688720703125,
0.03814697265625,
-0.0251617431640625,
-0.0133819580078125,
0.01236724853515625,
-0.011627197265625,
0.006801605224609375,
-0.078125,
-0.0181427001953125,
-0.048828125,
0.009246826171875,
-0.0299835205078125,
-0.01090240478515625,
-0.01271820068359375,
-0.0215606689453125,
-0.01102447509765625,
0.037811279296875,
-0.02972412109375,
0.005016326904296875,
0.058319091796875,
0.0014476776123046875,
-0.0258636474609375,
-0.011810302734375,
-0.021209716796875,
0.0088043212890625,
0.01230621337890625,
-0.0147552490234375,
0.026885986328125,
0.01776123046875,
-0.007472991943359375,
-0.0226287841796875,
-0.0026226043701171875,
0.02081298828125,
-0.0072784423828125,
0.023834228515625,
0.0074615478515625,
0.036163330078125,
0.0016994476318359375,
-0.0252838134765625,
0.0212249755859375,
0.0305328369140625,
-0.0396728515625,
0.0167694091796875,
-0.045623779296875,
0.040130615234375,
-0.0362548828125,
0.034942626953125,
0.06561279296875,
0.01165008544921875,
-0.0010280609130859375,
-0.0027618408203125,
0.0285491943359375,
-0.000008404254913330078,
-0.005615234375,
-0.01216888427734375,
-0.0273284912109375,
0.02001953125,
0.041778564453125,
0.0240325927734375,
0.045318603515625,
-0.037017822265625,
-0.048736572265625,
-0.0416259765625,
0.006343841552734375,
-0.0863037109375,
-0.07098388671875,
-0.025360107421875,
-0.056793212890625,
0.0384521484375,
-0.01293182373046875,
-0.020599365234375,
-0.0152130126953125,
0.0140228271484375,
0.0185546875,
-0.0033969879150390625,
-0.0021686553955078125,
0.00128936767578125,
0.00783538818359375,
-0.01155853271484375,
-0.0030117034912109375,
-0.005390167236328125,
-0.026153564453125,
-0.0164794921875,
0.056976318359375,
-0.0211029052734375,
-0.0447998046875,
-0.06744384765625,
0.00626373291015625,
-0.01013946533203125,
-0.04986572265625,
-0.01617431640625,
-0.00316619873046875,
0.0004911422729492188,
0.0015764236450195312,
-0.031646728515625,
0.0007929801940917969,
0.007747650146484375,
-0.01052093505859375,
-0.00644683837890625,
-0.044342041015625,
0.0271453857421875,
-0.0706787109375,
-0.03424072265625,
-0.005157470703125,
-0.00803375244140625,
-0.0482177734375,
0.0197906494140625,
-0.006694793701171875,
-0.036041259765625,
-0.01617431640625,
0.01267242431640625,
-0.0106658935546875,
-0.01358795166015625,
-0.00711822509765625,
-0.0225067138671875,
-0.0116424560546875,
-0.0169830322265625,
-0.0361328125,
0.038177490234375,
-0.006824493408203125,
-0.0247039794921875,
0.01094818115234375,
0.0791015625,
0.015869140625,
0.01824951171875,
0.04046630859375,
0.006927490234375,
-0.01494598388671875,
-0.029327392578125,
-0.08673095703125,
-0.035064697265625,
0.035552978515625,
-0.0099029541015625,
-0.00039267539978027344,
-0.0121612548828125,
-0.0200347900390625,
0.00763702392578125,
0.08099365234375,
-0.0275726318359375,
-0.03643798828125,
-0.0009403228759765625,
0.0016660690307617188,
0.0107879638671875,
0.01116943359375,
-0.0245513916015625,
-0.015625,
-0.10369873046875,
0.03167724609375,
0.01059722900390625,
-0.021270751953125,
-0.0157318115234375,
-0.0108795166015625,
-0.0362548828125,
-0.043243408203125,
0.028045654296875,
-0.001750946044921875,
0.02166748046875,
-0.0099945068359375,
0.007625579833984375,
-0.0247650146484375,
0.017303466796875,
-0.03350830078125,
-0.022247314453125,
0.0074615478515625,
-0.075439453125,
0.0361328125,
0.061370849609375,
-0.0345458984375,
0.0123748779296875,
0.020904541015625,
-0.01192474365234375,
0.0228118896484375,
0.0124969482421875,
0.0166473388671875,
0.0137176513671875,
0.0179443359375,
0.0124053955078125,
-0.01355743408203125,
0.007781982421875,
-0.02996826171875,
-0.040283203125,
0.01059722900390625,
-0.029083251953125,
0.039154052734375,
0.004119873046875,
-0.0233154296875,
-0.058685302734375,
-0.0447998046875,
0.0003993511199951172,
0.0034999847412109375,
0.01239776611328125,
-0.01198577880859375,
-0.04742431640625,
-0.03631591796875,
0.082275390625,
0.0538330078125,
-0.002613067626953125,
-0.0135345458984375,
0.037078857421875,
-0.01032257080078125,
-0.0655517578125,
-0.005615234375,
-0.01181793212890625,
-0.0014791488647460938,
-0.03643798828125,
0.0245513916015625,
-0.040802001953125,
-0.01139068603515625,
0.07080078125,
-0.07867431640625,
0.0272369384765625,
-0.08056640625,
0.07342529296875,
-0.040802001953125,
-0.0094146728515625,
0.021636962890625,
-0.052886962890625,
0.037353515625,
0.005588531494140625,
0.0163421630859375,
0.00650787353515625,
0.039825439453125,
0.00307464599609375,
0.0020313262939453125,
-0.027374267578125,
-0.0052490234375,
-0.0355224609375,
0.01348114013671875,
-0.01465606689453125,
0.0187530517578125,
0.0322265625,
-0.0016641616821289062,
0.0180206298828125,
0.0183563232421875,
0.0135650634765625,
-0.06427001953125,
-0.00942230224609375,
-0.035858154296875,
0.0304412841796875,
-0.0304412841796875,
0.0010480880737304688,
-0.0305328369140625,
-0.0174407958984375,
0.06903076171875,
0.046966552734375,
-0.0506591796875,
0.043243408203125,
0.01727294921875,
0.016937255859375,
0.006732940673828125,
-0.021240234375,
0.0009479522705078125,
0.0019702911376953125,
-0.02264404296875,
0.0021686553955078125,
-0.0267333984375,
0.00553131103515625,
-0.0294342041015625,
0.01207733154296875,
-0.0297393798828125,
0.007198333740234375,
-0.01425933837890625,
0.07257080078125,
0.03057861328125,
0.0189056396484375,
-0.024871826171875,
0.032958984375,
0.010498046875,
0.043548583984375,
0.0097503662109375,
-0.005523681640625,
-0.03411865234375,
0.0577392578125,
-0.02734375,
-0.021575927734375,
-0.03643798828125,
0.0253753662109375,
-0.005268096923828125,
-0.0276336669921875,
0.0147857666015625,
0.027313232421875,
0.0423583984375,
-0.0102081298828125,
0.0301513671875,
0.006683349609375,
-0.041473388671875,
-0.013580322265625,
0.028350830078125,
0.034423828125,
-0.022674560546875,
-0.0209808349609375,
-0.0129241943359375,
-0.034423828125,
-0.022216796875,
0.051177978515625,
-0.0164642333984375,
-0.028350830078125,
-0.035736083984375,
-0.017120361328125,
-0.022613525390625,
-0.0323486328125,
-0.04937744140625,
-0.0167694091796875,
0.007007598876953125,
0.005207061767578125,
0.01210784912109375,
-0.017608642578125,
0.02789306640625,
-0.01483154296875,
0.00031566619873046875,
0.06005859375,
0.020355224609375,
0.005626678466796875,
-0.018310546875,
-0.0274658203125,
0.01153564453125,
-0.05108642578125,
-0.0119476318359375,
-0.03955078125,
-0.056976318359375,
-0.03277587890625,
-0.0225830078125,
0.0294036865234375,
0.05926513671875,
0.0032291412353515625,
-0.0032024383544921875,
-0.033935546875,
-0.01263427734375,
0.01200103759765625,
0.08319091796875,
-0.0214080810546875,
0.0152130126953125,
0.0228271484375,
0.0164031982421875,
0.0010213851928710938,
-0.0140228271484375,
-0.00974273681640625,
-0.010406494140625,
0.0192108154296875,
0.061798095703125,
-0.0309600830078125,
-0.03271484375,
-0.019256591796875,
-0.03411865234375,
0.09765625,
-0.033233642578125,
-0.016204833984375,
0.0120391845703125,
0.015594482421875,
-0.02069091796875,
0.01436614990234375,
0.059417724609375,
0.01010894775390625,
0.004909515380859375,
-0.018096923828125,
0.05718994140625,
0.0291595458984375,
0.042572021484375,
0.0012989044189453125,
-0.06109619140625,
0.042449951171875,
-0.01279449462890625,
0.0171356201171875,
-0.0032978057861328125,
0.04638671875,
-0.0086669921875,
0.032470703125,
0.0304412841796875,
0.0206146240234375,
0.029296875,
0.0004787445068359375,
0.00969696044921875,
-0.0228424072265625,
0.02374267578125,
-0.0204925537109375,
-0.015106201171875,
0.0032596588134765625,
-0.006000518798828125,
0.0244598388671875,
0.0762939453125,
0.08258056640625,
-0.10693359375,
0.0247039794921875,
0.03594970703125,
-0.015411376953125,
0.011383056640625,
-0.002475738525390625,
0.00867462158203125,
0.0183563232421875,
0.01470184326171875,
-0.0206756591796875,
-0.0298004150390625,
0.00344085693359375,
0.0010461807250976562,
-0.004039764404296875,
-0.0101318359375,
0.0282440185546875,
0.01898193359375,
-0.10296630859375,
0.044464111328125,
0.0814208984375,
-0.0012083053588867188,
-0.0178070068359375,
0.00463104248046875,
0.031402587890625,
-0.0241241455078125,
-0.0567626953125,
0.0238189697265625,
-0.0116729736328125,
-0.007526397705078125,
0.03472900390625,
-0.027801513671875,
0.056060791015625,
0.04608154296875,
0.0006165504455566406,
-0.017059326171875,
0.0091400146484375,
0.00836944580078125,
-0.0038509368896484375,
-0.023590087890625,
0.0162200927734375,
0.0028324127197265625,
-0.03240966796875,
0.021453857421875,
-0.0191497802734375,
-0.0273590087890625,
-0.009521484375,
-0.043182373046875,
0.03765869140625,
-0.05828857421875,
0.0264739990234375,
0.05462646484375,
0.04461669921875,
-0.0176544189453125,
0.01004791259765625,
-0.00827789306640625,
-0.036529541015625,
-0.015594482421875,
0.00971221923828125,
0.00879669189453125,
0.02825927734375,
0.031463623046875,
-0.0880126953125,
0.08837890625,
0.04339599609375,
0.056610107421875,
-0.0254669189453125,
0.025604248046875,
-0.0177154541015625,
0.00841522216796875,
-0.0218353271484375,
0.057464599609375,
-0.0019369125366210938,
0.010040283203125,
-0.0137176513671875,
0.0218048095703125,
0.005489349365234375,
-0.0206756591796875,
0.04736328125,
0.027557373046875,
-0.043365478515625,
-0.0313720703125,
-0.04315185546875,
-0.0005903244018554688,
-0.0201873779296875,
0.049560546875,
-0.0335693359375,
0.029541015625,
0.0306854248046875,
-0.05926513671875,
0.0198974609375,
-0.0204010009765625,
-0.0290985107421875,
-0.012115478515625,
0.00434112548828125,
-0.016937255859375,
-0.0036907196044921875,
0.01904296875,
-0.03662109375,
0.0011339187622070312,
0.00433349609375,
0.03509521484375,
0.004364013671875,
0.0117645263671875,
0.00353240966796875,
-0.0120697021484375,
-0.00022172927856445312,
-0.0147857666015625,
0.03668212890625,
0.00872802734375,
0.0132598876953125,
0.04608154296875,
0.0273284912109375,
-0.005458831787109375,
-0.00949859619140625,
0.0025577545166015625,
-0.0015115737915039062,
-0.03192138671875,
0.03277587890625,
0.04351806640625,
0.037872314453125,
0.0037784576416015625,
0.007694244384765625,
0.00635528564453125,
0.037200927734375,
-0.0282440185546875,
-0.03955078125,
-0.0175933837890625,
-0.01554107666015625,
0.052337646484375,
0.020721435546875,
0.08203125,
-0.050079345703125,
-0.06280517578125,
-0.0164031982421875,
0.0307159423828125,
0.034820556640625,
0.023956298828125,
0.01873779296875,
0.050506591796875,
-0.0997314453125,
0.0260772705078125,
-0.010345458984375,
-0.0161285400390625,
0.00380706787109375,
-0.003261566162109375,
0.020660400390625,
-0.0215606689453125,
0.0280609130859375,
0.0115966796875,
0.0018072128295898438,
0.01532745361328125,
0.0149993896484375,
-0.0186614990234375,
0.00017583370208740234,
-0.0189971923828125,
0.016876220703125,
0.0263824462890625,
0.01200103759765625,
-0.04998779296875,
0.025665283203125,
-0.00818634033203125,
-0.0606689453125,
-0.0234527587890625,
-0.0345458984375,
-0.041656494140625,
0.039398193359375,
-0.0133819580078125,
0.023590087890625,
0.013397216796875,
-0.004573822021484375,
-0.041259765625,
0.023345947265625,
0.0272674560546875,
-0.02154541015625,
0.06085205078125,
-0.0018062591552734375,
0.01033782958984375,
0.0078277587890625,
0.0188751220703125,
0.020416259765625,
0.0187835693359375,
-0.01561737060546875,
0.01303863525390625,
-0.047760009765625,
0.007843017578125,
-0.01007843017578125,
0.00434112548828125,
-0.0123138427734375,
0.0582275390625,
0.03485107421875,
0.017486572265625,
0.0100250244140625,
-0.022186279296875,
-0.01425933837890625,
-0.033233642578125,
0.041595458984375,
-0.004947662353515625,
-0.0423583984375,
-0.030792236328125,
0.0055694580078125,
0.023590087890625,
0.0034809112548828125,
0.0015611648559570312,
0.034088134765625,
0.01139068603515625,
0.0098114013671875,
-0.01678466796875,
0.01531219482421875,
-0.01959228515625,
0.0312042236328125,
-0.01517486572265625,
-0.0134429931640625,
0.0050201416015625,
-0.06475830078125,
0.100830078125,
-0.030059814453125,
0.043701171875,
0.0704345703125,
-0.0257720947265625,
-0.0175323486328125,
0.027679443359375,
-0.0265350341796875,
-0.01349639892578125,
-0.0019931793212890625,
0.0516357421875,
0.02178955078125,
0.00870513916015625,
0.0257568359375,
-0.006938934326171875,
0.04132080078125,
-0.023712158203125,
0.01013946533203125,
-0.019683837890625,
-0.0223846435546875,
-0.0294952392578125,
0.0216522216796875,
-0.01238250732421875,
-0.007965087890625,
-0.00223541259765625,
-0.02166748046875,
-0.0292205810546875,
0.0218963623046875,
-0.01165771484375,
-0.01470184326171875,
0.01788330078125,
0.04736328125,
0.030975341796875,
0.0540771484375,
-0.0222625732421875,
0.01235198974609375,
0.0218353271484375,
0.021697998046875,
0.0211334228515625,
-0.060516357421875,
-0.054931640625,
-0.0635986328125,
0.0288238525390625,
0.0360107421875,
-0.0308685302734375,
-0.04742431640625,
-0.057281494140625,
0.006771087646484375,
0.042388916015625,
0.01490020751953125,
-0.04168701171875,
0.02984619140625,
-0.03582763671875,
0.0184326171875,
0.02471923828125,
-0.0215301513671875,
-0.0019435882568359375,
0.0150604248046875,
-0.011199951171875,
-0.0246734619140625,
-0.0372314453125,
0.0246429443359375,
-0.031463623046875,
-0.03955078125,
0.0202484130859375,
0.0141143798828125,
-0.022857666015625,
-0.0584716796875,
-0.0299530029296875,
-0.0122222900390625,
-0.03912353515625,
-0.0133819580078125,
0.06207275390625,
0.01898193359375,
-0.0212249755859375,
-0.06500244140625,
-0.03704833984375,
0.0270843505859375,
0.051361083984375,
-0.007511138916015625,
-0.016326904296875,
-0.00048279762268066406,
-0.0225372314453125,
-0.0178375244140625,
0.027557373046875,
0.00909423828125,
-0.0175018310546875,
-0.0298309326171875,
0.040771484375,
0.0103912353515625,
-0.0341796875,
-0.005298614501953125,
-0.01258087158203125,
-0.00960540771484375,
-0.00830078125,
0.014678955078125,
0.0294036865234375,
0.0125274658203125,
0.052337646484375,
-0.023529052734375,
0.044036865234375,
0.0101776123046875,
0.003208160400390625,
-0.01012420654296875,
0.0055389404296875,
0.0389404296875,
0.058197021484375,
0.0015773773193359375,
0.049957275390625,
0.0145111083984375,
-0.034576416015625,
-0.01169586181640625,
0.0123748779296875,
0.004627227783203125,
0.0010433197021484375,
0.048858642578125,
0.01519012451171875,
0.005680084228515625,
-0.038299560546875,
-0.056793212890625,
0.01171112060546875,
0.0264434814453125,
-0.0208282470703125,
-0.0034542083740234375,
-0.04461669921875,
-0.0018148422241210938,
-0.05438232421875,
-0.03326416015625,
-0.0113983154296875,
0.025726318359375,
-0.0254974365234375,
0.007419586181640625,
0.0230712890625,
-0.029083251953125,
0.0007414817810058594,
0.00405120849609375,
0.0178680419921875,
-0.02362060546875,
-0.02667236328125,
-0.00720977783203125,
0.0164337158203125,
-0.0120391845703125,
-0.020751953125,
0.059234619140625,
0.0362548828125,
-0.07171630859375,
0.002948760986328125,
0.01387786865234375,
-0.019561767578125,
-0.05767822265625,
-0.04736328125,
-0.01030731201171875,
-0.01190185546875,
0.007205963134765625,
-0.0297698974609375,
-0.0006647109985351562,
-0.004673004150390625,
-0.01218414306640625,
0.0030612945556640625,
0.004505157470703125,
-0.041717529296875,
-0.03814697265625,
0.059326171875,
0.01239776611328125,
-0.0380859375,
0.0250701904296875,
-0.030303955078125,
-0.0008206367492675781,
-0.03125,
0.0250701904296875,
-0.06439208984375,
0.06488037109375,
-0.021240234375,
-0.005916595458984375,
0.04571533203125
] |
baa625aeac5542b24c5fbc63d3e1d2b0bf62622f
|
Wordpress Stackexchange
Q: Query by post title I've used a custom post type for one of my website. Custom post type contains scratch card data along with some custom fields.
I've developed an android application to manage those items from android device.
In the android app, I want to keep search feature which will help admin users to search card numbers to manage those.
I can use wordpress query to search by title.
Code
$args = array("post_type" => "mytype", "name" => $title);
$query = get_posts( $args );
It can only provide result if I provide exact title. But I need to retrieve all items with similar title.
Any suggestion?
A: Much simpler nowadays:
$posts = get_posts([
'post_type' => 'recipe',
'title' => 'Chili Sin Carne',
]);
$posts will contain all recipes with the exact title "Chili Sin Carne".
|
Q: Query by post title I've used a custom post type for one of my website. Custom post type contains scratch card data along with some custom fields.
I've developed an android application to manage those items from android device.
In the android app, I want to keep search feature which will help admin users to search card numbers to manage those.
I can use wordpress query to search by title.
Code
$args = array("post_type" => "mytype", "name" => $title);
$query = get_posts( $args );
It can only provide result if I provide exact title. But I need to retrieve all items with similar title.
Any suggestion?
A: Much simpler nowadays:
$posts = get_posts([
'post_type' => 'recipe',
'title' => 'Chili Sin Carne',
]);
$posts will contain all recipes with the exact title "Chili Sin Carne".
A: You can use either search parameter of wp_query :
Code
$args = array("post_type" => "mytype", "s" => $title);
$query = get_posts( $args );
Or you can get posts based on title throught wpdb class:
global $wpdb;
$myposts = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE post_title LIKE '%s'", '%'. $wpdb->esc_like( $title ) .'%') );
Than you'll get post object in this form:
foreach ( $myposts as $mypost )
{
$post = get_post( $mypost );
//run your output code here
}
|
wordpress
|
{
"language": "en",
"length": 215,
"provenance": "stackexchange_00019.jsonl.gz:428920",
"question_score": "14",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85373"
}
|
[
0.0004124641418457031,
-0.0010995864868164062,
0.025787353515625,
0.044281005859375,
-0.0228729248046875,
-0.0184783935546875,
0.056610107421875,
-0.044342041015625,
-0.0191192626953125,
0.0272369384765625,
-0.0041351318359375,
0.0247344970703125,
-0.03765869140625,
-0.0293731689453125,
0.00788116455078125,
-0.034637451171875,
0.006618499755859375,
-0.00485992431640625,
0.0040283203125,
-0.032928466796875,
0.03533935546875,
-0.02545166015625,
0.009124755859375,
-0.01898193359375,
0.008331298828125,
-0.042633056640625,
0.056884765625,
-0.00821685791015625,
0.01617431640625,
-0.00888824462890625,
0.0169830322265625,
-0.00543975830078125,
0.046539306640625,
-0.002361297607421875,
-0.024932861328125,
0.036224365234375,
0.013275146484375,
-0.00939178466796875,
-0.002910614013671875,
0.0322265625,
0.01027679443359375,
0.0063323974609375,
0.0085296630859375,
0.026824951171875,
-0.007472991943359375,
-0.03326416015625,
0.035552978515625,
-0.02032470703125,
0.0151824951171875,
0.006412506103515625,
-0.00899505615234375,
0.0115203857421875,
0.0024127960205078125,
-0.0161285400390625,
0.004322052001953125,
-0.016143798828125,
0.02020263671875,
-0.0328369140625,
0.038299560546875,
-0.0443115234375,
-0.042083740234375,
-0.021820068359375,
0.039154052734375,
0.007293701171875,
-0.018524169921875,
0.0261077880859375,
0.11492919921875,
-0.01120758056640625,
-0.0182647705078125,
-0.04986572265625,
0.01551055908203125,
0.01503753662109375,
0.005069732666015625,
-0.01194000244140625,
0.007228851318359375,
-0.040130615234375,
-0.00894927978515625,
-0.054412841796875,
-0.0037784576416015625,
0.0271148681640625,
-0.0355224609375,
-0.006900787353515625,
-0.03924560546875,
-0.003917694091796875,
-0.0194549560546875,
-0.004169464111328125,
-0.0318603515625,
0.004283905029296875,
-0.01824951171875,
-0.057586669921875,
-0.0013179779052734375,
-0.072021484375,
-0.0634765625,
0.0238037109375,
0.031829833984375,
-0.050811767578125,
-0.00832366943359375,
0.029449462890625,
-0.00731658935546875,
0.03436279296875,
-0.0258636474609375,
-0.0208282470703125,
0.0236358642578125,
-0.0419921875,
0.0206298828125,
0.0192413330078125,
-0.030609130859375,
-0.00029015541076660156,
0.06011962890625,
0.03680419921875,
0.017913818359375,
0.041290283203125,
0.005603790283203125,
0.024810791015625,
-0.039459228515625,
0.037078857421875,
-0.0162506103515625,
-0.0238800048828125,
-0.0307464599609375,
0.034576416015625,
-0.005100250244140625,
0.0017614364624023438,
0.006488800048828125,
-0.0234222412109375,
0.04400634765625,
0.02520751953125,
-0.0265655517578125,
0.007068634033203125,
-0.035919189453125,
0.05859375,
-0.006435394287109375,
0.0096282958984375,
0.01554107666015625,
0.00867462158203125,
-0.041748046875,
-0.0184783935546875,
-0.017242431640625,
-0.025634765625,
-0.01157379150390625,
-0.040496826171875,
0.055908203125,
0.00949859619140625,
0.0275421142578125,
0.0171661376953125,
0.0124664306640625,
-0.005603790283203125,
-0.01117706298828125,
0.037567138671875,
0.0163116455078125,
-0.004833221435546875,
0.0145416259765625,
-0.01387786865234375,
0.01430511474609375,
0.0247344970703125,
-0.03643798828125,
0.0232696533203125,
0.0022125244140625,
0.0089111328125,
-0.0109100341796875,
-0.01055145263671875,
-0.002407073974609375,
-0.0010356903076171875,
0.005126953125,
0.002574920654296875,
-0.01529693603515625,
0.01427459716796875,
0.0201263427734375,
-0.00206756591796875,
-0.0019054412841796875,
-0.00246429443359375,
-0.0264434814453125,
0.028778076171875,
0.0183258056640625,
-0.004055023193359375,
0.004230499267578125,
-0.01031494140625,
0.0216217041015625,
-0.00969696044921875,
0.00923919677734375,
0.044952392578125,
-0.005615234375,
-0.023681640625,
0.042816162109375,
-0.0268402099609375,
-0.053497314453125,
0.037017822265625,
0.01024627685546875,
0.038787841796875,
-0.001300811767578125,
0.01432037353515625,
0.05560302734375,
0.034210205078125,
-0.046875,
0.06494140625,
-0.0276336669921875,
-0.045684814453125,
0.007625579833984375,
-0.01035308837890625,
-0.019317626953125,
0.00901031494140625,
0.01186370849609375,
0.021240234375,
-0.005825042724609375,
0.0178985595703125,
-0.02337646484375,
0.0014047622680664062,
-0.006618499755859375,
0.0177459716796875,
0.0011339187622070312,
0.057708740234375,
0.02288818359375,
0.0491943359375,
-0.05621337890625,
-0.0018186569213867188,
-0.0168304443359375,
-0.0294342041015625,
0.002349853515625,
0.006771087646484375,
-0.00403594970703125,
-0.01470947265625,
-0.0005822181701660156,
-0.038848876953125,
-0.0026531219482421875,
0.0447998046875,
0.08184814453125,
-0.01155853271484375,
0.01168060302734375,
-0.00942230224609375,
0.09515380859375,
0.0210418701171875,
-0.05322265625,
-0.00616455078125,
0.02545166015625,
0.04730224609375,
-0.022247314453125,
-0.0079345703125,
0.0205230712890625,
-0.0164947509765625,
0.01953125,
0.03765869140625,
0.039031982421875,
0.039703369140625,
0.02545166015625,
0.016143798828125,
0.0299072265625,
-0.05780029296875,
0.0265350341796875,
-0.0215911865234375,
0.0192718505859375,
0.059967041015625,
-0.00615692138671875,
0.0038013458251953125,
0.0291900634765625,
0.030670166015625,
0.003887176513671875,
0.028656005859375,
-0.00725555419921875,
0.0244140625,
-0.01479339599609375,
0.004985809326171875,
-0.004398345947265625,
-0.0166473388671875,
-0.00308990478515625,
-0.015106201171875,
0.0220794677734375,
0.049835205078125,
0.05755615234375,
0.06768798828125,
-0.06207275390625,
0.0233154296875,
0.018096923828125,
0.10546875,
0.01114654541015625,
0.018524169921875,
0.013916015625,
0.01184844970703125,
-0.02349853515625,
-0.007598876953125,
0.0210418701171875,
0.004573822021484375,
0.0269317626953125,
0.00555419921875,
-0.0282745361328125,
0.007259368896484375,
0.009002685546875,
-0.0723876953125,
-0.0024051666259765625,
0.06524658203125,
-0.00047588348388671875,
0.04229736328125,
0.0280303955078125,
0.06707763671875,
0.0216522216796875,
0.0252685546875,
-0.01513671875,
0.022003173828125,
0.0220184326171875,
-0.037841796875,
0.0248870849609375,
-0.0212554931640625,
0.04644775390625,
0.06439208984375,
-0.0076141357421875,
0.009857177734375,
-0.0003418922424316406,
-0.005786895751953125,
0.005184173583984375,
-0.0139617919921875,
-0.0306549072265625,
-0.01100921630859375,
-0.08251953125,
-0.01377105712890625,
0.032073974609375,
0.08172607421875,
0.0167694091796875,
-0.0290069580078125,
0.0247344970703125,
0.062347412109375,
-0.0831298828125,
-0.12939453125,
0.03826904296875,
-0.0224609375,
-0.0026073455810546875,
-0.0270538330078125,
0.005733489990234375,
-0.0135345458984375,
-0.0211029052734375,
-0.0049285888671875,
0.0186614990234375,
0.0159454345703125,
-0.037445068359375,
0.0222625732421875,
-0.0555419921875,
0.01280975341796875,
-0.00884246826171875,
0.016265869140625,
0.0142059326171875,
0.021820068359375,
0.0165557861328125,
-0.02960205078125,
0.0386962890625,
0.078125,
-0.0158538818359375,
0.0015993118286132812,
0.0325927734375,
-0.01006317138671875,
0.034759521484375,
0.0180816650390625,
-0.062042236328125,
0.013580322265625,
-0.003932952880859375,
-0.043365478515625,
0.0163116455078125,
0.0278167724609375,
0.02801513671875,
0.0197296142578125,
-0.0219573974609375,
0.06756591796875,
0.036224365234375,
-0.004642486572265625,
-0.054473876953125,
-0.0015735626220703125,
-0.04937744140625,
0.0276947021484375,
0.04010009765625,
-0.0037631988525390625,
-0.0217132568359375,
0.0423583984375,
0.021270751953125,
0.0243377685546875,
0.00637054443359375,
-0.0160064697265625,
0.0296630859375,
0.0201263427734375,
0.04315185546875,
-0.01806640625,
0.01239013671875,
-0.01776123046875,
0.026031494140625,
0.009429931640625,
0.026519775390625,
0.0016202926635742188,
0.01110076904296875,
-0.03631591796875,
-0.03338623046875,
0.0460205078125,
-0.03204345703125,
0.0174407958984375,
-0.047698974609375,
-0.0301971435546875,
-0.035858154296875,
0.07061767578125,
-0.0477294921875,
-0.002597808837890625,
-0.007778167724609375,
0.003337860107421875,
-0.007266998291015625,
-0.0261383056640625,
-0.050689697265625,
-0.01407623291015625,
-0.06427001953125,
0.0003871917724609375,
-0.0056304931640625,
-0.041534423828125,
-0.01934814453125,
-0.02490234375,
-0.042877197265625,
-0.0207061767578125,
0.024627685546875,
0.0035686492919921875,
0.03411865234375,
-0.0031185150146484375,
0.00543975830078125,
0.0023288726806640625,
-0.02593994140625,
-0.006439208984375,
-0.07080078125,
-0.010986328125,
0.032745361328125,
0.0218353271484375,
-0.012420654296875,
-0.033660888671875,
0.0015058517456054688,
0.04254150390625,
0.00478363037109375,
0.049774169921875,
-0.0215301513671875,
-0.012359619140625,
-0.0218963623046875,
-0.0017528533935546875,
-0.0159454345703125,
-0.0228424072265625,
-0.01441192626953125,
0.0032806396484375,
-0.01239013671875,
0.019989013671875,
-0.0209808349609375,
-0.01174163818359375,
0.007404327392578125,
-0.03759765625,
-0.05157470703125,
-0.0325927734375,
0.0157318115234375,
-0.005107879638671875,
-0.0044097900390625,
0.0084686279296875,
-0.02105712890625,
-0.02099609375,
0.061492919921875,
0.0275726318359375,
0.01654052734375,
-0.01357269287109375,
0.0888671875,
0.008514404296875,
-0.041107177734375,
-0.024932861328125,
-0.038360595703125,
0.0215606689453125,
-0.0216217041015625,
0.039703369140625,
-0.00919342041015625,
-0.032928466796875,
0.101318359375,
-0.030303955078125,
-0.036590576171875,
0.007732391357421875,
0.011566162109375,
-0.0092926025390625,
-0.038726806640625,
0.01470184326171875,
-0.0465087890625,
0.050750732421875,
0.041351318359375,
-0.0050811767578125,
-0.047210693359375,
-0.0011453628540039062,
0.059844970703125,
-0.035858154296875,
0.045623779296875,
-0.0263214111328125,
-0.0374755859375,
0.0174407958984375,
0.0253448486328125,
-0.0187835693359375,
0.01470184326171875,
-0.01409912109375,
0.00630950927734375,
-0.03173828125,
0.01401519775390625,
-0.00731658935546875,
0.0386962890625,
-0.0299072265625,
0.051666259765625,
-0.02935791015625,
-0.00154876708984375,
-0.035980224609375,
-0.004642486572265625,
0.0095062255859375,
-0.01263427734375,
-0.05084228515625,
0.01268768310546875,
-0.00807952880859375,
0.021392822265625,
0.02392578125,
0.01198577880859375,
0.01139068603515625,
0.037017822265625,
0.033172607421875,
0.0100250244140625,
0.00969696044921875,
0.04901123046875,
0.002361297607421875,
0.00598907470703125,
0.0231170654296875,
-0.0250396728515625,
-0.0038890838623046875,
0.0626220703125,
-0.022491455078125,
0.03662109375,
-0.00991058349609375,
0.05859375,
0.031890869140625,
0.05279541015625,
0.01540374755859375,
-0.040496826171875,
-0.01123809814453125,
0.032958984375,
-0.0293731689453125,
-0.0269012451171875,
-0.007709503173828125,
0.02093505859375,
0.0233001708984375,
0.035400390625,
0.0079193115234375,
0.016815185546875,
0.0002315044403076172,
-0.035919189453125,
-0.0110015869140625,
0.039825439453125,
0.0235137939453125,
-0.0272216796875,
-0.0243988037109375,
0.0005440711975097656,
0.0615234375,
-0.003932952880859375,
0.02783203125,
-0.0028247833251953125,
0.031463623046875,
-0.0418701171875,
-0.003704071044921875,
-0.0027008056640625,
0.0087127685546875,
-0.0223846435546875,
-0.0377197265625,
-0.023345947265625,
0.005733489990234375,
0.004543304443359375,
0.0035552978515625,
-0.01332855224609375,
-0.0038242340087890625,
0.0005917549133300781,
0.052032470703125,
-0.0509033203125,
0.002216339111328125,
0.004520416259765625,
0.0005364418029785156,
0.0391845703125,
0.0019273757934570312,
-0.01453399658203125,
-0.005615234375,
-0.0404052734375,
-0.023895263671875,
0.007965087890625,
-0.035797119140625,
-0.027618408203125,
-0.032440185546875,
-0.034881591796875,
0.006389617919921875,
-0.016357421875,
-0.0007333755493164062,
-0.035888671875,
0.013916015625,
0.01348876953125,
-0.00020992755889892578,
-0.0245819091796875,
0.055206298828125,
-0.0013780593872070312,
0.0372314453125,
-0.0113525390625,
0.01250457763671875,
-0.0128936767578125,
-0.00345611572265625,
-0.007625579833984375,
-0.06549072265625,
-0.0447998046875,
0.0176849365234375,
-0.0129241943359375,
0.05218505859375,
0.00659942626953125,
-0.004978179931640625,
-0.0148468017578125,
-0.013458251953125,
-0.0005688667297363281,
-0.0258331298828125,
0.018341064453125,
-0.012939453125,
-0.0013446807861328125,
-0.01067352294921875,
-0.0309600830078125,
-0.00681304931640625,
-0.0027561187744140625,
0.018035888671875,
-0.006717681884765625,
-0.03289794921875,
-0.03326416015625,
0.0311279296875,
-0.01251983642578125,
0.0151214599609375,
0.045440673828125,
0.01546478271484375,
0.0262908935546875,
0.01454925537109375,
0.0195770263671875,
0.0020885467529296875,
-0.025726318359375,
0.005809783935546875,
0.0059661865234375,
0.0259552001953125,
-0.02410888671875,
-0.009674072265625,
0.01313018798828125,
-0.0249786376953125,
-0.037109375,
0.025787353515625,
0.02777099609375,
-0.0180816650390625,
-0.03515625,
0.0049591064453125,
-0.0167236328125,
-0.02789306640625,
0.0254364013671875,
-0.0009517669677734375,
0.00937652587890625,
-0.0164642333984375,
0.001529693603515625,
-0.030029296875,
-0.003963470458984375,
0.022613525390625,
0.00794219970703125,
-0.005523681640625,
0.066650390625,
-0.0158843994140625,
-0.0171356201171875,
-0.06427001953125,
0.0003833770751953125,
-0.027435302734375,
-0.02532958984375,
0.015228271484375,
0.006320953369140625,
-0.014739990234375,
-0.0814208984375,
0.004245758056640625,
-0.02734375,
-0.021453857421875,
0.0026416778564453125,
0.0210113525390625,
0.035369873046875,
0.050567626953125,
-0.002552032470703125,
-0.01131439208984375,
0.03009033203125,
-0.021087646484375,
-0.047882080078125,
-0.023193359375,
-0.01477813720703125,
0.0489501953125,
-0.028228759765625,
0.0306243896484375,
-0.04168701171875,
0.00521087646484375,
-0.0244140625,
-0.01265716552734375,
0.0408935546875,
-0.01690673828125,
-0.00679779052734375,
0.041717529296875,
0.06683349609375,
-0.0050201416015625,
0.0009889602661132812,
0.00994873046875,
-0.0188751220703125,
0.0058746337890625,
0.00846099853515625,
-0.0119781494140625,
-0.0218658447265625,
-0.006267547607421875,
-0.038970947265625,
0.03515625,
-0.00853729248046875,
0.0205078125,
0.0274505615234375,
0.003330230712890625,
-0.005947113037109375,
-0.00420379638671875,
-0.04052734375,
0.0579833984375,
-0.0201263427734375,
0.053863525390625,
-0.072265625,
-0.0210418701171875,
0.009552001953125,
0.048309326171875,
0.031707763671875,
-0.00299072265625,
-0.0247802734375,
-0.02587890625,
0.027587890625,
0.050750732421875,
0.006618499755859375,
0.02459716796875,
0.036865234375,
0.0614013671875,
0.07867431640625,
-0.01116943359375,
0.04681396484375,
-0.007110595703125,
-0.0022716522216796875,
0.057464599609375,
0.0269775390625,
0.047515869140625,
0.0260467529296875,
-0.0269317626953125,
-0.036590576171875,
0.00936126708984375,
0.037445068359375,
-0.006511688232421875,
0.0170745849609375,
0.036041259765625,
0.0738525390625,
-0.0767822265625,
-0.05010986328125,
-0.0311279296875,
0.050933837890625,
0.039794921875,
0.056488037109375,
0.029632568359375,
0.00791168212890625,
0.07183837890625,
-0.027435302734375,
0.02996826171875,
-0.006320953369140625,
-0.019683837890625,
0.00708770751953125,
-0.00867462158203125,
0.0179443359375,
-0.034637451171875,
0.0238494873046875,
0.0341796875,
0.0305023193359375,
-0.041473388671875,
-0.040252685546875,
0.0186920166015625,
0.006816864013671875,
-0.010528564453125,
-0.0004849433898925781,
-0.0237274169921875,
0.0288543701171875,
0.078369140625,
0.0028705596923828125,
0.0190887451171875,
0.0292510986328125,
-0.0004203319549560547,
-0.0072784423828125,
0.0000514984130859375,
-0.03680419921875,
0.0292510986328125,
-0.01849365234375,
0.017425537109375,
0.014251708984375,
0.04144287109375,
0.0105743408203125,
0.036834716796875,
-0.0275421142578125,
-0.003787994384765625,
0.005016326904296875,
0.0252227783203125,
-0.019561767578125,
0.0088348388671875,
-0.0221710205078125,
-0.06756591796875,
0.0040130615234375,
0.036407470703125,
0.07080078125,
0.03619384765625,
0.060028076171875,
0.01806640625,
0.00946044921875,
0.0281219482421875,
-0.0006947517395019531,
-0.014129638671875,
-0.0157623291015625,
0.01055908203125,
-0.0259246826171875,
0.0112152099609375,
-0.032958984375,
-0.00772857666015625,
0.027008056640625,
0.0008802413940429688,
0.006748199462890625,
0.0111846923828125,
0.01279449462890625,
-0.0300445556640625,
0.0262451171875,
-0.01593017578125,
0.02490234375,
0.024261474609375,
-0.07452392578125,
-0.02294921875,
0.00914764404296875,
-0.0853271484375,
0.033355712890625,
0.058258056640625,
-0.01387786865234375,
-0.019561767578125,
-0.00836181640625,
0.00543212890625,
0.0246429443359375,
-0.0251007080078125,
0.0160675048828125,
0.0518798828125,
0.0084991455078125,
0.035186767578125,
-0.0352783203125,
-0.0137481689453125,
0.0176239013671875,
0.0223388671875,
-0.003948211669921875,
0.0311431884765625,
-0.0031185150146484375,
0.006969451904296875,
-0.006343841552734375,
0.022247314453125,
-0.01503753662109375,
-0.0297393798828125,
0.0361328125,
-0.005939483642578125,
0.004993438720703125,
-0.007244110107421875,
0.0250701904296875,
-0.00921630859375,
0.0501708984375,
-0.030487060546875,
-0.0292816162109375,
-0.0124053955078125,
0.038787841796875,
-0.0221710205078125,
-0.033203125,
-0.02215576171875,
0.0230865478515625,
0.003910064697265625,
-0.050689697265625,
0.052398681640625,
0.0264129638671875,
0.0266265869140625,
0.035797119140625,
0.023162841796875,
-0.018280029296875,
0.051727294921875,
-0.057403564453125,
0.0972900390625,
0.057220458984375,
-0.01183319091796875,
0.001678466796875,
-0.0105743408203125,
-0.0234375,
-0.00037550926208496094,
0.02508544921875,
-0.03509521484375,
-0.0146484375,
0.0267791748046875,
-0.0052490234375,
-0.0185546875,
0.034759521484375,
0.0090484619140625,
0.00926971435546875,
-0.032562255859375,
0.003948211669921875,
-0.01593017578125,
0.0208587646484375,
-0.02471923828125,
0.0012674331665039062,
-0.006565093994140625,
-0.0029621124267578125,
0.023101806640625,
-0.0335693359375,
-0.01337432861328125,
-0.018585205078125,
-0.0130157470703125,
-0.0205230712890625,
-0.006702423095703125,
0.017913818359375,
-0.040863037109375,
-0.0182342529296875,
-0.02630615234375,
-0.07232666015625,
0.03802490234375,
0.032470703125,
-0.041259765625,
0.032867431640625,
-0.0267333984375,
-0.06927490234375,
-0.0015277862548828125,
0.024810791015625,
0.05078125,
-0.03826904296875,
-0.06072998046875,
0.0267333984375,
0.048431396484375,
0.055450439453125,
0.0189208984375,
0.005062103271484375,
0.05230712890625,
-0.00469207763671875,
-0.065673828125,
-0.08746337890625,
0.01812744140625,
-0.061065673828125,
-0.0066375732421875,
0.015838623046875,
0.007762908935546875,
0.0372314453125,
-0.0134124755859375,
-0.057281494140625,
0.04486083984375,
-0.00983428955078125,
-0.0294189453125,
-0.06500244140625,
0.018341064453125,
0.025177001953125,
-0.0181121826171875,
-0.026153564453125,
-0.0030918121337890625,
-0.04949951171875,
-0.01479339599609375,
0.0055084228515625,
0.022705078125,
0.0227508544921875,
0.028228759765625,
-0.05291748046875,
0.01361846923828125,
-0.0195465087890625,
0.0002644062042236328,
0.05029296875,
-0.055450439453125,
0.0228271484375,
-0.00586700439453125,
-0.08905029296875,
-0.040863037109375,
-0.02191162109375,
0.0501708984375,
-0.007472991943359375,
0.03399658203125,
-0.0631103515625,
-0.0231781005859375,
0.040069580078125,
0.08258056640625,
0.0259857177734375,
-0.02392578125,
-0.001583099365234375,
0.034820556640625,
-0.032012939453125,
-0.01212310791015625,
0.027740478515625,
-0.03570556640625,
-0.0157623291015625,
-0.03485107421875,
-0.0206756591796875,
-0.007720947265625,
0.01461029052734375,
-0.046722412109375,
-0.0068206787109375,
-0.0155792236328125,
-0.02972412109375,
-0.0169525146484375,
0.031890869140625,
0.06219482421875,
-0.0345458984375,
0.01403045654296875,
-0.0177001953125,
0.00948333740234375,
0.032989501953125,
-0.026275634765625,
-0.003292083740234375,
0.006412506103515625,
0.01020050048828125,
0.0012998580932617188,
0.02850341796875,
0.00257110595703125,
0.0203094482421875,
-0.01824951171875,
-0.0170440673828125,
0.0253143310546875,
0.0300445556640625,
0.01580810546875,
-0.06719970703125,
0.022552490234375,
0.016632080078125,
0.02459716796875,
0.031524658203125,
-0.009674072265625,
-0.01042938232421875,
0.049072265625,
0.0261077880859375,
-0.057464599609375,
0.03558349609375,
-0.044647216796875,
-0.0127105712890625,
0.00179290771484375,
-0.0263824462890625,
-0.057525634765625,
0.0269622802734375,
-0.020416259765625,
-0.00614166259765625,
0.020751953125
] |
6dad366d7945de677d7e9b2fc2273c2d93990557
|
Wordpress Stackexchange
Q: How to move existing Wordpress wp-content folder along with database to new server and new domain name? Running WP 3.5.1 on a LEMP stack (over at Linode) ...
I have a wp-content folder for a WP site along with a full backup of the database. The URL of the site was something like:
test.example.com
I want to get the site operational on my own server at:
test.mydomain.com
And once the site is finished and DNS changes take effect, I want to have the site URL be:
myclientsdomain.com
What is the preferred (and hopefully most straightforward way) of handling server moves and domain changes like this? I'm looking for a step-by-step answer, one that accounts for all the situations described above for both the files and database.
A: There's a pretty good step by step on moving WordPress in the Codex. It is what I follow when changing domains.
Moving the files is pretty straight-forward. It is the hard-coded references in the database that are tricky. However, serialized search and replace will take care of all database changes. I've used the Velvet Blues plugin in the past, but the Search and Replace script is pretty top-notch.
|
Q: How to move existing Wordpress wp-content folder along with database to new server and new domain name? Running WP 3.5.1 on a LEMP stack (over at Linode) ...
I have a wp-content folder for a WP site along with a full backup of the database. The URL of the site was something like:
test.example.com
I want to get the site operational on my own server at:
test.mydomain.com
And once the site is finished and DNS changes take effect, I want to have the site URL be:
myclientsdomain.com
What is the preferred (and hopefully most straightforward way) of handling server moves and domain changes like this? I'm looking for a step-by-step answer, one that accounts for all the situations described above for both the files and database.
A: There's a pretty good step by step on moving WordPress in the Codex. It is what I follow when changing domains.
Moving the files is pretty straight-forward. It is the hard-coded references in the database that are tricky. However, serialized search and replace will take care of all database changes. I've used the Velvet Blues plugin in the past, but the Search and Replace script is pretty top-notch.
A: I utilize the awesome plugin Duplicator to complete this exact procedure on a regular basis.
http://wordpress.org/extend/plugins/duplicator/
The plugin is fully supported and there are great FAQ available here:
http://lifeinthegrid.com/labs/duplicator/
The plugin will create a .zip backup of both your database and files and an installer .php that you will put into your new root directory. You simply enter your new database information and it does the rest.
Is probably my favorite WP plugin to date.
If you need help along the way, just let me know.
A: You will have a few things to consider (later on the answer), I suggest the following steps:
Backup your Files and Database
This is pretty self-explanatory. You are going to do a lot of Data Manipulation, so be sure your original is safe.
Transfer your files
The fastest way to do this is to have a hoster where you can import directories from another server. This can be done by providing the FTP-details, as well as defining the targetdirectory.
As Servers have a internetconnection that is usually a lot faster than the one that users have, this is the preferable way to transfer the data. You can also use your command line to execute those commands by hand.
The slower option is to generate a ZIP-file, download, upload to your new server and decompress it. If you do not have the possibility of doing that, take the slow path - donloading everything and uploading everything. And go for coffee while the files transfer :)
Transfer your Database
Again, a lot of hosters have the option of importing an existing database into a new one, even from another server (of course, your old server has to accept external data connections).
If you can do this, great, but you can also export/import your database.
Set the new (Sub-)Domain to your new directory
On your new server, be sure your Files are set up the same way as on the old one, and point your subdomain to the same directory it did on the old server (usually the WordPress root)
Edit the wp-config.php
Save the new wp-config.php. You just have to edit the Database Connection details.
Load the new URL
WordPress should be set up by now, but it still uses the old SiteURL and AdminURL, so you won't be able to log in.
Change those Values in the options-table in your new Database. The two Values you are looking for are siteurl and home. Place your new Domain there.
Check your Login and your Site
Now everything should work so far, you can login, edit and write, as well as use the site. The only Problem may be that your Posts still have the old URL for the images and attachments in them.
If your Posts contain the old URL, or if you are not sure, check your database in your posts-table.
You can do this by searching your Database directly, or using a Script like Serial Search and Replace. If you find your old URL, you will have to replace it manually or automatically. I prefer doing it automatically and checking for errors afterwards.
Check the other tables
Also check if your other Tables contain the old URL. This may be a bit tricky to replace, but it also has to be done to move your site completely.
Regenerate your Permalinks
Just to be sure, save your Permalink Settings again to create the Permalinks again.
Check your site
Please, do not forget to REALLY check your site after you transferred it. Check all the functions, especially AJAX-stuff, Contactforms, Maps, etc. as they are more likely to fail than plain PHP/HTML.
Time for Beer :)
Things to watch out for!!
As always, nothing that was created manually, transferred manually and edited automatically is failproof. Here are a few commen traps that are easy to step into, but can also be avoided easily.
*
*Badly coded Plugins (Saving your Website URL instead of the relative Path and using the WordPress Functions to retrieve the full URL. There can also be a lot of Problems with your AjaxURL.)
*Encoding Problems (Be absolutely sure that you use the same encoding on both your Servers and Databases!!! Usually, if you go with the recommended UTF-8, this should be okay)
*Serialized Data (This is the biggest Problem you may encounter. If you use a Plugin like Tablepress, where an entire Table is stored in a serialized Array, it will break as soon as you automatically replace something. If you have Data like that, look for an export/import function in this specific Plugins, and use this as an extra step. If they do not have this function, you have to do it by hand)
*Server Settings (It can easily happen that your Site does not run on your new server due to standard settings. Be sure to have enough resources available!)
*Hardcoded URLs in your Theme (although this should not happen, it happens far too often and breaks your Images and Links as soon as the old site is not available anymore)
*Caching Problems (Do not use the same Caching Files as you did on your old server. The best way would be to deactivate the caching before exporting the site, as well as empty all cachings)
*Assuming everything works when you change the settings for the second time on your server (always check everything again)
*Options in your Plugins and Theme (Old Emailadresses etc.)
That should be it. It looks like a lot to do, but actually most of it runs automatically. You just have to think about everything that CAN go wrong, and check if it did :)
Have Fun!
A: There is no need to use any plugins, scripts or even knwledge of sql. Simple notepad is enough to migration. You have to upload your all wordpress files to your new server and just change in your wp-config.php (in your main wordpress folder) 3 values:
define('DB_NAME', 'your_new_db_name');
define('DB_USER', 'your_db_username');
define('DB_PASSWORD', 'your_db_password');
Next, if you are using some mysql client like phpmyadmin on your current server, you must export your database to file, then open your_db_dump.sql in notepad, then find and replace all occurencies test.example.com with test.mydomain.com after that you have to import that db_dump to your new database (which you defined at wp-config.php). Thats all.
A: What I do is:
*
*Create a new database on the receiving host. Import the SQL file.
Run the following SQL queries on the new database:
UPDATE wp_options SET option_value = replace(option_value, 'test.example.com', 'test.mydomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'test.example.com', 'test.mydomain.com') WHERE meta_key = '_menu_item_url';
UPDATE wp_posts SET guid = replace(guid, 'test.example.com','test.mydomain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'test.example.com', 'test.mydomain.com');
*Upload the WordPress files to the receiving server.
*Upload the wp-content folder, overwriting the default WordPress
files.
*Set up your wp-config.php as normal, using the db name, user and
password from the database you created.
*Go to the Dashboard, and manually change any instances of
test.example.com in widgets (these can't be changed via SQL query
because they are serialized in the database).
*When the time comes to switch to myclientsdomain.com, perform the
above SQL queries and widget fixes again.
Depending on your theme and plugins, you may have additional changes to make in the database or Dashboard. These will have to be discovered yourself and changed as you find them.
Fair warning that it's not perfect and it can be a pain in the butt to move WordPress across domains. Another thing I have also seen done is to add the following to your wp-config file:
define('WP_HOME','http://'. $_SERVER['SERVER_NAME']);
define('WP_SITEURL','http://'. $_SERVER['SERVER_NAME']);
This will help the site work on whatever domain it is currently on, but you will still need to deal with hard-coded URLs in content, options and menus. I have not tested that myself and don't know if you need to remove the corresponding options from your database in order for them to work.
Update: I should have guessed there would be plugin to handle the database portion http://wordpress.org/extend/plugins/wp-migrate-db/
A: A previous answer had this, but here is a step by step with some other input:
*
*Do not install WP
*Ftp entire original WP directory to new directory (see below if missing anything)
*Import the sql with phpmyadmin at your server control panel.
*Ftp searchreplacedb.php to directory WP is in.
*Run searchreplacedb.php from your browser (delete after!!!)
*Take some time off and bill your client $75!
(searchreplacedb.php is available FREE at: interconnectit.com/products/search-and-replace-for-wordpress-databases ... they have instructions too).
If all you have is the WP contents folder you have another issue. You must get the rest of the WP install of the EXACT SAME VERSION. Search the db if you don't know what version WP is. It is easy to download old versions online. Get it all in the right place as before, all using ftp to set the new folders up, if you want it to just pop up as it looked before. Do not visit the site after uploading the db and WP stuff if you are missing anything or it will default to the stock theme or turn plugins off. I've lost plugin settings and had to do it all over so just think and go slow.
If you already have a sub folder or addon, or the new site will need one, plan ahead. Don’t just replace the url before taking into account the needed new folder or lack of new one. You might need to run searchreplacedb for 'folder/url' before going back for 'url', etc. Otherwise you might mess up an 'addon' changing to a 'root display with sub directory install' or other such nonsense!
If the new structure matches the old structure and you have the whole WP directory you can do it easier and faster than reading this post! Put the program in the same directory you have WP uploaded to for best results, as the instruction say, as it has an autoconfig.
If you do not have ftp access or controlpanel access or sql access you really need a better server and might be out of luck.
Try the search and replace recommended in other posts and if you are lucky, have an older version of WP and it fits into the needed parameters it will work; a real pain of a way to play Russian roulette with your site.
Also, don't ever edit data in notepad unless you know there are no strings longer than it will accept. Now there's a nice error you may spend weeks looking for! If you have to look at it, only look, don't save it. You should forget notepad exists and use notepad++, but manually editing serialized data in a text editor is as bad as trying to do a find and replace in phpmyadmin; don't do it.
You could search "sql serialized data". The short answer is that find and replace will pie serialized data in an sql. WP db’s have serialized data…more so nowadays.
I did this too many times and had marginal success and beat my head on a wall many times before I finally researched it properly. It is now a walk in the park.
A: I've moved a number of sites from one server/domain to another in this way, and all you usually need is a backup and your wp-content folder, which you seem to have. Here's the method I follow:
*
*Install Wordpress on the new site. You can use any method you like for this, some hosts offer one-click installs, otherwise just go ahead and do this as per your preferred method.
*Overwrite the wp-content folder with the copy you have. This ensures all your plugins, uploaded files etc are per your older server.
*Overwrite the database with the copy you have. I usually do this using phpMyAdmin with the Import facility. One thing to watch out for here is that if your backup doesn't include DROP statements you'll need to delete all the tables in the database first.
*If you're changing the domain name, you'll need to Browse your wp_options table in phpMyAdmin and update your "site_url" option. There's another option called "home" that you can update, but you don't have to do this as this can be changed in WordPress admin once your site is operational.
Done!
This should be all you need to do to get your site up and running. Once it's operational it would be prudent to check any plugin/theme specific settings that may reference your old site and regenerate your permalinks.
|
wordpress
|
{
"language": "en",
"length": 2283,
"provenance": "stackexchange_00019.jsonl.gz:428950",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85449"
}
|
[
0.04022216796875,
-0.01316070556640625,
-0.01245880126953125,
-0.0148162841796875,
-0.0024318695068359375,
-0.03851318359375,
0.04608154296875,
-0.01219940185546875,
0.03070068359375,
0.005199432373046875,
-0.01337432861328125,
-0.021759033203125,
0.0094451904296875,
-0.047149658203125,
-0.0030345916748046875,
-0.0235443115234375,
0.04583740234375,
-0.046783447265625,
0.024871826171875,
-0.0038852691650390625,
0.012298583984375,
0.0191497802734375,
0.0406494140625,
0.0273895263671875,
0.03790283203125,
-0.052093505859375,
0.0784912109375,
-0.0193634033203125,
0.03619384765625,
-0.01012420654296875,
0.038787841796875,
-0.035400390625,
-0.0016422271728515625,
0.0181884765625,
0.003993988037109375,
-0.00849151611328125,
0.039337158203125,
0.002361297607421875,
0.0244903564453125,
0.023162841796875,
0.042999267578125,
-0.0294036865234375,
0.047882080078125,
0.006305694580078125,
0.038482666015625,
-0.047332763671875,
0.053192138671875,
-0.0897216796875,
0.0213470458984375,
-0.0144500732421875,
-0.0024852752685546875,
0.045440673828125,
0.0006327629089355469,
-0.052093505859375,
-0.0027141571044921875,
-0.00788116455078125,
-0.0086822509765625,
0.0097198486328125,
0.015350341796875,
0.002468109130859375,
-0.00592041015625,
0.0168304443359375,
0.00832366943359375,
0.01464080810546875,
-0.0268096923828125,
0.01285552978515625,
0.0239715576171875,
-0.005748748779296875,
-0.0714111328125,
-0.0265960693359375,
0.03790283203125,
-0.0146942138671875,
0.006649017333984375,
-0.036651611328125,
0.0268707275390625,
0.0273284912109375,
-0.01155853271484375,
0.005100250244140625,
0.0133819580078125,
0.0164337158203125,
0.0191650390625,
0.0028934478759765625,
0.0311431884765625,
-0.07769775390625,
0.057373046875,
-0.031494140625,
-0.003246307373046875,
-0.01006317138671875,
-0.01329803466796875,
-0.00112152099609375,
-0.0223541259765625,
0.025543212890625,
-0.012664794921875,
0.003223419189453125,
-0.030242919921875,
0.0012722015380859375,
0.0015592575073242188,
0.016693115234375,
-0.0220184326171875,
0.01515960693359375,
-0.011871337890625,
-0.0147247314453125,
0.017578125,
-0.0125579833984375,
-0.006282806396484375,
0.0154266357421875,
0.0032939910888671875,
-0.042572021484375,
0.0160369873046875,
0.00843048095703125,
-0.030242919921875,
0.00543212890625,
-0.006092071533203125,
0.000046193599700927734,
-0.007659912109375,
0.0175323486328125,
-0.03729248046875,
0.0256195068359375,
-0.015655517578125,
0.03192138671875,
-0.0238189697265625,
0.01018524169921875,
-0.0712890625,
-0.02178955078125,
0.0176239013671875,
-0.0250244140625,
0.0006799697875976562,
0.05609130859375,
-0.04888916015625,
0.02484130859375,
-0.0260467529296875,
0.013916015625,
0.062164306640625,
0.05078125,
0.01172637939453125,
-0.018524169921875,
0.03961181640625,
-0.013763427734375,
0.007762908935546875,
0.003879547119140625,
0.01477813720703125,
-0.0279693603515625,
-0.029205322265625,
-0.00980377197265625,
0.0369873046875,
0.04266357421875,
0.029998779296875,
0.006412506103515625,
-0.01081085205078125,
-0.053253173828125,
0.0242156982421875,
0.005794525146484375,
0.049530029296875,
-0.004886627197265625,
-0.008270263671875,
-0.05682373046875,
0.01128387451171875,
-0.058746337890625,
0.0222015380859375,
-0.056549072265625,
-0.0225372314453125,
0.007686614990234375,
0.0538330078125,
-0.0195159912109375,
-0.0177154541015625,
-0.0182342529296875,
-0.040557861328125,
-0.007080078125,
0.0146942138671875,
0.0214691162109375,
-0.0494384765625,
-0.00203704833984375,
0.00853729248046875,
-0.01120758056640625,
-0.0158233642578125,
0.03271484375,
0.00980377197265625,
-0.002834320068359375,
0.013885498046875,
0.08819580078125,
0.0225830078125,
-0.0285491943359375,
0.03436279296875,
-0.00738525390625,
-0.01580810546875,
-0.00807952880859375,
0.022369384765625,
0.0124359130859375,
-0.01239013671875,
0.0188751220703125,
0.023651123046875,
0.0261077880859375,
-0.0248260498046875,
0.025482177734375,
-0.0176849365234375,
-0.00736236572265625,
-0.016998291015625,
0.02880859375,
-0.023712158203125,
-0.0230865478515625,
-0.06134033203125,
0.0347900390625,
-0.00560760498046875,
0.053436279296875,
0.01428985595703125,
0.0279541015625,
-0.008026123046875,
0.028900146484375,
0.048980712890625,
0.00037980079650878906,
0.00015819072723388672,
0.039886474609375,
-0.017730712890625,
-0.07305908203125,
-0.061981201171875,
0.0193328857421875,
-0.025634765625,
-0.0058746337890625,
-0.02386474609375,
0.0357666015625,
-0.021636962890625,
-0.01171112060546875,
-0.043487548828125,
-0.0069427490234375,
0.004261016845703125,
-0.0191650390625,
-0.033355712890625,
-0.0223388671875,
-0.01343536376953125,
-0.00717926025390625,
-0.017730712890625,
0.047637939453125,
0.01326751708984375,
0.01561737060546875,
-0.01554107666015625,
-0.0013790130615234375,
0.0178985595703125,
-0.06488037109375,
0.0248260498046875,
0.043731689453125,
0.0233001708984375,
0.01268768310546875,
-0.01922607421875,
-0.0006694793701171875,
0.033538818359375,
-0.0241241455078125,
0.0140380859375,
0.0012645721435546875,
0.0209808349609375,
0.072021484375,
-0.0025005340576171875,
-0.01482391357421875,
0.00835418701171875,
-0.036529541015625,
-0.02105712890625,
0.044525146484375,
-0.033477783203125,
-0.02020263671875,
-0.0097808837890625,
-0.0092620849609375,
0.0278472900390625,
0.004459381103515625,
-0.0189666748046875,
-0.0017910003662109375,
-0.01349639892578125,
0.0229644775390625,
0.0291290283203125,
0.0312042236328125,
-0.0033283233642578125,
0.00354766845703125,
0.0019216537475585938,
-0.0165863037109375,
0.01690673828125,
0.051300048828125,
-0.0002830028533935547,
0.03253173828125,
-0.002010345458984375,
-0.031707763671875,
0.01123046875,
0.041473388671875,
-0.0203094482421875,
0.00263214111328125,
-0.0208740234375,
-0.004070281982421875,
-0.01107025146484375,
-0.01312255859375,
0.0220184326171875,
0.0258636474609375,
-0.039520263671875,
-0.045166015625,
0.0022106170654296875,
0.023345947265625,
-0.039031982421875,
0.033538818359375,
0.0377197265625,
-0.025115966796875,
0.07275390625,
-0.0207977294921875,
0.01439666748046875,
-0.01291656494140625,
0.03973388671875,
0.05084228515625,
0.0251007080078125,
-0.03704833984375,
-0.00928497314453125,
0.035858154296875,
0.01275634765625,
-0.0093231201171875,
-0.019378662109375,
0.002155303955078125,
-0.08612060546875,
-0.0550537109375,
0.031524658203125,
-0.0220947265625,
0.0242919921875,
-0.01462554931640625,
-0.0122833251953125,
0.00983428955078125,
-0.0909423828125,
-0.08612060546875,
-0.06292724609375,
-0.0330810546875,
-0.0295562744140625,
0.05108642578125,
-0.01763916015625,
0.015655517578125,
0.0703125,
0.01329803466796875,
0.044921875,
-0.0243682861328125,
-0.0712890625,
-0.031951904296875,
-0.0841064453125,
-0.0234222412109375,
0.00025081634521484375,
0.005779266357421875,
0.01557159423828125,
-0.0281829833984375,
-0.006103515625,
-0.0408935546875,
0.0011701583862304688,
0.07977294921875,
-0.00836181640625,
-0.018798828125,
0.035491943359375,
-0.059539794921875,
0.0000030994415283203125,
-0.01357269287109375,
0.0772705078125,
0.03411865234375,
-0.01788330078125,
0.00681304931640625,
0.002651214599609375,
0.0298004150390625,
0.005634307861328125,
-0.05194091796875,
0.006763458251953125,
0.0060272216796875,
-0.053314208984375,
-0.0535888671875,
-0.0185394287109375,
0.036865234375,
-0.0095672607421875,
0.004199981689453125,
-0.0069122314453125,
-0.0367431640625,
0.01751708984375,
0.0007987022399902344,
0.023223876953125,
0.027130126953125,
0.005634307861328125,
0.036285400390625,
-0.0084075927734375,
-0.0236053466796875,
-0.02099609375,
-0.020416259765625,
0.029876708984375,
-0.026275634765625,
-0.002529144287109375,
0.00299072265625,
-0.0028476715087890625,
-0.006561279296875,
0.0198974609375,
-0.014404296875,
-0.08026123046875,
0.061920166015625,
-0.037994384765625,
0.0154266357421875,
-0.0721435546875,
-0.045318603515625,
-0.01308441162109375,
0.1285400390625,
-0.0307159423828125,
-0.006366729736328125,
0.01541900634765625,
-0.0007038116455078125,
0.01377105712890625,
0.0236663818359375,
-0.07012939453125,
-0.022216796875,
-0.0288848876953125,
-0.0287322998046875,
-0.01983642578125,
-0.030517578125,
0.003971099853515625,
-0.039337158203125,
-0.0019092559814453125,
-0.035430908203125,
0.04119873046875,
-0.0287933349609375,
0.03765869140625,
-0.0214691162109375,
0.0212554931640625,
-0.05316162109375,
-0.0197296142578125,
-0.01108551025390625,
-0.07421875,
-0.012115478515625,
-0.02069091796875,
0.058837890625,
0.018402099609375,
-0.01456451416015625,
-0.0313720703125,
0.0284271240234375,
-0.017547607421875,
0.046112060546875,
-0.01000213623046875,
0.006183624267578125,
0.01528167724609375,
0.006847381591796875,
0.01499176025390625,
-0.00838470458984375,
-0.016693115234375,
-0.06402587890625,
-0.0221405029296875,
-0.0257110595703125,
-0.03448486328125,
0.01690673828125,
-0.03375244140625,
0.010101318359375,
-0.0203704833984375,
-0.00812530517578125,
-0.050048828125,
-0.003704071044921875,
-0.0335693359375,
-0.013519287109375,
0.0015954971313476562,
-0.049041748046875,
0.04083251953125,
-0.042938232421875,
-0.0243377685546875,
0.00914764404296875,
0.0595703125,
0.022247314453125,
-0.0020008087158203125,
-0.019439697265625,
-0.032318115234375,
0.0183868408203125,
0.00630950927734375,
0.021087646484375,
0.006557464599609375,
-0.005741119384765625,
0.041595458984375,
0.0010118484497070312,
-0.006237030029296875,
0.00482177734375,
-0.0172119140625,
0.0193328857421875,
-0.026397705078125,
-0.004119873046875,
0.006134033203125,
0.0217132568359375,
0.041961669921875,
-0.007045745849609375,
-0.0169677734375,
-0.0286712646484375,
0.0200347900390625,
-0.01287841796875,
0.01078033447265625,
-0.03985595703125,
-0.057403564453125,
0.0223236083984375,
-0.031158447265625,
-0.0037593841552734375,
0.0013256072998046875,
-0.002689361572265625,
0.027008056640625,
0.0175628662109375,
-0.0250091552734375,
0.0030727386474609375,
-0.0009660720825195312,
0.01678466796875,
0.02178955078125,
0.003040313720703125,
-0.0139007568359375,
-0.008056640625,
-0.0176544189453125,
0.0880126953125,
0.014312744140625,
-0.06427001953125,
0.018829345703125,
-0.0098724365234375,
0.025360107421875,
0.03240966796875,
-0.0261077880859375,
0.0233306884765625,
0.0198974609375,
-0.030975341796875,
0.004291534423828125,
-0.0197296142578125,
-0.01181793212890625,
-0.043914794921875,
-0.010101318359375,
-0.005565643310546875,
-0.0192718505859375,
0.032379150390625,
-0.00789642333984375,
-0.03131103515625,
0.0138702392578125,
-0.0009059906005859375,
0.0129547119140625,
0.017486572265625,
0.0308837890625,
0.0005030632019042969,
0.0004153251647949219,
0.0202178955078125,
-0.005344390869140625,
0.02996826171875,
-0.0222015380859375,
0.00955963134765625,
0.0191650390625,
0.05047607421875,
-0.0093994140625,
-0.0259246826171875,
0.01158905029296875,
-0.0362548828125,
-0.0068511962890625,
0.0227203369140625,
-0.013946533203125,
-0.039306640625,
0.00508880615234375,
0.004608154296875,
0.025421142578125,
-0.018768310546875,
0.004093170166015625,
-0.004802703857421875,
-0.0312347412109375,
-0.017486572265625,
0.00167083740234375,
-0.0017070770263671875,
-0.03839111328125,
-0.04510498046875,
-0.01110076904296875,
-0.0270233154296875,
0.00450897216796875,
-0.007415771484375,
0.0038776397705078125,
-0.027923583984375,
-0.029815673828125,
0.0498046875,
-0.004505157470703125,
0.0167083740234375,
-0.0280914306640625,
-0.014892578125,
-0.0362548828125,
0.0126800537109375,
0.010467529296875,
-0.0262298583984375,
-0.0245819091796875,
-0.0002841949462890625,
-0.0352783203125,
0.00106048583984375,
0.02716064453125,
-0.038970947265625,
-0.01033782958984375,
-0.0283203125,
-0.0014238357543945312,
-0.032684326171875,
0.0030002593994140625,
-0.0265655517578125,
-0.0382080078125,
0.021881103515625,
0.0413818359375,
-0.08782958984375,
-0.0027942657470703125,
0.03143310546875,
-0.007091522216796875,
0.033905029296875,
0.0006403923034667969,
0.0117340087890625,
0.0065765380859375,
-0.0257110595703125,
0.004638671875,
-0.044219970703125,
-0.017913818359375,
-0.0210113525390625,
-0.0316162109375,
0.05224609375,
0.06048583984375,
-0.00547027587890625,
0.0078277587890625,
-0.0297393798828125,
-0.0005030632019042969,
-0.0306854248046875,
0.054656982421875,
-0.053314208984375,
0.0275421142578125,
-0.035369873046875,
-0.008941650390625,
0.05279541015625,
-0.01322174072265625,
0.0193634033203125,
-0.0194244384765625,
-0.0156402587890625,
-0.01953125,
0.0299530029296875,
-0.004314422607421875,
0.0084991455078125,
0.05267333984375,
0.004364013671875,
0.0408935546875,
0.0003020763397216797,
0.012481689453125,
0.01268768310546875,
-0.0616455078125,
0.004520416259765625,
0.005916595458984375,
0.014312744140625,
-0.004680633544921875,
0.0186614990234375,
0.04119873046875,
-0.00818634033203125,
0.03985595703125,
0.032073974609375,
0.04168701171875,
-0.04974365234375,
0.0014324188232421875,
-0.005126953125,
-0.052276611328125,
0.015777587890625,
0.00646209716796875,
-0.007396697998046875,
-0.002899169921875,
-0.03692626953125,
0.00852203369140625,
-0.04461669921875,
-0.033721923828125,
0.0153961181640625,
-0.006977081298828125,
0.0074462890625,
0.025390625,
0.01194000244140625,
-0.0275421142578125,
0.0063629150390625,
0.0271759033203125,
0.0165252685546875,
-0.0253753662109375,
0.026092529296875,
0.03265380859375,
-0.00624847412109375,
-0.04119873046875,
0.04730224609375,
0.00023376941680908203,
-0.0141448974609375,
-0.0219879150390625,
0.00829315185546875,
0.02508544921875,
0.053741455078125,
-0.0226287841796875,
0.0010471343994140625,
0.0226287841796875,
0.0178375244140625,
-0.00319671630859375,
0.00392913818359375,
0.04205322265625,
-0.01277923583984375,
-0.0504150390625,
0.015625,
-0.0460205078125,
-0.0241546630859375,
-0.0038127899169921875,
-0.02545166015625,
0.052764892578125,
-0.0504150390625,
0.00014543533325195312,
0.01898193359375,
-0.008697509765625,
-0.004886627197265625,
0.0038242340087890625,
0.03265380859375,
-0.04302978515625,
-0.051361083984375,
0.01345062255859375,
-0.0654296875,
-0.0244903564453125,
-0.0249786376953125,
-0.057373046875,
0.10748291015625,
-0.011749267578125,
0.02166748046875,
0.034149169921875,
0.050262451171875,
-0.068115234375,
0.00841522216796875,
-0.03668212890625,
0.05084228515625,
-0.0144500732421875,
0.0211334228515625,
-0.06646728515625,
0.0066986083984375,
-0.003978729248046875,
0.0176239013671875,
0.060882568359375,
0.00858306884765625,
-0.02740478515625,
0.0128173828125,
0.054290771484375,
0.01132965087890625,
-0.00550079345703125,
0.049468994140625,
-0.0496826171875,
0.006744384765625,
-0.01169586181640625,
-0.031158447265625,
0.0142059326171875,
0.0033416748046875,
-0.07861328125,
-0.0296783447265625,
0.01490020751953125,
0.0107574462890625,
-0.002704620361328125,
-0.00664520263671875,
-0.01983642578125,
0.00110626220703125,
0.0279693603515625,
-0.025482177734375,
0.007770538330078125,
-0.01338958740234375,
-0.01279449462890625,
-0.004711151123046875,
0.051727294921875,
-0.021820068359375,
0.031524658203125,
-0.0010318756103515625,
0.041412353515625,
0.02593994140625,
0.022430419921875,
0.03717041015625,
-0.016204833984375,
0.01464080810546875,
0.01605224609375,
-0.02862548828125,
0.083251953125,
0.0675048828125,
0.03009033203125,
0.000762939453125,
0.00516510009765625,
0.023284912109375,
0.0889892578125,
-0.04473876953125,
-0.01165008544921875,
0.0130462646484375,
-0.0181884765625,
-0.004848480224609375,
-0.0291595458984375,
0.00780487060546875,
-0.0283050537109375,
-0.042724609375,
-0.0293731689453125,
-0.0090179443359375,
0.0224456787109375,
-0.0008602142333984375,
-0.000015676021575927734,
0.03253173828125,
0.0012645721435546875,
-0.0038127899169921875,
-0.021331787109375,
0.02252197265625,
0.00835418701171875,
0.006999969482421875,
-0.0261077880859375,
0.0572509765625,
-0.00714874267578125,
0.00861358642578125,
0.006500244140625,
0.01560211181640625,
-0.0100250244140625,
-0.014068603515625,
-0.05450439453125,
-0.074462890625,
0.02911376953125,
0.062347412109375,
-0.01206207275390625,
0.0418701171875,
0.026763916015625,
0.041961669921875,
-0.009063720703125,
-0.00860595703125,
0.04302978515625,
-0.011810302734375,
0.05157470703125,
-0.0343017578125,
0.039398193359375,
0.0058746337890625,
-0.0024585723876953125,
-0.047943115234375,
0.02191162109375,
0.052764892578125,
-0.0018968582153320312,
0.007404327392578125,
0.002544403076171875,
-0.0267791748046875,
0.057037353515625,
-0.0013399124145507812,
0.059600830078125,
0.0197906494140625,
-0.0430908203125,
-0.035064697265625,
0.01099395751953125,
0.0269622802734375,
-0.014007568359375,
0.0294647216796875,
0.036468505859375,
-0.006359100341796875,
-0.0201416015625,
-0.03314208984375,
-0.041839599609375,
0.048004150390625,
0.0121612548828125,
0.024139404296875,
0.012939453125,
0.0105438232421875,
-0.0277557373046875,
-0.0321044921875,
-0.0019474029541015625,
0.060546875,
0.0181732177734375,
0.08807373046875,
-0.046783447265625,
0.019561767578125,
-0.00611114501953125,
-0.01058197021484375,
0.0234222412109375,
-0.008636474609375,
-0.005207061767578125,
0.0195770263671875,
0.032257080078125,
-0.023681640625,
-0.006439208984375,
0.004917144775390625,
0.0240936279296875,
-0.031341552734375,
-0.022796630859375,
-0.022216796875,
0.027618408203125,
0.0211181640625,
-0.01406097412109375,
-0.043670654296875,
-0.0560302734375,
-0.017669677734375,
0.0160064697265625,
-0.006839752197265625,
-0.020538330078125,
-0.0333251953125,
0.05810546875,
0.0218505859375,
-0.00719451904296875,
0.029388427734375,
-0.052093505859375,
0.052276611328125,
0.04510498046875,
-0.00440216064453125,
-0.059478759765625,
0.03955078125,
-0.017181396484375,
0.01102447509765625,
-0.00943756103515625,
0.09161376953125,
0.0159149169921875,
-0.04681396484375,
-0.0302581787109375,
-0.0283050537109375,
-0.01000213623046875,
-0.03369140625,
0.003002166748046875,
-0.0293731689453125,
0.00774383544921875,
0.0006885528564453125,
-0.040283203125,
-0.0443115234375,
-0.0166015625,
0.0016613006591796875,
0.0160675048828125,
0.0013427734375,
-0.038970947265625,
-0.034576416015625,
-0.00909423828125,
0.038848876953125,
0.01214599609375,
-0.047760009765625,
0.033233642578125,
-0.0313720703125,
-0.009033203125,
-0.0010967254638671875,
0.013519287109375,
-0.028533935546875,
0.01788330078125,
-0.0266265869140625,
-0.08685302734375,
-0.05560302734375,
0.06524658203125,
-0.07513427734375,
0.0182952880859375,
0.03045654296875,
-0.0221710205078125,
0.022796630859375,
-0.0283660888671875,
-0.006168365478515625,
0.027801513671875,
-0.01357269287109375,
-0.0034465789794921875,
0.03692626953125,
-0.024658203125,
-0.03411865234375,
-0.0181427001953125,
0.004425048828125,
-0.026092529296875,
-0.0174713134765625,
0.0005822181701660156,
0.00212860107421875,
0.0137481689453125,
-0.032745361328125,
-0.06298828125,
-0.004795074462890625,
0.0098114013671875,
-0.034820556640625,
-0.030914306640625,
-0.029327392578125,
-0.01220703125,
0.01419830322265625,
-0.019317626953125,
-0.01139068603515625,
-0.030853271484375,
0.04052734375,
0.0150604248046875,
0.07867431640625,
-0.02288818359375,
0.031341552734375,
-0.0006299018859863281,
0.035186767578125,
0.0138702392578125,
0.0272979736328125,
0.0262298583984375,
0.0068511962890625,
0.0185699462890625,
0.06396484375,
-0.0012311935424804688,
-0.0245361328125,
-0.0205078125,
-0.08905029296875,
-0.0207672119140625,
-0.0106048583984375,
-0.0101470947265625,
0.0000508427619934082,
0.090576171875,
0.044891357421875,
0.01134490966796875,
-0.034881591796875,
-0.03717041015625,
-0.02117919921875,
0.015625,
-0.0194091796875,
0.006320953369140625,
-0.06732177734375,
-0.01251220703125,
0.01381683349609375,
-0.01183319091796875,
0.0019054412841796875,
-0.01457977294921875,
-0.0264739990234375,
0.007602691650390625,
0.026123046875,
0.005832672119140625,
-0.039154052734375,
-0.0256195068359375,
0.0909423828125,
-0.035858154296875,
0.0289154052734375,
0.00922393798828125,
0.025146484375,
0.046112060546875,
-0.017974853515625,
0.0276336669921875,
0.00225067138671875,
-0.038818359375,
0.0213775634765625,
0.01248931884765625,
0.0128173828125,
-0.039581298828125,
-0.05010986328125,
0.01399993896484375,
0.02764892578125,
-0.0019931793212890625,
0.0295562744140625,
-0.0150604248046875,
0.0211944580078125,
-0.0162200927734375,
0.050994873046875,
0.014251708984375,
0.01558685302734375,
-0.01187896728515625,
0.0587158203125,
-0.024810791015625,
-0.02886962890625,
0.0087738037109375,
-0.050994873046875,
0.00362396240234375,
-0.0023632049560546875,
0.0145111083984375,
-0.05865478515625,
0.029144287109375,
-0.04766845703125,
0.0114288330078125,
0.01507568359375
] |
95b5a8b3491a75d3021e46e0017a56e88736a808
|
Wordpress Stackexchange
Q: Is there any plugin development framework Since I am new to WordPress plugin development I have been examining the internal structure of many plugins. I have found that most of them don't fit any pattern and so understanding how they work can be difficult.
I was wondering if there is more generalized way of plugin development, possibly with a framework, other than the methods described in official documentation.
A: Two more newer frameworks are:
*
*http://getherbert.com/
*http://framework.themosis.com/
Both share similarities with Laravel.
|
Q: Is there any plugin development framework Since I am new to WordPress plugin development I have been examining the internal structure of many plugins. I have found that most of them don't fit any pattern and so understanding how they work can be difficult.
I was wondering if there is more generalized way of plugin development, possibly with a framework, other than the methods described in official documentation.
A: Two more newer frameworks are:
*
*http://getherbert.com/
*http://framework.themosis.com/
Both share similarities with Laravel.
A: AFAIK, there's no official/standard framework, and there will be as many plugin development styles as there are shades of white in north pole.
I'd say WordPress Coding Standards is a blueprint for a good style.
You'll find lots of good examples and excellent coders here in WPSE. A nice starting point: questions/tagged/plugin-development.
Highlighting:
*
*Objective Best Practices for Plugin Development?
*framework for plugin/theme options panel?
*What Plugins Demonstrate Great WP Plugin Development?
Nowadays, I use Plugin Class Demo from @toscho as base for many plugins.
Right now, @Pippin is doing a series Introduction to WordPress Plugin Development 101 that may be of interest.
[ update, thanks to @Wyck contribution, a list of helper-plugins/boilerplates/frameworks ]
Plugin scbFramework, by @scribu:
A set of useful classes for faster plugin development.
This is a plugin toolkit that helps developers write plugins faster. It consists of several classes which handle common tasks, such as generating settings pages, creating database tables and more.
WordPress-Gear > PHP Boilerplate > Plugin stuff
*
*Plugin boilerplate by @tommcfarlin
*Object Oriented Plugin Template
*Settings framework by @gilbitron
*scbFramework - Classes for plugin dev
*WordPress Settings API - by @tareq_cse
*WP MVC - MVC framework to create plugins
A: You can also generate your personalized version of Tom's Plugin boilerplate here.
A: I believe Sunrise (http://gndev.info/sunrise/) is the kind of thing you're asking for. It's relatively new, and I haven't used it myself, so I offer no recommendations. However, it looks quite promising. It's available on WordPress plugin directory as a plugin: http://wordpress.org/plugins/sunrise/.
A: You can check this one is very simple and basic base structure. https://github.com/softmixt/simple-wordpress-plugin-framework
|
wordpress
|
{
"language": "en",
"length": 350,
"provenance": "stackexchange_00019.jsonl.gz:428962",
"question_score": "32",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85486"
}
|
[
-0.03240966796875,
0.00489044189453125,
-0.0270233154296875,
-0.0024471282958984375,
-0.0159454345703125,
0.008941650390625,
-0.01119232177734375,
0.007320404052734375,
-0.0200653076171875,
0.01117706298828125,
0.021148681640625,
0.007427215576171875,
-0.0572509765625,
-0.040313720703125,
0.0030193328857421875,
-0.03680419921875,
0.0100250244140625,
-0.013946533203125,
0.007740020751953125,
-0.030120849609375,
0.0168304443359375,
-0.032562255859375,
0.031951904296875,
0.06298828125,
0.06475830078125,
-0.039886474609375,
0.0263214111328125,
0.0207672119140625,
0.0302581787109375,
0.00012862682342529297,
0.030059814453125,
-0.03515625,
0.011138916015625,
0.0256500244140625,
-0.0174713134765625,
-0.01934814453125,
-0.007465362548828125,
0.0212249755859375,
0.0208282470703125,
0.005825042724609375,
0.036895751953125,
-0.029449462890625,
-0.00847625732421875,
0.02081298828125,
0.01104736328125,
-0.0579833984375,
0.0565185546875,
-0.058563232421875,
0.00984954833984375,
-0.043853759765625,
0.01268768310546875,
-0.01715087890625,
0.036651611328125,
-0.01387786865234375,
-0.024993896484375,
-0.0022411346435546875,
0.0174713134765625,
-0.0034313201904296875,
0.032958984375,
-0.02581787109375,
-0.036590576171875,
-0.0034885406494140625,
0.03558349609375,
-0.0032958984375,
-0.0028667449951171875,
0.00565338134765625,
-0.0177001953125,
0.0103607177734375,
0.02459716796875,
0.0222930908203125,
0.0036563873291015625,
-0.026397705078125,
0.004596710205078125,
0.01190185546875,
0.0030117034912109375,
-0.05633544921875,
0.02801513671875,
-0.03643798828125,
-0.0004992485046386719,
0.028839111328125,
-0.01454925537109375,
-0.031829833984375,
-0.0239105224609375,
-0.026397705078125,
0.02288818359375,
0.0265350341796875,
-0.008392333984375,
0.0004799365997314453,
-0.029541015625,
-0.01276397705078125,
-0.041839599609375,
-0.0217742919921875,
-0.0247344970703125,
0.00402069091796875,
-0.0132598876953125,
0.002140045166015625,
0.0057373046875,
-0.058868408203125,
0.02618408203125,
0.015869140625,
0.029296875,
-0.06390380859375,
0.03961181640625,
0.0126495361328125,
-0.0189666748046875,
0.0418701171875,
0.02984619140625,
0.01290130615234375,
-0.0031147003173828125,
0.01552581787109375,
0.0034084320068359375,
-0.002941131591796875,
0.0036773681640625,
-0.0306549072265625,
-0.00010669231414794922,
0.012451171875,
-0.0208282470703125,
-0.0034236907958984375,
0.003368377685546875,
-0.01617431640625,
-0.0006589889526367188,
-0.002521514892578125,
0.01479339599609375,
0.046875,
-0.017547607421875,
0.01165771484375,
0.0012044906616210938,
-0.044769287109375,
0.0299072265625,
-0.00395965576171875,
-0.0179290771484375,
0.0173492431640625,
0.0197906494140625,
0.0006284713745117188,
-0.0081939697265625,
-0.0047149658203125,
-0.00905609130859375,
0.0006608963012695312,
0.0012655258178710938,
-0.0245513916015625,
-0.01171875,
-0.0110321044921875,
0.005084991455078125,
-0.021209716796875,
0.004398345947265625,
-0.01326751708984375,
0.038360595703125,
0.042022705078125,
-0.020538330078125,
0.00373077392578125,
-0.0012998580932617188,
0.04266357421875,
0.004486083984375,
0.00957489013671875,
0.076171875,
0.004001617431640625,
0.0592041015625,
-0.038482666015625,
-0.0012807846069335938,
0.0019626617431640625,
0.01055908203125,
-0.0031375885009765625,
0.002994537353515625,
-0.00786590576171875,
-0.0192108154296875,
0.01812744140625,
-0.0218048095703125,
0.0007171630859375,
0.022491455078125,
-0.021392822265625,
0.03179931640625,
-0.016082763671875,
0.024261474609375,
0.01491546630859375,
0.01465606689453125,
0.0191650390625,
-0.0230865478515625,
0.0297088623046875,
0.0275115966796875,
-0.005710601806640625,
0.0027618408203125,
-0.0240325927734375,
0.056396484375,
0.0019931793212890625,
-0.017425537109375,
0.00875091552734375,
-0.01824951171875,
0.00821685791015625,
0.03692626953125,
0.0153045654296875,
-0.01457977294921875,
-0.00514984130859375,
-0.036590576171875,
0.0258941650390625,
-0.03643798828125,
-0.0029163360595703125,
-0.001888275146484375,
0.03363037109375,
-0.02227783203125,
-0.011993408203125,
-0.036376953125,
0.0160369873046875,
-0.00615692138671875,
0.03729248046875,
-0.0400390625,
0.01629638671875,
-0.0168914794921875,
0.033203125,
0.05743408203125,
0.027679443359375,
-0.0195465087890625,
0.01218414306640625,
-0.0050201416015625,
-0.03936767578125,
-0.03985595703125,
0.036407470703125,
-0.001983642578125,
-0.01276397705078125,
0.0028533935546875,
-0.03021240234375,
0.00948333740234375,
0.044189453125,
0.0010089874267578125,
0.033447265625,
0.001415252685546875,
-0.0017423629760742188,
-0.0143890380859375,
0.005229949951171875,
-0.0367431640625,
0.028076171875,
-0.025054931640625,
0.00830841064453125,
-0.0254669189453125,
0.0188751220703125,
-0.0168914794921875,
-0.01081085205078125,
0.0015430450439453125,
-0.0419921875,
0.0292205810546875,
0.03460693359375,
0.0116119384765625,
0.0273284912109375,
-0.0269012451171875,
0.004730224609375,
0.05072021484375,
-0.05029296875,
-0.019622802734375,
0.00835418701171875,
-0.0217742919921875,
0.043426513671875,
-0.0295257568359375,
0.03778076171875,
0.015777587890625,
-0.0357666015625,
-0.038330078125,
0.05572509765625,
-0.044464111328125,
-0.03497314453125,
-0.0023021697998046875,
-0.0048370361328125,
0.00368499755859375,
-0.04925537109375,
-0.01189422607421875,
-0.02288818359375,
0.0218048095703125,
-0.00382232666015625,
0.037933349609375,
0.034454345703125,
0.005191802978515625,
-0.00659942626953125,
-0.00324249267578125,
-0.0192413330078125,
0.004970550537109375,
0.0296630859375,
0.050506591796875,
0.034698486328125,
-0.036376953125,
-0.027679443359375,
0.0181732177734375,
0.0232696533203125,
-0.0292510986328125,
-0.0035572052001953125,
-0.01497650146484375,
-0.0164642333984375,
0.01027679443359375,
-0.031829833984375,
0.01255035400390625,
-0.026092529296875,
0.01513671875,
0.0241546630859375,
0.04779052734375,
-0.00415802001953125,
-0.053253173828125,
0.06097412109375,
-0.03546142578125,
-0.02813720703125,
0.0289306640625,
-0.02703857421875,
0.046417236328125,
-0.03985595703125,
0.00868988037109375,
0.04351806640625,
-0.0112457275390625,
0.0009093284606933594,
-0.006381988525390625,
0.01531982421875,
0.0254974365234375,
-0.0276947021484375,
-0.0221405029296875,
0.01229095458984375,
-0.07769775390625,
-0.0301666259765625,
0.0214691162109375,
0.07501220703125,
-0.0231475830078125,
-0.0565185546875,
-0.0310821533203125,
0.040130615234375,
-0.055999755859375,
-0.03125,
-0.01177978515625,
-0.06781005859375,
0.03033447265625,
-0.0084381103515625,
-0.01540374755859375,
-0.02667236328125,
0.0193634033203125,
0.0245819091796875,
0.01534271240234375,
-0.05291748046875,
-0.04974365234375,
-0.08087158203125,
-0.09246826171875,
-0.005313873291015625,
0.00801849365234375,
0.0013952255249023438,
0.01305389404296875,
0.035797119140625,
-0.0011320114135742188,
-0.05560302734375,
-0.0142059326171875,
-0.01371002197265625,
0.00821685791015625,
0.013031005859375,
-0.0038852691650390625,
-0.040740966796875,
0.0291595458984375,
-0.00977325439453125,
0.040618896484375,
0.02899169921875,
-0.0160675048828125,
-0.0187530517578125,
-0.037353515625,
-0.03668212890625,
-0.0181427001953125,
-0.01479339599609375,
0.035064697265625,
-0.03997802734375,
-0.041015625,
-0.0694580078125,
-0.0155792236328125,
0.0262603759765625,
-0.01236724853515625,
0.024505615234375,
-0.01548004150390625,
-0.0271759033203125,
0.01026153564453125,
0.009918212890625,
0.0266876220703125,
0.01806640625,
-0.05096435546875,
-0.014373779296875,
0.043121337890625,
0.0266876220703125,
0.06829833984375,
0.0057830810546875,
0.0227203369140625,
-0.0416259765625,
-0.0283966064453125,
-0.0198211669921875,
-0.03106689453125,
-0.01380157470703125,
-0.01068878173828125,
0.001956939697265625,
-0.0007958412170410156,
0.0254364013671875,
0.0198974609375,
0.040557861328125,
-0.01059722900390625,
-0.01715087890625,
0.002288818359375,
0.06121826171875,
-0.0221405029296875,
0.007144927978515625,
0.0165863037109375,
0.00798797607421875,
-0.04364013671875,
0.0012302398681640625,
-0.09381103515625,
-0.01041412353515625,
-0.017486572265625,
-0.0178985595703125,
-0.01143646240234375,
-0.02703857421875,
0.01233673095703125,
0.0260467529296875,
0.01422882080078125,
-0.0218353271484375,
0.0250701904296875,
-0.073974609375,
0.0080108642578125,
0.01114654541015625,
0.00609588623046875,
-0.029022216796875,
-0.0025482177734375,
-0.0645751953125,
-0.05975341796875,
-0.0234527587890625,
0.01654052734375,
0.0396728515625,
0.018341064453125,
-0.057525634765625,
-0.003902435302734375,
0.052093505859375,
-0.034149169921875,
0.048614501953125,
-0.0078125,
0.0259857177734375,
0.019500732421875,
-0.003814697265625,
0.005390167236328125,
-0.01351165771484375,
-0.0177154541015625,
-0.032379150390625,
-0.0253448486328125,
0.024444580078125,
-0.024444580078125,
0.00983428955078125,
-0.01448822021484375,
-0.01995849609375,
0.02447509765625,
-0.01059722900390625,
-0.01422882080078125,
0.016357421875,
-0.0164794921875,
-0.006900787353515625,
0.0045623779296875,
0.00928497314453125,
0.046661376953125,
0.0213470458984375,
0.00666046142578125,
-0.0005192756652832031,
0.12200927734375,
0.0205535888671875,
-0.02130126953125,
-0.05572509765625,
0.001720428466796875,
0.03857421875,
0.059600830078125,
0.000606536865234375,
-0.01282501220703125,
-0.0274200439453125,
0.0159149169921875,
0.019683837890625,
0.01336669921875,
0.01332855224609375,
-0.00774383544921875,
0.002605438232421875,
-0.055023193359375,
0.040740966796875,
0.02996826171875,
-0.031341552734375,
0.0164337158203125,
-0.0193328857421875,
-0.00017833709716796875,
-0.01947021484375,
0.003986358642578125,
-0.0011310577392578125,
0.005634307861328125,
-0.0228271484375,
-0.07147216796875,
0.025482177734375,
-0.02313232421875,
0.003875732421875,
0.0144805908203125,
-0.012115478515625,
0.034393310546875,
-0.0018405914306640625,
-0.0034084320068359375,
0.01251220703125,
0.03240966796875,
0.007518768310546875,
0.03338623046875,
0.01470184326171875,
-0.0158843994140625,
-0.037689208984375,
-0.0151519775390625,
0.075439453125,
0.032073974609375,
-0.038665771484375,
0.0271148681640625,
-0.032684326171875,
-0.03692626953125,
-0.008331298828125,
-0.0299835205078125,
0.031707763671875,
0.0028533935546875,
-0.0389404296875,
0.0234375,
-0.051300048828125,
-0.02392578125,
-0.041015625,
0.01605224609375,
-0.0157012939453125,
0.0051422119140625,
0.0281982421875,
0.050018310546875,
-0.0166473388671875,
0.05767822265625,
-0.01256561279296875,
0.0190582275390625,
0.00565338134765625,
0.0197906494140625,
0.011260986328125,
-0.0164794921875,
0.031524658203125,
-0.0311431884765625,
0.018157958984375,
-0.0298614501953125,
-0.009552001953125,
-0.0067901611328125,
0.0223846435546875,
0.005401611328125,
-0.01058197021484375,
0.04534912109375,
0.0032825469970703125,
0.00310516357421875,
0.0036296844482421875,
0.01448822021484375,
0.012359619140625,
-0.0092010498046875,
0.01078033447265625,
0.0223236083984375,
0.018157958984375,
0.00508880615234375,
-0.0138092041015625,
0.0054168701171875,
-0.01007080078125,
-0.0004744529724121094,
-0.059234619140625,
0.00838470458984375,
0.037017822265625,
-0.04595947265625,
0.0036106109619140625,
0.01251983642578125,
-0.055389404296875,
-0.056121826171875,
0.007724761962890625,
-0.0177154541015625,
0.05218505859375,
-0.0232391357421875,
0.048187255859375,
-0.0175323486328125,
-0.026947021484375,
-0.033355712890625,
0.01245880126953125,
0.040313720703125,
0.03948974609375,
-0.0169525146484375,
-0.02252197265625,
-0.0546875,
-0.038665771484375,
-0.10699462890625,
-0.053436279296875,
-0.0570068359375,
0.036407470703125,
-0.0028591156005859375,
0.00959014892578125,
0.01000213623046875,
0.005222320556640625,
-0.0042724609375,
-0.0008668899536132812,
0.0016126632690429688,
-0.01995849609375,
0.01551055908203125,
0.044647216796875,
0.03521728515625,
0.07489013671875,
0.06268310546875,
0.0250244140625,
-0.06463623046875,
-0.0423583984375,
0.007678985595703125,
-0.0301971435546875,
0.00106048583984375,
-0.0194549560546875,
0.01373291015625,
-0.002105712890625,
0.02752685546875,
0.0018835067749023438,
0.004917144775390625,
-0.03668212890625,
-0.01168060302734375,
0.0035152435302734375,
0.06573486328125,
-0.0192718505859375,
-0.0289764404296875,
0.052642822265625,
-0.049530029296875,
-0.0230255126953125,
0.0176544189453125,
-0.0122833251953125,
0.020416259765625,
-0.001476287841796875,
-0.002910614013671875,
0.035888671875,
-0.00861358642578125,
0.027740478515625,
-0.0082855224609375,
-0.010101318359375,
0.00441741943359375,
0.01413726806640625,
0.01629638671875,
-0.006259918212890625,
0.00452423095703125,
0.0164031982421875,
-0.020599365234375,
0.06976318359375,
0.006649017333984375,
-0.044921875,
0.05010986328125,
-0.0582275390625,
0.0283660888671875,
0.024017333984375,
0.0306549072265625,
-0.07623291015625,
0.04144287109375,
-0.009979248046875,
-0.004364013671875,
0.029449462890625,
-0.0212860107421875,
0.020721435546875,
-0.0009441375732421875,
0.04345703125,
0.0298309326171875,
-0.008880615234375,
0.026458740234375,
-0.01306915283203125,
-0.0093231201171875,
-0.01470947265625,
0.03125,
0.0233154296875,
-0.061920166015625,
0.0477294921875,
0.026824951171875,
0.037078857421875,
-0.01739501953125,
-0.01715087890625,
0.0295257568359375,
-0.0295867919921875,
-0.0005879402160644531,
0.073486328125,
-0.0257568359375,
0.0280914306640625,
0.0458984375,
-0.01264190673828125,
0.048583984375,
0.023681640625,
0.0182952880859375,
-0.026123046875,
0.00838470458984375,
-0.01262664794921875,
-0.035797119140625,
-0.0298614501953125,
0.017547607421875,
0.0241241455078125,
-0.02886962890625,
0.0309295654296875,
-0.026123046875,
-0.0191497802734375,
-0.004550933837890625,
0.047637939453125,
0.09503173828125,
-0.032623291015625,
-0.0182037353515625,
0.05029296875,
0.00669097900390625,
-0.0268402099609375,
-0.01097869873046875,
-0.013031005859375,
-0.0523681640625,
0.00894927978515625,
-0.0181884765625,
0.0250244140625,
0.07305908203125,
0.0052490234375,
-0.05767822265625,
0.03985595703125,
0.0307464599609375,
0.005992889404296875,
0.01922607421875,
0.007732391357421875,
-0.05950927734375,
-0.0253448486328125,
-0.025543212890625,
0.04290771484375,
-0.0362548828125,
-0.0166015625,
-0.0233154296875,
0.01837158203125,
-0.0285797119140625,
0.0029239654541015625,
0.0267486572265625,
0.0014085769653320312,
-0.031585693359375,
-0.020172119140625,
0.01184844970703125,
0.024261474609375,
0.003589630126953125,
0.03851318359375,
0.00843048095703125,
-0.023834228515625,
0.005641937255859375,
0.0227508544921875,
0.03277587890625,
-0.0196380615234375,
-0.0276641845703125,
0.0271759033203125,
-0.007091522216796875,
-0.03704833984375,
-0.0051422119140625,
0.0211181640625,
-0.020233154296875,
-0.0136260986328125,
-0.01702880859375,
0.057861328125,
0.038360595703125,
0.013946533203125,
0.032806396484375,
-0.0012960433959960938,
0.001010894775390625,
-0.006595611572265625,
0.05340576171875,
-0.0240631103515625,
0.0141448974609375,
-0.00037384033203125,
0.01441192626953125,
-0.0170440673828125,
-0.043548583984375,
-0.00128173828125,
0.01157379150390625,
-0.05413818359375,
0.0133209228515625,
-0.03839111328125,
0.0043182373046875,
-0.0938720703125,
-0.036712646484375,
0.044677734375,
0.041290283203125,
-0.01617431640625,
-0.045135498046875,
0.007083892822265625,
0.0269622802734375,
0.04095458984375,
0.02593994140625,
0.0736083984375,
-0.003570556640625,
0.0265350341796875,
-0.0225982666015625,
-0.0112152099609375,
0.0157012939453125,
0.027679443359375,
0.00189971923828125,
-0.014892578125,
-0.00457763671875,
-0.019989013671875,
-0.004337310791015625,
7.152557373046875e-7,
0.0089569091796875,
0.004955291748046875,
-0.0302276611328125,
0.059112548828125,
0.004901885986328125,
-0.002880096435546875,
0.020416259765625,
0.01395416259765625,
-0.026397705078125,
-0.0255584716796875,
-0.00731658935546875,
-0.03326416015625,
-0.013397216796875,
0.027862548828125,
0.0179290771484375,
0.053680419921875,
0.046844482421875,
0.051361083984375,
0.0374755859375,
0.0011749267578125,
0.041839599609375,
-0.0037517547607421875,
-0.01384735107421875,
-0.042266845703125,
-0.00038433074951171875,
0.00371551513671875,
-0.015838623046875,
0.003398895263671875,
-0.02801513671875,
0.03759765625,
-0.01568603515625,
0.043487548828125,
-0.009185791015625,
-0.036224365234375,
0.01085662841796875,
-0.0235748291015625,
0.07928466796875,
-0.01148223876953125,
-0.01482391357421875,
-0.01432037353515625,
0.0007295608520507812,
-0.01467132568359375,
0.00003266334533691406,
0.031494140625,
-0.00975799560546875,
0.031341552734375,
0.024261474609375,
-0.007602691650390625,
-0.0035419464111328125,
-0.0214385986328125,
0.034210205078125,
-0.0231475830078125,
-0.0099639892578125,
0.00443267822265625,
-0.0333251953125,
-0.00926971435546875,
-0.0255126953125,
0.029876708984375,
0.014251708984375,
0.09136962890625,
-0.0267486572265625,
0.023193359375,
0.004184722900390625,
-0.0203094482421875,
-0.00506591796875,
-0.010528564453125,
0.03399658203125,
0.0024051666259765625,
-0.0302276611328125,
-0.0244903564453125,
-0.03955078125,
-0.00916290283203125,
0.029144287109375,
-0.04833984375,
0.0231170654296875,
-0.0263824462890625,
0.013641357421875,
-0.0203704833984375,
-0.006969451904296875,
-0.0248260498046875,
-0.043609619140625,
-0.0006461143493652344,
0.023040771484375,
0.00231170654296875,
0.0264739990234375,
-0.010467529296875,
0.034332275390625,
0.01453399658203125,
0.00968170166015625,
-0.03472900390625,
0.00701141357421875,
-0.06890869140625,
0.02191162109375,
0.03179931640625,
-0.058990478515625,
0.035369873046875,
-0.007781982421875,
-0.0242156982421875,
0.02264404296875,
0.062255859375,
0.01157379150390625,
-0.057403564453125,
0.0498046875,
0.05181884765625,
0.067626953125,
-0.0217132568359375,
0.0207366943359375,
0.054046630859375,
0.01171112060546875,
0.001918792724609375,
-0.0263214111328125,
-0.0130462646484375,
-0.060211181640625,
-0.0212249755859375,
-0.002559661865234375,
-0.056732177734375,
-0.059539794921875,
-0.0338134765625,
0.0159454345703125,
0.01241302490234375,
-0.0062255859375,
-0.029296875,
0.005146026611328125,
-0.029144287109375,
0.04217529296875,
-0.0305023193359375,
0.02020263671875,
0.004062652587890625,
0.00553131103515625,
-0.0379638671875,
-0.0257720947265625,
-0.006053924560546875,
0.031768798828125,
0.016357421875,
0.07012939453125,
0.033538818359375,
-0.0694580078125,
0.0135345458984375,
0.11090087890625,
0.08544921875,
0.1644287109375,
0.07098388671875,
-0.0284271240234375,
0.01983642578125,
-0.0288543701171875,
-0.00006628036499023438,
-0.0090789794921875,
0.01393890380859375,
-0.05242919921875,
-0.02947998046875,
0.00638580322265625,
-0.051544189453125,
-0.0296630859375,
-0.05706787109375,
-0.10577392578125,
0.0767822265625,
-0.0224456787109375,
-0.03863525390625,
-0.04071044921875,
0.008697509765625,
0.02508544921875,
-0.0050201416015625,
-0.01398468017578125,
-0.0160369873046875,
-0.048370361328125,
0.0052642822265625,
-0.0002276897430419922,
0.01361083984375,
-0.008148193359375,
0.0045013427734375,
-0.0038299560546875,
0.03350830078125,
0.03497314453125,
-0.0241241455078125,
-0.0035533905029296875,
0.0207672119140625,
-0.0032939910888671875,
0.017669677734375,
-0.0237274169921875,
-0.010650634765625,
-0.00835418701171875,
-0.007343292236328125,
-0.011016845703125,
-0.002063751220703125,
0.00197601318359375,
0.0163116455078125,
0.035888671875,
0.0396728515625,
0.008453369140625,
-0.041595458984375,
-0.00521087646484375,
0.0026416778564453125,
-0.0226287841796875,
-0.0301513671875,
0.0189971923828125,
-0.06134033203125,
-0.020294189453125,
-0.0218048095703125,
-0.005260467529296875,
0.004528045654296875,
0.0009570121765136719,
-0.01110076904296875,
-0.01065826416015625,
0.0162506103515625,
-0.0254974365234375,
0.00917816162109375,
-0.00582122802734375,
0.1124267578125,
-0.04443359375,
0.06396484375,
0.005687713623046875,
0.01473236083984375,
0.10870361328125,
0.044281005859375,
0.033111572265625,
0.028900146484375,
-0.04205322265625,
0.0143890380859375,
0.028350830078125,
0.0189361572265625,
-0.00411224365234375,
-0.044677734375,
0.0017719268798828125,
0.0299224853515625,
0.00046753883361816406,
0.0229339599609375,
-0.042388916015625,
0.042633056640625,
0.00458526611328125,
0.056427001953125,
-0.003971099853515625,
-0.0207366943359375,
-0.0374755859375,
0.053253173828125,
-0.034149169921875,
-0.005153656005859375,
-0.0270233154296875,
-0.037872314453125,
-0.0021915435791015625,
0.026031494140625,
-0.0300140380859375,
-0.0280914306640625,
0.0202178955078125,
-0.0250091552734375,
-0.00598907470703125,
0.0187530517578125
] |
4d520ca6e499e098cb165d28f53dcee7d3203b74
|
Wordpress Stackexchange
Q: How to remove CSS file in the header using Wordpress functions? I want to remove a CSS from loading in the header, this is the code that appears:
<link rel='stylesheet' id='my-css' href='http://test.tld/wp-content/themes/mytheme/my.css?ver=3.5' type='text/css' media='all' />
I tried using these functions but it didn't work:
wp_dequeue_style('my-css');
wp_deregister_style('my-css');
Is there other ways that the above CSS line can be removed without manually editing it in the template?
Thanks.
A: Deregister/Dequeue styles is best practice
https://codex.wordpress.org/Function_Reference/wp_deregister_style
https://codex.wordpress.org/Function_Reference/wp_dequeue_style
But you can use this filter too, to filter out styles with any condition:
add_filter( 'style_loader_src', function($href){
if(strpos($href, "name-of-allowed.css") !== false) {
return $href;
}
return false;
});
|
Q: How to remove CSS file in the header using Wordpress functions? I want to remove a CSS from loading in the header, this is the code that appears:
<link rel='stylesheet' id='my-css' href='http://test.tld/wp-content/themes/mytheme/my.css?ver=3.5' type='text/css' media='all' />
I tried using these functions but it didn't work:
wp_dequeue_style('my-css');
wp_deregister_style('my-css');
Is there other ways that the above CSS line can be removed without manually editing it in the template?
Thanks.
A: Deregister/Dequeue styles is best practice
https://codex.wordpress.org/Function_Reference/wp_deregister_style
https://codex.wordpress.org/Function_Reference/wp_dequeue_style
But you can use this filter too, to filter out styles with any condition:
add_filter( 'style_loader_src', function($href){
if(strpos($href, "name-of-allowed.css") !== false) {
return $href;
}
return false;
});
A: If your stylesheet is registered and enqueued correctly then...
function dequeue_my_css() {
wp_dequeue_style('my-css');
wp_deregister_style('my-css');
}
add_action('wp_enqueue_scripts','dequeue_my_css');
// add a priority if you need it
// add_action('wp_enqueue_scripts','dequeue_my_css',100);
... should remove it. That only works if the stylesheet was registered and/or enqueued with wp_register_style and wp_enqueue_style.
If it is not registered correctly then you will have to figure out what your theme did and undo that. It may require editing the template, depending on how the theme is written.
http://codex.wordpress.org/Function_Reference/wp_dequeue_style
http://codex.wordpress.org/Function_Reference/wp_deregister_style
|
wordpress
|
{
"language": "en",
"length": 183,
"provenance": "stackexchange_00019.jsonl.gz:428970",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85512"
}
|
[
0.04327392578125,
0.03839111328125,
-0.01947021484375,
0.0005002021789550781,
0.036895751953125,
-0.044647216796875,
0.05035400390625,
-0.04052734375,
-0.025360107421875,
0.0024127960205078125,
-0.0197601318359375,
0.0182342529296875,
-0.02398681640625,
-0.01549530029296875,
0.030242919921875,
-0.03460693359375,
0.042938232421875,
-0.00036144256591796875,
0.04608154296875,
0.003765106201171875,
-0.0220184326171875,
0.0226593017578125,
0.057098388671875,
0.0411376953125,
0.0169525146484375,
-0.031768798828125,
0.057525634765625,
0.01068878173828125,
-0.0026187896728515625,
-0.02685546875,
0.0192108154296875,
-0.0037841796875,
0.01152801513671875,
0.07373046875,
-0.0721435546875,
0.0102996826171875,
0.0013837814331054688,
0.020599365234375,
0.0092926025390625,
0.03363037109375,
0.00638580322265625,
-0.001178741455078125,
-0.047119140625,
0.01360321044921875,
-0.037689208984375,
-0.05517578125,
0.0189056396484375,
-0.021759033203125,
-0.002704620361328125,
0.002231597900390625,
0.01479339599609375,
0.01409149169921875,
0.02288818359375,
-0.0308074951171875,
-0.008087158203125,
-0.003704071044921875,
-0.0294036865234375,
0.046905517578125,
0.01203155517578125,
0.00659942626953125,
-0.0114593505859375,
0.0227813720703125,
0.005886077880859375,
-0.01425933837890625,
-0.0303192138671875,
0.00795745849609375,
-0.016632080078125,
0.00135040283203125,
-0.0673828125,
-0.023406982421875,
0.039703369140625,
-0.037933349609375,
0.004077911376953125,
-0.034576416015625,
-0.042327880859375,
-0.006046295166015625,
0.0220947265625,
-0.0268402099609375,
0.0243682861328125,
-0.0252227783203125,
0.0214385986328125,
-0.00835418701171875,
-0.061126708984375,
-0.004947662353515625,
0.01922607421875,
0.0159912109375,
-0.002147674560546875,
-0.0197906494140625,
-0.0048370361328125,
-0.0200042724609375,
-0.014312744140625,
0.02716064453125,
0.00290679931640625,
-0.020172119140625,
-0.0406494140625,
-0.0175323486328125,
0.021759033203125,
0.054962158203125,
0.0115966796875,
0.0195465087890625,
-0.0223846435546875,
-0.0244140625,
-0.005649566650390625,
-0.029449462890625,
-0.0020751953125,
0.04815673828125,
0.00531005859375,
0.015472412109375,
0.024383544921875,
0.01274871826171875,
0.01044464111328125,
-0.0128021240234375,
-0.01708984375,
0.0015954971313476562,
-0.04278564453125,
0.02642822265625,
-0.00992584228515625,
-0.045379638671875,
-0.0279998779296875,
-0.0291290283203125,
0.02490234375,
0.039581298828125,
-0.01148223876953125,
-0.0014219284057617188,
-0.0262298583984375,
-0.01229095458984375,
0.00583648681640625,
-0.038360595703125,
0.01446533203125,
0.0058746337890625,
-0.023895263671875,
0.004856109619140625,
0.05523681640625,
0.017669677734375,
0.005828857421875,
-0.01215362548828125,
0.0302734375,
0.006214141845703125,
-0.00762939453125,
-0.0027294158935546875,
0.028076171875,
-0.037811279296875,
-0.042510986328125,
0.0092620849609375,
0.00201416015625,
0.011383056640625,
0.003513336181640625,
0.0189208984375,
-0.005340576171875,
-0.037017822265625,
0.032958984375,
-0.060516357421875,
0.065673828125,
0.0178985595703125,
-0.042205810546875,
-0.033599853515625,
0.0548095703125,
-0.056732177734375,
-0.0276336669921875,
-0.087890625,
-0.02862548828125,
-0.00760650634765625,
0.02978515625,
-0.0279083251953125,
-0.032806396484375,
0.022308349609375,
-0.021392822265625,
-0.0028934478759765625,
0.02435302734375,
0.026702880859375,
-0.015167236328125,
-0.0249786376953125,
-0.0045623779296875,
0.037200927734375,
0.01290130615234375,
0.053558349609375,
0.037841796875,
0.0124969482421875,
-0.0218658447265625,
0.05242919921875,
-0.01432037353515625,
-0.04327392578125,
0.032562255859375,
-0.0362548828125,
-0.044891357421875,
-0.003017425537109375,
0.0261383056640625,
0.051025390625,
0.0009622573852539062,
0.017181396484375,
0.06317138671875,
0.0010232925415039062,
0.0032672882080078125,
-0.03350830078125,
-0.006195068359375,
-0.033203125,
0.0021457672119140625,
-0.017578125,
0.0017518997192382812,
0.0594482421875,
0.0207977294921875,
0.00848388671875,
0.01824951171875,
-0.0190582275390625,
-0.03302001953125,
0.006786346435546875,
-0.0182952880859375,
0.03302001953125,
-0.04595947265625,
0.0037841796875,
0.016448974609375,
-0.02410888671875,
-0.01338958740234375,
-0.0038166046142578125,
0.003948211669921875,
0.0079803466796875,
0.0105743408203125,
0.027740478515625,
-0.00966644287109375,
0.0364990234375,
-0.0106964111328125,
-0.0034694671630859375,
-0.0135040283203125,
0.01538848876953125,
0.0126495361328125,
0.00732421875,
-0.03204345703125,
-0.0122222900390625,
0.01003265380859375,
-0.0185394287109375,
0.0174713134765625,
0.05133056640625,
0.0562744140625,
0.06768798828125,
-0.0084075927734375,
-0.00038743019104003906,
0.017364501953125,
-0.0810546875,
0.00452423095703125,
0.04400634765625,
0.0528564453125,
0.014495849609375,
-0.00372314453125,
-0.0304412841796875,
0.07501220703125,
-0.0203399658203125,
0.001575469970703125,
-0.0277862548828125,
0.01458740234375,
-0.020111083984375,
0.032257080078125,
-0.01129150390625,
0.04669189453125,
-0.023895263671875,
0.043670654296875,
0.0308837890625,
-0.028350830078125,
-0.02978515625,
-0.0022716522216796875,
0.0256195068359375,
0.0078277587890625,
0.0178985595703125,
-0.006381988525390625,
0.001190185546875,
0.02362060546875,
-0.0049285888671875,
0.006130218505859375,
-0.00794219970703125,
-0.021759033203125,
0.00069427490234375,
0.038238525390625,
-0.03826904296875,
-0.00713348388671875,
0.054412841796875,
0.04852294921875,
-0.0133209228515625,
-0.016387939453125,
-0.0177154541015625,
-0.01088714599609375,
0.026031494140625,
-0.02252197265625,
-0.0221405029296875,
-0.03668212890625,
-0.0007529258728027344,
0.0057525634765625,
-0.05767822265625,
0.0183868408203125,
0.015594482421875,
0.011260986328125,
0.0494384765625,
0.0374755859375,
0.04541015625,
0.00920867919921875,
0.0208282470703125,
0.0300140380859375,
0.01116180419921875,
0.01776123046875,
-0.01119232177734375,
0.0263824462890625,
-0.0113372802734375,
0.00997161865234375,
0.05548095703125,
0.0174560546875,
-0.0005340576171875,
0.00774383544921875,
0.01012420654296875,
0.021240234375,
-0.0255279541015625,
-0.0191192626953125,
0.025421142578125,
-0.052886962890625,
0.0204315185546875,
0.026336669921875,
-0.00978851318359375,
0.0190277099609375,
-0.028045654296875,
-0.01229095458984375,
0.0251312255859375,
-0.07611083984375,
-0.058441162109375,
-0.00799560546875,
-0.0306396484375,
-0.051055908203125,
0.0164337158203125,
-0.03253173828125,
0.01751708984375,
0.0232086181640625,
-0.004650115966796875,
0.0185394287109375,
-0.029449462890625,
-0.03570556640625,
-0.033782958984375,
-0.060211181640625,
0.0010623931884765625,
0.01038360595703125,
0.0027790069580078125,
-0.0005421638488769531,
0.071044921875,
0.00714874267578125,
-0.042694091796875,
0.001560211181640625,
-0.0044708251953125,
0.0024242401123046875,
0.0110321044921875,
-0.01299285888671875,
-0.01189422607421875,
-0.0189666748046875,
-0.00910186767578125,
0.01148223876953125,
0.020263671875,
-0.0165863037109375,
0.0086822509765625,
-0.05224609375,
-0.01763916015625,
-0.0286712646484375,
0.054229736328125,
0.06512451171875,
-0.03448486328125,
-0.0054931640625,
-0.060821533203125,
-0.045013427734375,
-0.002559661865234375,
-0.038848876953125,
0.049896240234375,
0.0256195068359375,
-0.013153076171875,
0.00920867919921875,
0.0250244140625,
0.045074462890625,
0.00949859619140625,
0.026275634765625,
-0.048492431640625,
0.0633544921875,
0.0257110595703125,
0.057525634765625,
-0.049591064453125,
0.055877685546875,
-0.00848388671875,
0.00873565673828125,
0.030792236328125,
-0.00830078125,
-0.0256500244140625,
-0.0022258758544921875,
-0.05255126953125,
-0.0361328125,
0.038909912109375,
0.002254486083984375,
0.031005859375,
-0.0206756591796875,
-0.037200927734375,
-0.00411224365234375,
0.08282470703125,
0.0286712646484375,
-0.0293731689453125,
-0.00830078125,
0.00833892822265625,
-0.041778564453125,
-0.047088623046875,
-0.006984710693359375,
0.005451202392578125,
-0.11767578125,
0.00475311279296875,
-0.01386260986328125,
-0.04168701171875,
-0.025665283203125,
-0.01313018798828125,
-0.07977294921875,
-0.05181884765625,
0.0209197998046875,
0.013763427734375,
-0.019927978515625,
0.032379150390625,
-0.037811279296875,
0.0233154296875,
-0.01404571533203125,
-0.0187835693359375,
-0.07666015625,
-0.01678466796875,
-0.043182373046875,
0.0703125,
0.01319122314453125,
0.0367431640625,
-0.0087738037109375,
0.059356689453125,
0.0003407001495361328,
0.068359375,
-0.01290130615234375,
-0.016845703125,
0.0218505859375,
0.01092529296875,
0.021942138671875,
0.0006031990051269531,
0.0006418228149414062,
0.0169525146484375,
-0.0362548828125,
0.04833984375,
-0.0135498046875,
0.00559234619140625,
0.03863525390625,
-0.032745361328125,
-0.0039215087890625,
-0.01043701171875,
0.0116729736328125,
-0.0013704299926757812,
0.0172119140625,
-0.0173187255859375,
-0.00920867919921875,
0.0176849365234375,
0.0491943359375,
0.04730224609375,
-0.0063934326171875,
-0.01442718505859375,
0.039642333984375,
0.03253173828125,
-0.046478271484375,
-0.0038852691650390625,
0.03167724609375,
0.044891357421875,
-0.0484619140625,
0.038543701171875,
0.00786590576171875,
-0.033447265625,
0.090087890625,
-0.01120758056640625,
0.031585693359375,
-0.010345458984375,
0.033843994140625,
-0.00417327880859375,
-0.036956787109375,
0.05126953125,
0.001995086669921875,
-0.0216064453125,
0.0294189453125,
0.0267333984375,
-0.0201263427734375,
0.0411376953125,
0.01104736328125,
0.022674560546875,
-0.062225341796875,
-0.0218963623046875,
-0.0128936767578125,
-0.0053863525390625,
-0.023345947265625,
0.0767822265625,
0.04754638671875,
-0.017974853515625,
0.0380859375,
0.046844482421875,
0.018890380859375,
-0.037017822265625,
-0.0007767677307128906,
-0.0552978515625,
0.0183868408203125,
-0.00945281982421875,
-0.0149078369140625,
-0.005275726318359375,
-0.0107421875,
0.037200927734375,
0.0234222412109375,
-0.0201263427734375,
0.0023746490478515625,
-0.006839752197265625,
0.02655029296875,
-0.004535675048828125,
-0.00127410888671875,
0.043487548828125,
-0.0136566162109375,
-0.00714111328125,
-0.0278472900390625,
-0.04498291015625,
-0.01666259765625,
-0.0538330078125,
0.03997802734375,
0.018646240234375,
-0.0187835693359375,
0.033203125,
-0.0166473388671875,
0.03289794921875,
-0.0109100341796875,
-0.01163482666015625,
-0.0166168212890625,
-0.018951416015625,
0.00902557373046875,
-0.01470184326171875,
0.0283660888671875,
0.04241943359375,
-0.0166473388671875,
0.08740234375,
-0.06353759765625,
-0.03924560546875,
-0.005039215087890625,
0.0513916015625,
-0.036376953125,
-0.00746917724609375,
0.0360107421875,
0.004302978515625,
-0.0175628662109375,
0.0114593505859375,
-0.0235595703125,
-0.035736083984375,
-0.037506103515625,
-0.0108642578125,
0.029541015625,
-0.00424957275390625,
0.0017881393432617188,
-0.004657745361328125,
-0.007049560546875,
0.006534576416015625,
0.03411865234375,
-0.042449951171875,
0.0085296630859375,
0.00814056396484375,
0.004917144775390625,
-0.01380157470703125,
-0.0178375244140625,
-0.0689697265625,
-0.004512786865234375,
-0.01666259765625,
-0.01448822021484375,
0.01389312744140625,
-0.01267242431640625,
0.05401611328125,
-0.0232696533203125,
-0.029571533203125,
-0.0023708343505859375,
0.0178680419921875,
0.01302337646484375,
0.009857177734375,
-0.06439208984375,
0.01389312744140625,
-0.0322265625,
-0.0040740966796875,
-0.05517578125,
-0.0693359375,
-0.04742431640625,
0.007312774658203125,
-0.025177001953125,
-0.0149993896484375,
-0.013092041015625,
0.00475311279296875,
-0.01560211181640625,
0.04718017578125,
0.021392822265625,
-0.004940032958984375,
-0.0266571044921875,
0.05621337890625,
0.012939453125,
-0.002376556396484375,
0.018341064453125,
0.059173583984375,
0.0250701904296875,
-0.02740478515625,
-0.01453399658203125,
-0.029693603515625,
0.005237579345703125,
-0.0065155029296875,
-0.0000013113021850585938,
0.037078857421875,
0.08062744140625,
0.008056640625,
-0.00789642333984375,
-0.0012311935424804688,
-0.00531005859375,
-0.03863525390625,
0.01959228515625,
-0.005001068115234375,
0.01331329345703125,
-0.041534423828125,
0.03924560546875,
0.04742431640625,
-0.041015625,
-0.005756378173828125,
0.00582122802734375,
-0.01038360595703125,
0.046600341796875,
-0.049835205078125,
-0.0181121826171875,
0.04473876953125,
0.054290771484375,
0.0156402587890625,
0.0596923828125,
0.004711151123046875,
0.0309295654296875,
0.045074462890625,
0.005329132080078125,
0.01593017578125,
0.004550933837890625,
0.033935546875,
-0.0013294219970703125,
0.041839599609375,
0.032012939453125,
-0.005245208740234375,
0.00804901123046875,
0.035400390625,
0.07000732421875,
-0.0457763671875,
-0.00977325439453125,
0.0029430389404296875,
-0.004337310791015625,
0.056182861328125,
0.0037097930908203125,
-0.0257110595703125,
-0.044097900390625,
0.0238494873046875,
0.024383544921875,
-0.015045166015625,
0.01029205322265625,
0.036102294921875,
0.0098876953125,
0.016693115234375,
0.006412506103515625,
-0.0022125244140625,
-0.0855712890625,
-0.0157318115234375,
0.06646728515625,
-0.025970458984375,
-0.0582275390625,
0.01580810546875,
-0.008270263671875,
-0.01145172119140625,
-0.046661376953125,
0.026123046875,
0.01477813720703125,
-0.0090484619140625,
0.0467529296875,
-0.0027923583984375,
0.0163421630859375,
0.0308685302734375,
-0.009368896484375,
0.0292510986328125,
-0.0263519287109375,
0.0204620361328125,
0.00933074951171875,
-0.0369873046875,
0.03192138671875,
0.00923919677734375,
-0.05084228515625,
0.0189361572265625,
0.0053558349609375,
-0.044342041015625,
-0.01352691650390625,
0.00201416015625,
0.1005859375,
-0.044036865234375,
-0.018707275390625,
0.01209259033203125,
0.012115478515625,
-0.009490966796875,
-0.0151214599609375,
0.050140380859375,
-0.053253173828125,
-0.0147552490234375,
0.004444122314453125,
-0.0126953125,
-0.042083740234375,
-0.040740966796875,
-0.0635986328125,
0.052520751953125,
-0.00978851318359375,
0.03759765625,
0.0161895751953125,
0.01436614990234375,
-0.01898193359375,
-0.0034084320068359375,
-0.01611328125,
0.0172576904296875,
0.0259246826171875,
0.0180511474609375,
-0.034423828125,
-0.01654052734375,
-0.007640838623046875,
0.04833984375,
0.032257080078125,
-0.0089111328125,
0.0028629302978515625,
0.0182037353515625,
0.08392333984375,
0.0594482421875,
0.030426025390625,
-0.0103302001953125,
-0.0281982421875,
-0.01495361328125,
-0.00476837158203125,
-0.026275634765625,
0.01371002197265625,
-0.0203399658203125,
-0.045806884765625,
-0.003643035888671875,
0.006465911865234375,
-0.010833740234375,
0.03790283203125,
0.0244598388671875,
-0.07958984375,
0.028106689453125,
0.059844970703125,
0.0121917724609375,
-0.006328582763671875,
0.0411376953125,
0.034759521484375,
-0.04541015625,
-0.038330078125,
-0.01910400390625,
0.055816650390625,
0.020355224609375,
-0.002918243408203125,
0.0011091232299804688,
0.0009984970092773438,
0.0322265625,
-0.0196075439453125,
-0.0160675048828125,
0.021240234375,
-0.016876220703125,
0.0231475830078125,
0.0229034423828125,
0.023406982421875,
-0.0201263427734375,
-0.0066070556640625,
-0.0026149749755859375,
0.01904296875,
-0.013702392578125,
-0.015869140625,
0.0207061767578125,
-0.01500701904296875,
-0.01071929931640625,
-0.0212554931640625,
0.014007568359375,
-0.06793212890625,
-0.049285888671875,
-0.0193328857421875,
0.0004374980926513672,
0.0162506103515625,
0.008819580078125,
0.00836944580078125,
0.044647216796875,
-0.029022216796875,
-0.0065765380859375,
-0.040283203125,
0.0284271240234375,
0.0063934326171875,
0.0152587890625,
0.00838470458984375,
0.0261383056640625,
0.03131103515625,
-0.00011348724365234375,
-0.0293731689453125,
0.05938720703125,
-0.00473785400390625,
0.0308685302734375,
-0.0174407958984375,
-0.0005574226379394531,
-0.031341552734375,
0.0272216796875,
0.0179443359375,
0.00745391845703125,
0.06488037109375,
0.032867431640625,
-0.04742431640625,
-0.0120086669921875,
-0.00879669189453125,
-0.0293426513671875,
0.008758544921875,
-0.038909912109375,
0.004581451416015625,
0.002101898193359375,
-0.007965087890625,
-0.0011463165283203125,
-0.02325439453125,
0.040496826171875,
-0.02764892578125,
0.0026264190673828125,
-0.0007963180541992188,
-0.012725830078125,
0.0133514404296875,
-0.0010194778442382812,
-0.027679443359375,
-0.00531005859375,
-0.038299560546875,
0.0033893585205078125,
-0.033538818359375,
0.031646728515625,
-0.00634765625,
0.00921630859375,
-0.003265380859375,
0.053192138671875,
0.053802490234375,
-0.03582763671875,
-0.008636474609375,
0.0166015625,
0.022491455078125,
-0.0131988525390625,
0.0148162841796875,
0.0166778564453125,
-0.062103271484375,
-0.05096435546875,
-0.011810302734375,
0.037872314453125,
-0.0200347900390625,
0.035308837890625,
-0.0024127960205078125,
0.008056640625,
-0.0005307197570800781,
-0.005329132080078125,
0.0171051025390625,
-0.0181121826171875,
0.00759124755859375,
0.0187225341796875,
0.0103607177734375,
-0.01389312744140625,
-0.06011962890625,
0.025421142578125,
0.039642333984375,
-0.006122589111328125,
0.040496826171875,
0.00981903076171875,
0.00518035888671875,
-0.038848876953125,
-0.021148681640625,
-0.03839111328125,
-0.0628662109375,
-0.0299835205078125,
0.01763916015625,
-0.01500701904296875,
0.00933074951171875,
-0.002773284912109375,
0.03338623046875,
0.0399169921875,
-0.00745391845703125,
0.0657958984375,
-0.02789306640625,
0.1060791015625,
0.04095458984375,
-0.01097869873046875,
-0.034271240234375,
0.030181884765625,
-0.018829345703125,
0.009246826171875,
0.00989532470703125,
0.033935546875,
0.00414276123046875,
-0.0616455078125,
0.0204315185546875,
0.050750732421875,
0.05517578125,
-0.0135345458984375,
0.0141143798828125,
0.034454345703125,
-0.031707763671875,
0.006134033203125,
-0.022186279296875,
-0.033172607421875,
-0.0285186767578125,
0.0006227493286132812,
0.029754638671875,
-0.01111602783203125,
-0.0272064208984375,
-0.060699462890625,
0.0169677734375,
0.01312255859375,
-0.0027942657470703125,
-0.0655517578125,
-0.0008544921875,
-0.00943756103515625,
0.0706787109375,
-0.026519775390625,
0.04498291015625,
-0.033294677734375,
-0.02203369140625,
-0.0252227783203125,
-0.051788330078125,
-0.036834716796875,
0.09344482421875,
-0.0247344970703125,
-0.0172882080078125,
0.0164794921875,
-0.00043511390686035156,
0.07281494140625,
-0.021820068359375,
0.004871368408203125,
0.032806396484375,
-0.06951904296875,
0.006275177001953125,
0.057098388671875,
-0.001049041748046875,
-0.036590576171875,
-0.1064453125,
-0.023468017578125,
-0.040863037109375,
0.035430908203125,
0.00547027587890625,
-0.019561767578125,
-0.00362396240234375,
-0.032379150390625,
-0.049163818359375,
0.047454833984375,
0.00992584228515625,
-0.031829833984375,
0.0005984306335449219,
0.0099639892578125,
-0.01038360595703125,
-0.00727081298828125,
0.017852783203125,
-0.0621337890625,
0.00431060791015625,
0.0128173828125,
0.0022220611572265625,
0.052825927734375,
-0.003681182861328125,
0.0158233642578125,
-0.04669189453125,
0.0220794677734375,
0.00472259521484375,
0.01125335693359375,
-0.05035400390625,
0.0283355712890625,
0.0081634521484375,
0.01038360595703125,
0.00553131103515625,
0.041229248046875,
0.04974365234375,
0.00347137451171875,
-0.004337310791015625,
-0.0248565673828125,
-0.007083892822265625,
-0.0171051025390625,
0.034759521484375,
0.00485992431640625,
0.005809783935546875,
0.017791748046875,
-0.024688720703125,
-0.00727081298828125,
-0.0245819091796875,
-0.003612518310546875,
0.0290374755859375,
-0.05560302734375,
-0.005428314208984375,
0.0110931396484375,
0.003177642822265625,
0.00469970703125,
-0.0297393798828125,
-0.044525146484375,
-0.01369476318359375,
-0.00913238525390625,
0.022247314453125,
-0.061309814453125,
0.0095672607421875,
-0.0019102096557617188,
-0.01221466064453125,
0.0213165283203125,
-0.019439697265625,
0.021087646484375,
0.01335906982421875,
0.01073455810546875,
-0.0009555816650390625,
0.0250091552734375,
-0.03759765625,
0.0318603515625,
-0.0084991455078125,
0.01318359375,
-0.04180908203125,
0.004116058349609375,
-0.023162841796875,
-0.005401611328125,
0.0005097389221191406,
-0.0245208740234375,
0.00665283203125,
0.0087738037109375,
-0.0004639625549316406,
0.0478515625,
-0.00783538818359375,
0.006778717041015625,
-0.00957489013671875,
0.0265045166015625,
-0.0078887939453125,
0.0008511543273925781,
0.03753662109375,
-0.00836944580078125,
-0.01470947265625,
-0.004047393798828125,
0.0222015380859375,
-0.0908203125,
0.07086181640625,
-0.0280914306640625,
0.031463623046875,
0.04193115234375
] |
4631ee2eb43b957b548478bbc5974e0aaf8f995d
|
Wordpress Stackexchange
Q: How to disable Multisite sign-up page? If we try to access a non-existant Multisite site, e.g., http://site1.example.com or http://example.com/site1/, we are redirected to http://example.com/wp-signup.php?new=site1.
How to block this and redirect the browser to another page?
A: [Update]
An alternative (maybe better) is to use the following constant in wp-config.php:
define( 'NOBLOGREDIRECT', 'http://example.com' );
At the very beginning of wp-signup.php file there is this code:
function do_signup_header() {
do_action( 'signup_header' );
}
add_action( 'wp_head', 'do_signup_header' );
So, it's just a matter of adding the signup_header action hook to break any further execution and redirect the browser to other URL.
Here, wrapped as a Must Use Plugin:
<?php
/*
Plugin Name: Multisite - Prevent Sign-up Page
Plugin Url: http://wordpress.stackexchange.com/q/85529/12615
Version: 1.0
Author: Rodolfo Buaiz
*/
add_action( 'signup_header', 'rbz_prevent_multisite_signup' );
function rbz_prevent_multisite_signup()
{
wp_redirect( site_url() );
die();
}
|
Q: How to disable Multisite sign-up page? If we try to access a non-existant Multisite site, e.g., http://site1.example.com or http://example.com/site1/, we are redirected to http://example.com/wp-signup.php?new=site1.
How to block this and redirect the browser to another page?
A: [Update]
An alternative (maybe better) is to use the following constant in wp-config.php:
define( 'NOBLOGREDIRECT', 'http://example.com' );
At the very beginning of wp-signup.php file there is this code:
function do_signup_header() {
do_action( 'signup_header' );
}
add_action( 'wp_head', 'do_signup_header' );
So, it's just a matter of adding the signup_header action hook to break any further execution and redirect the browser to other URL.
Here, wrapped as a Must Use Plugin:
<?php
/*
Plugin Name: Multisite - Prevent Sign-up Page
Plugin Url: http://wordpress.stackexchange.com/q/85529/12615
Version: 1.0
Author: Rodolfo Buaiz
*/
add_action( 'signup_header', 'rbz_prevent_multisite_signup' );
function rbz_prevent_multisite_signup()
{
wp_redirect( site_url() );
die();
}
A: I found a solution in this article
I had the wrong SUBDOMAIN_INSTALL setting value in my config file.
A: Simply add the following to wp-content/mu-plugins/disable-signups.php:
<?php
remove_action( 'wp_head', 'do_signup_header' );
The signup page will now say:
Registration has been disabled.
|
wordpress
|
{
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:428975",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85529"
}
|
[
0.087890625,
0.013275146484375,
0.01294708251953125,
-0.032379150390625,
0.02496337890625,
-0.035125732421875,
0.04791259765625,
-0.041656494140625,
-0.0023441314697265625,
-0.005001068115234375,
-0.00893402099609375,
0.000980377197265625,
-0.0300445556640625,
-0.038330078125,
0.0247802734375,
-0.034332275390625,
0.005985260009765625,
0.04095458984375,
0.02862548828125,
-0.01265716552734375,
0.002368927001953125,
-0.005702972412109375,
-0.0077972412109375,
0.0272369384765625,
-0.0211944580078125,
-0.023590087890625,
0.08074951171875,
-0.029083251953125,
-0.02191162109375,
-0.04443359375,
0.003570556640625,
0.04071044921875,
0.01497650146484375,
0.03936767578125,
-0.05615234375,
-0.07080078125,
-0.0015392303466796875,
0.01204681396484375,
-0.006427764892578125,
0.029754638671875,
0.03924560546875,
-0.040069580078125,
-0.006053924560546875,
-0.01641845703125,
-0.00986480712890625,
-0.0221710205078125,
0.058258056640625,
-0.01898193359375,
0.0161590576171875,
0.01042938232421875,
-0.004119873046875,
0.01026153564453125,
0.01314544677734375,
-0.0280609130859375,
-0.03851318359375,
-0.04241943359375,
-0.0273590087890625,
0.00969696044921875,
-0.0026683807373046875,
0.063232421875,
0.0233306884765625,
0.043212890625,
-0.025390625,
-0.02105712890625,
-0.0242462158203125,
-0.006427764892578125,
-0.09722900390625,
0.017547607421875,
-0.0289306640625,
-0.01324462890625,
0.035797119140625,
-0.054351806640625,
0.005512237548828125,
-0.005489349365234375,
-0.040191650390625,
0.00029015541076660156,
-0.021728515625,
-0.022247314453125,
0.048583984375,
-0.02215576171875,
0.0018663406372070312,
-0.05224609375,
-0.03826904296875,
-0.032928466796875,
0.039276123046875,
0.024261474609375,
-0.001270294189453125,
-0.00519561767578125,
-0.03729248046875,
0.0075225830078125,
-0.042022705078125,
0.004730224609375,
-0.0205535888671875,
-0.0249176025390625,
-0.0161590576171875,
-0.008087158203125,
0.02874755859375,
0.051055908203125,
-0.0190582275390625,
-0.0286865234375,
-0.023223876953125,
-0.00997161865234375,
-0.0458984375,
-0.00951385498046875,
-0.0149688720703125,
0.093505859375,
0.016326904296875,
0.00798797607421875,
-0.006511688232421875,
-0.0024509429931640625,
0.02166748046875,
-0.0391845703125,
-0.020172119140625,
0.001857757568359375,
-0.016998291015625,
-0.02142333984375,
-0.06976318359375,
0.0184326171875,
-0.00751495361328125,
-0.018341064453125,
-0.0307769775390625,
0.0004630088806152344,
0.012054443359375,
0.0165863037109375,
0.0031452178955078125,
-0.00740814208984375,
0.008514404296875,
-0.040863037109375,
-0.039794921875,
0.0039520263671875,
-0.03826904296875,
0.0109405517578125,
0.05865478515625,
0.05328369140625,
0.026458740234375,
-0.01277923583984375,
0.0662841796875,
0.0467529296875,
0.0095062255859375,
0.0242767333984375,
-0.0198974609375,
-0.055999755859375,
-0.05078125,
-0.01197052001953125,
0.0198974609375,
0.005809783935546875,
0.01446533203125,
0.0300140380859375,
0.03363037109375,
-0.010528564453125,
-0.00466156005859375,
-0.0182952880859375,
0.013519287109375,
-0.00543975830078125,
0.006198883056640625,
-0.005245208740234375,
0.035888671875,
-0.0152130126953125,
-0.03564453125,
0.00122833251953125,
-0.00595855712890625,
0.0027904510498046875,
0.03289794921875,
-0.033966064453125,
-0.04443359375,
-0.0129241943359375,
-0.0294036865234375,
-0.02276611328125,
0.0274505615234375,
0.025177001953125,
0.00496673583984375,
-0.00844573974609375,
0.031829833984375,
0.01995849609375,
0.0008974075317382812,
0.01702880859375,
-0.0042572021484375,
0.02685546875,
0.029937744140625,
0.006313323974609375,
-0.0107269287109375,
-0.03369140625,
0.06378173828125,
-0.01393890380859375,
-0.08837890625,
0.08001708984375,
-0.00824737548828125,
0.08563232421875,
0.0160675048828125,
-0.0107421875,
0.06842041015625,
0.0232086181640625,
-0.0200958251953125,
-0.0029277801513671875,
0.0013113021850585938,
-0.0290069580078125,
-0.0185394287109375,
-0.0284271240234375,
-0.00722503662109375,
0.0252227783203125,
0.030426025390625,
-0.00029277801513671875,
0.0116424560546875,
-0.00299072265625,
-0.025634765625,
0.00019562244415283203,
-0.0133056640625,
0.0125274658203125,
0.017364501953125,
0.03155517578125,
0.01200103759765625,
0.0282745361328125,
-0.043792724609375,
-0.0075836181640625,
-0.005641937255859375,
0.0180206298828125,
-0.040924072265625,
0.039459228515625,
0.00609588623046875,
0.026702880859375,
0.0174407958984375,
-0.036834716796875,
0.025390625,
-0.0439453125,
0.05291748046875,
-0.035308837890625,
-0.027862548828125,
-0.037567138671875,
0.016998291015625,
-0.003826141357421875,
-0.03338623046875,
0.06884765625,
-0.0157928466796875,
-0.005603790283203125,
-0.05108642578125,
0.007129669189453125,
-0.00275421142578125,
-0.01538848876953125,
-0.005062103271484375,
0.0287933349609375,
0.0178680419921875,
0.04388427734375,
-0.0152435302734375,
-0.002838134765625,
-0.010345458984375,
-0.0748291015625,
0.0016880035400390625,
0.00182342529296875,
0.03436279296875,
0.057769775390625,
-0.0006380081176757812,
-0.0280914306640625,
0.0230560302734375,
-0.00630950927734375,
-0.012420654296875,
0.03363037109375,
-0.041748046875,
-0.071044921875,
0.024658203125,
-0.04107666015625,
0.037200927734375,
-0.069580078125,
-0.06072998046875,
-0.00931549072265625,
-0.01262664794921875,
-0.023101806640625,
-0.00368499755859375,
-0.01064300537109375,
-0.0013294219970703125,
-0.031097412109375,
0.01806640625,
-0.06817626953125,
-0.01209259033203125,
-0.0027217864990234375,
0.079833984375,
-0.0413818359375,
-0.02001953125,
-0.006134033203125,
-0.0105743408203125,
-0.00576019287109375,
-0.0457763671875,
0.01561737060546875,
-0.046112060546875,
-0.02911376953125,
-0.0035037994384765625,
-0.0275115966796875,
-0.0005517005920410156,
-0.032318115234375,
-0.0097808837890625,
-0.033843994140625,
0.00070953369140625,
-0.00036787986755371094,
-0.0270843505859375,
0.014434814453125,
0.025299072265625,
-0.053253173828125,
0.023773193359375,
-0.0114593505859375,
0.02227783203125,
-0.0299530029296875,
0.031524658203125,
0.05389404296875,
-0.0282440185546875,
0.014312744140625,
0.0027027130126953125,
-0.01165771484375,
-0.006565093994140625,
0.00302886962890625,
-0.01479339599609375,
-0.002056121826171875,
-0.08026123046875,
-0.00902557373046875,
0.030731201171875,
-0.04229736328125,
0.05181884765625,
-0.00920867919921875,
0.0121612548828125,
0.005615234375,
-0.0355224609375,
-0.01552581787109375,
-0.0411376953125,
-0.04888916015625,
0.0301666259765625,
-0.0023899078369140625,
-0.0115203857421875,
-0.0029773712158203125,
0.0169677734375,
0.0265655517578125,
-0.005069732666015625,
0.0022029876708984375,
-0.049774169921875,
-0.0293426513671875,
-0.034149169921875,
-0.007015228271484375,
-0.01348114013671875,
-0.004413604736328125,
0.0183258056640625,
0.008148193359375,
0.005748748779296875,
0.017974853515625,
0.040252685546875,
-0.00262451171875,
-0.0159454345703125,
-0.056884765625,
-0.038909912109375,
-0.017791748046875,
0.007297515869140625,
0.007472991943359375,
0.0039215087890625,
-0.0215911865234375,
0.046417236328125,
-0.0281982421875,
0.0010004043579101562,
-0.0391845703125,
0.0003943443298339844,
0.0302581787109375,
0.01117706298828125,
-0.0606689453125,
-0.003787994384765625,
-0.07470703125,
0.0125274658203125,
-0.033660888671875,
-0.03594970703125,
0.00084686279296875,
0.039703369140625,
-0.0202789306640625,
0.01262664794921875,
-0.038238525390625,
0.04437255859375,
-0.00820159912109375,
0.030731201171875,
-0.0106964111328125,
0.04217529296875,
0.0006175041198730469,
0.0252685546875,
-0.06695556640625,
0.048828125,
-0.00021374225616455078,
-0.008636474609375,
0.005046844482421875,
-0.005168914794921875,
-0.0430908203125,
0.00891876220703125,
-0.0853271484375,
-0.035247802734375,
0.041107177734375,
-0.060028076171875,
0.00783538818359375,
-0.0626220703125,
-0.012359619140625,
-0.0496826171875,
0.07080078125,
-0.01336669921875,
-0.019134521484375,
-0.0188446044921875,
0.0159149169921875,
-0.0233001708984375,
-0.04632568359375,
0.0125274658203125,
-0.0162506103515625,
-0.054351806640625,
-0.00911712646484375,
-0.0135345458984375,
-0.043212890625,
0.016265869140625,
-0.098876953125,
-0.008331298828125,
-0.044586181640625,
0.0237884521484375,
0.0265350341796875,
-0.0010395050048828125,
0.03863525390625,
-0.01641845703125,
0.017791748046875,
0.00045609474182128906,
-0.004673004150390625,
-0.034942626953125,
-0.004756927490234375,
-0.01861572265625,
0.036865234375,
-0.00040912628173828125,
-0.0002982616424560547,
-0.0228729248046875,
0.01491546630859375,
-0.0019893646240234375,
0.0105133056640625,
-0.005123138427734375,
-0.0084075927734375,
0.04254150390625,
-0.00030922889709472656,
-0.0128326416015625,
-0.0017080307006835938,
0.022064208984375,
0.0094757080078125,
-0.01261138916015625,
0.01380157470703125,
-0.041839599609375,
-0.0115509033203125,
0.00939178466796875,
-0.03875732421875,
-0.051116943359375,
-0.03094482421875,
0.0026454925537109375,
0.017059326171875,
-0.020050048828125,
0.004486083984375,
-0.0294342041015625,
-0.040069580078125,
0.0390625,
-0.0236663818359375,
-0.02520751953125,
-0.005870819091796875,
0.039398193359375,
0.02197265625,
-0.0067291259765625,
0.039306640625,
0.03851318359375,
0.0223388671875,
-0.0194854736328125,
0.050628662109375,
-0.00937652587890625,
-0.000392913818359375,
0.0706787109375,
-0.034881591796875,
-0.0063934326171875,
0.0294189453125,
0.018890380859375,
0.0029544830322265625,
-0.0277862548828125,
0.0028629302978515625,
-0.01424407958984375,
-0.024871826171875,
0.039794921875,
0.0191497802734375,
-0.0191497802734375,
0.0239105224609375,
-0.0004172325134277344,
0.02532958984375,
-0.06494140625,
-0.0246734619140625,
0.01004791259765625,
0.0027980804443359375,
0.0147552490234375,
0.029876708984375,
0.0347900390625,
0.003879547119140625,
-0.015106201171875,
0.00254058837890625,
-0.0204010009765625,
-0.01090240478515625,
-0.0293731689453125,
0.0013418197631835938,
0.0105743408203125,
-0.0263519287109375,
-0.0229644775390625,
0.01241302490234375,
-0.0160980224609375,
0.07867431640625,
0.0094757080078125,
-0.038238525390625,
-0.020355224609375,
-0.0157012939453125,
0.0200042724609375,
0.0067901611328125,
-0.004375457763671875,
0.0233917236328125,
0.014404296875,
-0.0171661376953125,
0.006259918212890625,
0.0203094482421875,
-0.0200042724609375,
-0.03338623046875,
-0.0196380615234375,
-0.013580322265625,
-0.00804901123046875,
0.0191192626953125,
0.028350830078125,
-0.00785064697265625,
0.024932861328125,
-0.006084442138671875,
0.020538330078125,
0.0623779296875,
-0.01290130615234375,
0.0185089111328125,
0.0211029052734375,
-0.0180816650390625,
-0.01421356201171875,
0.0268402099609375,
-0.00997161865234375,
-0.013916015625,
0.029510498046875,
0.0272064208984375,
0.021240234375,
0.01148223876953125,
-0.020233154296875,
-0.0099639892578125,
-0.036407470703125,
0.060699462890625,
-0.0011301040649414062,
-0.0777587890625,
-0.039215087890625,
-0.0012731552124023438,
0.045654296875,
-0.019439697265625,
-0.0014171600341796875,
-0.026092529296875,
-0.032684326171875,
-0.03485107421875,
0.035430908203125,
-0.062255859375,
-0.01441192626953125,
0.0192108154296875,
-0.027130126953125,
-0.03521728515625,
-0.0082855224609375,
-0.026580810546875,
0.03997802734375,
-0.0340576171875,
-0.020660400390625,
0.0220794677734375,
-0.037506103515625,
-0.01010894775390625,
-0.0170135498046875,
0.0228271484375,
-0.0253448486328125,
0.003963470458984375,
0.0714111328125,
0.036346435546875,
-0.03253173828125,
-0.008819580078125,
-0.035186767578125,
-0.02490234375,
-0.031524658203125,
-0.0160675048828125,
-0.0205230712890625,
0.01025390625,
0.0200347900390625,
0.00830078125,
-0.008270263671875,
-0.0295257568359375,
-0.006195068359375,
0.0085601806640625,
0.023712158203125,
0.00237274169921875,
-0.038726806640625,
0.024139404296875,
0.04547119140625,
0.01349639892578125,
0.02288818359375,
0.050079345703125,
0.051300048828125,
-0.0389404296875,
0.035491943359375,
-0.0374755859375,
-0.0310211181640625,
-0.02728271484375,
-0.0188140869140625,
0.0260772705078125,
0.044219970703125,
-0.0172882080078125,
-0.033660888671875,
0.01274871826171875,
0.01042938232421875,
-0.036407470703125,
0.0074920654296875,
0.016845703125,
-0.00907135009765625,
-0.03826904296875,
-0.0158843994140625,
0.0413818359375,
-0.003513336181640625,
0.007175445556640625,
-0.0000324249267578125,
-0.029632568359375,
0.0230560302734375,
0.01325225830078125,
-0.03814697265625,
0.035797119140625,
0.056549072265625,
0.0077667236328125,
0.03582763671875,
0.0019378662109375,
0.0007309913635253906,
0.004253387451171875,
0.0185699462890625,
-0.037811279296875,
-0.044097900390625,
0.03399658203125,
0.0182342529296875,
-0.006458282470703125,
0.052032470703125,
-0.00696563720703125,
0.0137176513671875,
0.06683349609375,
0.07275390625,
-0.10089111328125,
0.021881103515625,
0.01336669921875,
0.034515380859375,
0.046051025390625,
-0.007076263427734375,
0.0120849609375,
0.037445068359375,
-0.0012655258178710938,
-0.0027008056640625,
-0.0294647216796875,
0.0010251998901367188,
0.020965576171875,
-0.00931549072265625,
0.00893402099609375,
0.04339599609375,
0.0229339599609375,
-0.043487548828125,
0.0207672119140625,
0.01139068603515625,
0.0196685791015625,
-0.041656494140625,
-0.037445068359375,
0.01218414306640625,
-0.039520263671875,
-0.06488037109375,
0.01235198974609375,
-0.0205535888671875,
0.0240631103515625,
-0.02093505859375,
-0.0164794921875,
0.02374267578125,
0.0299835205078125,
-0.0226593017578125,
0.006927490234375,
0.0011491775512695312,
0.0135955810546875,
0.01296234130859375,
0.0036773681640625,
0.0164337158203125,
-0.01386260986328125,
-0.03363037109375,
0.0196380615234375,
-0.0526123046875,
-0.015655517578125,
0.00907135009765625,
0.034698486328125,
0.0221710205078125,
0.006359100341796875,
-0.02978515625,
0.061798095703125,
-0.036041259765625,
-0.0291900634765625,
-0.0202178955078125,
0.0272216796875,
-0.04888916015625,
-0.032958984375,
-0.0257568359375,
-0.046905517578125,
0.02117919921875,
-0.0440673828125,
-0.06585693359375,
0.0802001953125,
-0.0185546875,
0.05279541015625,
0.033111572265625,
0.0179595947265625,
-0.036346435546875,
-0.0025234222412109375,
-0.0255584716796875,
0.0333251953125,
-0.0114898681640625,
0.06719970703125,
-0.0229339599609375,
0.009857177734375,
0.038787841796875,
0.0152435302734375,
0.041351318359375,
0.020538330078125,
-0.03668212890625,
0.00453948974609375,
0.0174407958984375,
0.0026874542236328125,
-0.0220794677734375,
0.049163818359375,
-0.021392822265625,
0.0260467529296875,
0.01009368896484375,
-0.0767822265625,
-0.0010051727294921875,
-0.02947998046875,
-0.022491455078125,
-0.002582550048828125,
-0.01494598388671875,
-0.052154541015625,
0.00646209716796875,
0.006015777587890625,
-0.09356689453125,
0.031982421875,
0.02520751953125,
0.07879638671875,
0.006649017333984375,
-0.0011625289916992188,
-0.03704833984375,
0.0333251953125,
0.11602783203125,
-0.0440673828125,
0.0438232421875,
-0.0278472900390625,
0.0103607177734375,
0.056732177734375,
0.01503753662109375,
0.025604248046875,
0.0221710205078125,
0.0040283203125,
0.01311492919921875,
0.0112762451171875,
0.018096923828125,
0.02630615234375,
0.0325927734375,
-0.0304718017578125,
-0.01271820068359375,
0.047027587890625,
0.03851318359375,
-0.018585205078125,
-0.029693603515625,
0.009063720703125,
0.0089874267578125,
0.00872039794921875,
0.0185394287109375,
0.059295654296875,
-0.00421142578125,
-0.007305145263671875,
-0.0225677490234375,
-0.00127410888671875,
0.0225677490234375,
0.03472900390625,
-0.01180267333984375,
-0.01059722900390625,
-0.00812530517578125,
-0.01053619384765625,
-0.042633056640625,
0.0075531005859375,
0.01128387451171875,
0.040740966796875,
0.0105438232421875,
0.058685302734375,
0.00806427001953125,
-0.0181121826171875,
-0.057647705078125,
0.051239013671875,
0.006683349609375,
0.05706787109375,
-0.07183837890625,
-0.0286865234375,
0.004108428955078125,
0.0653076171875,
0.026763916015625,
0.005390167236328125,
0.04608154296875,
0.060882568359375,
0.006561279296875,
-0.00698089599609375,
0.050018310546875,
0.0012674331665039062,
0.023468017578125,
-0.042388916015625,
-0.0396728515625,
-0.031280517578125,
-0.039764404296875,
0.0071868896484375,
-0.0439453125,
0.01209259033203125,
-0.0154571533203125,
0.0215606689453125,
-0.0088958740234375,
0.00278472900390625,
0.004547119140625,
-0.008087158203125,
-0.0294952392578125,
-0.00980377197265625,
-0.08489990234375,
-0.00952911376953125,
-0.047271728515625,
-0.049774169921875,
0.041900634765625,
0.046142578125,
-0.01354217529296875,
0.00997161865234375,
-0.0103302001953125,
0.035247802734375,
0.006870269775390625,
-0.06036376953125,
-0.012786865234375,
0.01195526123046875,
0.04473876953125,
0.0193328857421875,
-0.057708740234375,
-0.0012912750244140625,
0.0146026611328125,
-0.0214691162109375,
-0.0164794921875,
0.06768798828125,
-0.003643035888671875,
-0.006725311279296875,
-0.0035305023193359375,
0.00218963623046875,
0.01154327392578125,
-0.007137298583984375,
-0.0147705078125,
0.01285552978515625,
0.011932373046875,
-0.0127716064453125,
-0.04913330078125,
0.043060302734375,
0.0121002197265625,
-0.011688232421875,
0.046966552734375,
0.004138946533203125,
-0.0082244873046875,
-0.0134429931640625,
0.025146484375,
-0.0225982666015625,
-0.07147216796875,
-0.07470703125,
0.00585174560546875,
0.0147705078125,
0.050262451171875,
-0.00917816162109375,
0.037017822265625,
0.0033321380615234375,
-0.0304107666015625,
-0.00917816162109375,
-0.04888916015625,
-0.0118865966796875,
0.038238525390625,
0.0168609619140625,
0.0174102783203125,
0.00302886962890625,
-0.0233917236328125,
-0.0027217864990234375,
0.018035888671875,
-0.0377197265625,
0.01580810546875,
-0.024322509765625,
0.02850341796875,
0.035552978515625,
0.0169830322265625,
-0.01389312744140625,
-0.0159912109375,
0.0533447265625,
-0.032745361328125,
-0.0163421630859375,
-0.049224853515625,
-0.0323486328125,
-0.038909912109375,
-0.004360198974609375,
0.032073974609375,
-0.0221405029296875,
-0.005481719970703125,
-0.0335693359375,
0.005290985107421875,
0.0219268798828125,
-0.03082275390625,
-0.0261077880859375,
-0.0027256011962890625,
-0.042449951171875,
0.05963134765625,
-0.04693603515625,
0.04962158203125,
-0.00821685791015625,
0.030120849609375,
-0.0477294921875,
-0.018524169921875,
-0.0202789306640625,
0.0259552001953125,
-0.03155517578125,
-0.027191162109375,
0.033447265625,
0.01309967041015625,
-0.0031261444091796875,
-0.08099365234375,
-0.0518798828125,
-0.0161285400390625,
-0.0421142578125,
-0.023040771484375,
0.0199737548828125,
-0.0186767578125,
-0.00606536865234375,
-0.01428985595703125,
-0.014007568359375,
-0.008453369140625,
-0.01503753662109375,
-0.0311431884765625,
0.004207611083984375,
-0.00630950927734375,
-0.022918701171875,
-0.042877197265625,
0.04180908203125,
-0.00981903076171875,
-0.01483917236328125,
-0.046112060546875,
0.00116729736328125,
0.00592803955078125,
-0.0186004638671875,
-0.0289306640625,
0.00806427001953125,
-0.0266876220703125,
0.04083251953125,
0.010467529296875,
0.00971221923828125,
0.00865936279296875,
0.031829833984375,
0.005840301513671875,
0.0479736328125,
0.036163330078125,
-0.0253753662109375,
-0.0224609375,
0.00476837158203125,
0.044281005859375,
0.050811767578125,
0.006450653076171875,
0.06268310546875,
0.0275726318359375,
-0.01033782958984375,
-0.01190948486328125,
-0.01021575927734375,
-0.0181884765625,
-0.03802490234375,
0.059844970703125,
0.0347900390625,
0.0100860595703125,
-0.0015420913696289062,
-0.00447845458984375,
-0.01739501953125,
-0.0186309814453125,
-0.018798828125,
0.01666259765625,
-0.06402587890625,
-0.0274658203125,
0.00688934326171875,
0.0084075927734375,
0.02301025390625,
0.025390625,
-0.01546478271484375,
-0.01305389404296875,
0.0214996337890625,
-0.0258026123046875,
-0.052947998046875,
0.0301361083984375,
0.035675048828125,
-0.040283203125,
-0.0260467529296875,
-0.014373779296875,
0.0060577392578125,
-0.018218994140625,
-0.05877685546875,
0.0103912353515625,
0.0255279541015625,
-0.057769775390625,
-0.005035400390625,
-0.0018739700317382812,
0.006771087646484375,
-0.03375244140625,
-0.018402099609375,
-0.01378631591796875,
0.024139404296875,
0.0021114349365234375,
0.0273284912109375,
-0.006580352783203125,
0.006198883056640625,
-0.0012216567993164062,
0.016510009765625,
0.01267242431640625,
0.00850677490234375,
-0.0253448486328125,
0.047943115234375,
0.0086822509765625,
-0.0210113525390625,
0.01551055908203125,
-0.00727081298828125,
0.0014410018920898438,
0.054229736328125,
0.042205810546875,
-0.0214996337890625,
0.07373046875,
-0.0243988037109375,
0.0472412109375,
0.01424407958984375
] |
a711bf274c63da2d17cc661099d7555dcb55c052
|
Wordpress Stackexchange
Q: wordpress loop for specific category i have this snippet for specific category it works perfect
but i want little modification to show posts by Ascending order.
<?php
// The Query
query_posts( array ( 'category_name' => 'A', 'posts_per_page' => -1 ) );
// The Loop
while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</li>
<?php endwhile;
// Reset Query
wp_reset_query();
?>
A: Add 'order'=> 'ASC' to your query
query_posts( array ( 'category_name' => 'A', 'order' => 'ASC', 'posts_per_page' => -1 ) );
|
Q: wordpress loop for specific category i have this snippet for specific category it works perfect
but i want little modification to show posts by Ascending order.
<?php
// The Query
query_posts( array ( 'category_name' => 'A', 'posts_per_page' => -1 ) );
// The Loop
while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</li>
<?php endwhile;
// Reset Query
wp_reset_query();
?>
A: Add 'order'=> 'ASC' to your query
query_posts( array ( 'category_name' => 'A', 'order' => 'ASC', 'posts_per_page' => -1 ) );
A: Pretty sure query_posts is the worst way to query...
Always use get_posts from what I'm constantly told.
Remove the arguments that you don't use on the array below.
$args = array(
'posts_per_page' => 5000,
'offset' => 0,
'category' => ,
'orderby' => 'post_date',
'order' => 'ASC',
'include' => ,
'exclude' => ,
'meta_key' => ,
'meta_value' => ,
'post_type' => 'post',
'post_mime_type' => ,
'post_parent' => ,
'post_status' => 'publish',
'suppress_filters' => true );
$posts = get_posts($args);
foreach ($posts as $post) :
?><div class="">
<a href="<?php the_permalink();?>">
<?php
echo the_title();
echo the_post_thumbnail(array(360,360));
the_excerpt('more text');
?></a></div>
<?php endforeach; ?>
<?php
WP_query method with category id's:
$query = new WP_Query( array( 'category__in' => array( 2, 6 ), 'order' => 'ASC') );
Or change the query like this, but I don't know how to add ascending to it:
add_action( 'pre_get_posts', 'add_my_custom_post_type' );
function add_my_custom_post_type( $query ) {
if ( $query->is_main_query() )
$query->set( 'category', 'A' );
// $query->set( 'order', 'ASC' ); maybe?
return $query;
}
A: Just add an argument to the array...
query_posts( array ( 'category_name' => 'A', 'posts_per_page' => -1, 'order' => 'ASC' ) );
...but don't use query_posts, see here why. Instead you could do this:
$args = array(
'category_name' => 'A',
'posts_per_page' => -1,
'order' => 'ASC',
);
$your_query = new WP_Query($args);
while ($your_query->have_posts()) : $your_query->the_post();
|
wordpress
|
{
"language": "en",
"length": 308,
"provenance": "stackexchange_00019.jsonl.gz:428993",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85609"
}
|
[
0.058990478515625,
0.02471923828125,
-0.0277252197265625,
-0.0032100677490234375,
0.046539306640625,
-0.05322265625,
0.052215576171875,
-0.0347900390625,
0.046539306640625,
0.0275421142578125,
-0.047698974609375,
-0.03033447265625,
0.0237274169921875,
-0.0274810791015625,
-0.0300750732421875,
-0.0260467529296875,
0.035125732421875,
-0.0230255126953125,
0.049041748046875,
0.0016469955444335938,
0.021209716796875,
0.03021240234375,
0.055938720703125,
0.0416259765625,
-0.0200347900390625,
0.004547119140625,
0.0863037109375,
-0.04083251953125,
0.00476837158203125,
-0.034149169921875,
0.0083770751953125,
-0.0078125,
-0.00685882568359375,
0.0029125213623046875,
0.037200927734375,
0.007808685302734375,
0.034637451171875,
-0.00637054443359375,
0.01373291015625,
0.043304443359375,
0.030303955078125,
-0.0272674560546875,
0.0187225341796875,
0.0169677734375,
-0.0029430389404296875,
-0.035797119140625,
0.037322998046875,
-0.04083251953125,
0.02960205078125,
-0.056854248046875,
0.019927978515625,
0.0037078857421875,
0.03759765625,
-0.0245513916015625,
-0.043304443359375,
0.0106048583984375,
0.01293182373046875,
-0.0176544189453125,
0.041107177734375,
-0.044586181640625,
-0.04730224609375,
-0.0251922607421875,
0.0423583984375,
-0.0011205673217773438,
-0.016143798828125,
-0.01126861572265625,
0.0280914306640625,
0.01143646240234375,
-0.030609130859375,
-0.0167694091796875,
0.0509033203125,
-0.01006317138671875,
-0.0302886962890625,
0.0132598876953125,
-0.01366424560546875,
-0.0186767578125,
0.0034389495849609375,
-0.03912353515625,
0.01287078857421875,
0.033599853515625,
-0.006122589111328125,
0.011138916015625,
-0.0272674560546875,
-0.02606201171875,
0.002681732177734375,
-0.020660400390625,
-0.01336669921875,
0.0002887248992919922,
-0.029266357421875,
-0.036773681640625,
-0.0225677490234375,
0.026947021484375,
-0.031494140625,
-0.0289306640625,
-0.0401611328125,
-0.0213470458984375,
0.01253509521484375,
0.0318603515625,
-0.0169677734375,
-0.0128326416015625,
0.0034084320068359375,
-0.0268402099609375,
-0.01593017578125,
-0.006725311279296875,
0.026275634765625,
-0.01183319091796875,
0.004634857177734375,
0.0173492431640625,
0.0675048828125,
0.044830322265625,
-0.010101318359375,
0.08380126953125,
-0.01210784912109375,
-0.01267242431640625,
-0.023956298828125,
0.0175323486328125,
-0.044189453125,
0.01806640625,
-0.001728057861328125,
0.010223388671875,
-0.00008445978164672852,
0.054046630859375,
0.01702880859375,
-0.036651611328125,
-0.0075531005859375,
0.0083770751953125,
0.0040740966796875,
-0.08343505859375,
0.00760650634765625,
0.0208740234375,
-0.042633056640625,
0.00738525390625,
0.07232666015625,
0.029266357421875,
0.006317138671875,
-0.0218505859375,
0.00522613525390625,
-0.027130126953125,
0.008636474609375,
0.025726318359375,
-0.0011453628540039062,
-0.02716064453125,
0.024688720703125,
0.0101470947265625,
0.0278778076171875,
0.005657196044921875,
-0.005825042724609375,
0.01800537109375,
0.0295257568359375,
-0.0014963150024414062,
0.0293121337890625,
-0.046966552734375,
0.020904541015625,
0.0070953369140625,
-0.0120391845703125,
-0.0201568603515625,
-0.0093994140625,
-0.0190887451171875,
0.0110626220703125,
-0.0184783935546875,
0.0278778076171875,
-0.00359344482421875,
0.013519287109375,
-0.0304412841796875,
-0.055389404296875,
0.002155303955078125,
-0.056549072265625,
-0.0223236083984375,
0.01239013671875,
-0.005672454833984375,
0.018341064453125,
-0.00983428955078125,
0.0226898193359375,
-0.0089111328125,
-0.0052947998046875,
0.0063323974609375,
-0.043121337890625,
-0.018585205078125,
0.0255889892578125,
0.00984954833984375,
-0.0235137939453125,
-0.044403076171875,
-0.036956787109375,
0.028289794921875,
-0.0428466796875,
0.0185546875,
0.0159912109375,
0.025360107421875,
-0.016387939453125,
0.01480865478515625,
0.064697265625,
0.037017822265625,
-0.054107666015625,
0.035003662109375,
0.00366973876953125,
-0.0194549560546875,
-0.0244140625,
-0.0029315948486328125,
-0.0018949508666992188,
-0.044586181640625,
-0.00731658935546875,
0.0012445449829101562,
-0.01384735107421875,
0.011810302734375,
-0.03778076171875,
0.01123809814453125,
-0.01055908203125,
0.034912109375,
0.0364990234375,
0.0007758140563964844,
0.0123291015625,
0.022003173828125,
-0.0176239013671875,
-0.055816650390625,
-0.08428955078125,
0.01316070556640625,
-0.006015777587890625,
-0.009613037109375,
-0.01263427734375,
0.00855255126953125,
-0.01155853271484375,
-0.00337982177734375,
-0.020538330078125,
0.04083251953125,
0.07562255859375,
-0.00533294677734375,
-0.0229949951171875,
-0.04962158203125,
0.006885528564453125,
0.01375579833984375,
-0.1092529296875,
0.039093017578125,
0.033355712890625,
0.05657958984375,
-0.04766845703125,
-0.0135345458984375,
-0.01201629638671875,
0.0078887939453125,
-0.0012598037719726562,
0.032501220703125,
0.0225830078125,
0.0077362060546875,
-0.0238189697265625,
-0.0175628662109375,
0.031646728515625,
-0.03466796875,
-0.0040283203125,
-0.00746917724609375,
0.004413604736328125,
0.048980712890625,
0.0226593017578125,
0.017913818359375,
0.021820068359375,
0.0390625,
-0.0007047653198242188,
0.0255584716796875,
0.033172607421875,
0.056182861328125,
-0.042510986328125,
0.017059326171875,
-0.004791259765625,
0.008575439453125,
-0.0237884521484375,
0.01325225830078125,
0.03912353515625,
0.006076812744140625,
0.0250396728515625,
0.0160369873046875,
-0.03436279296875,
0.0157318115234375,
0.007671356201171875,
-0.01629638671875,
-0.0093994140625,
0.00295257568359375,
-0.06011962890625,
-0.004360198974609375,
-0.04705810546875,
0.0286712646484375,
0.0010118484497070312,
-0.0270538330078125,
-0.005558013916015625,
0.03570556640625,
0.0149383544921875,
-0.012603759765625,
-0.042449951171875,
-0.074951171875,
0.01483154296875,
0.03851318359375,
-0.051910400390625,
-0.0092620849609375,
0.035797119140625,
0.0013561248779296875,
-0.045684814453125,
0.01424407958984375,
-0.038482666015625,
0.0004458427429199219,
-0.00787353515625,
-0.047271728515625,
0.037200927734375,
-0.054840087890625,
0.039093017578125,
0.068603515625,
-0.0184326171875,
0.033050537109375,
0.00047135353088378906,
0.0101318359375,
0.00608062744140625,
0.0192108154296875,
-0.006046295166015625,
-0.0184173583984375,
-0.024383544921875,
0.0106048583984375,
0.053009033203125,
0.07080078125,
0.044647216796875,
-0.0161895751953125,
0.052032470703125,
0.065185546875,
-0.043304443359375,
-0.1287841796875,
0.035430908203125,
-0.048553466796875,
0.046875,
0.0013074874877929688,
-0.0182342529296875,
-0.05609130859375,
0.027191162109375,
0.00693511962890625,
0.004383087158203125,
-0.003833770751953125,
-0.0670166015625,
-0.050537109375,
-0.0733642578125,
-0.03955078125,
-0.01280975341796875,
0.01373291015625,
0.0084228515625,
0.051605224609375,
0.00835418701171875,
-0.061798095703125,
-0.016021728515625,
0.001995086669921875,
-0.046478271484375,
-0.0201568603515625,
-0.00102996826171875,
-0.01323699951171875,
-0.00859832763671875,
0.020172119140625,
0.0433349609375,
0.007335662841796875,
-0.0085296630859375,
-0.017303466796875,
-0.0197601318359375,
0.0083160400390625,
0.02301025390625,
0.01299285888671875,
0.0196075439453125,
0.043609619140625,
0.033111572265625,
0.003711700439453125,
-0.029510498046875,
-0.0181121826171875,
-0.0557861328125,
-0.0272216796875,
0.023040771484375,
0.02789306640625,
-0.04449462890625,
0.009307861328125,
-0.0112762451171875,
0.0014133453369140625,
-0.018951416015625,
-0.0546875,
0.05670166015625,
0.01209259033203125,
0.0141448974609375,
0.0028171539306640625,
0.0001983642578125,
-0.0295257568359375,
-0.0199737548828125,
-0.022064208984375,
-0.017547607421875,
-0.0285491943359375,
0.0067138671875,
-0.028717041015625,
-0.0469970703125,
0.0211181640625,
-0.0099029541015625,
0.024017333984375,
-0.01308441162109375,
-0.0249481201171875,
0.016357421875,
0.07672119140625,
-0.03680419921875,
-0.0189361572265625,
-0.0222930908203125,
-0.009613037109375,
-0.0246734619140625,
0.0058135986328125,
-0.0465087890625,
0.00051116943359375,
-0.08697509765625,
-0.0035572052001953125,
-0.0293426513671875,
-0.020782470703125,
-0.01430511474609375,
0.0159759521484375,
-0.05169677734375,
-0.04180908203125,
0.036865234375,
-0.03204345703125,
0.0211029052734375,
-0.00612640380859375,
0.00677490234375,
-0.022369384765625,
-0.01316070556640625,
-0.03460693359375,
-0.0887451171875,
-0.0162353515625,
-0.00856781005859375,
0.0567626953125,
0.00783538818359375,
-0.0202178955078125,
-0.007572174072265625,
0.0682373046875,
-0.01230621337890625,
0.0159149169921875,
0.017303466796875,
0.027862548828125,
-0.0118255615234375,
0.00726318359375,
0.006519317626953125,
-0.031341552734375,
-0.0172271728515625,
-0.04052734375,
0.030029296875,
0.0197296142578125,
-0.0550537109375,
-0.00676727294921875,
-0.07574462890625,
0.019500732421875,
-0.058929443359375,
-0.0236053466796875,
0.00970458984375,
0.0165252685546875,
-0.0034008026123046875,
0.01776123046875,
-0.02252197265625,
-0.055572509765625,
0.01297760009765625,
0.0171966552734375,
-0.022003173828125,
0.023193359375,
0.042205810546875,
0.00806427001953125,
-0.02777099609375,
-0.0660400390625,
-0.0026988983154296875,
0.004665374755859375,
-0.0210418701171875,
0.06134033203125,
0.0083160400390625,
0.002593994140625,
0.0609130859375,
-0.011077880859375,
-0.0011749267578125,
0.006595611572265625,
-0.0203704833984375,
0.0104217529296875,
-0.033203125,
0.00980377197265625,
0.001495361328125,
0.0267486572265625,
0.04058837890625,
-0.0080718994140625,
-0.0155487060546875,
-0.00007289648056030273,
0.0298309326171875,
-0.00959014892578125,
-0.00199127197265625,
-0.022735595703125,
-0.01397705078125,
0.0012912750244140625,
0.03143310546875,
0.039581298828125,
0.059814453125,
-0.0147705078125,
0.0191497802734375,
0.02288818359375,
0.005855560302734375,
0.00015747547149658203,
0.04669189453125,
-0.0039825439453125,
0.036834716796875,
0.01204681396484375,
-0.0008063316345214844,
-0.0280609130859375,
0.004364013671875,
0.0098876953125,
0.01097869873046875,
-0.030181884765625,
-0.01421356201171875,
0.006008148193359375,
0.0223541259765625,
0.005535125732421875,
-0.0202484130859375,
0.016265869140625,
-0.0118408203125,
0.03228759765625,
0.020599365234375,
-0.044158935546875,
-0.0140380859375,
0.0064849853515625,
0.021453857421875,
0.00859832763671875,
-0.008087158203125,
-0.0026702880859375,
0.05194091796875,
0.0025234222412109375,
0.03057861328125,
-0.01013946533203125,
0.018402099609375,
0.050079345703125,
-0.01160430908203125,
0.01084136962890625,
0.0142822265625,
-0.01727294921875,
-0.019775390625,
0.031524658203125,
-0.042144775390625,
-0.0048675537109375,
-0.01947021484375,
0.0400390625,
-0.030975341796875,
-0.033966064453125,
0.055419921875,
-0.015777587890625,
-0.0207061767578125,
0.037567138671875,
0.031585693359375,
-0.0083465576171875,
-0.0390625,
-0.047454833984375,
0.020965576171875,
0.01226043701171875,
0.00891876220703125,
-0.00011014938354492188,
-0.0072479248046875,
0.0147857666015625,
0.0013875961303710938,
0.013916015625,
-0.0114593505859375,
-0.016021728515625,
-0.02288818359375,
-0.006946563720703125,
0.005702972412109375,
0.0215301513671875,
-0.00873565673828125,
-0.0084991455078125,
-0.0302581787109375,
0.00957489013671875,
0.032470703125,
0.07733154296875,
-0.03155517578125,
-0.0697021484375,
-0.000820159912109375,
-0.0216522216796875,
0.061859130859375,
0.02264404296875,
-0.07708740234375,
0.025054931640625,
-0.05828857421875,
-0.018890380859375,
-0.027740478515625,
-0.0316162109375,
-0.0760498046875,
-0.02032470703125,
0.0275726318359375,
0.01189422607421875,
0.0162353515625,
-0.0201263427734375,
-0.042205810546875,
-0.0088958740234375,
0.0207977294921875,
-0.0028133392333984375,
-0.00661468505859375,
0.05267333984375,
0.007099151611328125,
0.03863525390625,
0.0214080810546875,
0.024505615234375,
-0.009765625,
-0.0266265869140625,
0.01580810546875,
-0.044189453125,
-0.0421142578125,
0.03973388671875,
-0.0672607421875,
-0.006908416748046875,
0.0284881591796875,
-0.009307861328125,
0.004306793212890625,
-0.019622802734375,
0.0170135498046875,
-0.01021575927734375,
-0.012725830078125,
-0.01299285888671875,
-0.032440185546875,
0.046295166015625,
0.006130218505859375,
0.0090179443359375,
-0.00507354736328125,
-0.042388916015625,
0.01065826416015625,
0.0186920166015625,
0.00623321533203125,
-0.007038116455078125,
-0.048614501953125,
0.044891357421875,
0.0625,
0.03338623046875,
0.056640625,
0.003093719482421875,
0.044525146484375,
0.005428314208984375,
-0.0037784576416015625,
0.059600830078125,
0.026824951171875,
0.082763671875,
-0.0165252685546875,
-0.01377105712890625,
0.0209808349609375,
-0.051788330078125,
-0.034820556640625,
0.0399169921875,
0.04595947265625,
-0.036834716796875,
-0.01309967041015625,
0.0251312255859375,
-0.0074005126953125,
-0.018463134765625,
0.0147857666015625,
0.014495849609375,
-0.0161895751953125,
0.0367431640625,
-0.0123748779296875,
-0.00437164306640625,
0.00870513916015625,
-0.033203125,
-0.0030727386474609375,
-0.0076904296875,
0.031005859375,
0.00958251953125,
-0.07257080078125,
-0.003017425537109375,
0.04058837890625,
-0.038909912109375,
-0.0249481201171875,
-0.0305938720703125,
0.0169525146484375,
-0.0121612548828125,
-0.05615234375,
0.02996826171875,
-0.0401611328125,
0.031829833984375,
0.01401519775390625,
-0.018157958984375,
-0.0252227783203125,
0.050201416015625,
-0.0322265625,
0.03948974609375,
0.02978515625,
-0.05718994140625,
0.01050567626953125,
-0.009490966796875,
-0.01020050048828125,
0.01197052001953125,
-0.03717041015625,
0.003055572509765625,
-0.00995635986328125,
0.01551055908203125,
-0.01210784912109375,
-0.05316162109375,
0.0599365234375,
-0.047576904296875,
-0.0037746429443359375,
0.0191802978515625,
0.045379638671875,
-0.007434844970703125,
0.01177215576171875,
0.0364990234375,
-0.0203399658203125,
0.0137939453125,
0.019683837890625,
0.0178680419921875,
-0.01136016845703125,
-0.004100799560546875,
-0.0499267578125,
0.047119140625,
-0.032745361328125,
0.0234375,
0.023284912109375,
0.013275146484375,
0.0049896240234375,
0.013397216796875,
-0.03643798828125,
0.05029296875,
0.0347900390625,
0.043548583984375,
-0.047271728515625,
-0.01471710205078125,
0.01366424560546875,
0.046844482421875,
0.048614501953125,
0.0098724365234375,
-0.058258056640625,
-0.0013065338134765625,
0.0462646484375,
0.0699462890625,
0.029449462890625,
0.0296630859375,
-0.0179290771484375,
0.038848876953125,
0.03564453125,
-0.01132965087890625,
0.033050537109375,
0.035797119140625,
-0.043487548828125,
0.03289794921875,
0.0189056396484375,
0.028961181640625,
-0.005466461181640625,
0.035614013671875,
-0.051025390625,
-0.0020160675048828125,
0.052215576171875,
-0.0116729736328125,
0.00528717041015625,
0.07025146484375,
0.032928466796875,
-0.04705810546875,
-0.039642333984375,
-0.026611328125,
0.04888916015625,
-0.007671356201171875,
0.03802490234375,
0.04339599609375,
0.0268707275390625,
0.048126220703125,
0.0010128021240234375,
0.0216522216796875,
0.0027446746826171875,
-0.0243988037109375,
0.045501708984375,
0.037384033203125,
0.0303955078125,
-0.023956298828125,
0.005397796630859375,
0.0311126708984375,
0.05145263671875,
-0.0513916015625,
-0.023529052734375,
0.009429931640625,
0.001224517822265625,
0.025482177734375,
-0.02691650390625,
0.0227813720703125,
0.015472412109375,
0.029510498046875,
-0.048065185546875,
-0.0169219970703125,
0.0225982666015625,
0.047943115234375,
-0.01300811767578125,
-0.044403076171875,
-0.03155517578125,
-0.028900146484375,
-0.0236968994140625,
0.0293731689453125,
0.002532958984375,
0.0226898193359375,
-0.01546478271484375,
0.0445556640625,
-0.011199951171875,
-0.00934600830078125,
-0.01605224609375,
0.035491943359375,
-0.019378662109375,
0.020263671875,
-0.01849365234375,
-0.02020263671875,
-0.031707763671875,
0.0288238525390625,
0.03094482421875,
-0.00022280216217041016,
0.06256103515625,
0.0413818359375,
-0.0310211181640625,
-0.0034313201904296875,
0.03955078125,
-0.01076507568359375,
-0.03460693359375,
-0.00597381591796875,
-0.001842498779296875,
0.039947509765625,
0.006343841552734375,
0.007419586181640625,
0.05609130859375,
0.01593017578125,
-0.000148773193359375,
-0.0030918121337890625,
0.0088653564453125,
-0.03369140625,
0.0440673828125,
-0.0004916191101074219,
0.084716796875,
0.01528167724609375,
-0.0877685546875,
-0.0218505859375,
-0.041015625,
-0.058441162109375,
0.03973388671875,
0.04937744140625,
0.01274871826171875,
-0.0275115966796875,
0.00962066650390625,
-0.053619384765625,
0.0255584716796875,
0.025848388671875,
0.01739501953125,
0.01253509521484375,
-0.0006337165832519531,
-0.01381683349609375,
-0.05059814453125,
-0.034698486328125,
0.0019159317016601562,
0.032958984375,
0.0242919921875,
0.01314544677734375,
0.030609130859375,
0.0284881591796875,
-0.0226287841796875,
0.0120849609375,
-0.0238494873046875,
-0.03466796875,
0.05865478515625,
0.006061553955078125,
0.0040740966796875,
-0.0166168212890625,
-0.00017440319061279297,
0.0012502670288085938,
0.04681396484375,
-0.043182373046875,
-0.008209228515625,
-0.01806640625,
0.016693115234375,
-0.022552490234375,
0.00661468505859375,
-0.0116424560546875,
-0.00925445556640625,
-0.004001617431640625,
-0.0120849609375,
0.024688720703125,
0.038970947265625,
0.01100921630859375,
-0.002590179443359375,
-0.038238525390625,
-0.0032062530517578125,
0.0070648193359375,
0.038421630859375,
-0.01043701171875,
0.035430908203125,
-0.055145263671875,
0.01837158203125,
0.0176239013671875,
-0.007781982421875,
0.01751708984375,
0.0247955322265625,
-0.0293426513671875,
0.006519317626953125,
-0.004802703857421875,
-0.027130126953125,
0.03851318359375,
0.04083251953125,
-0.00860595703125,
0.0192413330078125,
-0.0233001708984375,
-0.0227813720703125,
0.0140228271484375,
0.031829833984375,
-0.04754638671875,
-0.01389312744140625,
0.0005464553833007812,
0.0021839141845703125,
-0.011016845703125,
-0.0447998046875,
-0.0704345703125,
-0.0160980224609375,
0.007450103759765625,
-0.010498046875,
-0.00954437255859375,
0.001743316650390625,
-0.0154266357421875,
0.010894775390625,
-0.052490234375,
-0.0260009765625,
0.002094268798828125,
0.0241851806640625,
-0.035308837890625,
0.0078887939453125,
-0.04693603515625,
-0.0252532958984375,
-0.039581298828125,
-0.0047760009765625,
-0.004253387451171875,
-0.031829833984375,
-0.0279693603515625,
0.0036945343017578125,
0.0234375,
0.04302978515625,
0.08563232421875,
0.0080718994140625,
0.0313720703125,
0.034881591796875,
-0.07611083984375,
-0.0731201171875,
0.032073974609375,
-0.0232086181640625,
-0.002971649169921875,
0.0055084228515625,
0.0148162841796875,
0.061126708984375,
-0.0008134841918945312,
-0.052459716796875,
0.02606201171875,
-0.01506805419921875,
-0.032379150390625,
-0.0212860107421875,
0.0168304443359375,
-0.0102386474609375,
0.013885498046875,
0.01016998291015625,
-0.0287017822265625,
-0.0233612060546875,
0.005374908447265625,
0.030853271484375,
0.0130615234375,
0.0289764404296875,
0.03167724609375,
-0.05963134765625,
0.027069091796875,
-0.0007491111755371094,
0.0236968994140625,
0.013671875,
-0.00933837890625,
0.03533935546875,
0.04022216796875,
-0.027069091796875,
-0.0211029052734375,
-0.021087646484375,
-0.01499176025390625,
0.0198516845703125,
-0.016937255859375,
-0.0550537109375,
-0.0498046875,
0.030364990234375,
0.024383544921875,
0.0283966064453125,
0.007236480712890625,
-0.045013427734375,
-0.0151519775390625,
0.0118865966796875,
-0.01666259765625,
0.0243072509765625,
-0.07952880859375,
-0.01230621337890625,
0.00896453857421875,
-0.003795623779296875,
-0.0030536651611328125,
-0.024749755859375,
-0.031158447265625,
-0.01763916015625,
-0.028472900390625,
-0.0015478134155273438,
-0.0340576171875,
0.034027099609375,
-0.01280975341796875,
-0.0097198486328125,
-0.033203125,
-0.01264190673828125,
-0.00847625732421875,
-0.044158935546875,
-0.0093536376953125,
-0.00982666015625,
0.021484375,
0.0032672882080078125,
-0.0054931640625,
0.02490234375,
0.001194000244140625,
0.0248260498046875,
0.0207977294921875,
-0.038055419921875,
0.030059814453125,
0.03692626953125,
0.01507568359375,
-0.047119140625,
0.060882568359375,
0.054351806640625,
0.043701171875,
0.0164794921875,
0.054107666015625,
0.007007598876953125,
0.05584716796875,
-0.006378173828125,
-0.0394287109375,
0.0189971923828125,
-0.0596923828125,
-0.00412750244140625,
0.01021575927734375,
-0.0284423828125,
-0.01715087890625,
0.0108489990234375,
-0.00920867919921875,
-0.03240966796875,
0.0130767822265625
] |
0750fa3ac9eeb26a4bc267db4a064f38063697dd
|
Wordpress Stackexchange
Q: WP_Query pulling an extra post per page I'm querying to get a list of all posts, 20 posts_per_page, but the result shows all posts, but with 21 posts per page. If I change posts_per_page to 19, then 20 show. One post is sticky and shows up twice; not sure if that is causing the problem.
Code:
$allposts = array(
'post_type' => 'post',
'posts_per_page' => 20
);
$wp_query = new WP_Query($allposts); ?>
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
<li><?php the_title(); ?></li>
<?php foo_pagination(); ?>
<?php endwhile; ?>
A: Sticky posts do add to the post count rather than being included in it. You can alter your query to ignore sticky posts though.
$allposts = array(
'post_type' => 'post',
'posts_per_page' => 20,
'ignore_sticky_posts' => true
);
But you are also missing pagination parameters.
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$allposts = array(
'post_type' => 'post',
'posts_per_page' => 20,
'ignore_sticky_posts' => true,
'paged' => $paged
);
|
Q: WP_Query pulling an extra post per page I'm querying to get a list of all posts, 20 posts_per_page, but the result shows all posts, but with 21 posts per page. If I change posts_per_page to 19, then 20 show. One post is sticky and shows up twice; not sure if that is causing the problem.
Code:
$allposts = array(
'post_type' => 'post',
'posts_per_page' => 20
);
$wp_query = new WP_Query($allposts); ?>
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
<li><?php the_title(); ?></li>
<?php foo_pagination(); ?>
<?php endwhile; ?>
A: Sticky posts do add to the post count rather than being included in it. You can alter your query to ignore sticky posts though.
$allposts = array(
'post_type' => 'post',
'posts_per_page' => 20,
'ignore_sticky_posts' => true
);
But you are also missing pagination parameters.
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$allposts = array(
'post_type' => 'post',
'posts_per_page' => 20,
'ignore_sticky_posts' => true,
'paged' => $paged
);
|
wordpress
|
{
"language": "en",
"length": 157,
"provenance": "stackexchange_00019.jsonl.gz:429002",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85657"
}
|
[
0.08807373046875,
0.0164031982421875,
0.005100250244140625,
-0.0361328125,
0.045501708984375,
-0.0550537109375,
0.08349609375,
-0.02764892578125,
-0.0137939453125,
0.00945281982421875,
-0.026458740234375,
-0.0126953125,
0.012786865234375,
-0.02618408203125,
0.014862060546875,
-0.03179931640625,
0.039093017578125,
-0.0294647216796875,
0.0226593017578125,
-0.005374908447265625,
0.0258636474609375,
0.00893402099609375,
0.027130126953125,
0.050262451171875,
0.0364990234375,
-0.035919189453125,
0.043487548828125,
-0.0166015625,
0.0213775634765625,
-0.0222930908203125,
0.021087646484375,
0.00379180908203125,
0.0146331787109375,
0.02984619140625,
-0.024810791015625,
-0.002544403076171875,
0.021148681640625,
-0.004016876220703125,
0.0003540515899658203,
0.01806640625,
-0.004253387451171875,
0.007648468017578125,
0.0037078857421875,
0.052886962890625,
-0.027130126953125,
-0.038665771484375,
0.01708984375,
-0.016265869140625,
0.025421142578125,
0.0106201171875,
0.021453857421875,
0.042938232421875,
0.045074462890625,
-0.0178070068359375,
-0.0180206298828125,
-0.0025234222412109375,
0.0625,
-0.0145263671875,
0.04949951171875,
-0.076171875,
-0.07012939453125,
-0.0222930908203125,
0.0501708984375,
-0.0166168212890625,
-0.031341552734375,
-0.0005693435668945312,
0.00814056396484375,
-0.0005960464477539062,
-0.043670654296875,
-0.036651611328125,
0.033721923828125,
-0.015045166015625,
-0.012847900390625,
0.0157623291015625,
-0.0013103485107421875,
-0.030975341796875,
-0.0006213188171386719,
-0.00783538818359375,
0.0167388916015625,
0.01308441162109375,
-0.01305389404296875,
-0.0189666748046875,
-0.055938720703125,
0.007381439208984375,
0.00600433349609375,
0.038299560546875,
-0.0302734375,
-0.01568603515625,
-0.00862884521484375,
-0.0048675537109375,
-0.0052947998046875,
-0.006816864013671875,
-0.0292510986328125,
0.0080108642578125,
0.007152557373046875,
-0.034271240234375,
0.005908966064453125,
0.030548095703125,
-0.0185546875,
-0.01113128662109375,
-0.03729248046875,
-0.0079803466796875,
-0.026763916015625,
-0.020172119140625,
0.0285491943359375,
-0.0232086181640625,
-0.0074615478515625,
0.01800537109375,
0.0802001953125,
0.0477294921875,
-0.0019311904907226562,
0.107177734375,
0.00469207763671875,
0.0300445556640625,
-0.049041748046875,
-0.0296478271484375,
-0.041351318359375,
-0.003391265869140625,
-0.001895904541015625,
0.002117156982421875,
0.01403045654296875,
0.034027099609375,
-0.030853271484375,
-0.0258026123046875,
-0.007663726806640625,
-0.032623291015625,
-0.01131439208984375,
-0.0089569091796875,
0.021392822265625,
0.043792724609375,
-0.028411865234375,
-0.01535797119140625,
0.004993438720703125,
-0.0024929046630859375,
-0.00835418701171875,
-0.04107666015625,
0.0032711029052734375,
-0.03082275390625,
-0.022705078125,
0.0689697265625,
-0.054107666015625,
-0.0718994140625,
0.0064849853515625,
-0.01399993896484375,
0.0171661376953125,
0.002613067626953125,
0.031097412109375,
0.0248260498046875,
-0.03631591796875,
-0.0174102783203125,
0.011749267578125,
0.0178070068359375,
0.02545166015625,
-0.023345947265625,
-0.052398681640625,
-0.02630615234375,
-0.07025146484375,
0.0003695487976074219,
-0.01485443115234375,
-0.01285552978515625,
0.026702880859375,
0.01617431640625,
0.01329803466796875,
-0.037261962890625,
-0.061065673828125,
-0.03521728515625,
-0.039031982421875,
-0.0145263671875,
0.01007843017578125,
-0.00452423095703125,
0.007568359375,
0.0163726806640625,
0.031585693359375,
0.01171112060546875,
-0.0009584426879882812,
0.00017690658569335938,
0.02117919921875,
-0.03509521484375,
0.032012939453125,
-0.0285797119140625,
-0.06549072265625,
-0.037933349609375,
0.030670166015625,
-0.035186767578125,
-0.038604736328125,
0.0024127960205078125,
0.0197601318359375,
0.0177154541015625,
-0.020233154296875,
0.01152801513671875,
0.057281494140625,
0.0625,
0.0020732879638671875,
0.015716552734375,
-0.0005774497985839844,
-0.0089111328125,
-0.022735595703125,
0.005374908447265625,
-0.01526641845703125,
-0.0039215087890625,
-0.0011157989501953125,
-0.0042572021484375,
-0.0038204193115234375,
0.004161834716796875,
-0.040191650390625,
-0.0012311935424804688,
-0.01224517822265625,
0.0386962890625,
0.006168365478515625,
0.03680419921875,
0.02001953125,
0.016082763671875,
-0.06591796875,
0.06317138671875,
0.00167083740234375,
0.00823211669921875,
0.016693115234375,
0.01097869873046875,
-0.0377197265625,
-0.004993438720703125,
-0.0176239013671875,
-0.025909423828125,
-0.0269012451171875,
0.05419921875,
0.09765625,
-0.0214691162109375,
-0.01061248779296875,
-0.047882080078125,
0.055145263671875,
0.0034618377685546875,
-0.072021484375,
0.06365966796875,
0.00922393798828125,
0.0230560302734375,
-0.0248260498046875,
0.014556884765625,
0.0198516845703125,
-0.0170745849609375,
0.004608154296875,
0.0255584716796875,
0.039306640625,
0.0117645263671875,
0.005859375,
0.018218994140625,
0.040802001953125,
-0.057464599609375,
0.0081329345703125,
0.0014972686767578125,
-0.00925445556640625,
0.0151214599609375,
0.047515869140625,
0.010711669921875,
0.00180816650390625,
-0.00536346435546875,
0.02191162109375,
0.0165863037109375,
0.030792236328125,
0.0423583984375,
-0.05670166015625,
0.05194091796875,
-0.025665283203125,
0.03814697265625,
0.0295257568359375,
0.00572967529296875,
0.040985107421875,
-0.01486968994140625,
0.01363372802734375,
0.006664276123046875,
-0.01788330078125,
-0.006092071533203125,
0.0146484375,
-0.018829345703125,
0.0032062530517578125,
-0.000911712646484375,
-0.03668212890625,
-0.031158447265625,
-0.03253173828125,
0.0310211181640625,
0.00661468505859375,
-0.0206298828125,
-0.00957489013671875,
0.040557861328125,
-0.00028705596923828125,
-0.00852203369140625,
-0.014373779296875,
-0.02947998046875,
0.0008673667907714844,
-0.00537872314453125,
-0.0023250579833984375,
0.006702423095703125,
0.0168304443359375,
0.0247802734375,
0.005687713623046875,
0.0007147789001464844,
0.02215576171875,
-0.00646209716796875,
0.0113525390625,
-0.03948974609375,
0.049468994140625,
-0.042236328125,
0.055084228515625,
0.060943603515625,
-0.02740478515625,
0.027587890625,
-0.0058746337890625,
-0.00677490234375,
-0.003810882568359375,
0.011688232421875,
-0.02386474609375,
-0.034881591796875,
-0.02777099609375,
0.0251007080078125,
0.016143798828125,
0.03472900390625,
-0.005828857421875,
-0.044281005859375,
0.0156402587890625,
0.0263671875,
-0.0902099609375,
-0.089111328125,
0.0242462158203125,
-0.0865478515625,
-0.0073394775390625,
-0.023162841796875,
-0.053070068359375,
0.0007905960083007812,
-0.0232696533203125,
0.0023632049560546875,
-0.0088043212890625,
-0.012786865234375,
-0.07574462890625,
-0.033233642578125,
-0.06268310546875,
0.0589599609375,
-0.00794219970703125,
0.040740966796875,
0.00421905517578125,
0.11236572265625,
0.01425933837890625,
-0.0667724609375,
-0.03948974609375,
0.06170654296875,
-0.038665771484375,
-0.015869140625,
-0.034637451171875,
0.033050537109375,
0.01386260986328125,
-0.02471923828125,
-0.031646728515625,
0.0240936279296875,
0.0158843994140625,
-0.0017366409301757812,
-0.002574920654296875,
-0.02545166015625,
0.01593017578125,
-0.01544189453125,
0.0043792724609375,
0.0310211181640625,
0.023956298828125,
-0.0172882080078125,
-0.0162353515625,
-0.0210723876953125,
-0.055816650390625,
-0.016571044921875,
0.033538818359375,
0.01190185546875,
-0.01016998291015625,
-0.016632080078125,
0.01439666748046875,
-0.003490447998046875,
0.0087890625,
-0.03424072265625,
0.06036376953125,
0.01514434814453125,
0.0254058837890625,
-0.03778076171875,
-0.0169830322265625,
-0.018157958984375,
0.027130126953125,
-0.01123046875,
0.00942230224609375,
-0.008575439453125,
0.0223388671875,
-0.00373077392578125,
-0.034423828125,
0.04052734375,
0.0140228271484375,
0.0193328857421875,
-0.02154541015625,
-0.040374755859375,
-0.0010099411010742188,
0.075439453125,
-0.041748046875,
-0.0205535888671875,
-0.034149169921875,
0.0240478515625,
-0.002716064453125,
-0.09783935546875,
0.0289306640625,
-0.015106201171875,
-0.034515380859375,
0.01035308837890625,
-0.01654052734375,
0.0002567768096923828,
-0.033416748046875,
0.01849365234375,
-0.03411865234375,
-0.0238800048828125,
0.03643798828125,
-0.0089263916015625,
-0.00821685791015625,
0.0121002197265625,
0.0011997222900390625,
-0.01369476318359375,
-0.0308990478515625,
-0.01111602783203125,
-0.060882568359375,
-0.01030731201171875,
0.04498291015625,
0.022216796875,
-0.044342041015625,
0.01383209228515625,
-0.0198516845703125,
0.054107666015625,
-0.00392913818359375,
0.0017442703247070312,
-0.00966644287109375,
0.0028476715087890625,
-0.041351318359375,
-0.005481719970703125,
-0.017425537109375,
-0.00927734375,
-0.0275421142578125,
-0.0419921875,
0.006221771240234375,
-0.0278778076171875,
-0.039947509765625,
-0.039703369140625,
-0.01666259765625,
-0.000247955322265625,
-0.0606689453125,
-0.035369873046875,
-0.0201263427734375,
-0.0030155181884765625,
-0.024688720703125,
0.002437591552734375,
-0.03314208984375,
-0.0374755859375,
0.051422119140625,
0.0166778564453125,
-0.04376220703125,
0.0009703636169433594,
0.05926513671875,
0.00870513916015625,
-0.045379638671875,
-0.08026123046875,
-0.0199432373046875,
0.0146026611328125,
0.00870513916015625,
0.05596923828125,
0.0455322265625,
0.0137176513671875,
-0.007770538330078125,
0.004512786865234375,
0.0017271041870117188,
-0.01377105712890625,
0.005100250244140625,
-0.017486572265625,
-0.005649566650390625,
0.0006899833679199219,
-0.0413818359375,
0.04766845703125,
0.0231170654296875,
-0.0193328857421875,
-0.0145416259765625,
-0.007232666015625,
0.062286376953125,
-0.0229644775390625,
0.025115966796875,
-0.043487548828125,
-0.0357666015625,
0.016937255859375,
0.0167083740234375,
0.035064697265625,
0.003536224365234375,
0.01427459716796875,
0.01457977294921875,
0.01293182373046875,
0.01534271240234375,
0.07122802734375,
0.098876953125,
-0.00380706787109375,
0.047149658203125,
0.06719970703125,
-0.008148193359375,
-0.0254974365234375,
-0.002658843994140625,
-0.0083465576171875,
0.004703521728515625,
-0.0260162353515625,
0.0073699951171875,
-0.01323699951171875,
0.051055908203125,
-0.018951416015625,
0.04248046875,
0.015838623046875,
-0.004058837890625,
0.0038051605224609375,
-0.029693603515625,
0.029052734375,
-0.02069091796875,
-0.031829833984375,
0.05743408203125,
0.03271484375,
0.0006728172302246094,
0.0628662109375,
0.041290283203125,
0.00043201446533203125,
0.050048828125,
-0.01006317138671875,
0.009674072265625,
-0.021636962890625,
0.044158935546875,
0.0260009765625,
0.01342010498046875,
-0.00797271728515625,
0.035308837890625,
-0.0086212158203125,
-0.02728271484375,
0.006195068359375,
0.0196380615234375,
0.0210113525390625,
0.0234375,
-0.00963592529296875,
-0.0014629364013671875,
-0.01800537109375,
-0.033966064453125,
0.0179290771484375,
0.0019664764404296875,
-0.036529541015625,
-0.02545166015625,
-0.0018625259399414062,
0.008636474609375,
0.00039839744567871094,
-0.0200653076171875,
0.0113372802734375,
-0.0169830322265625,
0.0576171875,
-0.01511383056640625,
0.02203369140625,
0.007389068603515625,
0.0042877197265625,
-0.017303466796875,
-0.032135009765625,
-0.027557373046875,
-0.00829315185546875,
-0.0198974609375,
0.0189208984375,
0.0032367706298828125,
-0.01401519775390625,
-0.01239776611328125,
0.0806884765625,
-0.01471710205078125,
-0.04962158203125,
-0.00787353515625,
0.01470947265625,
0.035858154296875,
0.038238525390625,
0.00588226318359375,
-0.01116180419921875,
-0.050201416015625,
-0.03192138671875,
0.00024044513702392578,
-0.00623321533203125,
-0.03485107421875,
0.005340576171875,
0.046295166015625,
0.02374267578125,
0.0098114013671875,
-0.062103271484375,
-0.0166778564453125,
-0.03057861328125,
0.0300750732421875,
0.0012769699096679688,
-0.021636962890625,
0.06524658203125,
-0.036224365234375,
-0.002101898193359375,
-0.021209716796875,
0.0296173095703125,
0.015655517578125,
0.003963470458984375,
0.01110076904296875,
-0.08770751953125,
0.00176239013671875,
0.0183563232421875,
-0.060638427734375,
-0.0088348388671875,
-0.01183319091796875,
0.0037841796875,
0.0243682861328125,
-0.0254974365234375,
-0.0005922317504882812,
-0.01806640625,
0.019927978515625,
-0.0179443359375,
0.007740020751953125,
0.0305023193359375,
0.019989013671875,
-0.01727294921875,
-0.025421142578125,
-0.0186614990234375,
-0.0174560546875,
0.0270538330078125,
-0.01525115966796875,
-0.0450439453125,
-0.0242767333984375,
0.00782012939453125,
0.068359375,
0.0234832763671875,
0.04132080078125,
-0.006832122802734375,
0.011627197265625,
0.02740478515625,
-0.0003616809844970703,
0.0177154541015625,
0.004055023193359375,
0.04901123046875,
-0.0078887939453125,
-0.015167236328125,
0.0178375244140625,
-0.0408935546875,
-0.00704193115234375,
0.034454345703125,
0.02593994140625,
-0.0303497314453125,
-0.0153350830078125,
0.0016078948974609375,
-0.0018815994262695312,
0.00841522216796875,
0.008331298828125,
-0.0051116943359375,
-0.034210205078125,
0.03741455078125,
-0.01177215576171875,
-0.00830841064453125,
-0.004718780517578125,
-0.033233642578125,
-0.0010061264038085938,
-0.043792724609375,
0.031341552734375,
-0.00656890869140625,
-0.023895263671875,
0.00627899169921875,
0.0143890380859375,
-0.006305694580078125,
0.0021419525146484375,
-0.01885986328125,
0.0041351318359375,
-0.0200042724609375,
-0.054107666015625,
-0.010498046875,
-0.044677734375,
-0.01299285888671875,
0.0012464523315429688,
0.028533935546875,
0.00609588623046875,
0.05242919921875,
-0.0207061767578125,
0.024932861328125,
0.0185546875,
-0.0204925537109375,
-0.03790283203125,
-0.006771087646484375,
0.0261383056640625,
0.01009368896484375,
-0.021209716796875,
0.0213623046875,
-0.0390625,
-0.002391815185546875,
-0.0221099853515625,
-0.0032024383544921875,
0.07318115234375,
-0.0173797607421875,
-0.0151519775390625,
0.041656494140625,
0.06817626953125,
-0.031280517578125,
-0.0145721435546875,
0.0141754150390625,
-0.06170654296875,
-0.017364501953125,
-0.0032367706298828125,
-0.0020465850830078125,
-0.0122528076171875,
-0.006683349609375,
-0.07171630859375,
0.07476806640625,
-0.0005102157592773438,
0.0594482421875,
0.02398681640625,
0.002338409423828125,
-0.033782958984375,
-0.02178955078125,
-0.07000732421875,
0.056854248046875,
0.040679931640625,
0.06842041015625,
-0.062408447265625,
-0.007656097412109375,
0.01548004150390625,
0.0306549072265625,
0.06036376953125,
0.005695343017578125,
-0.05169677734375,
0.0169830322265625,
0.0899658203125,
0.045440673828125,
0.01036834716796875,
0.04278564453125,
0.0002856254577636719,
0.05078125,
0.060150146484375,
-0.06561279296875,
0.027130126953125,
-0.01263427734375,
-0.012237548828125,
0.01629638671875,
0.017120361328125,
0.0156097412109375,
-0.03082275390625,
-0.0214691162109375,
-0.035919189453125,
-0.0016298294067382812,
0.0101776123046875,
0.031463623046875,
0.0242919921875,
-0.003429412841796875,
0.036224365234375,
-0.0689697265625,
-0.0206451416015625,
-0.0202484130859375,
0.038543701171875,
0.0159759521484375,
-0.0107879638671875,
0.0213165283203125,
0.0021820068359375,
0.06622314453125,
-0.0118255615234375,
-0.0072784423828125,
0.0199127197265625,
0.0080108642578125,
0.05548095703125,
0.02099609375,
0.01221466064453125,
-0.05523681640625,
-0.006526947021484375,
0.065673828125,
0.072509765625,
-0.054779052734375,
-0.06402587890625,
0.003742218017578125,
-0.00293731689453125,
-0.0115203857421875,
0.01088714599609375,
0.0024356842041015625,
-0.01727294921875,
0.047821044921875,
-0.03814697265625,
0.01421356201171875,
0.01274871826171875,
0.044830322265625,
-0.010833740234375,
-0.0011768341064453125,
-0.03826904296875,
-0.0181732177734375,
-0.033111572265625,
-0.008758544921875,
0.01348114013671875,
0.05078125,
0.0203857421875,
0.0338134765625,
-0.0085296630859375,
-0.0248565673828125,
0.0009756088256835938,
0.0021762847900390625,
-0.03192138671875,
0.0067138671875,
-0.05438232421875,
-0.06298828125,
-0.006893157958984375,
0.04864501953125,
0.06121826171875,
-0.01259613037109375,
0.0064849853515625,
0.00794219970703125,
0.0166015625,
0.01267242431640625,
0.01523590087890625,
0.001232147216796875,
-0.01641845703125,
0.0039005279541015625,
-0.031829833984375,
-0.0021877288818359375,
-0.0189971923828125,
-0.00121307373046875,
0.043670654296875,
-0.007244110107421875,
0.02099609375,
0.0032558441162109375,
0.0119781494140625,
-0.0032253265380859375,
0.04656982421875,
0.029449462890625,
0.01264190673828125,
0.0416259765625,
-0.0872802734375,
-0.0161895751953125,
-0.043670654296875,
-0.03045654296875,
0.03961181640625,
0.0318603515625,
-0.0277557373046875,
0.0257110595703125,
0.0004992485046386719,
-0.005092620849609375,
-0.002368927001953125,
-0.01483917236328125,
0.042236328125,
0.0131988525390625,
0.0025005340576171875,
0.0246124267578125,
-0.032012939453125,
-0.0283966064453125,
-0.00020039081573486328,
0.0213470458984375,
-0.001598358154296875,
0.043609619140625,
0.01145172119140625,
0.0005774497985839844,
0.00952911376953125,
0.004810333251953125,
-0.0007815361022949219,
-0.0121917724609375,
0.019287109375,
-0.00836944580078125,
0.0078887939453125,
-0.007656097412109375,
-0.03369140625,
0.0016078948974609375,
0.04571533203125,
-0.04644775390625,
0.0186767578125,
-0.013580322265625,
0.012908935546875,
-0.059295654296875,
-0.0005388259887695312,
-0.0149993896484375,
0.03765869140625,
-0.0200347900390625,
-0.0479736328125,
0.06646728515625,
0.007274627685546875,
-0.0157928466796875,
0.034820556640625,
0.042572021484375,
0.003818511962890625,
0.019805908203125,
-0.00476837158203125,
0.037261962890625,
0.0313720703125,
0.00104522705078125,
0.0228729248046875,
0.0025768280029296875,
-0.0166015625,
-0.0122222900390625,
0.039306640625,
-0.042816162109375,
0.0220794677734375,
-0.00382232666015625,
-0.044342041015625,
0.004711151123046875,
0.033233642578125,
-0.0357666015625,
0.015472412109375,
-0.0189056396484375,
-0.00151824951171875,
0.034088134765625,
0.0089111328125,
-0.026824951171875,
-0.04168701171875,
-0.023101806640625,
-0.012969970703125,
-0.0282440185546875,
-0.064453125,
-0.01323699951171875,
-0.044464111328125,
0.0291900634765625,
0.004993438720703125,
-0.041290283203125,
0.00791168212890625,
-0.0139617919921875,
0.0016202926635742188,
-0.0193634033203125,
-0.0019245147705078125,
-0.0081024169921875,
0.00799560546875,
-0.00707244873046875,
-0.006298065185546875,
-0.00971221923828125,
0.0149383544921875,
0.024871826171875,
-0.0168914794921875,
0.014404296875,
-0.0062408447265625,
-0.035736083984375,
-0.0289764404296875,
-0.0145263671875,
0.01551055908203125,
0.003520965576171875,
-0.002685546875,
0.03851318359375,
0.0009603500366210938,
-0.032012939453125,
-0.08465576171875,
-0.0022983551025390625,
-0.054443359375,
0.042083740234375,
0.01446533203125,
-0.0132904052734375,
0.0099945068359375,
-0.0224151611328125,
-0.046295166015625,
0.0333251953125,
0.01326751708984375,
-0.0246734619140625,
-0.06298828125,
-0.006450653076171875,
-0.006145477294921875,
-0.0057830810546875,
-0.0150604248046875,
-0.042633056640625,
-0.03125,
0.0517578125,
0.018218994140625,
-0.0211029052734375,
0.0301971435546875,
-0.0057830810546875,
-0.0843505859375,
0.00543212890625,
-0.020050048828125,
0.0182342529296875,
-0.006404876708984375,
-0.008514404296875,
0.0614013671875,
0.04595947265625,
-0.00020384788513183594,
0.03094482421875,
0.02783203125,
-0.04852294921875,
0.00794219970703125,
0.03179931640625,
-0.0501708984375,
-0.02618408203125,
0.0738525390625,
0.0230560302734375,
0.0254974365234375,
-0.012939453125,
-0.017913818359375,
-0.03741455078125,
-0.048004150390625,
-0.0190887451171875,
0.022216796875,
-0.027496337890625,
0.0273590087890625,
-0.03753662109375,
-0.0284576416015625,
0.01232147216796875,
-0.00555419921875,
-0.043121337890625,
0.00917816162109375,
-0.01515960693359375,
-0.004566192626953125,
-0.0455322265625,
-0.0261993408203125,
-0.0263671875,
0.0023288726806640625,
-0.0343017578125,
-0.024261474609375,
0.035064697265625,
-0.048370361328125,
0.0165863037109375,
-0.027618408203125,
0.0012912750244140625,
0.004909515380859375,
0.004497528076171875,
0.0128936767578125,
-0.0218353271484375,
0.011138916015625,
0.020965576171875,
0.0086517333984375,
0.01322174072265625,
-0.01019287109375,
0.007049560546875,
-0.00423431396484375,
0.01375579833984375,
-0.0002682209014892578,
0.08355712890625,
-0.005008697509765625,
0.10821533203125,
0.0174560546875,
0.041717529296875,
0.01299285888671875,
-0.0208740234375,
0.0303955078125,
-0.023284912109375,
0.00806427001953125,
-0.00368499755859375,
-0.0231475830078125,
-0.02642822265625,
-0.01061248779296875,
0.0253753662109375,
-0.022369384765625,
0.01323699951171875
] |
228ac03985982ecd95d0fba8c5f631298a4d3417
|
Wordpress Stackexchange
Q: Custom post type support for get_users('orderby=post_count'); The default WordPress function get_users('orderby=post_count'); only orders users with the count of the posts they've made.
Any idea how to modify this to support custom post types as well?
UPDATE:
I only want to query posts of type "company-item". Currently, this snippet is in my functions.php:
function user_query_count_post_type($args) {
$args->query_from = str_replace("post_type = post AND", "post_type IN ('company-item') AND ", $args->query_from);
}
And this is in my page template:
<ul>
<?php
add_action('pre_user_query','user_query_count_post_type');
$showrooms = get_users('orderby=post_count&role=company&order=desc');
remove_action('pre_user_query','user_query_count_post_type');
foreach ($showrooms as $showroom) : ?>
<li>
<a href="<?php echo get_author_posts_url( $showroom->id ); ?>" ><img src="<?php echo $showroom->company_logo; ?>" title="<?php echo $showroom->company_name; ?>" /></a>
</li>
<?php endforeach; ?>
</ul>
A: you can try to replace the where clause of the query by hooking to pre_user_query. Something like:
function user_query_count_post_type($args){
$args->query_from = str_replace("post_type = post AND", "post_type IN ('post','cpt') AND ", $args->query_from);
}
Usage ex:
add_action('pre_user_query','user_query_count_post_type');
$users = get_users('orderby=post_count');
remove_action('pre_user_query','user_query_count_post_type');
|
Q: Custom post type support for get_users('orderby=post_count'); The default WordPress function get_users('orderby=post_count'); only orders users with the count of the posts they've made.
Any idea how to modify this to support custom post types as well?
UPDATE:
I only want to query posts of type "company-item". Currently, this snippet is in my functions.php:
function user_query_count_post_type($args) {
$args->query_from = str_replace("post_type = post AND", "post_type IN ('company-item') AND ", $args->query_from);
}
And this is in my page template:
<ul>
<?php
add_action('pre_user_query','user_query_count_post_type');
$showrooms = get_users('orderby=post_count&role=company&order=desc');
remove_action('pre_user_query','user_query_count_post_type');
foreach ($showrooms as $showroom) : ?>
<li>
<a href="<?php echo get_author_posts_url( $showroom->id ); ?>" ><img src="<?php echo $showroom->company_logo; ?>" title="<?php echo $showroom->company_name; ?>" /></a>
</li>
<?php endforeach; ?>
</ul>
A: you can try to replace the where clause of the query by hooking to pre_user_query. Something like:
function user_query_count_post_type($args){
$args->query_from = str_replace("post_type = post AND", "post_type IN ('post','cpt') AND ", $args->query_from);
}
Usage ex:
add_action('pre_user_query','user_query_count_post_type');
$users = get_users('orderby=post_count');
remove_action('pre_user_query','user_query_count_post_type');
A: A bit late but, just in case someone needs it on the future.
You could add a get_posts inside the normal foreach for users, to check if a given user has stuff published on posts, OR on the CPT you want:
if ( ! function_exists( 'contributors_author_list' ) ) :
function contributors_author_list() {
$contributor_ids = get_users( array(
'fields' => 'ID',
'orderby' => 'post_count',
'order' => 'DESC',
'who' => 'authors',
'number' => '100'
) );
foreach ( $contributor_ids as $contributor_id ) :
$argos = array( 'author' => $contributor_id, 'post_type'=> array('post','CHANGE-HERE-YOUR-CPT') ); //change here the CPT
$userposts = get_posts($argos);
$count=count($userposts);
if ($count) {
?>
<!-- HTML stuff -->
<?php
}
endforeach;
}
endif;
This way you should be able to display authors who published either posts or Custom Post Types (or both).
|
wordpress
|
{
"language": "en",
"length": 282,
"provenance": "stackexchange_00019.jsonl.gz:429011",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85681"
}
|
[
0.1015625,
0.0023441314697265625,
0.0302581787109375,
-0.066162109375,
0.0361328125,
-0.035064697265625,
0.06719970703125,
-0.027496337890625,
-0.0137176513671875,
0.0157928466796875,
-0.01145172119140625,
-0.00830841064453125,
-0.03955078125,
-0.04364013671875,
-0.00881195068359375,
-0.0452880859375,
0.03485107421875,
-0.0252532958984375,
0.0195159912109375,
-0.0181121826171875,
0.00145721435546875,
0.01348876953125,
0.0582275390625,
0.0007462501525878906,
0.01238250732421875,
-0.00494384765625,
0.06976318359375,
-0.027313232421875,
0.051300048828125,
-0.0053253173828125,
0.0166778564453125,
-0.054534912109375,
0.0009198188781738281,
0.011383056640625,
0.01556396484375,
0.0208892822265625,
0.038116455078125,
0.00200653076171875,
0.023590087890625,
0.021270751953125,
0.03033447265625,
-0.0190887451171875,
-0.0253753662109375,
-0.0069427490234375,
-0.020721435546875,
-0.049163818359375,
0.0640869140625,
-0.00855255126953125,
0.049224853515625,
-0.007480621337890625,
-0.005397796630859375,
0.00506591796875,
0.0119171142578125,
-0.03802490234375,
-0.00673675537109375,
0.0160980224609375,
0.016632080078125,
-0.042816162109375,
0.03875732421875,
-0.020599365234375,
-0.028106689453125,
-0.04742431640625,
0.03826904296875,
-0.01004791259765625,
-0.0193634033203125,
-0.01491546630859375,
0.03717041015625,
0.0006036758422851562,
-0.003437042236328125,
-0.03948974609375,
0.002132415771484375,
0.04150390625,
0.00252532958984375,
0.018096923828125,
-0.0247955322265625,
-0.029296875,
-0.007320404052734375,
-0.0286407470703125,
0.044189453125,
0.0230712890625,
0.0178070068359375,
-0.00896453857421875,
-0.05255126953125,
0.03668212890625,
-0.02801513671875,
0.0267791748046875,
-0.013519287109375,
-0.0213165283203125,
-0.004314422607421875,
-0.0244140625,
-0.00623321533203125,
-0.036285400390625,
0.0022411346435546875,
0.022125244140625,
-0.0157318115234375,
-0.021148681640625,
0.0223388671875,
0.03680419921875,
0.001636505126953125,
0.006862640380859375,
-0.01325225830078125,
-0.03448486328125,
0.005748748779296875,
-0.0214080810546875,
0.033416748046875,
0.027587890625,
-0.023590087890625,
0.0738525390625,
0.09246826171875,
0.040374755859375,
0.03607177734375,
0.0390625,
-0.0322265625,
-0.0167236328125,
-0.0175628662109375,
0.029510498046875,
-0.042388916015625,
0.0111541748046875,
-0.0154876708984375,
0.006317138671875,
0.016876220703125,
0.0312347412109375,
0.01050567626953125,
-0.044891357421875,
0.025360107421875,
0.01421356201171875,
-0.003543853759765625,
-0.0509033203125,
0.0231475830078125,
0.0256500244140625,
-0.02581787109375,
-0.020111083984375,
0.051544189453125,
0.048614501953125,
0.0179901123046875,
-0.01751708984375,
0.005878448486328125,
-0.01445770263671875,
-0.029754638671875,
0.007648468017578125,
0.045074462890625,
-0.03369140625,
-0.01218414306640625,
0.005428314208984375,
0.03857421875,
0.0260162353515625,
0.036102294921875,
-0.0007686614990234375,
-0.01514434814453125,
-0.02093505859375,
-0.0082244873046875,
-0.0008749961853027344,
0.007320404052734375,
0.0221405029296875,
-0.0225677490234375,
0.038299560546875,
-0.0087432861328125,
0.00988006591796875,
-0.01812744140625,
0.0086517333984375,
0.0075836181640625,
-0.0179290771484375,
-0.03363037109375,
-0.04156494140625,
-0.06982421875,
0.0163726806640625,
0.006504058837890625,
-0.0038852691650390625,
0.02142333984375,
-0.0116729736328125,
0.042205810546875,
-0.01519012451171875,
0.037506103515625,
0.017120361328125,
0.00569915771484375,
0.0017938613891601562,
-0.028717041015625,
0.041107177734375,
0.01654052734375,
-0.01415252685546875,
-0.0168304443359375,
-0.0386962890625,
0.05096435546875,
-0.015228271484375,
-0.07489013671875,
0.053436279296875,
0.0000979304313659668,
0.04718017578125,
0.0172271728515625,
-0.017303466796875,
0.07720947265625,
0.0504150390625,
-0.044677734375,
0.041656494140625,
-0.003330230712890625,
-0.0472412109375,
-0.005279541015625,
-0.04119873046875,
-0.006591796875,
0.033050537109375,
0.020904541015625,
-0.010101318359375,
0.01611328125,
-0.011138916015625,
-0.043548583984375,
0.0118865966796875,
-0.0117950439453125,
0.0287017822265625,
0.01100921630859375,
0.0308837890625,
0.018280029296875,
0.035064697265625,
-0.061767578125,
0.0023956298828125,
-0.024444580078125,
0.0099029541015625,
0.007274627685546875,
0.04815673828125,
0.005401611328125,
0.0251922607421875,
-0.009613037109375,
-0.040985107421875,
0.01171112060546875,
0.0298919677734375,
0.07763671875,
0.004150390625,
-0.0140838623046875,
-0.0112762451171875,
0.0528564453125,
0.021514892578125,
-0.038665771484375,
0.0139312744140625,
0.050048828125,
0.03070068359375,
-0.030853271484375,
0.0038547515869140625,
0.01378631591796875,
-0.0219573974609375,
0.00614166259765625,
0.048370361328125,
0.0275421142578125,
0.01099395751953125,
0.0026683807373046875,
0.0035800933837890625,
0.0253143310546875,
0.01398468017578125,
0.035064697265625,
-0.0279083251953125,
-0.0099334716796875,
0.05029296875,
0.0374755859375,
0.035919189453125,
0.0011501312255859375,
0.0300140380859375,
0.0031719207763671875,
0.021881103515625,
0.028106689453125,
0.02362060546875,
-0.0091094970703125,
-0.0004096031188964844,
0.005451202392578125,
-0.036529541015625,
-0.038421630859375,
-0.00492095947265625,
0.002166748046875,
-0.014862060546875,
0.0268707275390625,
0.0048675537109375,
-0.01503753662109375,
-0.0330810546875,
0.01280975341796875,
0.00475311279296875,
-0.01279449462890625,
0.0113067626953125,
-0.0124053955078125,
0.04425048828125,
-0.0232086181640625,
0.006103515625,
0.003246307373046875,
-0.00104522705078125,
-0.0060577392578125,
-0.0215606689453125,
-0.040496826171875,
0.0025653839111328125,
0.0018024444580078125,
-0.04766845703125,
0.025054931640625,
0.053314208984375,
-0.004268646240234375,
-0.0150909423828125,
0.0205078125,
0.007518768310546875,
-0.00045299530029296875,
0.016815185546875,
-0.03826904296875,
-0.0275726318359375,
0.031524658203125,
-0.086669921875,
0.052947998046875,
-0.05755615234375,
0.053802490234375,
0.0765380859375,
-0.003631591796875,
0.011199951171875,
0.01160430908203125,
-0.0242462158203125,
0.00240325927734375,
0.0430908203125,
0.01207733154296875,
-0.03521728515625,
-0.0020999908447265625,
0.021209716796875,
0.0262603759765625,
0.042388916015625,
0.0123291015625,
-0.021240234375,
0.01230621337890625,
0.0205535888671875,
-0.035980224609375,
-0.053863525390625,
0.02801513671875,
-0.060577392578125,
0.00634002685546875,
-0.013092041015625,
-0.025665283203125,
0.005397796630859375,
0.0035228729248046875,
-0.005329132080078125,
-0.00572967529296875,
-0.0478515625,
-0.03924560546875,
-0.06439208984375,
-0.05181884765625,
0.00347137451171875,
0.0035648345947265625,
0.00838470458984375,
0.0151824951171875,
0.05902099609375,
0.025299072265625,
-0.04119873046875,
0.036712646484375,
0.03863525390625,
-0.01910400390625,
0.0229034423828125,
0.007503509521484375,
-0.038116455078125,
0.037078857421875,
-0.00844573974609375,
0.0243377685546875,
0.0165252685546875,
-0.00927734375,
-0.0090484619140625,
0.0216827392578125,
0.015472412109375,
0.04315185546875,
0.05535888671875,
-0.03643798828125,
0.0208740234375,
0.06878662109375,
-0.02423095703125,
-0.0081787109375,
-0.028839111328125,
-0.04022216796875,
0.01461029052734375,
0.023590087890625,
0.01241302490234375,
-0.00949859619140625,
0.004154205322265625,
0.0312347412109375,
0.037109375,
-0.002765655517578125,
0.003589630126953125,
0.032501220703125,
0.012176513671875,
0.048675537109375,
-0.0186614990234375,
0.01552581787109375,
-0.0158843994140625,
0.0145263671875,
0.01474761962890625,
0.0141754150390625,
0.01041412353515625,
0.00780487060546875,
-0.01158905029296875,
-0.06463623046875,
0.05731201171875,
-0.00360870361328125,
-0.0010242462158203125,
-0.03619384765625,
-0.0282135009765625,
-0.010284423828125,
0.07965087890625,
-0.01393890380859375,
-0.0094146728515625,
-0.022857666015625,
-0.006328582763671875,
-0.0005154609680175781,
-0.03131103515625,
-0.0312042236328125,
-0.003978729248046875,
-0.0166015625,
-0.008697509765625,
0.004703521728515625,
-0.032012939453125,
-0.0212249755859375,
0.0020084381103515625,
-0.0301513671875,
-0.01025390625,
0.0499267578125,
-0.0027618408203125,
0.0574951171875,
-0.0031604766845703125,
0.016265869140625,
-0.0037364959716796875,
-0.03021240234375,
0.00737762451171875,
-0.070068359375,
-0.0206756591796875,
0.00142669677734375,
0.038848876953125,
-0.00969696044921875,
-0.00531768798828125,
-0.01279449462890625,
0.041839599609375,
0.054473876953125,
-0.01116943359375,
0.02386474609375,
-0.0251312255859375,
0.006710052490234375,
-0.038421630859375,
-0.01080322265625,
-0.045379638671875,
0.004459381103515625,
-0.005062103271484375,
-0.0294189453125,
-0.001983642578125,
-0.04998779296875,
-0.0179443359375,
-0.0182037353515625,
-0.0286102294921875,
-0.033416748046875,
-0.013153076171875,
-0.016876220703125,
0.036346435546875,
-0.0189361572265625,
-0.0166473388671875,
-0.04022216796875,
-0.0625,
0.033935546875,
0.01044464111328125,
-0.0010509490966796875,
-0.00725555419921875,
0.027587890625,
0.013885498046875,
-0.03338623046875,
0.018585205078125,
-0.032745361328125,
0.032196044921875,
0.013916015625,
0.01064300537109375,
0.00843048095703125,
-0.0223388671875,
0.0254974365234375,
0.00856781005859375,
-0.007106781005859375,
-0.03167724609375,
0.03912353515625,
0.002857208251953125,
-0.0242919921875,
0.0213165283203125,
-0.00457000732421875,
0.03179931640625,
0.034881591796875,
-0.01049041748046875,
-0.03271484375,
0.008575439453125,
0.035552978515625,
-0.033721923828125,
0.04437255859375,
-0.01522064208984375,
-0.0008606910705566406,
0.000335693359375,
0.0180816650390625,
-0.0115203857421875,
0.006557464599609375,
-0.00380706787109375,
-0.0201568603515625,
-0.01233673095703125,
0.007244110107421875,
0.032012939453125,
0.06378173828125,
-0.0232391357421875,
0.05133056640625,
-0.0157470703125,
-0.01953125,
-0.0074615478515625,
0.0008845329284667969,
0.03192138671875,
-0.004955291748046875,
-0.01910400390625,
-0.04278564453125,
-0.0017490386962890625,
0.025604248046875,
0.0006632804870605469,
0.053802490234375,
0.055450439453125,
0.02313232421875,
0.0121917724609375,
-0.042694091796875,
-0.0224151611328125,
0.03509521484375,
-0.047698974609375,
0.0024261474609375,
0.0018281936645507812,
-0.003055572509765625,
0.0045166015625,
0.06964111328125,
-0.027313232421875,
0.051788330078125,
-0.0234527587890625,
0.05169677734375,
0.00516510009765625,
0.0157928466796875,
0.006439208984375,
0.038787841796875,
-0.01898193359375,
0.0156402587890625,
-0.0098114013671875,
0.01517486572265625,
-0.001190185546875,
0.02069091796875,
0.00006288290023803711,
0.0237884521484375,
0.031646728515625,
-0.0219573974609375,
-0.0149383544921875,
0.002628326416015625,
0.012420654296875,
0.00232696533203125,
-0.020751953125,
-0.04583740234375,
-0.041534423828125,
0.018798828125,
-0.0228271484375,
0.002002716064453125,
0.040130615234375,
0.0052947998046875,
0.014495849609375,
-0.021514892578125,
-0.0267333984375,
-0.006496429443359375,
0.018768310546875,
0.002902984619140625,
0.0013303756713867188,
0.0088958740234375,
0.0112152099609375,
0.0113525390625,
-0.004253387451171875,
-0.029296875,
0.0279083251953125,
-0.032806396484375,
0.045867919921875,
-0.05224609375,
0.006763458251953125,
-0.0726318359375,
0.00980377197265625,
0.0550537109375,
0.048309326171875,
0.0098419189453125,
-0.01094818115234375,
-0.041839599609375,
-0.0136871337890625,
0.038421630859375,
-0.000324249267578125,
-0.01039886474609375,
-0.0257415771484375,
0.03387451171875,
0.02923583984375,
0.01390838623046875,
-0.03314208984375,
-0.05767822265625,
0.011627197265625,
0.0406494140625,
0.058868408203125,
-0.004177093505859375,
0.0450439453125,
-0.01849365234375,
0.0367431640625,
0.008544921875,
0.0158233642578125,
-0.0167083740234375,
-0.01499176025390625,
0.00986480712890625,
-0.0005249977111816406,
-0.0088653564453125,
-0.02044677734375,
-0.012542724609375,
-0.01523590087890625,
0.06536865234375,
-0.01055145263671875,
0.0233001708984375,
-0.0034694671630859375,
0.004222869873046875,
-0.01263427734375,
-0.0279693603515625,
-0.007617950439453125,
0.01029205322265625,
0.0087127685546875,
0.005725860595703125,
0.02813720703125,
0.00943756103515625,
-0.0296173095703125,
0.00255584716796875,
0.0129241943359375,
0.01169586181640625,
-0.01526641845703125,
-0.053253173828125,
0.01480865478515625,
0.04083251953125,
0.041748046875,
0.033294677734375,
-0.02581787109375,
0.023040771484375,
0.016998291015625,
-0.018890380859375,
0.01971435546875,
0.0214080810546875,
0.050628662109375,
-0.0174713134765625,
0.00778961181640625,
0.037750244140625,
-0.0093231201171875,
0.021270751953125,
0.043487548828125,
0.055206298828125,
-0.064453125,
-0.004482269287109375,
-0.01409912109375,
-0.025665283203125,
0.047698974609375,
-0.0143890380859375,
0.005084991455078125,
-0.004512786865234375,
0.037994384765625,
-0.0306396484375,
-0.033660888671875,
-0.0025348663330078125,
-0.0098876953125,
0.01079559326171875,
-0.0099945068359375,
0.0447998046875,
-0.0038814544677734375,
0.03204345703125,
-0.03759765625,
-0.01302337646484375,
0.004680633544921875,
-0.024017333984375,
0.0174713134765625,
0.0029621124267578125,
0.0198211669921875,
-0.08056640625,
0.0222015380859375,
-0.032012939453125,
-0.0079345703125,
0.004711151123046875,
0.0014562606811523438,
0.04656982421875,
0.030792236328125,
-0.0017719268798828125,
-0.0157012939453125,
0.0026226043701171875,
-0.0307769775390625,
-0.043304443359375,
0.010986328125,
0.0017061233520507812,
0.046844482421875,
-0.031951904296875,
0.0285186767578125,
-0.0487060546875,
0.0287628173828125,
-0.011993408203125,
-0.0108795166015625,
0.055023193359375,
-0.007293701171875,
-0.01329803466796875,
0.02520751953125,
0.058258056640625,
-0.0098419189453125,
0.00926971435546875,
0.00870513916015625,
-0.0960693359375,
-0.09332275390625,
0.019927978515625,
-0.08978271484375,
-0.0094146728515625,
0.002147674560546875,
-0.054046630859375,
0.0731201171875,
-0.024383544921875,
0.033477783203125,
0.00582122802734375,
0.032318115234375,
0.0199432373046875,
0.0228729248046875,
-0.03704833984375,
0.06597900390625,
-0.014678955078125,
0.07025146484375,
-0.045623779296875,
-0.01407623291015625,
0.0256500244140625,
0.04571533203125,
0.035736083984375,
0.01459503173828125,
-0.0804443359375,
-0.025970458984375,
0.0232391357421875,
0.05718994140625,
0.026275634765625,
0.052642822265625,
0.006561279296875,
0.06939697265625,
0.084228515625,
-0.019927978515625,
0.04541015625,
0.01531982421875,
-0.040771484375,
0.0142974853515625,
0.0076446533203125,
-0.002346038818359375,
-0.0129547119140625,
0.0197601318359375,
-0.071533203125,
-0.01279449462890625,
0.042083740234375,
-0.004058837890625,
-0.007160186767578125,
0.0753173828125,
0.06243896484375,
-0.044525146484375,
-0.030609130859375,
-0.03326416015625,
0.049957275390625,
0.03106689453125,
0.048095703125,
0.0433349609375,
0.020538330078125,
0.09210205078125,
-0.017669677734375,
0.0240631103515625,
0.00783538818359375,
-0.0030918121337890625,
0.065673828125,
0.02569580078125,
0.0254364013671875,
-0.05010986328125,
-0.003673553466796875,
0.046539306640625,
0.08197021484375,
-0.04681396484375,
-0.0231781005859375,
0.00787353515625,
-0.00611114501953125,
0.00823974609375,
-0.016693115234375,
0.009979248046875,
0.0268096923828125,
0.022003173828125,
-0.0943603515625,
0.0079193115234375,
0.01036834716796875,
0.01172637939453125,
-0.037078857421875,
-0.0245513916015625,
0.004428863525390625,
-0.0036907196044921875,
-0.0288848876953125,
-0.01122283935546875,
0.00714874267578125,
0.06243896484375,
0.022857666015625,
0.027099609375,
-0.038970947265625,
-0.02337646484375,
-0.003192901611328125,
-0.032379150390625,
-0.0135498046875,
0.01885986328125,
-0.036651611328125,
-0.0038471221923828125,
-0.013580322265625,
0.0408935546875,
0.00359344482421875,
-0.01293182373046875,
-0.01074981689453125,
-0.016937255859375,
-0.02313232421875,
0.002826690673828125,
0.05218505859375,
-0.021148681640625,
-0.0169830322265625,
-0.0033588409423828125,
-0.024322509765625,
0.0028743743896484375,
-0.004642486572265625,
-0.0017366409301757812,
0.01328277587890625,
0.00830078125,
-0.02313232421875,
0.04486083984375,
-0.005390167236328125,
-0.0294647216796875,
0.032989501953125,
-0.017486572265625,
0.077392578125,
-0.0005879402160644531,
-0.041107177734375,
-0.0215301513671875,
-0.0036144256591796875,
-0.0205078125,
0.00904083251953125,
0.0250701904296875,
0.013214111328125,
-0.0006494522094726562,
0.02020263671875,
-0.0020809173583984375,
0.0189666748046875,
-0.00556182861328125,
0.013885498046875,
0.005340576171875,
0.00887298583984375,
0.008087158203125,
-0.036956787109375,
-0.03204345703125,
-0.00031876564025878906,
0.019989013671875,
-0.026641845703125,
0.042144775390625,
-0.004058837890625,
0.001506805419921875,
-0.0187835693359375,
0.0167388916015625,
-0.0258331298828125,
-0.03369140625,
0.06634521484375,
-0.0017023086547851562,
-0.0149383544921875,
-0.002902984619140625,
-0.00054168701171875,
0.0036468505859375,
0.040985107421875,
-0.04046630859375,
0.0078582763671875,
-0.000514984130859375,
0.01027679443359375,
-0.042449951171875,
-0.0021610260009765625,
-0.039093017578125,
0.005321502685546875,
-0.0260009765625,
-0.04248046875,
0.04046630859375,
-0.021392822265625,
-0.017578125,
0.07196044921875,
0.0159759521484375,
-0.0021533966064453125,
0.0192108154296875,
-0.048492431640625,
0.036529541015625,
0.03143310546875,
-0.007221221923828125,
0.053375244140625,
0.01934814453125,
-0.00817108154296875,
0.0290679931640625,
0.037811279296875,
-0.043060302734375,
0.025726318359375,
-0.005489349365234375,
0.0094146728515625,
-0.00077056884765625,
0.03265380859375,
0.0020923614501953125,
-0.00994873046875,
0.002460479736328125,
-0.02630615234375,
-0.022705078125,
0.010894775390625,
-0.0243682861328125,
-0.028228759765625,
0.00839996337890625,
0.0089111328125,
0.01513671875,
0.0204315185546875,
-0.0034770965576171875,
-0.0156402587890625,
0.027862548828125,
0.02264404296875,
-0.0675048828125,
0.039031982421875,
0.0016384124755859375,
-0.0042572021484375,
-0.0013151168823242188,
-0.06640625,
0.018402099609375,
0.047943115234375,
0.0103302001953125,
0.01000213623046875,
-0.037872314453125,
-0.0297088623046875,
-0.0279083251953125,
0.033294677734375,
0.0703125,
-0.01291656494140625,
-0.030303955078125,
0.03466796875,
-0.00540924072265625,
0.0804443359375,
-0.04925537109375,
0.0006542205810546875,
0.010467529296875,
0.031829833984375,
-0.044647216796875,
-0.0888671875,
0.0134429931640625,
-0.059417724609375,
-0.0186767578125,
0.01953125,
0.01110076904296875,
0.051422119140625,
-0.0149078369140625,
-0.07061767578125,
0.0771484375,
-0.022064208984375,
-0.03564453125,
-0.049224853515625,
0.015350341796875,
-0.00827789306640625,
0.007221221923828125,
-0.0148468017578125,
-0.006549835205078125,
-0.0178070068359375,
0.02667236328125,
-0.001514434814453125,
0.005687713623046875,
0.03375244140625,
-0.0024585723876953125,
-0.08099365234375,
-0.01198577880859375,
-0.041656494140625,
-0.017913818359375,
0.0164642333984375,
-0.0173797607421875,
0.032867431640625,
0.0298919677734375,
-0.0200958251953125,
-0.022979736328125,
-0.01108551025390625,
-0.016143798828125,
-0.0034465789794921875,
-0.027587890625,
-0.032440185546875,
-0.03912353515625,
0.0222015380859375,
0.0294189453125,
0.01084136962890625,
-0.01314544677734375,
-0.0209197998046875,
-0.0240020751953125,
-0.0218048095703125,
-0.039306640625,
0.0212860107421875,
-0.07879638671875,
-0.0285491943359375,
-0.0012941360473632812,
-0.034332275390625,
-0.017242431640625,
0.030548095703125,
-0.05902099609375,
0.0008521080017089844,
-0.01397705078125,
-0.029388427734375,
-0.049102783203125,
0.04345703125,
-0.0181732177734375,
-0.0313720703125,
-0.0653076171875,
-0.0224456787109375,
-0.01033782958984375,
-0.06317138671875,
-0.060028076171875,
-0.04412841796875,
0.002674102783203125,
0.00914764404296875,
0.027435302734375,
-0.006755828857421875,
-0.005268096923828125,
-0.0126495361328125,
0.0357666015625,
-0.022857666015625,
0.014984130859375,
-0.003864288330078125,
0.006023406982421875,
-0.00909423828125,
0.06591796875,
0.025970458984375,
0.05841064453125,
-0.01114654541015625,
-0.018829345703125,
0.0017147064208984375,
-0.0065155029296875,
0.00576019287109375,
-0.00643157958984375,
0.06829833984375,
-0.037200927734375,
-0.012054443359375,
-0.019500732421875,
-0.0474853515625,
-0.055145263671875,
0.01181793212890625,
0.07421875,
-0.03564453125,
0.025360107421875
] |
efcdfad2b9671242e4a5b474b1bf1395b729e708
|
Wordpress Stackexchange
Q: wp_next_scheduled returning a past timestamp So, here is my entire code in wp_content/plugins/my_plugin/my_plugin.php :
register_activation_hook(__FILE__, 'comunity_mails_activation');
add_action('check_mails_to_send', 'do_this_daily');
register_deactivation_hook(__FILE__, 'comunity_mails_deactivation');
function comunity_mails_activation() {
wp_schedule_event(time(), 'daily', 'check_mails_to_send');
}
function comunity_mails_deactivation() {
wp_clear_scheduled_hook('check_mails_to_send');
}
function do_this_daily() {
wp_mail("[email protected]", "Automated Email", "Hell yeah it works!");
}
When I do echo date("d-m-Y H:i:s",wp_next_scheduled('check_mails_to_send')); in the functions.php of my theme, it prints 13-02-2013 14:22:03
So I tried to do this :
do_action('ckeck_mails_to_send');
And my mail was sent. So I wonder, do I have to unschedule the task and schedule it again for the next day and compare the two timestamps and ... sounds silly...
I just don't understand why the mail has not been sent and why it's not scheduling it for the next day.
Thanks for reading/helping =D
A: Well, as I was working on an existing site which as maaaaany plugins already installed, I figured out that there was a define(DISABLE_WP_CRON,true);
So when you seems to have the same problem than me. Do a research of define(DISABLE_WP_CRON,true); in your files.
|
Q: wp_next_scheduled returning a past timestamp So, here is my entire code in wp_content/plugins/my_plugin/my_plugin.php :
register_activation_hook(__FILE__, 'comunity_mails_activation');
add_action('check_mails_to_send', 'do_this_daily');
register_deactivation_hook(__FILE__, 'comunity_mails_deactivation');
function comunity_mails_activation() {
wp_schedule_event(time(), 'daily', 'check_mails_to_send');
}
function comunity_mails_deactivation() {
wp_clear_scheduled_hook('check_mails_to_send');
}
function do_this_daily() {
wp_mail("[email protected]", "Automated Email", "Hell yeah it works!");
}
When I do echo date("d-m-Y H:i:s",wp_next_scheduled('check_mails_to_send')); in the functions.php of my theme, it prints 13-02-2013 14:22:03
So I tried to do this :
do_action('ckeck_mails_to_send');
And my mail was sent. So I wonder, do I have to unschedule the task and schedule it again for the next day and compare the two timestamps and ... sounds silly...
I just don't understand why the mail has not been sent and why it's not scheduling it for the next day.
Thanks for reading/helping =D
A: Well, as I was working on an existing site which as maaaaany plugins already installed, I figured out that there was a define(DISABLE_WP_CRON,true);
So when you seems to have the same problem than me. Do a research of define(DISABLE_WP_CRON,true); in your files.
|
wordpress
|
{
"language": "en",
"length": 168,
"provenance": "stackexchange_00019.jsonl.gz:429024",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85744"
}
|
[
0.0382080078125,
0.003925323486328125,
-0.00951385498046875,
-0.034576416015625,
0.0222930908203125,
-0.0374755859375,
0.0148773193359375,
-0.0233154296875,
-0.01354217529296875,
0.0457763671875,
-0.0038700103759765625,
0.0198974609375,
0.028106689453125,
-0.0133819580078125,
-0.01139068603515625,
-0.0037364959716796875,
0.0213775634765625,
-0.01300048828125,
-0.0157318115234375,
-0.0241241455078125,
0.0018787384033203125,
-0.00002771615982055664,
-0.034576416015625,
0.06854248046875,
-0.0123291015625,
0.054962158203125,
0.05718994140625,
-0.0182647705078125,
-0.01425933837890625,
-0.01702880859375,
0.01302337646484375,
-0.0129547119140625,
0.013031005859375,
0.04437255859375,
-0.054656982421875,
-0.06103515625,
0.015625,
0.015777587890625,
-0.007244110107421875,
0.0221710205078125,
0.018463134765625,
-0.0157470703125,
0.04681396484375,
-0.0290679931640625,
0.01538848876953125,
-0.045928955078125,
0.055389404296875,
-0.03558349609375,
0.0259552001953125,
0.040496826171875,
-0.00962066650390625,
-0.0051116943359375,
-0.0100555419921875,
-0.0092315673828125,
-0.0209197998046875,
-0.048370361328125,
-0.052398681640625,
0.0574951171875,
-0.00003343820571899414,
0.0246734619140625,
0.0028934478759765625,
0.04205322265625,
-0.010467529296875,
-0.0159759521484375,
0.021331787109375,
-0.0094757080078125,
-0.01059722900390625,
0.030548095703125,
-0.060577392578125,
0.01299285888671875,
0.041778564453125,
-0.045166015625,
0.009246826171875,
0.007297515869140625,
-0.0191497802734375,
-0.030670166015625,
0.0190277099609375,
-0.0037899017333984375,
0.01398468017578125,
0.0010728836059570312,
0.0056610107421875,
0.02081298828125,
-0.07098388671875,
0.01361083984375,
-0.0108795166015625,
0.03167724609375,
-0.01274871826171875,
-0.023681640625,
-0.0533447265625,
-0.00934600830078125,
-0.037384033203125,
0.044921875,
-0.026031494140625,
-0.06658935546875,
-0.029815673828125,
-0.0266876220703125,
0.052764892578125,
0.07562255859375,
-0.0643310546875,
-0.04766845703125,
-0.02978515625,
0.016204833984375,
-0.0721435546875,
0.0032100677490234375,
-0.016021728515625,
0.039794921875,
0.0002332925796508789,
0.0031757354736328125,
-0.00336456298828125,
0.0216217041015625,
0.0028400421142578125,
-0.034698486328125,
0.00653076171875,
-0.003185272216796875,
-0.004901885986328125,
-0.031982421875,
-0.047576904296875,
0.053314208984375,
0.0164794921875,
0.017547607421875,
0.002353668212890625,
0.006526947021484375,
-0.01629638671875,
-0.03851318359375,
0.0240478515625,
-0.0014972686767578125,
-0.0290069580078125,
0.0233306884765625,
0.056182861328125,
0.015411376953125,
-0.0345458984375,
0.0136871337890625,
0.053253173828125,
-0.01488494873046875,
0.00653076171875,
-0.00290679931640625,
0.0173492431640625,
-0.0014429092407226562,
0.006534576416015625,
-0.00473785400390625,
0.00937652587890625,
-0.031158447265625,
-0.0042724609375,
0.0028839111328125,
0.00890350341796875,
0.039581298828125,
0.0280914306640625,
-0.01009368896484375,
-0.02215576171875,
-0.0148773193359375,
-0.003143310546875,
-0.035003662109375,
0.005649566650390625,
0.03240966796875,
-0.01540374755859375,
0.02532958984375,
0.019866943359375,
-0.0221710205078125,
-0.015350341796875,
-0.0154876708984375,
0.0239410400390625,
-0.02081298828125,
-0.023193359375,
-0.05877685546875,
-0.065673828125,
0.027252197265625,
-0.061767578125,
-0.00550079345703125,
0.0242767333984375,
-0.0286865234375,
0.057037353515625,
-0.0221405029296875,
0.03179931640625,
-0.02484130859375,
-0.01318359375,
0.00978851318359375,
0.025482177734375,
-0.0031375885009765625,
0.0299072265625,
0.019744873046875,
-0.033599853515625,
-0.025299072265625,
0.0855712890625,
-0.052764892578125,
-0.042999267578125,
-0.00507354736328125,
0.04791259765625,
0.042572021484375,
-0.01136016845703125,
0.0239410400390625,
0.06365966796875,
0.01541900634765625,
0.008148193359375,
0.0214385986328125,
-0.02191162109375,
-0.0322265625,
-0.01450347900390625,
0.0132293701171875,
-0.01983642578125,
0.003063201904296875,
0.0184326171875,
0.005126953125,
0.0135650634765625,
-0.031524658203125,
-0.0645751953125,
0.02362060546875,
-0.0308837890625,
0.049163818359375,
-0.021484375,
-0.002429962158203125,
0.00988006591796875,
-0.0095977783203125,
-0.0038013458251953125,
-0.05224609375,
-0.017425537109375,
0.01055908203125,
-0.025299072265625,
0.05029296875,
-0.02203369140625,
0.0635986328125,
-0.0229034423828125,
-0.054840087890625,
-0.0176239013671875,
-0.0080108642578125,
-0.01016998291015625,
-0.0029850006103515625,
-0.022003173828125,
-0.0072174072265625,
-0.04766845703125,
0.021209716796875,
-0.038787841796875,
0.040802001953125,
0.017913818359375,
0.040618896484375,
-0.003376007080078125,
0.0263824462890625,
0.0498046875,
-0.01474761962890625,
0.0105438232421875,
0.0021419525146484375,
0.038177490234375,
0.056365966796875,
0.005962371826171875,
0.01541900634765625,
0.032958984375,
-0.051727294921875,
0.0236053466796875,
-0.007266998291015625,
-0.01447296142578125,
-0.0221405029296875,
0.01099395751953125,
-0.0132904052734375,
0.0198822021484375,
-0.024566650390625,
0.0171661376953125,
0.028717041015625,
0.03363037109375,
-0.0333251953125,
0.0166015625,
0.006908416748046875,
0.032928466796875,
0.01186370849609375,
-0.0733642578125,
0.0440673828125,
0.011322021484375,
-0.034637451171875,
0.0081939697265625,
-0.01300811767578125,
0.0241851806640625,
-0.017822265625,
0.00977325439453125,
-0.0709228515625,
0.011688232421875,
0.056793212890625,
0.00635528564453125,
0.0291900634765625,
-0.0215606689453125,
-0.0169677734375,
-0.004974365234375,
0.03466796875,
-0.014068603515625,
0.020294189453125,
0.023681640625,
-0.0197906494140625,
0.0134124755859375,
-0.02130126953125,
-0.0011138916015625,
-0.038604736328125,
-0.00014603137969970703,
0.004795074462890625,
0.04296875,
0.00949859619140625,
-0.02008056640625,
0.04437255859375,
-0.0234375,
-0.0232086181640625,
-0.07037353515625,
-0.018890380859375,
0.048065185546875,
-0.0567626953125,
-0.04205322265625,
0.0406494140625,
-0.015838623046875,
0.01427459716796875,
-0.0032863616943359375,
-0.010986328125,
0.035675048828125,
-0.0028972625732421875,
-0.010009765625,
-0.0013837814331054688,
-0.047760009765625,
-0.0026397705078125,
0.0350341796875,
0.091552734375,
-0.038055419921875,
-0.07891845703125,
-0.015869140625,
0.032073974609375,
-0.0904541015625,
-0.07818603515625,
-0.051666259765625,
-0.0269927978515625,
0.01181793212890625,
0.00545501708984375,
0.007335662841796875,
-0.0076751708984375,
-0.01068878173828125,
0.02667236328125,
-0.042327880859375,
-0.00733184814453125,
-0.00771331787109375,
-0.04290771484375,
-0.042205810546875,
-0.0005087852478027344,
-0.0001628398895263672,
-0.000453948974609375,
0.0011272430419921875,
0.07806396484375,
0.002716064453125,
-0.05450439453125,
-0.01395416259765625,
-0.0478515625,
-0.01806640625,
0.03155517578125,
-0.0201568603515625,
0.0241241455078125,
0.005908966064453125,
0.01317596435546875,
0.0220947265625,
0.02191162109375,
-0.0277252197265625,
-0.030029296875,
0.01514434814453125,
-0.00072479248046875,
0.0185546875,
0.0171356201171875,
-0.0174102783203125,
-0.01480865478515625,
-0.0005908012390136719,
-0.046173095703125,
0.0241241455078125,
-0.0223846435546875,
-0.007343292236328125,
0.01065826416015625,
-0.021240234375,
0.0033321380615234375,
-0.005462646484375,
0.003978729248046875,
-0.0200653076171875,
-0.0211639404296875,
0.046478271484375,
-0.017547607421875,
-0.0017213821411132812,
-0.0208282470703125,
-0.040130615234375,
-0.0260772705078125,
0.034393310546875,
0.023040771484375,
-0.032440185546875,
-0.01203155517578125,
0.033905029296875,
-0.0210113525390625,
0.049407958984375,
-0.0745849609375,
-0.06427001953125,
0.041290283203125,
-0.040008544921875,
-0.031951904296875,
-0.0154876708984375,
-0.0136260986328125,
0.0246124267578125,
0.0802001953125,
-0.0220184326171875,
-0.045501708984375,
-0.0023059844970703125,
0.032806396484375,
-0.055267333984375,
-0.0265350341796875,
0.0066070556640625,
-0.0023136138916015625,
-0.0963134765625,
0.0107879638671875,
-0.0311279296875,
-0.0185394287109375,
0.002685546875,
-0.041839599609375,
-0.04315185546875,
-0.06353759765625,
0.00853729248046875,
0.00677490234375,
-0.00527191162109375,
0.0114288330078125,
-0.0267486572265625,
-0.011016845703125,
-0.0106201171875,
-0.0283355712890625,
-0.045654296875,
-0.001316070556640625,
-0.0194091796875,
0.0241241455078125,
-0.008392333984375,
0.0296173095703125,
-0.034332275390625,
0.012237548828125,
0.0330810546875,
-0.01549530029296875,
0.01245880126953125,
-0.04656982421875,
0.0267486572265625,
0.04656982421875,
0.0213470458984375,
0.01189422607421875,
-0.0195465087890625,
-0.008941650390625,
-0.05126953125,
0.004360198974609375,
-0.0094757080078125,
0.00030112266540527344,
0.037628173828125,
-0.0286407470703125,
-0.047454833984375,
-0.0106964111328125,
-0.01885986328125,
0.011199951171875,
-0.00504302978515625,
-0.0267486572265625,
-0.0247955322265625,
-0.0355224609375,
0.054534912109375,
-0.030670166015625,
-0.02301025390625,
-0.006862640380859375,
0.043670654296875,
0.023773193359375,
-0.01812744140625,
0.027191162109375,
-0.01210784912109375,
0.0303955078125,
0.06378173828125,
-0.0301055908203125,
-0.029754638671875,
-0.0245513916015625,
0.0209197998046875,
0.02069091796875,
-0.014495849609375,
-0.01788330078125,
0.0968017578125,
0.00789642333984375,
0.0102996826171875,
-0.012908935546875,
-0.0251312255859375,
-0.000024616718292236328,
0.0284576416015625,
0.0087738037109375,
-0.03326416015625,
0.05194091796875,
0.054229736328125,
-0.05023193359375,
0.0322265625,
-0.0283355712890625,
-0.029052734375,
0.0215606689453125,
0.051483154296875,
-0.00559234619140625,
0.035064697265625,
-0.0169219970703125,
-0.0017404556274414062,
-0.02166748046875,
0.00194549560546875,
0.00608062744140625,
-0.00206756591796875,
-0.005001068115234375,
0.0231475830078125,
0.02203369140625,
0.002391815185546875,
-0.001018524169921875,
0.006298065185546875,
0.0241851806640625,
0.001987457275390625,
0.0175933837890625,
-0.06842041015625,
0.00716400146484375,
-0.032958984375,
-0.0052490234375,
-0.0531005859375,
0.051849365234375,
0.056182861328125,
-0.022613525390625,
0.01253509521484375,
-0.0399169921875,
0.00801849365234375,
-0.050506591796875,
-0.0241851806640625,
0.02740478515625,
-0.01580810546875,
0.042266845703125,
0.0369873046875,
0.00843048095703125,
0.0231170654296875,
-0.0208282470703125,
0.05682373046875,
0.08123779296875,
0.0080108642578125,
0.01031494140625,
-0.0016927719116210938,
-0.0224609375,
-0.0120849609375,
-0.004177093505859375,
-0.01161956787109375,
-0.03692626953125,
0.020263671875,
0.042022705078125,
-0.007701873779296875,
0.028839111328125,
-0.01035308837890625,
-0.00045609474182128906,
-0.03155517578125,
0.02130126953125,
0.0450439453125,
0.00713348388671875,
-0.032012939453125,
0.016448974609375,
0.043212890625,
0.04339599609375,
0.0013380050659179688,
0.0287628173828125,
-0.004497528076171875,
0.0198974609375,
-0.001789093017578125,
0.007110595703125,
-0.033233642578125,
-0.0244293212890625,
0.0128936767578125,
0.0078125,
0.005748748779296875,
-0.021331787109375,
-0.024932861328125,
-0.01499176025390625,
0.005199432373046875,
0.03924560546875,
-0.054656982421875,
0.04547119140625,
-0.05804443359375,
0.0313720703125,
-0.09942626953125,
0.019287109375,
0.033599853515625,
0.051605224609375,
-0.07757568359375,
0.007549285888671875,
-0.03131103515625,
-0.0124053955078125,
-0.08050537109375,
-0.0306243896484375,
-0.061309814453125,
-0.0028362274169921875,
0.0309600830078125,
0.0217437744140625,
-0.007480621337890625,
-0.07537841796875,
0.00482177734375,
0.00543212890625,
0.030548095703125,
0.061859130859375,
0.0042724609375,
0.0638427734375,
0.004825592041015625,
0.041595458984375,
0.021026611328125,
0.019439697265625,
-0.0361328125,
-0.01446533203125,
-0.00894927978515625,
-0.0361328125,
-0.0240936279296875,
-0.0172119140625,
-0.03955078125,
0.040130615234375,
0.06756591796875,
-0.01190948486328125,
0.006961822509765625,
0.0029449462890625,
0.0009274482727050781,
-0.01421356201171875,
0.0233306884765625,
0.0079803466796875,
0.00608062744140625,
0.005828857421875,
-0.047821044921875,
-0.01428985595703125,
-0.00951385498046875,
0.0391845703125,
0.0108795166015625,
-0.0439453125,
0.00007939338684082031,
0.0199432373046875,
-0.03131103515625,
0.051544189453125,
0.052642822265625,
-0.0247955322265625,
0.029754638671875,
0.0002639293670654297,
0.008270263671875,
0.0260772705078125,
0.02728271484375,
0.009063720703125,
-0.0309906005859375,
0.048675537109375,
-0.0017719268798828125,
-0.0011539459228515625,
0.0297393798828125,
-0.01727294921875,
0.0229644775390625,
0.0599365234375,
0.061920166015625,
-0.09490966796875,
0.00714111328125,
0.02203369140625,
-0.0196075439453125,
0.0005936622619628906,
-0.022003173828125,
0.00438690185546875,
-0.0367431640625,
0.044891357421875,
0.03466796875,
-0.016815185546875,
0.00553131103515625,
0.0027408599853515625,
-0.0175628662109375,
-0.00551605224609375,
0.02947998046875,
0.027313232421875,
-0.036895751953125,
-0.007587432861328125,
0.03094482421875,
-0.019287109375,
-0.047698974609375,
0.010711669921875,
-0.0006403923034667969,
-0.01171875,
-0.046844482421875,
0.0256500244140625,
0.02008056640625,
0.00848388671875,
-0.037353515625,
-0.0288238525390625,
0.03363037109375,
-0.0062255859375,
0.004833221435546875,
-0.06085205078125,
-0.0119171142578125,
-0.0199737548828125,
-0.0657958984375,
-0.030670166015625,
0.03399658203125,
0.06610107421875,
-0.029144287109375,
0.05645751953125,
0.004512786865234375,
-0.044036865234375,
0.00940704345703125,
0.033355712890625,
0.0150909423828125,
0.0104522705078125,
-0.03924560546875,
0.032257080078125,
-0.005794525146484375,
0.003509521484375,
-0.007114410400390625,
0.057647705078125,
-0.032073974609375,
-0.017425537109375,
0.0013647079467773438,
-0.041534423828125,
-0.035919189453125,
-0.044097900390625,
-0.0268402099609375,
0.1314697265625,
0.00012958049774169922,
-0.0229339599609375,
0.0100860595703125,
0.060272216796875,
-0.034698486328125,
0.04693603515625,
-0.0177001953125,
0.046966552734375,
-0.04498291015625,
0.046417236328125,
-0.0587158203125,
0.00959014892578125,
0.0113372802734375,
0.031585693359375,
0.08447265625,
0.0272216796875,
-0.0033855438232421875,
-0.0004925727844238281,
0.057098388671875,
0.0038928985595703125,
-0.03564453125,
0.03338623046875,
-0.016082763671875,
0.04144287109375,
-0.0035610198974609375,
-0.058441162109375,
0.0158538818359375,
-0.0311431884765625,
-0.044525146484375,
0.01386260986328125,
-0.0246734619140625,
-0.04541015625,
-0.015838623046875,
0.036102294921875,
0.004856109619140625,
-0.01678466796875,
-0.027252197265625,
0.01087188720703125,
0.0147552490234375,
-0.00806427001953125,
0.0128936767578125,
-0.052886962890625,
0.0030879974365234375,
-0.0235137939453125,
0.037811279296875,
-0.01430511474609375,
0.0051422119140625,
0.0472412109375,
0.02447509765625,
0.0423583984375,
-0.03778076171875,
0.001552581787109375,
-0.00885009765625,
-0.011138916015625,
0.00934600830078125,
-0.0224151611328125,
0.008026123046875,
-0.044921875,
0.0079193115234375,
0.0099945068359375,
0.0097503662109375,
-0.0188446044921875,
-0.00262451171875,
0.01519775390625,
0.0181732177734375,
0.006496429443359375,
-0.02996826171875,
0.00494384765625,
-0.0804443359375,
-0.052398681640625,
0.01168060302734375,
-0.020721435546875,
0.0209808349609375,
-0.01183319091796875,
0.0162200927734375,
0.0338134765625,
0.01788330078125,
-0.01020050048828125,
-0.045684814453125,
0.04461669921875,
0.032684326171875,
0.0219573974609375,
-0.046417236328125,
0.06817626953125,
-0.0031414031982421875,
0.01413726806640625,
0.00460052490234375,
0.02667236328125,
0.01070404052734375,
-0.034576416015625,
0.0176239013671875,
-0.02764892578125,
-0.01483917236328125,
0.0133514404296875,
-0.0095977783203125,
-0.020904541015625,
0.0115509033203125,
0.045623779296875,
0.00017940998077392578,
-0.01473236083984375,
0.029205322265625,
-0.01287078857421875,
-0.026824951171875,
-0.02471923828125,
-0.0141448974609375,
-0.01044464111328125,
0.00817108154296875,
0.021759033203125,
0.043609619140625,
-0.0036487579345703125,
-0.02215576171875,
0.0298614501953125,
-0.004215240478515625,
0.01142120361328125,
0.033843994140625,
-0.0190582275390625,
0.00862884521484375,
0.004970550537109375,
-0.052581787109375,
-0.016357421875,
-0.0297393798828125,
0.00681304931640625,
0.005931854248046875,
0.0263824462890625,
0.0023040771484375,
0.03240966796875,
0.03173828125,
0.00415802001953125,
0.00017321109771728516,
0.00421905517578125,
-0.01995849609375,
-0.0279998779296875,
0.04315185546875,
-0.0160980224609375,
-0.031097412109375,
-0.01465606689453125,
-0.02008056640625,
0.031951904296875,
0.007480621337890625,
0.017852783203125,
0.01016998291015625,
0.027435302734375,
-0.021209716796875,
0.02783203125,
-0.02288818359375,
-0.009429931640625,
0.0214691162109375,
0.0231475830078125,
-0.0021533966064453125,
-0.0214385986328125,
-0.038848876953125,
0.011871337890625,
0.01397705078125,
-0.03082275390625,
0.005367279052734375,
-0.01297760009765625,
0.00969696044921875,
0.01495361328125,
0.029205322265625,
-0.02056884765625,
-0.0255584716796875,
-0.0165863037109375,
0.01190948486328125,
0.0198211669921875,
0.01666259765625,
-0.02618408203125,
0.0217437744140625,
0.0024127960205078125,
-0.0253753662109375,
0.01168060302734375,
-0.0225677490234375,
0.01003265380859375,
0.01491546630859375,
0.005008697509765625,
-0.0134124755859375,
0.005878448486328125,
-0.0234832763671875,
0.0017910003662109375,
0.01397705078125,
0.026641845703125,
-0.013671875,
-0.0178680419921875,
-0.05267333984375,
0.04156494140625,
0.02166748046875,
0.01306915283203125,
0.0155029296875,
0.01065826416015625,
-0.0430908203125,
-0.032073974609375,
-0.05426025390625,
-0.020751953125,
-0.038787841796875,
-0.0009813308715820312,
0.021575927734375,
-0.0166778564453125,
0.0017948150634765625,
0.0196380615234375,
0.006282806396484375,
0.0247802734375,
0.0210113525390625,
-0.04937744140625,
0.0305023193359375,
-0.00882720947265625,
0.0170135498046875,
-0.0107421875,
0.00644683837890625,
-0.0099029541015625,
-0.00014388561248779297,
-0.05242919921875,
-0.0738525390625,
-0.05194091796875,
0.0714111328125,
-0.07366943359375,
-0.037200927734375,
-0.01021575927734375,
0.0175628662109375,
-0.0423583984375,
-0.058624267578125,
-0.028839111328125,
-0.0204315185546875,
0.0001971721649169922,
-0.008575439453125,
-0.0023345947265625,
-0.0076751708984375,
-0.004734039306640625,
-0.01415252685546875,
0.01285552978515625,
-0.043701171875,
-0.04693603515625,
0.0005898475646972656,
-0.0007758140563964844,
0.005245208740234375,
-0.037109375,
-0.032684326171875,
-0.0022830963134765625,
0.01522064208984375,
-0.0249176025390625,
-0.07354736328125,
0.01497650146484375,
0.016082763671875,
-0.0244903564453125,
-0.0276336669921875,
-0.0176239013671875,
-0.0439453125,
0.0216827392578125,
0.00991058349609375,
0.033660888671875,
0.0213470458984375,
0.0138702392578125,
-0.0159454345703125,
0.0147247314453125,
-0.0004930496215820312,
-0.0007290840148925781,
0.0093994140625,
-0.00015103816986083984,
0.0221405029296875,
0.031280517578125,
-0.0194244384765625,
-0.02398681640625,
0.005863189697265625,
-0.034027099609375,
-0.0477294921875,
-0.031494140625,
-0.0154266357421875,
0.00382232666015625,
0.1002197265625,
0.072509765625,
0.01233673095703125,
-0.04779052734375,
-0.031036376953125,
0.00007671117782592773,
-0.0033245086669921875,
0.00928497314453125,
-0.0006041526794433594,
-0.018646240234375,
0.023101806640625,
-0.030426025390625,
-0.00864410400390625,
-0.01091766357421875,
0.006473541259765625,
-0.00641632080078125,
-0.01007080078125,
0.00966644287109375,
-0.0207672119140625,
-0.01177215576171875,
-0.02069091796875,
-0.0103912353515625,
0.0123443603515625,
0.04840087890625,
0.0028018951416015625,
0.00925445556640625,
0.01212310791015625,
0.10137939453125,
0.0253143310546875,
0.041656494140625,
-0.045562744140625,
-0.01265716552734375,
0.02520751953125,
0.0237579345703125,
-0.0204315185546875,
-0.0218658447265625,
0.0210418701171875,
-0.0166015625,
-0.028289794921875,
-0.027099609375,
0.0360107421875,
-0.0160980224609375,
-0.03912353515625,
0.0283203125,
0.018341064453125,
-0.0251617431640625,
-0.0009102821350097656,
0.0266265869140625,
0.032318115234375,
-0.040313720703125,
0.0200653076171875,
-0.02880859375,
0.0174713134765625,
0.023956298828125,
0.0699462890625,
-0.0137786865234375,
0.028228759765625,
-0.00557708740234375,
0.0283355712890625,
0.0146484375
] |
46e1a3bf32d57f1e177477be5b6521746097c6de
|
Wordpress Stackexchange
Q: No Thumbnails Generated I setup WordPress on my own server and it's up and running...one thing that I have noticed is that WordPress doesn't generate any images I upload. Usually when I upload an image through WordPress it will generate a thumbnail, medium, and large sized image. WordPress installed without error and everything else is working fine. I have tried to rebuild the thumbnails, but that doesn't work :-(
Any ideas?
Thanks,
Josh
A: I solved the issue as well.
With reference to Josh Rodgers' answer, I had to log into my server's CPANEL, under "Software and Services", depending on how your server is set up, there is "Select PHP Version", then tick the "gd" box, save, and refresh your wordpress post or media page, then retry the upload.
If you are looking at your wordpress via FTP, you can refresh your uploads folder and see that the various sizes have appeared, i.e. imagename100x100.jpg, etc, etc.
I hope this helps someone.
Bernard
|
Q: No Thumbnails Generated I setup WordPress on my own server and it's up and running...one thing that I have noticed is that WordPress doesn't generate any images I upload. Usually when I upload an image through WordPress it will generate a thumbnail, medium, and large sized image. WordPress installed without error and everything else is working fine. I have tried to rebuild the thumbnails, but that doesn't work :-(
Any ideas?
Thanks,
Josh
A: I solved the issue as well.
With reference to Josh Rodgers' answer, I had to log into my server's CPANEL, under "Software and Services", depending on how your server is set up, there is "Select PHP Version", then tick the "gd" box, save, and refresh your wordpress post or media page, then retry the upload.
If you are looking at your wordpress via FTP, you can refresh your uploads folder and see that the various sizes have appeared, i.e. imagename100x100.jpg, etc, etc.
I hope this helps someone.
Bernard
A: I was having the same problem on my new server install with Ubuntu 16.04 and PHP 5.6. The problem is that Wordpress relies on the PHP GD module in order to generate the thumbnails. The insight from Josh led me to install the GD module using this command via SSH:
sudo apt install php5.6-gd
And then restarting apache:
sudo service apache2 restart
Worked like a charm!
A: I don't have enough reputation to comment @guilherme-vaz answer. His solution worked but I had to check which version I am using.
Use php -v cmd to find php version you are using, and then install gd. In my case it was 7.1. So I did sudo apt install php7.1-gd and restart apache sudo service apache2 restart
A: I figured it out!
In my php.ini file I had to uncomment extension=php_gd2.dll, then it started working after I rebuilt the images I uploaded :)
Thanks,
Josh
A: This isn't the most useful answer, but it is another variation - which I just spent a couple hours on.
I did just go through this...... and it was actually the file.
My site was throwing a hard 500 error after the initial upload of a few files - so apparently the thumbnail process.
I got a couple files to fully upload individually, but not this one.
As with other people, I could see the file in the library, but without a preview image, and it did not have any usable images for the file if I tried to insert it.
I don't know how I have this magic file that breaks WP.
It opens fine on my laptop.
But with trying additional, individual files at the request of my hosting company, it became clear it was actually the specific file -- more than a little unexpected.
I re-created the file in a different format and that was the end of it.
A: Ubuntu 16.04 PHP 7.0 here.
Was missing GD extension on my PHP install.
Had to do
sudo apt-get install php7.0-gd
sudo service apache2 restart
And that fixed it.
Note that before searching for "gd" in my PHP info gave just 1 result, after there was not a whole section about GD.
source: https://www.digitalocean.com/community/questions/is-there-a-php-gd-command-for-php7
|
wordpress
|
{
"language": "en",
"length": 533,
"provenance": "stackexchange_00019.jsonl.gz:429040",
"question_score": "20",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/85803"
}
|
[
0.026947021484375,
-0.0025920867919921875,
0.0217437744140625,
0.0238494873046875,
-0.005420684814453125,
-0.0274810791015625,
0.06353759765625,
-0.06146240234375,
-0.00679779052734375,
0.026702880859375,
-0.032501220703125,
-0.0005850791931152344,
0.016082763671875,
-0.018218994140625,
-0.006374359130859375,
-0.0282135009765625,
0.0355224609375,
-0.007904052734375,
0.0282745361328125,
-0.003520965576171875,
-0.0087432861328125,
0.033599853515625,
0.022552490234375,
0.057159423828125,
0.0099334716796875,
0.0033130645751953125,
0.08087158203125,
-0.0218505859375,
0.0006971359252929688,
-0.031005859375,
0.01306915283203125,
0.00665283203125,
0.00627899169921875,
0.0045623779296875,
0.0036640167236328125,
0.009674072265625,
-0.018829345703125,
0.01024627685546875,
0.002857208251953125,
0.005939483642578125,
0.00714874267578125,
-0.002170562744140625,
0.09490966796875,
-0.042205810546875,
0.03436279296875,
0.00885772705078125,
-0.01007843017578125,
-0.0736083984375,
-0.006927490234375,
-0.01348876953125,
0.01256561279296875,
0.036224365234375,
0.0350341796875,
-0.01036834716796875,
0.0015268325805664062,
0.01079559326171875,
-0.033294677734375,
0.0711669921875,
0.0330810546875,
-0.041778564453125,
-0.048309326171875,
-0.0170745849609375,
0.0297088623046875,
0.0091400146484375,
-0.0172271728515625,
0.0294647216796875,
-0.030059814453125,
-0.020233154296875,
-0.01261138916015625,
-0.013519287109375,
0.01338958740234375,
-0.05206298828125,
-0.00226593017578125,
-0.0279083251953125,
0.0017347335815429688,
0.0201263427734375,
0.0005030632019042969,
-0.01120758056640625,
0.00884246826171875,
-0.007366180419921875,
0.046051025390625,
-0.0276641845703125,
-0.034454345703125,
0.033355712890625,
0.0227508544921875,
0.051849365234375,
0.02252197265625,
-0.03619384765625,
-0.02752685546875,
0.0158538818359375,
-0.01898193359375,
-0.06719970703125,
-0.03131103515625,
0.0477294921875,
0.023529052734375,
-0.0275726318359375,
0.0309600830078125,
0.0186614990234375,
0.01346588134765625,
0.020965576171875,
0.004482269287109375,
-0.049530029296875,
0.0574951171875,
-0.051116943359375,
0.00872802734375,
0.0014362335205078125,
-0.0024242401123046875,
-0.0169830322265625,
0.0219268798828125,
0.0347900390625,
-0.006374359130859375,
0.02886962890625,
-0.01053619384765625,
-0.018585205078125,
0.000579833984375,
0.0252227783203125,
-0.0188140869140625,
0.034912109375,
0.003353118896484375,
0.01151275634765625,
-0.0027370452880859375,
0.0170135498046875,
0.0022830963134765625,
-0.01126861572265625,
0.028289794921875,
0.028289794921875,
-0.0121002197265625,
-0.0218505859375,
-0.005626678466796875,
0.01250457763671875,
-0.0430908203125,
0.03515625,
0.053131103515625,
-0.00531005859375,
-0.0130157470703125,
-0.010955810546875,
0.020477294921875,
-0.033233642578125,
-0.0433349609375,
0.052825927734375,
-0.061187744140625,
-0.0125274658203125,
0.04119873046875,
-0.07269287109375,
0.0006537437438964844,
0.0197906494140625,
-0.00238037109375,
0.026092529296875,
0.01222991943359375,
-0.0219879150390625,
-0.004077911376953125,
-0.00572967529296875,
0.01508331298828125,
0.0118408203125,
0.01465606689453125,
-0.044464111328125,
0.042724609375,
-0.052947998046875,
0.0308685302734375,
-0.05047607421875,
0.045989990234375,
-0.0009746551513671875,
0.0013580322265625,
0.0075836181640625,
-0.006519317626953125,
-0.006725311279296875,
-0.058685302734375,
-0.005069732666015625,
0.024383544921875,
-0.00696563720703125,
0.0160980224609375,
0.00555419921875,
0.06591796875,
-0.00411224365234375,
-0.01044464111328125,
0.0008349418640136719,
0.0377197265625,
-0.0278167724609375,
0.018829345703125,
0.061859130859375,
0.00749969482421875,
-0.003208160400390625,
0.033355712890625,
-0.01061248779296875,
-0.032073974609375,
-0.01114654541015625,
-0.00007426738739013672,
0.01226806640625,
0.03759765625,
0.01261138916015625,
0.000469207763671875,
0.0003895759582519531,
-0.0634765625,
0.043426513671875,
0.0232696533203125,
0.0086517333984375,
-0.08160400390625,
-0.00643157958984375,
-0.0049285888671875,
-0.043609619140625,
0.039306640625,
-0.0172119140625,
0.0185394287109375,
-0.00489044189453125,
-0.035614013671875,
-0.003231048583984375,
-0.0237884521484375,
0.0189971923828125,
0.002773284912109375,
0.018768310546875,
0.00533294677734375,
-0.0166778564453125,
-0.015625,
-0.0046539306640625,
-0.0158233642578125,
0.019195556640625,
-0.031951904296875,
0.01384735107421875,
-0.0014896392822265625,
0.04254150390625,
-0.024322509765625,
-0.0196990966796875,
-0.025390625,
-0.00850677490234375,
0.039520263671875,
0.006927490234375,
-0.0283050537109375,
-0.01548004150390625,
0.01513671875,
0.0152740478515625,
-0.0479736328125,
0.0394287109375,
-0.03826904296875,
-0.00957489013671875,
-0.03399658203125,
-0.0197296142578125,
-0.031890869140625,
-0.0484619140625,
0.0283660888671875,
0.05401611328125,
0.0200347900390625,
0.039581298828125,
0.00325775146484375,
0.0305023193359375,
0.046966552734375,
0.0214691162109375,
0.037017822265625,
-0.0197296142578125,
0.0166473388671875,
-0.007648468017578125,
0.02294921875,
-0.047454833984375,
0.0152587890625,
-0.0723876953125,
0.0236663818359375,
0.0277252197265625,
-0.022247314453125,
0.0012378692626953125,
-0.0029754638671875,
-0.0013751983642578125,
0.0095672607421875,
0.0297088623046875,
0.01042938232421875,
-0.00040984153747558594,
-0.044891357421875,
0.043792724609375,
-0.01143646240234375,
0.00641632080078125,
-0.031585693359375,
0.045013427734375,
0.02557373046875,
-0.052337646484375,
0.01444244384765625,
0.0193023681640625,
0.019622802734375,
0.040802001953125,
-0.03753662109375,
-0.01812744140625,
0.0390625,
0.02496337890625,
-0.0224609375,
-0.0244598388671875,
-0.01123809814453125,
-0.0056915283203125,
-0.0030994415283203125,
-0.03619384765625,
0.03973388671875,
0.0154571533203125,
0.00286102294921875,
0.00984954833984375,
0.039337158203125,
0.0161895751953125,
-0.020538330078125,
0.0440673828125,
-0.024169921875,
-0.0048828125,
-0.007320404052734375,
-0.022674560546875,
0.043701171875,
-0.0274200439453125,
0.060394287109375,
0.0711669921875,
-0.0479736328125,
0.057861328125,
-0.01367950439453125,
0.03472900390625,
-0.0034332275390625,
0.0267181396484375,
0.002040863037109375,
-0.0198211669921875,
-0.042327880859375,
-0.0401611328125,
0.007350921630859375,
0.041595458984375,
-0.0178375244140625,
-0.0382080078125,
-0.0033245086669921875,
0.016693115234375,
-0.058319091796875,
-0.0300140380859375,
-0.07513427734375,
-0.062469482421875,
-0.00691986083984375,
-0.0182647705078125,
-0.016937255859375,
0.019012451171875,
-0.01153564453125,
0.0256805419921875,
-0.0163116455078125,
-0.02508544921875,
-0.018341064453125,
-0.042388916015625,
-0.0408935546875,
0.0133209228515625,
0.014923095703125,
0.023468017578125,
0.011962890625,
0.0235595703125,
0.0126495361328125,
-0.0504150390625,
0.00472259521484375,
0.02655029296875,
-0.0179901123046875,
0.0012569427490234375,
-0.01247406005859375,
0.0092926025390625,
-0.01806640625,
0.00013196468353271484,
0.05657958984375,
0.027862548828125,
-0.039459228515625,
-0.00464630126953125,
-0.040985107421875,
-0.041412353515625,
-0.05902099609375,
0.0626220703125,
0.06488037109375,
-0.0711669921875,
-0.031951904296875,
-0.081787109375,
-0.0034732818603515625,
-0.03424072265625,
-0.03662109375,
0.06341552734375,
0.01739501953125,
-0.0176239013671875,
-0.0083770751953125,
0.036407470703125,
-0.007717132568359375,
0.010955810546875,
-0.01067352294921875,
-0.012237548828125,
0.02947998046875,
-0.01776123046875,
-0.0191192626953125,
-0.0010766983032226562,
0.00972747802734375,
-0.0180206298828125,
0.052703857421875,
0.00299072265625,
-0.005123138427734375,
-0.054901123046875,
0.041473388671875,
-0.0889892578125,
-0.03466796875,
0.0394287109375,
-0.024169921875,
-0.0071563720703125,
-0.005306243896484375,
-0.0023822784423828125,
0.0273895263671875,
0.06365966796875,
-0.0227813720703125,
-0.0089263916015625,
-0.00453948974609375,
0.023895263671875,
-0.058990478515625,
-0.07574462890625,
-0.0396728515625,
0.011016845703125,
-0.068115234375,
0.029541015625,
0.0269317626953125,
-0.04022216796875,
0.016693115234375,
-0.06591796875,
-0.04412841796875,
-0.032196044921875,
0.0082550048828125,
0.034332275390625,
0.00440216064453125,
-0.009490966796875,
-0.006317138671875,
-0.0034732818603515625,
0.0029926300048828125,
-0.0176544189453125,
-0.099853515625,
-0.0132293701171875,
-0.012603759765625,
0.048065185546875,
-0.03240966796875,
0.057281494140625,
-0.03912353515625,
0.0438232421875,
-0.03411865234375,
0.00878143310546875,
-0.00875091552734375,
0.0250701904296875,
0.01221466064453125,
0.0013895034790039062,
-0.005153656005859375,
-0.0210418701171875,
-0.024932861328125,
-0.05853271484375,
-0.02593994140625,
-0.0163116455078125,
-0.0218048095703125,
0.016326904296875,
-0.0301513671875,
0.006023406982421875,
-0.01293182373046875,
-0.0301055908203125,
-0.01727294921875,
0.040374755859375,
0.01525115966796875,
-0.0203399658203125,
-0.05712890625,
-0.033660888671875,
0.034027099609375,
-0.043701171875,
0.01395416259765625,
0.0136260986328125,
0.10028076171875,
0.006893157958984375,
0.0072479248046875,
-0.09637451171875,
0.003017425537109375,
0.0201263427734375,
0.0177001953125,
0.034759521484375,
0.01020050048828125,
0.00384521484375,
-0.01263427734375,
0.0133514404296875,
0.01323699951171875,
-0.030364990234375,
0.075927734375,
-0.014190673828125,
-0.0245513916015625,
0.030059814453125,
-0.021514892578125,
-0.00115966796875,
-0.01461029052734375,
-0.00630950927734375,
-0.019439697265625,
-0.00620269775390625,
0.041259765625,
0.034210205078125,
-0.035980224609375,
-0.05242919921875,
-0.038818359375,
0.0224456787109375,
-0.048583984375,
0.035797119140625,
-0.006366729736328125,
0.0019683837890625,
0.0200347900390625,
0.0308074951171875,
-0.0055389404296875,
0.03692626953125,
-0.01265716552734375,
0.035552978515625,
0.0299530029296875,
0.0112457275390625,
0.01152801513671875,
0.02020263671875,
-0.005558013916015625,
0.006504058837890625,
0.0298614501953125,
-0.0166778564453125,
-0.005161285400390625,
0.00316619873046875,
-0.0182952880859375,
-0.0322265625,
-0.0229339599609375,
0.0283050537109375,
0.0113983154296875,
0.0008640289306640625,
-0.005619049072265625,
-0.01800537109375,
-0.0107421875,
-0.03656005859375,
0.0219268798828125,
0.005321502685546875,
-0.0189666748046875,
0.0273284912109375,
-0.010955810546875,
-0.000621795654296875,
-0.02557373046875,
0.00382232666015625,
0.004550933837890625,
0.00179290771484375,
0.04290771484375,
0.0335693359375,
-0.01328277587890625,
-0.00980377197265625,
0.0157928466796875,
0.0248260498046875,
-0.054229736328125,
0.00217437744140625,
0.0282135009765625,
0.041107177734375,
-0.005283355712890625,
-0.0304107666015625,
0.018798828125,
-0.0004875659942626953,
-0.0038967132568359375,
-0.0318603515625,
-0.042144775390625,
-0.0304412841796875,
0.0010347366333007812,
-0.0008878707885742188,
0.0186614990234375,
-0.00576019287109375,
-0.050048828125,
0.03216552734375,
-0.0191497802734375,
0.037078857421875,
-0.01446533203125,
-0.03582763671875,
0.0523681640625,
0.05670166015625,
-0.0321044921875,
-0.029205322265625,
-0.01444244384765625,
0.0109710693359375,
0.01377105712890625,
-0.01422882080078125,
-0.037261962890625,
0.0328369140625,
-0.0166168212890625,
-0.00644683837890625,
-0.00554656982421875,
0.005001068115234375,
-0.0246429443359375,
0.016326904296875,
0.04705810546875,
0.0092620849609375,
-0.025360107421875,
-0.01366424560546875,
-0.03863525390625,
-0.0220947265625,
0.035919189453125,
0.03369140625,
-0.01580810546875,
-0.0328369140625,
0.0018463134765625,
0.0272674560546875,
0.004291534423828125,
-0.017822265625,
-0.0258026123046875,
0.01139068603515625,
0.020660400390625,
0.0257720947265625,
0.01288604736328125,
-0.027099609375,
0.00042057037353515625,
0.040985107421875,
-0.0084228515625,
-0.01226806640625,
-0.006237030029296875,
-0.034912109375,
0.00217437744140625,
-0.0292205810546875,
-0.01153564453125,
0.01983642578125,
-0.034027099609375,
0.0002963542938232422,
0.03466796875,
0.01617431640625,
-0.00011914968490600586,
-0.00148773193359375,
0.01192474365234375,
-0.0109100341796875,
0.0634765625,
-0.005199432373046875,
-0.0090179443359375,
0.049163818359375,
-0.03924560546875,
0.042572021484375,
-0.01129150390625,
-0.01128387451171875,
0.024322509765625,
-0.0380859375,
-0.00412750244140625,
0.09075927734375,
0.00726318359375,
0.0298309326171875,
0.06829833984375,
-0.0302734375,
0.025604248046875,
0.046630859375,
-0.0027618408203125,
0.0100860595703125,
0.038726806640625,
-0.0189666748046875,
-0.0506591796875,
0.043914794921875,
0.0229339599609375,
-0.0173187255859375,
0.0341796875,
-0.016937255859375,
0.04815673828125,
0.05853271484375,
0.091064453125,
-0.044708251953125,
0.006267547607421875,
0.02569580078125,
-0.07025146484375,
-0.0001417398452758789,
-0.016326904296875,
-0.01485443115234375,
-0.007537841796875,
0.052703857421875,
-0.0184478759765625,
-0.0214996337890625,
0.0188751220703125,
0.006591796875,
-0.00569915771484375,
0.0125274658203125,
0.026885986328125,
0.00438690185546875,
-0.0799560546875,
-0.0254058837890625,
0.06512451171875,
-0.02728271484375,
-0.0118865966796875,
0.028594970703125,
-0.034759521484375,
0.004917144775390625,
-0.0170135498046875,
-0.004886627197265625,
-0.028076171875,
0.00995635986328125,
0.0210723876953125,
0.033538818359375,
0.0013952255249023438,
0.045654296875,
-0.00732421875,
0.0222625732421875,
0.021697998046875,
-0.032806396484375,
0.0310821533203125,
-0.0264129638671875,
0.026824951171875,
0.0189666748046875,
-0.058135986328125,
0.0128021240234375,
-0.01377105712890625,
-0.01165008544921875,
0.017608642578125,
-0.0075225830078125,
0.04132080078125,
-0.052642822265625,
-0.004245758056640625,
0.0144500732421875,
0.0257568359375,
0.0184173583984375,
-0.005733489990234375,
-0.0125579833984375,
-0.048858642578125,
0.02008056640625,
-0.00868988037109375,
0.0236053466796875,
0.0278472900390625,
0.0049591064453125,
-0.0662841796875,
0.06396484375,
-0.006496429443359375,
0.004192352294921875,
0.002147674560546875,
0.0277099609375,
-0.01128387451171875,
-0.0054779052734375,
-0.0128326416015625,
0.04095458984375,
-0.01280975341796875,
0.0270233154296875,
-0.052093505859375,
0.00559234619140625,
0.008056640625,
0.032470703125,
0.060791015625,
0.004459381103515625,
-0.0126800537109375,
0.00615692138671875,
0.07904052734375,
0.035308837890625,
-0.0056915283203125,
0.028472900390625,
-0.0208892822265625,
-0.0303192138671875,
0.036163330078125,
0.01172637939453125,
0.031707763671875,
-0.01512908935546875,
-0.022430419921875,
-0.0013742446899414062,
-0.00926971435546875,
-0.0222930908203125,
0.0159454345703125,
-0.0025177001953125,
-0.029449462890625,
0.003154754638671875,
0.0142822265625,
-0.027496337890625,
0.004222869873046875,
0.062469482421875,
0.040283203125,
-0.033935546875,
-0.04779052734375,
-0.0179443359375,
0.052215576171875,
-0.01392364501953125,
-0.018280029296875,
0.01108551025390625,
0.0161895751953125,
0.006885528564453125,
-0.0224456787109375,
-0.0157318115234375,
0.01434326171875,
-0.0003314018249511719,
-0.0098114013671875,
-0.002895355224609375,
0.01207733154296875,
-0.048553466796875,
-0.0244903564453125,
0.057861328125,
0.0222015380859375,
-0.021575927734375,
-0.0269317626953125,
0.0120849609375,
0.00948333740234375,
0.01297760009765625,
-0.005584716796875,
0.0082855224609375,
-0.05828857421875,
-0.011444091796875,
-0.01812744140625,
0.007244110107421875,
0.034149169921875,
0.03253173828125,
-0.0032939910888671875,
0.01385498046875,
-0.0343017578125,
-0.00026297569274902344,
-0.01294708251953125,
0.012115478515625,
0.023468017578125,
0.04052734375,
-0.0200958251953125,
0.070068359375,
-0.044769287109375,
0.0032978057861328125,
-0.0205078125,
0.06719970703125,
-0.03326416015625,
0.0340576171875,
-0.045074462890625,
-0.049591064453125,
0.0138702392578125,
0.03143310546875,
0.003002166748046875,
0.01142120361328125,
0.05743408203125,
0.035736083984375,
-0.0791015625,
-0.01146697998046875,
0.06585693359375,
-0.024810791015625,
-0.04345703125,
-0.0271453857421875,
0.0206298828125,
0.04376220703125,
0.0082855224609375,
-0.0008492469787597656,
-0.00144195556640625,
0.0712890625,
-0.033721923828125,
0.03729248046875,
-0.0142974853515625,
-0.034332275390625,
0.0212249755859375,
-0.0294952392578125,
0.077392578125,
-0.0228729248046875,
-0.047943115234375,
-0.005664825439453125,
-0.01181793212890625,
-0.0229949951171875,
0.0310516357421875,
0.021484375,
-0.042572021484375,
0.0419921875,
0.02642822265625,
-0.0160675048828125,
-0.01514434814453125,
0.00601959228515625,
0.03228759765625,
-0.0299530029296875,
0.0140228271484375,
-0.001979827880859375,
-0.03875732421875,
-0.019744873046875,
-0.031524658203125,
0.02783203125,
0.007091522216796875,
0.1317138671875,
-0.05242919921875,
0.0043182373046875,
0.00925445556640625,
0.01189422607421875,
-0.0278167724609375,
0.0006461143493652344,
0.018707275390625,
-0.0108489990234375,
-0.00910186767578125,
-0.0196075439453125,
-0.0213470458984375,
-0.01100921630859375,
0.0367431640625,
-0.01119232177734375,
-0.05584716796875,
-0.004421234130859375,
0.042327880859375,
0.066650390625,
0.0159149169921875,
-0.0216827392578125,
-0.0274658203125,
-0.0294189453125,
0.0106201171875,
0.020050048828125,
0.0146484375,
-0.019378662109375,
0.044921875,
0.01727294921875,
-0.03375244140625,
0.042694091796875,
-0.0765380859375,
0.06707763671875,
0.0494384765625,
0.0231170654296875,
-0.058624267578125,
-0.037689208984375,
-0.0213623046875,
-0.0207366943359375,
-0.006618499755859375,
0.042694091796875,
-0.03851318359375,
-0.0501708984375,
0.01531219482421875,
-0.011444091796875,
0.01214599609375,
-0.04388427734375,
-0.0220489501953125,
0.0266876220703125,
0.005645751953125,
0.006862640380859375,
-0.003833770751953125,
-0.00804901123046875,
-0.0303802490234375,
-0.027374267578125,
0.01204681396484375,
-0.0257568359375,
-0.007488250732421875,
-0.01488494873046875,
-0.00038242340087890625,
0.032928466796875,
0.0243682861328125,
-0.059814453125,
0.051513671875,
-0.0222015380859375,
-0.0178680419921875,
0.0026798248291015625,
0.00852203369140625,
-0.00788116455078125,
0.018829345703125,
-0.0266876220703125,
-0.053558349609375,
-0.0229949951171875,
0.048736572265625,
-0.0235137939453125,
0.02716064453125,
0.038970947265625,
-0.040069580078125,
0.0086517333984375,
0.0263214111328125,
0.035797119140625,
0.0797119140625,
0.01702880859375,
-0.044891357421875,
-0.00595855712890625,
0.005931854248046875,
-0.00368499755859375,
-0.028045654296875,
0.00820159912109375,
-0.043701171875,
0.01165771484375,
-0.0655517578125,
0.0180816650390625,
0.016632080078125,
-0.049163818359375,
-0.0919189453125,
0.034637451171875,
-0.0293426513671875,
-0.0364990234375,
-0.006587982177734375,
-0.018707275390625,
-0.0038051605224609375,
-0.0162200927734375,
-0.0094146728515625,
0.0208892822265625,
-0.01383209228515625,
0.02642822265625,
0.004711151123046875,
-0.0171051025390625,
0.01788330078125,
-0.0088958740234375,
-0.011260986328125,
0.0215606689453125,
0.032501220703125,
-0.01302337646484375,
0.017242431640625,
-0.005100250244140625,
0.019775390625,
0.07403564453125,
-0.01395416259765625,
-0.031768798828125,
-0.02447509765625,
-0.06689453125,
-0.0163421630859375,
-0.022979736328125,
-0.027679443359375,
-0.0217132568359375,
0.0648193359375,
0.040771484375,
0.0165557861328125,
-0.00506591796875,
0.005603790283203125,
0.0113677978515625,
-0.0184326171875,
-0.034271240234375,
0.015655517578125,
-0.06597900390625,
-0.044830322265625,
-0.004558563232421875,
-0.01751708984375,
-0.00707244873046875,
-0.0168304443359375,
-0.03680419921875,
-0.005970001220703125,
-0.006683349609375,
0.0132293701171875,
-0.0176239013671875,
-0.05438232421875,
0.06585693359375,
-0.025909423828125,
0.0241851806640625,
-0.0196990966796875,
0.046295166015625,
0.0306549072265625,
-0.00119781494140625,
0.006931304931640625,
0.0322265625,
-0.03680419921875,
0.01477813720703125,
0.01171112060546875,
-0.0171356201171875,
-0.0235595703125,
0.001964569091796875,
0.0146942138671875,
-0.003879547119140625,
0.004352569580078125,
0.007171630859375,
0.007701873779296875,
-0.01337432861328125,
-0.0236968994140625,
-0.007671356201171875,
-0.01409912109375,
-0.076416015625,
-0.040191650390625,
0.024169921875,
-0.05242919921875,
0.005550384521484375,
-0.01480865478515625,
-0.0095367431640625,
0.0106964111328125,
0.018096923828125,
-0.037200927734375,
-0.007389068603515625,
-0.03387451171875,
-0.021759033203125,
-0.007038116455078125,
-0.00894927978515625
] |
6c42783f8aa7bb1fb4cd91932e9805b64d8785cc
|
Wordpress Stackexchange
Q: Using 1 taxonomy for multiple post types? I previously declared the taxonomy " artist " for a profile post type.
Now i am creating a CD post type and would like to use the same artist list from the profile post type
That is one example if i get a solution i will be using this to share a number of other taxonomies among-st post types :D
Thanks in Advance.
P.S. I use JW Custom Post Types
https://github.com/JeffreyWay/Easy-WordPress-Custom-Post-Types/
A: You can use an array of post types in register_taxonomy()
$object_type (array/string) (required) Name of the object type for the
taxonomy object. Object-types can be built-in Post Type or any Custom
Post Type that may be registered.
http://codex.wordpress.org/Function_Reference/register_taxonomy
Example:
register_taxonomy( 'artist', array( 'profile', 'cd' ), $args );
|
Q: Using 1 taxonomy for multiple post types? I previously declared the taxonomy " artist " for a profile post type.
Now i am creating a CD post type and would like to use the same artist list from the profile post type
That is one example if i get a solution i will be using this to share a number of other taxonomies among-st post types :D
Thanks in Advance.
P.S. I use JW Custom Post Types
https://github.com/JeffreyWay/Easy-WordPress-Custom-Post-Types/
A: You can use an array of post types in register_taxonomy()
$object_type (array/string) (required) Name of the object type for the
taxonomy object. Object-types can be built-in Post Type or any Custom
Post Type that may be registered.
http://codex.wordpress.org/Function_Reference/register_taxonomy
Example:
register_taxonomy( 'artist', array( 'profile', 'cd' ), $args );
A: You can easily use register_taxonomy_for_object_type() to link existing taxonomies to existing post types.
|
wordpress
|
{
"language": "en",
"length": 141,
"provenance": "stackexchange_00019.jsonl.gz:429057",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/86864"
}
|
[
0.058502197265625,
-0.02178955078125,
-0.01108551025390625,
-0.049163818359375,
0.01580810546875,
-0.0200958251953125,
0.034698486328125,
0.005039215087890625,
-0.0215301513671875,
-0.0009694099426269531,
-0.0252685546875,
0.01302337646484375,
-0.038787841796875,
-0.019622802734375,
0.0120086669921875,
-0.0345458984375,
0.0260009765625,
0.005687713623046875,
0.0364990234375,
-0.0166168212890625,
0.01068878173828125,
0.0031719207763671875,
0.022857666015625,
-0.0218048095703125,
0.02362060546875,
-0.0001245737075805664,
0.0474853515625,
-0.0384521484375,
0.03106689453125,
-0.01067352294921875,
0.0224151611328125,
-0.027801513671875,
-0.0024166107177734375,
0.0186004638671875,
-0.0004134178161621094,
0.01788330078125,
-0.016326904296875,
0.0202178955078125,
0.029998779296875,
0.01461029052734375,
0.02642822265625,
-0.0170135498046875,
0.00833892822265625,
0.0282745361328125,
-0.004131317138671875,
-0.040679931640625,
0.028106689453125,
-0.0523681640625,
0.018646240234375,
-0.03717041015625,
0.0284423828125,
-0.01139068603515625,
0.050079345703125,
-0.0318603515625,
-0.03460693359375,
-0.0199432373046875,
0.01190948486328125,
0.002964019775390625,
0.034454345703125,
-0.03778076171875,
-0.042144775390625,
-0.00013875961303710938,
0.03826904296875,
0.009918212890625,
-0.0022182464599609375,
0.0108184814453125,
-0.00365447998046875,
0.0017490386962890625,
-0.07183837890625,
-0.024383544921875,
0.04229736328125,
-0.05401611328125,
0.036285400390625,
0.005252838134765625,
-0.00733184814453125,
-0.06689453125,
0.0191497802734375,
-0.0225677490234375,
0.005924224853515625,
0.001277923583984375,
-0.0221710205078125,
-0.00191497802734375,
-0.0399169921875,
-0.017791748046875,
0.0028228759765625,
0.013092041015625,
-0.01861572265625,
-0.0074310302734375,
-0.052093505859375,
-0.005580902099609375,
-0.039154052734375,
-0.0258636474609375,
-0.021820068359375,
0.0128173828125,
-0.0127716064453125,
0.01082611083984375,
0.01245880126953125,
0.03167724609375,
-0.0203399658203125,
0.004596710205078125,
-0.01184844970703125,
-0.0498046875,
0.043182373046875,
-0.0382080078125,
0.05487060546875,
0.05499267578125,
-0.0192413330078125,
-0.0206146240234375,
0.07525634765625,
0.0131378173828125,
0.0254364013671875,
0.06439208984375,
-0.0012292861938476562,
-0.0229644775390625,
-0.01202392578125,
0.00200653076171875,
-0.0201416015625,
0.0227813720703125,
0.006603240966796875,
-0.00737762451171875,
0.0144805908203125,
0.0296783447265625,
0.059417724609375,
-0.020660400390625,
0.007045745849609375,
0.0312347412109375,
-0.01270294189453125,
-0.10418701171875,
-0.0044097900390625,
0.0248260498046875,
-0.0200653076171875,
0.0015554428100585938,
0.0567626953125,
0.033203125,
0.010040283203125,
-0.01904296875,
0.0064849853515625,
0.018768310546875,
0.007659912109375,
0.0306396484375,
0.006755828857421875,
-0.053863525390625,
-0.00860595703125,
0.022491455078125,
0.00409698486328125,
-0.00229644775390625,
0.00714874267578125,
0.0350341796875,
0.01183319091796875,
-0.0061798095703125,
-0.003116607666015625,
0.01229095458984375,
0.023681640625,
0.0209808349609375,
0.0015392303466796875,
-0.005352020263671875,
0.03521728515625,
-0.035125732421875,
-0.01113128662109375,
-0.0301513671875,
-0.0012159347534179688,
-0.01265716552734375,
0.0245819091796875,
-0.01093292236328125,
-0.03143310546875,
0.0396728515625,
-0.027557373046875,
-0.0036716461181640625,
0.009246826171875,
-0.045257568359375,
0.0312042236328125,
0.00021409988403320312,
-0.01493072509765625,
-0.03570556640625,
0.0026950836181640625,
-0.00675201416015625,
-0.01383209228515625,
-0.0145263671875,
0.02264404296875,
0.01934814453125,
-0.0184326171875,
-0.038543701171875,
0.01398468017578125,
-0.0243988037109375,
-0.05169677734375,
0.0297698974609375,
0.02178955078125,
0.055877685546875,
-0.00005692243576049805,
0.0106201171875,
0.044158935546875,
0.0308074951171875,
-0.0439453125,
0.0123443603515625,
0.0016412734985351562,
-0.0188446044921875,
-0.00897216796875,
-0.0044403076171875,
0.00910186767578125,
0.012725830078125,
-0.0005135536193847656,
-0.01337432861328125,
-0.00537872314453125,
-0.00433349609375,
-0.034942626953125,
-0.0009365081787109375,
-0.01537322998046875,
0.02471923828125,
-0.020965576171875,
0.0280609130859375,
0.0235137939453125,
0.007152557373046875,
-0.02020263671875,
-0.0455322265625,
-0.0143280029296875,
-0.0147705078125,
-0.0130157470703125,
0.01593017578125,
-0.004077911376953125,
-0.01107025146484375,
-0.0193634033203125,
-0.00518035888671875,
0.0035190582275390625,
0.029541015625,
0.050201416015625,
0.0306396484375,
-0.032470703125,
-0.0012922286987304688,
-0.0005016326904296875,
0.048126220703125,
-0.0902099609375,
0.016387939453125,
0.0121307373046875,
-0.002437591552734375,
-0.035369873046875,
0.0085906982421875,
0.018646240234375,
-0.029083251953125,
-0.0026397705078125,
0.04962158203125,
0.019561767578125,
0.0021724700927734375,
-0.024932861328125,
-0.004680633544921875,
0.03570556640625,
0.00238800048828125,
0.008026123046875,
-0.00339508056640625,
-0.00362396240234375,
0.03839111328125,
0.00804901123046875,
0.040313720703125,
0.019561767578125,
-0.0247344970703125,
0.016998291015625,
0.048095703125,
-0.0157928466796875,
-0.0109405517578125,
-0.005035400390625,
0.0037212371826171875,
-0.003231048583984375,
-0.05670166015625,
-0.0271453857421875,
-0.0309600830078125,
0.037567138671875,
-0.0028858184814453125,
0.0413818359375,
0.01474761962890625,
-0.007320404052734375,
0.0008320808410644531,
-0.0005116462707519531,
-0.031494140625,
0.00038933753967285156,
0.024658203125,
0.01204681396484375,
0.00675201416015625,
-0.00628662109375,
-0.0211029052734375,
0.022369384765625,
0.00881195068359375,
-0.0020122528076171875,
0.0024871826171875,
-0.053375244140625,
-0.00394439697265625,
-0.0099334716796875,
-0.041107177734375,
0.00424957275390625,
0.053375244140625,
-0.053375244140625,
-0.044891357421875,
-0.013336181640625,
0.0357666015625,
-0.033477783203125,
0.0201873779296875,
0.005817413330078125,
-0.0003020763397216797,
-0.0086517333984375,
-0.03741455078125,
0.038360595703125,
-0.038909912109375,
0.019378662109375,
0.0435791015625,
0.005397796630859375,
-0.0019245147705078125,
-0.00946807861328125,
-0.00978851318359375,
-0.0095367431640625,
0.033050537109375,
-0.00244903564453125,
-0.0762939453125,
0.038665771484375,
0.0149688720703125,
0.0157623291015625,
0.0066680908203125,
0.021881103515625,
-0.024200439453125,
0.002552032470703125,
0.0245208740234375,
-0.016754150390625,
0.017852783203125,
0.048309326171875,
-0.0296783447265625,
0.023834228515625,
-0.020050048828125,
-0.00994110107421875,
-0.04974365234375,
-0.0012559890747070312,
0.0008745193481445312,
0.0216827392578125,
-0.00624847412109375,
-0.0204925537109375,
-0.035430908203125,
-0.0643310546875,
-0.054046630859375,
0.004985809326171875,
-0.0009908676147460938,
0.0275115966796875,
0.046875,
0.0367431640625,
-0.02789306640625,
0.0797119140625,
0.039825439453125,
-0.033355712890625,
0.033203125,
0.04010009765625,
-0.0340576171875,
-0.0142822265625,
0.0022373199462890625,
0.0244140625,
0.03497314453125,
-0.03558349609375,
-0.0013790130615234375,
-0.010009765625,
0.0133514404296875,
0.03411865234375,
0.010498046875,
-0.01169586181640625,
0.053802490234375,
0.059295654296875,
-0.005786895751953125,
-0.00052642822265625,
0.02423095703125,
0.019378662109375,
0.01218414306640625,
-0.033416748046875,
-0.0207977294921875,
0.006610870361328125,
0.04779052734375,
-0.022613525390625,
0.0174560546875,
-0.056304931640625,
-0.016937255859375,
0.05938720703125,
0.0027370452880859375,
0.002849578857421875,
0.04364013671875,
-0.0222625732421875,
-0.0367431640625,
-0.01273345947265625,
-0.0235595703125,
0.00868988037109375,
-0.00475311279296875,
0.0006723403930664062,
0.001567840576171875,
-0.05694580078125,
0.037994384765625,
-0.049163818359375,
-0.00524139404296875,
-0.05157470703125,
-0.0191650390625,
-0.004070281982421875,
0.091796875,
-0.0247955322265625,
-0.0175933837890625,
-0.0008525848388671875,
-0.00524139404296875,
-0.00528717041015625,
-0.0207672119140625,
-0.058319091796875,
-0.0226898193359375,
-0.0194244384765625,
-0.022430419921875,
-0.0017385482788085938,
-0.0277557373046875,
-0.01366424560546875,
0.028961181640625,
-0.019622802734375,
-0.018310546875,
0.0236053466796875,
-0.06768798828125,
-0.005771636962890625,
0.0232391357421875,
-0.0298919677734375,
-0.01042938232421875,
-0.03118896484375,
-0.027191162109375,
-0.051239013671875,
-0.01061248779296875,
0.00882720947265625,
0.0194549560546875,
-0.016510009765625,
0.00952911376953125,
-0.005279541015625,
0.03570556640625,
0.0220489501953125,
0.0628662109375,
-0.0214691162109375,
-0.0034999847412109375,
-0.005901336669921875,
-0.018829345703125,
0.015045166015625,
-0.01003265380859375,
-0.022857666015625,
-0.040435791015625,
-0.00415802001953125,
0.0233001708984375,
-0.0297393798828125,
0.00556182861328125,
-0.0247039794921875,
-0.006488800048828125,
-0.051177978515625,
-0.03021240234375,
-0.0193023681640625,
-0.0157623291015625,
-0.005435943603515625,
-0.0194091796875,
-0.01549530029296875,
-0.0263671875,
0.030731201171875,
-0.015655517578125,
-0.026702880859375,
0.0252532958984375,
0.09033203125,
0.0129852294921875,
-0.0014247894287109375,
-0.10498046875,
0.0008077621459960938,
0.0261383056640625,
-0.0135955810546875,
0.0079803466796875,
0.01140594482421875,
-0.0200347900390625,
0.035308837890625,
-0.004970550537109375,
-0.033599853515625,
0.02008056640625,
0.024810791015625,
0.007793426513671875,
-0.017181396484375,
-0.021087646484375,
-0.0357666015625,
0.036163330078125,
0.003185272216796875,
-0.00970458984375,
-0.03411865234375,
0.00962066650390625,
0.06591796875,
-0.007205963134765625,
0.00984954833984375,
-0.054656982421875,
-0.0469970703125,
0.02020263671875,
-0.048583984375,
0.021331787109375,
0.034881591796875,
-0.0233917236328125,
0.0252838134765625,
-0.02117919921875,
-0.00643157958984375,
0.07421875,
0.052947998046875,
0.0240936279296875,
0.0218658447265625,
0.07293701171875,
-0.005031585693359375,
-0.022674560546875,
-0.008392333984375,
0.0050048828125,
-0.0038623809814453125,
-0.07537841796875,
0.049102783203125,
-0.00927734375,
0.02642822265625,
0.018798828125,
0.0052490234375,
0.07421875,
0.0271759033203125,
0.00333404541015625,
0.0020427703857421875,
-0.046966552734375,
-0.00046944618225097656,
-0.05670166015625,
0.0096893310546875,
0.017547607421875,
-0.00925445556640625,
0.022125244140625,
0.0262451171875,
0.024627685546875,
0.003055572509765625,
-0.023101806640625,
0.0865478515625,
0.04486083984375,
0.0318603515625,
0.01230621337890625,
-0.01538848876953125,
-0.03106689453125,
0.0218353271484375,
-0.06024169921875,
-0.033843994140625,
-0.0009908676147460938,
-0.000377655029296875,
0.0252227783203125,
0.0014963150024414062,
-0.0285797119140625,
0.035003662109375,
-0.0030574798583984375,
-0.009765625,
-0.017303466796875,
-0.034637451171875,
-0.0239715576171875,
-0.01241302490234375,
0.046875,
0.0330810546875,
-0.010040283203125,
-0.0121612548828125,
0.04052734375,
0.0037994384765625,
0.053192138671875,
-0.032684326171875,
0.01303863525390625,
0.0024394989013671875,
0.012664794921875,
-0.02203369140625,
-0.0200958251953125,
0.02801513671875,
-0.080810546875,
-0.023895263671875,
-0.0209503173828125,
-0.007904052734375,
0.035400390625,
-0.0290374755859375,
0.0162506103515625,
-0.005603790283203125,
-0.0045166015625,
0.0207061767578125,
-0.007472991943359375,
0.09228515625,
0.038482666015625,
0.00018024444580078125,
-0.0032711029052734375,
-0.03509521484375,
0.002979278564453125,
0.018707275390625,
-0.06591796875,
-0.0019855499267578125,
-0.031341552734375,
-0.01456451416015625,
0.003688812255859375,
0.01361083984375,
0.027496337890625,
-0.01537322998046875,
0.0242919921875,
-0.01360321044921875,
-0.01131439208984375,
-0.0123291015625,
-0.0084228515625,
0.0231781005859375,
0.01971435546875,
-0.01113128662109375,
-0.0386962890625,
-0.023406982421875,
-0.007740020751953125,
-0.06103515625,
-0.1121826171875,
0.01311492919921875,
0.05084228515625,
-0.035003662109375,
0.1043701171875,
0.061981201171875,
0.0374755859375,
0.0295562744140625,
-0.03668212890625,
-0.00136566162109375,
-0.012359619140625,
0.01580810546875,
-0.029876708984375,
0.02716064453125,
0.01551055908203125,
0.0008749961853027344,
0.02117919921875,
0.00827789306640625,
-0.03271484375,
0.01322174072265625,
0.01297760009765625,
0.012664794921875,
0.0076141357421875,
0.034637451171875,
-0.01444244384765625,
-0.0295257568359375,
0.010772705078125,
0.0078582763671875,
-0.004306793212890625,
0.018585205078125,
-0.0238494873046875,
-0.037994384765625,
-0.0200653076171875,
0.01219940185546875,
0.036346435546875,
-0.002674102783203125,
0.00685882568359375,
0.041107177734375,
-0.0169219970703125,
-0.023773193359375,
0.03802490234375,
0.0253143310546875,
-0.057464599609375,
-0.006786346435546875,
0.013153076171875,
0.0107574462890625,
-0.007472991943359375,
-0.0006613731384277344,
-0.00847625732421875,
0.004505157470703125,
-0.0273284912109375,
0.006011962890625,
-0.045013427734375,
-0.01751708984375,
0.01465606689453125,
0.00885009765625,
0.005100250244140625,
0.0169525146484375,
0.007289886474609375,
-0.01448822021484375,
-0.01549530029296875,
0.01605224609375,
0.004566192626953125,
-0.00006186962127685547,
0.01003265380859375,
-0.036773681640625,
0.0015201568603515625,
-0.004634857177734375,
0.04180908203125,
-0.05682373046875,
0.032562255859375,
0.005535125732421875,
0.009918212890625,
0.0192413330078125,
0.01983642578125,
0.0006155967712402344,
-0.01157379150390625,
-0.007781982421875,
-0.0006656646728515625,
-0.03173828125,
-0.0272674560546875,
0.006069183349609375,
0.019134521484375,
-0.0276641845703125,
0.030059814453125,
-0.018218994140625,
-0.0031375885009765625,
-0.030609130859375,
-0.01425933837890625,
0.0960693359375,
-0.03741455078125,
-0.01287078857421875,
0.0423583984375,
0.02972412109375,
-0.04071044921875,
0.022857666015625,
0.00872802734375,
-0.0526123046875,
-0.07421875,
0.0302276611328125,
-0.0858154296875,
-0.00901031494140625,
0.01806640625,
-0.07025146484375,
0.09881591796875,
-0.00112152099609375,
0.04327392578125,
-0.01555633544921875,
0.038665771484375,
0.00809478759765625,
0.02667236328125,
-0.019378662109375,
0.00669097900390625,
-0.01338958740234375,
0.0017786026000976562,
-0.01355743408203125,
0.0170745849609375,
-0.013397216796875,
0.0021495819091796875,
0.06744384765625,
0.0244293212890625,
-0.043701171875,
0.0203857421875,
0.049285888671875,
0.0162811279296875,
-0.0236968994140625,
0.06268310546875,
0.004940032958984375,
-0.0352783203125,
0.0167388916015625,
0.039306640625,
0.05133056640625,
-0.0264739990234375,
-0.025665283203125,
0.01239776611328125,
0.01763916015625,
0.0222930908203125,
0.0005922317504882812,
0.00241851806640625,
-0.059906005859375,
-0.0017642974853515625,
0.0419921875,
0.03277587890625,
0.037567138671875,
0.00801849365234375,
0.0469970703125,
0.0208282470703125,
0.064208984375,
-0.0135650634765625,
0.0736083984375,
0.0091552734375,
0.028411865234375,
0.039337158203125,
0.01049041748046875,
0.040679931640625,
0.024871826171875,
0.0276641845703125,
0.01473236083984375,
0.0068359375,
0.025390625,
-0.01152801513671875,
0.00341033935546875,
-0.061431884765625,
0.0201416015625,
0.044952392578125,
0.03741455078125,
-0.035858154296875,
-0.062469482421875,
0.014129638671875,
0.0141143798828125,
0.01531982421875,
0.03607177734375,
0.016876220703125,
0.0155181884765625,
0.05633544921875,
-0.04864501953125,
-0.01084136962890625,
0.012603759765625,
0.052734375,
-0.01491546630859375,
-0.0330810546875,
-0.04730224609375,
-0.04144287109375,
-0.053985595703125,
0.01885986328125,
0.026763916015625,
0.07763671875,
0.013427734375,
0.0743408203125,
-0.0191650390625,
-0.036224365234375,
0.0173492431640625,
-0.00826263427734375,
0.0253143310546875,
-0.053863525390625,
-0.0098419189453125,
-0.038970947265625,
0.04815673828125,
0.0251312255859375,
-0.00600433349609375,
-0.00250244140625,
0.02130126953125,
0.064697265625,
0.01213836669921875,
-0.028594970703125,
0.06707763671875,
0.0020771026611328125,
-0.0161590576171875,
-0.02996826171875,
0.0038356781005859375,
0.023651123046875,
-0.00673675537109375,
0.018707275390625,
-0.0011186599731445312,
0.03338623046875,
-0.01094818115234375,
0.045562744140625,
-0.0009737014770507812,
-0.02777099609375,
0.03656005859375,
-0.0115509033203125,
0.10052490234375,
0.021148681640625,
-0.12371826171875,
-0.04443359375,
-0.038818359375,
-0.0435791015625,
0.06982421875,
0.05865478515625,
-0.01119232177734375,
-0.00940704345703125,
0.015625,
0.0024471282958984375,
-0.00890350341796875,
-0.01357269287109375,
0.0182952880859375,
-0.00005340576171875,
0.0179595947265625,
0.0222930908203125,
-0.0150299072265625,
-0.00830078125,
-0.0004172325134277344,
0.0158843994140625,
0.0218048095703125,
0.0703125,
-0.0099945068359375,
0.01230621337890625,
-0.040008544921875,
0.05401611328125,
-0.06536865234375,
-0.044097900390625,
0.05718994140625,
-0.0062408447265625,
-0.0078277587890625,
0.012451171875,
-0.0261993408203125,
0.00955963134765625,
0.042388916015625,
-0.04443359375,
-0.0029010772705078125,
0.034881591796875,
0.00940704345703125,
-0.025299072265625,
0.034393310546875,
-0.0250091552734375,
-0.01568603515625,
-0.05340576171875,
-0.0299530029296875,
0.040313720703125,
0.0340576171875,
-0.0010519027709960938,
0.018768310546875,
0.00908660888671875,
-0.0604248046875,
0.0120697021484375,
-0.03680419921875,
-0.0038127899169921875,
0.023284912109375,
0.058074951171875,
-0.08868408203125,
0.0213165283203125,
0.00867462158203125,
-0.0269622802734375,
0.021209716796875,
0.0667724609375,
0.018890380859375,
-0.05029296875,
0.0013055801391601562,
0.01074981689453125,
0.0128936767578125,
-0.0274505615234375,
-0.004344940185546875,
0.040740966796875,
-0.0230712890625,
-0.033172607421875,
-0.003253936767578125,
-0.0184783935546875,
-0.036590576171875,
-0.0018415451049804688,
0.00855255126953125,
-0.0139923095703125,
-0.025360107421875,
-0.038818359375,
-0.024322509765625,
0.0518798828125,
0.00157928466796875,
0.00641632080078125,
-0.009063720703125,
-0.04425048828125,
0.01007080078125,
0.004863739013671875,
-0.04095458984375,
0.0143585205078125,
0.038543701171875,
0.0034198760986328125,
-0.01140594482421875,
-0.0283203125,
-0.0019159317016601562,
-0.02740478515625,
0.0082550048828125,
0.0112152099609375,
-0.0236053466796875,
-0.0008511543273925781,
0.0248260498046875,
0.0197296142578125,
0.0618896484375,
0.0056915283203125,
-0.00775146484375,
0.01123046875,
-0.0051116943359375,
-0.0269012451171875,
-0.052001953125,
0.0153656005859375,
-0.031341552734375,
-0.018157958984375,
-0.007415771484375,
0.01065826416015625,
0.025604248046875,
-0.0291290283203125,
-0.05914306640625,
0.085693359375,
-0.018463134765625,
-0.034393310546875,
-0.0758056640625,
0.0001461505889892578,
-0.0023899078369140625,
0.0186920166015625,
-0.0253143310546875,
-0.0221710205078125,
-0.0220489501953125,
0.0701904296875,
-0.007770538330078125,
0.032196044921875,
0.01335906982421875,
-0.00742340087890625,
-0.0235595703125,
0.0004405975341796875,
-0.004741668701171875,
-0.01180267333984375,
0.0302581787109375,
-0.0137176513671875,
0.01175689697265625,
0.01023101806640625,
-0.061370849609375,
-0.01959228515625,
-0.0163421630859375,
0.053558349609375,
-0.006786346435546875,
-0.04815673828125,
-0.022674560546875,
-0.031463623046875,
0.045745849609375,
0.0233612060546875,
0.01139068603515625,
-0.00438690185546875,
-0.0172271728515625,
-0.037628173828125,
-0.048431396484375,
0.013214111328125,
0.0270233154296875,
-0.06170654296875,
0.004932403564453125,
0.0391845703125,
0.026519775390625,
-0.016876220703125,
0.004756927490234375,
0.006877899169921875,
-0.0297088623046875,
0.030609130859375,
0.0091094970703125,
-0.01103973388671875,
0.0792236328125,
-0.1065673828125,
0.04571533203125,
0.0176544189453125,
-0.04632568359375,
-0.023529052734375,
-0.045806884765625,
0.034912109375,
-0.00846099853515625,
0.007038116455078125,
-0.01474761962890625,
0.00572967529296875,
-0.005126953125,
-0.0014514923095703125,
-0.0008702278137207031,
0.019683837890625,
-0.035552978515625,
0.00691986083984375,
0.015289306640625,
0.00902557373046875,
-0.0227508544921875,
0.051849365234375,
0.03350830078125,
-0.00038623809814453125,
-0.0162506103515625,
0.0252838134765625,
-0.0279083251953125,
0.036834716796875,
-0.0284881591796875,
0.00946044921875,
0.0014467239379882812,
0.01171112060546875,
0.0062255859375,
0.017547607421875,
0.0189056396484375,
-0.01702880859375,
0.037353515625,
0.051849365234375,
0.009490966796875,
0.0269317626953125
] |
f5682c0f754b40e887b1c9d9826c44384c86e0e8
|
Wordpress Stackexchange
Q: remove_action in a theme I'm using a theme that gets updated pretty frequently. For this, it has added a custom.php file to include modifications. Now, in this theme, under the functions.php, the developer has included his own meta section which is added using the following function:
add_action('wp_head', 'theme_metas');
I want to let my SEO plugin manage this, so I tried adding this into the custom.php:
remove_action('wp_head', 'theme_metas', 15);
I even tried altering the priority higher and lower than 10 (which is default) but the metas are still showing. Can someone shed some light please?
A: Your remove_action has to have a priority matching the priority used in add_action.
Important: To remove a hook, the $function_to_remove and $priority
arguments must match when the hook was added. This goes for both
filters and actions. No warning will be given on removal failure.
http://codex.wordpress.org/Function_Reference/remove_action
In you case, it looks like remove_action('wp_head', 'theme_metas'); should work, but you may be having trouble because of how and when your custom.php file loads.
|
Q: remove_action in a theme I'm using a theme that gets updated pretty frequently. For this, it has added a custom.php file to include modifications. Now, in this theme, under the functions.php, the developer has included his own meta section which is added using the following function:
add_action('wp_head', 'theme_metas');
I want to let my SEO plugin manage this, so I tried adding this into the custom.php:
remove_action('wp_head', 'theme_metas', 15);
I even tried altering the priority higher and lower than 10 (which is default) but the metas are still showing. Can someone shed some light please?
A: Your remove_action has to have a priority matching the priority used in add_action.
Important: To remove a hook, the $function_to_remove and $priority
arguments must match when the hook was added. This goes for both
filters and actions. No warning will be given on removal failure.
http://codex.wordpress.org/Function_Reference/remove_action
In you case, it looks like remove_action('wp_head', 'theme_metas'); should work, but you may be having trouble because of how and when your custom.php file loads.
A: For removing an action the priority has to be the same priority as was used when adding the action. in your case it should be
remove_action('wp_head', 'theme_metas');
or
remove_action('wp_head', 'theme_metas',10);
The fine detail to remember is that remove of an action can be done only after the action was already added. Actions are simply stored in an array and all remove_action does is to nullify the entry. If remove_action is called before add_action the end result will be that the remove will effectively do nothing.
Therefor you should call remove_action only when you are sure that the add_action was called and for most actions a good bet is to hook with highest priority on the hook in question.
In your case
add_action('wp_head','wpse86994_remove_action',1); // prioroty of 1, but can be anything higher (lower number) then the priority of the action
function wpse86994_remove_action() {
remove_action('wp_head', 'theme_metas');
}
|
wordpress
|
{
"language": "en",
"length": 313,
"provenance": "stackexchange_00019.jsonl.gz:429095",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/86992"
}
|
[
0.0614013671875,
0.0189666748046875,
-0.0018911361694335938,
-0.004901885986328125,
0.032958984375,
-0.04156494140625,
0.0716552734375,
-0.0265045166015625,
-0.01849365234375,
0.031219482421875,
0.0236968994140625,
-0.026580810546875,
-0.0113372802734375,
-0.04156494140625,
-0.01488494873046875,
-0.0291748046875,
0.04058837890625,
0.0234527587890625,
0.060302734375,
0.00872039794921875,
0.006069183349609375,
0.043182373046875,
0.026702880859375,
0.036285400390625,
0.01580810546875,
-0.039215087890625,
0.08013916015625,
-0.018157958984375,
0.0199737548828125,
-0.016204833984375,
0.0149078369140625,
0.00481414794921875,
0.0011577606201171875,
0.022216796875,
0.0026702880859375,
0.0011005401611328125,
0.01971435546875,
-0.0034847259521484375,
0.01549530029296875,
0.0177154541015625,
0.006923675537109375,
0.005245208740234375,
-0.020751953125,
-0.003879547119140625,
-0.0291595458984375,
-0.060638427734375,
0.0426025390625,
-0.014617919921875,
0.01204681396484375,
-0.0391845703125,
-0.0028095245361328125,
-0.007221221923828125,
0.02215576171875,
-0.0357666015625,
-0.0131988525390625,
0.0009026527404785156,
-0.037994384765625,
0.0311279296875,
0.015960693359375,
0.042633056640625,
0.011077880859375,
0.021575927734375,
-0.022430419921875,
-0.033660888671875,
0.008697509765625,
0.010162353515625,
0.00591278076171875,
0.007175445556640625,
-0.043731689453125,
0.01355743408203125,
0.0283355712890625,
-0.03424072265625,
-0.017181396484375,
-0.006694793701171875,
-0.0040435791015625,
-0.0193023681640625,
-0.013214111328125,
-0.036865234375,
0.0290374755859375,
0.0187835693359375,
-0.02105712890625,
-0.04595947265625,
0.00276947021484375,
-0.00579833984375,
0.01654052734375,
0.048919677734375,
-0.01529693603515625,
-0.01055908203125,
-0.046783447265625,
-0.0182037353515625,
-0.025421142578125,
-0.071044921875,
-0.01251983642578125,
-0.028717041015625,
-0.0015659332275390625,
-0.02789306640625,
0.008575439453125,
0.043792724609375,
-0.01561737060546875,
-0.0012865066528320312,
0.0166473388671875,
-0.042236328125,
0.02606201171875,
-0.039642333984375,
-0.016082763671875,
-0.004428863525390625,
0.0020122528076171875,
0.0188446044921875,
0.00862884521484375,
0.043975830078125,
-0.0123291015625,
-0.053192138671875,
-0.00009340047836303711,
-0.01556396484375,
-0.013763427734375,
-0.00922393798828125,
-0.035125732421875,
0.0179290771484375,
-0.006290435791015625,
-0.00908660888671875,
0.0241851806640625,
0.038360595703125,
0.0036678314208984375,
-0.07232666015625,
0.01837158203125,
-0.02008056640625,
-0.05499267578125,
-0.01468658447265625,
0.028961181640625,
0.00460052490234375,
-0.0450439453125,
0.01041412353515625,
0.063232421875,
0.0140228271484375,
0.003902435302734375,
-0.0208892822265625,
0.02716064453125,
-0.0015382766723632812,
-0.0008492469787597656,
0.0130157470703125,
0.01065826416015625,
-0.04083251953125,
-0.0265045166015625,
0.007167816162109375,
0.0250091552734375,
0.00241851806640625,
-0.004955291748046875,
0.01580810546875,
0.0297393798828125,
-0.0030536651611328125,
0.01617431640625,
-0.05401611328125,
0.0242767333984375,
0.00911712646484375,
0.018585205078125,
-0.00324249267578125,
0.0592041015625,
-0.042694091796875,
-0.023529052734375,
-0.0302581787109375,
0.0059661865234375,
-0.00843048095703125,
-0.01560211181640625,
-0.033477783203125,
-0.052642822265625,
-0.002811431884765625,
0.0036258697509765625,
-0.0036487579345703125,
0.0161285400390625,
0.01495361328125,
0.0190887451171875,
-0.01203155517578125,
0.0234832763671875,
0.01654052734375,
-0.002681732177734375,
0.01351165771484375,
-0.00603485107421875,
0.053985595703125,
-0.007099151611328125,
0.0229644775390625,
0.0109710693359375,
-0.0438232421875,
0.042724609375,
-0.01018524169921875,
-0.0633544921875,
0.03363037109375,
0.025543212890625,
0.05633544921875,
-0.022674560546875,
0.022674560546875,
0.0740966796875,
0.035064697265625,
-0.003986358642578125,
0.00807952880859375,
0.00771331787109375,
-0.019805908203125,
0.005359649658203125,
-0.01210784912109375,
-0.00560760498046875,
0.00850677490234375,
0.0068206787109375,
0.00881195068359375,
0.0186004638671875,
-0.0091552734375,
-0.07952880859375,
0.031951904296875,
-0.055938720703125,
0.060516357421875,
-0.012664794921875,
0.031768798828125,
0.01113128662109375,
-0.0185546875,
-0.02325439453125,
0.01552581787109375,
0.0019168853759765625,
-0.020660400390625,
-0.01617431640625,
0.0254058837890625,
0.0173797607421875,
0.0236968994140625,
0.008453369140625,
0.006847381591796875,
-0.0145263671875,
-0.0224609375,
0.04962158203125,
-0.00963592529296875,
-0.040374755859375,
-0.0247039794921875,
-0.0155487060546875,
-0.0008234977722167969,
-0.07244873046875,
0.08953857421875,
0.025390625,
0.039642333984375,
-0.0207672119140625,
-0.0216522216796875,
-0.016357421875,
-0.07977294921875,
-0.007511138916015625,
0.057464599609375,
0.037841796875,
0.0045013427734375,
0.0003724098205566406,
0.022918701171875,
0.035369873046875,
-0.028106689453125,
0.0167388916015625,
0.0005979537963867188,
0.020965576171875,
-0.0018901824951171875,
-0.007129669189453125,
-0.028533935546875,
0.0272674560546875,
-0.045501708984375,
0.040283203125,
0.01016998291015625,
-0.01837158203125,
-0.07061767578125,
0.0239715576171875,
-0.017242431640625,
0.032501220703125,
-0.056060791015625,
-0.07244873046875,
0.006683349609375,
0.044158935546875,
-0.01861572265625,
0.035736083984375,
0.0203857421875,
-0.00775146484375,
-0.0160369873046875,
0.0220489501953125,
0.0027179718017578125,
-0.0158538818359375,
0.0281524658203125,
0.01122283935546875,
-0.0118255615234375,
-0.003170013427734375,
0.006237030029296875,
-0.0440673828125,
-0.00014293193817138672,
-0.0173797607421875,
0.0209197998046875,
0.0256195068359375,
-0.003253936767578125,
-0.0003571510314941406,
-0.012451171875,
0.0296478271484375,
-0.021392822265625,
0.03253173828125,
-0.01407623291015625,
0.005428314208984375,
0.008636474609375,
-0.0357666015625,
0.052154541015625,
0.03558349609375,
-0.041168212890625,
0.006664276123046875,
-0.029571533203125,
0.036376953125,
-0.01507568359375,
0.02911376953125,
0.07415771484375,
-0.032440185546875,
0.042449951171875,
0.01348114013671875,
-0.033966064453125,
0.01035308837890625,
0.036041259765625,
0.0070037841796875,
-0.00968170166015625,
-0.035003662109375,
0.0125732421875,
0.0248565673828125,
0.00760650634765625,
0.01922607421875,
-0.0284271240234375,
0.0139312744140625,
0.0180511474609375,
-0.04937744140625,
-0.0254669189453125,
0.043548583984375,
-0.038360595703125,
-0.0061798095703125,
0.0033054351806640625,
-0.03704833984375,
-0.0172119140625,
0.0280609130859375,
-0.0026111602783203125,
-0.0247802734375,
-0.01953125,
0.016571044921875,
-0.01641845703125,
-0.0165557861328125,
0.001705169677734375,
0.0225982666015625,
0.00214385986328125,
-0.01195526123046875,
0.1297607421875,
0.00836944580078125,
-0.06549072265625,
-0.000640869140625,
-0.0287017822265625,
-0.013916015625,
0.0401611328125,
0.0274810791015625,
-0.0244293212890625,
0.010955810546875,
-0.00493621826171875,
0.0258026123046875,
0.0291290283203125,
-0.038848876953125,
-0.0161285400390625,
-0.018524169921875,
-0.01163482666015625,
-0.0008211135864257812,
0.031829833984375,
0.020355224609375,
-0.032501220703125,
0.0206451416015625,
-0.05157470703125,
-0.0286865234375,
0.021575927734375,
-0.025177001953125,
0.0228424072265625,
0.00824737548828125,
-0.0227203369140625,
-0.00788116455078125,
0.035980224609375,
0.043060302734375,
0.035186767578125,
0.0377197265625,
0.02142333984375,
0.01186370849609375,
-0.00942230224609375,
0.01148223876953125,
-0.0657958984375,
0.006053924560546875,
-0.01334381103515625,
0.041473388671875,
0.0088043212890625,
0.01531982421875,
-0.0104217529296875,
0.030426025390625,
-0.036956787109375,
-0.0057373046875,
0.03564453125,
0.005489349365234375,
0.0416259765625,
-0.024261474609375,
-0.019866943359375,
-0.03033447265625,
0.060272216796875,
-0.0518798828125,
-0.031982421875,
0.00832366943359375,
0.0257720947265625,
-0.00858306884765625,
-0.012542724609375,
0.0081329345703125,
-0.024139404296875,
-0.1580810546875,
0.0142669677734375,
0.008148193359375,
-0.046844482421875,
-0.0345458984375,
0.04095458984375,
-0.1204833984375,
-0.0458984375,
0.0244598388671875,
-0.0145263671875,
0.001628875732421875,
0.0195159912109375,
-0.03729248046875,
-0.00783538818359375,
-0.02044677734375,
-0.0149993896484375,
-0.031585693359375,
0.0020275115966796875,
-0.07568359375,
0.045928955078125,
0.038909912109375,
0.010833740234375,
-0.0015840530395507812,
0.025604248046875,
0.035369873046875,
0.0650634765625,
-0.01412200927734375,
-0.036529541015625,
0.0163421630859375,
0.0005159378051757812,
0.01554107666015625,
-0.0140228271484375,
-0.00266265869140625,
0.0208740234375,
-0.013763427734375,
0.01508331298828125,
-0.021881103515625,
-0.032928466796875,
0.025543212890625,
-0.047882080078125,
-0.054473876953125,
-0.043182373046875,
-0.0190277099609375,
-0.0019588470458984375,
0.007659912109375,
-0.01340484619140625,
-0.0423583984375,
-0.04168701171875,
0.031463623046875,
-0.048065185546875,
0.0030364990234375,
0.0083160400390625,
0.082275390625,
0.02783203125,
-0.007335662841796875,
0.00458526611328125,
0.026214599609375,
0.0268402099609375,
-0.0032978057861328125,
0.022705078125,
-0.01727294921875,
-0.0157470703125,
0.037445068359375,
-0.0167083740234375,
0.0213623046875,
-0.048675537109375,
0.059234619140625,
-0.007495880126953125,
0.01491546630859375,
0.005207061767578125,
-0.01104736328125,
0.039306640625,
-0.01161956787109375,
0.007427215576171875,
-0.034332275390625,
0.020355224609375,
0.038299560546875,
-0.0123748779296875,
0.043609619140625,
-0.009246826171875,
0.01079559326171875,
-0.0018310546875,
-0.031951904296875,
0.050140380859375,
0.021392822265625,
-0.0018796920776367188,
-0.002239227294921875,
-0.0261077880859375,
0.04345703125,
-0.046783447265625,
0.00762176513671875,
-0.09552001953125,
0.034576416015625,
-0.01239013671875,
-0.01049041748046875,
-0.01480865478515625,
-0.0070953369140625,
0.045623779296875,
-0.0108795166015625,
-0.024749755859375,
-0.05126953125,
0.006977081298828125,
0.06146240234375,
0.0231170654296875,
0.01139068603515625,
0.045013427734375,
0.0286407470703125,
-0.04254150390625,
-0.005664825439453125,
0.004253387451171875,
-0.00818634033203125,
-0.06353759765625,
-0.03350830078125,
-0.0009407997131347656,
-0.0216217041015625,
0.032440185546875,
0.0191650390625,
-0.00226593017578125,
0.0234222412109375,
-0.0269012451171875,
0.016876220703125,
-0.0016050338745117188,
0.0299835205078125,
0.0007004737854003906,
-0.01995849609375,
0.0200347900390625,
-0.00431060791015625,
0.033447265625,
-0.0252227783203125,
-0.0178375244140625,
0.0245819091796875,
0.0272369384765625,
-0.0000769495964050293,
0.00374603271484375,
0.0092315673828125,
-0.00481414794921875,
-0.01424407958984375,
0.043212890625,
0.015716552734375,
-0.055084228515625,
-0.006084442138671875,
0.0260162353515625,
0.004329681396484375,
-0.018341064453125,
-0.0044708251953125,
0.03680419921875,
-0.0099945068359375,
0.031524658203125,
0.0026760101318359375,
0.004116058349609375,
-0.00994110107421875,
-0.0140380859375,
-0.01117706298828125,
0.0239105224609375,
0.020263671875,
-0.10430908203125,
-0.0677490234375,
0.00691986083984375,
-0.00928497314453125,
0.0458984375,
-0.027099609375,
0.005023956298828125,
-0.02777099609375,
0.0083160400390625,
0.0023059844970703125,
0.01134490966796875,
0.048736572265625,
0.0109405517578125,
-0.0533447265625,
0.00424957275390625,
-0.01454925537109375,
-0.005275726318359375,
-0.06884765625,
-0.06610107421875,
-0.037750244140625,
0.0010747909545898438,
-0.01837158203125,
0.024383544921875,
-0.0046234130859375,
0.021392822265625,
0.0303955078125,
0.032073974609375,
-0.0233917236328125,
0.05438232421875,
-0.0307159423828125,
0.052490234375,
0.0147705078125,
0.0064544677734375,
0.0272979736328125,
0.0555419921875,
0.038604736328125,
-0.030181884765625,
0.034637451171875,
-0.041534423828125,
-0.040313720703125,
-0.027740478515625,
-0.040191650390625,
0.008758544921875,
0.0350341796875,
-0.0211334228515625,
-0.0106048583984375,
-0.0236663818359375,
0.00025844573974609375,
-0.039276123046875,
0.032196044921875,
-0.020050048828125,
-0.0108489990234375,
-0.043487548828125,
-0.046722412109375,
-0.0028705596923828125,
-0.0023174285888671875,
0.021148681640625,
0.039215087890625,
-0.05621337890625,
0.0263519287109375,
0.015655517578125,
-0.0325927734375,
0.036346435546875,
0.068115234375,
0.0223236083984375,
0.053375244140625,
0.0125732421875,
0.0201416015625,
0.014251708984375,
0.0292205810546875,
-0.0065155029296875,
-0.0190887451171875,
0.0589599609375,
0.017425537109375,
0.0015869140625,
0.043548583984375,
-0.01317596435546875,
0.0227813720703125,
0.060394287109375,
0.05218505859375,
-0.1080322265625,
0.01629638671875,
0.01200103759765625,
0.028350830078125,
0.084228515625,
-0.0189666748046875,
0.006649017333984375,
-0.02349853515625,
0.01032257080078125,
0.055999755859375,
-0.0223388671875,
0.0204925537109375,
0.038909912109375,
-0.0173492431640625,
-0.038848876953125,
-0.039337158203125,
-0.01001739501953125,
0.0283203125,
0.0014591217041015625,
-0.01375579833984375,
-0.01067352294921875,
-0.0235137939453125,
0.018951416015625,
0.0215301513671875,
-0.0184173583984375,
-0.05072021484375,
0.02880859375,
-0.0146942138671875,
-0.017730712890625,
0.0128631591796875,
-0.00684356689453125,
0.016815185546875,
0.02001953125,
-0.026123046875,
0.01371002197265625,
-0.01959228515625,
-0.0195770263671875,
-0.05828857421875,
-0.038238525390625,
0.0218505859375,
-0.018707275390625,
-0.0272674560546875,
0.031005859375,
-0.0218963623046875,
-0.0712890625,
-0.01410675048828125,
-0.041107177734375,
0.0872802734375,
-0.0487060546875,
-0.0243377685546875,
-0.00048041343688964844,
-0.0016422271728515625,
0.006374359130859375,
0.0103302001953125,
0.04345703125,
-0.027862548828125,
-0.0015459060668945312,
0.0271148681640625,
0.005596160888671875,
-0.00308990478515625,
0.0258636474609375,
-0.06805419921875,
0.08721923828125,
0.031280517578125,
0.020843505859375,
-0.01250457763671875,
0.03558349609375,
-0.0244598388671875,
0.01294708251953125,
-0.026153564453125,
0.064697265625,
0.0173492431640625,
0.03265380859375,
-0.016815185546875,
-0.000667572021484375,
0.01195526123046875,
0.018890380859375,
0.058990478515625,
0.0264892578125,
-0.0009322166442871094,
-0.0006866455078125,
0.032867431640625,
0.015899658203125,
-0.034423828125,
0.0202178955078125,
-0.0246734619140625,
-0.00910186767578125,
-0.0231475830078125,
-0.0263671875,
0.0301513671875,
-0.02374267578125,
-0.0577392578125,
-0.0013494491577148438,
0.005084991455078125,
-0.015777587890625,
-0.01197052001953125,
0.04913330078125,
-0.047149658203125,
0.004398345947265625,
0.025146484375,
0.01348114013671875,
-0.022064208984375,
0.022735595703125,
0.011383056640625,
-0.02984619140625,
-0.04498291015625,
-0.0173492431640625,
0.033172607421875,
0.021270751953125,
0.045745849609375,
0.0156097412109375,
0.0188140869140625,
0.00024008750915527344,
-0.0156402587890625,
0.0205841064453125,
0.0293426513671875,
-0.0411376953125,
0.07000732421875,
0.038177490234375,
0.01018524169921875,
-0.006847381591796875,
0.0677490234375,
0.0179901123046875,
0.06500244140625,
-0.0633544921875,
-0.02996826171875,
0.00044417381286621094,
-0.01422119140625,
0.00885009765625,
-0.0192108154296875,
0.004245758056640625,
-0.04302978515625,
-0.0181427001953125,
-0.03857421875,
-0.00627899169921875,
0.0012521743774414062,
0.0175323486328125,
-0.0129241943359375,
0.0157470703125,
-0.014923095703125,
-0.0154571533203125,
-0.0367431640625,
0.000014066696166992188,
0.00803375244140625,
0.046966552734375,
0.028564453125,
0.041259765625,
0.006511688232421875,
-0.01378631591796875,
-0.005001068115234375,
0.06927490234375,
-0.06488037109375,
0.0220947265625,
-0.0823974609375,
-0.1031494140625,
-0.031829833984375,
0.058807373046875,
0.013885498046875,
0.0289764404296875,
0.0198974609375,
0.01532745361328125,
0.0162200927734375,
0.0061187744140625,
0.011077880859375,
-0.0276641845703125,
-0.023284912109375,
-0.029205322265625,
0.024139404296875,
0.0196075439453125,
0.0211181640625,
-0.0269317626953125,
0.041259765625,
0.018096923828125,
0.0048065185546875,
-0.035919189453125,
0.012420654296875,
-0.040435791015625,
0.05218505859375,
0.009765625,
0.03582763671875,
0.03643798828125,
0.0164794921875,
0.005832672119140625,
-0.0214996337890625,
-0.02105712890625,
0.00821685791015625,
0.032684326171875,
-0.01177978515625,
0.0391845703125,
0.0012445449829101562,
-0.025634765625,
0.025360107421875,
-0.00748443603515625,
0.003719329833984375,
0.03369140625,
0.01212310791015625,
0.01137542724609375,
0.004428863525390625,
0.007556915283203125,
0.039337158203125,
0.03619384765625,
-0.0026397705078125,
0.038604736328125,
-0.0283966064453125,
0.0053253173828125,
-0.006549835205078125,
0.007541656494140625,
0.0206146240234375,
-0.005535125732421875,
0.023712158203125,
0.033538818359375,
0.0013275146484375,
-0.0338134765625,
-0.036041259765625,
-0.009979248046875,
0.0587158203125,
-0.0259857177734375,
-0.0018262863159179688,
0.01110076904296875,
0.027801513671875,
-0.0289764404296875,
-0.00595855712890625,
-0.01316070556640625,
-0.010894775390625,
-0.04754638671875,
-0.03863525390625,
0.0687255859375,
0.051361083984375,
-0.0014238357543945312,
-0.01873779296875,
-0.018951416015625,
-0.0108489990234375,
0.012725830078125,
0.046783447265625,
-0.00018203258514404297,
0.029876708984375,
-0.031768798828125,
-0.0126953125,
0.0377197265625,
-0.01100921630859375,
0.033233642578125,
0.0185394287109375,
0.0308074951171875,
0.039703369140625,
-0.04888916015625,
-0.026885986328125,
-0.0185394287109375,
0.0255889892578125,
0.004787445068359375,
0.001903533935546875,
-0.0236968994140625,
0.0067901611328125,
-0.028167724609375,
-0.007099151611328125,
-0.02020263671875,
-0.021087646484375,
-0.0120086669921875,
0.019866943359375,
-0.0217437744140625,
-0.0033931732177734375,
-0.03826904296875,
0.018463134765625,
0.016082763671875,
0.0203704833984375,
-0.07659912109375,
0.049957275390625,
-0.003536224365234375,
0.030303955078125,
0.0047454833984375,
-0.00490570068359375,
-0.0100250244140625,
0.0390625,
-0.00119781494140625,
-0.033050537109375,
-0.029693603515625,
0.048614501953125,
-0.035919189453125,
0.000004351139068603516,
0.0175323486328125,
0.004669189453125,
0.017852783203125,
-0.01357269287109375,
-0.01174163818359375,
0.027496337890625,
-0.013031005859375,
-0.007598876953125,
-0.00011801719665527344,
0.02886962890625,
-0.0100555419921875,
-0.064697265625,
-0.00441741943359375,
-0.031219482421875,
-0.006481170654296875,
0.0050811767578125,
0.0048370361328125,
0.0240020751953125,
-0.0284576416015625,
-0.06524658203125,
0.0390625,
-0.00757598876953125,
-0.03057861328125,
-0.0250396728515625,
0.00872802734375,
0.013702392578125,
0.0014362335205078125,
-0.0095672607421875,
-0.0205841064453125,
-0.0262603759765625,
0.0005092620849609375,
0.0112152099609375,
0.0225067138671875,
0.0180511474609375,
0.0284881591796875,
-0.0224456787109375,
0.0228271484375,
0.00579071044921875,
-0.01425933837890625,
-0.012359619140625,
-0.01432037353515625,
0.0543212890625,
0.039581298828125,
-0.0206451416015625,
0.042938232421875,
0.0190887451171875,
-0.00934600830078125,
-0.018157958984375,
-0.0565185546875,
-0.037353515625,
-0.00901031494140625,
0.09478759765625,
0.034210205078125,
0.0181121826171875,
-0.036346435546875,
-0.01128387451171875,
0.0025119781494140625,
-0.016204833984375,
-0.0433349609375,
0.013092041015625,
-0.06390380859375,
-0.044525146484375,
-0.007671356201171875,
-0.018768310546875,
0.0236053466796875,
-0.0138397216796875,
-0.041107177734375,
0.003307342529296875,
0.007045745849609375,
0.0225982666015625,
-0.06512451171875,
-0.0099334716796875,
0.052581787109375,
-0.0260772705078125,
0.033294677734375,
-0.00861358642578125,
0.00954437255859375,
0.040008544921875,
0.019561767578125,
0.01898193359375,
0.0167999267578125,
-0.01502227783203125,
0.0265655517578125,
0.00624847412109375,
0.042816162109375,
-0.00922393798828125,
-0.03668212890625,
-0.015380859375,
0.0166473388671875,
-0.01654052734375,
0.0235137939453125,
0.004314422607421875,
0.0098114013671875,
-0.0022983551025390625,
0.056243896484375,
-0.0186004638671875,
0.0693359375,
-0.012603759765625,
0.0277252197265625,
0.01380157470703125,
-0.0012083053588867188,
0.052001953125,
-0.01485443115234375,
-0.0010595321655273438,
-0.0191192626953125,
0.01145172119140625,
-0.07379150390625,
0.048858642578125,
0.0189056396484375,
0.0139007568359375,
0.043548583984375
] |
c765ed35a8d12edbb2b7798bd0135f61569a36ed
|
Wordpress Stackexchange
Q: Destination directory for file streaming does not exist or is not writable I am trying to upgrade my version of Wordpress but I get this error:
Destination directory for file streaming does not exist or is not writable.
A: This is a read-write permission error. Fix this by changing the "wp-content" folder's permissions to 755.
If this doesn't work checked the wp-config.php file and if it's not already defined, add
define('WP_TEMP_DIR', ABSPATH . 'wp-content/');
|
Q: Destination directory for file streaming does not exist or is not writable I am trying to upgrade my version of Wordpress but I get this error:
Destination directory for file streaming does not exist or is not writable.
A: This is a read-write permission error. Fix this by changing the "wp-content" folder's permissions to 755.
If this doesn't work checked the wp-config.php file and if it's not already defined, add
define('WP_TEMP_DIR', ABSPATH . 'wp-content/');
A: there are already Define Temp code in my wp-config.php file i just remove it and it work for me.
A: Note that if the temp directory is defined otherwise further down in the wp-config.php file, the later definition must either be changed to the above, or deleted.
This arose in my installation which started as a local Bitnami Wordpress install, but kept the same temp directory (pointing to my C: drive). I had placed the above code at the top of the file, but it was being superceded by the later temp folder definition that I was unaware of.
|
wordpress
|
{
"language": "en",
"length": 175,
"provenance": "stackexchange_00019.jsonl.gz:429135",
"question_score": "19",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87153"
}
|
[
0.0430908203125,
-0.0239105224609375,
-0.01056671142578125,
-0.010162353515625,
-0.01165771484375,
-0.054779052734375,
0.04412841796875,
-0.01351165771484375,
0.0438232421875,
0.0200653076171875,
-0.03143310546875,
-0.01470184326171875,
0.008148193359375,
-0.0116729736328125,
-0.0251617431640625,
-0.015899658203125,
0.0236053466796875,
0.004146575927734375,
0.034271240234375,
-0.00936126708984375,
0.00011974573135375977,
0.004993438720703125,
0.03680419921875,
0.04766845703125,
-0.0214080810546875,
0.04852294921875,
0.004627227783203125,
-0.0467529296875,
-0.036468505859375,
-0.04742431640625,
-0.00621795654296875,
0.0550537109375,
0.028533935546875,
0.0104522705078125,
-0.055328369140625,
-0.01343536376953125,
0.00921630859375,
-0.005542755126953125,
-0.0294036865234375,
0.02447509765625,
-0.0133819580078125,
0.00830078125,
0.0269927978515625,
-0.0237579345703125,
-0.0240936279296875,
-0.0328369140625,
0.007373809814453125,
-0.0241851806640625,
0.01558685302734375,
0.0482177734375,
-0.024383544921875,
0.0200958251953125,
-0.036163330078125,
0.044525146484375,
-0.0017528533935546875,
-0.028106689453125,
0.0189666748046875,
0.07122802734375,
0.01021575927734375,
-0.0736083984375,
-0.04083251953125,
0.0506591796875,
0.025238037109375,
0.055816650390625,
-0.006683349609375,
0.019683837890625,
0.049163818359375,
0.0189666748046875,
-0.040863037109375,
-0.0015497207641601562,
0.0121307373046875,
-0.02557373046875,
0.0174407958984375,
-0.004314422607421875,
0.0005292892456054688,
-0.044891357421875,
0.01496124267578125,
-0.031707763671875,
0.0186767578125,
0.01412200927734375,
-0.0091552734375,
-0.01021575927734375,
-0.0286102294921875,
-0.023284912109375,
0.0036640167236328125,
-0.00994110107421875,
-0.009490966796875,
-0.012176513671875,
-0.00502777099609375,
0.01230621337890625,
-0.0218353271484375,
0.02008056640625,
0.04779052734375,
-0.01222991943359375,
-0.06689453125,
0.0135040283203125,
-0.0076141357421875,
0.040496826171875,
-0.0269012451171875,
0.0172271728515625,
-0.02679443359375,
-0.0012359619140625,
0.011474609375,
-0.041961669921875,
0.024810791015625,
-0.008270263671875,
-0.02801513671875,
-0.03564453125,
0.055267333984375,
0.034912109375,
-0.0167694091796875,
0.04852294921875,
0.007518768310546875,
-0.029266357421875,
-0.01013946533203125,
0.036956787109375,
-0.0198974609375,
0.039031982421875,
0.0077362060546875,
0.04638671875,
-0.01287078857421875,
0.0018758773803710938,
-0.06439208984375,
0.0234832763671875,
0.01678466796875,
-0.01812744140625,
-0.0018167495727539062,
0.0660400390625,
0.0189208984375,
0.0374755859375,
-0.01218414306640625,
0.007610321044921875,
0.003093719482421875,
-0.00975799560546875,
-0.029266357421875,
-0.0222930908203125,
0.0299835205078125,
-0.00252532958984375,
-0.0123748779296875,
0.038299560546875,
0.0212554931640625,
-0.052978515625,
-0.015777587890625,
0.0107879638671875,
0.0545654296875,
-0.0068359375,
0.018707275390625,
0.05206298828125,
0.030792236328125,
-0.0308380126953125,
0.051177978515625,
0.00824737548828125,
0.041412353515625,
-0.032318115234375,
-0.00704193115234375,
-0.06103515625,
-0.019744873046875,
-0.0268402099609375,
0.033447265625,
-0.029296875,
0.05755615234375,
0.006679534912109375,
0.0208740234375,
0.0205841064453125,
0.0186767578125,
-0.024383544921875,
-0.0758056640625,
-0.006134033203125,
0.026275634765625,
0.00234222412109375,
0.00018346309661865234,
-0.0233306884765625,
0.0114288330078125,
0.0200347900390625,
0.0014505386352539062,
0.031768798828125,
-0.0098876953125,
-0.0287933349609375,
0.02410888671875,
0.0555419921875,
0.00951385498046875,
-0.01837158203125,
0.02581787109375,
0.0008668899536132812,
-0.033203125,
0.0308990478515625,
0.00959014892578125,
0.0295257568359375,
0.0169219970703125,
0.000023365020751953125,
0.0135650634765625,
0.0213165283203125,
0.00032806396484375,
0.0035247802734375,
-0.025146484375,
-0.0259857177734375,
-0.003742218017578125,
0.01410675048828125,
-0.02166748046875,
0.003936767578125,
0.0205230712890625,
0.0042877197265625,
-0.0309600830078125,
-0.00958251953125,
-0.07220458984375,
-0.0028438568115234375,
-0.01471710205078125,
0.0189971923828125,
0.036346435546875,
0.0172882080078125,
-0.007610321044921875,
0.0265350341796875,
0.00013256072998046875,
-0.07525634765625,
-0.045684814453125,
0.034637451171875,
-0.039215087890625,
-0.001987457275390625,
-0.006046295166015625,
0.058837890625,
-0.0242767333984375,
-0.014251708984375,
-0.032379150390625,
-0.031280517578125,
0.01103973388671875,
0.01190185546875,
-0.0309600830078125,
0.005611419677734375,
0.037841796875,
0.0080718994140625,
0.050018310546875,
0.009765625,
0.007450103759765625,
-0.0110626220703125,
-0.026336669921875,
0.006259918212890625,
-0.0039215087890625,
-0.0517578125,
0.003299713134765625,
0.051971435546875,
0.03936767578125,
0.048797607421875,
-0.0157012939453125,
-0.00984954833984375,
0.0643310546875,
-0.06597900390625,
-0.00858306884765625,
-0.0034694671630859375,
-0.0205078125,
0.0251922607421875,
0.040740966796875,
0.0020961761474609375,
-0.00881195068359375,
-0.060272216796875,
-0.00958251953125,
0.013519287109375,
-0.0003757476806640625,
0.0099029541015625,
0.027374267578125,
-0.0129547119140625,
-0.0084381103515625,
0.02117919921875,
0.001865386962890625,
0.01296234130859375,
0.02337646484375,
0.0106048583984375,
-0.0211029052734375,
-0.014312744140625,
-0.03704833984375,
0.029052734375,
0.03570556640625,
-0.0535888671875,
0.01041412353515625,
0.06781005859375,
0.0675048828125,
0.04132080078125,
-0.0267181396484375,
-0.0469970703125,
0.040557861328125,
0.063720703125,
-0.01953125,
0.0159912109375,
-0.011322021484375,
-0.005092620849609375,
-0.03277587890625,
-0.0112762451171875,
0.017547607421875,
0.008270263671875,
-0.0157928466796875,
-0.0103302001953125,
0.026214599609375,
0.01293182373046875,
-0.024993896484375,
0.036468505859375,
0.0030231475830078125,
-0.024444580078125,
0.110595703125,
0.007572174072265625,
-0.00839996337890625,
0.0093231201171875,
0.0618896484375,
0.0343017578125,
0.007366180419921875,
-0.032958984375,
0.00220489501953125,
0.0203857421875,
0.031646728515625,
0.01177215576171875,
-0.01204681396484375,
-0.0164337158203125,
-0.05255126953125,
-0.079345703125,
0.0330810546875,
-0.03692626953125,
0.04876708984375,
0.028594970703125,
-0.01181793212890625,
0.016448974609375,
-0.0675048828125,
-0.08135986328125,
0.006114959716796875,
-0.0689697265625,
0.01812744140625,
0.0178375244140625,
-0.03515625,
-0.031097412109375,
0.07586669921875,
0.0046844482421875,
-0.033355712890625,
0.0328369140625,
-0.023681640625,
-0.0198974609375,
-0.034637451171875,
0.007213592529296875,
-0.01806640625,
0.0228424072265625,
0.01007843017578125,
-0.00975799560546875,
-0.007076263427734375,
-0.037811279296875,
-0.0225982666015625,
0.0019130706787109375,
-0.00782012939453125,
-0.01244354248046875,
-0.01357269287109375,
0.007404327392578125,
-0.034149169921875,
0.01052093505859375,
0.09881591796875,
0.004150390625,
-0.031402587890625,
-0.01497650146484375,
-0.0230560302734375,
-0.00470733642578125,
-0.03741455078125,
0.032135009765625,
0.047454833984375,
-0.029022216796875,
-0.015655517578125,
-0.05322265625,
-0.01409912109375,
0.00870513916015625,
-0.02728271484375,
0.05645751953125,
0.035797119140625,
-0.031524658203125,
0.00901031494140625,
-0.0012578964233398438,
-0.03802490234375,
0.028076171875,
0.0128936767578125,
-0.0245819091796875,
-0.0206756591796875,
-0.0369873046875,
-0.055419921875,
0.0178680419921875,
0.10089111328125,
0.001434326171875,
0.01523590087890625,
0.044189453125,
0.0006313323974609375,
-0.005756378173828125,
-0.027984619140625,
-0.056854248046875,
-0.068359375,
0.034210205078125,
-0.06390380859375,
-0.0272674560546875,
-0.044769287109375,
-0.002033233642578125,
-0.009490966796875,
0.0615234375,
0.0195465087890625,
-0.04266357421875,
0.031646728515625,
0.03192138671875,
-0.0239715576171875,
0.01007080078125,
0.00292205810546875,
-0.020538330078125,
0.04522705078125,
-0.02154541015625,
-0.01055908203125,
-0.00951385498046875,
-0.00335693359375,
-0.0948486328125,
0.04150390625,
-0.0214691162109375,
0.03643798828125,
-0.0277862548828125,
0.0208892822265625,
0.014190673828125,
0.01259613037109375,
-0.0100860595703125,
-0.0251617431640625,
-0.00626373291015625,
-0.1065673828125,
-0.0044097900390625,
-0.062286376953125,
0.056671142578125,
-0.005462646484375,
0.0308685302734375,
-0.05712890625,
0.024505615234375,
0.012603759765625,
-0.0133056640625,
0.001476287841796875,
-0.0253753662109375,
-0.00278472900390625,
0.047821044921875,
-0.0004324913024902344,
0.01873779296875,
-0.007061004638671875,
-0.027435302734375,
-0.029693603515625,
0.00937652587890625,
-0.0284271240234375,
0.0313720703125,
-0.01531219482421875,
-0.0204620361328125,
-0.059967041015625,
-0.0280609130859375,
-0.0008988380432128906,
0.03814697265625,
-0.01378631591796875,
0.0188140869140625,
-0.039642333984375,
-0.0697021484375,
0.055938720703125,
-0.0177001953125,
0.01035308837890625,
-0.00420379638671875,
0.074951171875,
0.0004267692565917969,
-0.0215301513671875,
-0.00872039794921875,
-0.0025501251220703125,
0.0114593505859375,
-0.004680633544921875,
0.039306640625,
0.03155517578125,
0.025146484375,
-0.0007905960083007812,
-0.017578125,
-0.003124237060546875,
0.031402587890625,
-0.026702880859375,
0.0169525146484375,
-0.0224151611328125,
-0.00597381591796875,
0.0155029296875,
0.018402099609375,
0.016571044921875,
0.0213165283203125,
-0.01220703125,
0.00797271728515625,
0.0146636962890625,
0.03759765625,
-0.04345703125,
-0.027313232421875,
-0.062225341796875,
0.009246826171875,
-0.039947509765625,
0.061553955078125,
0.0299072265625,
-0.002773284912109375,
0.061737060546875,
0.043731689453125,
-0.022216796875,
-0.0031337738037109375,
-0.019561767578125,
0.0129547119140625,
0.029144287109375,
-0.0025920867919921875,
-0.014678955078125,
-0.01263427734375,
-0.01010894775390625,
0.0306549072265625,
0.024505615234375,
-0.06707763671875,
0.0031566619873046875,
0.0303497314453125,
0.03753662109375,
0.012542724609375,
-0.0277252197265625,
0.036895751953125,
0.040374755859375,
-0.042205810546875,
-0.00711822509765625,
-0.055511474609375,
0.004451751708984375,
-0.062103271484375,
-0.0036869049072265625,
-0.0135498046875,
-0.0168914794921875,
0.0014171600341796875,
0.0145111083984375,
-0.019805908203125,
0.0203094482421875,
-0.002593994140625,
0.005718231201171875,
0.004604339599609375,
0.0213165283203125,
0.0051727294921875,
0.00838470458984375,
-0.0032024383544921875,
0.004528045654296875,
0.036102294921875,
-0.043731689453125,
-0.036590576171875,
0.0180816650390625,
0.02117919921875,
-0.052825927734375,
-0.0221099853515625,
0.064208984375,
0.006053924560546875,
-0.01088714599609375,
-0.0151519775390625,
-0.0289154052734375,
-0.040283203125,
0.007415771484375,
0.0125885009765625,
0.00408935546875,
-0.0104522705078125,
0.0021724700927734375,
-0.025665283203125,
-0.01198577880859375,
-0.016387939453125,
0.047607421875,
-0.036865234375,
-0.006931304931640625,
-0.019683837890625,
0.033172607421875,
-0.022186279296875,
0.004459381103515625,
0.0183563232421875,
0.026763916015625,
-0.041473388671875,
-0.00958251953125,
0.057464599609375,
-0.037933349609375,
-0.004665374755859375,
-0.004199981689453125,
-0.002960205078125,
-0.03466796875,
0.01320648193359375,
0.0379638671875,
0.0306396484375,
-0.060089111328125,
0.01406097412109375,
-0.04766845703125,
-0.00809478759765625,
-0.0115509033203125,
-0.0345458984375,
-0.055389404296875,
-0.01029205322265625,
-0.000652313232421875,
-0.003765106201171875,
0.0033111572265625,
-0.0034656524658203125,
-0.0168304443359375,
0.048187255859375,
0.045745849609375,
0.018768310546875,
-0.038330078125,
0.03924560546875,
0.02471923828125,
0.030487060546875,
-0.002208709716796875,
0.01364898681640625,
0.014251708984375,
-0.02618408203125,
0.01018524169921875,
0.0005135536193847656,
-0.0265045166015625,
-0.0455322265625,
0.0254364013671875,
0.006710052490234375,
0.061859130859375,
-0.016815185546875,
-0.0003826618194580078,
-0.0165252685546875,
0.0044403076171875,
-0.019134521484375,
0.0328369140625,
-0.040985107421875,
-0.0222320556640625,
-0.02740478515625,
-0.00576019287109375,
0.052703857421875,
-0.01482391357421875,
0.005565643310546875,
0.019683837890625,
-0.03521728515625,
0.020843505859375,
0.0083770751953125,
-0.0205535888671875,
0.0278778076171875,
0.03277587890625,
-0.0207061767578125,
0.0260467529296875,
0.011260986328125,
0.020660400390625,
0.02099609375,
-0.0173187255859375,
0.048065185546875,
0.001434326171875,
0.0614013671875,
0.006145477294921875,
0.0004355907440185547,
0.0430908203125,
-0.028564453125,
-0.006359100341796875,
0.0168914794921875,
0.03411865234375,
-0.0033168792724609375,
-0.0232391357421875,
-0.013519287109375,
-0.0211029052734375,
0.027801513671875,
-0.007579803466796875,
0.022918701171875,
-0.01349639892578125,
0.02069091796875,
0.0009760856628417969,
-0.01593017578125,
0.005260467529296875,
-0.0273284912109375,
-0.0187835693359375,
0.0146331787109375,
-0.051300048828125,
0.0001226663589477539,
-0.03619384765625,
-0.011688232421875,
0.036651611328125,
-0.022003173828125,
0.0166778564453125,
0.00978851318359375,
-0.02813720703125,
-0.0294342041015625,
-0.00533294677734375,
-0.0126190185546875,
-0.03924560546875,
0.00159454345703125,
-0.032135009765625,
0.01175689697265625,
0.042938232421875,
0.0282440185546875,
-0.0006585121154785156,
-0.00951385498046875,
0.00012826919555664062,
0.04962158203125,
0.01297760009765625,
-0.01409912109375,
0.0491943359375,
0.049774169921875,
-0.07501220703125,
0.01552581787109375,
-0.0251922607421875,
0.007511138916015625,
-0.012786865234375,
-0.03375244140625,
0.02325439453125,
-0.0308685302734375,
-0.000244140625,
0.045196533203125,
0.0143280029296875,
-0.0219879150390625,
0.0184783935546875,
0.07244873046875,
-0.0482177734375,
-0.027099609375,
0.0234222412109375,
-0.0179290771484375,
-0.0127105712890625,
0.022216796875,
-0.0171051025390625,
0.077392578125,
-0.0236663818359375,
-0.0127105712890625,
0.045562744140625,
0.03125,
-0.04901123046875,
0.00823211669921875,
-0.056121826171875,
0.04986572265625,
0.0218353271484375,
0.03790283203125,
-0.04791259765625,
0.0087127685546875,
-0.0100250244140625,
0.00019693374633789062,
0.048583984375,
0.0116119384765625,
-0.0239715576171875,
-0.0186004638671875,
0.0284881591796875,
0.0318603515625,
-0.0019083023071289062,
0.030242919921875,
-0.0215911865234375,
-0.025421142578125,
-0.0252838134765625,
0.01274871826171875,
0.0292816162109375,
-0.03857421875,
-0.061553955078125,
-0.00519561767578125,
0.0010929107666015625,
-0.0161285400390625,
-0.0146484375,
0.01108551025390625,
-0.0138092041015625,
-0.01409149169921875,
0.0013532638549804688,
-0.021575927734375,
-0.003887176513671875,
0.017059326171875,
0.0043487548828125,
-0.044158935546875,
-0.035675048828125,
-0.01165771484375,
0.03607177734375,
-0.0009188652038574219,
-0.001926422119140625,
0.00803375244140625,
0.005527496337890625,
-0.0027103424072265625,
-0.0229644775390625,
-0.00603485107421875,
0.00420379638671875,
0.00036716461181640625,
0.05029296875,
0.05426025390625,
0.029998779296875,
0.0247650146484375,
0.05865478515625,
0.00882720947265625,
0.049591064453125,
-0.0423583984375,
-0.01067352294921875,
0.01337432861328125,
-0.004192352294921875,
-0.0062713623046875,
-0.00020575523376464844,
-0.0042724609375,
0.0291290283203125,
0.01812744140625,
-0.08380126953125,
0.007415771484375,
0.0504150390625,
-0.006679534912109375,
-0.0120849609375,
-0.0262451171875,
0.01641845703125,
-0.0008487701416015625,
0.0019388198852539062,
-0.004703521728515625,
-0.004970550537109375,
-0.0205535888671875,
-0.031890869140625,
0.016937255859375,
0.0128326416015625,
0.0162811279296875,
-0.0146331787109375,
0.053741455078125,
-0.031951904296875,
0.041778564453125,
-0.0721435546875,
-0.08270263671875,
0.060089111328125,
0.05328369140625,
-0.0087890625,
0.0171661376953125,
0.02178955078125,
0.0257720947265625,
-0.02978515625,
-0.009521484375,
0.02435302734375,
-0.031341552734375,
0.00798797607421875,
-0.01114654541015625,
0.0098419189453125,
0.003627777099609375,
-0.00818634033203125,
-0.0380859375,
0.050262451171875,
0.015716552734375,
-0.0238037109375,
0.033416748046875,
-0.008270263671875,
0.00859832763671875,
0.01161956787109375,
-0.0305633544921875,
-0.0019989013671875,
-0.00601959228515625,
-0.0330810546875,
0.00782012939453125,
-0.00537872314453125,
-0.0037174224853515625,
-0.0089874267578125,
0.0179595947265625,
-0.0159149169921875,
0.0264892578125,
-0.0013856887817382812,
0.03424072265625,
0.0022144317626953125,
-0.0213165283203125,
-0.009307861328125,
0.007427215576171875,
0.045928955078125,
0.01177215576171875,
-0.0265655517578125,
-0.0283203125,
-0.0285491943359375,
0.07733154296875,
0.01457977294921875,
0.124755859375,
-0.0635986328125,
0.044219970703125,
0.027587890625,
0.01395416259765625,
-0.01239776611328125,
0.0035686492919921875,
0.03436279296875,
-0.00206756591796875,
0.0127410888671875,
-0.025726318359375,
-0.040740966796875,
-0.00908660888671875,
0.0193023681640625,
-0.045013427734375,
-0.00949859619140625,
-0.0163421630859375,
0.0261688232421875,
-0.01534271240234375,
-0.0049591064453125,
-0.032379150390625,
-0.0699462890625,
-0.035369873046875,
0.017486572265625,
-0.004329681396484375,
0.0045166015625,
-0.037994384765625,
0.0282745361328125,
0.033935546875,
-0.01568603515625,
0.0211334228515625,
-0.01116180419921875,
0.0256805419921875,
0.0287628173828125,
0.01371002197265625,
-0.015411376953125,
0.00205230712890625,
-0.014739990234375,
0.01904296875,
0.0016889572143554688,
0.0498046875,
-0.01178741455078125,
0.032562255859375,
-0.032562255859375,
-0.06048583984375,
-0.0289764404296875,
-0.03118896484375,
-0.0274658203125,
-0.0413818359375,
0.017486572265625,
0.0132293701171875,
-0.03082275390625,
-0.01007843017578125,
-0.035003662109375,
-0.005950927734375,
0.0292816162109375,
-0.0201416015625,
0.014190673828125,
-0.032135009765625,
-0.00921630859375,
0.035736083984375,
0.02911376953125,
-0.06658935546875,
0.050445556640625,
-0.0018644332885742188,
-0.0024738311767578125,
0.0265045166015625,
0.00861358642578125,
-0.0256195068359375,
0.00482940673828125,
-0.056060791015625,
-0.06353759765625,
-0.0504150390625,
0.0477294921875,
-0.0567626953125,
0.00995635986328125,
0.029541015625,
-0.023590087890625,
0.010284423828125,
0.0268707275390625,
0.00435638427734375,
0.06329345703125,
0.0231781005859375,
-0.029571533203125,
-0.0011167526245117188,
-0.0076904296875,
-0.027801513671875,
-0.004119873046875,
0.0295867919921875,
-0.023468017578125,
-0.0546875,
-0.00827789306640625,
0.001010894775390625,
0.0178985595703125,
-0.033172607421875,
-0.06158447265625,
-0.020721435546875,
0.018035888671875,
-0.036102294921875,
-0.0234527587890625,
-0.0142669677734375,
-0.0253143310546875,
0.06646728515625,
0.0008001327514648438,
0.0007920265197753906,
-0.008453369140625,
0.04833984375,
0.025543212890625,
-0.048736572265625,
0.04522705078125,
-0.019561767578125,
-0.0682373046875,
0.01275634765625,
0.03369140625,
0.0151824951171875,
-0.02508544921875,
0.012786865234375,
0.0026569366455078125,
0.06396484375,
0.0249786376953125,
-0.0274200439453125,
0.0104827880859375,
-0.078857421875,
0.0247344970703125,
0.0304412841796875,
-0.039794921875,
-0.00576019287109375,
0.00537872314453125,
0.049041748046875,
0.01125335693359375,
-0.01788330078125,
-0.031707763671875,
-0.09002685546875,
-0.04144287109375,
-0.00942230224609375,
0.0199127197265625,
-0.0655517578125,
0.040618896484375,
0.034942626953125,
-0.0064544677734375,
-0.0294036865234375,
0.0040740966796875,
-0.033050537109375,
-0.0180511474609375,
-0.00299835205078125,
0.00208282470703125,
-0.019927978515625,
-0.04345703125,
0.07952880859375,
-0.028961181640625,
0.01314544677734375,
0.027557373046875,
0.01349639892578125,
0.0576171875,
0.058349609375,
0.0225830078125,
0.00489044189453125,
-0.027191162109375,
0.0142822265625,
0.01422119140625,
0.043182373046875,
-0.0271759033203125,
-0.054168701171875,
0.020721435546875,
-0.0096435546875,
-0.014404296875,
-0.03271484375,
0.022918701171875,
0.02740478515625,
-0.04571533203125,
0.062744140625,
-0.0062713623046875,
-0.0211029052734375,
-0.0174407958984375,
0.0195770263671875,
-0.038970947265625,
0.0033969879150390625,
-0.0149993896484375,
-0.0212860107421875,
0.0109710693359375,
0.0221099853515625,
-0.00559234619140625,
-0.0200958251953125,
0.00946807861328125,
-0.02923583984375,
-0.00038909912109375,
-0.0037078857421875
] |
dadc25b4fa923a33fe2887b1e6637a0d2161c7bd
|
Wordpress Stackexchange
Q: WordPress Theme activation hook? I know the many tricks to see if said theme is activated, I have scoured the internet. I am not looking for re-pasting of that code. What I am looking for though is weather or not 3.3-3.5 released a new function that does something upon theme_init, I saw some sort of hook, but I can't remember where, in the codex, dealing with doing things after a theme has been initialized..
Any one know?
A: For anyone stumbling upon this question; there is an action you can hook into (added 3.3.0) which is fired only on activation of a new theme: after_switch_theme
add_action('after_switch_theme', 'mytheme_setup_options');
function mytheme_setup_options () {
//doing a thing...
}
http://codex.wordpress.org/Plugin_API/Action_Reference/after_switch_theme
To do something on deactivation of a theme you can use the sister action: switch_theme
|
Q: WordPress Theme activation hook? I know the many tricks to see if said theme is activated, I have scoured the internet. I am not looking for re-pasting of that code. What I am looking for though is weather or not 3.3-3.5 released a new function that does something upon theme_init, I saw some sort of hook, but I can't remember where, in the codex, dealing with doing things after a theme has been initialized..
Any one know?
A: For anyone stumbling upon this question; there is an action you can hook into (added 3.3.0) which is fired only on activation of a new theme: after_switch_theme
add_action('after_switch_theme', 'mytheme_setup_options');
function mytheme_setup_options () {
//doing a thing...
}
http://codex.wordpress.org/Plugin_API/Action_Reference/after_switch_theme
To do something on deactivation of a theme you can use the sister action: switch_theme
A: With the theme preview features it is unlikely that there will ever be a theme activation hook since themes need to work even without being "activated".
A: After trying @sleepingkiwi method i encountered a problem. A client might try a different theme (even if just for a moment), this might create a problem due to the fact that the "on theme activation" hook we created ran twice.
The best method is using after_switch_theme in concert with Wordpress "update_option" to save and later check an activation noticethus making this method bullet proof.
Example:
add_action('after_switch_theme', 'sgx_activation_hook');
function sgx_activation_hook() {
if(get_option('SOMEPREFIX_theme_activated') != '1') {
update_option( 'SOMEPREFIX_theme_activated', '1' );
// RUN THEME_ACTIVATION STUFF HERE
}
}
Hope this helps.
A: The action hook after_switch_theme sometimes may fail because it fires only if the old theme still exists. This is written in the codex.
You can also check it directly in wp-includes/theme.php in the function check_theme_switched() where the action hook is added. You will see that the action hook "after_switch_theme" is inside the condition if ( $old_theme->exists() ) {....}
If you want to be sure the hook fires every time a theme is activated, and no matter if the old theme still exists, you can create your custom hook by hooking the change of the option "stylesheet".
Every time a theme is activated that option stores the name of the new active theme. So:
add_action( 'update_option_stylesheet','my_theme_activation_hook',20,3 );
add_action( 'update_site_option_stylesheet','my_theme_activation_hook',20,3 ); //For multisite installations
function my_theme_activation_hook( $old_value, $value, $option ){
//It adds an action hook after theme activation, no matter if the old theme still exists
do_action( 'my_after_theme_activation');
}
Then you can use your action hook "my_after_theme_activation" or whatever you want to call it.
This method is not perfect because a plugin could also update the option "stylesheet" without a real theme activation. I don't see why they should do it, but it's allowed, and you never know. So, I would take that into account.
Use it if for you it's not a problem that it fires also if a new theme is not really activated, but one of the plugins just changed the option "stylesheet".
You could also directly hook the change of the option "theme_switched" instead of "stylesheet". Not tested this, but looking at the code it looks like it fires two times when you activate a new theme. The first time to save the old theme stylesheet, and a second time to save the value "false".
A: You might be looking for the after_setup_theme hook:
http://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme
|
wordpress
|
{
"language": "en",
"length": 546,
"provenance": "stackexchange_00019.jsonl.gz:429139",
"question_score": "13",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87177"
}
|
[
0.0289459228515625,
0.0122833251953125,
-0.005733489990234375,
-0.0164031982421875,
0.031829833984375,
-0.0125274658203125,
0.049560546875,
-0.0272216796875,
-0.0169219970703125,
0.031951904296875,
-0.0236663818359375,
0.035491943359375,
0.0130615234375,
-0.00670623779296875,
0.010406494140625,
-0.005584716796875,
0.03082275390625,
-0.03179931640625,
0.01256561279296875,
-0.00852203369140625,
-0.01386260986328125,
0.032257080078125,
0.0223846435546875,
0.0115966796875,
0.0309600830078125,
-0.01100921630859375,
0.07940673828125,
-0.040008544921875,
0.039215087890625,
-0.017486572265625,
0.0285797119140625,
-0.040771484375,
0.0212554931640625,
0.018157958984375,
-0.01702880859375,
0.0256805419921875,
-0.01096343994140625,
0.021942138671875,
0.0241851806640625,
0.0022106170654296875,
0.018829345703125,
-0.0142669677734375,
-0.00888824462890625,
-0.0045623779296875,
-0.00115203857421875,
-0.0426025390625,
0.03271484375,
-0.035369873046875,
0.0274658203125,
-0.033782958984375,
-0.00498199462890625,
0.004932403564453125,
0.0196380615234375,
-0.00502777099609375,
-0.0226287841796875,
-0.01007843017578125,
-0.047943115234375,
0.017242431640625,
0.0191497802734375,
0.06915283203125,
0.00860595703125,
0.00591278076171875,
-0.0169677734375,
-0.074951171875,
0.0180511474609375,
0.004299163818359375,
-0.032806396484375,
0.0126800537109375,
-0.032562255859375,
0.0204925537109375,
0.0277099609375,
-0.037322998046875,
-0.0270843505859375,
0.004512786865234375,
-0.0005965232849121094,
-0.01049041748046875,
0.02630615234375,
0.002437591552734375,
0.0030269622802734375,
0.04852294921875,
0.01641845703125,
-0.02484130859375,
0.008514404296875,
-0.03350830078125,
0.0279998779296875,
-0.0137176513671875,
0.002689361572265625,
0.002716064453125,
-0.059356689453125,
-0.0079498291015625,
-0.037445068359375,
-0.01099395751953125,
-0.00753021240234375,
-0.048980712890625,
-0.01039886474609375,
-0.0200958251953125,
0.0300140380859375,
0.043426513671875,
-0.001422882080078125,
-0.006687164306640625,
0.0014963150024414062,
-0.040802001953125,
0.01385498046875,
-0.0318603515625,
-0.004848480224609375,
0.0499267578125,
0.026092529296875,
-0.038299560546875,
-0.01605224609375,
-0.007656097412109375,
-0.0277862548828125,
-0.0081024169921875,
-0.0198974609375,
-0.0025119781494140625,
-0.03558349609375,
-0.0023250579833984375,
-0.048004150390625,
-0.0107421875,
-0.01015472412109375,
0.0027828216552734375,
0.005828857421875,
0.00946044921875,
-0.017669677734375,
0.0088958740234375,
0.02716064453125,
0.0029277801513671875,
-0.0218658447265625,
-0.005107879638671875,
-0.00405120849609375,
0.0113983154296875,
-0.013427734375,
0.034759521484375,
0.0272064208984375,
-0.0156097412109375,
-0.03289794921875,
-0.0025177001953125,
-0.0021915435791015625,
0.06402587890625,
0.01617431640625,
-0.011871337890625,
0.037353515625,
-0.059661865234375,
-0.04864501953125,
0.033721923828125,
0.01715087890625,
0.026214599609375,
-0.0009331703186035156,
-0.0016269683837890625,
0.0030956268310546875,
-0.040435791015625,
0.0361328125,
-0.07440185546875,
0.024505615234375,
0.03582763671875,
0.004669189453125,
-0.0007576942443847656,
0.071044921875,
-0.035491943359375,
-0.0208740234375,
-0.054931640625,
0.0217132568359375,
-0.03082275390625,
-0.03643798828125,
-0.0048828125,
-0.040557861328125,
0.032257080078125,
0.01015472412109375,
0.006351470947265625,
0.0126800537109375,
0.033935546875,
0.0082244873046875,
-0.004558563232421875,
-0.004077911376953125,
0.0049285888671875,
0.0016241073608398438,
0.002056121826171875,
0.0012655258178710938,
0.04364013671875,
0.036590576171875,
-0.035919189453125,
-0.016937255859375,
-0.024932861328125,
0.10821533203125,
-0.03131103515625,
-0.04913330078125,
0.0130157470703125,
0.03216552734375,
0.04083251953125,
-0.0003771781921386719,
0.012847900390625,
0.069091796875,
0.004192352294921875,
-0.0175018310546875,
0.02752685546875,
-0.0164794921875,
-0.0386962890625,
0.00315093994140625,
0.01334381103515625,
-0.01395416259765625,
-0.01294708251953125,
0.0638427734375,
0.01348876953125,
-0.004634857177734375,
-0.02508544921875,
-0.05419921875,
0.0149078369140625,
-0.01161956787109375,
0.0222625732421875,
0.0216217041015625,
0.0179290771484375,
-0.0010499954223632812,
-0.02685546875,
0.0059051513671875,
-0.007755279541015625,
-0.0199737548828125,
0.0159759521484375,
-0.0192108154296875,
0.0175933837890625,
0.0168609619140625,
0.0173492431640625,
0.033935546875,
-0.0200653076171875,
0.0302276611328125,
-0.0002484321594238281,
0.0015010833740234375,
-0.035430908203125,
-0.0155181884765625,
-0.0256195068359375,
-0.023162841796875,
0.0013217926025390625,
-0.02435302734375,
0.0379638671875,
-0.003398895263671875,
-0.0018329620361328125,
-0.0187225341796875,
0.020538330078125,
0.02166748046875,
-0.05877685546875,
0.0044403076171875,
0.039794921875,
0.0242767333984375,
0.041778564453125,
-0.00907135009765625,
-0.021209716796875,
0.08636474609375,
-0.0006966590881347656,
0.018096923828125,
-0.00527191162109375,
0.01910400390625,
0.05914306640625,
-0.00897216796875,
0.0223236083984375,
0.004489898681640625,
0.04376220703125,
0.0005812644958496094,
0.0293731689453125,
-0.01348114013671875,
-0.063232421875,
0.03546142578125,
-0.005390167236328125,
0.0251617431640625,
-0.0208282470703125,
-0.050140380859375,
0.0027523040771484375,
0.0289764404296875,
-0.0180816650390625,
0.0027008056640625,
-0.0166168212890625,
-0.0223236083984375,
0.003772735595703125,
0.036285400390625,
-0.0517578125,
-0.01172637939453125,
0.06109619140625,
0.0333251953125,
-0.0157318115234375,
-0.009613037109375,
-0.023162841796875,
-0.00969696044921875,
0.01849365234375,
-0.057647705078125,
-0.0308685302734375,
-0.06414794921875,
-0.031585693359375,
0.0032596588134765625,
-0.054168701171875,
-0.0213623046875,
-0.04010009765625,
-0.0251007080078125,
0.005584716796875,
0.011566162109375,
0.0457763671875,
-0.045074462890625,
0.043121337890625,
-0.0211181640625,
0.00705718994140625,
-0.0221405029296875,
-0.033782958984375,
0.0308685302734375,
-0.037078857421875,
0.00937652587890625,
0.0482177734375,
-0.01084136962890625,
0.0024700164794921875,
0.023162841796875,
-0.0248565673828125,
0.03460693359375,
-0.00666046142578125,
0.0004029273986816406,
0.034881591796875,
-0.08148193359375,
0.024200439453125,
0.0233154296875,
0.04827880859375,
-0.00203704833984375,
-0.0426025390625,
-0.0108795166015625,
0.0159912109375,
-0.021331787109375,
0.0015735626220703125,
-0.038055419921875,
-0.043914794921875,
0.04119873046875,
-0.03704833984375,
0.003650665283203125,
-0.014251708984375,
-0.0259246826171875,
0.01513671875,
-0.02960205078125,
-0.018218994140625,
-0.0269775390625,
-0.061065673828125,
-0.04962158203125,
-0.01244354248046875,
-0.007656097412109375,
0.023834228515625,
0.006500244140625,
0.03778076171875,
0.00281524658203125,
-0.046905517578125,
0.01053619384765625,
-0.002925872802734375,
-0.002956390380859375,
0.016937255859375,
-0.0177459716796875,
0.018402099609375,
-0.01505279541015625,
0.0218048095703125,
-0.060699462890625,
-0.007762908935546875,
0.004486083984375,
-0.05133056640625,
-0.007358551025390625,
-0.007335662841796875,
-0.0233306884765625,
0.06414794921875,
0.0201873779296875,
-0.06341552734375,
-0.0198974609375,
-0.0858154296875,
0.0014123916625976562,
-0.0178375244140625,
-0.049407958984375,
-0.035736083984375,
0.0267333984375,
0.00870513916015625,
-0.004970550537109375,
-0.03857421875,
-0.02374267578125,
-0.020111083984375,
0.0288543701171875,
-0.0260162353515625,
0.041473388671875,
-0.031982421875,
-0.0394287109375,
-0.0226898193359375,
-0.0238494873046875,
-0.032745361328125,
-0.00867462158203125,
-0.036376953125,
-0.0014886856079101562,
-0.048553466796875,
0.041015625,
-0.04351806640625,
-0.01282501220703125,
0.013092041015625,
-0.0343017578125,
-0.01016998291015625,
0.000820159912109375,
0.003978729248046875,
0.014251708984375,
0.046356201171875,
-0.07440185546875,
-0.002384185791015625,
0.01290130615234375,
0.013275146484375,
-0.0145111083984375,
-0.0012054443359375,
-0.070556640625,
-0.0208892822265625,
-0.1566162109375,
0.022003173828125,
0.0224151611328125,
-0.050811767578125,
-0.0225372314453125,
0.02508544921875,
-0.0982666015625,
-0.03851318359375,
0.01334381103515625,
-0.007457733154296875,
-0.0217132568359375,
0.01427459716796875,
-0.05126953125,
-0.0076446533203125,
-0.00196075439453125,
-0.015289306640625,
-0.047332763671875,
-0.00998687744140625,
-0.0283966064453125,
0.0156707763671875,
0.0380859375,
-0.030364990234375,
0.00905609130859375,
0.0309906005859375,
0.0278472900390625,
0.033538818359375,
0.0010852813720703125,
0.006534576416015625,
0.007511138916015625,
-0.0185546875,
0.006130218505859375,
-0.025970458984375,
0.00815582275390625,
-0.0011920928955078125,
-0.05029296875,
0.0201873779296875,
-0.0143280029296875,
0.029205322265625,
0.0217437744140625,
-0.03643798828125,
0.01248931884765625,
0.0186767578125,
0.006420135498046875,
0.020843505859375,
0.0124969482421875,
-0.00795745849609375,
0.004779815673828125,
0.00970458984375,
0.01113128662109375,
-0.054901123046875,
0.01187896728515625,
0.0037822723388671875,
0.06353759765625,
0.0221099853515625,
0.00897979736328125,
0.04364013671875,
-0.0208282470703125,
0.0233917236328125,
0.06475830078125,
0.005748748779296875,
-0.033905029296875,
-0.0280914306640625,
0.05743408203125,
0.0236358642578125,
-0.030670166015625,
-0.0278167724609375,
0.07293701171875,
0.01154327392578125,
0.00588226318359375,
-0.0189361572265625,
-0.0362548828125,
0.0804443359375,
-0.007724761962890625,
-0.0236358642578125,
0.00759124755859375,
0.0341796875,
0.02789306640625,
-0.028717041015625,
0.0182647705078125,
-0.022918701171875,
0.004150390625,
-0.0024318695068359375,
-0.005542755126953125,
0.0308074951171875,
0.007114410400390625,
0.00208282470703125,
-0.004978179931640625,
0.0287322998046875,
-0.0026531219482421875,
-0.0029392242431640625,
0.050445556640625,
-0.03472900390625,
0.05133056640625,
-0.035400390625,
-0.0246734619140625,
-0.0277862548828125,
-0.003055572509765625,
0.016387939453125,
-0.0200042724609375,
-0.04400634765625,
-0.01505279541015625,
-0.006519317626953125,
0.05450439453125,
0.037200927734375,
-0.0246124267578125,
0.06787109375,
0.069091796875,
-0.02685546875,
-0.0333251953125,
-0.0245513916015625,
0.0199432373046875,
-0.07354736328125,
-0.053863525390625,
-0.0121917724609375,
-0.013885498046875,
0.07794189453125,
-0.0110931396484375,
0.0160980224609375,
0.0218963623046875,
-0.0293121337890625,
-0.0019321441650390625,
0.02008056640625,
0.0005249977111816406,
0.024993896484375,
0.007083892822265625,
-0.0010499954223632812,
-0.023468017578125,
0.03143310546875,
-0.03814697265625,
-0.0203704833984375,
0.0309906005859375,
0.0245208740234375,
0.006999969482421875,
0.004131317138671875,
0.016815185546875,
0.0345458984375,
-0.0214691162109375,
0.05438232421875,
0.00785064697265625,
-0.05169677734375,
-0.028350830078125,
0.0196075439453125,
0.036956787109375,
-0.0240325927734375,
-0.0241851806640625,
0.04266357421875,
-0.029449462890625,
0.02484130859375,
0.0201873779296875,
-0.024566650390625,
0.0196075439453125,
0.0206756591796875,
-0.06781005859375,
-0.01140594482421875,
0.03082275390625,
-0.060791015625,
-0.0423583984375,
0.00145721435546875,
-0.01512908935546875,
0.0313720703125,
-0.01617431640625,
0.0026607513427734375,
-0.0269775390625,
0.01403045654296875,
-0.054962158203125,
0.002597808837890625,
0.0419921875,
0.003997802734375,
-0.0843505859375,
0.028717041015625,
-0.041900634765625,
0.00469207763671875,
-0.032501220703125,
-0.074462890625,
-0.0653076171875,
-0.018035888671875,
-0.01201629638671875,
-0.006343841552734375,
-0.013336181640625,
-0.0171051025390625,
-0.0202789306640625,
0.045379638671875,
0.041717529296875,
0.0258331298828125,
0.0169525146484375,
0.01678466796875,
-0.00039505958557128906,
0.00901031494140625,
0.03857421875,
0.0038623809814453125,
-0.0204010009765625,
-0.0202484130859375,
-0.022491455078125,
0.004665374755859375,
0.00933837890625,
0.01885986328125,
0.0277557373046875,
-0.0018596649169921875,
0.0423583984375,
-0.0039520263671875,
0.0004730224609375,
0.0123291015625,
0.005970001220703125,
-0.01123809814453125,
0.0019140243530273438,
0.033905029296875,
-0.001705169677734375,
0.03302001953125,
-0.06500244140625,
-0.03765869140625,
-0.01421356201171875,
0.03759765625,
0.016448974609375,
-0.060699462890625,
-0.0290069580078125,
0.0660400390625,
-0.08770751953125,
0.0755615234375,
0.06317138671875,
-0.0022296905517578125,
0.038482666015625,
-0.0266571044921875,
-0.003849029541015625,
0.00827789306640625,
0.0113067626953125,
-0.0307769775390625,
0.0006546974182128906,
0.0206146240234375,
0.0101318359375,
0.0090484619140625,
0.01036834716796875,
-0.01114654541015625,
0.0026073455810546875,
0.038909912109375,
0.041229248046875,
-0.06939697265625,
0.0011138916015625,
0.01104736328125,
-0.0217742919921875,
-0.01934814453125,
-0.0236358642578125,
0.00074005126953125,
-0.039764404296875,
0.048614501953125,
-0.00705718994140625,
-0.0014295578002929688,
0.01462554931640625,
-0.02386474609375,
-0.015106201171875,
0.0017480850219726562,
0.0416259765625,
0.02081298828125,
-0.033172607421875,
0.0173187255859375,
0.020416259765625,
0.01073455810546875,
-0.037445068359375,
-0.001987457275390625,
-0.0022983551025390625,
-0.01534271240234375,
-0.06512451171875,
-0.016876220703125,
-0.027587890625,
0.002490997314453125,
-0.031951904296875,
-0.01076507568359375,
0.059844970703125,
0.0408935546875,
0.0128631591796875,
-0.052398681640625,
0.0250701904296875,
0.01213836669921875,
-0.0780029296875,
-0.0240936279296875,
0.04998779296875,
0.015472412109375,
-0.0208587646484375,
0.052490234375,
-0.0182037353515625,
-0.06512451171875,
0.004840850830078125,
0.0161895751953125,
0.04205322265625,
-0.0263824462890625,
-0.020538330078125,
0.04376220703125,
-0.032684326171875,
-0.0125732421875,
-0.01424407958984375,
0.0643310546875,
-0.0283050537109375,
-0.0081787109375,
0.01092529296875,
-0.00922393798828125,
-0.0584716796875,
-0.032440185546875,
-0.02593994140625,
0.10430908203125,
-0.04803466796875,
-0.01678466796875,
0.006412506103515625,
0.0596923828125,
-0.0157470703125,
0.031646728515625,
-0.039794921875,
0.0728759765625,
-0.01153564453125,
0.0687255859375,
-0.041961669921875,
0.006282806396484375,
0.0199127197265625,
0.0019474029541015625,
0.0294647216796875,
-0.0068206787109375,
0.041107177734375,
0.01042938232421875,
0.044189453125,
0.00850677490234375,
-0.028778076171875,
0.00572967529296875,
-0.021392822265625,
-0.0088958740234375,
0.0012636184692382812,
-0.0382080078125,
0.0232696533203125,
-0.05859375,
-0.0113677978515625,
-0.01316070556640625,
-0.0167999267578125,
-0.0304718017578125,
0.0118865966796875,
0.043975830078125,
-0.05523681640625,
0.0016307830810546875,
0.02581787109375,
-0.0184173583984375,
-0.005466461181640625,
0.00507354736328125,
-0.035308837890625,
0.032806396484375,
0.03515625,
-0.0172882080078125,
0.028594970703125,
-0.0163116455078125,
-0.0018405914306640625,
-0.01290130615234375,
0.0186309814453125,
-0.042144775390625,
-0.026702880859375,
-0.006748199462890625,
0.0513916015625,
-0.0780029296875,
0.04437255859375,
0.020751953125,
0.0277862548828125,
-0.0113372802734375,
-0.0074005126953125,
-0.015625,
0.04302978515625,
-0.032501220703125,
-0.052947998046875,
0.008331298828125,
0.008148193359375,
0.0182037353515625,
0.040618896484375,
0.055938720703125,
0.01546478271484375,
0.035675048828125,
-0.0035915374755859375,
-0.0164794921875,
0.0213775634765625,
0.044342041015625,
0.0160675048828125,
0.031982421875,
-0.05218505859375,
-0.040252685546875,
-0.02374267578125,
0.00804901123046875,
0.0167694091796875,
0.0291595458984375,
-0.021820068359375,
0.047698974609375,
-0.0132293701171875,
0.0000673532485961914,
-0.01605224609375,
0.034271240234375,
0.0049896240234375,
0.0185089111328125,
-0.0252227783203125,
-0.022430419921875,
-0.0007462501525878906,
0.038970947265625,
0.005641937255859375,
0.01214599609375,
0.06134033203125,
0.07373046875,
-0.01065826416015625,
-0.00510406494140625,
0.0321044921875,
-0.00849151611328125,
0.00533294677734375,
-0.0419921875,
0.02471923828125,
0.00894927978515625,
0.0114288330078125,
-0.00667572021484375,
0.0146026611328125,
0.035308837890625,
-0.02337646484375,
0.05035400390625,
0.0054473876953125,
0.0038204193115234375,
0.0115966796875,
0.0210418701171875,
0.0312347412109375,
0.0259552001953125,
-0.06744384765625,
-0.01448822021484375,
-0.017303466796875,
-0.047943115234375,
0.022369384765625,
0.048675537109375,
0.00913238525390625,
-0.020233154296875,
0.004962921142578125,
0.0007486343383789062,
-0.00856781005859375,
0.01538848876953125,
-0.019134521484375,
-0.00514984130859375,
0.04364013671875,
0.00701904296875,
-0.0220947265625,
-0.017608642578125,
0.004673004150390625,
0.0357666015625,
0.013763427734375,
0.01209259033203125,
0.0048675537109375,
0.02105712890625,
0.0007605552673339844,
0.0267486572265625,
-0.0034942626953125,
0.00562286376953125,
-0.008514404296875,
0.0250701904296875,
0.0252532958984375,
-0.0194549560546875,
-0.043304443359375,
0.043853759765625,
0.021392822265625,
0.0172882080078125,
0.0190582275390625,
-0.0066375732421875,
0.0227203369140625,
0.0168609619140625,
-0.033050537109375,
-0.041717529296875,
-0.07427978515625,
-0.03875732421875,
0.03369140625,
-0.0155029296875,
0.01464080810546875,
-0.016937255859375,
-0.01061248779296875,
-0.0276947021484375,
0.000052809715270996094,
-0.0172882080078125,
0.075439453125,
-0.10211181640625,
0.0017824172973632812,
-0.0008006095886230469,
-0.04327392578125,
0.0406494140625,
0.0016183853149414062,
0.02081298828125,
0.00977325439453125,
0.05938720703125,
0.01800537109375,
-0.0284423828125,
0.0104522705078125,
0.032562255859375,
0.036285400390625,
-0.04010009765625,
0.008087158203125,
0.0631103515625,
-0.0010433197021484375,
0.01338958740234375,
-0.017791748046875,
-0.03277587890625,
-0.0235748291015625,
-0.004474639892578125,
0.0156402587890625,
-0.012359619140625,
-0.01465606689453125,
-0.032073974609375,
0.0122833251953125,
0.034912109375,
-0.0062255859375,
-0.03619384765625,
0.020355224609375,
-0.039642333984375,
0.0268402099609375,
-0.008514404296875,
-0.01776123046875,
0.02020263671875,
0.0022792816162109375,
-0.042236328125,
0.0005288124084472656,
-0.0281829833984375,
-0.003337860107421875,
-0.01201629638671875,
-0.0027561187744140625,
0.04327392578125,
-0.01727294921875,
-0.0274200439453125,
-0.021331787109375,
-0.0086212158203125,
0.021575927734375,
-0.023101806640625,
-0.0081787109375,
0.04339599609375,
-0.019287109375,
-0.02069091796875,
-0.0382080078125,
0.005817413330078125,
-0.044677734375,
-0.021240234375,
-0.0186614990234375,
0.00038623809814453125,
0.0215301513671875,
-0.038604736328125,
-0.059814453125,
0.01812744140625,
-0.002712249755859375,
-0.0299835205078125,
-0.0672607421875,
0.01910400390625,
-0.0088348388671875,
-0.00701904296875,
-0.02081298828125,
0.0304718017578125,
0.01264190673828125,
0.04632568359375,
-0.0069427490234375,
0.046478271484375,
-0.00495147705078125,
0.0105133056640625,
-0.037750244140625,
0.01329803466796875,
-0.008209228515625,
-0.0022792816162109375,
0.0212554931640625,
-0.01148223876953125,
0.0034503936767578125,
0.0242767333984375,
-0.045806884765625,
-0.03302001953125,
-0.03924560546875,
-0.0035076141357421875,
-0.01544189453125,
-0.036163330078125,
0.01763916015625,
0.00957489013671875,
0.056610107421875,
0.0264129638671875,
-0.0009641647338867188,
-0.032958984375,
-0.05938720703125,
-0.03619384765625,
0.006092071533203125,
-0.0116119384765625,
0.0288848876953125,
-0.0821533203125,
-0.002330780029296875,
0.01337432861328125,
-0.011871337890625,
-0.0221405029296875,
-0.0297088623046875,
-0.04840087890625,
-0.004291534423828125,
-0.01849365234375,
0.032501220703125,
-0.05499267578125,
-0.04522705078125,
0.0257720947265625,
-0.0084991455078125,
0.004791259765625,
0.00212860107421875,
0.038848876953125,
0.0027637481689453125,
0.034027099609375,
0.0615234375,
0.039215087890625,
-0.04656982421875,
0.005199432373046875,
0.0198974609375,
0.0257110595703125,
-0.03314208984375,
-0.043212890625,
0.006145477294921875,
0.01654052734375,
-0.00823974609375,
0.01413726806640625,
-0.00785064697265625,
0.01491546630859375,
-0.0226287841796875,
0.050048828125,
0.01702880859375,
0.06646728515625,
-0.0007405281066894531,
0.051239013671875,
-0.01467132568359375,
-0.022705078125,
-0.004871368408203125,
-0.03436279296875,
0.003143310546875,
0.00031447410583496094,
0.05438232421875,
-0.05023193359375,
0.03924560546875,
-0.0139923095703125,
0.0238494873046875,
0.0225830078125
] |
18a05a61afc4290b965cdc8b6b32a9a42c628f05
|
Wordpress Stackexchange
Q: Custom Taxonomy Only Showing Top Level Terms in Admin? I have a hierarchical custom taxonomy that I add terms to programatically using the following code in a loop:
-- SNIP --
$args = array(
'description'=> '',
'slug' => str_replace(' ','-',preg_replace('/[^\00-\255]+/u', '', $term)),
'parent' => $parent
);
$term_id = wp_insert_term(
$term,
'widgets',
$args
);
-- SNIP --
Which works ok in terms of adding the widget terms in the desired hierarchical structure, however, on the taxonomy management page in admin, there is some really strange behavior. Only the top-level terms are shown in the list (2) even though it says 28 items found and there are pagination links for page 2 which displays nothing.
If I delete the top level terms, the second level is shown in the listing, etc.
Any ideas as to why this is happening and how to resolve would be appreciated.
A: I encountered a very similar situation, and I believe it may very well be the same situation you are experiencing. Please read the WPSE question Programmatically insert hierarchical terms & set terms for post causes glitch? and follow up with the answer provided by @Manny Fleurmond.
|
Q: Custom Taxonomy Only Showing Top Level Terms in Admin? I have a hierarchical custom taxonomy that I add terms to programatically using the following code in a loop:
-- SNIP --
$args = array(
'description'=> '',
'slug' => str_replace(' ','-',preg_replace('/[^\00-\255]+/u', '', $term)),
'parent' => $parent
);
$term_id = wp_insert_term(
$term,
'widgets',
$args
);
-- SNIP --
Which works ok in terms of adding the widget terms in the desired hierarchical structure, however, on the taxonomy management page in admin, there is some really strange behavior. Only the top-level terms are shown in the list (2) even though it says 28 items found and there are pagination links for page 2 which displays nothing.
If I delete the top level terms, the second level is shown in the listing, etc.
Any ideas as to why this is happening and how to resolve would be appreciated.
A: I encountered a very similar situation, and I believe it may very well be the same situation you are experiencing. Please read the WPSE question Programmatically insert hierarchical terms & set terms for post causes glitch? and follow up with the answer provided by @Manny Fleurmond.
|
wordpress
|
{
"language": "en",
"length": 192,
"provenance": "stackexchange_00019.jsonl.gz:429141",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87189"
}
|
[
0.07293701171875,
0.01068115234375,
-0.0022125244140625,
-0.0537109375,
0.032806396484375,
-0.0231781005859375,
0.0318603515625,
-0.0170135498046875,
-0.017547607421875,
0.024444580078125,
0.00823974609375,
-0.04864501953125,
-0.0160064697265625,
-0.04046630859375,
-0.0251312255859375,
-0.05352783203125,
0.0117340087890625,
0.002109527587890625,
0.00989532470703125,
-0.019256591796875,
-0.02191162109375,
-0.006526947021484375,
0.0209197998046875,
-0.0170135498046875,
0.00799560546875,
0.01149749755859375,
0.016937255859375,
-0.032958984375,
0.0015010833740234375,
-0.0253143310546875,
0.006317138671875,
0.0272064208984375,
0.023773193359375,
-0.031829833984375,
0.05419921875,
-0.024505615234375,
0.02532958984375,
-0.022186279296875,
-0.007305145263671875,
0.00742340087890625,
0.0031490325927734375,
0.0160064697265625,
0.04827880859375,
0.0272216796875,
-0.003673553466796875,
-0.027587890625,
-0.00992584228515625,
-0.03436279296875,
-0.0245819091796875,
-0.05267333984375,
0.042144775390625,
0.0009279251098632812,
0.07513427734375,
-0.09295654296875,
0.0007987022399902344,
0.0251312255859375,
0.00922393798828125,
-0.0157623291015625,
0.0224456787109375,
-0.0217132568359375,
-0.0196990966796875,
-0.00653839111328125,
0.042694091796875,
-0.000850677490234375,
-0.0030269622802734375,
0.0229644775390625,
-0.011871337890625,
-0.0003001689910888672,
-0.0262603759765625,
-0.0265045166015625,
0.0024700164794921875,
-0.04180908203125,
0.00103759765625,
0.006267547607421875,
-0.02593994140625,
-0.061431884765625,
0.0247955322265625,
-0.04010009765625,
0.01202392578125,
0.01629638671875,
0.041961669921875,
0.0013599395751953125,
-0.01280975341796875,
0.027496337890625,
0.01358795166015625,
0.05194091796875,
-0.004215240478515625,
-0.047027587890625,
0.0118255615234375,
0.0178985595703125,
0.00725555419921875,
-0.0121917724609375,
-0.0031337738037109375,
0.046600341796875,
0.024139404296875,
-0.04046630859375,
-0.00878143310546875,
0.056671142578125,
-0.039093017578125,
0.031494140625,
-0.040985107421875,
-0.01396942138671875,
0.020538330078125,
-0.06439208984375,
0.0220794677734375,
0.0174713134765625,
-0.0177459716796875,
-0.033050537109375,
0.05230712890625,
0.02252197265625,
0.00995635986328125,
0.0706787109375,
0.0178070068359375,
-0.0308074951171875,
0.00868988037109375,
-0.0194091796875,
-0.032440185546875,
0.037445068359375,
0.0184173583984375,
-0.01241302490234375,
-0.0087890625,
0.0157470703125,
-0.0386962890625,
0.006992340087890625,
0.006145477294921875,
0.007183074951171875,
0.004024505615234375,
-0.0012359619140625,
-0.032257080078125,
-0.011566162109375,
-0.051971435546875,
0.036102294921875,
0.09295654296875,
0.049591064453125,
0.02264404296875,
-0.0021381378173828125,
0.0193328857421875,
-0.034210205078125,
-0.0027256011962890625,
0.0089263916015625,
0.023162841796875,
-0.0111083984375,
-0.0027217864990234375,
0.01396942138671875,
0.007541656494140625,
0.032958984375,
0.012420654296875,
-0.00019562244415283203,
0.032470703125,
-0.048858642578125,
0.007656097412109375,
-0.05487060546875,
0.061676025390625,
0.004150390625,
-0.07110595703125,
-0.0240478515625,
0.0263671875,
-0.046905517578125,
-0.0399169921875,
-0.079833984375,
-0.0175628662109375,
-0.0176849365234375,
-0.005435943603515625,
-0.047607421875,
-0.044769287109375,
0.0279388427734375,
-0.02264404296875,
-0.00015115737915039062,
0.02496337890625,
-0.05194091796875,
0.06622314453125,
-0.006244659423828125,
0.0172882080078125,
0.00897979736328125,
0.0234375,
0.00713348388671875,
-0.0198211669921875,
0.01416778564453125,
0.02838134765625,
0.00826263427734375,
-0.00020229816436767578,
-0.0267791748046875,
0.046783447265625,
-0.002094268798828125,
-0.031646728515625,
0.00279998779296875,
-0.0013208389282226562,
0.04656982421875,
0.0244140625,
0.0275421142578125,
0.0037174224853515625,
-0.0100555419921875,
-0.05621337890625,
0.0200042724609375,
0.031585693359375,
0.0087432861328125,
-0.0670166015625,
-0.0213623046875,
-0.0004515647888183594,
-0.01180267333984375,
-0.05206298828125,
0.0168304443359375,
-0.005657196044921875,
0.02362060546875,
-0.0019931793212890625,
0.0196533203125,
-0.00870513916015625,
0.04302978515625,
0.02508544921875,
-0.006366729736328125,
0.008819580078125,
-0.0172119140625,
-0.01065826416015625,
-0.0305938720703125,
-0.0648193359375,
-0.0001595020294189453,
-0.007617950439453125,
0.05535888671875,
0.01317596435546875,
0.0044097900390625,
0.0042877197265625,
-0.03338623046875,
0.019775390625,
0.01415252685546875,
0.04425048828125,
0.031524658203125,
-0.0230712890625,
0.0012521743774414062,
0.06304931640625,
0.0258026123046875,
-0.018218994140625,
0.0023441314697265625,
0.052001953125,
0.007213592529296875,
-0.0301055908203125,
-0.0008754730224609375,
-0.0081329345703125,
-0.07867431640625,
-0.0058441162109375,
0.057220458984375,
0.0164031982421875,
0.033660888671875,
-0.035003662109375,
-0.0008554458618164062,
0.0576171875,
-0.072998046875,
-0.044586181640625,
0.0205078125,
-0.01715087890625,
0.01094818115234375,
0.00331878662109375,
0.0228729248046875,
0.00116729736328125,
-0.0250396728515625,
0.035552978515625,
0.01788330078125,
-0.0281219482421875,
-0.0156707763671875,
0.0015811920166015625,
-0.014556884765625,
0.02667236328125,
-0.06939697265625,
-0.0426025390625,
-0.017425537109375,
0.0029239654541015625,
0.043853759765625,
0.02630615234375,
0.0208587646484375,
-0.05157470703125,
0.02667236328125,
0.0280303955078125,
0.016632080078125,
0.0018177032470703125,
-0.027374267578125,
0.050567626953125,
-0.05712890625,
-0.035797119140625,
0.017364501953125,
0.0262908935546875,
-0.0292510986328125,
0.022125244140625,
0.07891845703125,
-0.0094757080078125,
-0.01331329345703125,
-0.046600341796875,
-0.057159423828125,
-0.0162353515625,
0.048095703125,
-0.0183868408203125,
-0.0289154052734375,
0.005809783935546875,
0.0433349609375,
-0.0142669677734375,
0.017608642578125,
-0.019256591796875,
0.004680633544921875,
-0.027130126953125,
-0.0037078857421875,
0.023834228515625,
-0.01261138916015625,
0.01861572265625,
0.05224609375,
0.01508331298828125,
-0.00676727294921875,
-0.0009794235229492188,
0.00555419921875,
-0.01197052001953125,
0.0187225341796875,
-0.01239013671875,
-0.01123046875,
-0.047821044921875,
-0.0007843971252441406,
0.0270843505859375,
0.0701904296875,
-0.01000213623046875,
-0.04217529296875,
-0.0169525146484375,
0.027740478515625,
-0.03802490234375,
-0.03680419921875,
0.01560211181640625,
-0.035736083984375,
-0.0226898193359375,
0.0186920166015625,
-0.0262451171875,
0.004436492919921875,
0.026336669921875,
0.00010031461715698242,
0.0188446044921875,
-0.059906005859375,
-0.0207672119140625,
-0.051025390625,
-0.05133056640625,
0.0039825439453125,
0.029876708984375,
-0.005649566650390625,
-0.004184722900390625,
0.08642578125,
0.0172271728515625,
-0.038299560546875,
0.009124755859375,
0.03662109375,
0.0011739730834960938,
0.032745361328125,
0.0063934326171875,
-0.041015625,
0.0289306640625,
-0.0084686279296875,
-0.0260009765625,
0.02056884765625,
0.0062408447265625,
-0.01355743408203125,
-0.01387786865234375,
-0.0161590576171875,
0.00640869140625,
-0.0304107666015625,
0.0156707763671875,
0.0296173095703125,
-0.0006651878356933594,
-0.011810302734375,
-0.005603790283203125,
0.0009355545043945312,
-0.0166778564453125,
0.0025119781494140625,
-0.03924560546875,
0.01024627685546875,
-0.01557159423828125,
0.03863525390625,
-0.0256195068359375,
0.00616455078125,
-0.0030765533447265625,
-0.0231170654296875,
0.008331298828125,
-0.01568603515625,
-0.041168212890625,
0.00984954833984375,
0.0275421142578125,
-0.01271820068359375,
-0.00803375244140625,
0.01235198974609375,
0.0198516845703125,
0.00579071044921875,
0.00457000732421875,
-0.034088134765625,
-0.044677734375,
0.005260467529296875,
-0.0487060546875,
0.046875,
-0.037628173828125,
0.0010118484497070312,
-0.00609588623046875,
0.0714111328125,
-0.0855712890625,
0.00501251220703125,
-0.01262664794921875,
0.0111846923828125,
-0.017974853515625,
-0.05780029296875,
-0.0665283203125,
-0.023040771484375,
-0.06768798828125,
0.0225677490234375,
0.02850341796875,
-0.0262908935546875,
-0.0224761962890625,
0.03424072265625,
-0.066162109375,
-0.0232391357421875,
0.0311431884765625,
-0.053375244140625,
0.023101806640625,
0.02557373046875,
-0.015838623046875,
0.00537109375,
-0.01314544677734375,
-0.03900146484375,
-0.0897216796875,
-0.019500732421875,
-0.0030841827392578125,
0.03948974609375,
-0.01495361328125,
-0.0076141357421875,
-0.032623291015625,
0.041473388671875,
0.017547607421875,
0.0361328125,
-0.0182647705078125,
0.0024852752685546875,
-0.0189361572265625,
-0.02386474609375,
-0.01538848876953125,
-0.0271759033203125,
-0.043487548828125,
-0.0270843505859375,
0.0006155967712402344,
0.031097412109375,
0.01099395751953125,
0.0199127197265625,
0.0167694091796875,
-0.0037822723388671875,
-0.0419921875,
-0.0330810546875,
-0.08612060546875,
0.00177764892578125,
-0.041900634765625,
-0.01328277587890625,
-0.048919677734375,
-0.0841064453125,
0.01885986328125,
0.0008130073547363281,
-0.02703857421875,
0.0220947265625,
0.046142578125,
0.01348876953125,
-0.0162811279296875,
-0.0699462890625,
-0.016510009765625,
0.0059051513671875,
-0.0198822021484375,
0.00864410400390625,
-0.006618499755859375,
-0.001956939697265625,
0.0185699462890625,
-0.03631591796875,
0.06500244140625,
-0.0058746337890625,
0.00844573974609375,
0.0193023681640625,
-0.02630615234375,
0.0489501953125,
0.042510986328125,
-0.0572509765625,
0.006244659423828125,
-0.0173797607421875,
-0.049285888671875,
-0.004077911376953125,
0.08270263671875,
-0.015655517578125,
0.035797119140625,
-0.0601806640625,
-0.0452880859375,
0.0245513916015625,
-0.04327392578125,
-0.0157928466796875,
-0.0306243896484375,
0.0201568603515625,
-0.031341552734375,
-0.018096923828125,
0.00023221969604492188,
0.0222015380859375,
0.0165863037109375,
-0.0081787109375,
0.0162200927734375,
0.0260162353515625,
-0.006702423095703125,
-0.0055084228515625,
-0.01325225830078125,
0.083740234375,
0.00836181640625,
-0.06365966796875,
0.03924560546875,
-0.0046844482421875,
0.01413726806640625,
0.0299072265625,
0.0254058837890625,
0.006244659423828125,
0.0028476715087890625,
0.00437164306640625,
0.0018644332885742188,
-0.0221099853515625,
0.017333984375,
-0.0126190185546875,
-0.005214691162109375,
0.0044403076171875,
-0.0283660888671875,
-0.00417327880859375,
0.022552490234375,
0.007476806640625,
-0.001338958740234375,
-0.01471710205078125,
-0.0296630859375,
0.0160980224609375,
0.01342010498046875,
0.0177764892578125,
0.0207672119140625,
-0.003704071044921875,
-0.004222869873046875,
0.06304931640625,
-0.046905517578125,
-0.03375244140625,
0.0081634521484375,
0.040679931640625,
-0.0109710693359375,
-0.0036830902099609375,
0.0276031494140625,
-0.0005879402160644531,
-0.03533935546875,
0.0140533447265625,
-0.024078369140625,
-0.037322998046875,
-0.0221405029296875,
0.01074981689453125,
0.03302001953125,
-0.00020432472229003906,
-0.016204833984375,
0.0224456787109375,
-0.05389404296875,
0.00605010986328125,
-0.00948333740234375,
-0.001415252685546875,
-0.010284423828125,
-0.0287322998046875,
-0.06805419921875,
-0.0247039794921875,
0.0173797607421875,
-0.06524658203125,
-0.050628662109375,
-0.0159454345703125,
-0.034942626953125,
0.035919189453125,
-0.00782012939453125,
0.06597900390625,
-0.0184478759765625,
-0.038848876953125,
0.037017822265625,
0.00510406494140625,
0.0256500244140625,
0.01007080078125,
-0.11260986328125,
0.01403045654296875,
-0.054901123046875,
-0.003414154052734375,
-0.04888916015625,
-0.02777099609375,
-0.0457763671875,
0.022369384765625,
0.01036834716796875,
0.004329681396484375,
0.01174163818359375,
-0.00458526611328125,
-0.0036907196044921875,
0.019989013671875,
-0.006755828857421875,
-0.002246856689453125,
0.00390625,
0.041290283203125,
-0.062469482421875,
0.04412841796875,
-0.00907135009765625,
-0.00238037109375,
-0.0121612548828125,
-0.017181396484375,
0.00457763671875,
-0.04443359375,
-0.0355224609375,
0.0029888153076171875,
-0.0259246826171875,
0.029876708984375,
0.0270843505859375,
0.005344390869140625,
0.052520751953125,
0.0019292831420898438,
0.022064208984375,
0.01983642578125,
-0.01812744140625,
-0.00666046142578125,
-0.01434326171875,
0.11077880859375,
-0.0247802734375,
0.00986480712890625,
0.01488494873046875,
-0.01378631591796875,
0.0005774497985839844,
-0.0061187744140625,
0.005649566650390625,
0.01568603515625,
-0.00714874267578125,
-0.016143798828125,
0.0026493072509765625,
0.0248870849609375,
0.050872802734375,
0.00014698505401611328,
0.050628662109375,
0.0173797607421875,
-0.0006999969482421875,
-0.0131072998046875,
-0.0113677978515625,
0.004222869873046875,
-0.01824951171875,
-0.0169677734375,
-0.0123443603515625,
-0.0226287841796875,
-0.04229736328125,
0.0139312744140625,
0.006191253662109375,
-0.0242767333984375,
-0.0038433074951171875,
0.0013980865478515625,
-0.014678955078125,
-0.0198516845703125,
0.0279541015625,
0.0038013458251953125,
-0.01318359375,
-0.057525634765625,
0.0013818740844726562,
-0.02703857421875,
-0.0197601318359375,
0.007354736328125,
-0.0138702392578125,
-0.0206451416015625,
0.0182037353515625,
0.023956298828125,
0.0206146240234375,
0.007213592529296875,
-0.0191650390625,
0.0211181640625,
-0.003978729248046875,
-0.01421356201171875,
0.00464630126953125,
-0.0146484375,
-0.044342041015625,
0.0290374755859375,
-0.062164306640625,
0.0038356781005859375,
0.037628173828125,
0.0089569091796875,
-0.010772705078125,
0.046173095703125,
-0.016510009765625,
0.054901123046875,
-0.003513336181640625,
-0.0142059326171875,
0.03533935546875,
-0.009185791015625,
0.0023097991943359375,
0.0247039794921875,
-0.0533447265625,
0.00722503662109375,
-0.017333984375,
0.01201629638671875,
-0.0202484130859375,
-0.01146697998046875,
0.09014892578125,
-0.0265960693359375,
-0.020294189453125,
0.00910186767578125,
0.04730224609375,
0.0015325546264648438,
-0.01029205322265625,
0.0271148681640625,
-0.0582275390625,
-0.024139404296875,
0.016326904296875,
0.01018524169921875,
0.011932373046875,
0.0139617919921875,
-0.045440673828125,
0.091064453125,
-0.0110321044921875,
-0.0025806427001953125,
0.023651123046875,
0.03826904296875,
-0.04449462890625,
0.00865936279296875,
-0.045745849609375,
0.034423828125,
0.0199127197265625,
0.0287017822265625,
-0.051483154296875,
-0.006137847900390625,
-0.0036144256591796875,
0.027587890625,
0.036102294921875,
0.00728607177734375,
-0.037261962890625,
-0.005016326904296875,
0.035369873046875,
0.0095367431640625,
-0.01007843017578125,
0.050018310546875,
0.002658843994140625,
-0.0158538818359375,
-0.007396697998046875,
0.0276336669921875,
0.041961669921875,
-0.01287078857421875,
-0.041107177734375,
0.040191650390625,
0.024383544921875,
0.0235748291015625,
0.017181396484375,
0.024810791015625,
-0.02398681640625,
-0.002262115478515625,
0.0288543701171875,
-0.00766754150390625,
-0.0008869171142578125,
-0.003543853759765625,
-0.0050811767578125,
-0.044677734375,
-0.0236053466796875,
-0.01364898681640625,
0.0269622802734375,
-0.0028514862060546875,
0.036285400390625,
0.0279388427734375,
0.0261383056640625,
0.033538818359375,
-0.0155792236328125,
0.0263519287109375,
0.031829833984375,
-0.035858154296875,
0.052398681640625,
-0.01806640625,
0.0012178421020507812,
-0.08551025390625,
0.0155792236328125,
0.032623291015625,
0.0657958984375,
-0.0633544921875,
-0.08587646484375,
0.019622802734375,
0.005359649658203125,
-0.01242828369140625,
0.06048583984375,
0.0203704833984375,
0.043304443359375,
0.10113525390625,
-0.049896240234375,
-0.02105712890625,
0.01177215576171875,
0.044189453125,
-0.004291534423828125,
-0.0279541015625,
-0.011444091796875,
-0.055816650390625,
-0.036529541015625,
0.0026683807373046875,
0.0207061767578125,
0.06103515625,
0.0212554931640625,
0.04345703125,
-0.0260467529296875,
-0.0251312255859375,
-0.018035888671875,
0.027587890625,
0.0005068778991699219,
0.01082611083984375,
-0.0282135009765625,
-0.01357269287109375,
-0.0163726806640625,
0.0311279296875,
-0.015960693359375,
0.0323486328125,
0.0220947265625,
0.00641632080078125,
-0.0021610260009765625,
-0.0037479400634765625,
0.0396728515625,
-0.026611328125,
-0.0228271484375,
-0.038055419921875,
0.0313720703125,
0.048614501953125,
0.01526641845703125,
0.018463134765625,
0.0433349609375,
0.03424072265625,
0.002941131591796875,
0.020660400390625,
0.00475311279296875,
-0.0094757080078125,
0.0626220703125,
-0.0025310516357421875,
0.040985107421875,
0.0260772705078125,
-0.0888671875,
-0.0239715576171875,
0.00336456298828125,
-0.021575927734375,
0.01727294921875,
0.036895751953125,
-0.0008401870727539062,
-0.006748199462890625,
-0.0028228759765625,
-0.02972412109375,
0.0028858184814453125,
0.016571044921875,
0.01096343994140625,
-0.007007598876953125,
-0.0009908676147460938,
-0.016693115234375,
-0.01383209228515625,
0.0194244384765625,
0.0008077621459960938,
0.0024585723876953125,
-0.01224517822265625,
0.1226806640625,
-0.038299560546875,
-0.0010585784912109375,
-0.0214996337890625,
0.036773681640625,
-0.041015625,
-0.01409149169921875,
0.0221405029296875,
-0.009033203125,
0.00942230224609375,
-0.0003345012664794922,
-0.07086181640625,
0.018402099609375,
0.059326171875,
-0.01300811767578125,
0.0225982666015625,
0.01062774658203125,
0.019805908203125,
-0.03302001953125,
0.047271728515625,
-0.016998291015625,
0.00006020069122314453,
-0.0482177734375,
-0.0494384765625,
0.06488037109375,
0.0418701171875,
0.0157318115234375,
0.02178955078125,
0.0099334716796875,
-0.04620361328125,
0.040985107421875,
-0.04840087890625,
0.06524658203125,
0.040771484375,
0.0190582275390625,
-0.0087738037109375,
0.019439697265625,
-0.0257568359375,
-0.001850128173828125,
-0.0001817941665649414,
0.00984954833984375,
0.0135498046875,
-0.061065673828125,
-0.0111236572265625,
0.015869140625,
0.011383056640625,
-0.030120849609375,
-0.00505828857421875,
0.0258331298828125,
-0.0264892578125,
-0.01263427734375,
-0.025970458984375,
-0.02972412109375,
-0.01776123046875,
-0.0003247261047363281,
0.0174713134765625,
0.005344390869140625,
-0.0199127197265625,
-0.048309326171875,
0.035491943359375,
0.06671142578125,
0.037139892578125,
-0.059417724609375,
0.051666259765625,
-0.035919189453125,
0.017425537109375,
0.0511474609375,
-0.01422119140625,
0.0120086669921875,
0.034088134765625,
-0.032501220703125,
0.0360107421875,
-0.025115966796875,
-0.035675048828125,
-0.00749969482421875,
0.020111083984375,
0.0357666015625,
-0.0160675048828125,
-0.006465911865234375,
-0.00275421142578125,
0.005710601806640625,
0.048736572265625,
0.04522705078125,
-0.0163726806640625,
0.0144805908203125,
-0.003238677978515625,
-0.02459716796875,
-0.0233306884765625,
0.0291595458984375,
-0.037750244140625,
-0.0260467529296875,
-0.0184326171875,
0.023468017578125,
0.025482177734375,
-0.039825439453125,
-0.0631103515625,
-0.00408172607421875,
-0.0026912689208984375,
-0.040283203125,
0.01007080078125,
-0.0004978179931640625,
-0.044403076171875,
0.025909423828125,
0.0184173583984375,
-0.0216522216796875,
0.0189056396484375,
0.03515625,
-0.0017652511596679688,
0.037567138671875,
0.0194091796875,
0.0230560302734375,
-0.0258026123046875,
-0.004657745361328125,
-0.006805419921875,
-0.0189056396484375,
0.051422119140625,
-0.043121337890625,
0.050018310546875,
0.04156494140625,
-0.044769287109375,
-0.0290985107421875,
-0.00862884521484375,
-0.0207672119140625,
0.0012922286987304688,
-0.04180908203125,
-0.0219879150390625,
-0.041015625,
0.044189453125,
0.002811431884765625,
0.0086669921875,
-0.014251708984375,
-0.045867919921875,
0.0018033981323242188,
-0.01430511474609375,
0.020111083984375,
0.028106689453125,
-0.0657958984375,
0.0125732421875,
0.011077880859375,
-0.0129547119140625,
0.004566192626953125,
-0.0164947509765625,
-0.0242462158203125,
-0.0119781494140625,
-0.00513458251953125,
-0.0023174285888671875,
-0.028411865234375,
0.0224151611328125,
0.0018720626831054688,
-0.0110015869140625,
-0.0465087890625,
-0.01953125,
0.00492095947265625,
-0.045623779296875,
-0.032135009765625,
-0.03753662109375,
-0.0207366943359375,
0.015869140625,
0.01000213623046875,
-0.01136016845703125,
-0.0037746429443359375,
0.0234222412109375,
0.005237579345703125,
-0.020263671875,
0.01378631591796875,
0.0013599395751953125,
-0.0006937980651855469,
-0.021636962890625,
0.07373046875,
0.008209228515625,
0.07049560546875,
0.0028858184814453125,
0.05450439453125,
-0.0126953125,
0.03485107421875,
-0.0187530517578125,
-0.00574493408203125,
-0.00930023193359375,
-0.0010528564453125,
0.0181732177734375,
-0.0022125244140625,
-0.0106048583984375,
0.00856781005859375,
-0.035888671875,
0.01055908203125,
-0.0193328857421875,
-0.01065826416015625
] |
0d055e9c1a0b531a28a1f43ffef031d061bed021
|
Wordpress Stackexchange
Q: Do I need to use The Loop on pages? I'm writing my first WordPress theme and have a question about the use of The Loop in page templates. The page templates I've looked at all follow basically the same pattern (example from Twenty Twelve):
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
But a page will only have one post associated with it so iterating through the posts seems unnecessary. My page template is more readable and seems to work fine:
<?php
the_post();
the_title('<h1>', '</h1>');
the_content();
?>
Is this a good practice? Are there any downsides?
A: The only potential (edit: functional) issue I see is that the loop_end action won't get called if you don't call have_posts() after the last the_post(), so anything hooked to that action won't run.
In practice, I've been doing it that way in bespoke client themes and have never encountered an issue, but it depends on what plugins may be used and whether or not they hook anything on loop_end.
|
Q: Do I need to use The Loop on pages? I'm writing my first WordPress theme and have a question about the use of The Loop in page templates. The page templates I've looked at all follow basically the same pattern (example from Twenty Twelve):
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
But a page will only have one post associated with it so iterating through the posts seems unnecessary. My page template is more readable and seems to work fine:
<?php
the_post();
the_title('<h1>', '</h1>');
the_content();
?>
Is this a good practice? Are there any downsides?
A: The only potential (edit: functional) issue I see is that the loop_end action won't get called if you don't call have_posts() after the last the_post(), so anything hooked to that action won't run.
In practice, I've been doing it that way in bespoke client themes and have never encountered an issue, but it depends on what plugins may be used and whether or not they hook anything on loop_end.
A: According to the Theme Guide, full loops should be used, even on single templates.
Full loops must be used in all templates. Just calling the_post() in a
template like single.php or page.php is not enough.
So yes, it's a best practice to use full loops.
|
wordpress
|
{
"language": "en",
"length": 233,
"provenance": "stackexchange_00019.jsonl.gz:429169",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87264"
}
|
[
-0.0030460357666015625,
0.001697540283203125,
0.005573272705078125,
0.021026611328125,
-0.0118255615234375,
-0.01416778564453125,
0.021942138671875,
-0.046417236328125,
0.047607421875,
0.03839111328125,
-0.01788330078125,
-0.0161590576171875,
-0.0185546875,
-0.01242828369140625,
-0.048431396484375,
-0.024200439453125,
0.04046630859375,
-0.01332855224609375,
0.0421142578125,
0.00333404541015625,
0.006938934326171875,
0.033447265625,
0.0134735107421875,
0.056884765625,
-0.00278472900390625,
-0.0211944580078125,
0.0694580078125,
-0.0234375,
-0.00787353515625,
-0.04083251953125,
0.0095062255859375,
0.0123748779296875,
0.022003173828125,
0.018646240234375,
-0.027923583984375,
0.0032711029052734375,
-0.010528564453125,
0.0031871795654296875,
-0.0006847381591796875,
0.0157318115234375,
0.021331787109375,
-0.01096343994140625,
0.031707763671875,
0.0145111083984375,
-0.003467559814453125,
-0.010345458984375,
0.012420654296875,
-0.064208984375,
0.01206207275390625,
-0.006160736083984375,
0.0247344970703125,
-0.03643798828125,
0.0284271240234375,
0.0220184326171875,
-0.0242767333984375,
0.002410888671875,
-0.0228271484375,
-0.017608642578125,
0.025543212890625,
-0.0092315673828125,
-0.0217742919921875,
-0.02496337890625,
0.0281219482421875,
0.00261688232421875,
0.00928497314453125,
-0.0014524459838867188,
-0.02569580078125,
0.033355712890625,
-0.0248260498046875,
-0.007701873779296875,
0.006404876708984375,
-0.047515869140625,
-0.0266265869140625,
-0.0472412109375,
-0.0088958740234375,
0.0060577392578125,
-0.003963470458984375,
-0.041107177734375,
-0.01207733154296875,
0.01470184326171875,
-0.050537109375,
0.007411956787109375,
-0.0357666015625,
-0.028961181640625,
-0.001308441162109375,
0.0118865966796875,
-0.03460693359375,
0.0019130706787109375,
-0.0242919921875,
-0.036285400390625,
-0.0297393798828125,
0.0264129638671875,
0.01192474365234375,
-0.057830810546875,
-0.06561279296875,
-0.01360321044921875,
0.017913818359375,
0.0252227783203125,
0.0003185272216796875,
0.01038360595703125,
0.0045318603515625,
-0.04736328125,
0.0380859375,
-0.0299530029296875,
0.0291748046875,
0.05126953125,
-0.0164031982421875,
0.0380859375,
0.0799560546875,
0.032135009765625,
0.0245513916015625,
0.056243896484375,
-0.01324462890625,
-0.038787841796875,
0.008331298828125,
0.02288818359375,
-0.047760009765625,
0.024169921875,
0.0223388671875,
0.01161956787109375,
0.01544952392578125,
0.0236358642578125,
-0.0021915435791015625,
-0.02490234375,
-0.00269317626953125,
-0.001941680908203125,
-0.01849365234375,
-0.044464111328125,
0.031219482421875,
0.028045654296875,
-0.0160064697265625,
-0.0142059326171875,
0.0232696533203125,
0.01317596435546875,
-0.005863189697265625,
-0.0237274169921875,
-0.0248260498046875,
-0.01922607421875,
0.0010805130004882812,
-0.00048470497131347656,
-0.0224761962890625,
-0.0160980224609375,
0.0276641845703125,
-0.01239776611328125,
0.0169525146484375,
-0.0118865966796875,
0.01322174072265625,
0.041015625,
0.005199432373046875,
-0.0171661376953125,
0.054779052734375,
-0.024810791015625,
0.005096435546875,
-0.0120391845703125,
0.051971435546875,
-0.06109619140625,
-0.01641845703125,
-0.0218963623046875,
0.07513427734375,
-0.004238128662109375,
-0.037384033203125,
0.001728057861328125,
0.0251617431640625,
-0.0589599609375,
-0.0684814453125,
0.00736236572265625,
-0.00432586669921875,
-0.01522064208984375,
0.0196685791015625,
-0.00791168212890625,
0.035919189453125,
-0.035400390625,
-0.01397705078125,
0.007312774658203125,
0.01346588134765625,
0.024932861328125,
-0.031280517578125,
-0.004734039306640625,
0.042449951171875,
-0.01084136962890625,
-0.035003662109375,
-0.017303466796875,
0.03619384765625,
-0.00882720947265625,
-0.08392333984375,
0.0350341796875,
0.00139617919921875,
0.04595947265625,
0.01053619384765625,
0.006366729736328125,
0.07379150390625,
0.03619384765625,
-0.0222320556640625,
0.06341552734375,
0.0108489990234375,
-0.04296875,
-0.0340576171875,
-0.0027866363525390625,
-0.0146942138671875,
-0.0528564453125,
0.0170135498046875,
-0.0009927749633789062,
0.0029964447021484375,
-0.01055145263671875,
-0.051361083984375,
0.008819580078125,
-0.0302581787109375,
0.03619384765625,
0.00662994384765625,
0.006855010986328125,
0.00557708740234375,
-0.0198516845703125,
-0.018707275390625,
0.0032939910888671875,
-0.041656494140625,
0.0039005279541015625,
-0.033294677734375,
-0.012939453125,
0.00848388671875,
-0.01146697998046875,
0.0535888671875,
-0.01507568359375,
0.037689208984375,
0.022735595703125,
0.07135009765625,
0.00901031494140625,
-0.03216552734375,
-0.033843994140625,
-0.047332763671875,
0.02288818359375,
-0.1497802734375,
0.08209228515625,
-0.007251739501953125,
-0.00496673583984375,
-0.053375244140625,
-0.006046295166015625,
-0.01428985595703125,
0.0006556510925292969,
-0.00672149658203125,
0.040191650390625,
0.044891357421875,
0.053314208984375,
-0.0110626220703125,
-0.022247314453125,
0.036773681640625,
-0.0440673828125,
0.03076171875,
-0.034454345703125,
0.026824951171875,
0.07562255859375,
-0.0020732879638671875,
0.0262603759765625,
0.0024509429931640625,
-0.0238800048828125,
0.01495361328125,
0.019500732421875,
-0.00266265869140625,
0.005641937255859375,
-0.00605010986328125,
-0.01305389404296875,
0.01300048828125,
-0.01227569580078125,
-0.01611328125,
-0.00882720947265625,
0.04144287109375,
-0.0201263427734375,
0.0202789306640625,
0.00044417381286621094,
-0.00859832763671875,
-0.01373291015625,
0.01114654541015625,
-0.0193634033203125,
0.0077972412109375,
0.02252197265625,
-0.031341552734375,
0.0031032562255859375,
-0.0347900390625,
0.00920867919921875,
-0.01195526123046875,
-0.0170745849609375,
-0.00240325927734375,
0.01071929931640625,
-0.009185791015625,
-0.0154571533203125,
-0.0147552490234375,
-0.037139892578125,
0.0081024169921875,
0.035430908203125,
0.063232421875,
0.0136871337890625,
0.020965576171875,
0.030914306640625,
-0.039154052734375,
0.08648681640625,
-0.012908935546875,
-0.03326416015625,
0.035552978515625,
-0.0140838623046875,
0.0098724365234375,
-0.0141448974609375,
0.0257415771484375,
0.04022216796875,
-0.00927734375,
-0.0204315185546875,
0.00843048095703125,
0.034423828125,
0.040069580078125,
0.00789642333984375,
-0.0033721923828125,
-0.026763916015625,
-0.00626373291015625,
-0.026092529296875,
0.035430908203125,
0.1370849609375,
-0.004299163818359375,
-0.05596923828125,
0.0347900390625,
0.07635498046875,
-0.02880859375,
-0.05682373046875,
0.051513671875,
-0.06793212890625,
-0.0001379251480102539,
-0.045501708984375,
-0.04364013671875,
-0.0225372314453125,
-0.01983642578125,
-0.0088653564453125,
-0.00035190582275390625,
-0.0162506103515625,
-0.081787109375,
-0.08953857421875,
-0.101318359375,
-0.044586181640625,
-0.01082611083984375,
0.021820068359375,
0.0018215179443359375,
0.055206298828125,
-0.0026035308837890625,
-0.07891845703125,
-0.03515625,
-0.00850677490234375,
-0.0294647216796875,
-0.01023101806640625,
-0.01800537109375,
0.01080322265625,
-0.033233642578125,
0.026214599609375,
-0.055267333984375,
-0.025177001953125,
0.008392333984375,
-0.0328369140625,
-0.017364501953125,
-0.00922393798828125,
0.00704193115234375,
0.0182342529296875,
0.026275634765625,
0.0135040283203125,
0.020477294921875,
-0.018707275390625,
-0.0296478271484375,
-0.021026611328125,
-0.0567626953125,
0.00646209716796875,
0.048583984375,
0.0206756591796875,
-0.026336669921875,
0.007259368896484375,
0.003231048583984375,
-0.01483154296875,
-0.01421356201171875,
-0.042205810546875,
0.045501708984375,
0.007598876953125,
0.038238525390625,
0.01049041748046875,
0.0208282470703125,
-0.013458251953125,
-0.0009717941284179688,
-0.00539398193359375,
-0.0006122589111328125,
-0.01206207275390625,
0.00691986083984375,
-0.038848876953125,
-0.038116455078125,
0.052734375,
0.021697998046875,
-0.00469970703125,
0.00751495361328125,
-0.0297393798828125,
0.0287017822265625,
0.0762939453125,
-0.043121337890625,
-0.02972412109375,
-0.0179443359375,
0.004802703857421875,
0.01183319091796875,
0.011077880859375,
-0.003444671630859375,
-0.030242919921875,
-0.046142578125,
0.0107574462890625,
0.0005249977111816406,
-0.0223236083984375,
-0.01421356201171875,
0.0257415771484375,
-0.040679931640625,
-0.01458740234375,
0.0018863677978515625,
-0.01800537109375,
0.00823974609375,
0.0021877288818359375,
-0.019256591796875,
0.0031337738037109375,
0.01050567626953125,
-0.05963134765625,
-0.0653076171875,
-0.00756072998046875,
-0.0239410400390625,
0.09210205078125,
0.04193115234375,
-0.0244293212890625,
-0.00913238525390625,
0.050872802734375,
0.010009765625,
0.03558349609375,
-0.0041351318359375,
0.00748443603515625,
-0.029998779296875,
0.0024890899658203125,
0.0148468017578125,
-0.0100555419921875,
-0.008270263671875,
-0.010650634765625,
0.0020294189453125,
0.0283660888671875,
-0.04864501953125,
-0.00545501708984375,
-0.0313720703125,
0.0038280487060546875,
-0.0157318115234375,
-0.002758026123046875,
0.03350830078125,
0.017425537109375,
0.01019287109375,
0.01104736328125,
-0.0142974853515625,
-0.00238037109375,
0.00594329833984375,
0.014801025390625,
-0.02301025390625,
0.0283355712890625,
0.0660400390625,
0.02752685546875,
-0.00713348388671875,
-0.06524658203125,
-0.0240020751953125,
0.01849365234375,
-0.00467681884765625,
0.039947509765625,
0.02301025390625,
-0.01605224609375,
0.071044921875,
-0.0004515647888183594,
-0.02349853515625,
0.007778167724609375,
0.03582763671875,
-0.0003204345703125,
-0.043701171875,
0.02252197265625,
-0.023406982421875,
0.002071380615234375,
0.037139892578125,
-0.028900146484375,
0.0008835792541503906,
-0.0102386474609375,
0.028778076171875,
-0.02642822265625,
0.0286407470703125,
-0.031829833984375,
-0.04010009765625,
-0.0061492919921875,
0.019439697265625,
0.0341796875,
0.0345458984375,
-0.006317138671875,
0.03533935546875,
0.0159149169921875,
-0.004947662353515625,
0.01079559326171875,
0.011505126953125,
0.021514892578125,
0.031982421875,
0.02374267578125,
0.0158538818359375,
-0.0345458984375,
-0.005001068115234375,
0.04541015625,
-0.0083465576171875,
-0.02508544921875,
-0.0252227783203125,
-0.020843505859375,
0.007579803466796875,
0.0167694091796875,
0.05126953125,
0.036376953125,
-0.0222015380859375,
-0.01922607421875,
-0.0238037109375,
0.0226287841796875,
-0.010284423828125,
-0.04437255859375,
-0.0202178955078125,
0.037261962890625,
-0.041961669921875,
0.006610870361328125,
0.031707763671875,
0.00707244873046875,
0.00316619873046875,
-0.0220184326171875,
0.0657958984375,
0.0484619140625,
0.018035888671875,
0.021026611328125,
0.005496978759765625,
-0.0067596435546875,
-0.0231781005859375,
-0.02032470703125,
-0.040191650390625,
-0.007190704345703125,
-0.005847930908203125,
0.0574951171875,
-0.0142822265625,
-0.027496337890625,
0.0288848876953125,
-0.0233154296875,
0.007144927978515625,
0.040740966796875,
0.0187225341796875,
-0.026580810546875,
-0.01181793212890625,
0.006092071533203125,
0.043304443359375,
-0.01335906982421875,
0.015960693359375,
0.00920867919921875,
0.01849365234375,
0.00649261474609375,
-0.029052734375,
-0.0126495361328125,
-0.00917816162109375,
-0.00395965576171875,
-0.009368896484375,
-0.004329681396484375,
0.01885986328125,
-0.025146484375,
-0.0170440673828125,
-0.03271484375,
-0.00894927978515625,
0.0516357421875,
-0.0080718994140625,
0.053497314453125,
-0.00809478759765625,
-0.049591064453125,
-0.019134521484375,
0.01177978515625,
0.0592041015625,
0.040283203125,
-0.10040283203125,
0.033050537109375,
-0.07135009765625,
0.005859375,
-0.073486328125,
-0.0711669921875,
-0.050048828125,
-0.0161895751953125,
0.02191162109375,
0.02215576171875,
0.00702667236328125,
-0.0019664764404296875,
-0.021392822265625,
0.0256195068359375,
0.019378662109375,
0.07672119140625,
-0.0127105712890625,
0.04815673828125,
0.0236663818359375,
-0.0014066696166992188,
0.0186004638671875,
0.01488494873046875,
-0.01165008544921875,
-0.0023212432861328125,
0.00807952880859375,
-0.00968170166015625,
-0.0001766681671142578,
-0.003398895263671875,
-0.0191497802734375,
0.004230499267578125,
0.0599365234375,
0.00003123283386230469,
0.006195068359375,
-0.0282440185546875,
-0.0008797645568847656,
-0.015838623046875,
0.060272216796875,
-0.0212249755859375,
-0.0394287109375,
0.07586669921875,
-0.0031890869140625,
-0.04547119140625,
0.00751495361328125,
-0.0364990234375,
-0.003955841064453125,
0.047637939453125,
-0.0218353271484375,
-0.024139404296875,
0.0146636962890625,
0.021270751953125,
0.034759521484375,
-0.02496337890625,
0.0242462158203125,
0.016571044921875,
-0.00026488304138183594,
0.0265045166015625,
0.0330810546875,
0.03131103515625,
-0.057891845703125,
0.08331298828125,
0.012939453125,
-0.0390625,
0.054473876953125,
-0.049713134765625,
0.010986328125,
0.03985595703125,
0.04254150390625,
-0.06378173828125,
0.00724029541015625,
0.020172119140625,
-0.01552581787109375,
-0.00952911376953125,
-0.035980224609375,
0.037200927734375,
-0.007785797119140625,
0.0859375,
0.037384033203125,
-0.01348876953125,
0.0268096923828125,
-0.040313720703125,
-0.0030384063720703125,
-0.0207672119140625,
0.054779052734375,
-0.0030879974365234375,
-0.07110595703125,
0.01187896728515625,
0.038482666015625,
-0.00704193115234375,
-0.0230865478515625,
-0.0195770263671875,
-0.01122283935546875,
-0.030029296875,
-0.029205322265625,
0.0135040283203125,
-0.0382080078125,
0.0205230712890625,
0.041961669921875,
0.03558349609375,
-0.0013580322265625,
0.046783447265625,
0.0037937164306640625,
0.0250701904296875,
0.01432037353515625,
-0.0325927734375,
-0.037872314453125,
-0.0240325927734375,
0.0080718994140625,
0.027191162109375,
-0.0233001708984375,
0.0260009765625,
-0.00737762451171875,
-0.0155792236328125,
-0.012847900390625,
-0.0211639404296875,
0.0810546875,
-0.030670166015625,
-0.0224609375,
0.0084991455078125,
-0.0069122314453125,
-0.007297515869140625,
-0.0031871795654296875,
0.00759124755859375,
-0.05035400390625,
0.0025844573974609375,
0.0020885467529296875,
-0.005008697509765625,
0.002269744873046875,
-0.0006456375122070312,
-0.050933837890625,
0.113037109375,
0.005828857421875,
-0.0036907196044921875,
0.01129150390625,
0.056396484375,
-0.034637451171875,
0.02239990234375,
-0.0222625732421875,
0.039276123046875,
0.01242828369140625,
0.048614501953125,
-0.02105712890625,
-0.007038116455078125,
0.0227813720703125,
0.045989990234375,
0.037933349609375,
0.00428009033203125,
-0.0139617919921875,
-0.00909423828125,
0.04473876953125,
0.045684814453125,
0.0101470947265625,
0.0100555419921875,
0.0004935264587402344,
0.045623779296875,
-0.0023021697998046875,
-0.059539794921875,
0.016632080078125,
-0.0294189453125,
-0.01195526123046875,
0.03857421875,
-0.0036029815673828125,
-0.0229034423828125,
-0.0269927978515625,
0.0086669921875,
-0.0743408203125,
-0.0113677978515625,
0.031646728515625,
0.004604339599609375,
-0.019317626953125,
0.0391845703125,
-0.007640838623046875,
-0.03521728515625,
-0.0209197998046875,
-0.036834716796875,
0.032806396484375,
-0.0024204254150390625,
0.0390625,
0.006923675537109375,
0.023284912109375,
0.0242462158203125,
-0.0203399658203125,
0.0014591217041015625,
0.0204620361328125,
-0.02606201171875,
0.006725311279296875,
0.0031147003173828125,
0.0293426513671875,
-0.04449462890625,
0.01143646240234375,
0.016265869140625,
0.0113983154296875,
-0.0218658447265625,
-0.0242156982421875,
0.01290130615234375,
-0.002147674560546875,
0.0062255859375,
-0.0157318115234375,
0.0079803466796875,
0.0158538818359375,
0.039031982421875,
-0.014007568359375,
-0.02325439453125,
-0.01398468017578125,
0.004547119140625,
-0.00189208984375,
0.005855560302734375,
0.017822265625,
0.0018453598022460938,
-0.003963470458984375,
0.0305938720703125,
0.01739501953125,
0.0216217041015625,
-0.017486572265625,
0.0296630859375,
-0.033966064453125,
0.00579071044921875,
-0.00977325439453125,
-0.00681304931640625,
-0.029937744140625,
0.0186309814453125,
-0.0250396728515625,
-0.020843505859375,
-0.019805908203125,
0.035400390625,
0.054779052734375,
0.007724761962890625,
0.037994384765625,
-0.001148223876953125,
-0.0208282470703125,
0.013427734375,
0.020263671875,
-0.022064208984375,
-0.037445068359375,
-0.0164947509765625,
-0.01561737060546875,
0.0160064697265625,
-0.011138916015625,
0.0258026123046875,
0.009185791015625,
0.0127410888671875,
0.01617431640625,
0.01415252685546875,
0.0030002593994140625,
-0.036376953125,
0.043304443359375,
-0.00380706787109375,
0.09869384765625,
0.028472900390625,
-0.060150146484375,
0.00069427490234375,
-0.0276947021484375,
-0.06451416015625,
0.011199951171875,
0.035675048828125,
-0.010650634765625,
0.004161834716796875,
-0.0260467529296875,
0.0299224853515625,
0.0201263427734375,
-0.019775390625,
-0.0193328857421875,
-0.018646240234375,
0.038482666015625,
-0.021453857421875,
-0.0219573974609375,
-0.00787353515625,
-0.0440673828125,
0.03955078125,
0.028167724609375,
0.0833740234375,
-0.028106689453125,
0.05157470703125,
0.040618896484375,
0.01458740234375,
0.01502227783203125,
0.0194854736328125,
0.037322998046875,
0.01483917236328125,
0.0201568603515625,
-0.0418701171875,
-0.049163818359375,
0.018157958984375,
0.0273284912109375,
-0.04638671875,
-0.018951416015625,
0.02545166015625,
-0.00641632080078125,
-0.01042938232421875,
0.033355712890625,
-0.00789642333984375,
-0.01235198974609375,
-0.007053375244140625,
0.00555419921875,
0.03448486328125,
0.04180908203125,
-0.0037403106689453125,
0.0157012939453125,
-0.030426025390625,
-0.01320648193359375,
-0.01348876953125,
0.0029430389404296875,
-0.0657958984375,
0.0203399658203125,
-0.004970550537109375,
-0.023681640625,
0.0220489501953125,
-0.00904083251953125,
0.00848388671875,
0.0186309814453125,
0.040985107421875,
0.01309967041015625,
-0.0004858970642089844,
0.036468505859375,
0.01922607421875,
0.053741455078125,
-0.03155517578125,
0.00914764404296875,
0.0079803466796875,
0.00933837890625,
0.0099639892578125,
-0.0070648193359375,
-0.0295867919921875,
-0.039825439453125,
-0.027191162109375,
-0.002887725830078125,
-0.04095458984375,
-0.059783935546875,
-0.058746337890625,
-0.006011962890625,
-0.0108489990234375,
-0.0157012939453125,
-0.0070953369140625,
-0.004116058349609375,
-0.01561737060546875,
-0.0016031265258789062,
-0.049713134765625,
0.027099609375,
0.00464630126953125,
0.0165252685546875,
-0.041229248046875,
0.006015777587890625,
-0.01094818115234375,
0.01213836669921875,
-0.00585174560546875,
0.02117919921875,
0.0223846435546875,
-0.040313720703125,
-0.036163330078125,
0.01271820068359375,
0.0266876220703125,
0.0693359375,
0.07550048828125,
-0.00513458251953125,
0.035400390625,
0.0007262229919433594,
-0.0161590576171875,
-0.054840087890625,
-0.006317138671875,
-0.035736083984375,
0.002941131591796875,
-0.020355224609375,
0.003887176513671875,
0.0033473968505859375,
-0.040863037109375,
-0.0523681640625,
0.0750732421875,
-0.0199737548828125,
-0.0159912109375,
-0.05377197265625,
0.00762176513671875,
0.02545166015625,
-0.03955078125,
-0.01491546630859375,
-0.0254364013671875,
-0.054656982421875,
0.01404571533203125,
0.015655517578125,
0.001247406005859375,
0.04779052734375,
-0.0085296630859375,
-0.02313232421875,
-0.01113128662109375,
-0.006183624267578125,
-0.01273345947265625,
0.018524169921875,
-0.01552581787109375,
0.034210205078125,
0.037750244140625,
-0.046417236328125,
-0.021270751953125,
-0.0171051025390625,
0.00814056396484375,
-0.0038814544677734375,
0.00014269351959228516,
-0.0277252197265625,
0.004085540771484375,
0.06695556640625,
0.052093505859375,
0.0280303955078125,
-0.04107666015625,
0.0123748779296875,
-0.0399169921875,
-0.047393798828125,
0.007511138916015625,
0.035003662109375,
-0.057525634765625,
0.0004687309265136719,
0.041046142578125,
-0.01459503173828125,
-0.0137939453125,
-0.035614013671875,
-0.041900634765625,
-0.0218353271484375,
-0.04998779296875,
0.0088653564453125,
-0.01275634765625,
0.006290435791015625,
0.0305023193359375,
-0.025665283203125,
0.01187896728515625,
-0.016357421875,
0.014892578125,
0.0133819580078125,
-0.00658416748046875,
0.0244598388671875,
0.044189453125,
-0.0673828125,
-0.017059326171875,
0.0204925537109375,
0.055267333984375,
-0.036895751953125,
-0.0180206298828125,
-0.0038909912109375,
0.03839111328125,
0.0011281967163085938,
0.036407470703125,
-0.0193634033203125,
0.06134033203125,
0.01287078857421875,
0.059661865234375,
0.00896453857421875,
0.06317138671875,
0.007312774658203125,
0.0433349609375,
0.00943756103515625,
-0.02044677734375,
0.0304107666015625,
-0.0484619140625,
-0.006793975830078125,
0.0083160400390625,
-0.042877197265625,
-0.0322265625,
0.01551055908203125,
0.0026454925537109375,
-0.0231170654296875,
0.010650634765625
] |
bc6bb4998f0385587e625ae584b7e63e3a8cbd6c
|
Wordpress Stackexchange
Q: Wordpress Media Manager 3.5 - default link to Media Manager once again.
This time I'm looking for a simple hack/hook/filter to change default "Attachment Display Settings" from media manager. The option is "Link To" that is default set to "Media File" and I would like to force it for all users to be default set to "none".
If there is no way to do it with hook/filter (media-template.php lines 282 - 306) - is there a way to attach jQuery file to Media Manager and use it to force change option after Media Manager is loaded?
A: You can do what you want by overriding appropriate Backbone view, which is responsible for rendering attachments display settings form.
plugin.php
add_action( 'load-post.php', 'wpse8170_media_popup_init' );
add_action( 'load-post-new.php', 'wpse8170_media_popup_init' );
function wpse8170_media_popup_init() {
wp_enqueue_script( 'wpse8170-media-manager', plugins_url( '/js/media.js', __FILE__ ), array( 'media-editor' ) );
}
media.js
(function() {
var _AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay;
wp.media.view.Settings.AttachmentDisplay = _AttachmentDisplay.extend({
render: function() {
_AttachmentDisplay.prototype.render.apply(this, arguments);
this.$el.find('select.link-to').val('none');
this.model.set('link', 'none');
this.updateLinkTo();
}
});
})();
|
Q: Wordpress Media Manager 3.5 - default link to Media Manager once again.
This time I'm looking for a simple hack/hook/filter to change default "Attachment Display Settings" from media manager. The option is "Link To" that is default set to "Media File" and I would like to force it for all users to be default set to "none".
If there is no way to do it with hook/filter (media-template.php lines 282 - 306) - is there a way to attach jQuery file to Media Manager and use it to force change option after Media Manager is loaded?
A: You can do what you want by overriding appropriate Backbone view, which is responsible for rendering attachments display settings form.
plugin.php
add_action( 'load-post.php', 'wpse8170_media_popup_init' );
add_action( 'load-post-new.php', 'wpse8170_media_popup_init' );
function wpse8170_media_popup_init() {
wp_enqueue_script( 'wpse8170-media-manager', plugins_url( '/js/media.js', __FILE__ ), array( 'media-editor' ) );
}
media.js
(function() {
var _AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay;
wp.media.view.Settings.AttachmentDisplay = _AttachmentDisplay.extend({
render: function() {
_AttachmentDisplay.prototype.render.apply(this, arguments);
this.$el.find('select.link-to').val('none');
this.model.set('link', 'none');
this.updateLinkTo();
}
});
})();
A: I know this is an old question, but I believe this answer is better suited now, as WordPress does now allow you to hook into this.
The default image size, align and "link to" properties for inserting an image are set through the options image_default_size, image_default_link_type and image_default_align, respectively. You can change this beahviour in a couple of ways:
*
*In /wp-admin/options.php
*Directly in the options table in the database
*Through update_option( 'default_image_link_type', 'none' )
*By hooking into the pre_option_[option] filter
You can hook into the pre_option_[option] filter like this:
function wpse151868_image_default_link_type( $value ) {
return 'none';
}
add_filter( 'pre_option_image_default_link_type', 'wpse151868_image_default_link_type' );
|
wordpress
|
{
"language": "en",
"length": 266,
"provenance": "stackexchange_00019.jsonl.gz:429191",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87357"
}
|
[
0.03399658203125,
-0.020782470703125,
0.028900146484375,
-0.007045745849609375,
-0.0150909423828125,
-0.0106353759765625,
0.03857421875,
-0.0323486328125,
-0.01419830322265625,
-0.005481719970703125,
-0.00673675537109375,
0.004344940185546875,
-0.02606201171875,
-0.036163330078125,
0.0129241943359375,
-0.029266357421875,
0.031707763671875,
0.01065826416015625,
0.041168212890625,
0.00981903076171875,
0.00901031494140625,
0.03619384765625,
0.015655517578125,
0.021514892578125,
-0.0301513671875,
0.0596923828125,
0.06884765625,
-0.01247406005859375,
-0.045745849609375,
-0.0233917236328125,
-0.004543304443359375,
0.0081024169921875,
0.0487060546875,
-0.039093017578125,
-0.032806396484375,
-0.01500701904296875,
-0.0078277587890625,
-0.0159149169921875,
-0.052734375,
0.03717041015625,
0.0010471343994140625,
-0.006134033203125,
-0.0253448486328125,
0.0200042724609375,
-0.037506103515625,
-0.0203399658203125,
-0.00934600830078125,
-0.0281982421875,
0.047698974609375,
0.0252227783203125,
0.01538848876953125,
0.025482177734375,
0.0160980224609375,
-0.0280303955078125,
-0.017547607421875,
-0.0107574462890625,
-0.0413818359375,
0.0164642333984375,
0.006256103515625,
0.03369140625,
0.01678466796875,
0.00811767578125,
-0.00749969482421875,
-0.024169921875,
-0.007633209228515625,
-0.01369476318359375,
-0.004299163818359375,
0.01151275634765625,
-0.027374267578125,
0.0228424072265625,
0.04150390625,
-0.022705078125,
0.01129913330078125,
-0.0567626953125,
-0.031585693359375,
0.038482666015625,
-0.001079559326171875,
-0.0076904296875,
0.0341796875,
-0.053955078125,
0.0391845703125,
-0.0014801025390625,
0.0038738250732421875,
-0.01013946533203125,
0.059417724609375,
0.054779052734375,
0.005451202392578125,
-0.05865478515625,
-0.01143646240234375,
-0.011962890625,
-0.0156707763671875,
-0.0038967132568359375,
0.039459228515625,
-0.02783203125,
-0.058319091796875,
-0.0179290771484375,
0.009674072265625,
0.00701904296875,
0.0001214742660522461,
-0.005474090576171875,
0.006397247314453125,
-0.0309295654296875,
-0.016143798828125,
-0.005046844482421875,
0.002315521240234375,
0.0394287109375,
0.0186920166015625,
-0.0538330078125,
-0.00681304931640625,
-0.002231597900390625,
-0.02435302734375,
0.032623291015625,
0.029083251953125,
0.06591796875,
-0.0189056396484375,
-0.06170654296875,
-0.05194091796875,
0.049346923828125,
-0.05303955078125,
0.0290069580078125,
-0.0171051025390625,
-0.0288238525390625,
0.00164794921875,
0.0208892822265625,
0.0046234130859375,
-0.003749847412109375,
-0.0234832763671875,
0.007701873779296875,
-0.0083160400390625,
-0.0006771087646484375,
-0.0157928466796875,
0.0181732177734375,
0.044921875,
0.042022705078125,
0.01177978515625,
0.00510406494140625,
0.01462554931640625,
-0.016876220703125,
0.00722503662109375,
0.01200103759765625,
-0.00389862060546875,
-0.028564453125,
0.0019140243530273438,
0.0088958740234375,
0.0142974853515625,
0.01220703125,
0.0296783447265625,
0.01471710205078125,
-0.002681732177734375,
-0.040679931640625,
0.0182647705078125,
-0.01702880859375,
0.0305938720703125,
0.02728271484375,
-0.00989532470703125,
0.0177764892578125,
0.06781005859375,
-0.0174102783203125,
-0.0406494140625,
-0.06890869140625,
-0.01055145263671875,
0.001781463623046875,
0.025238037109375,
-0.033355712890625,
-0.02545166015625,
0.006534576416015625,
-0.033111572265625,
-0.006282806396484375,
0.02398681640625,
0.07427978515625,
-0.0017175674438476562,
-0.0275421142578125,
-0.042083740234375,
0.0185699462890625,
-0.0052490234375,
0.0127716064453125,
-0.0118408203125,
0.0248260498046875,
0.0278778076171875,
0.0178680419921875,
-0.008544921875,
-0.03765869140625,
0.1029052734375,
-0.03369140625,
-0.040435791015625,
0.047943115234375,
0.0009427070617675781,
0.053619384765625,
0.021514892578125,
0.0128173828125,
0.0117950439453125,
0.016754150390625,
-0.02801513671875,
0.0024242401123046875,
-0.0009312629699707031,
-0.0236663818359375,
-0.023651123046875,
-0.01021575927734375,
-0.0108489990234375,
0.026123046875,
-0.00847625732421875,
0.01247406005859375,
0.0019683837890625,
0.020050048828125,
-0.023712158203125,
0.0139923095703125,
-0.0206298828125,
0.0301971435546875,
-0.0150909423828125,
0.01401519775390625,
0.0185089111328125,
0.0020599365234375,
-0.024627685546875,
-0.01458740234375,
-0.0017242431640625,
0.01471710205078125,
-0.0247039794921875,
0.044464111328125,
-0.0284423828125,
0.04742431640625,
-0.039337158203125,
-0.055328369140625,
-0.00342559814453125,
0.0384521484375,
0.00698089599609375,
-0.007038116455078125,
-0.0157318115234375,
-0.018280029296875,
0.05377197265625,
-0.00505828857421875,
0.04376220703125,
0.0201568603515625,
-0.0105743408203125,
-0.01038360595703125,
-0.053924560546875,
-0.01397705078125,
-0.0277862548828125,
-0.04791259765625,
0.0209808349609375,
0.058807373046875,
0.0175933837890625,
0.00864410400390625,
-0.02911376953125,
0.0029125213623046875,
0.08441162109375,
0.07012939453125,
0.033203125,
-0.0088043212890625,
0.041839599609375,
0.0205841064453125,
-0.0330810546875,
-0.01849365234375,
0.022796630859375,
-0.079833984375,
0.0426025390625,
0.0190277099609375,
0.007602691650390625,
-0.005054473876953125,
0.009979248046875,
0.013641357421875,
-0.007720947265625,
0.007297515869140625,
-0.007282257080078125,
0.0063018798828125,
0.028289794921875,
0.00957489013671875,
0.01287078857421875,
0.01299285888671875,
-0.0428466796875,
0.03228759765625,
0.02203369140625,
-0.0114593505859375,
-0.0212554931640625,
0.031951904296875,
0.047943115234375,
-0.0145111083984375,
-0.03387451171875,
-0.0067901611328125,
-0.006572723388671875,
0.0156707763671875,
-0.0015764236450195312,
0.018524169921875,
-0.02374267578125,
-0.0164947509765625,
0.02093505859375,
-0.054931640625,
-0.024749755859375,
-0.00008499622344970703,
0.018798828125,
0.01413726806640625,
0.039459228515625,
0.00875091552734375,
-0.0005164146423339844,
0.0198516845703125,
0.01413726806640625,
-0.03240966796875,
0.00919342041015625,
-0.047088623046875,
0.060272216796875,
-0.07098388671875,
0.06048583984375,
0.062744140625,
-0.059173583984375,
0.038360595703125,
-0.00212860107421875,
0.0232086181640625,
0.005619049072265625,
0.014984130859375,
-0.0118865966796875,
-0.037200927734375,
-0.0242919921875,
-0.0199127197265625,
-0.01120758056640625,
-0.040008544921875,
-0.06915283203125,
-0.044952392578125,
-0.0794677734375,
-0.06292724609375,
-0.107177734375,
0.0007143020629882812,
0.030426025390625,
-0.08154296875,
0.0009670257568359375,
0.00704193115234375,
-0.051025390625,
-0.032989501953125,
0.061187744140625,
0.00237274169921875,
-0.0123291015625,
0.01242828369140625,
-0.017120361328125,
0.00165557861328125,
-0.0138092041015625,
-0.0240020751953125,
-0.01239013671875,
-0.01441192626953125,
0.006694793701171875,
0.03192138671875,
0.01313018798828125,
0.0012664794921875,
0.0263214111328125,
-0.0312347412109375,
-0.0029888153076171875,
-0.0118255615234375,
0.02606201171875,
-0.019378662109375,
-0.0067596435546875,
-0.002643585205078125,
0.0457763671875,
0.039947509765625,
-0.04071044921875,
0.000988006591796875,
-0.03271484375,
-0.0118560791015625,
0.0016040802001953125,
0.0799560546875,
0.0249786376953125,
0.00579071044921875,
0.0462646484375,
-0.02008056640625,
0.005859375,
-0.0077056884765625,
-0.0200958251953125,
0.035797119140625,
0.01128387451171875,
-0.0228118896484375,
0.0288238525390625,
-0.00750732421875,
0.003360748291015625,
-0.0026226043701171875,
0.01444244384765625,
-0.0347900390625,
0.0018739700317382812,
-0.00011116266250610352,
0.01378631591796875,
-0.0018291473388671875,
0.048492431640625,
0.002063751220703125,
-0.044525146484375,
0.00539398193359375,
0.00010919570922851562,
0.0172119140625,
-0.001331329345703125,
-0.0016050338745117188,
-0.0272216796875,
0.031097412109375,
-0.040191650390625,
-0.0012111663818359375,
-0.047119140625,
-0.004741668701171875,
-0.035797119140625,
0.038116455078125,
-0.0282440185546875,
-0.02606201171875,
-0.01172637939453125,
0.02008056640625,
-0.02166748046875,
-0.0472412109375,
0.005329132080078125,
-0.016448974609375,
-0.0218963623046875,
0.039306640625,
0.0032196044921875,
0.018646240234375,
-0.0472412109375,
0.037872314453125,
-0.020751953125,
-0.0250701904296875,
0.034454345703125,
0.00853729248046875,
-0.0223541259765625,
0.0254974365234375,
-0.0460205078125,
0.014617919921875,
-0.03662109375,
0.00323486328125,
-0.116455078125,
-0.0188751220703125,
0.00433349609375,
0.053802490234375,
-0.0179290771484375,
-0.0190582275390625,
-0.027557373046875,
0.041412353515625,
0.039031982421875,
-0.0002970695495605469,
0.0251922607421875,
-0.0208587646484375,
0.00983428955078125,
-0.025482177734375,
0.00783538818359375,
-0.0290374755859375,
0.00727081298828125,
-0.042877197265625,
-0.08868408203125,
-0.0019817352294921875,
-0.0017385482788085938,
0.09014892578125,
0.025238037109375,
-0.0192108154296875,
-0.0738525390625,
-0.03375244140625,
-0.034912109375,
-0.003955841064453125,
-0.0135955810546875,
0.003940582275390625,
-0.05023193359375,
-0.075927734375,
0.0146484375,
-0.07373046875,
-0.029388427734375,
0.011932373046875,
0.03619384765625,
0.031585693359375,
0.0197296142578125,
0.0235443115234375,
-0.03228759765625,
0.0019588470458984375,
0.0174713134765625,
0.037506103515625,
-0.006008148193359375,
-0.006256103515625,
0.058319091796875,
-0.01554107666015625,
0.028656005859375,
-0.032257080078125,
0.03594970703125,
0.007568359375,
-0.018707275390625,
0.0523681640625,
0.01209259033203125,
-0.03289794921875,
-0.014739990234375,
0.002552032470703125,
0.004032135009765625,
0.014312744140625,
-0.0030231475830078125,
0.0201263427734375,
-0.01096343994140625,
-0.0105743408203125,
-0.0022106170654296875,
-0.01326751708984375,
-0.02880859375,
0.0894775390625,
0.036590576171875,
-0.0009899139404296875,
0.0281982421875,
0.06854248046875,
-0.00974273681640625,
0.018951416015625,
0.04669189453125,
-0.0092926025390625,
0.05023193359375,
0.0196075439453125,
-0.01497650146484375,
-0.0276641845703125,
0.00525665283203125,
-0.0216522216796875,
-0.00540924072265625,
-0.004535675048828125,
-0.06304931640625,
0.0189056396484375,
0.032440185546875,
0.01280975341796875,
0.00714874267578125,
0.0438232421875,
-0.0225067138671875,
-0.034912109375,
-0.033172607421875,
-0.06683349609375,
-0.0125274658203125,
-0.06805419921875,
0.05230712890625,
0.0192413330078125,
-0.00011199712753295898,
0.0243377685546875,
0.04193115234375,
0.0325927734375,
0.018463134765625,
-0.0210418701171875,
0.0093536376953125,
0.00887298583984375,
-0.002002716064453125,
0.027587890625,
0.0217742919921875,
-0.020538330078125,
-0.008056640625,
0.0155487060546875,
-0.028167724609375,
0.011322021484375,
0.0340576171875,
0.03802490234375,
-0.038360595703125,
-0.02947998046875,
0.016448974609375,
-0.048248291015625,
-0.013702392578125,
0.0224609375,
-0.05389404296875,
-0.07110595703125,
-0.0338134765625,
0.0297698974609375,
0.04656982421875,
-0.04510498046875,
0.00925445556640625,
-0.01165771484375,
0.025482177734375,
0.006618499755859375,
-0.0023288726806640625,
-0.046142578125,
0.01148223876953125,
0.0202178955078125,
-0.007404327392578125,
0.006160736083984375,
-0.00250244140625,
-0.069091796875,
-0.056884765625,
0.00222015380859375,
0.0124359130859375,
0.067626953125,
-0.0460205078125,
0.046600341796875,
-0.0175933837890625,
-0.01334381103515625,
-0.039642333984375,
0.03326416015625,
0.005191802978515625,
0.01410675048828125,
-0.0127716064453125,
-0.0081024169921875,
-0.031585693359375,
-0.020263671875,
-0.027984619140625,
-0.04449462890625,
-0.039794921875,
-0.01044464111328125,
0.00988006591796875,
0.000640869140625,
-0.00074005126953125,
-0.0185699462890625,
-0.0281829833984375,
0.0264434814453125,
0.04327392578125,
0.03338623046875,
0.023895263671875,
0.005863189697265625,
0.01508331298828125,
0.03094482421875,
0.03173828125,
-0.0185546875,
-0.0635986328125,
-0.0219879150390625,
-0.03173828125,
-0.027008056640625,
0.031585693359375,
0.070556640625,
-0.0628662109375,
-0.0404052734375,
0.0268096923828125,
0.0025386810302734375,
0.0291290283203125,
-0.0152587890625,
-0.0164794921875,
-0.0223541259765625,
-0.004425048828125,
-0.015777587890625,
0.031494140625,
-0.01343536376953125,
-0.0209503173828125,
0.0235748291015625,
-0.00585174560546875,
0.0004982948303222656,
0.0203399658203125,
-0.040740966796875,
0.0199737548828125,
0.0278778076171875,
-0.0192108154296875,
0.04766845703125,
0.047760009765625,
-0.006839752197265625,
0.02154541015625,
0.015594482421875,
-0.01078033447265625,
-0.0135345458984375,
0.00643157958984375,
0.0066375732421875,
-0.040618896484375,
0.034423828125,
-0.0025310516357421875,
-0.0082550048828125,
0.035125732421875,
-0.02618408203125,
0.03656005859375,
0.017486572265625,
0.060089111328125,
-0.044830322265625,
0.0227508544921875,
0.0033416748046875,
-0.032440185546875,
0.036407470703125,
-0.007236480712890625,
-0.0165252685546875,
-0.0204010009765625,
0.010711669921875,
-0.031524658203125,
-0.0523681640625,
-0.004241943359375,
-0.0029754638671875,
0.007213592529296875,
0.00983428955078125,
0.01849365234375,
-0.00258636474609375,
0.002880096435546875,
-0.07940673828125,
-0.004688262939453125,
-0.035491943359375,
0.01544189453125,
0.01453399658203125,
-0.0289459228515625,
-0.0308380126953125,
-0.042022705078125,
-0.025482177734375,
-0.0173492431640625,
-0.035919189453125,
0.03558349609375,
-0.006443023681640625,
0.0200042724609375,
0.0599365234375,
-0.018951416015625,
0.0280914306640625,
0.0251617431640625,
-0.0193328857421875,
-0.039154052734375,
-0.02984619140625,
0.01459503173828125,
0.04388427734375,
-0.01505279541015625,
0.03692626953125,
0.0007910728454589844,
-0.04150390625,
-0.013031005859375,
-0.0029201507568359375,
0.0633544921875,
-0.0369873046875,
-0.011383056640625,
0.0260772705078125,
0.05218505859375,
-0.003643035888671875,
-0.0018444061279296875,
0.0263671875,
-0.0230865478515625,
-0.035369873046875,
-0.0088653564453125,
-0.06134033203125,
-0.027191162109375,
-0.024810791015625,
-0.032440185546875,
0.07232666015625,
-0.06475830078125,
0.0556640625,
0.027496337890625,
0.006206512451171875,
0.01788330078125,
0.0109405517578125,
-0.0295562744140625,
0.044342041015625,
0.037750244140625,
0.019073486328125,
-0.005352020263671875,
-0.0117340087890625,
0.007598876953125,
0.0286712646484375,
0.0112152099609375,
0.00728607177734375,
-0.01308441162109375,
-0.011322021484375,
0.022613525390625,
0.0192718505859375,
0.00044083595275878906,
0.0252227783203125,
-0.007808685302734375,
-0.005950927734375,
0.0239105224609375,
-0.0178985595703125,
0.036468505859375,
-0.032318115234375,
-0.032379150390625,
-0.01194000244140625,
0.02642822265625,
0.036956787109375,
0.00571441650390625,
0.09735107421875,
-0.04644775390625,
0.00124359130859375,
0.0653076171875,
-0.041656494140625,
-0.01739501953125,
0.054656982421875,
0.00502777099609375,
0.0015163421630859375,
0.0004754066467285156,
-0.033355712890625,
0.0296173095703125,
-0.0177001953125,
-0.0701904296875,
0.0266876220703125,
-0.0016355514526367188,
-0.044525146484375,
-0.032745361328125,
-0.05108642578125,
-0.024993896484375,
0.027191162109375,
-0.003993988037109375,
-0.028411865234375,
0.00862884521484375,
-0.049163818359375,
-0.0019683837890625,
0.0291290283203125,
0.006649017333984375,
-0.006622314453125,
-0.0281829833984375,
0.025604248046875,
0.00968170166015625,
-0.0220947265625,
-0.0250244140625,
-0.034332275390625,
-0.044464111328125,
0.01885986328125,
-0.04644775390625,
0.01617431640625,
0.0198822021484375,
0.0265045166015625,
-0.0152587890625,
0.0110931396484375,
-0.042388916015625,
0.01052093505859375,
-0.032623291015625,
0.0021877288818359375,
0.019439697265625,
0.031463623046875,
0.0009350776672363281,
0.0285186767578125,
0.007808685302734375,
-0.00829315185546875,
-0.04925537109375,
0.04266357421875,
-0.0004551410675048828,
0.04669189453125,
-0.032135009765625,
-0.00785064697265625,
-0.006072998046875,
0.04351806640625,
0.041351318359375,
0.0288238525390625,
0.048583984375,
0.0220794677734375,
0.0021419525146484375,
0.01349639892578125,
0.016998291015625,
-0.0093841552734375,
0.037506103515625,
-0.027191162109375,
0.035552978515625,
-0.00228118896484375,
0.002086639404296875,
-0.004505157470703125,
0.01297760009765625,
0.04058837890625,
-0.04730224609375,
0.05364990234375,
-0.009002685546875,
-0.0203399658203125,
0.031005859375,
0.0074310302734375,
0.07464599609375,
-0.0042572021484375,
-0.10198974609375,
-0.034576416015625,
0.0061187744140625,
-0.039093017578125,
0.0202484130859375,
0.036895751953125,
-0.037872314453125,
0.0374755859375,
-0.04949951171875,
0.026123046875,
0.01158905029296875,
-0.053314208984375,
-0.01114654541015625,
-0.0251312255859375,
0.01001739501953125,
-0.0213623046875,
-0.036346435546875,
-0.012115478515625,
-0.0270233154296875,
0.0240936279296875,
0.017547607421875,
0.07830810546875,
-0.0194244384765625,
0.019012451171875,
-0.00925445556640625,
0.021209716796875,
0.0004699230194091797,
-0.0003628730773925781,
-0.0255889892578125,
0.0280609130859375,
0.02557373046875,
-0.018157958984375,
0.0372314453125,
0.013458251953125,
0.00801849365234375,
-0.049072265625,
0.01355743408203125,
-0.05126953125,
0.0078887939453125,
-0.00856781005859375,
0.03521728515625,
-0.0261077880859375,
-0.06170654296875,
-0.03887939453125,
0.0224609375,
0.0022182464599609375,
0.0274505615234375,
-0.0220794677734375,
0.0240325927734375,
0.00392913818359375,
-0.0133514404296875,
-0.0017976760864257812,
0.0274810791015625,
-0.01033782958984375,
0.0229644775390625,
-0.0108795166015625,
-0.018890380859375,
0.0243988037109375,
-0.0155792236328125,
0.0107574462890625,
0.00921630859375,
0.0168914794921875,
0.0132598876953125,
-0.03350830078125,
0.0335693359375,
0.01276397705078125,
0.0085296630859375,
-0.05816650390625,
-0.022491455078125,
0.047271728515625,
-0.0007829666137695312,
-0.00005638599395751953,
-0.046234130859375,
-0.024658203125,
-0.035308837890625,
-0.0172271728515625,
0.0270843505859375,
-0.033843994140625,
-0.03314208984375,
-0.0699462890625,
0.021270751953125,
0.0275726318359375,
0.01287078857421875,
-0.09893798828125,
0.054534912109375,
-0.01535797119140625,
0.0655517578125,
-0.021331787109375,
0.01837158203125,
-0.03076171875,
-0.0125274658203125,
-0.006839752197265625,
-0.055694580078125,
-0.036407470703125,
0.0810546875,
-0.0271148681640625,
0.0014753341674804688,
0.01361083984375,
-0.01071929931640625,
-0.00909423828125,
0.00811004638671875,
0.0003886222839355469,
0.058013916015625,
-0.02947998046875,
-0.03173828125,
-0.0121917724609375,
0.02362060546875,
0.005779266357421875,
-0.037994384765625,
-0.006561279296875,
-0.040740966796875,
0.005481719970703125,
0.01163482666015625,
-0.0318603515625,
-0.015716552734375,
-0.053375244140625,
-0.07989501953125,
0.043243408203125,
-0.006664276123046875,
-0.033935546875,
-0.022125244140625,
0.016845703125,
-0.019378662109375,
0.030914306640625,
0.00769805908203125,
-0.0236968994140625,
0.0140838623046875,
0.033355712890625,
0.0007662773132324219,
0.0057830810546875,
0.0254974365234375,
-0.01456451416015625,
-0.033905029296875,
0.0011320114135742188,
-0.0007214546203613281,
-0.017364501953125,
-0.0025539398193359375,
0.01529693603515625,
0.0222625732421875,
0.0455322265625,
-0.01849365234375,
-0.01265716552734375,
-0.0091552734375,
-0.040924072265625,
-0.001781463623046875,
0.00614166259765625,
-0.04443359375,
0.012939453125,
0.073974609375,
0.07000732421875,
0.0204620361328125,
-0.039886474609375,
-0.01277923583984375,
-0.05963134765625,
-0.029541015625,
-0.00023937225341796875,
0.00395965576171875,
-0.037689208984375,
0.033905029296875,
0.01348114013671875,
-0.003047943115234375,
-0.01898193359375,
0.009796142578125,
-0.032135009765625,
-0.01044464111328125,
0.012298583984375,
0.00281524658203125,
-0.027191162109375,
0.00775909423828125,
0.0823974609375,
-0.052947998046875,
0.003131866455078125,
0.03399658203125,
-0.002536773681640625,
0.05181884765625,
0.020599365234375,
0.0113677978515625,
0.0294952392578125,
-0.038970947265625,
0.005748748779296875,
0.0262298583984375,
-0.034698486328125,
-0.03057861328125,
-0.0019073486328125,
-0.01139068603515625,
0.0134735107421875,
-0.005367279052734375,
0.01195526123046875,
0.01409149169921875,
0.0172119140625,
-0.01010894775390625,
0.0259552001953125,
-0.06097412109375,
0.0038547515869140625,
-0.0140838623046875,
-0.0193939208984375,
-0.0202178955078125,
0.0394287109375,
0.05712890625,
-0.0012311935424804688,
0.013336181640625,
-0.0030307769775390625,
-0.00040340423583984375,
-0.0408935546875,
0.039703369140625,
0.00508880615234375,
-0.018585205078125,
0.0169219970703125
] |
df25c87bcef6d10e677b7ddfca770e963adb58ec
|
Wordpress Stackexchange
Q: Import media to online WordPress from local development I have a site being developed locally and I want to import the contents to an online installation. I used wordpress "import" but it cant get the media files. Is there any "wordpress" was of doing this or will I have to get access to my LDE from outside or upload the entire installation which I would rather avoid?
A: When I use WordPress Import in this cases, this is what I do:
*
*Export the XML in localhost.
*Open the exported file in a text editor.
*Search and replace http://localhost/wp-content/uploads/ for http://example.com/custom-temporary-folder/.
*Upload the uploads folder via FTP to the custom-temporary-folder.
*Perform the Import in example.com using the modified XML file.
|
Q: Import media to online WordPress from local development I have a site being developed locally and I want to import the contents to an online installation. I used wordpress "import" but it cant get the media files. Is there any "wordpress" was of doing this or will I have to get access to my LDE from outside or upload the entire installation which I would rather avoid?
A: When I use WordPress Import in this cases, this is what I do:
*
*Export the XML in localhost.
*Open the exported file in a text editor.
*Search and replace http://localhost/wp-content/uploads/ for http://example.com/custom-temporary-folder/.
*Upload the uploads folder via FTP to the custom-temporary-folder.
*Perform the Import in example.com using the modified XML file.
|
wordpress
|
{
"language": "en",
"length": 121,
"provenance": "stackexchange_00019.jsonl.gz:429199",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87395"
}
|
[
0.0226593017578125,
-0.020050048828125,
0.004871368408203125,
0.0034542083740234375,
-0.01161956787109375,
-0.0177001953125,
0.049774169921875,
-0.0278167724609375,
0.0087738037109375,
-0.01922607421875,
-0.02325439453125,
0.0030765533447265625,
-0.03668212890625,
-0.04266357421875,
0.03411865234375,
-0.03851318359375,
0.0134735107421875,
-0.005794525146484375,
0.02520751953125,
-0.01026153564453125,
-0.004695892333984375,
-0.007171630859375,
0.0265350341796875,
-0.01507568359375,
0.00749969482421875,
0.028228759765625,
0.049224853515625,
-0.003444671630859375,
-0.0005044937133789062,
-0.0202484130859375,
0.0191802978515625,
-0.00614166259765625,
0.0154876708984375,
0.00933837890625,
-0.0245208740234375,
-0.03094482421875,
0.0170135498046875,
-0.00787353515625,
-0.017059326171875,
0.041778564453125,
0.0012369155883789062,
0.002422332763671875,
0.00966644287109375,
0.04833984375,
-0.0128173828125,
-0.04840087890625,
-0.0005240440368652344,
-0.0460205078125,
0.016815185546875,
0.01519012451171875,
-0.0257568359375,
-0.02276611328125,
-0.0157470703125,
-0.03350830078125,
-0.004734039306640625,
-0.0297088623046875,
-0.00122833251953125,
0.018280029296875,
0.0309295654296875,
-0.0234527587890625,
-0.0455322265625,
-0.0030841827392578125,
0.018096923828125,
-0.00445556640625,
0.00495147705078125,
-0.0008997917175292969,
0.01922607421875,
0.007232666015625,
-0.057098388671875,
-0.00797271728515625,
0.033477783203125,
-0.0243988037109375,
0.0030689239501953125,
-0.00690460205078125,
-0.004581451416015625,
-0.01397705078125,
0.0263824462890625,
-0.0253143310546875,
0.010833740234375,
0.00852203369140625,
0.0007009506225585938,
-0.022216796875,
-0.0144500732421875,
-0.0953369140625,
0.09747314453125,
0.01064300537109375,
0.01360321044921875,
-0.01212310791015625,
0.0079193115234375,
0.0220947265625,
-0.006809234619140625,
0.021240234375,
0.003936767578125,
0.018768310546875,
-0.01104736328125,
0.0010662078857421875,
-0.0299224853515625,
0.0123748779296875,
-0.0287017822265625,
0.040863037109375,
-0.01149749755859375,
-0.0201873779296875,
0.058502197265625,
-0.038055419921875,
-0.004970550537109375,
-0.0181427001953125,
-0.00034546852111816406,
-0.05316162109375,
0.018280029296875,
0.0196075439453125,
-0.0404052734375,
0.048309326171875,
0.010101318359375,
-0.0208740234375,
-0.0162353515625,
0.034088134765625,
0.0230712890625,
0.0208282470703125,
0.00951385498046875,
0.0167388916015625,
-0.0029354095458984375,
0.0364990234375,
-0.08392333984375,
-0.0221710205078125,
-0.00795745849609375,
-0.030303955078125,
0.0047607421875,
0.03619384765625,
-0.03277587890625,
0.05279541015625,
-0.0275115966796875,
0.0106658935546875,
0.0550537109375,
-0.00801849365234375,
-0.02044677734375,
-0.0248870849609375,
0.0074005126953125,
0.0216827392578125,
0.00937652587890625,
0.0048065185546875,
-0.00388336181640625,
-0.026092529296875,
-0.005901336669921875,
-0.0008425712585449219,
0.0122833251953125,
0.0003426074981689453,
0.0171966552734375,
0.0244293212890625,
-0.005306243896484375,
-0.0042724609375,
0.032012939453125,
0.00325775146484375,
0.03973388671875,
0.01458740234375,
0.01369476318359375,
-0.057403564453125,
0.0750732421875,
-0.08203125,
0.03057861328125,
-0.07684326171875,
-0.01087188720703125,
-0.0024967193603515625,
0.043243408203125,
0.0035991668701171875,
0.0005664825439453125,
0.0010595321655273438,
-0.027923583984375,
-0.00977325439453125,
0.0311431884765625,
0.03759765625,
-0.033355712890625,
-0.0338134765625,
0.03338623046875,
0.0271759033203125,
-0.00685882568359375,
0.048583984375,
0.0295257568359375,
-0.0187530517578125,
0.0123138427734375,
0.04827880859375,
0.00832366943359375,
-0.006008148193359375,
0.056640625,
-0.02557373046875,
-0.018707275390625,
0.00038909912109375,
0.01212310791015625,
0.03338623046875,
0.0189056396484375,
0.033294677734375,
-0.00891876220703125,
0.00406646728515625,
-0.007232666015625,
-0.04058837890625,
0.0058746337890625,
0.01416778564453125,
0.01335906982421875,
0.0170745849609375,
-0.00177764892578125,
-0.0007038116455078125,
-0.046630859375,
-0.00170135498046875,
0.052886962890625,
0.00598907470703125,
0.03814697265625,
0.00322723388671875,
-0.0009503364562988281,
0.0225067138671875,
0.0435791015625,
-0.0180511474609375,
-0.01096343994140625,
-0.0156707763671875,
0.00696563720703125,
-0.042144775390625,
-0.0531005859375,
0.032867431640625,
-0.038055419921875,
0.02093505859375,
-0.012451171875,
0.050018310546875,
-0.023956298828125,
-0.0201873779296875,
-0.0176239013671875,
-0.01154327392578125,
-0.0122222900390625,
0.023834228515625,
-0.022918701171875,
0.0206146240234375,
-0.00604248046875,
0.0197601318359375,
0.035186767578125,
-0.00499725341796875,
0.001861572265625,
0.002349853515625,
-0.0158538818359375,
-0.017852783203125,
-0.0230560302734375,
-0.0750732421875,
0.02490234375,
0.0667724609375,
0.0162506103515625,
0.007598876953125,
-0.0010213851928710938,
0.061279296875,
0.0670166015625,
0.01074981689453125,
0.00989532470703125,
0.0178070068359375,
0.0224609375,
0.032470703125,
-0.058563232421875,
-0.007106781005859375,
0.0281524658203125,
-0.062164306640625,
-0.0028171539306640625,
0.059295654296875,
-0.0264739990234375,
-0.010498046875,
-0.0072021484375,
-0.013824462890625,
0.0207672119140625,
-0.0288848876953125,
-0.0269012451171875,
-0.0079193115234375,
0.0244903564453125,
0.0390625,
0.05462646484375,
0.05377197265625,
-0.019012451171875,
0.0145111083984375,
-0.0001461505889892578,
-0.0026531219482421875,
0.01137542724609375,
0.0374755859375,
-0.00994873046875,
0.056732177734375,
-0.041534423828125,
-0.0074920654296875,
0.0347900390625,
0.044708251953125,
-0.01416778564453125,
-0.003696441650390625,
0.0235137939453125,
0.0010433197021484375,
0.01152801513671875,
-0.060028076171875,
0.039276123046875,
0.0213775634765625,
-0.0273284912109375,
-0.0012912750244140625,
0.0248260498046875,
0.041229248046875,
-0.01873779296875,
0.038665771484375,
-0.0293426513671875,
0.0086822509765625,
0.050323486328125,
-0.055816650390625,
0.032318115234375,
0.002277374267578125,
0.0711669921875,
0.07269287109375,
0.012481689453125,
0.007564544677734375,
0.0004277229309082031,
0.00881195068359375,
-0.002475738525390625,
-0.0019969940185546875,
-0.0162353515625,
-0.0110626220703125,
-0.06591796875,
-0.0232086181640625,
0.01270294189453125,
-0.0239105224609375,
-0.00908660888671875,
-0.0197296142578125,
-0.040679931640625,
-0.0296783447265625,
-0.0791015625,
-0.04742431640625,
-0.0300750732421875,
-0.075927734375,
0.017913818359375,
-0.015045166015625,
-0.029144287109375,
-0.010986328125,
0.0037021636962890625,
0.0265960693359375,
0.0223846435546875,
-0.0218963623046875,
-0.024932861328125,
-0.0489501953125,
-0.058837890625,
-0.06341552734375,
0.00125885009765625,
-0.004322052001953125,
0.028228759765625,
0.0186004638671875,
0.018280029296875,
-0.020965576171875,
0.0433349609375,
0.06439208984375,
-0.0190887451171875,
-0.003086090087890625,
0.009979248046875,
-0.01187896728515625,
0.057708740234375,
0.0018014907836914062,
0.035247802734375,
0.03515625,
-0.0256805419921875,
-0.042083740234375,
0.0026092529296875,
-0.0045623779296875,
-0.03131103515625,
0.01181793212890625,
-0.0014085769653320312,
-0.0210113525390625,
-0.026611328125,
-0.0633544921875,
0.00959014892578125,
0.0301971435546875,
0.0088958740234375,
0.00814056396484375,
-0.029510498046875,
-0.0406494140625,
0.025665283203125,
0.00464630126953125,
0.0028591156005859375,
0.0127105712890625,
0.00499725341796875,
-0.0095672607421875,
0.01506805419921875,
-0.0025959014892578125,
0.0105133056640625,
0.01082611083984375,
0.044403076171875,
-0.0164794921875,
0.0179443359375,
0.030242919921875,
-0.005290985107421875,
-0.0159759521484375,
0.001102447509765625,
-0.0465087890625,
-0.05755615234375,
0.05078125,
0.01349639892578125,
0.0175628662109375,
-0.032989501953125,
-0.038909912109375,
-0.005168914794921875,
0.0928955078125,
-0.028411865234375,
0.0083160400390625,
-0.002544403076171875,
-0.0071258544921875,
-0.0276336669921875,
-0.030029296875,
-0.0860595703125,
0.0023193359375,
0.0166015625,
-0.03240966796875,
-0.02313232421875,
-0.0229949951171875,
0.01454925537109375,
-0.048126220703125,
0.0233154296875,
-0.0198822021484375,
0.0135498046875,
-0.00714874267578125,
0.0246734619140625,
-0.004154205322265625,
0.0051422119140625,
-0.017303466796875,
0.008575439453125,
-0.03448486328125,
-0.1043701171875,
-0.0089263916015625,
-0.02655029296875,
0.0653076171875,
0.001354217529296875,
-0.00144195556640625,
-0.018463134765625,
0.048004150390625,
-0.03607177734375,
0.039794921875,
-0.0261688232421875,
0.036895751953125,
-0.006072998046875,
-0.0020294189453125,
-0.01161956787109375,
-0.01081085205078125,
-0.036895751953125,
-0.07928466796875,
-0.06549072265625,
-0.017486572265625,
-0.0001817941665649414,
0.057403564453125,
-0.01114654541015625,
0.006359100341796875,
0.0038604736328125,
0.0020542144775390625,
0.0099945068359375,
0.0235595703125,
-0.0015153884887695312,
-0.0153656005859375,
-0.00493621826171875,
-0.009674072265625,
0.0256195068359375,
-0.0014371871948242188,
-0.01158905029296875,
0.00601959228515625,
0.06329345703125,
0.009674072265625,
-0.0236968994140625,
-0.0740966796875,
-0.028839111328125,
-0.001674652099609375,
0.007740020751953125,
0.041961669921875,
0.0179901123046875,
0.0204620361328125,
-0.003993988037109375,
-0.0197601318359375,
0.0217437744140625,
-0.004817962646484375,
0.0197296142578125,
0.003894805908203125,
0.0001895427703857422,
0.0175323486328125,
0.02960205078125,
-0.035186767578125,
0.008270263671875,
0.0114288330078125,
-0.041351318359375,
0.0186920166015625,
0.045928955078125,
-0.0089874267578125,
0.01568603515625,
-0.0297393798828125,
-0.0413818359375,
0.01152801513671875,
-0.044036865234375,
0.0260467529296875,
-0.03680419921875,
0.0198822021484375,
-0.005596160888671875,
0.0223541259765625,
0.0092620849609375,
0.042205810546875,
0.0135650634765625,
0.004978179931640625,
0.0245513916015625,
0.049957275390625,
-0.0027618408203125,
0.0116119384765625,
0.00701904296875,
-0.006694793701171875,
-0.003955841064453125,
-0.051483154296875,
-0.04693603515625,
0.0157012939453125,
0.0384521484375,
0.02239990234375,
0.006061553955078125,
-0.007472991943359375,
-0.00034737586975097656,
-0.0081024169921875,
0.023223876953125,
0.028045654296875,
0.004489898681640625,
-0.0203399658203125,
-0.052398681640625,
-0.01319122314453125,
-0.0212249755859375,
0.006084442138671875,
0.0271148681640625,
-0.07122802734375,
0.025299072265625,
0.0220947265625,
0.02337646484375,
0.0309295654296875,
0.0238037109375,
0.0197906494140625,
-0.0212249755859375,
0.00423431396484375,
-0.01204681396484375,
-0.00247955322265625,
-0.020050048828125,
0.026611328125,
0.016510009765625,
0.05419921875,
-0.02874755859375,
-0.0682373046875,
0.035797119140625,
-0.044189453125,
-0.00885772705078125,
0.049346923828125,
-0.00626373291015625,
-0.06494140625,
-0.015625,
-0.005504608154296875,
0.024749755859375,
-0.034759521484375,
-0.0146331787109375,
0.03662109375,
0.005855560302734375,
-0.0018367767333984375,
0.06036376953125,
-0.07354736328125,
0.0199127197265625,
0.040924072265625,
-0.032562255859375,
-0.0457763671875,
-0.005466461181640625,
-0.01439666748046875,
0.0007176399230957031,
-0.00843048095703125,
-0.0159149169921875,
0.031341552734375,
0.01197052001953125,
-0.01085662841796875,
-0.01168060302734375,
-0.01009368896484375,
-0.0535888671875,
-0.00899505615234375,
0.02215576171875,
-0.0298004150390625,
0.0000807046890258789,
-0.009307861328125,
-0.0310821533203125,
-0.03240966796875,
-0.01248931884765625,
-0.006626129150390625,
-0.0604248046875,
0.01029205322265625,
0.0033512115478515625,
0.002685546875,
-0.003986358642578125,
-0.0265655517578125,
0.0153350830078125,
0.025299072265625,
-0.0027141571044921875,
-0.004734039306640625,
0.0201263427734375,
0.023712158203125,
0.001789093017578125,
0.038726806640625,
0.027862548828125,
0.0233917236328125,
-0.0148468017578125,
-0.035980224609375,
0.00473785400390625,
-0.02545166015625,
-0.0193939208984375,
0.00727081298828125,
-0.00131988525390625,
0.0299224853515625,
0.05572509765625,
-0.0013647079467773438,
0.028472900390625,
-0.04315185546875,
-0.00981903076171875,
-0.0109405517578125,
0.060516357421875,
-0.04656982421875,
0.007457733154296875,
0.0160369873046875,
-0.060333251953125,
-0.033172607421875,
0.00753021240234375,
-0.033966064453125,
0.036102294921875,
-0.0025196075439453125,
-0.0147705078125,
0.040191650390625,
-0.01448822021484375,
-0.00441741943359375,
0.08294677734375,
0.01338958740234375,
0.049560546875,
0.047637939453125,
0.01203155517578125,
0.04486083984375,
0.051177978515625,
-0.0181427001953125,
-0.035614013671875,
-0.008331298828125,
-0.00931549072265625,
-0.0268707275390625,
-0.046905517578125,
-0.0203399658203125,
0.043060302734375,
0.054656982421875,
0.09124755859375,
-0.0635986328125,
0.00737762451171875,
0.03302001953125,
-0.06964111328125,
-0.0401611328125,
-0.04632568359375,
0.008087158203125,
-0.0826416015625,
0.0257110595703125,
0.06304931640625,
-0.026885986328125,
-0.023406982421875,
-0.01293182373046875,
-0.0111083984375,
-0.0204315185546875,
0.0238037109375,
0.01364898681640625,
-0.029144287109375,
-0.00728607177734375,
0.01491546630859375,
-0.0124969482421875,
0.0031566619873046875,
0.0279541015625,
-0.026947021484375,
0.0005693435668945312,
-0.0241851806640625,
0.00872802734375,
-0.038238525390625,
-0.0171356201171875,
0.0096893310546875,
0.0232391357421875,
0.03741455078125,
0.0275421142578125,
0.01806640625,
-0.03912353515625,
0.00921630859375,
0.024993896484375,
0.0310211181640625,
0.0037403106689453125,
-0.00372314453125,
0.007770538330078125,
0.00429534912109375,
0.00496673583984375,
0.00586700439453125,
-0.01197052001953125,
0.0035724639892578125,
-0.00494384765625,
0.00894927978515625,
-0.0230865478515625,
-0.0133514404296875,
0.0396728515625,
0.0151214599609375,
0.006313323974609375,
-0.011383056640625,
0.06591796875,
-0.0399169921875,
-0.015350341796875,
0.01708984375,
-0.00167083740234375,
-0.03863525390625,
-0.00988006591796875,
-0.039215087890625,
0.10528564453125,
0.02203369140625,
-0.00252532958984375,
0.03564453125,
0.041839599609375,
-0.06646728515625,
0.01004791259765625,
-0.0207061767578125,
0.01739501953125,
0.028594970703125,
-0.03240966796875,
-0.048004150390625,
-0.013397216796875,
-0.039886474609375,
0.040130615234375,
0.031768798828125,
-0.00238037109375,
-0.0452880859375,
-0.0111846923828125,
0.047210693359375,
0.07568359375,
0.044708251953125,
0.02325439453125,
-0.048614501953125,
0.0175628662109375,
0.0280609130859375,
-0.052001953125,
0.014678955078125,
0.0260467529296875,
-0.045684814453125,
-0.01806640625,
0.01209259033203125,
-0.0010852813720703125,
0.011932373046875,
-0.0191802978515625,
-0.005153656005859375,
0.0064544677734375,
0.0096435546875,
-0.0239715576171875,
0.042449951171875,
-0.00595855712890625,
-0.00830078125,
0.0083770751953125,
-0.025238037109375,
-0.0048065185546875,
0.00971221923828125,
-0.00528717041015625,
0.016510009765625,
0.0209197998046875,
0.00685882568359375,
0.020416259765625,
-0.009307861328125,
0.0016040802001953125,
0.00867462158203125,
-0.01107025146484375,
0.03302001953125,
0.0203399658203125,
0.02093505859375,
-0.03228759765625,
0.005855560302734375,
0.01715087890625,
0.039825439453125,
-0.0287017822265625,
-0.0290679931640625,
0.01262664794921875,
-0.0024013519287109375,
-0.02099609375,
-0.03173828125,
-0.0310516357421875,
-0.02935791015625,
0.005634307861328125,
0.0027446746826171875,
-0.00217437744140625,
0.0198822021484375,
0.01395416259765625,
0.012847900390625,
0.04473876953125,
-0.027984619140625,
-0.006198883056640625,
-0.0009760856628417969,
0.023284912109375,
0.006214141845703125,
0.01390838623046875,
-0.0172271728515625,
0.0269012451171875,
-0.030487060546875,
0.00678253173828125,
-0.01806640625,
0.01318359375,
0.0298614501953125,
0.0074920654296875,
-0.036956787109375,
-0.02056884765625,
0.041015625,
0.03839111328125,
-0.000025987625122070312,
0.044158935546875,
0.0809326171875,
0.07464599609375,
-0.05218505859375,
-0.0278778076171875,
0.0440673828125,
-0.020477294921875,
-0.0124969482421875,
-0.0484619140625,
0.00710296630859375,
0.006542205810546875,
-0.0048675537109375,
0.00426483154296875,
-0.0194091796875,
0.04254150390625,
-0.031494140625,
0.048919677734375,
-0.0141448974609375,
-0.04791259765625,
0.0249786376953125,
-0.0149078369140625,
0.1146240234375,
-0.00719451904296875,
-0.065673828125,
-0.0191497802734375,
-0.0140838623046875,
0.0287628173828125,
-0.0008678436279296875,
0.028717041015625,
0.0308685302734375,
-0.0013303756713867188,
0.04107666015625,
-0.01277923583984375,
0.0372314453125,
-0.0014104843139648438,
0.017181396484375,
0.00989532470703125,
0.01885986328125,
0.0064849853515625,
-0.0777587890625,
-0.02813720703125,
-0.052093505859375,
0.046783447265625,
0.01763916015625,
0.0980224609375,
-0.01910400390625,
0.03997802734375,
-0.003509521484375,
-0.0170440673828125,
0.01507568359375,
0.0150299072265625,
-0.059783935546875,
0.0195770263671875,
0.03643798828125,
-0.0203704833984375,
0.005290985107421875,
-0.0081024169921875,
0.01326751708984375,
-0.0305023193359375,
-0.043060302734375,
-0.035430908203125,
0.043243408203125,
0.038848876953125,
0.041778564453125,
-0.0108184814453125,
-0.0277099609375,
0.00044274330139160156,
0.0079193115234375,
0.0174713134765625,
0.00177001953125,
-0.016448974609375,
0.0008225440979003906,
0.0195770263671875,
-0.0311279296875,
0.016082763671875,
-0.0028972625732421875,
0.0179290771484375,
0.0290069580078125,
0.0237579345703125,
-0.057525634765625,
0.05755615234375,
-0.0007977485656738281,
-0.007221221923828125,
0.023162841796875,
0.08746337890625,
0.0265960693359375,
-0.042510986328125,
0.0259246826171875,
0.036773681640625,
0.054412841796875,
-0.0020503997802734375,
0.01436614990234375,
0.028472900390625,
-0.01763916015625,
-0.00984954833984375,
-0.03839111328125,
-0.0303192138671875,
-0.036041259765625,
0.0219573974609375,
0.039337158203125,
-0.00476837158203125,
0.003696441650390625,
-0.050048828125,
-0.006572723388671875,
0.03155517578125,
-0.0073394775390625,
-0.00839996337890625,
-0.00616455078125,
-0.0282745361328125,
0.02545166015625,
-0.0110626220703125,
0.00940704345703125,
-0.01129913330078125,
0.0050811767578125,
-0.041900634765625,
-0.06231689453125,
-0.0379638671875,
0.04266357421875,
-0.045867919921875,
0.042449951171875,
0.0426025390625,
-0.0280303955078125,
0.0202178955078125,
0.03790283203125,
0.0243988037109375,
0.08868408203125,
-0.00771331787109375,
-0.06768798828125,
-0.035064697265625,
-0.01116943359375,
0.0177154541015625,
-0.0103302001953125,
0.019805908203125,
-0.08770751953125,
0.00028395652770996094,
-0.033416748046875,
-0.00420379638671875,
0.005584716796875,
-0.06439208984375,
-0.11322021484375,
0.018798828125,
-0.0224151611328125,
-0.05084228515625,
-0.0034770965576171875,
0.0008158683776855469,
-0.0236053466796875,
0.002895355224609375,
0.0102996826171875,
-0.00904083251953125,
0.00322723388671875,
0.0156402587890625,
-0.02362060546875,
0.0191650390625,
0.01190185546875,
-0.0295257568359375,
-0.0011653900146484375,
-0.00855255126953125,
0.0077667236328125,
-0.033172607421875,
0.015106201171875,
-0.0223388671875,
0.04266357421875,
0.045745849609375,
-0.017333984375,
-0.0009918212890625,
0.003490447998046875,
-0.033782958984375,
-0.0086669921875,
-0.004192352294921875,
-0.05047607421875,
-0.00897216796875,
0.0858154296875,
0.0692138671875,
0.0242156982421875,
-0.0306549072265625,
0.004791259765625,
-0.0029296875,
0.0019779205322265625,
-0.0252227783203125,
0.0005030632019042969,
-0.0516357421875,
-0.0310516357421875,
-0.0042877197265625,
-0.01605224609375,
0.02362060546875,
-0.053558349609375,
-0.04083251953125,
0.01319122314453125,
-0.033294677734375,
-0.0037288665771484375,
-0.016937255859375,
-0.0019817352294921875,
0.1109619140625,
-0.057647705078125,
0.0084991455078125,
0.026580810546875,
-0.0106658935546875,
0.057037353515625,
0.0221405029296875,
0.010772705078125,
0.0178070068359375,
-0.03546142578125,
0.00833892822265625,
0.0015087127685546875,
0.041290283203125,
-0.024993896484375,
-0.0287322998046875,
0.0184326171875,
-0.01172637939453125,
-0.01137542724609375,
-0.024139404296875,
0.0160064697265625,
-0.0095367431640625,
-0.03851318359375,
0.04608154296875,
-0.0192718505859375,
-0.044036865234375,
-0.040283203125,
0.032073974609375,
-0.0550537109375,
0.011505126953125,
-0.019012451171875,
-0.03375244140625,
0.004520416259765625,
-0.006427764892578125,
-0.018218994140625,
-0.02490234375,
-0.0131683349609375,
0.00452423095703125,
-0.031005859375,
0.00637054443359375
] |
df3e8fd7fb51ee2af7260f60591a24879ec917b3
|
Wordpress Stackexchange
Q: Can I simulate a user being logged in from a WP_UnitTestCase? I have some logic in my code that's based on whether or not the user is logged in. How do I test it from my WP_UnitTestCase?
A: Call wp_set_current_user($id) to make a user ID the currently logged in user.
|
Q: Can I simulate a user being logged in from a WP_UnitTestCase? I have some logic in my code that's based on whether or not the user is logged in. How do I test it from my WP_UnitTestCase?
A: Call wp_set_current_user($id) to make a user ID the currently logged in user.
|
wordpress
|
{
"language": "en",
"length": 51,
"provenance": "stackexchange_00019.jsonl.gz:429220",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87477"
}
|
[
0.078369140625,
0.004848480224609375,
-0.005435943603515625,
-0.051116943359375,
0.0219573974609375,
-0.040771484375,
0.037841796875,
0.006031036376953125,
-0.01332855224609375,
0.0178375244140625,
-0.027618408203125,
0.0006647109985351562,
-0.005802154541015625,
-0.0223388671875,
-0.01031494140625,
-0.03131103515625,
-0.0016069412231445312,
-0.021514892578125,
-0.0237274169921875,
-0.03167724609375,
0.0078887939453125,
-0.0191650390625,
-0.00685882568359375,
0.01374053955078125,
0.04107666015625,
-0.028167724609375,
-0.0072021484375,
0.0048370361328125,
0.037200927734375,
0.0103607177734375,
0.0192413330078125,
-0.027496337890625,
-0.0069427490234375,
0.060821533203125,
-0.040191650390625,
0.01306915283203125,
-0.01238250732421875,
0.0404052734375,
0.0203704833984375,
0.0139007568359375,
0.044830322265625,
-0.01018524169921875,
-0.034637451171875,
0.00525665283203125,
-0.0302581787109375,
-0.048736572265625,
0.041748046875,
-0.014892578125,
0.0439453125,
0.030609130859375,
0.0095672607421875,
0.0218963623046875,
0.0116424560546875,
0.013153076171875,
-0.017120361328125,
-0.00738525390625,
0.00426483154296875,
-0.0027942657470703125,
0.058441162109375,
-0.037628173828125,
-0.04266357421875,
-0.04730224609375,
0.04681396484375,
-0.0158233642578125,
0.03692626953125,
-0.01279449462890625,
-0.017730712890625,
0.035858154296875,
0.024658203125,
0.0308990478515625,
-0.0242156982421875,
-0.00803375244140625,
-0.0175323486328125,
0.01220703125,
-0.032470703125,
-0.0550537109375,
0.0660400390625,
-0.031005859375,
-0.0284423828125,
0.0384521484375,
-0.034698486328125,
-0.0155029296875,
-0.07684326171875,
0.007450103759765625,
-0.00675201416015625,
0.0430908203125,
-0.019256591796875,
-0.02178955078125,
-0.0221405029296875,
-0.002071380615234375,
-0.0187835693359375,
0.034759521484375,
-0.0357666015625,
0.0147247314453125,
-0.0271759033203125,
-0.007328033447265625,
0.03216552734375,
0.033599853515625,
-0.001728057861328125,
-0.042999267578125,
0.0408935546875,
-0.04144287109375,
-0.048919677734375,
0.01093292236328125,
-0.01100921630859375,
0.05816650390625,
0.0134429931640625,
0.0177001953125,
0.0084686279296875,
-0.0042572021484375,
0.00788116455078125,
-0.03546142578125,
-0.01003265380859375,
-0.0667724609375,
0.01337432861328125,
0.048980712890625,
-0.0082855224609375,
0.0140838623046875,
0.0181121826171875,
-0.0001760721206665039,
-0.00267791748046875,
0.01482391357421875,
0.02410888671875,
-0.01502227783203125,
0.0195770263671875,
0.0202789306640625,
-0.01355743408203125,
-0.03106689453125,
0.006473541259765625,
0.00882720947265625,
-0.0271148681640625,
0.01336669921875,
0.07470703125,
0.0201873779296875,
0.01568603515625,
-0.0086822509765625,
0.020294189453125,
-0.0259246826171875,
-0.0255126953125,
0.03387451171875,
-0.0281219482421875,
-0.060028076171875,
-0.00502777099609375,
-0.0278167724609375,
0.002597808837890625,
0.044891357421875,
0.0168914794921875,
-0.015655517578125,
-0.006191253662109375,
-0.057037353515625,
-0.002864837646484375,
-0.033294677734375,
-0.06951904296875,
0.01849365234375,
0.08770751953125,
0.0382080078125,
-0.0220184326171875,
0.01934814453125,
0.060760498046875,
0.0692138671875,
0.0198211669921875,
-0.0018825531005859375,
0.017425537109375,
0.0095367431640625,
-0.01012420654296875,
-0.0023174285888671875,
-0.031402587890625,
-0.004161834716796875,
0.0311737060546875,
0.0660400390625,
-0.0240325927734375,
-0.0258026123046875,
0.06646728515625,
0.027008056640625,
-0.0289459228515625,
0.01800537109375,
-0.035247802734375,
0.050201416015625,
0.0360107421875,
-0.027557373046875,
-0.02301025390625,
-0.0384521484375,
0.05499267578125,
-0.00482177734375,
0.03265380859375,
-0.03973388671875,
0.0037746429443359375,
-0.019805908203125,
0.02093505859375,
0.0214996337890625,
-0.044403076171875,
0.0009474754333496094,
-0.043548583984375,
0.0074310302734375,
0.040069580078125,
-0.0161895751953125,
-0.0716552734375,
-0.0379638671875,
-0.0003795623779296875,
-0.01515960693359375,
0.0328369140625,
-0.0103759765625,
-0.0050201416015625,
-0.0282440185546875,
-0.0552978515625,
-0.026824951171875,
-0.0159912109375,
0.0289764404296875,
0.0248870849609375,
0.00521087646484375,
-0.01036834716796875,
-0.0178985595703125,
0.038330078125,
-0.050140380859375,
-0.054595947265625,
-0.007251739501953125,
-0.0197296142578125,
0.036712646484375,
-0.00420379638671875,
0.035125732421875,
-0.0184478759765625,
-0.0101776123046875,
-0.00472259521484375,
-0.0043792724609375,
-0.01332855224609375,
-0.0107879638671875,
-0.00969696044921875,
-0.0016164779663085938,
0.029205322265625,
-0.00749969482421875,
0.05657958984375,
-0.0162811279296875,
0.0170440673828125,
0.032806396484375,
-0.0227203369140625,
-0.01456451416015625,
0.002185821533203125,
-0.05682373046875,
0.025299072265625,
0.047027587890625,
0.0276031494140625,
0.0310211181640625,
0.0227203369140625,
0.036376953125,
0.045440673828125,
0.0133209228515625,
0.04046630859375,
-0.013671875,
0.034881591796875,
0.0789794921875,
-0.0084686279296875,
0.0034027099609375,
0.003269195556640625,
-0.0018262863159179688,
0.0125274658203125,
0.0347900390625,
-0.007843017578125,
0.0058135986328125,
-0.0081024169921875,
0.007114410400390625,
-0.005550384521484375,
-0.007244110107421875,
0.026275634765625,
-0.026519775390625,
0.032928466796875,
-0.010467529296875,
0.0140533447265625,
0.000606536865234375,
-0.01314544677734375,
0.013153076171875,
0.013092041015625,
-0.0609130859375,
-0.0022335052490234375,
0.02301025390625,
0.05328369140625,
0.01788330078125,
-0.0384521484375,
-0.0244140625,
0.058258056640625,
0.03106689453125,
-0.0193023681640625,
-0.003765106201171875,
0.0167236328125,
-0.01708984375,
-0.0017232894897460938,
-0.01226806640625,
0.0241241455078125,
-0.0143280029296875,
0.00534820556640625,
-0.02716064453125,
0.0227813720703125,
0.0030117034912109375,
-0.0487060546875,
0.07403564453125,
-0.030792236328125,
-0.0357666015625,
0.0029964447021484375,
-0.0112762451171875,
0.01044464111328125,
-0.01161956787109375,
0.0007967948913574219,
0.0494384765625,
0.035675048828125,
-0.023529052734375,
0.002483367919921875,
-0.010009765625,
-0.00917816162109375,
0.0127105712890625,
0.004741668701171875,
-0.03411865234375,
0.01425933837890625,
0.05084228515625,
0.020751953125,
0.044281005859375,
-0.0254364013671875,
-0.0211181640625,
-0.0214996337890625,
0.0098114013671875,
-0.0406494140625,
-0.04754638671875,
-0.0020599365234375,
-0.061767578125,
-0.002605438232421875,
-0.0274505615234375,
-0.0307464599609375,
0.011016845703125,
0.000888824462890625,
0.0014829635620117188,
-0.0323486328125,
-0.0164947509765625,
-0.01398468017578125,
-0.057464599609375,
-0.0421142578125,
-0.0121612548828125,
-0.00945281982421875,
0.00031876564025878906,
0.0088043212890625,
0.0086669921875,
0.0010786056518554688,
-0.00963592529296875,
-0.0016889572143554688,
0.01190948486328125,
-0.01105499267578125,
-0.0215606689453125,
-0.0413818359375,
0.02642822265625,
0.01432037353515625,
0.00719451904296875,
-0.034210205078125,
0.0006203651428222656,
0.01319122314453125,
-0.01340484619140625,
0.00428009033203125,
-0.01959228515625,
0.0286102294921875,
-0.00479888916015625,
-0.031463623046875,
0.01409912109375,
0.03253173828125,
-0.034393310546875,
0.052520751953125,
0.006900787353515625,
-0.006687164306640625,
0.002262115478515625,
-0.0221405029296875,
-0.0298919677734375,
0.0467529296875,
-0.057159423828125,
0.0125732421875,
0.0224456787109375,
0.0222625732421875,
-0.0010089874267578125,
-0.01302337646484375,
-0.0100860595703125,
-0.00873565673828125,
0.00513458251953125,
0.009857177734375,
-0.0239105224609375,
-0.023773193359375,
-0.024017333984375,
-0.00679779052734375,
-0.0174560546875,
-0.0174560546875,
-0.020233154296875,
0.00018656253814697266,
0.041351318359375,
0.0241851806640625,
0.0604248046875,
-0.0295562744140625,
-0.039398193359375,
-0.0311126708984375,
0.08099365234375,
-0.04681396484375,
-0.00826263427734375,
0.0361328125,
0.00836944580078125,
-0.058197021484375,
0.01358795166015625,
-0.1158447265625,
0.0011835098266601562,
0.014556884765625,
-0.01439666748046875,
-0.0214080810546875,
0.0021152496337890625,
-0.0006694793701171875,
-0.039581298828125,
0.0190582275390625,
-0.03240966796875,
0.005924224853515625,
0.0030651092529296875,
0.02642822265625,
-0.02679443359375,
0.01235198974609375,
-0.03155517578125,
0.024505615234375,
-0.0362548828125,
-0.10028076171875,
-0.0175323486328125,
-0.03875732421875,
0.0882568359375,
0.022613525390625,
-0.01099395751953125,
-0.035247802734375,
0.037353515625,
0.00860595703125,
0.0035495758056640625,
0.0157012939453125,
-0.0224609375,
0.09759521484375,
0.037078857421875,
0.01267242431640625,
0.0280609130859375,
-0.0210113525390625,
-0.044219970703125,
-0.032257080078125,
-0.0160369873046875,
-0.0219879150390625,
-0.00548553466796875,
-0.00862884521484375,
0.0034046173095703125,
-0.03192138671875,
-0.0295867919921875,
0.0086517333984375,
0.0281829833984375,
-0.01548004150390625,
0.043365478515625,
-0.024444580078125,
-0.0239410400390625,
0.007549285888671875,
0.01334381103515625,
-0.0270538330078125,
-0.00228118896484375,
-0.0030918121337890625,
0.0286102294921875,
-0.0095672607421875,
0.0259246826171875,
0.0229949951171875,
0.0222625732421875,
-0.0196380615234375,
0.0158233642578125,
-0.0107574462890625,
-0.0190582275390625,
0.04864501953125,
-0.005908966064453125,
0.040313720703125,
-0.009735107421875,
0.040008544921875,
-0.0268096923828125,
-0.0303802490234375,
0.0487060546875,
-0.01255035400390625,
-0.049591064453125,
-0.01337432861328125,
0.01291656494140625,
-0.0199127197265625,
0.020111083984375,
0.0227508544921875,
-0.0171966552734375,
0.030670166015625,
0.00585174560546875,
-0.06463623046875,
0.032684326171875,
-0.07513427734375,
0.0171661376953125,
0.0190582275390625,
0.0020427703857421875,
0.04315185546875,
0.007259368896484375,
-0.004302978515625,
0.026641845703125,
-0.005062103271484375,
0.006801605224609375,
0.0162506103515625,
0.02386474609375,
-0.00933074951171875,
0.0174407958984375,
-0.01953125,
0.10455322265625,
-0.0013208389282226562,
-0.06939697265625,
0.065185546875,
-0.011138916015625,
0.02325439453125,
0.053558349609375,
-0.0006480216979980469,
0.0229034423828125,
-0.045135498046875,
-0.01763916015625,
0.00222015380859375,
-0.034576416015625,
-0.058929443359375,
-0.022125244140625,
-0.017425537109375,
-0.005863189697265625,
0.00040602684020996094,
0.0625,
0.021881103515625,
0.028472900390625,
0.0305633544921875,
-0.0494384765625,
0.0694580078125,
0.044921875,
0.0161590576171875,
0.0184173583984375,
0.0032329559326171875,
-0.0266265869140625,
0.0160980224609375,
-0.030242919921875,
-0.0121307373046875,
-0.0401611328125,
0.0171661376953125,
0.00750732421875,
-0.019805908203125,
0.0308380126953125,
0.006908416748046875,
0.0180816650390625,
0.0004887580871582031,
0.0283660888671875,
-0.0389404296875,
-0.056121826171875,
-0.0307159423828125,
0.00908660888671875,
0.035003662109375,
-0.041107177734375,
0.025604248046875,
-0.01558685302734375,
-0.02484130859375,
-0.01462554931640625,
0.0112762451171875,
0.0016641616821289062,
-0.061309814453125,
-0.062469482421875,
-0.056549072265625,
-0.04278564453125,
0.020355224609375,
0.014495849609375,
0.0269012451171875,
-0.036956787109375,
-0.04827880859375,
0.047119140625,
0.00159454345703125,
-0.026153564453125,
-0.031768798828125,
0.0089874267578125,
-0.056488037109375,
-0.0182952880859375,
0.041717529296875,
-0.00511932373046875,
-0.04522705078125,
-0.0004589557647705078,
-0.036346435546875,
0.00426483154296875,
0.0136566162109375,
-0.0189208984375,
-0.034423828125,
-0.02197265625,
0.047882080078125,
0.036376953125,
-0.00847625732421875,
-0.0684814453125,
-0.016693115234375,
-0.0148162841796875,
0.024322509765625,
0.045806884765625,
-0.0032291412353515625,
0.05694580078125,
-0.007266998291015625,
0.059417724609375,
0.020294189453125,
0.02606201171875,
-0.026275634765625,
-0.03094482421875,
0.0023021697998046875,
0.05706787109375,
0.0009479522705078125,
-0.0271759033203125,
0.0253753662109375,
-0.03131103515625,
0.09356689453125,
-0.01345062255859375,
-0.045562744140625,
0.00958251953125,
0.002574920654296875,
-0.01555633544921875,
0.056396484375,
0.049163818359375,
-0.02166748046875,
-0.03369140625,
-0.0013952255249023438,
-0.017608642578125,
-0.0000010132789611816406,
0.043487548828125,
-0.0523681640625,
0.003940582275390625,
-0.04736328125,
-0.0177764892578125,
-0.037078857421875,
0.04486083984375,
0.0294342041015625,
-0.01285552978515625,
0.0288543701171875,
0.0156707763671875,
0.006694793701171875,
0.01378631591796875,
0.038665771484375,
-0.044708251953125,
-0.036285400390625,
0.035247802734375,
0.01352691650390625,
-0.039947509765625,
-0.003082275390625,
-0.034149169921875,
0.0088958740234375,
0.0770263671875,
0.050750732421875,
-0.10028076171875,
0.017333984375,
-0.022064208984375,
0.01337432861328125,
0.03289794921875,
0.0200347900390625,
0.0009927749633789062,
0.004550933837890625,
0.0002180337905883789,
-0.00981903076171875,
-0.0165863037109375,
0.004268646240234375,
0.007110595703125,
-0.01291656494140625,
-0.045257568359375,
0.012481689453125,
0.013824462890625,
-0.034332275390625,
0.050506591796875,
0.00278472900390625,
0.02117919921875,
-0.01812744140625,
0.0037555694580078125,
-0.004673004150390625,
-0.002716064453125,
-0.0273895263671875,
0.0303955078125,
-0.03765869140625,
0.0215606689453125,
0.015655517578125,
-0.01274871826171875,
0.0633544921875,
0.01331329345703125,
0.01702880859375,
-0.018585205078125,
-0.0161590576171875,
0.02142333984375,
-0.03173828125,
-0.033599853515625,
0.0290985107421875,
0.041656494140625,
-0.056640625,
0.0333251953125,
-0.015777587890625,
-0.018463134765625,
-0.02081298828125,
-0.055389404296875,
0.05999755859375,
-0.0186614990234375,
-0.0157470703125,
0.00945281982421875,
0.049713134765625,
-0.0019521713256835938,
-0.0219573974609375,
0.01125335693359375,
-0.050048828125,
-0.035430908203125,
-0.02142333984375,
-0.044464111328125,
0.037841796875,
-0.0238494873046875,
-0.055511474609375,
0.046905517578125,
-0.031646728515625,
0.051666259765625,
0.0169677734375,
-0.012969970703125,
0.00917816162109375,
-0.0186309814453125,
-0.0297393798828125,
0.0633544921875,
-0.033477783203125,
0.048126220703125,
-0.043975830078125,
-0.007205963134765625,
0.0187225341796875,
0.024871826171875,
-0.006130218505859375,
0.015380859375,
-0.02813720703125,
-0.007411956787109375,
-0.029449462890625,
-0.00881195068359375,
-0.00702667236328125,
0.056976318359375,
-0.01023101806640625,
0.03131103515625,
0.025543212890625,
-0.004993438720703125,
0.026275634765625,
0.0198516845703125,
-0.0732421875,
0.0239410400390625,
0.01313018798828125,
-0.0124664306640625,
-0.0029087066650390625,
0.060394287109375,
-0.055419921875,
0.005695343017578125,
0.04058837890625,
0.006313323974609375,
0.021148681640625,
0.01331329345703125,
0.03790283203125,
-0.0199737548828125,
0.0194854736328125,
-0.019927978515625,
0.044219970703125,
0.0189361572265625,
-0.00197601318359375,
0.064697265625,
0.0261077880859375,
-0.038360595703125,
0.019561767578125,
0.007007598876953125,
0.0023555755615234375,
-0.004703521728515625,
0.03411865234375,
0.056549072265625,
0.0312347412109375,
0.00879669189453125,
0.0440673828125,
0.037353515625,
0.0423583984375,
-0.040679931640625,
-0.00022590160369873047,
0.01424407958984375,
0.0255126953125,
0.01522064208984375,
0.00677490234375,
0.059356689453125,
-0.0252685546875,
0.0009851455688476562,
-0.02276611328125,
-0.00644683837890625,
-0.003551483154296875,
-0.00701141357421875,
0.00199127197265625,
-0.005031585693359375,
0.004993438720703125,
0.0177764892578125,
0.005985260009765625,
-0.0100555419921875,
-0.0087432861328125,
-0.0154876708984375,
0.01084136962890625,
-0.0104217529296875,
0.0010824203491210938,
0.01395416259765625,
0.004177093505859375,
-0.030029296875,
-0.03094482421875,
0.0022983551025390625,
0.006122589111328125,
0.0007801055908203125,
-0.0197601318359375,
0.03533935546875,
0.006206512451171875,
-0.01276397705078125,
-0.005718231201171875,
0.045440673828125,
0.01090240478515625,
-0.02117919921875,
0.02587890625,
0.00559234619140625,
0.02813720703125,
-0.000023245811462402344,
0.003597259521484375,
-0.0123291015625,
-0.01047515869140625,
-0.04510498046875,
0.036376953125,
0.034759521484375,
-0.0194549560546875,
0.07867431640625,
0.0032711029052734375,
0.007083892822265625,
0.0018930435180664062,
-0.00655364990234375,
0.03997802734375,
0.016265869140625,
-0.048736572265625,
0.0138092041015625,
-0.040313720703125,
-0.036346435546875,
0.01020050048828125,
0.0283660888671875,
-0.0003859996795654297,
0.02264404296875,
0.03729248046875,
-0.032470703125,
0.0279388427734375,
0.01381683349609375,
0.00011873245239257812,
-0.023651123046875,
0.0261688232421875,
-0.006961822509765625,
-0.06671142578125,
-0.0258941650390625,
-0.034942626953125,
0.01280975341796875,
0.028717041015625,
0.052215576171875,
0.004421234130859375,
0.034210205078125,
-0.0112457275390625,
0.01666259765625,
-0.031494140625,
-0.0285186767578125,
0.046295166015625,
-0.006847381591796875,
-0.006969451904296875,
0.0017900466918945312,
-0.0258331298828125,
0.06884765625,
-0.0037059783935546875,
0.05316162109375,
0.0565185546875,
-0.0367431640625,
0.0087432861328125,
0.01226043701171875,
0.0172119140625,
-0.0112762451171875,
-0.03564453125,
-0.05401611328125,
-0.0036640167236328125,
0.040313720703125,
0.029266357421875,
-0.032867431640625,
0.02587890625,
-0.0333251953125,
-0.0390625,
-0.0162506103515625,
-0.0105743408203125,
-0.048248291015625,
0.0077972412109375,
0.01436614990234375,
0.0272216796875,
0.002696990966796875,
-0.022979736328125,
-0.0005292892456054688,
0.0129547119140625,
-0.0390625,
0.00621795654296875,
-0.048004150390625,
0.06561279296875,
0.043609619140625,
0.06597900390625,
0.00281524658203125,
-0.00580596923828125,
0.028594970703125,
0.005580902099609375,
-0.01052093505859375,
-0.0648193359375,
-0.0299835205078125,
-0.043731689453125,
0.0100860595703125,
0.0186920166015625,
-0.0125885009765625,
-0.009429931640625,
-0.02001953125,
0.01259613037109375,
0.00823211669921875,
-0.0052490234375,
-0.03729248046875,
0.033203125,
-0.01140594482421875,
0.0130157470703125,
-0.032684326171875,
-0.017730712890625,
-0.0008382797241210938,
0.0233306884765625,
-0.0224456787109375,
-0.0014562606811523438,
-0.02911376953125,
0.0119171142578125,
0.0017309188842773438,
0.02099609375,
0.04144287109375,
-0.0098419189453125,
-0.0526123046875,
0.03448486328125,
-0.00513458251953125,
0.0755615234375,
-0.044403076171875,
-0.0189056396484375,
0.00597381591796875,
0.025665283203125,
0.01528167724609375,
-0.03204345703125,
-0.0192413330078125,
0.01244354248046875,
0.0170135498046875,
-0.0137481689453125,
-0.006214141845703125,
0.00612640380859375,
-0.0428466796875,
-0.07843017578125,
-0.005481719970703125,
-0.004974365234375,
-0.04595947265625,
-0.048431396484375,
0.06298828125,
0.0276947021484375,
-0.050506591796875,
-0.020721435546875,
-0.0235137939453125,
0.003749847412109375,
0.005489349365234375,
0.01052093505859375,
0.0367431640625,
0.02734375,
0.0084686279296875,
-0.055938720703125,
-0.024932861328125,
-0.03985595703125,
0.01392364501953125,
0.007556915283203125,
0.0158843994140625,
-0.001079559326171875,
0.0231170654296875,
-0.03607177734375,
-0.003307342529296875,
-0.0248870849609375,
-0.00910186767578125,
-0.05169677734375,
-0.0296783447265625,
0.014892578125,
0.0191802978515625,
0.08074951171875,
0.028564453125,
0.0069580078125,
-0.045166015625,
-0.055389404296875,
-0.0660400390625,
0.0027008056640625,
-0.0045318603515625,
0.00951385498046875,
-0.05584716796875,
0.0215911865234375,
0.01995849609375,
-0.0193328857421875,
-0.0548095703125,
0.0037174224853515625,
-0.072021484375,
-0.00615692138671875,
0.00591278076171875,
0.024169921875,
-0.018524169921875,
0.004241943359375,
0.043426513671875,
-0.05841064453125,
-0.08270263671875,
0.0299530029296875,
-0.012359619140625,
-0.039154052734375,
-0.023712158203125,
0.0310821533203125,
-0.0088348388671875,
-0.020477294921875,
0.0300750732421875,
0.0240020751953125,
0.0124969482421875,
-0.02056884765625,
-0.03656005859375,
-0.0262298583984375,
0.0021648406982421875,
0.004772186279296875,
0.00716400146484375,
0.030914306640625,
-0.0131072998046875,
0.0106964111328125,
0.005870819091796875,
-0.004932403564453125,
0.016143798828125,
-0.019622802734375,
0.032257080078125,
0.0278167724609375,
-0.0299224853515625,
0.041656494140625,
-0.004261016845703125,
-0.0092620849609375,
-0.04705810546875,
0.00716400146484375,
-0.07440185546875,
0.053741455078125,
-0.00676727294921875,
-0.0138397216796875,
0.05181884765625
] |
a865bbaa0f790cd268ae2f3184372d295a4d09e6
|
Wordpress Stackexchange
Q: Get all posts containing a shortcode I'm writing a WP plugin that involves using shortcode. One of the missions is to display all (publish) posts that contain my shortcode regardless of their post type. Is there a built-in function for this?
Thanks in advance.
A: WordPress isn't aware of your shortcode until it's rendered on the front end. So when WP sees it in the content and replaces it, that's when it's aware that your shortcode exists. It also promptly forgets about it afterward, of course.
So there's no built in function to do what you're asking. The best you can do is probably write a LIKE query which may or may not be a good idea.
<?php
function wpse87582_find_shortcode_posts()
{
global $wpdb;
return $wpdb->get_results("SELECT ID FROM {$wpdb->posts} WHERE post_content LIKE '%[your_shortcode_here%'", ARRAY_N);
}
|
Q: Get all posts containing a shortcode I'm writing a WP plugin that involves using shortcode. One of the missions is to display all (publish) posts that contain my shortcode regardless of their post type. Is there a built-in function for this?
Thanks in advance.
A: WordPress isn't aware of your shortcode until it's rendered on the front end. So when WP sees it in the content and replaces it, that's when it's aware that your shortcode exists. It also promptly forgets about it afterward, of course.
So there's no built in function to do what you're asking. The best you can do is probably write a LIKE query which may or may not be a good idea.
<?php
function wpse87582_find_shortcode_posts()
{
global $wpdb;
return $wpdb->get_results("SELECT ID FROM {$wpdb->posts} WHERE post_content LIKE '%[your_shortcode_here%'", ARRAY_N);
}
|
wordpress
|
{
"language": "en",
"length": 135,
"provenance": "stackexchange_00019.jsonl.gz:429251",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87582"
}
|
[
0.03509521484375,
-0.01422882080078125,
0.0259552001953125,
0.041656494140625,
-0.0186004638671875,
-0.0272369384765625,
0.0733642578125,
-0.056976318359375,
-0.0130615234375,
0.04010009765625,
-0.04937744140625,
0.00908660888671875,
-0.04608154296875,
0.0065460205078125,
-0.0214996337890625,
-0.052490234375,
0.04388427734375,
-0.0101776123046875,
0.0286865234375,
-0.00850677490234375,
0.0092010498046875,
0.0220489501953125,
0.005886077880859375,
0.05364990234375,
0.0065155029296875,
-0.0237274169921875,
0.09979248046875,
-0.007049560546875,
0.0033321380615234375,
-0.02874755859375,
0.018280029296875,
0.004787445068359375,
0.031585693359375,
0.0016574859619140625,
-0.034149169921875,
0.0372314453125,
-0.025115966796875,
-0.0021381378173828125,
-0.016571044921875,
0.0264129638671875,
0.0223541259765625,
-0.020904541015625,
0.03509521484375,
0.00027751922607421875,
-0.0007500648498535156,
-0.01776123046875,
0.0257720947265625,
-0.04156494140625,
-0.004169464111328125,
0.00479888916015625,
0.0297393798828125,
0.0204010009765625,
0.045318603515625,
-0.04022216796875,
-0.0245513916015625,
-0.0011873245239257812,
-0.022186279296875,
-0.006824493408203125,
0.039794921875,
-0.03973388671875,
-0.038818359375,
-0.042999267578125,
0.045440673828125,
-0.0183868408203125,
-0.00705718994140625,
0.0234375,
0.0023956298828125,
0.003406524658203125,
-0.021240234375,
0.0079498291015625,
0.0264129638671875,
-0.03839111328125,
-0.022247314453125,
0.0018529891967773438,
-0.0027103424072265625,
0.0004146099090576172,
0.0177154541015625,
0.00858306884765625,
-0.0037631988525390625,
0.0325927734375,
-0.002285003662109375,
-0.022247314453125,
-0.04461669921875,
0.0042877197265625,
-0.0203857421875,
0.0028400421142578125,
0.0006566047668457031,
-0.0024127960205078125,
-0.03790283203125,
-0.0218048095703125,
-0.034393310546875,
-0.00492095947265625,
-0.055267333984375,
0.007320404052734375,
-0.01424407958984375,
-0.01708984375,
0.01532745361328125,
0.0711669921875,
-0.0199127197265625,
0.03021240234375,
-0.035308837890625,
-0.0269622802734375,
0.0303497314453125,
-0.05078125,
0.007205963134765625,
0.01505279541015625,
-0.00978851318359375,
-0.01287078857421875,
0.041595458984375,
0.042388916015625,
0.0014858245849609375,
0.012054443359375,
-0.035858154296875,
-0.001922607421875,
-0.02764892578125,
0.0379638671875,
-0.060821533203125,
-0.0031280517578125,
-0.024932861328125,
0.01104736328125,
0.015777587890625,
0.0173797607421875,
0.0166015625,
-0.034210205078125,
-0.0246429443359375,
-0.03790283203125,
-0.030548095703125,
-0.042144775390625,
0.033233642578125,
0.0074005126953125,
-0.0220947265625,
0.008636474609375,
0.0307159423828125,
0.0017480850219726562,
0.00423431396484375,
-0.0196533203125,
-0.027557373046875,
0.0169219970703125,
0.021209716796875,
-0.0157318115234375,
-0.0005331039428710938,
-0.0179901123046875,
0.0172576904296875,
0.01416778564453125,
0.007442474365234375,
0.01206207275390625,
0.026611328125,
0.0279388427734375,
-0.010650634765625,
-0.041656494140625,
-0.003570556640625,
0.0362548828125,
0.0455322265625,
-0.007747650146484375,
0.0269927978515625,
-0.0306396484375,
0.07293701171875,
-0.04974365234375,
-0.0306243896484375,
-0.047882080078125,
0.043701171875,
-0.00930023193359375,
-0.0170440673828125,
0.0145416259765625,
-0.03143310546875,
0.00864410400390625,
-0.036163330078125,
-0.011688232421875,
0.0251312255859375,
0.00437164306640625,
0.01436614990234375,
-0.01296234130859375,
-0.020233154296875,
0.0259552001953125,
0.01175689697265625,
0.017974853515625,
-0.02532958984375,
0.00457000732421875,
0.042022705078125,
0.0155792236328125,
-0.0019083023071289062,
-0.0225372314453125,
0.048065185546875,
0.01152801513671875,
-0.0791015625,
0.034027099609375,
0.0269012451171875,
0.08294677734375,
0.00675201416015625,
0.0208587646484375,
0.05340576171875,
0.01520538330078125,
0.000035762786865234375,
-0.01137542724609375,
0.006519317626953125,
-0.00945281982421875,
-0.043182373046875,
-0.007045745849609375,
-0.01334381103515625,
0.0003719329833984375,
0.0103759765625,
-0.02301025390625,
0.0205230712890625,
-0.0079193115234375,
-0.0292816162109375,
-0.01395416259765625,
-0.0165557861328125,
0.006561279296875,
0.0259246826171875,
-0.01020050048828125,
0.00620269775390625,
-0.006862640380859375,
-0.0192718505859375,
-0.01245880126953125,
-0.049896240234375,
0.0220489501953125,
-0.03924560546875,
0.006206512451171875,
-0.00112152099609375,
0.03271484375,
0.01116943359375,
-0.01483917236328125,
-0.00726318359375,
0.0102081298828125,
0.02606201171875,
0.0126190185546875,
-0.01123046875,
-0.003963470458984375,
-0.0022563934326171875,
0.0295257568359375,
-0.0692138671875,
-0.01099395751953125,
-0.0098114013671875,
-0.006900787353515625,
-0.0560302734375,
-0.01496124267578125,
-0.030670166015625,
-0.0101165771484375,
0.0099029541015625,
0.05126953125,
0.0509033203125,
0.045196533203125,
0.036651611328125,
0.0020885467529296875,
0.09130859375,
-0.01715087890625,
0.0293426513671875,
-0.04180908203125,
0.0287628173828125,
0.09527587890625,
0.0027294158935546875,
0.026763916015625,
-0.016387939453125,
-0.0322265625,
0.016998291015625,
0.04296875,
0.0016918182373046875,
0.039031982421875,
-0.019287109375,
0.00726318359375,
-0.0128631591796875,
-0.0186614990234375,
0.011322021484375,
-0.038818359375,
0.062286376953125,
0.00597381591796875,
0.0400390625,
0.0343017578125,
-0.039154052734375,
0.025543212890625,
0.00954437255859375,
-0.0112152099609375,
0.0010747909545898438,
0.058074951171875,
0.0224761962890625,
0.0194091796875,
-0.04229736328125,
-0.0220947265625,
0.0291595458984375,
0.04058837890625,
0.008819580078125,
0.0276641845703125,
-0.0307159423828125,
-0.019073486328125,
0.0165863037109375,
-0.0300445556640625,
-0.016693115234375,
0.01412200927734375,
0.0084075927734375,
0.01336669921875,
-0.0025348663330078125,
0.07659912109375,
-0.006420135498046875,
0.05718994140625,
0.03594970703125,
0.030670166015625,
0.0201568603515625,
-0.07122802734375,
0.053070068359375,
-0.0428466796875,
0.0263671875,
0.07373046875,
-0.00760650634765625,
0.022216796875,
-0.0007023811340332031,
-0.006809234619140625,
-0.0209808349609375,
0.0033283233642578125,
-0.00768280029296875,
0.006290435791015625,
-0.06561279296875,
0.040924072265625,
0.035400390625,
0.08184814453125,
-0.0138092041015625,
-0.046722412109375,
-0.00948333740234375,
0.04296875,
-0.08203125,
-0.07452392578125,
0.01244354248046875,
-0.03167724609375,
-0.015869140625,
-0.02581787109375,
-0.01259613037109375,
0.0164947509765625,
-0.020660400390625,
0.0023746490478515625,
0.0017175674438476562,
0.000812530517578125,
-0.039093017578125,
-0.032318115234375,
-0.068603515625,
-0.017791748046875,
-0.00263214111328125,
0.022003173828125,
0.01043701171875,
0.04827880859375,
0.0212554931640625,
-0.0579833984375,
0.01141357421875,
0.055267333984375,
-0.0406494140625,
-0.00392913818359375,
0.0206451416015625,
-0.03265380859375,
-0.0130157470703125,
0.0019197463989257812,
-0.061798095703125,
0.00839996337890625,
0.0076751708984375,
-0.01045989990234375,
-0.0005998611450195312,
-0.0140228271484375,
0.03558349609375,
0.0168304443359375,
-0.0247802734375,
0.021392822265625,
0.05474853515625,
-0.032196044921875,
0.0197906494140625,
-0.0124053955078125,
-0.0251922607421875,
0.002101898193359375,
-0.004405975341796875,
-0.009552001953125,
0.00689697265625,
-0.006427764892578125,
0.04766845703125,
0.01461029052734375,
0.025238037109375,
0.004428863525390625,
0.056671142578125,
0.006389617919921875,
0.047149658203125,
-0.06610107421875,
0.00792694091796875,
-0.020660400390625,
0.00876617431640625,
-0.0070648193359375,
0.01345062255859375,
-0.0126953125,
0.0113677978515625,
-0.033538818359375,
-0.0299224853515625,
0.058563232421875,
0.0178680419921875,
0.043609619140625,
-0.050537109375,
-0.04571533203125,
-0.02056884765625,
0.12054443359375,
0.00005066394805908203,
-0.0029163360595703125,
-0.013916015625,
-0.0126190185546875,
-0.0017547607421875,
-0.045074462890625,
-0.04022216796875,
-0.0176239013671875,
-0.0679931640625,
0.0214385986328125,
-0.01544189453125,
-0.0013475418090820312,
-0.019012451171875,
0.01287841796875,
-0.036102294921875,
-0.0277252197265625,
0.0222015380859375,
-0.01983642578125,
0.04205322265625,
-0.0221710205078125,
0.0214691162109375,
-0.0316162109375,
-0.00795745849609375,
-0.03179931640625,
-0.0265045166015625,
0.0012302398681640625,
0.0037479400634765625,
0.018798828125,
0.026397705078125,
-0.055908203125,
-0.0059051513671875,
0.0224151611328125,
-0.01134490966796875,
0.03472900390625,
-0.01531982421875,
0.0193023681640625,
-0.02410888671875,
0.00732421875,
0.008544921875,
-0.0226287841796875,
-0.0048065185546875,
0.025909423828125,
0.021392822265625,
0.04364013671875,
-0.034454345703125,
-0.03289794921875,
-0.008209228515625,
-0.035186767578125,
0.0209197998046875,
-0.0221405029296875,
-0.03021240234375,
0.042938232421875,
-0.05059814453125,
0.02197265625,
-0.04217529296875,
-0.0171966552734375,
0.04034423828125,
0.04925537109375,
-0.0199432373046875,
0.0085296630859375,
0.044769287109375,
0.01482391357421875,
-0.0501708984375,
-0.062744140625,
0.0137481689453125,
0.053924560546875,
0.0035610198974609375,
0.0489501953125,
0.03765869140625,
-0.04144287109375,
0.059814453125,
0.02947998046875,
-0.010101318359375,
-0.0147247314453125,
0.035675048828125,
0.00133514404296875,
0.0009975433349609375,
-0.00687408447265625,
0.0116424560546875,
0.0247650146484375,
0.038116455078125,
-0.00829315185546875,
-0.0186309814453125,
0.0125579833984375,
0.029388427734375,
-0.0268096923828125,
0.0147857666015625,
-0.0196075439453125,
-0.050262451171875,
0.00867462158203125,
0.0304107666015625,
0.007259368896484375,
0.020263671875,
-0.0043792724609375,
0.0247650146484375,
0.033538818359375,
-0.005779266357421875,
0.01873779296875,
0.03131103515625,
0.004665374755859375,
0.054534912109375,
-0.04833984375,
-0.0258331298828125,
-0.00031757354736328125,
0.0035076141357421875,
0.04150390625,
-0.018402099609375,
-0.060546875,
0.00736236572265625,
-0.03656005859375,
-0.044403076171875,
0.005893707275390625,
-0.038421630859375,
0.059906005859375,
0.0770263671875,
-0.0249786376953125,
-0.01751708984375,
-0.053924560546875,
0.030364990234375,
-0.07818603515625,
0.0191802978515625,
-0.0194854736328125,
0.002208709716796875,
0.00492095947265625,
0.03155517578125,
-0.0758056640625,
0.049957275390625,
0.0230255126953125,
0.03497314453125,
0.007549285888671875,
0.02239990234375,
0.012542724609375,
0.0128936767578125,
0.010223388671875,
-0.01422119140625,
-0.01369476318359375,
-0.042449951171875,
0.004634857177734375,
0.00934600830078125,
0.030181884765625,
-0.0051727294921875,
-0.0242462158203125,
0.0299835205078125,
-0.006832122802734375,
-0.0206756591796875,
0.0021114349365234375,
0.0379638671875,
0.026031494140625,
-0.034088134765625,
-0.0125579833984375,
0.035980224609375,
0.06793212890625,
0.005519866943359375,
-0.01074981689453125,
0.00714111328125,
-0.01157379150390625,
0.006420135498046875,
-0.057281494140625,
0.006908416748046875,
0.0212554931640625,
-0.0257568359375,
-0.030670166015625,
-0.0162200927734375,
0.0014524459838867188,
0.004306793212890625,
-0.01161956787109375,
-0.0288848876953125,
0.052337646484375,
-0.0299530029296875,
0.039642333984375,
-0.0003132820129394531,
-0.0218658447265625,
-0.0038967132568359375,
0.01154327392578125,
0.06744384765625,
0.053131103515625,
-0.0276947021484375,
-0.004467010498046875,
-0.030853271484375,
-0.0037021636962890625,
0.053985595703125,
-0.040557861328125,
-0.03912353515625,
-0.039947509765625,
0.00867462158203125,
0.0218353271484375,
0.0037078857421875,
-0.0082855224609375,
0.01035308837890625,
0.01146697998046875,
-0.0182647705078125,
0.04510498046875,
0.0016393661499023438,
0.03887939453125,
0.01213836669921875,
0.0274658203125,
0.0027065277099609375,
0.012176513671875,
-0.01016998291015625,
-0.02685546875,
0.038848876953125,
-0.035888671875,
-0.06878662109375,
-0.0154876708984375,
-0.0188446044921875,
-0.0005207061767578125,
0.0007214546203613281,
-0.0162506103515625,
-0.007541656494140625,
-0.0019283294677734375,
-0.0003476142883300781,
-0.0280914306640625,
0.037017822265625,
0.01284027099609375,
0.00518035888671875,
-0.0113677978515625,
-0.0254058837890625,
-0.02911376953125,
-0.01434326171875,
-0.00972747802734375,
0.0214080810546875,
-0.0036792755126953125,
-0.0022678375244140625,
-0.0082855224609375,
0.003528594970703125,
0.0618896484375,
0.065673828125,
-0.0169677734375,
0.02032470703125,
0.036529541015625,
-0.00904083251953125,
-0.03253173828125,
-0.029022216796875,
0.005340576171875,
-0.008819580078125,
0.0528564453125,
-0.0063323974609375,
-0.029937744140625,
0.047210693359375,
-0.040496826171875,
0.006565093994140625,
0.01230621337890625,
0.035552978515625,
-0.051025390625,
0.0252838134765625,
0.047088623046875,
-0.019561767578125,
-0.036773681640625,
0.0091400146484375,
-0.0223236083984375,
-0.01397705078125,
0.0159149169921875,
-0.040771484375,
-0.0298919677734375,
0.01080322265625,
0.005466461181640625,
-0.00843048095703125,
-0.006237030029296875,
0.0293731689453125,
0.01491546630859375,
-0.00585174560546875,
0.006099700927734375,
0.01285552978515625,
0.0269927978515625,
-0.0254364013671875,
0.005496978759765625,
0.0155029296875,
-0.03546142578125,
-0.05828857421875,
0.0274658203125,
0.00916290283203125,
-0.0265045166015625,
0.0008392333984375,
-0.00021767616271972656,
-0.005558013916015625,
0.06549072265625,
-0.046722412109375,
0.0501708984375,
0.028106689453125,
-0.0032634735107421875,
-0.002254486083984375,
-0.027984619140625,
0.007843017578125,
0.0911865234375,
-0.051605224609375,
0.02838134765625,
0.01274871826171875,
0.00542449951171875,
-0.003940582275390625,
-0.0338134765625,
0.10662841796875,
-0.08782958984375,
0.00878143310546875,
0.004764556884765625,
0.034912109375,
0.0144805908203125,
-0.0304107666015625,
-0.00039386749267578125,
-0.0098724365234375,
0.043060302734375,
-0.0295867919921875,
0.03521728515625,
-0.022369384765625,
-0.0498046875,
-0.064453125,
0.06500244140625,
-0.0101165771484375,
0.0297698974609375,
0.0214996337890625,
0.01384735107421875,
0.0008211135864257812,
-0.005039215087890625,
-0.04571533203125,
0.11639404296875,
0.00122833251953125,
0.04656982421875,
-0.057647705078125,
-0.016448974609375,
0.00981903076171875,
0.046417236328125,
0.060302734375,
0.00965118408203125,
-0.025726318359375,
0.003147125244140625,
0.03961181640625,
0.021240234375,
-0.01666259765625,
0.0245513916015625,
0.0200653076171875,
0.035247802734375,
0.05859375,
-0.03863525390625,
0.027008056640625,
-0.016448974609375,
0.0097198486328125,
0.034942626953125,
0.0030975341796875,
0.00797271728515625,
0.0167999267578125,
-0.011505126953125,
0.00542449951171875,
0.005573272705078125,
-0.01218414306640625,
-0.02484130859375,
-0.020782470703125,
0.053497314453125,
0.021270751953125,
-0.054290771484375,
-0.051727294921875,
-0.03076171875,
0.039642333984375,
-0.004161834716796875,
0.055267333984375,
0.01136016845703125,
0.0158233642578125,
0.06878662109375,
-0.020538330078125,
0.0258026123046875,
0.0207977294921875,
-0.03509521484375,
0.04150390625,
0.0208587646484375,
0.01290130615234375,
-0.05633544921875,
-0.012786865234375,
0.07501220703125,
0.059722900390625,
-0.044586181640625,
-0.04681396484375,
0.0245513916015625,
0.0009622573852539062,
-0.013427734375,
0.020843505859375,
-0.019012451171875,
-0.003631591796875,
0.049957275390625,
0.005329132080078125,
-0.01042938232421875,
0.0011339187622070312,
0.07232666015625,
0.005420684814453125,
-0.0225982666015625,
-0.046966552734375,
-0.03082275390625,
-0.03924560546875,
0.0128173828125,
-0.006305694580078125,
0.038970947265625,
0.0182037353515625,
0.04840087890625,
-0.0445556640625,
-0.0247955322265625,
0.020172119140625,
0.0280303955078125,
-0.005764007568359375,
-0.01385498046875,
-0.02264404296875,
-0.051849365234375,
0.00893402099609375,
0.026641845703125,
0.038055419921875,
-0.0012912750244140625,
0.01910400390625,
0.00555419921875,
-0.032623291015625,
0.00513458251953125,
0.0277099609375,
-0.01222991943359375,
-0.0005207061767578125,
-0.0204315185546875,
-0.00806427001953125,
0.000835418701171875,
-0.0221405029296875,
-0.006870269775390625,
0.0085601806640625,
0.01470184326171875,
-0.0217437744140625,
0.051116943359375,
-0.00292205810546875,
-0.0057220458984375,
0.040313720703125,
0.0139617919921875,
0.035003662109375,
-0.0000597834587097168,
-0.072509765625,
-0.00301361083984375,
-0.046630859375,
-0.0254974365234375,
0.0189971923828125,
0.0304412841796875,
-0.0013990402221679688,
0.01506805419921875,
0.0374755859375,
-0.0227813720703125,
0.004985809326171875,
0.027740478515625,
0.009735107421875,
-0.0222625732421875,
0.019317626953125,
-0.0240325927734375,
-0.055419921875,
-0.03155517578125,
-0.0272369384765625,
0.02484130859375,
0.0325927734375,
0.0170440673828125,
0.017608642578125,
0.0203857421875,
0.00152587890625,
0.002666473388671875,
-0.0157012939453125,
-0.0221405029296875,
0.0361328125,
-0.02313232421875,
-0.0188446044921875,
-0.0118560791015625,
-0.0201416015625,
0.006870269775390625,
0.055572509765625,
-0.0201263427734375,
0.02294921875,
-0.012298583984375,
0.00826263427734375,
-0.04510498046875,
0.01131439208984375,
-0.03271484375,
-0.0275421142578125,
-0.0263519287109375,
-0.0067138671875,
0.005214691162109375,
0.00235748291015625,
0.01334381103515625,
0.009552001953125,
0.0528564453125,
-0.044891357421875,
0.0313720703125,
-0.01154327392578125,
0.048370361328125,
0.044677734375,
0.04876708984375,
0.02655029296875,
-0.0120086669921875,
-0.0173797607421875,
0.00734710693359375,
0.009613037109375,
-0.016998291015625,
-0.0007071495056152344,
-0.053741455078125,
-0.0116119384765625,
0.034637451171875,
0.055816650390625,
-0.00054168701171875,
0.027618408203125,
-0.0112762451171875,
-0.0163421630859375,
-0.023651123046875,
-0.02203369140625,
-0.01300811767578125,
-0.025665283203125,
-0.026519775390625,
0.014495849609375,
-0.0109710693359375,
-0.020751953125,
-0.013580322265625,
-0.0257110595703125,
0.0080718994140625,
0.0017099380493164062,
-0.06707763671875,
0.0096435546875,
0.00859832763671875,
0.04486083984375,
-0.04144287109375,
0.04608154296875,
-0.00232696533203125,
0.0270233154296875,
-0.035614013671875,
-0.0105743408203125,
-0.0131072998046875,
0.016998291015625,
-0.00479888916015625,
0.0294647216796875,
0.041473388671875,
-0.036407470703125,
-0.03240966796875,
0.04345703125,
0.033172607421875,
0.08514404296875,
0.004543304443359375,
-0.0282745361328125,
0.02410888671875,
0.002994537353515625,
-0.01300048828125,
-0.06878662109375,
0.002750396728515625,
-0.039459228515625,
0.0164794921875,
-0.017333984375,
0.0188140869140625,
0.0270233154296875,
-0.02947998046875,
-0.0672607421875,
0.08984375,
-0.0232086181640625,
-0.026519775390625,
-0.0633544921875,
-0.01373291015625,
0.02154541015625,
-0.0263671875,
-0.0224609375,
-0.019805908203125,
-0.07098388671875,
0.03204345703125,
0.003917694091796875,
0.0146026611328125,
0.001983642578125,
0.004009246826171875,
-0.039642333984375,
0.0176849365234375,
-0.0126800537109375,
-0.01416015625,
0.0220184326171875,
-0.026702880859375,
0.045440673828125,
0.050872802734375,
-0.03692626953125,
-0.04034423828125,
-0.0083770751953125,
-0.0118560791015625,
-0.0060577392578125,
-0.048614501953125,
0.0042266845703125,
-0.0052032470703125,
0.0650634765625,
-0.01244354248046875,
0.0260009765625,
-0.0238494873046875,
-0.01189422607421875,
0.00882720947265625,
-0.0161895751953125,
0.007572174072265625,
0.00196075439453125,
0.0065460205078125,
0.03765869140625,
-0.057830810546875,
-0.034332275390625,
-0.0124053955078125,
-0.034942626953125,
-0.05999755859375,
-0.005832672119140625,
-0.05438232421875,
-0.00727081298828125,
-0.020233154296875,
0.019622802734375,
0.023223876953125,
-0.01611328125,
0.027862548828125,
-0.0023593902587890625,
0.001697540283203125,
0.0284881591796875,
0.0239105224609375,
0.004467010498046875,
0.0245819091796875,
0.0074615478515625,
0.0126495361328125,
0.035064697265625,
-0.018890380859375,
0.0099639892578125,
0.00559234619140625,
-0.0088653564453125,
0.025299072265625,
0.0214385986328125,
0.0193328857421875,
-0.018829345703125,
0.0199432373046875,
0.013580322265625,
0.0230255126953125,
-0.006290435791015625,
0.04986572265625,
-0.00293731689453125,
0.057525634765625,
0.00627899169921875,
-0.025665283203125,
0.043304443359375,
-0.05963134765625,
-0.0165557861328125,
0.058349609375,
0.0084991455078125,
-0.0239105224609375,
0.002956390380859375,
0.01111602783203125,
0.0484619140625,
-0.00527191162109375
] |
62c72f238f468e22264ab14d3ff861253c278d1a
|
Wordpress Stackexchange
Q: WP_Query: query posts by ids from array? I did quite a bit of research but can't figure why this wouldn't work for me?
echo print_r($rel); // Array ( [0] => 63 [1] => 87 )
$args = array(
'post_type' => array( 'post' ),
'orderby' => 'ASC',
'post_in' => $rel
);
$loop = new WP_Query( $args );
I don't get any posts returned? Any ideas how to only get the posts with the ids in the array?
A: You have to use post__in (double underscore) argument, instead of post_in:
echo print_r($rel); // Array ( [0] => 63 [1] => 87 )
$args = array(
'post_type' => array( 'post' ),
'orderby' => 'ASC',
'post__in' => $rel
);
$loop = new WP_Query( $args );
If you are unsure why an argument is not working, copy it's key name from manual and past it into you snippet.
|
Q: WP_Query: query posts by ids from array? I did quite a bit of research but can't figure why this wouldn't work for me?
echo print_r($rel); // Array ( [0] => 63 [1] => 87 )
$args = array(
'post_type' => array( 'post' ),
'orderby' => 'ASC',
'post_in' => $rel
);
$loop = new WP_Query( $args );
I don't get any posts returned? Any ideas how to only get the posts with the ids in the array?
A: You have to use post__in (double underscore) argument, instead of post_in:
echo print_r($rel); // Array ( [0] => 63 [1] => 87 )
$args = array(
'post_type' => array( 'post' ),
'orderby' => 'ASC',
'post__in' => $rel
);
$loop = new WP_Query( $args );
If you are unsure why an argument is not working, copy it's key name from manual and past it into you snippet.
|
wordpress
|
{
"language": "en",
"length": 144,
"provenance": "stackexchange_00019.jsonl.gz:429262",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87613"
}
|
[
0.0428466796875,
0.008941650390625,
0.0187530517578125,
0.0171356201171875,
0.0209503173828125,
-0.0345458984375,
0.08453369140625,
-0.030548095703125,
-0.0084686279296875,
0.03143310546875,
-0.03662109375,
-0.0281524658203125,
-0.03564453125,
-0.0203094482421875,
-0.0269317626953125,
-0.06634521484375,
0.0228118896484375,
-0.0367431640625,
-0.018463134765625,
-0.0264434814453125,
0.013458251953125,
-0.007770538330078125,
0.01409149169921875,
0.048187255859375,
0.032196044921875,
-0.00833892822265625,
0.04974365234375,
-0.0182342529296875,
0.03875732421875,
-0.0016117095947265625,
0.026397705078125,
-0.037841796875,
0.01042938232421875,
-0.006267547607421875,
0.0307464599609375,
0.010986328125,
0.0243377685546875,
-0.0176849365234375,
0.036590576171875,
0.005184173583984375,
0.0038394927978515625,
0.0029163360595703125,
0.006740570068359375,
0.0036449432373046875,
-0.0244598388671875,
-0.0135040283203125,
0.016693115234375,
0.004669189453125,
0.0080718994140625,
-0.036285400390625,
-0.010833740234375,
0.035369873046875,
0.00894927978515625,
-0.02471923828125,
-0.009735107421875,
0.00931549072265625,
0.01485443115234375,
-0.0187225341796875,
0.046051025390625,
-0.043701171875,
-0.044036865234375,
-0.051849365234375,
0.04644775390625,
-0.0069580078125,
-0.006847381591796875,
0.0105743408203125,
0.06536865234375,
0.00205230712890625,
-0.029205322265625,
-0.031280517578125,
0.029754638671875,
-0.005130767822265625,
-0.007648468017578125,
-0.01248931884765625,
-0.0163726806640625,
-0.041839599609375,
0.0297088623046875,
-0.048858642578125,
-0.023773193359375,
0.038726806640625,
-0.006130218505859375,
-0.01061248779296875,
-0.083984375,
0.036041259765625,
-0.02374267578125,
0.0295257568359375,
-0.02337646484375,
-0.01308441162109375,
-0.0230255126953125,
-0.01485443115234375,
-0.012115478515625,
-0.0017023086547851562,
-0.034454345703125,
-0.0016736984252929688,
-0.0084686279296875,
-0.03887939453125,
0.0169525146484375,
0.0421142578125,
-0.0008077621459960938,
0.027740478515625,
-0.04412841796875,
-0.0360107421875,
0.0235748291015625,
-0.039794921875,
0.0092315673828125,
0.02606201171875,
0.0230865478515625,
0.06341552734375,
0.05224609375,
0.029937744140625,
0.016632080078125,
0.03369140625,
0.00908660888671875,
-0.0008411407470703125,
-0.042144775390625,
-0.0026874542236328125,
-0.03009033203125,
-0.00995635986328125,
0.0012655258178710938,
-0.007228851318359375,
0.00009608268737792969,
0.03741455078125,
-0.002330780029296875,
-0.0146026611328125,
0.0112457275390625,
0.013336181640625,
0.02630615234375,
-0.054168701171875,
-0.013916015625,
0.047149658203125,
-0.03411865234375,
0.0011081695556640625,
0.071533203125,
0.009857177734375,
-0.00847625732421875,
-0.038330078125,
-0.01239013671875,
-0.0164642333984375,
0.01416015625,
-0.0153350830078125,
0.0191650390625,
-0.039337158203125,
0.0158843994140625,
0.034515380859375,
0.016357421875,
0.0149993896484375,
0.00948333740234375,
0.006099700927734375,
0.0038585662841796875,
-0.043670654296875,
0.00032401084899902344,
-0.01215362548828125,
0.0208587646484375,
0.01412200927734375,
-0.007335662841796875,
-0.018829345703125,
0.050018310546875,
-0.042999267578125,
-0.0153045654296875,
-0.055633544921875,
-0.0018796920776367188,
0.0117034912109375,
0.0083160400390625,
-0.024383544921875,
-0.02789306640625,
-0.014892578125,
-0.023651123046875,
-0.00690460205078125,
0.0255889892578125,
0.04833984375,
0.0132598876953125,
-0.045166015625,
0.06939697265625,
0.028900146484375,
-0.0265655517578125,
0.02484130859375,
-0.003955841064453125,
-0.0132904052734375,
0.0265045166015625,
0.0148773193359375,
-0.03021240234375,
-0.031219482421875,
0.01113128662109375,
-0.0102996826171875,
-0.07080078125,
0.069091796875,
0.006206512451171875,
0.06573486328125,
0.0032176971435546875,
0.01384735107421875,
0.033111572265625,
0.03411865234375,
-0.041778564453125,
0.05633544921875,
0.007106781005859375,
-0.0426025390625,
-0.017242431640625,
-0.005641937255859375,
-0.00612640380859375,
-0.0173797607421875,
0.01812744140625,
0.0017690658569335938,
0.004138946533203125,
0.004352569580078125,
-0.08056640625,
0.006031036376953125,
-0.0187225341796875,
0.031494140625,
0.00833892822265625,
0.01271820068359375,
0.017852783203125,
0.01312255859375,
-0.036041259765625,
0.0007967948913574219,
-0.037109375,
0.00949859619140625,
-0.03106689453125,
-0.00897216796875,
-0.0131683349609375,
-0.0038013458251953125,
-0.03643798828125,
-0.020294189453125,
-0.037200927734375,
0.0181732177734375,
0.07257080078125,
-0.0217742919921875,
0.00021851062774658203,
-0.0276336669921875,
0.054840087890625,
0.003040313720703125,
-0.039642333984375,
0.01468658447265625,
0.0024166107177734375,
0.05889892578125,
-0.0177459716796875,
-0.006549835205078125,
-0.00212860107421875,
-0.0098419189453125,
0.018310546875,
0.03009033203125,
0.035858154296875,
0.04498291015625,
0.0157318115234375,
0.002742767333984375,
0.06329345703125,
-0.0184783935546875,
0.0185546875,
-0.020660400390625,
-0.01849365234375,
0.01873779296875,
0.0224609375,
0.0194549560546875,
0.0180511474609375,
0.027862548828125,
-0.002872467041015625,
0.0279083251953125,
-0.004058837890625,
0.0287322998046875,
-0.0282745361328125,
0.01045989990234375,
-0.0305938720703125,
-0.042938232421875,
0.002193450927734375,
-0.026947021484375,
0.021209716796875,
0.0311431884765625,
0.03729248046875,
0.0235748291015625,
-0.0222930908203125,
0.025390625,
-0.006683349609375,
-0.0184478759765625,
-0.0004146099090576172,
-0.0007872581481933594,
-0.041595458984375,
0.0328369140625,
-0.0268402099609375,
0.0172119140625,
0.0164337158203125,
-0.0153656005859375,
0.0147857666015625,
0.043182373046875,
0.0107421875,
-0.01444244384765625,
-0.028839111328125,
-0.02734375,
0.0195770263671875,
0.03509521484375,
-0.0277252197265625,
-0.016448974609375,
0.0048065185546875,
0.052642822265625,
-0.0218353271484375,
0.04107666015625,
-0.005161285400390625,
0.01030731201171875,
0.024383544921875,
-0.05621337890625,
0.042999267578125,
-0.051177978515625,
0.029754638671875,
0.06109619140625,
-0.010986328125,
0.004726409912109375,
-0.0023040771484375,
0.004268646240234375,
-0.006984710693359375,
0.0304412841796875,
-0.001953125,
-0.0224456787109375,
-0.033050537109375,
0.010955810546875,
0.03680419921875,
0.10540771484375,
0.0081939697265625,
-0.0285491943359375,
0.01316070556640625,
0.045623779296875,
-0.0849609375,
-0.1337890625,
0.055389404296875,
-0.0760498046875,
-0.031005859375,
-0.03131103515625,
-0.045654296875,
0.01262664794921875,
-0.019073486328125,
-0.016265869140625,
0.01751708984375,
-0.0011949539184570312,
-0.091064453125,
-0.0261383056640625,
-0.06634521484375,
0.025665283203125,
-0.01898193359375,
0.01302337646484375,
0.014617919921875,
0.039581298828125,
0.0189361572265625,
-0.0278778076171875,
0.042694091796875,
0.06976318359375,
-0.023895263671875,
-0.01317596435546875,
-0.01438140869140625,
0.01123046875,
-0.03472900390625,
0.0033664703369140625,
0.03009033203125,
0.01318359375,
-0.0208892822265625,
0.01250457763671875,
0.00882720947265625,
0.0182647705078125,
0.03240966796875,
-0.01318359375,
-0.00231170654296875,
0.049102783203125,
0.028717041015625,
-0.01165008544921875,
-0.0087127685546875,
-0.041900634765625,
-0.0469970703125,
0.01036834716796875,
0.041290283203125,
0.0192108154296875,
-0.0287933349609375,
-0.0166473388671875,
0.020233154296875,
-0.01009368896484375,
-0.048858642578125,
-0.0234222412109375,
0.07666015625,
0.036865234375,
0.07537841796875,
0.01313018798828125,
-0.0017538070678710938,
-0.0208892822265625,
-0.031219482421875,
-0.0188751220703125,
-0.0016613006591796875,
-0.027191162109375,
-0.01068878173828125,
-0.046051025390625,
-0.0228424072265625,
0.0384521484375,
0.01171112060546875,
0.0223236083984375,
-0.01806640625,
-0.040802001953125,
-0.01336669921875,
0.05804443359375,
-0.02777099609375,
-0.030914306640625,
-0.01885986328125,
0.0179901123046875,
-0.01457977294921875,
-0.048828125,
-0.0036334991455078125,
0.0024089813232421875,
-0.0019931793212890625,
-0.03253173828125,
-0.0252685546875,
-0.0282745361328125,
-0.0012464523315429688,
0.01209259033203125,
-0.0023021697998046875,
-0.01654052734375,
0.03594970703125,
-0.0185394287109375,
0.015838623046875,
-0.0028324127197265625,
0.0098114013671875,
-0.01444244384765625,
-0.023834228515625,
0.0018243789672851562,
-0.1064453125,
-0.03076171875,
0.04248046875,
0.05303955078125,
-0.043609619140625,
-0.007427215576171875,
-0.021820068359375,
0.056793212890625,
-0.01959228515625,
0.0247802734375,
-0.0017595291137695312,
0.03558349609375,
-0.05596923828125,
0.00527191162109375,
0.0043792724609375,
-0.031768798828125,
-0.0055694580078125,
-0.01038360595703125,
0.0186614990234375,
0.0110931396484375,
-0.040374755859375,
-0.00846099853515625,
-0.03680419921875,
-0.02001953125,
-0.01383209228515625,
0.0006918907165527344,
0.005313873291015625,
0.0296173095703125,
-0.0027065277099609375,
-0.011322021484375,
-0.021514892578125,
-0.037261962890625,
0.062255859375,
-0.01023101806640625,
-0.00681304931640625,
0.0033626556396484375,
0.1124267578125,
0.013671875,
-0.0245361328125,
-0.056365966796875,
-0.0257110595703125,
0.016754150390625,
-0.0283203125,
0.06719970703125,
0.0263214111328125,
-0.00791168212890625,
0.07110595703125,
-0.006984710693359375,
0.01486968994140625,
-0.0183258056640625,
0.011627197265625,
0.003143310546875,
-0.032806396484375,
0.0261993408203125,
-0.00812530517578125,
-0.0006284713745117188,
0.0499267578125,
-0.0005254745483398438,
-0.03662109375,
0.045928955078125,
0.055023193359375,
-0.03948974609375,
0.01058197021484375,
-0.021728515625,
-0.045562744140625,
0.0218658447265625,
-0.01424407958984375,
0.00341033935546875,
0.016845703125,
-0.01505279541015625,
0.01873779296875,
0.00310516357421875,
0.0164642333984375,
0.039459228515625,
0.08697509765625,
-0.0123291015625,
0.0357666015625,
0.04296875,
-0.0078582763671875,
-0.0304412841796875,
-0.00804901123046875,
0.05145263671875,
0.0020923614501953125,
-0.05157470703125,
0.01515960693359375,
-0.0255584716796875,
-0.0016231536865234375,
0.017333984375,
0.011016845703125,
0.041473388671875,
0.0467529296875,
0.018890380859375,
-0.00630950927734375,
-0.0043792724609375,
0.01702880859375,
-0.023284912109375,
0.0164642333984375,
0.0027484893798828125,
-0.005786895751953125,
0.005771636962890625,
0.06591796875,
-0.0269927978515625,
0.053314208984375,
-0.0184173583984375,
0.01483917236328125,
0.0234527587890625,
0.0196533203125,
0.0204620361328125,
-0.02593994140625,
0.0172271728515625,
-0.0167999267578125,
0.0137939453125,
-0.034210205078125,
-0.00478363037109375,
0.0242767333984375,
0.0193328857421875,
0.022979736328125,
-0.0088653564453125,
0.00719451904296875,
0.005279541015625,
-0.00940704345703125,
0.029296875,
0.00885009765625,
-0.0220794677734375,
-0.036712646484375,
-0.0154876708984375,
0.023345947265625,
0.007511138916015625,
0.0023441314697265625,
0.01959228515625,
-0.0352783203125,
0.0105743408203125,
-0.02423095703125,
0.012939453125,
-0.0055389404296875,
-0.005016326904296875,
-0.0187225341796875,
-0.041717529296875,
-0.006317138671875,
-0.01148223876953125,
-0.0120086669921875,
-0.01078033447265625,
-0.01222991943359375,
0.0310821533203125,
-0.007049560546875,
0.0657958984375,
-0.0225982666015625,
-0.04730224609375,
-0.0084075927734375,
-0.00879669189453125,
0.07611083984375,
0.055694580078125,
-0.052978515625,
0.0021114349365234375,
-0.023712158203125,
-0.0043487548828125,
0.057037353515625,
-0.03369140625,
-0.031036376953125,
-0.036590576171875,
-0.0290374755859375,
0.049407958984375,
-0.03717041015625,
-0.0174713134765625,
-0.01265716552734375,
-0.0161895751953125,
-0.0377197265625,
0.044219970703125,
0.01239013671875,
0.033477783203125,
-0.0218048095703125,
-0.016143798828125,
-0.0112762451171875,
0.01317596435546875,
-0.0283966064453125,
0.01517486572265625,
-0.0019702911376953125,
-0.046844482421875,
-0.0161285400390625,
0.019805908203125,
0.004428863525390625,
-0.0006604194641113281,
-0.0027179718017578125,
0.005481719970703125,
0.021484375,
-0.021942138671875,
-0.00580596923828125,
-0.017181396484375,
0.0172119140625,
-0.04461669921875,
0.0298004150390625,
0.0148468017578125,
-0.01337432861328125,
-0.039398193359375,
-0.0084228515625,
0.037872314453125,
-0.05596923828125,
0.0116119384765625,
-0.056427001953125,
-0.0140228271484375,
-0.017974853515625,
0.01739501953125,
0.0799560546875,
0.029510498046875,
0.032684326171875,
0.0105743408203125,
0.00803375244140625,
0.00762939453125,
0.01407623291015625,
0.0185699462890625,
-0.0125579833984375,
0.083740234375,
0.0049285888671875,
-0.0221099853515625,
0.052825927734375,
-0.054107666015625,
-0.0260772705078125,
0.0020046234130859375,
-0.00959014892578125,
-0.021942138671875,
0.0032596588134765625,
-0.00424957275390625,
-0.00977325439453125,
-0.0115203857421875,
-0.0257720947265625,
0.01351165771484375,
0.007781982421875,
0.04693603515625,
0.01096343994140625,
-0.034942626953125,
0.007781982421875,
-0.005496978759765625,
0.01099395751953125,
-0.0439453125,
0.0258941650390625,
0.00989532470703125,
-0.04779052734375,
0.0307159423828125,
0.034271240234375,
-0.0135955810546875,
-0.03936767578125,
0.01117706298828125,
0.0006256103515625,
-0.003009796142578125,
-0.0997314453125,
0.0014677047729492188,
-0.0230712890625,
-0.006381988525390625,
0.0513916015625,
-0.00963592529296875,
0.046783447265625,
0.0416259765625,
0.0145721435546875,
-0.0200653076171875,
0.0179443359375,
-0.029815673828125,
-0.03662109375,
-0.0265350341796875,
0.005218505859375,
0.0438232421875,
-0.01218414306640625,
0.037811279296875,
0.00769805908203125,
-0.021148681640625,
0.005069732666015625,
-0.007415771484375,
0.0250244140625,
-0.054168701171875,
0.00823211669921875,
0.0249481201171875,
0.0190887451171875,
0.00722503662109375,
-0.004062652587890625,
0.008544921875,
-0.033966064453125,
-0.007694244384765625,
0.007724761962890625,
0.0014057159423828125,
0.0009336471557617188,
-0.002044677734375,
-0.062255859375,
0.08514404296875,
0.005817413330078125,
0.01849365234375,
0.02490234375,
0.0268096923828125,
-0.03741455078125,
-0.0012979507446289062,
-0.032806396484375,
0.0250091552734375,
-0.0171661376953125,
0.0382080078125,
-0.052276611328125,
-0.0166168212890625,
0.0008563995361328125,
0.055511474609375,
0.0948486328125,
0.005481719970703125,
-0.036712646484375,
-0.01447296142578125,
0.05047607421875,
0.09039306640625,
0.0207672119140625,
0.00853729248046875,
0.0206756591796875,
0.06982421875,
0.06268310546875,
-0.043914794921875,
0.03515625,
-0.0128173828125,
0.005855560302734375,
0.049041748046875,
0.021148681640625,
0.0062408447265625,
0.01322174072265625,
-0.00966644287109375,
-0.05792236328125,
0.01059722900390625,
0.033111572265625,
0.003082275390625,
0.03277587890625,
0.0279998779296875,
0.039520263671875,
-0.04827880859375,
-0.07318115234375,
-0.0143280029296875,
0.03582763671875,
0.001453399658203125,
0.0091400146484375,
0.0295867919921875,
0.0283966064453125,
0.0504150390625,
-0.03216552734375,
-0.00072479248046875,
0.0211334228515625,
-0.0292510986328125,
0.03973388671875,
0.034210205078125,
0.0284423828125,
-0.0517578125,
-0.022918701171875,
0.08380126953125,
0.06805419921875,
-0.0419921875,
-0.037933349609375,
0.009002685546875,
0.01047515869140625,
0.0163116455078125,
-0.01155853271484375,
0.0152587890625,
0.00836181640625,
0.05255126953125,
-0.053863525390625,
-0.01275634765625,
0.0108795166015625,
0.0279541015625,
-0.0178680419921875,
-0.02056884765625,
-0.0114898681640625,
-0.0274200439453125,
-0.0220794677734375,
-0.0093841552734375,
0.01357269287109375,
0.05242919921875,
0.0245208740234375,
0.0214080810546875,
-0.0635986328125,
-0.02008056640625,
-0.0107269287109375,
0.0309600830078125,
-0.0156402587890625,
0.02362060546875,
-0.05029296875,
-0.047637939453125,
-0.0225982666015625,
0.04547119140625,
0.04083251953125,
0.01291656494140625,
0.00789642333984375,
0.00444793701171875,
-0.006816864013671875,
0.0140838623046875,
0.04425048828125,
-0.01442718505859375,
-0.03680419921875,
-0.01514434814453125,
0.01213836669921875,
0.03521728515625,
0.000492095947265625,
-0.003993988037109375,
0.059661865234375,
0.009857177734375,
-0.0003552436828613281,
0.04083251953125,
-0.0007610321044921875,
0.010650634765625,
0.032318115234375,
0.015899658203125,
-0.0031528472900390625,
0.019775390625,
-0.0595703125,
-0.00943756103515625,
-0.03839111328125,
-0.0330810546875,
0.018951416015625,
0.0384521484375,
-0.0080108642578125,
0.0085296630859375,
0.0229949951171875,
-0.05126953125,
-0.0019054412841796875,
0.034271240234375,
0.0246429443359375,
-0.02386474609375,
-0.00665283203125,
-0.01959228515625,
-0.056121826171875,
-0.027587890625,
0.001384735107421875,
0.00394439697265625,
0.0188751220703125,
-0.01528167724609375,
0.04010009765625,
0.0268707275390625,
-0.02197265625,
0.019683837890625,
-0.0380859375,
-0.025421142578125,
0.0665283203125,
-0.024261474609375,
-0.028717041015625,
-0.0001270771026611328,
0.0231781005859375,
0.0247955322265625,
0.04388427734375,
-0.0212860107421875,
0.0167999267578125,
-0.041473388671875,
0.0101470947265625,
-0.028778076171875,
0.006000518798828125,
-0.022308349609375,
-0.01189422607421875,
-0.02587890625,
-0.0170440673828125,
0.0309600830078125,
0.0243682861328125,
0.005290985107421875,
0.0004646778106689453,
-0.036285400390625,
-0.07208251953125,
0.03997802734375,
-0.051910400390625,
0.047698974609375,
0.0252685546875,
0.0178070068359375,
0.0173187255859375,
-0.024993896484375,
-0.018035888671875,
-0.0061187744140625,
0.023162841796875,
-0.0108795166015625,
-0.0242767333984375,
0.0109710693359375,
-0.0146026611328125,
0.011260986328125,
0.042205810546875,
0.003559112548828125,
0.0170745849609375,
-0.0144805908203125,
-0.01580810546875,
-0.01326751708984375,
-0.006103515625,
-0.047393798828125,
-0.038818359375,
0.0208892822265625,
0.006298065185546875,
0.0147705078125,
-0.0213165283203125,
-0.01488494873046875,
-0.0330810546875,
-0.0295867919921875,
-0.00539398193359375,
0.0010938644409179688,
-0.005817413330078125,
-0.0083160400390625,
-0.0292205810546875,
-0.055572509765625,
-0.00811004638671875,
0.01242828369140625,
0.015594482421875,
-0.03912353515625,
-0.01067352294921875,
-0.0198211669921875,
0.0024356842041015625,
-0.00861358642578125,
0.00983428955078125,
-0.0009260177612304688,
-0.03253173828125,
-0.03289794921875,
0.0325927734375,
0.02569580078125,
0.05291748046875,
0.06597900390625,
-0.01038360595703125,
0.031494140625,
0.021759033203125,
-0.038818359375,
-0.08282470703125,
0.0236358642578125,
-0.06982421875,
-0.000024497509002685547,
0.0088958740234375,
0.025543212890625,
0.058929443359375,
-0.00885772705078125,
-0.07379150390625,
0.04888916015625,
-0.0263671875,
-0.0297393798828125,
-0.06463623046875,
0.01200103759765625,
0.0382080078125,
-0.055267333984375,
-0.03692626953125,
-0.006450653076171875,
-0.06365966796875,
-0.0036907196044921875,
-0.00921630859375,
0.01140594482421875,
0.023162841796875,
0.01250457763671875,
-0.06494140625,
-0.00560760498046875,
-0.03338623046875,
-0.0119476318359375,
0.00728607177734375,
-0.005157470703125,
0.0242156982421875,
0.01837158203125,
-0.04278564453125,
0.00879669189453125,
-0.0149688720703125,
0.025665283203125,
0.00440216064453125,
-0.0179443359375,
-0.058624267578125,
0.002166748046875,
0.038665771484375,
0.07452392578125,
0.0203094482421875,
-0.04296875,
-0.021087646484375,
0.00167083740234375,
0.004184722900390625,
-0.013397216796875,
0.017333984375,
-0.05718994140625,
-0.032073974609375,
0.00042510032653808594,
-0.005275726318359375,
-0.0196075439453125,
-0.01293182373046875,
-0.036163330078125,
-0.019012451171875,
-0.0255126953125,
-0.004512786865234375,
0.012420654296875,
0.020599365234375,
0.027374267578125,
-0.03570556640625,
-0.00807952880859375,
-0.03485107421875,
0.022247314453125,
-0.0001823902130126953,
-0.0657958984375,
0.0055084228515625,
0.0113067626953125,
0.02703857421875,
0.01666259765625,
0.0281982421875,
-0.01371002197265625,
0.02001953125,
0.0013103485107421875,
-0.0237579345703125,
0.0133209228515625,
0.01372528076171875,
-0.00661468505859375,
-0.0245208740234375,
0.01445770263671875,
0.00815582275390625,
0.061370849609375,
0.01279449462890625,
0.052093505859375,
0.00637054443359375,
0.039215087890625,
0.005748748779296875,
-0.028289794921875,
0.034820556640625,
-0.036956787109375,
0.0039520263671875,
0.02490234375,
-0.034149169921875,
-0.01122283935546875,
-0.0035247802734375,
0.04815673828125,
-0.021087646484375,
0.0003323554992675781
] |
fa24ab42e48683b43b1db974a1920cd8d8983ca1
|
Wordpress Stackexchange
Q: using 1 form shortcode (si or cf7) for all multisite sites I have a network with more than 50 sites.
I want to create one contact form (which means one shortcode) using contact form 7 or fast secure contact form.
Then, I want to use that shortcode on all the 50+ sites so all sites use the same form.
The problem is that when I try to use a shortcode of site A over site B, it's not working.
Do you know how can I use a contact form shortcode globaly on all sites at once?
Thanks!
A: A Must Use plugin could do the work.
This is just an outline and has to be fully tested:
add_shortcode( 'global_form', 'shortcode_wpse_87634' );
function shortcode_wpse_87634()
{
// Main site, ID=1, that has the form
switch_to_blog( 1 );
// Do your stuff
$my_stuff = something(); // maybe do_shortcode
// Back to original site
restore_current_blog();
// Return shortcode content
return $my_stuff;
}
Also, maybe the contact form plugin must be Network activated for this to work.
Having the shortcode available Network-wide will work with the mu-plugin, but to have the form really working globally, that's another issue.
|
Q: using 1 form shortcode (si or cf7) for all multisite sites I have a network with more than 50 sites.
I want to create one contact form (which means one shortcode) using contact form 7 or fast secure contact form.
Then, I want to use that shortcode on all the 50+ sites so all sites use the same form.
The problem is that when I try to use a shortcode of site A over site B, it's not working.
Do you know how can I use a contact form shortcode globaly on all sites at once?
Thanks!
A: A Must Use plugin could do the work.
This is just an outline and has to be fully tested:
add_shortcode( 'global_form', 'shortcode_wpse_87634' );
function shortcode_wpse_87634()
{
// Main site, ID=1, that has the form
switch_to_blog( 1 );
// Do your stuff
$my_stuff = something(); // maybe do_shortcode
// Back to original site
restore_current_blog();
// Return shortcode content
return $my_stuff;
}
Also, maybe the contact form plugin must be Network activated for this to work.
Having the shortcode available Network-wide will work with the mu-plugin, but to have the form really working globally, that's another issue.
|
wordpress
|
{
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:429267",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87634"
}
|
[
0.0028591156005859375,
-0.0283966064453125,
-0.04656982421875,
-0.037994384765625,
-0.0255584716796875,
-0.0217132568359375,
-0.00766754150390625,
0.02301025390625,
0.04986572265625,
-0.025177001953125,
-0.05682373046875,
-0.0025081634521484375,
-0.0389404296875,
-0.0140380859375,
0.0178985595703125,
-0.024505615234375,
0.005096435546875,
0.023284912109375,
-0.01322174072265625,
-0.041412353515625,
0.003368377685546875,
-0.0220794677734375,
-0.053070068359375,
0.034210205078125,
-0.00470733642578125,
-0.062469482421875,
0.029388427734375,
0.004825592041015625,
-0.0318603515625,
-0.03314208984375,
0.0057220458984375,
0.07086181640625,
0.06964111328125,
0.0031032562255859375,
-0.0986328125,
-0.036163330078125,
-0.00881195068359375,
-0.0245513916015625,
-0.07244873046875,
0.06951904296875,
0.0259246826171875,
-0.031951904296875,
0.032958984375,
0.01476287841796875,
0.0178375244140625,
-0.0457763671875,
0.03729248046875,
-0.07183837890625,
-0.0167083740234375,
0.0006089210510253906,
0.005649566650390625,
-0.00795745849609375,
0.032928466796875,
-0.008514404296875,
-0.019622802734375,
-0.0162506103515625,
-0.0140533447265625,
-0.037445068359375,
0.01776123046875,
0.055145263671875,
0.01503753662109375,
0.0023479461669921875,
0.002628326416015625,
-0.04095458984375,
0.002750396728515625,
0.0005068778991699219,
-0.05535888671875,
0.007274627685546875,
0.02020263671875,
0.0312042236328125,
0.0049896240234375,
-0.03857421875,
0.01580810546875,
-0.0025577545166015625,
-0.019317626953125,
-0.0222320556640625,
0.0168609619140625,
0.01009368896484375,
0.0161590576171875,
-0.009063720703125,
-0.04937744140625,
-0.041900634765625,
-0.0743408203125,
-0.03607177734375,
-0.005382537841796875,
0.01261138916015625,
-0.014617919921875,
0.0181121826171875,
-0.052947998046875,
-0.01910400390625,
-0.0250091552734375,
-0.029998779296875,
-0.06427001953125,
0.00846099853515625,
0.00994873046875,
-0.0203399658203125,
0.0273284912109375,
0.0582275390625,
-0.005565643310546875,
-0.0128326416015625,
-0.0103302001953125,
-0.0211029052734375,
-0.0183868408203125,
-0.0202789306640625,
-0.001811981201171875,
0.069091796875,
0.01953125,
0.01015472412109375,
0.0260162353515625,
-0.01346588134765625,
0.006900787353515625,
0.049652099609375,
-0.016845703125,
0.0262298583984375,
-0.032012939453125,
-0.012298583984375,
-0.0703125,
0.01026153564453125,
-0.034759521484375,
0.0160980224609375,
-0.0109710693359375,
0.004940032958984375,
0.0367431640625,
-0.04327392578125,
-0.0160064697265625,
-0.03192138671875,
-0.007293701171875,
-0.046356201171875,
0.0029430389404296875,
-0.0129852294921875,
-0.0089111328125,
0.01424407958984375,
0.0238800048828125,
0.05157470703125,
0.01372528076171875,
0.0009551048278808594,
0.0007076263427734375,
0.0251007080078125,
0.00753021240234375,
0.0032863616943359375,
-0.00015819072723388672,
-0.039093017578125,
0.005008697509765625,
0.040069580078125,
-0.0238189697265625,
0.0278472900390625,
0.044586181640625,
0.0166473388671875,
-0.046875,
-0.05902099609375,
-0.03448486328125,
0.033935546875,
0.04730224609375,
-0.00899505615234375,
-0.047698974609375,
-0.036224365234375,
0.03155517578125,
-0.030548095703125,
-0.027435302734375,
-0.0703125,
0.00531768798828125,
0.002246856689453125,
0.03759765625,
-0.026153564453125,
-0.014862060546875,
-0.0218353271484375,
-0.0673828125,
-0.0104217529296875,
0.01473236083984375,
0.01026153564453125,
-0.03436279296875,
-0.00188446044921875,
-0.004810333251953125,
0.0021419525146484375,
0.008056640625,
0.044219970703125,
-0.056060791015625,
0.056060791015625,
0.048736572265625,
-0.034881591796875,
-0.007335662841796875,
-0.04400634765625,
0.07635498046875,
0.0025997161865234375,
-0.058258056640625,
0.0413818359375,
0.01212310791015625,
0.01837158203125,
-0.010467529296875,
-0.00884246826171875,
0.05950927734375,
0.085693359375,
0.00472259521484375,
0.004085540771484375,
0.00875091552734375,
-0.00580596923828125,
-0.027008056640625,
0.021026611328125,
-0.0029144287109375,
-0.0133209228515625,
0.0118560791015625,
-0.054534912109375,
0.05767822265625,
-0.02740478515625,
0.017425537109375,
-0.0222930908203125,
-0.00600433349609375,
-0.007171630859375,
-0.032745361328125,
-0.021026611328125,
0.034271240234375,
-0.007404327392578125,
-0.027191162109375,
-0.0071563720703125,
-0.0006346702575683594,
0.053192138671875,
-0.015777587890625,
0.037567138671875,
-0.00913238525390625,
0.049652099609375,
-0.008331298828125,
-0.03839111328125,
-0.00365447998046875,
0.0027523040771484375,
-0.01611328125,
-0.0151214599609375,
-0.040863037109375,
-0.006732940673828125,
-0.07403564453125,
-0.0002269744873046875,
-0.049072265625,
0.069580078125,
-0.0290985107421875,
-0.0206756591796875,
-0.051544189453125,
0.0139617919921875,
-0.0060272216796875,
0.042938232421875,
-0.00820159912109375,
0.0185699462890625,
0.054412841796875,
0.0201416015625,
0.01007843017578125,
-0.011932373046875,
0.038726806640625,
-0.044342041015625,
0.0242156982421875,
-0.0328369140625,
0.00007456541061401367,
0.02301025390625,
-0.0063323974609375,
0.001434326171875,
0.002071380615234375,
-0.059173583984375,
0.026580810546875,
0.0107879638671875,
-0.027008056640625,
-0.02874755859375,
0.038299560546875,
-0.04736328125,
0.0304107666015625,
-0.0445556640625,
-0.05859375,
-0.005970001220703125,
0.019805908203125,
-0.0050506591796875,
0.034881591796875,
0.02276611328125,
-0.002178192138671875,
0.00041675567626953125,
0.00690460205078125,
-0.03302001953125,
0.01009368896484375,
0.0202484130859375,
0.041778564453125,
0.0302276611328125,
-0.03466796875,
-0.015289306640625,
0.035980224609375,
0.02886962890625,
-0.00705718994140625,
0.0207366943359375,
-0.038116455078125,
-0.018280029296875,
0.007663726806640625,
-0.051666259765625,
-0.029022216796875,
-0.0265350341796875,
0.051727294921875,
-0.01409149169921875,
0.00496673583984375,
-0.0063934326171875,
-0.035125732421875,
0.072998046875,
0.0197296142578125,
-0.059112548828125,
0.003570556640625,
-0.0232696533203125,
0.046173095703125,
-0.04205322265625,
0.0160064697265625,
0.0625,
-0.03924560546875,
0.03778076171875,
-0.038787841796875,
-0.00644683837890625,
-0.06671142578125,
0.0294342041015625,
0.004741668701171875,
-0.058868408203125,
0.000030338764190673828,
0.05242919921875,
0.0144195556640625,
-0.01009368896484375,
-0.01039886474609375,
-0.00948333740234375,
-0.0196533203125,
-0.0068359375,
-0.057464599609375,
-0.0287017822265625,
-0.044219970703125,
-0.06536865234375,
0.0204315185546875,
-0.0264129638671875,
-0.01611328125,
-0.00598907470703125,
-0.01430511474609375,
0.02386474609375,
-0.0277099609375,
-0.011688232421875,
-0.017974853515625,
-0.03656005859375,
-0.052581787109375,
-0.0186614990234375,
-0.01013946533203125,
0.0115509033203125,
-0.0001156926155090332,
0.0007448196411132812,
-0.0032138824462890625,
0.0124053955078125,
0.0172271728515625,
0.0750732421875,
0.00447845458984375,
-0.03936767578125,
-0.01416015625,
-0.0142669677734375,
-0.0009293556213378906,
0.00730133056640625,
-0.0849609375,
0.00785064697265625,
0.0132598876953125,
-0.0165863037109375,
0.008148193359375,
-0.0386962890625,
0.052490234375,
-0.0163421630859375,
-0.059783935546875,
-0.0297698974609375,
0.04742431640625,
-0.0467529296875,
0.00733184814453125,
0.00576019287109375,
-0.0126495361328125,
-0.055877685546875,
-0.0205230712890625,
-0.00714874267578125,
-0.00787353515625,
-0.0076141357421875,
0.01032257080078125,
0.026641845703125,
0.039520263671875,
-0.00662994384765625,
0.001163482666015625,
-0.010101318359375,
-0.029266357421875,
-0.035430908203125,
0.04351806640625,
-0.0160980224609375,
-0.02569580078125,
0.0007581710815429688,
-0.0200958251953125,
-0.0013065338134765625,
0.0203399658203125,
0.021942138671875,
-0.04278564453125,
0.01213836669921875,
-0.07440185546875,
0.0169219970703125,
-0.05059814453125,
0.007259368896484375,
-0.0196990966796875,
0.06683349609375,
-0.07562255859375,
-0.002689361572265625,
0.0194091796875,
0.002231597900390625,
-0.0126495361328125,
-0.01047515869140625,
-0.06402587890625,
-0.0292510986328125,
-0.081298828125,
0.0036792755126953125,
-0.0231781005859375,
-0.0198822021484375,
0.0174560546875,
-0.0159149169921875,
0.00814056396484375,
-0.076416015625,
0.0077362060546875,
0.0058441162109375,
-0.0082855224609375,
-0.01473236083984375,
-0.0198822021484375,
-0.026214599609375,
0.0095062255859375,
-0.0287628173828125,
-0.0677490234375,
-0.004604339599609375,
-0.002910614013671875,
0.04150390625,
0.004680633544921875,
-0.028656005859375,
-0.036773681640625,
0.039337158203125,
-0.007053375244140625,
0.031341552734375,
-0.0274200439453125,
-0.005672454833984375,
-0.02618408203125,
0.03326416015625,
0.01201629638671875,
0.0006890296936035156,
0.004486083984375,
0.0185394287109375,
-0.03033447265625,
-0.0082550048828125,
-0.03094482421875,
-0.01806640625,
0.02545166015625,
-0.049713134765625,
-0.0634765625,
-0.0192108154296875,
-0.01445770263671875,
-0.01334381103515625,
-0.04595947265625,
0.0098419189453125,
0.00222015380859375,
-0.034332275390625,
-0.0219573974609375,
0.0274810791015625,
-0.04052734375,
0.030242919921875,
-0.026123046875,
0.019439697265625,
-0.017791748046875,
-0.0701904296875,
-0.0255889892578125,
0.045318603515625,
0.0166168212890625,
0.0107574462890625,
0.0259552001953125,
-0.047760009765625,
0.036407470703125,
0.038238525390625,
-0.019683837890625,
0.00844573974609375,
0.0428466796875,
-0.0029811859130859375,
-0.037841796875,
0.02197265625,
-0.004543304443359375,
-0.0200042724609375,
-0.00592803955078125,
0.004932403564453125,
-0.0221710205078125,
-0.045654296875,
0.032440185546875,
0.054229736328125,
-0.006809234619140625,
-0.03240966796875,
-0.044647216796875,
0.0143585205078125,
-0.0012540817260742188,
-0.0171356201171875,
-0.0083160400390625,
0.01367950439453125,
0.0035381317138671875,
0.04205322265625,
-0.0244140625,
0.04290771484375,
0.00803375244140625,
0.01605224609375,
0.01338958740234375,
0.01959228515625,
-0.02618408203125,
0.0093536376953125,
-0.0198974609375,
0.056976318359375,
0.0265960693359375,
-0.0157470703125,
-0.00634765625,
-0.0203399658203125,
-0.0589599609375,
-0.050537109375,
0.00795745849609375,
0.0249786376953125,
0.01236724853515625,
0.0106048583984375,
0.0005779266357421875,
0.006473541259765625,
0.01104736328125,
-0.02288818359375,
-0.01078033447265625,
-0.01126861572265625,
-0.006275177001953125,
-0.01947021484375,
0.054046630859375,
-0.0264739990234375,
0.0226287841796875,
0.006198883056640625,
0.032684326171875,
0.07891845703125,
-0.01279449462890625,
0.01401519775390625,
0.0167083740234375,
-0.00829315185546875,
-0.021453857421875,
0.0091094970703125,
-0.031829833984375,
-0.029083251953125,
0.056915283203125,
0.0246124267578125,
0.036529541015625,
0.038421630859375,
-0.0501708984375,
0.01422119140625,
-0.0086669921875,
-0.0016317367553710938,
0.018798828125,
-0.0007414817810058594,
-0.0158843994140625,
0.03851318359375,
0.02947998046875,
0.0243988037109375,
0.0233917236328125,
-0.02001953125,
0.006683349609375,
-0.0029964447021484375,
0.03955078125,
0.0020542144775390625,
-0.025726318359375,
-0.0211944580078125,
0.0701904296875,
0.01435089111328125,
-0.021484375,
-0.007427215576171875,
-0.00800323486328125,
-0.0225372314453125,
0.01404571533203125,
0.06414794921875,
-0.01444244384765625,
0.020416259765625,
-0.02142333984375,
0.00608062744140625,
-0.007251739501953125,
0.00783538818359375,
0.053131103515625,
0.0288543701171875,
-0.04327392578125,
0.003467559814453125,
-0.0297088623046875,
-0.00027489662170410156,
0.0313720703125,
-0.04248046875,
-0.034881591796875,
-0.027679443359375,
-0.00283050537109375,
0.024169921875,
-0.0159912109375,
-0.0277099609375,
0.0209197998046875,
-0.00290679931640625,
-0.0203704833984375,
0.0278778076171875,
-0.025421142578125,
0.0106658935546875,
0.007740020751953125,
0.017822265625,
-0.0030269622802734375,
0.00042819976806640625,
0.0138397216796875,
-0.0208740234375,
0.005474090576171875,
-0.08526611328125,
-0.037628173828125,
-0.0129241943359375,
0.00428009033203125,
0.07196044921875,
0.025634765625,
0.002796173095703125,
0.0224761962890625,
-0.0010519027709960938,
0.007175445556640625,
-0.0161285400390625,
-0.01282501220703125,
-0.0240020751953125,
-0.00531005859375,
0.0218658447265625,
-0.0396728515625,
0.0210723876953125,
-0.0057220458984375,
-0.01824951171875,
0.037017822265625,
-0.0277252197265625,
0.045928955078125,
0.0302886962890625,
0.033111572265625,
0.032501220703125,
0.0458984375,
-0.033599853515625,
0.0009918212890625,
0.03564453125,
-0.023345947265625,
-0.015716552734375,
0.031402587890625,
0.006256103515625,
-0.00879669189453125,
-0.01397705078125,
-0.0248260498046875,
-0.00998687744140625,
-0.03582763671875,
-0.0082244873046875,
0.0226898193359375,
0.02001953125,
0.0772705078125,
-0.05731201171875,
0.035186767578125,
0.048797607421875,
-0.027130126953125,
-0.0013513565063476562,
-0.03363037109375,
-0.014251708984375,
-0.022979736328125,
0.05975341796875,
0.043365478515625,
-0.02325439453125,
0.0311737060546875,
0.033538818359375,
0.00030803680419921875,
-0.011444091796875,
0.07470703125,
0.0136566162109375,
0.0278778076171875,
-0.0606689453125,
-0.0234832763671875,
0.0014438629150390625,
-0.0217132568359375,
-0.01216888427734375,
0.00615692138671875,
-0.0445556640625,
-0.06353759765625,
-0.00577545166015625,
0.006290435791015625,
-0.0224609375,
-0.052886962890625,
-0.00522613525390625,
-0.0150909423828125,
0.034210205078125,
-0.037139892578125,
-0.0084381103515625,
0.00495147705078125,
0.035186767578125,
-0.0033016204833984375,
-0.026123046875,
-0.015838623046875,
0.035980224609375,
-0.03173828125,
0.0161285400390625,
-0.00818634033203125,
0.01065826416015625,
-0.0240936279296875,
-0.01535797119140625,
0.06011962890625,
-0.0095062255859375,
-0.0311737060546875,
0.006641387939453125,
0.0195770263671875,
0.00177764892578125,
-0.00081634521484375,
-0.00875091552734375,
-0.04083251953125,
-0.04559326171875,
-0.0105438232421875,
-0.07159423828125,
-0.01358795166015625,
-0.037078857421875,
-0.07080078125,
0.043914794921875,
-0.00629425048828125,
0.0285797119140625,
0.002780914306640625,
0.01383209228515625,
-0.0123291015625,
-0.015655517578125,
-0.0408935546875,
0.06768798828125,
0.0260162353515625,
0.0159759521484375,
-0.0188446044921875,
-0.00556182861328125,
0.006389617919921875,
0.0283050537109375,
0.047882080078125,
0.01201629638671875,
-0.0299530029296875,
0.006381988525390625,
0.046051025390625,
0.00595855712890625,
-0.01107025146484375,
0.055389404296875,
0.007358551025390625,
-0.0035190582275390625,
0.0250396728515625,
-0.00821685791015625,
0.0190887451171875,
0.00865936279296875,
-0.0134124755859375,
0.046630859375,
0.01354217529296875,
0.003299713134765625,
0.0016202926635742188,
0.0131378173828125,
-0.023712158203125,
0.0135345458984375,
0.000054895877838134766,
0.055755615234375,
-0.02825927734375,
0.0226898193359375,
-0.046356201171875,
0.0252532958984375,
0.0245208740234375,
-0.020294189453125,
0.0306854248046875,
-0.0226287841796875,
0.05401611328125,
0.044677734375,
0.0279998779296875,
0.09716796875,
0.017547607421875,
0.04376220703125,
0.0157012939453125,
-0.01561737060546875,
0.0235748291015625,
-0.01959228515625,
0.00740814208984375,
-0.051849365234375,
0.00798797607421875,
0.037689208984375,
0.027374267578125,
-0.0379638671875,
-0.08538818359375,
0.01067352294921875,
0.0169525146484375,
0.012115478515625,
0.037261962890625,
0.035614013671875,
-0.0245513916015625,
0.040802001953125,
-0.01306915283203125,
0.00881195068359375,
0.001445770263671875,
0.0098724365234375,
0.0157012939453125,
0.034454345703125,
-0.0299835205078125,
0.00026798248291015625,
-0.031494140625,
0.00714111328125,
-0.0006537437438964844,
0.060943603515625,
0.0135345458984375,
0.0714111328125,
-0.06280517578125,
-0.036712646484375,
0.0000553131103515625,
0.024566650390625,
0.031036376953125,
-0.00861358642578125,
-0.006137847900390625,
-0.0028057098388671875,
0.0222320556640625,
0.01904296875,
0.016876220703125,
0.0570068359375,
0.0401611328125,
0.035247802734375,
0.023223876953125,
-0.0110321044921875,
0.0382080078125,
-0.01885986328125,
0.0080108642578125,
-0.0178680419921875,
-0.028289794921875,
-0.01025390625,
-0.019561767578125,
-0.00893402099609375,
0.01049041748046875,
0.00508880615234375,
0.007808685302734375,
0.02630615234375,
0.001995086669921875,
-0.043212890625,
-0.017364501953125,
0.024871826171875,
0.0560302734375,
0.04949951171875,
-0.061187744140625,
-0.03125,
-0.00753021240234375,
-0.010101318359375,
0.036163330078125,
0.0433349609375,
0.001194000244140625,
0.0107574462890625,
-0.007549285888671875,
-0.015106201171875,
0.0626220703125,
0.0009326934814453125,
-0.0487060546875,
0.004180908203125,
0.056793212890625,
-0.047698974609375,
-0.051361083984375,
-0.0241241455078125,
0.0121307373046875,
0.0154571533203125,
0.001834869384765625,
0.058807373046875,
-0.01256561279296875,
-0.01195526123046875,
-0.010162353515625,
0.01287841796875,
0.0168609619140625,
-0.0095672607421875,
-0.01439666748046875,
0.02008056640625,
0.00748443603515625,
-0.02093505859375,
0.0248260498046875,
-0.00980377197265625,
0.0626220703125,
-0.04754638671875,
-0.02349853515625,
0.01517486572265625,
0.023590087890625,
-0.01395416259765625,
0.0186767578125,
-0.0276031494140625,
-0.010498046875,
-0.031707763671875,
-0.023162841796875,
0.03839111328125,
0.027130126953125,
-0.0119171142578125,
0.027374267578125,
-0.0085906982421875,
-0.044403076171875,
0.025634765625,
-0.051544189453125,
0.004970550537109375,
0.0220489501953125,
0.026458740234375,
0.006656646728515625,
-0.018585205078125,
-0.0299530029296875,
-0.00933837890625,
0.0233306884765625,
-0.00550079345703125,
-0.01454925537109375,
0.01474761962890625,
0.04290771484375,
0.04315185546875,
0.034088134765625,
-0.0242919921875,
0.0026912689208984375,
0.057373046875,
-0.01520538330078125,
-0.017547607421875,
-0.048919677734375,
-0.00890350341796875,
-0.03289794921875,
0.01233673095703125,
0.01139068603515625,
0.03289794921875,
-0.005283355712890625,
0.058929443359375,
-0.007480621337890625,
0.0034847259521484375,
-0.009368896484375,
0.00031447410583496094,
-0.0244293212890625,
0.006134033203125,
0.05804443359375,
0.002628326416015625,
0.0172882080078125,
-0.004108428955078125,
-0.00586700439453125,
-0.056396484375,
-0.017730712890625,
-0.039886474609375,
0.0272216796875,
-0.02734375,
-0.0096435546875,
0.016204833984375,
0.009979248046875,
-0.05828857421875,
0.020111083984375,
-0.0153961181640625,
0.0628662109375,
-0.0341796875,
-0.03302001953125,
0.0255279541015625,
-0.00608062744140625,
-0.0008339881896972656,
-0.0290069580078125,
-0.0054779052734375,
-0.037994384765625,
0.0016393661499023438,
-0.037933349609375,
0.0017557144165039062,
-0.0102081298828125,
-0.03466796875,
-0.01041412353515625,
0.0018720626831054688,
0.005847930908203125,
-0.0129852294921875,
-0.04949951171875,
-0.0181121826171875,
0.029754638671875,
0.00968170166015625,
-0.015655517578125,
-0.0169677734375,
-0.07403564453125,
0.012115478515625,
-0.00928497314453125,
0.051361083984375,
-0.0027923583984375,
-0.003482818603515625,
-0.007808685302734375,
-0.0022258758544921875,
-0.00931549072265625,
-0.01519012451171875,
0.05145263671875,
-0.030670166015625,
0.030181884765625,
0.04425048828125,
-0.049896240234375,
-0.068603515625,
-0.01293182373046875,
-0.060638427734375,
-0.0167694091796875,
-0.014556884765625,
-0.051483154296875,
-0.015869140625,
0.10064697265625,
0.05743408203125,
0.0267181396484375,
-0.03192138671875,
0.049957275390625,
0.0526123046875,
-0.028076171875,
0.0170440673828125,
0.00684356689453125,
0.01041412353515625,
-0.016998291015625,
-0.04473876953125,
-0.0271148681640625,
0.041290283203125,
-0.006923675537109375,
-0.0328369140625,
0.028564453125,
0.0003993511199951172,
-0.034698486328125,
-0.0076751708984375,
-0.006732940673828125,
0.00995635986328125,
-0.005863189697265625,
-0.00463104248046875,
0.003238677978515625,
0.01195526123046875,
-0.0068817138671875,
0.0362548828125,
-0.0167083740234375,
0.0232086181640625,
-0.01251983642578125,
0.026214599609375,
0.018585205078125,
0.01068878173828125,
-0.023345947265625,
0.0209197998046875,
-0.0191497802734375,
0.0440673828125,
0.01523590087890625,
0.04779052734375,
-0.0452880859375,
0.059539794921875,
0.0273590087890625,
0.03240966796875,
-0.034515380859375,
0.0224151611328125,
-0.01451873779296875,
0.02276611328125,
-0.00036025047302246094,
0.0250091552734375,
0.0643310546875,
-0.035797119140625,
0.011749267578125,
0.0269775390625,
0.01439666748046875,
-0.002948760986328125,
0.0015926361083984375,
-0.03668212890625,
0.0187530517578125,
-0.002307891845703125
] |
4e47fea8fa3e24984388fb8acbd34e1c06dfe709
|
Wordpress Stackexchange
Q: WP_Query orderby taxonomy term value (numeric) I have this query...
<?php
$press = new WP_Query(array(
'posts_per_page' => -1,
'post_type' => 'individual',
'post_status' => 'private'
));
if ($press->have_posts()) : while ($press->have_posts()) : $press->the_post();
?>
But my custom post-types are using custom taxonomy with a numeric term value.
My question is there anyway in ordering this query by the term value?
The taxonomy is called 'individual-group'
Any help would be hugely appreciated thanks.
Josh
A: No, there is no way to do this with default WP Core. @heathenJesus talks about meta data not taxonomies. See http://scribu.net/wordpress/sortable-taxonomy-columns.html for a proper solution.
And a more thorough explanation of why this is not something built into Core: Using wp_query is it possible to orderby taxonomy?
|
Q: WP_Query orderby taxonomy term value (numeric) I have this query...
<?php
$press = new WP_Query(array(
'posts_per_page' => -1,
'post_type' => 'individual',
'post_status' => 'private'
));
if ($press->have_posts()) : while ($press->have_posts()) : $press->the_post();
?>
But my custom post-types are using custom taxonomy with a numeric term value.
My question is there anyway in ordering this query by the term value?
The taxonomy is called 'individual-group'
Any help would be hugely appreciated thanks.
Josh
A: No, there is no way to do this with default WP Core. @heathenJesus talks about meta data not taxonomies. See http://scribu.net/wordpress/sortable-taxonomy-columns.html for a proper solution.
And a more thorough explanation of why this is not something built into Core: Using wp_query is it possible to orderby taxonomy?
A: Here is the complex query I used to numerically sort and filter the posts query by taxonomy slugs.
$my_post_type = 'some_post_type';
$my_term_slug_to_be_used_for_Ordering = 'some_slug';
$my_term_slug_to_be_used_for_Filtering = 'some_other_slug';
$querystr = "
SELECT
$wpdb->posts.*, $wpdb->term_relationships.object_id,
(SELECT wpt.slug
FROM $wpdb->term_taxonomy wptt
INNER JOIN $wpdb->term_relationships wptr ON wptt.term_taxonomy_id = wptr.term_taxonomy_id
INNER JOIN $wpdb->terms wpt ON wpt.term_id = wptt.term_id
WHERE
wptr.object_id = $wpdb->term_relationships.object_id AND
wptt.taxonomy = 'my_term_slug_to_be_used_for_Ordering') AS numeric_column_value
FROM $wpdb->term_taxonomy INNER JOIN $wpdb->term_relationships ON $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id
INNER JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->term_relationships.object_id
INNER JOIN $wpdb->terms ON $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id
WHERE
$wpdb->terms.slug = '{$my_term_slug_to_be_used_for_Filtering}' AND
$wpdb->posts.post_type = '$my_post_type' AND $wpdb->posts.post_status = 'publish'
ORDER BY numeric_column_value * 1 DESC"; // Actually it is a string so, * 1 for numeric
$r = $wpdb->get_results($querystr, OBJECT);
A: Sure, in the orderby parameter, there is an option called meta_value_num which should do exactly what you are looking for.
http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
$press = new WP_Query(array(
'posts_per_page' => -1,
'post_type' => 'individual',
'post_status' => 'private',
'orderby' => 'meta_value_num',
'meta_key' => 'individual-group'
));
|
wordpress
|
{
"language": "en",
"length": 284,
"provenance": "stackexchange_00019.jsonl.gz:429270",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87639"
}
|
[
0.0693359375,
0.0058746337890625,
0.00812530517578125,
-0.0202484130859375,
0.05426025390625,
-0.04815673828125,
0.08551025390625,
-0.0090179443359375,
0.01522064208984375,
0.00897979736328125,
-0.045318603515625,
-0.01285552978515625,
-0.046295166015625,
-0.0252227783203125,
-0.038421630859375,
-0.06903076171875,
0.02728271484375,
-0.016265869140625,
0.0243988037109375,
0.0014324188232421875,
0.026153564453125,
0.01079559326171875,
0.007678985595703125,
-0.016815185546875,
0.018524169921875,
0.0252838134765625,
0.049713134765625,
-0.044708251953125,
0.044036865234375,
-0.008331298828125,
0.023651123046875,
-0.03228759765625,
-0.007061004638671875,
-0.0159454345703125,
0.05902099609375,
-0.01015472412109375,
0.0177764892578125,
0.0068206787109375,
0.0211639404296875,
0.01175689697265625,
0.002956390380859375,
0.00008720159530639648,
-0.027191162109375,
0.0433349609375,
-0.006439208984375,
-0.0699462890625,
0.023712158203125,
-0.0626220703125,
0.0513916015625,
-0.051025390625,
0.02618408203125,
0.032257080078125,
0.0465087890625,
-0.058197021484375,
-0.037506103515625,
-0.00710296630859375,
0.0018138885498046875,
-0.04327392578125,
0.021148681640625,
-0.031951904296875,
-0.00524139404296875,
-0.0225830078125,
0.04437255859375,
0.02630615234375,
-0.01386260986328125,
0.005855560302734375,
0.0237274169921875,
0.0079498291015625,
-0.0265960693359375,
-0.029022216796875,
0.0209197998046875,
-0.0019254684448242188,
0.005596160888671875,
0.0014905929565429688,
-0.0095977783203125,
-0.06646728515625,
0.01361846923828125,
-0.05718994140625,
0.0218505859375,
0.031402587890625,
0.01241302490234375,
0.015838623046875,
-0.022918701171875,
-0.0018529891967773438,
0.0205535888671875,
0.0252838134765625,
-0.0162506103515625,
-0.035614013671875,
-0.01541900634765625,
-0.03521728515625,
-0.00734710693359375,
-0.03619384765625,
-0.0201263427734375,
0.0258331298828125,
0.0035572052001953125,
-0.009735107421875,
-0.007350921630859375,
0.0297698974609375,
-0.0181732177734375,
0.0013360977172851562,
-0.0222930908203125,
-0.0169677734375,
0.005828857421875,
-0.039459228515625,
0.009002685546875,
-0.0092926025390625,
0.02203369140625,
0.01548004150390625,
0.0297088623046875,
0.0286865234375,
-0.0146942138671875,
0.01430511474609375,
-0.0038051605224609375,
-0.01300811767578125,
-0.004669189453125,
0.0103302001953125,
-0.0233154296875,
0.0223541259765625,
0.0031948089599609375,
-0.01446533203125,
0.036712646484375,
0.039031982421875,
0.004329681396484375,
0.0041046142578125,
0.0026569366455078125,
0.019439697265625,
-0.01108551025390625,
-0.06610107421875,
-0.052703857421875,
0.029205322265625,
-0.03143310546875,
0.0274200439453125,
0.06427001953125,
0.0221710205078125,
-0.0173187255859375,
-0.0234375,
-0.0014905929565429688,
-0.01276397705078125,
-0.005451202392578125,
-0.00046753883361816406,
0.023773193359375,
-0.0312347412109375,
-0.006183624267578125,
0.02508544921875,
0.005767822265625,
0.00399017333984375,
0.0293426513671875,
0.01250457763671875,
-0.0013599395751953125,
-0.0018911361694335938,
-0.00634765625,
0.0180511474609375,
0.07891845703125,
-0.0269012451171875,
-0.06964111328125,
-0.028839111328125,
0.0006270408630371094,
-0.0246429443359375,
-0.060943603515625,
-0.061126708984375,
0.03851318359375,
-0.00914764404296875,
-0.018218994140625,
-0.005802154541015625,
-0.0114593505859375,
0.00447845458984375,
-0.041778564453125,
-0.01055908203125,
0.0297698974609375,
-0.00931549072265625,
0.0181427001953125,
-0.01036834716796875,
0.0276031494140625,
0.029266357421875,
0.0002760887145996094,
0.0146026611328125,
-0.0036182403564453125,
-0.0268707275390625,
0.0129547119140625,
0.014129638671875,
-0.039886474609375,
-0.04071044921875,
0.00026106834411621094,
-0.019989013671875,
-0.03973388671875,
0.039825439453125,
0.005016326904296875,
0.02642822265625,
0.0008792877197265625,
0.0129241943359375,
0.0364990234375,
0.042816162109375,
-0.0732421875,
0.05224609375,
0.02752685546875,
-0.0028076171875,
-0.06951904296875,
-0.01189422607421875,
-0.0147552490234375,
-0.0379638671875,
-0.0146636962890625,
0.046112060546875,
-0.0521240234375,
0.00201416015625,
-0.05352783203125,
-0.019256591796875,
0.0014944076538085938,
0.0271759033203125,
-0.0130462646484375,
-0.0032711029052734375,
0.0192413330078125,
-0.0343017578125,
-0.0155181884765625,
-0.029327392578125,
-0.0478515625,
-0.0177459716796875,
0.0081939697265625,
0.018096923828125,
-0.00028061866760253906,
0.0035114288330078125,
-0.06402587890625,
-0.0250701904296875,
-0.0445556640625,
0.0325927734375,
0.022064208984375,
0.0178985595703125,
-0.0233306884765625,
0.004047393798828125,
0.051422119140625,
0.0281524658203125,
-0.00012826919555664062,
-0.0133056640625,
0.0070648193359375,
0.0202484130859375,
-0.020294189453125,
0.005680084228515625,
0.0283966064453125,
-0.031402587890625,
0.01082611083984375,
0.0222320556640625,
0.0174713134765625,
0.024658203125,
-0.0005345344543457031,
0.00640869140625,
0.06182861328125,
0.01739501953125,
0.0293426513671875,
-0.01580810546875,
-0.01116943359375,
0.044769287109375,
0.004058837890625,
0.0286102294921875,
0.005290985107421875,
0.00952911376953125,
0.01197052001953125,
0.02679443359375,
0.0155181884765625,
0.0254974365234375,
-0.001003265380859375,
0.0203094482421875,
-0.01319122314453125,
-0.0054779052734375,
-0.01296234130859375,
0.0005307197570800781,
0.028411865234375,
0.00691986083984375,
0.0294952392578125,
0.0247650146484375,
-0.00884246826171875,
-0.0051422119140625,
-0.0009722709655761719,
-0.041717529296875,
0.013275146484375,
0.0059814453125,
-0.052520751953125,
-0.0157470703125,
-0.025909423828125,
0.0134429931640625,
0.009063720703125,
-0.0133819580078125,
0.0014743804931640625,
0.054534912109375,
-0.039581298828125,
-0.018341064453125,
-0.034027099609375,
-0.044921875,
-0.007808685302734375,
0.03900146484375,
-0.07769775390625,
-0.041595458984375,
-0.006290435791015625,
0.04327392578125,
-0.034393310546875,
-0.00011491775512695312,
-0.0167388916015625,
-0.002349853515625,
-0.0141448974609375,
-0.0758056640625,
0.061737060546875,
-0.052398681640625,
0.03997802734375,
0.0775146484375,
-0.006763458251953125,
0.031341552734375,
0.01174163818359375,
-0.0312347412109375,
-0.004055023193359375,
0.05242919921875,
0.01580810546875,
-0.0263519287109375,
-0.022003173828125,
0.0282135009765625,
0.022186279296875,
0.030853271484375,
-0.0011205673217773438,
-0.029083251953125,
-0.0008034706115722656,
0.011444091796875,
-0.06256103515625,
-0.07720947265625,
0.0241546630859375,
-0.04803466796875,
0.021697998046875,
-0.008056640625,
-0.01192474365234375,
-0.0272064208984375,
-0.0035266876220703125,
0.004055023193359375,
-0.005565643310546875,
-0.016815185546875,
-0.0716552734375,
-0.049560546875,
-0.0679931640625,
0.033050537109375,
0.00138092041015625,
0.01241302490234375,
0.01512908935546875,
0.0855712890625,
0.0258941650390625,
-0.057037353515625,
0.0285186767578125,
0.0162811279296875,
-0.023956298828125,
0.041534423828125,
0.024383544921875,
-0.030975341796875,
0.01258087158203125,
-0.004638671875,
0.0008344650268554688,
0.042572021484375,
-0.021575927734375,
0.00902557373046875,
-0.01149749755859375,
0.0174102783203125,
0.0139617919921875,
0.0021724700927734375,
0.00878143310546875,
0.00727081298828125,
0.01311492919921875,
-0.0263671875,
-0.010772705078125,
0.002140045166015625,
0.00286102294921875,
0.057037353515625,
-0.0285797119140625,
-0.005481719970703125,
0.0169677734375,
0.040252685546875,
-0.0340576171875,
-0.005527496337890625,
-0.0002949237823486328,
-0.0302581787109375,
0.01457977294921875,
-0.00824737548828125,
-0.038238525390625,
0.007305145263671875,
0.0183868408203125,
-0.0157012939453125,
-0.0126190185546875,
0.0130615234375,
0.0003533363342285156,
-0.0258941650390625,
0.034027099609375,
-0.01087188720703125,
-0.049163818359375,
0.049774169921875,
-0.00962066650390625,
-0.0124664306640625,
-0.01605224609375,
-0.021636962890625,
0.0137786865234375,
0.08135986328125,
-0.0273895263671875,
-0.03106689453125,
-0.00640869140625,
0.036529541015625,
-0.06170654296875,
-0.043121337890625,
-0.01275634765625,
0.004405975341796875,
-0.0537109375,
0.03839111328125,
0.01456451416015625,
-0.01560211181640625,
-0.036865234375,
0.005962371826171875,
-0.050384521484375,
-0.0217437744140625,
0.0264739990234375,
-0.018096923828125,
0.006591796875,
0.017120361328125,
-0.0233917236328125,
0.005886077880859375,
-0.01654052734375,
-0.035858154296875,
-0.0645751953125,
-0.01454925537109375,
0.002719879150390625,
0.0242156982421875,
-0.00917816162109375,
-0.0182647705078125,
-0.012115478515625,
0.03155517578125,
-0.0272979736328125,
0.005260467529296875,
-0.020904541015625,
0.020233154296875,
-0.023101806640625,
0.003696441650390625,
-0.02471923828125,
-0.01552581787109375,
-0.01247406005859375,
-0.02398681640625,
0.005298614501953125,
0.00757598876953125,
-0.0284271240234375,
0.004547119140625,
-0.0248870849609375,
-0.0021839141845703125,
-0.0611572265625,
-0.041107177734375,
-0.0625,
0.007080078125,
-0.04132080078125,
-0.0026721954345703125,
-0.056365966796875,
-0.085205078125,
0.04010009765625,
0.040069580078125,
-0.040557861328125,
0.0013675689697265625,
0.041656494140625,
0.01090240478515625,
-0.041107177734375,
-0.08123779296875,
0.0223846435546875,
0.038330078125,
0.01190185546875,
0.004451751708984375,
-0.023040771484375,
-0.02325439453125,
0.0274505615234375,
0.003025054931640625,
-0.007904052734375,
0.0005846023559570312,
0.04534912109375,
-0.004547119140625,
-0.05181884765625,
0.036102294921875,
-0.0278778076171875,
-0.0211029052734375,
0.052276611328125,
-0.0081939697265625,
-0.0697021484375,
-0.016754150390625,
0.09771728515625,
-0.049560546875,
0.07598876953125,
-0.0501708984375,
-0.04815673828125,
0.0390625,
-0.037200927734375,
-0.00858306884765625,
-0.0191192626953125,
0.00786590576171875,
-0.01398468017578125,
-0.038238525390625,
-0.00588226318359375,
0.0206451416015625,
0.046844482421875,
-0.00206756591796875,
0.0306396484375,
-0.001399993896484375,
-0.0136260986328125,
-0.004062652587890625,
-0.01197052001953125,
0.07659912109375,
-0.00576019287109375,
-0.053558349609375,
-0.0007433891296386719,
-0.00624847412109375,
0.043701171875,
0.036865234375,
-0.040679931640625,
-0.0038089752197265625,
0.0212554931640625,
0.008148193359375,
0.035400390625,
-0.04644775390625,
0.0233154296875,
-0.00946807861328125,
0.0081939697265625,
0.0037384033203125,
-0.005062103271484375,
0.012054443359375,
0.04693603515625,
-0.011322021484375,
0.043731689453125,
-0.017242431640625,
0.0195465087890625,
0.0084075927734375,
-0.004913330078125,
0.0066680908203125,
0.020355224609375,
0.0208892822265625,
-0.02459716796875,
0.027801513671875,
-0.009979248046875,
-0.001522064208984375,
-0.007564544677734375,
-0.02276611328125,
0.013641357421875,
0.01015472412109375,
0.044097900390625,
0.0236053466796875,
-0.004932403564453125,
-0.00443267822265625,
0.0184783935546875,
-0.00554656982421875,
-0.0016536712646484375,
-0.035491943359375,
-0.0270233154296875,
-0.01439666748046875,
-0.0125579833984375,
0.01332855224609375,
-0.033599853515625,
0.033172607421875,
-0.0273590087890625,
0.0250244140625,
-0.01459503173828125,
-0.0177001953125,
-0.017303466796875,
0.007694244384765625,
0.019989013671875,
-0.0274658203125,
-0.026123046875,
-0.0115509033203125,
-0.014801025390625,
0.055694580078125,
-0.00478363037109375,
0.036895751953125,
-0.05401611328125,
0.00876617431640625,
-0.0335693359375,
-0.0025463104248046875,
0.03033447265625,
0.0026645660400390625,
-0.010284423828125,
-0.0217742919921875,
-0.0760498046875,
-0.02850341796875,
0.045379638671875,
-0.0151214599609375,
-0.006992340087890625,
-0.0233001708984375,
0.0229949951171875,
0.007396697998046875,
0.0282440185546875,
-0.042755126953125,
-0.042144775390625,
0.005947113037109375,
0.033447265625,
-0.00943756103515625,
0.00896453857421875,
0.052764892578125,
-0.03021240234375,
0.06170654296875,
0.01251220703125,
0.018646240234375,
-0.040496826171875,
-0.021026611328125,
0.015869140625,
-0.08502197265625,
-0.0694580078125,
-0.0151519775390625,
-0.06707763671875,
0.0254058837890625,
-0.00496673583984375,
-0.0141143798828125,
0.04571533203125,
-0.0095672607421875,
0.007724761962890625,
-0.0084991455078125,
-0.0266265869140625,
-0.0233917236328125,
0.0221405029296875,
0.047943115234375,
-0.006763458251953125,
0.01145172119140625,
0.006805419921875,
-0.0311737060546875,
0.027587890625,
0.004909515380859375,
0.02032470703125,
0.0023956298828125,
-0.0159759521484375,
0.016326904296875,
0.0297698974609375,
0.03253173828125,
0.0399169921875,
-0.026123046875,
0.0280914306640625,
-0.00024187564849853516,
-0.0188446044921875,
0.007427215576171875,
0.00222015380859375,
0.06207275390625,
-0.0059051513671875,
-0.0284881591796875,
0.036590576171875,
-0.04058837890625,
0.0072174072265625,
0.0188140869140625,
0.038909912109375,
-0.045928955078125,
0.01214599609375,
0.0119781494140625,
-0.0217437744140625,
-0.00522613525390625,
0.01448822021484375,
-0.0308685302734375,
-0.04156494140625,
0.0249481201171875,
0.0040435791015625,
-0.004932403564453125,
0.0159759521484375,
0.01354217529296875,
-0.00717926025390625,
-0.003936767578125,
0.01261138916015625,
-0.004367828369140625,
-0.0055999755859375,
-0.0222930908203125,
-0.01088714599609375,
-0.00699615478515625,
-0.004886627197265625,
0.043670654296875,
-0.0156707763671875,
0.01385498046875,
-0.0653076171875,
-0.0009622573852539062,
-0.0118408203125,
-0.018310546875,
0.0207061767578125,
-0.03448486328125,
0.004863739013671875,
0.0037708282470703125,
-0.007228851318359375,
-0.00963592529296875,
-0.019012451171875,
-0.0693359375,
-0.00012123584747314453,
-0.011688232421875,
-0.0089874267578125,
0.0008492469787597656,
0.01058197021484375,
0.01202392578125,
-0.008514404296875,
-0.027496337890625,
-0.0080108642578125,
-0.035369873046875,
0.074462890625,
-0.042327880859375,
0.00049591064453125,
0.034912109375,
0.0245361328125,
0.0011577606201171875,
0.0166778564453125,
0.0224456787109375,
-0.0401611328125,
-0.0258941650390625,
0.02154541015625,
-0.0239105224609375,
-0.011871337890625,
0.00013637542724609375,
-0.019439697265625,
0.0712890625,
-0.019439697265625,
0.005542755126953125,
0.01166534423828125,
0.040924072265625,
0.0032711029052734375,
0.044525146484375,
-0.0305938720703125,
0.03570556640625,
0.01593017578125,
0.058929443359375,
-0.0506591796875,
-0.0194549560546875,
0.003437042236328125,
0.06103515625,
0.04248046875,
-0.007160186767578125,
-0.04766845703125,
0.009552001953125,
0.0943603515625,
0.0355224609375,
0.0088043212890625,
0.04498291015625,
0.036834716796875,
0.0213623046875,
0.036834716796875,
-0.00177764892578125,
0.042144775390625,
-0.0182342529296875,
-0.0199737548828125,
0.051177978515625,
0.024139404296875,
0.045867919921875,
-0.024169921875,
-0.004940032958984375,
-0.05584716796875,
-0.00812530517578125,
0.059814453125,
-0.00794219970703125,
0.023040771484375,
0.0190887451171875,
0.03179931640625,
-0.031768798828125,
-0.012908935546875,
-0.01849365234375,
0.034698486328125,
0.018768310546875,
0.045074462890625,
0.06414794921875,
0.01461029052734375,
0.04425048828125,
-0.032989501953125,
0.02484130859375,
-0.02374267578125,
-0.011962890625,
0.045196533203125,
-0.01554107666015625,
0.0190582275390625,
-0.06103515625,
0.036163330078125,
0.0264892578125,
0.056732177734375,
-0.050628662109375,
-0.0290679931640625,
0.016998291015625,
-0.0007371902465820312,
-0.00681304931640625,
-0.00183868408203125,
-0.00885772705078125,
0.034637451171875,
0.057952880859375,
-0.04998779296875,
-0.0318603515625,
0.019134521484375,
0.033294677734375,
-0.01122283935546875,
-0.0172882080078125,
-0.0006022453308105469,
-0.051971435546875,
-0.0203704833984375,
0.005504608154296875,
0.017669677734375,
0.02960205078125,
-0.0225830078125,
0.0714111328125,
-0.007556915283203125,
-0.00972747802734375,
-0.0020732879638671875,
0.01392364501953125,
0.0047149658203125,
-0.0003771781921386719,
-0.0248565673828125,
-0.0173492431640625,
-0.00688934326171875,
0.018524169921875,
0.0165557861328125,
0.0010290145874023438,
0.039398193359375,
0.05841064453125,
-0.003704071044921875,
-0.00018584728240966797,
0.06658935546875,
-0.008575439453125,
-0.041290283203125,
-0.03021240234375,
0.0303192138671875,
0.0472412109375,
0.0093994140625,
0.0289764404296875,
0.03887939453125,
0.038604736328125,
0.00562286376953125,
-0.00821685791015625,
0.01265716552734375,
-0.015869140625,
0.0478515625,
0.001983642578125,
0.03131103515625,
0.034149169921875,
-0.07476806640625,
-0.00472259521484375,
-0.025299072265625,
-0.04193115234375,
0.022857666015625,
0.044036865234375,
0.0034656524658203125,
-0.0108489990234375,
0.0291290283203125,
-0.02789306640625,
0.001041412353515625,
-0.0029697418212890625,
0.04034423828125,
0.0038967132568359375,
-0.0035648345947265625,
0.0088043212890625,
-0.04827880859375,
-0.016693115234375,
-0.0256805419921875,
0.026123046875,
-0.01236724853515625,
0.06500244140625,
-0.004302978515625,
0.00566864013671875,
-0.050933837890625,
0.01123046875,
-0.051300048828125,
-0.03839111328125,
0.06658935546875,
-0.005855560302734375,
-0.0467529296875,
0.004749298095703125,
-0.002471923828125,
0.011566162109375,
0.0259552001953125,
-0.050140380859375,
-0.0284423828125,
0.00530242919921875,
0.01515960693359375,
0.0037708282470703125,
0.0545654296875,
-0.007099151611328125,
0.021728515625,
0.001758575439453125,
-0.0401611328125,
0.04290771484375,
0.0281219482421875,
0.0235748291015625,
-0.01019287109375,
-0.0146636962890625,
-0.07745361328125,
0.0310821533203125,
-0.0258636474609375,
0.0523681640625,
0.0267181396484375,
0.01416778564453125,
0.0010271072387695312,
-0.0038013458251953125,
-0.024017333984375,
0.025238037109375,
-0.0111236572265625,
0.00803375244140625,
0.0030269622802734375,
-0.0391845703125,
-0.0147247314453125,
0.008544921875,
0.063232421875,
0.0223236083984375,
0.0271759033203125,
-0.0242462158203125,
-0.01352691650390625,
0.00084686279296875,
0.0098419189453125,
-0.038360595703125,
-0.036041259765625,
0.0450439453125,
0.014892578125,
0.01113128662109375,
0.005313873291015625,
-0.0236053466796875,
-0.028594970703125,
0.029327392578125,
-0.01024627685546875,
-0.0009608268737792969,
-0.0198974609375,
-0.0160064697265625,
-0.01099395751953125,
-0.0076141357421875,
-0.057220458984375,
0.0144805908203125,
0.0115814208984375,
-0.0252227783203125,
0.026275634765625,
-0.04522705078125,
-0.050872802734375,
-0.0122833251953125,
0.021697998046875,
0.0382080078125,
-0.0230865478515625,
-0.0113983154296875,
0.027740478515625,
0.007793426513671875,
0.078369140625,
0.00402069091796875,
0.0037670135498046875,
0.0187835693359375,
0.0008950233459472656,
-0.0633544921875,
-0.0850830078125,
0.040802001953125,
-0.07012939453125,
-0.0167236328125,
-0.016143798828125,
0.042877197265625,
0.049774169921875,
-0.0291900634765625,
-0.081298828125,
0.0552978515625,
-0.027130126953125,
-0.032135009765625,
-0.0262908935546875,
-0.01294708251953125,
-0.0010728836059570312,
0.0017900466918945312,
0.004207611083984375,
-0.02392578125,
-0.0560302734375,
0.0007271766662597656,
0.028167724609375,
0.032012939453125,
0.0186614990234375,
0.0311431884765625,
-0.1279296875,
-0.00415802001953125,
-0.056915283203125,
0.056671142578125,
0.0057830810546875,
-0.003093719482421875,
0.01300048828125,
0.0221099853515625,
-0.053314208984375,
0.00133514404296875,
0.00577545166015625,
0.060028076171875,
-0.0077972412109375,
-0.03765869140625,
-0.03253173828125,
-0.02203369140625,
0.07696533203125,
-0.00844573974609375,
0.02069091796875,
-0.0186614990234375,
-0.02825927734375,
-0.034423828125,
-0.0267333984375,
-0.0362548828125,
0.0206451416015625,
-0.078369140625,
-0.01132965087890625,
0.013946533203125,
0.001735687255859375,
0.035308837890625,
-0.01641845703125,
0.004161834716796875,
-0.0178985595703125,
-0.01812744140625,
-0.01178741455078125,
-0.0516357421875,
0.0262603759765625,
-0.05657958984375,
0.003871917724609375,
-0.033203125,
-0.0291900634765625,
0.006107330322265625,
-0.064208984375,
0.0020732879638671875,
-0.01788330078125,
0.01318359375,
0.00360870361328125,
0.01678466796875,
0.004863739013671875,
-0.01068878173828125,
0.004802703857421875,
0.01220703125,
-0.041290283203125,
0.0222930908203125,
0.0203857421875,
0.006511688232421875,
-0.047882080078125,
0.06719970703125,
0.03167724609375,
0.0548095703125,
-0.01413726806640625,
0.0732421875,
0.0200347900390625,
0.017578125,
-0.023284912109375,
0.0012636184692382812,
0.01467132568359375,
-0.023162841796875,
0.00506591796875,
0.013885498046875,
-0.01165771484375,
-0.0168609619140625,
-0.0016450881958007812,
0.01326751708984375,
-0.004150390625,
0.0136260986328125
] |
8413c2fa6693b7efdb24ab13a3282d848337d145
|
Wordpress Stackexchange
Q: Wp3.5 Media Gallery Edit modal: change captions to title How can i change those editing inputs to title from caption?
Some sources i found about new upload system:
*
*Using the WordPress 3.5 Media Uploader within plugins
*How to Add the WordPress 3.5 Media Manager Interface
Basically looking for a proper solution like this:
// http://wordpress.org/support/topic/wp-35-any-way-to-default-add-media-to-upload-files#post-3709109
// If you want to have the editor default to the Upload Files tab in the admin editor
add_action( 'admin_footer-post-new.php', 'idealien_mediaDefault_script' );
add_action( 'admin_footer-post.php', 'idealien_mediaDefault_script' );
function idealien_mediaDefault_script()
{
?>
<script type="text/javascript">
jQuery(document).ready(function($){
wp.media.controller.Library.prototype.defaults.contentUserSetting = false; // making editor default to the Upload Files
});
</script>
<?php }
A: You can deactivate the default gallery, the shortcode via hook. Also add a new function for the shortcode gallery and copz, paste from original aand change the input for caption. Put all source in a plugin. If WordPress change this in a next version, then deactivate your plugin or change it. I think it is the best solution without change the input on media manager.
|
Q: Wp3.5 Media Gallery Edit modal: change captions to title How can i change those editing inputs to title from caption?
Some sources i found about new upload system:
*
*Using the WordPress 3.5 Media Uploader within plugins
*How to Add the WordPress 3.5 Media Manager Interface
Basically looking for a proper solution like this:
// http://wordpress.org/support/topic/wp-35-any-way-to-default-add-media-to-upload-files#post-3709109
// If you want to have the editor default to the Upload Files tab in the admin editor
add_action( 'admin_footer-post-new.php', 'idealien_mediaDefault_script' );
add_action( 'admin_footer-post.php', 'idealien_mediaDefault_script' );
function idealien_mediaDefault_script()
{
?>
<script type="text/javascript">
jQuery(document).ready(function($){
wp.media.controller.Library.prototype.defaults.contentUserSetting = false; // making editor default to the Upload Files
});
</script>
<?php }
A: You can deactivate the default gallery, the shortcode via hook. Also add a new function for the shortcode gallery and copz, paste from original aand change the input for caption. Put all source in a plugin. If WordPress change this in a next version, then deactivate your plugin or change it. I think it is the best solution without change the input on media manager.
A: I explained solution here: http://unsalkorkmaz.com/wp3-5-media-gallery-edit-modal-change-captions-to-title/
If you want just solution:
add_action( 'admin_footer-post-new.php', 'firmasite_replace_script_tmpl_attachment' );
add_action( 'admin_footer-post.php', 'firmasite_replace_script_tmpl_attachment' );
function firmasite_replace_script_tmpl_attachment()
{ ?>
<script type="text/javascript">
jQuery(document).ready(function($){
jQuery("script#tmpl-attachment:first").remove();
});
</script>
<script type="text/html" id="tmpl-attachment">
<div class="attachment-preview type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}">
<# if ( data.uploading ) { #>
<div class="media-progress-bar"><div></div></div>
<# } else if ( 'image' === data.type ) { #>
<div class="thumbnail">
<div class="centered">
<img src="{{ data.size.url }}" draggable="false" />
</div>
</div>
<# } else { #>
<img src="{{ data.icon }}" class="icon" draggable="false" />
<div class="filename">
<div>{{ data.filename }}</div>
</div>
<# } #>
<# if ( data.buttons.close ) { #>
<a class="close media-modal-icon" href="#" title="<?php _e('Remove'); ?>"></a>
<# } #>
<# if ( data.buttons.check ) { #>
<a class="check" href="#" title="<?php _e('Deselect'); ?>"><div class="media-modal-icon"></div></a>
<# } #>
</div>
<#
var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly';
if ( data.describe ) { #>
<# if ( 'image' === data.type ) { #>
<input type="text" value="{{ data.title }}" class="describe" data-setting="title"
placeholder="<?php esc_attr_e('Caption this image…'); ?>" {{ maybeReadOnly }} />
<# } else { #>
<input type="text" value="{{ data.title }}" class="describe" data-setting="title"
<# if ( 'video' === data.type ) { #>
placeholder="<?php esc_attr_e('Describe this video…'); ?>"
<# } else if ( 'audio' === data.type ) { #>
placeholder="<?php esc_attr_e('Describe this audio file…'); ?>"
<# } else { #>
placeholder="<?php esc_attr_e('Describe this media file…'); ?>"
<# } #> {{ maybeReadOnly }} />
<# } #>
<# } #>
</script>
|
wordpress
|
{
"language": "en",
"length": 412,
"provenance": "stackexchange_00019.jsonl.gz:429277",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87677"
}
|
[
0.0380859375,
0.009063720703125,
0.0241851806640625,
0.004146575927734375,
-0.001434326171875,
-0.0157928466796875,
0.041778564453125,
-0.06695556640625,
0.00696563720703125,
0.0262451171875,
0.01018524169921875,
0.01470947265625,
-0.026580810546875,
-0.0205535888671875,
-0.0108795166015625,
-0.004974365234375,
-0.004241943359375,
0.018310546875,
0.01126861572265625,
-0.01425933837890625,
-0.020721435546875,
0.004024505615234375,
0.004756927490234375,
-0.006748199462890625,
0.0015316009521484375,
0.01548004150390625,
0.0286102294921875,
-0.0013666152954101562,
-0.024139404296875,
-0.024078369140625,
0.01007080078125,
0.0159759521484375,
0.02960205078125,
0.01922607421875,
-0.0587158203125,
0.029052734375,
0.0159454345703125,
0.009552001953125,
0.0088653564453125,
0.014068603515625,
0.0219573974609375,
-0.00787353515625,
-0.00980377197265625,
-0.045989990234375,
-0.0150146484375,
-0.01343536376953125,
0.019775390625,
-0.0044403076171875,
0.057098388671875,
0.011077880859375,
-0.01502227783203125,
0.004413604736328125,
-0.0030384063720703125,
-0.055023193359375,
-0.03533935546875,
-0.049591064453125,
-0.000698089599609375,
-0.01042938232421875,
0.0189361572265625,
0.0537109375,
-0.003025054931640625,
0.01055145263671875,
-0.01580810546875,
-0.058074951171875,
0.00841522216796875,
0.00849151611328125,
0.023040771484375,
0.0238800048828125,
-0.028167724609375,
-0.00228118896484375,
0.007205963134765625,
-0.03216552734375,
0.0294647216796875,
-0.033660888671875,
-0.00511932373046875,
0.04248046875,
-0.022705078125,
0.0131378173828125,
0.0484619140625,
-0.045379638671875,
0.03564453125,
-0.0111846923828125,
0.009765625,
-0.023590087890625,
0.04962158203125,
0.024444580078125,
0.0201263427734375,
-0.0311279296875,
-0.021697998046875,
0.0222930908203125,
-0.0105133056640625,
0.0002601146697998047,
-0.01181793212890625,
0.007434844970703125,
-0.00485992431640625,
-0.0167999267578125,
0.010650634765625,
0.04150390625,
-0.00860595703125,
0.0036640167236328125,
-0.00982666015625,
-0.032745361328125,
-0.0009388923645019531,
-0.032623291015625,
0.020416259765625,
0.002414703369140625,
-0.0029659271240234375,
-0.0888671875,
-0.002704620361328125,
0.0118865966796875,
-0.04132080078125,
0.036468505859375,
0.01013946533203125,
0.0289459228515625,
0.00411224365234375,
-0.01195526123046875,
-0.03839111328125,
0.06500244140625,
-0.0238494873046875,
0.061553955078125,
-0.031341552734375,
-0.005512237548828125,
-0.00004851818084716797,
-0.041473388671875,
0.008392333984375,
-0.0216217041015625,
-0.0214080810546875,
0.0092926025390625,
-0.00812530517578125,
-0.0052947998046875,
-0.037567138671875,
0.0287017822265625,
0.11767578125,
0.0343017578125,
0.0196533203125,
-0.00432586669921875,
-0.007236480712890625,
-0.01404571533203125,
0.021636962890625,
-0.0357666015625,
0.001209259033203125,
0.0039825439453125,
0.052520751953125,
0.0070953369140625,
0.003917694091796875,
0.0265350341796875,
0.0192413330078125,
0.00371551513671875,
-0.0184783935546875,
-0.071533203125,
0.027313232421875,
-0.0170135498046875,
0.02178955078125,
0.0225372314453125,
0.0172271728515625,
-0.0264739990234375,
0.0845947265625,
-0.04278564453125,
-0.004657745361328125,
-0.056060791015625,
0.0247650146484375,
-0.010101318359375,
0.0048065185546875,
-0.040496826171875,
-0.0576171875,
0.01250457763671875,
-0.0462646484375,
-0.0149688720703125,
0.02398681640625,
0.033294677734375,
0.00867462158203125,
-0.033721923828125,
-0.01264190673828125,
0.0190582275390625,
0.0003190040588378906,
0.0157318115234375,
-0.0293121337890625,
0.0257415771484375,
0.00913238525390625,
0.038055419921875,
0.0219573974609375,
-0.03240966796875,
0.046234130859375,
0.00217437744140625,
-0.059783935546875,
0.01554107666015625,
0.023040771484375,
0.0511474609375,
0.02203369140625,
0.0215606689453125,
0.0645751953125,
-0.0009245872497558594,
-0.03619384765625,
0.00986480712890625,
0.0012559890747070312,
-0.018463134765625,
-0.0275726318359375,
-0.0002237558364868164,
-0.01013946533203125,
0.008941650390625,
0.0227508544921875,
0.0254058837890625,
-0.00860595703125,
0.014678955078125,
-0.020843505859375,
-0.00447845458984375,
-0.002826690673828125,
0.01537322998046875,
0.007518768310546875,
-0.0046844482421875,
0.01078033447265625,
-0.001567840576171875,
-0.0240325927734375,
0.01727294921875,
-0.027923583984375,
0.017822265625,
-0.04150390625,
0.043212890625,
0.0028476715087890625,
0.050994873046875,
0.00518798828125,
-0.04364013671875,
0.010589599609375,
0.0025634765625,
0.0250701904296875,
-0.021148681640625,
-0.01274871826171875,
-0.03839111328125,
0.035797119140625,
-0.0036334991455078125,
-0.01119232177734375,
0.03057861328125,
-0.0104217529296875,
0.0014667510986328125,
-0.05908203125,
-0.0291595458984375,
-0.053558349609375,
-0.039031982421875,
0.0194854736328125,
0.0574951171875,
0.02764892578125,
0.0311431884765625,
0.01203155517578125,
0.0310211181640625,
0.037628173828125,
0.021026611328125,
0.04241943359375,
-0.01837158203125,
0.0159759521484375,
0.037811279296875,
-0.03570556640625,
0.00630950927734375,
0.01131439208984375,
-0.034942626953125,
0.016693115234375,
0.032257080078125,
-0.018341064453125,
-0.04638671875,
0.0301666259765625,
-0.0218505859375,
0.0232086181640625,
-0.0650634765625,
-0.057098388671875,
-0.006359100341796875,
0.02239990234375,
0.04693603515625,
0.037811279296875,
0.046539306640625,
-0.058563232421875,
0.06329345703125,
0.01495361328125,
-0.01195526123046875,
-0.0012502670288085938,
0.0222320556640625,
0.035064697265625,
0.034942626953125,
-0.032501220703125,
-0.01824951171875,
0.01059722900390625,
0.01497650146484375,
-0.0167999267578125,
0.0108642578125,
-0.063720703125,
-0.022705078125,
0.00681304931640625,
-0.05712890625,
-0.02581787109375,
-0.017059326171875,
-0.023590087890625,
-0.0293121337890625,
0.026702880859375,
-0.01230621337890625,
-0.0350341796875,
0.0248565673828125,
0.010955810546875,
-0.038116455078125,
0.0020160675048828125,
-0.061248779296875,
0.038970947265625,
-0.03814697265625,
0.0654296875,
0.07037353515625,
-0.030120849609375,
0.023101806640625,
0.00044655799865722656,
-0.01245880126953125,
-0.014190673828125,
0.0325927734375,
0.004070281982421875,
0.005481719970703125,
-0.055999755859375,
-0.00016057491302490234,
0.0008587837219238281,
0.00933837890625,
-0.04681396484375,
-0.037200927734375,
-0.044036865234375,
-0.006702423095703125,
-0.0638427734375,
-0.0099945068359375,
0.023284912109375,
-0.0771484375,
0.00980377197265625,
0.00943756103515625,
-0.044403076171875,
-0.036865234375,
0.0721435546875,
0.0008401870727539062,
0.019622802734375,
0.0206298828125,
0.00659942626953125,
0.021514892578125,
-0.01287078857421875,
-0.03692626953125,
-0.005908966064453125,
-0.012664794921875,
-0.0032825469970703125,
0.07366943359375,
0.018798828125,
-0.0231170654296875,
0.0269622802734375,
-0.042022705078125,
-0.0038242340087890625,
0.029052734375,
0.0638427734375,
-0.054840087890625,
0.002349853515625,
0.00307464599609375,
0.00980377197265625,
0.03826904296875,
-0.031768798828125,
-0.019805908203125,
-0.0154876708984375,
-0.0096282958984375,
-0.00955963134765625,
0.0599365234375,
0.0302276611328125,
-0.0191802978515625,
-0.000530242919921875,
-0.0469970703125,
0.00693511962890625,
-0.0032138824462890625,
-0.01364898681640625,
-0.0032558441162109375,
-0.01131439208984375,
-0.007541656494140625,
-0.021453857421875,
0.0229644775390625,
0.007755279541015625,
0.0406494140625,
0.036712646484375,
-0.056182861328125,
0.00678253173828125,
-0.0021076202392578125,
-0.0021495819091796875,
-0.0239715576171875,
0.01175689697265625,
-0.017974853515625,
-0.0212249755859375,
-0.005931854248046875,
0.0223388671875,
0.0208892822265625,
0.0201263427734375,
0.01611328125,
-0.031097412109375,
0.0252227783203125,
-0.03863525390625,
0.0290679931640625,
-0.062164306640625,
-0.011383056640625,
-0.040069580078125,
0.0577392578125,
-0.060577392578125,
-0.0096435546875,
0.00601959228515625,
-0.0019254684448242188,
0.01194000244140625,
-0.010406494140625,
-0.033599853515625,
-0.034423828125,
-0.0428466796875,
0.0343017578125,
-0.0066986083984375,
0.01433563232421875,
-0.006259918212890625,
-0.0099945068359375,
-0.01129913330078125,
-0.048675537109375,
0.046661376953125,
-0.0232391357421875,
-0.0007576942443847656,
0.011260986328125,
-0.03826904296875,
-0.005504608154296875,
-0.037261962890625,
-0.004802703857421875,
-0.130615234375,
-0.0426025390625,
0.0159912109375,
0.0987548828125,
-0.02313232421875,
-0.00437164306640625,
-0.07830810546875,
0.04913330078125,
0.001468658447265625,
0.03192138671875,
0.004901885986328125,
-0.00379180908203125,
0.0213775634765625,
-0.003757476806640625,
0.00711822509765625,
-0.017333984375,
-0.0022869110107421875,
-0.0212860107421875,
-0.037841796875,
0.004199981689453125,
-0.02178955078125,
-0.002777099609375,
-0.00875091552734375,
-0.0208892822265625,
-0.0704345703125,
-0.04022216796875,
-0.034912109375,
-0.01708984375,
-0.02484130859375,
-0.0053863525390625,
-0.040771484375,
-0.0665283203125,
0.049652099609375,
-0.039642333984375,
-0.002040863037109375,
0.0034198760986328125,
0.08917236328125,
0.00429534912109375,
0.005710601806640625,
-0.04296875,
-0.0270538330078125,
0.01288604736328125,
0.00414276123046875,
0.0312042236328125,
-0.005374908447265625,
-0.012786865234375,
0.04901123046875,
-0.0190582275390625,
-0.00806427001953125,
-0.03863525390625,
0.053863525390625,
0.008636474609375,
-0.00264739990234375,
0.0034351348876953125,
-0.01453399658203125,
0.037933349609375,
-0.033599853515625,
-0.0168914794921875,
0.0268402099609375,
-0.0101470947265625,
-0.0008211135864257812,
0.0147247314453125,
0.005039215087890625,
-0.02117919921875,
-0.040802001953125,
0.0135040283203125,
0.000043392181396484375,
-0.0152740478515625,
-0.0084075927734375,
0.0003407001495361328,
-0.0032138824462890625,
0.024169921875,
-0.0008702278137207031,
0.01175689697265625,
0.03778076171875,
-0.0124053955078125,
0.061126708984375,
-0.0184783935546875,
0.0003504753112792969,
-0.0233917236328125,
0.00791168212890625,
-0.03253173828125,
-0.02947998046875,
-0.03118896484375,
-0.04071044921875,
0.00984954833984375,
0.042388916015625,
0.01303863525390625,
0.010955810546875,
0.041351318359375,
0.0350341796875,
0.030914306640625,
-0.03125,
-0.0640869140625,
0.06475830078125,
-0.05072021484375,
-0.002124786376953125,
0.0013942718505859375,
-0.0155792236328125,
0.0255279541015625,
0.006999969482421875,
0.00757598876953125,
0.0030078887939453125,
-0.01904296875,
-0.022186279296875,
-0.0175628662109375,
0.0094146728515625,
0.028564453125,
0.01824951171875,
0.004138946533203125,
-0.007476806640625,
0.0313720703125,
-0.017730712890625,
-0.002292633056640625,
0.022369384765625,
0.00823974609375,
-0.0083465576171875,
-0.0087890625,
0.000514984130859375,
-0.0240631103515625,
-0.01174163818359375,
-0.003894805908203125,
-0.06402587890625,
-0.0560302734375,
-0.0155487060546875,
0.01959228515625,
0.05230712890625,
-0.021820068359375,
-0.00344085693359375,
-0.0014982223510742188,
-0.03143310546875,
-0.037933349609375,
-0.0195465087890625,
-0.0826416015625,
0.01351165771484375,
0.034759521484375,
0.04046630859375,
-0.00421905517578125,
-0.0230712890625,
-0.05059814453125,
-0.0291748046875,
-0.01039886474609375,
0.012359619140625,
0.06597900390625,
-0.052490234375,
0.01351165771484375,
-0.03045654296875,
0.032989501953125,
-0.054046630859375,
0.04364013671875,
-0.0112762451171875,
-0.00412750244140625,
0.04840087890625,
-0.0195465087890625,
-0.0159149169921875,
-0.045379638671875,
-0.037506103515625,
-0.02874755859375,
-0.03997802734375,
-0.0300445556640625,
-0.0250396728515625,
0.01091766357421875,
-0.0219268798828125,
-0.006317138671875,
-0.01317596435546875,
0.0209197998046875,
0.01198577880859375,
0.031707763671875,
0.004291534423828125,
0.00276947021484375,
0.038299560546875,
0.0190582275390625,
0.023681640625,
-0.007328033447265625,
-0.02764892578125,
-0.033477783203125,
0.01090240478515625,
-0.03485107421875,
-0.037261962890625,
0.006389617919921875,
-0.029296875,
0.0294189453125,
0.034088134765625,
-0.00408935546875,
0.0157928466796875,
0.0122528076171875,
-0.00493621826171875,
-0.020263671875,
0.012542724609375,
-0.01203155517578125,
-0.004978179931640625,
0.00931549072265625,
-0.024993896484375,
0.042266845703125,
0.00222015380859375,
-0.0036182403564453125,
0.0269317626953125,
-0.0369873046875,
0.033172607421875,
0.00872039794921875,
-0.0294952392578125,
0.03277587890625,
0.033599853515625,
-0.039642333984375,
0.003124237060546875,
0.01522064208984375,
-0.0256805419921875,
-0.0076751708984375,
0.0074920654296875,
0.018951416015625,
-0.01342010498046875,
0.05352783203125,
-0.002910614013671875,
-0.0281982421875,
0.0194549560546875,
-0.03900146484375,
0.0487060546875,
0.031646728515625,
0.07720947265625,
-0.057373046875,
0.01171112060546875,
0.01078033447265625,
-0.02569580078125,
0.0560302734375,
-0.01453399658203125,
-0.0196380615234375,
-0.0302734375,
0.0135040283203125,
-0.0252838134765625,
-0.0491943359375,
-0.0156707763671875,
-0.0019054412841796875,
0.002410888671875,
0.0200347900390625,
0.050872802734375,
0.0238189697265625,
-0.00592041015625,
-0.049652099609375,
0.00385284423828125,
-0.006195068359375,
-0.008026123046875,
0.0164337158203125,
-0.03472900390625,
-0.018035888671875,
-0.060699462890625,
-0.0305938720703125,
-0.00670623779296875,
-0.030731201171875,
0.029327392578125,
0.012481689453125,
0.029754638671875,
0.07257080078125,
-0.019683837890625,
0.01824951171875,
0.036651611328125,
-0.0182647705078125,
-0.0240325927734375,
-0.05462646484375,
-0.011749267578125,
0.0142669677734375,
-0.0380859375,
0.0244903564453125,
0.002094268798828125,
-0.039886474609375,
0.0166778564453125,
-0.00724029541015625,
0.01166534423828125,
-0.03924560546875,
-0.018524169921875,
0.017364501953125,
-0.0174560546875,
0.0245361328125,
-0.025360107421875,
0.01300048828125,
-0.07525634765625,
-0.044189453125,
-0.0153045654296875,
-0.06292724609375,
-0.020355224609375,
-0.045013427734375,
-0.074462890625,
0.1295166015625,
0.00496673583984375,
0.0274200439453125,
0.006439208984375,
0.048736572265625,
-0.054107666015625,
0.006984710693359375,
0.00783538818359375,
0.00754547119140625,
-0.05523681640625,
0.026580810546875,
-0.0187530517578125,
-0.006046295166015625,
0.009613037109375,
0.0653076171875,
0.058349609375,
0.0006213188171386719,
0.00875091552734375,
0.0179595947265625,
0.08319091796875,
0.0264434814453125,
-0.0162200927734375,
0.0180206298828125,
-0.00954437255859375,
0.0020923614501953125,
0.020416259765625,
-0.0328369140625,
0.00885772705078125,
-0.01288604736328125,
-0.0125732421875,
0.018951416015625,
0.010711669921875,
0.01175689697265625,
0.0264129638671875,
0.05029296875,
-0.0031986236572265625,
0.0004940032958984375,
0.0206146240234375,
-0.033447265625,
-0.0039520263671875,
0.0679931640625,
0.0291290283203125,
-0.00972747802734375,
0.0242156982421875,
-0.038177490234375,
0.05084228515625,
-0.015380859375,
-0.02154541015625,
0.0496826171875,
0.01885986328125,
-0.0149383544921875,
-0.013427734375,
-0.00655364990234375,
-0.00347900390625,
0.00772857666015625,
0.024078369140625,
-0.0022640228271484375,
0.006923675537109375,
-0.034423828125,
0.053680419921875,
0.0200347900390625,
0.024200439453125,
-0.03753662109375,
-0.016082763671875,
0.01336669921875,
0.007701873779296875,
-0.005413055419921875,
-0.03466796875,
-0.0035572052001953125,
-0.06427001953125,
-0.032379150390625,
-0.007564544677734375,
0.015045166015625,
0.034423828125,
0.0130462646484375,
0.01052093505859375,
0.0209808349609375,
-0.04052734375,
0.0119476318359375,
-0.034637451171875,
0.0216522216796875,
-0.01380157470703125,
0.033966064453125,
0.00551605224609375,
0.07330322265625,
-0.031768798828125,
-0.009979248046875,
-0.03546142578125,
0.038665771484375,
-0.005290985107421875,
0.0272064208984375,
-0.058135986328125,
-0.03729248046875,
0.0103302001953125,
0.045623779296875,
0.04901123046875,
0.071044921875,
0.0982666015625,
0.06256103515625,
-0.01105499267578125,
0.0174560546875,
0.04498291015625,
-0.0102081298828125,
-0.0014171600341796875,
-0.004253387451171875,
-0.00009948015213012695,
0.0198822021484375,
-0.004589080810546875,
-0.0234222412109375,
0.037872314453125,
0.04156494140625,
-0.05108642578125,
0.019012451171875,
-0.004180908203125,
-0.0618896484375,
0.00025725364685058594,
-0.0174560546875,
0.08575439453125,
-0.0178070068359375,
-0.05230712890625,
-0.003631591796875,
-0.0224456787109375,
-0.04425048828125,
0.018524169921875,
0.0257110595703125,
-0.042266845703125,
0.0372314453125,
-0.04998779296875,
-0.018951416015625,
0.0014677047729492188,
-0.00047969818115234375,
-0.0092315673828125,
-0.005725860595703125,
0.006420135498046875,
-0.0284423828125,
-0.0140380859375,
-0.005306243896484375,
-0.01097869873046875,
0.0211334228515625,
0.04254150390625,
0.068359375,
-0.01334381103515625,
0.0230255126953125,
-0.00897216796875,
-0.0226287841796875,
0.005893707275390625,
0.0094451904296875,
-0.05181884765625,
0.004955291748046875,
0.00391387939453125,
-0.007373809814453125,
0.032684326171875,
0.054443359375,
0.005558013916015625,
-0.0065765380859375,
0.02398681640625,
-0.032257080078125,
0.002880096435546875,
0.007740020751953125,
0.044036865234375,
-0.01107025146484375,
-0.047149658203125,
-0.0460205078125,
0.023895263671875,
0.01390838623046875,
0.0243072509765625,
-0.04388427734375,
0.029998779296875,
0.005687713623046875,
-0.0078887939453125,
0.0107421875,
-0.01311492919921875,
0.0203399658203125,
0.035308837890625,
-0.0262908935546875,
-0.005680084228515625,
0.032745361328125,
-0.005268096923828125,
0.0222930908203125,
0.038665771484375,
-0.00403594970703125,
0.03778076171875,
-0.063232421875,
0.005153656005859375,
0.00811004638671875,
-0.00799560546875,
-0.03948974609375,
-0.0237884521484375,
0.0355224609375,
-0.0293426513671875,
-0.020050048828125,
-0.059539794921875,
-0.03802490234375,
-0.062286376953125,
0.0009822845458984375,
0.045196533203125,
-0.0489501953125,
-0.00873565673828125,
-0.079345703125,
0.023040771484375,
0.0168609619140625,
0.004840850830078125,
-0.0523681640625,
0.04266357421875,
-0.01556396484375,
0.0144805908203125,
0.00673675537109375,
-0.00586700439453125,
-0.0154571533203125,
0.00505828857421875,
-0.058990478515625,
-0.0518798828125,
-0.04644775390625,
0.0106658935546875,
-0.062225341796875,
0.0225067138671875,
0.02935791015625,
-0.0244140625,
-0.004535675048828125,
0.033843994140625,
0.0244598388671875,
0.0806884765625,
0.004787445068359375,
-0.0297088623046875,
-0.00457763671875,
0.00998687744140625,
0.0078125,
-0.01422119140625,
-0.020843505859375,
-0.01361846923828125,
-0.0131072998046875,
0.0205078125,
-0.034454345703125,
-0.01154327392578125,
-0.05511474609375,
-0.07501220703125,
0.0168914794921875,
0.01282501220703125,
-0.045318603515625,
0.006526947021484375,
0.0172576904296875,
-0.0201873779296875,
0.0302886962890625,
0.021697998046875,
-0.046417236328125,
0.0163421630859375,
0.01336669921875,
-0.01140594482421875,
0.036834716796875,
-0.0084991455078125,
-0.00827789306640625,
0.0059356689453125,
0.01007843017578125,
0.00908660888671875,
-0.0245513916015625,
0.051025390625,
-0.034576416015625,
0.03863525390625,
0.009613037109375,
-0.076171875,
-0.0031147003173828125,
-0.04010009765625,
0.0163116455078125,
-0.0128173828125,
-0.04534912109375,
-0.036468505859375,
-0.0258026123046875,
0.0941162109375,
0.040008544921875,
0.0071868896484375,
-0.012481689453125,
0.035003662109375,
-0.030517578125,
0.01033782958984375,
-0.0033626556396484375,
-0.012847900390625,
-0.027069091796875,
-0.00853729248046875,
0.02239990234375,
-0.0097808837890625,
-0.04705810546875,
0.022979736328125,
-0.03851318359375,
-0.0282440185546875,
-0.0243682861328125,
-0.04150390625,
-0.002590179443359375,
-0.03204345703125,
0.06671142578125,
-0.03436279296875,
-0.005977630615234375,
0.002353668212890625,
0.028778076171875,
0.0194091796875,
-0.00989532470703125,
0.010345458984375,
0.0013303756713867188,
-0.04083251953125,
0.0294647216796875,
0.0047454833984375,
-0.00554656982421875,
-0.03192138671875,
-0.0269317626953125,
-0.01033782958984375,
0.01556396484375,
0.01219940185546875,
0.03765869140625,
-0.01442718505859375,
-0.01116943359375,
-0.00720977783203125,
0.006259918212890625,
-0.011993408203125,
-0.03045654296875,
-0.0153656005859375,
0.00838470458984375,
0.00463104248046875,
-0.0176544189453125,
0.057769775390625,
-0.034088134765625,
0.0133209228515625,
0.00930023193359375,
0.0115966796875,
-0.04620361328125,
0.0245361328125,
-0.040496826171875,
0.0112152099609375,
0.00399017333984375
] |
a3863732b0625a6f07647ba64f9f0e8a4086e48e
|
Wordpress Stackexchange
Q: Where does Wordpress store the users customization in the theme Good Day
When you are inside the wordpress ctrl panel, and you edit/create posts, do theme changes etc, where does Wordpress store all that content? In which files?
Thank you
A: That information is stored in the MySQL database, not in files like you may be thinking of. They aren't stored in .php or .html files.
If you want to "see" how and where that data is stored the easiest way is to browse the database using a tool like PhpMyAdmin.
NOTE: Technically, there are files associated with the MySQL database but they aren't easy to get to and you can't read them except through the interface provided by the MySQL engine.
|
Q: Where does Wordpress store the users customization in the theme Good Day
When you are inside the wordpress ctrl panel, and you edit/create posts, do theme changes etc, where does Wordpress store all that content? In which files?
Thank you
A: That information is stored in the MySQL database, not in files like you may be thinking of. They aren't stored in .php or .html files.
If you want to "see" how and where that data is stored the easiest way is to browse the database using a tool like PhpMyAdmin.
NOTE: Technically, there are files associated with the MySQL database but they aren't easy to get to and you can't read them except through the interface provided by the MySQL engine.
A: WordPress does not save anything in files. All settings are stored in your database, normally the options table. Posts are stored in posts and postmeta.
You can have a look at the Database Description to get a better understanding.
A: If your theme is called my-theme the configuration is stored as serialized PHP object in a option name called theme_mods_my-theme in the wp_options table in your Wordpress database.
Use any Database editor tool to execute the query:
SELECT * FROM `wp_options` WHERE `option_name` LIKE 'theme_mods_%'
with will return all the customizations for every theme you have in your wordpress install.
Export the query results to a SQL plain text file. Then, when you update your theme, you import your SQL file again and voilà, you have your customizatons again.
|
wordpress
|
{
"language": "en",
"length": 253,
"provenance": "stackexchange_00019.jsonl.gz:429296",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/87742"
}
|
[
0.00882720947265625,
-0.0279693603515625,
-0.002735137939453125,
-0.0229339599609375,
-0.0174407958984375,
-0.0184478759765625,
0.04010009765625,
0.0010576248168945312,
-0.00970458984375,
0.0296173095703125,
0.001209259033203125,
-0.0106201171875,
0.01244354248046875,
-0.0239715576171875,
-0.0158233642578125,
-0.0277862548828125,
0.03564453125,
-0.0064697265625,
0.04486083984375,
0.0005350112915039062,
-0.007648468017578125,
0.035675048828125,
0.046905517578125,
0.01195526123046875,
0.028594970703125,
0.01081085205078125,
0.0299530029296875,
-0.02685546875,
0.0364990234375,
-0.00948333740234375,
0.030853271484375,
-0.0135498046875,
0.0186767578125,
-0.0006747245788574219,
0.011566162109375,
0.0247650146484375,
0.002704620361328125,
-0.0116119384765625,
0.01215362548828125,
0.0040283203125,
0.0235137939453125,
-0.0164031982421875,
0.0218658447265625,
0.0308380126953125,
0.0127410888671875,
-0.07177734375,
0.052215576171875,
-0.056427001953125,
-0.005222320556640625,
-0.045440673828125,
0.0304412841796875,
0.01180267333984375,
0.055938720703125,
-0.04620361328125,
-0.01904296875,
-0.003108978271484375,
0.01123046875,
-0.01554107666015625,
0.038848876953125,
-0.0193328857421875,
-0.0266571044921875,
-0.048004150390625,
0.042083740234375,
-0.0087432861328125,
0.01247406005859375,
0.005756378173828125,
0.03546142578125,
0.0285797119140625,
-0.05859375,
-0.002056121826171875,
0.03070068359375,
-0.017578125,
0.0009665489196777344,
-0.03778076171875,
0.00902557373046875,
0.027435302734375,
-0.020751953125,
-0.00997161865234375,
0.01535797119140625,
0.01447296142578125,
0.0037689208984375,
-0.014556884765625,
-0.0020751953125,
-0.035980224609375,
-0.00888824462890625,
-0.02972412109375,
-0.00981903076171875,
0.00867462158203125,
0.0018053054809570312,
0.000823974609375,
-0.01751708984375,
0.022308349609375,
-0.0095367431640625,
0.041015625,
-0.0262451171875,
0.01520538330078125,
0.0087127685546875,
0.020355224609375,
0.006053924560546875,
0.0341796875,
-0.0184326171875,
-0.023284912109375,
0.03173828125,
-0.040374755859375,
-0.0011396408081054688,
0.0181884765625,
-0.01092529296875,
-0.0090179443359375,
0.0146942138671875,
0.0260772705078125,
-0.0267486572265625,
-0.013336181640625,
-0.01042938232421875,
-0.05584716796875,
0.026641845703125,
0.052093505859375,
-0.016876220703125,
0.059295654296875,
0.0135498046875,
0.0233612060546875,
-0.01001739501953125,
0.0021686553955078125,
-0.034576416015625,
-0.033538818359375,
-0.0178070068359375,
-0.059967041015625,
-0.0273284912109375,
0.035491943359375,
-0.062164306640625,
0.078125,
-0.003452301025390625,
-0.032867431640625,
0.038848876953125,
0.071044921875,
-0.00020360946655273438,
-0.037628173828125,
0.0202789306640625,
-0.047698974609375,
-0.01806640625,
0.051727294921875,
-0.034271240234375,
-0.0648193359375,
-0.0128326416015625,
-0.04534912109375,
0.002315521240234375,
0.022430419921875,
0.021087646484375,
0.0226593017578125,
-0.01360321044921875,
-0.04547119140625,
0.00032138824462890625,
0.006244659423828125,
0.0070343017578125,
0.019989013671875,
0.021209716796875,
0.0023479461669921875,
0.01151275634765625,
-0.00814056396484375,
0.0093536376953125,
-0.00710296630859375,
-0.02532958984375,
-0.013641357421875,
0.01824951171875,
0.0069580078125,
-0.0026721954345703125,
0.0175628662109375,
0.00960540771484375,
0.0019969940185546875,
0.018463134765625,
0.0095977783203125,
-0.02618408203125,
-0.00969696044921875,
0.0288238525390625,
0.0304107666015625,
0.00794219970703125,
0.0308990478515625,
-0.005802154541015625,
-0.019989013671875,
0.013336181640625,
0.08758544921875,
0.02301025390625,
-0.0089263916015625,
0.0041046142578125,
0.01641845703125,
-0.020477294921875,
0.037353515625,
-0.0004570484161376953,
0.057159423828125,
0.01491546630859375,
0.02618408203125,
-0.00757598876953125,
0.008697509765625,
-0.049102783203125,
0.0130615234375,
0.001415252685546875,
0.00551605224609375,
0.002712249755859375,
0.0164337158203125,
-0.0025768280029296875,
-0.01200103759765625,
-0.0024852752685546875,
-0.00939178466796875,
0.0298004150390625,
-0.0192108154296875,
-0.0228424072265625,
0.00337982177734375,
-0.0179595947265625,
0.0352783203125,
0.0308380126953125,
0.037078857421875,
-0.005504608154296875,
0.0022430419921875,
0.007640838623046875,
-0.0369873046875,
-0.0308074951171875,
0.016021728515625,
-0.01117706298828125,
0.036407470703125,
0.0200347900390625,
0.04046630859375,
0.006229400634765625,
-0.0030651092529296875,
-0.003459930419921875,
0.001628875732421875,
0.04534912109375,
0.02374267578125,
-0.02301025390625,
-0.0010232925415039062,
0.0299835205078125,
0.020599365234375,
-0.028656005859375,
0.0162811279296875,
0.0263519287109375,
0.0163116455078125,
-0.0269927978515625,
-0.017242431640625,
-0.03265380859375,
-0.09356689453125,
-0.00519561767578125,
0.061187744140625,
0.029632568359375,
0.021087646484375,
-0.016693115234375,
0.023468017578125,
0.05877685546875,
-0.00627899169921875,
0.00856781005859375,
0.00479888916015625,
0.0574951171875,
0.0843505859375,
0.0222625732421875,
-0.016693115234375,
-0.0127410888671875,
-0.030853271484375,
0.0239105224609375,
0.0146484375,
-0.0389404296875,
-0.005191802978515625,
-0.00630950927734375,
0.0246734619140625,
-0.0103607177734375,
0.0118255615234375,
0.029144287109375,
-0.0191192626953125,
0.038482666015625,
0.034942626953125,
0.039886474609375,
0.03179931640625,
-0.03277587890625,
0.0196533203125,
0.00799560546875,
-0.016754150390625,
0.0107421875,
0.00298309326171875,
-0.0386962890625,
0.0195465087890625,
-0.0233917236328125,
0.0022335052490234375,
0.006755828857421875,
-0.0022983551025390625,
-0.01727294921875,
0.0006289482116699219,
-0.0298919677734375,
-0.00576019287109375,
0.0196380615234375,
-0.0849609375,
0.00011456012725830078,
0.01409149169921875,
0.0158843994140625,
0.008453369140625,
0.0193634033203125,
0.048370361328125,
-0.024688720703125,
0.06781005859375,
-0.01983642578125,
-0.010009765625,
0.0096282958984375,
0.006679534912109375,
0.00304412841796875,
0.011474609375,
0.023345947265625,
0.06304931640625,
0.0256805419921875,
-0.004669189453125,
0.0045318603515625,
-0.019805908203125,
0.02685546875,
0.00795745849609375,
0.0004286766052246094,
-0.005558013916015625,
-0.058807373046875,
-0.0138397216796875,
0.022369384765625,
-0.005748748779296875,
0.0069427490234375,
-0.01108551025390625,
-0.0080718994140625,
0.0242767333984375,
-0.0604248046875,
-0.06829833984375,
-0.025634765625,
-0.038360595703125,
-0.017852783203125,
-0.049285888671875,
-0.0263519287109375,
0.0266571044921875,
-0.048553466796875,
0.00897216796875,
-0.0057373046875,
-0.03570556640625,
-0.0372314453125,
-0.05389404296875,
-0.054351806640625,
-0.0161285400390625,
-0.0023288726806640625,
0.01404571533203125,
-0.0005450248718261719,
0.0626220703125,
-0.004085540771484375,
-0.064453125,
-0.04833984375,
-0.0016489028930664062,
-0.0246124267578125,
-0.014007568359375,
0.033111572265625,
-0.01032257080078125,
0.0246124267578125,
0.01255035400390625,
0.0162353515625,
0.0283966064453125,
-0.0304107666015625,
-0.0263214111328125,
0.004001617431640625,
-0.0249786376953125,
-0.0081024169921875,
0.00864410400390625,
-0.0065765380859375,
-0.01384735107421875,
0.00036072731018066406,
-0.06121826171875,
-0.03277587890625,
0.0203094482421875,
-0.04693603515625,
0.03839111328125,
0.03253173828125,
-0.0161285400390625,
0.01070404052734375,
-0.0011072158813476562,
0.04156494140625,
0.01910400390625,
-0.0254669189453125,
0.0028247833251953125,
0.017303466796875,
0.0203094482421875,
0.034027099609375,
-0.003910064697265625,
0.030120849609375,
-0.0236358642578125,
0.0382080078125,
0.01708984375,
-0.01107025146484375,
-0.0164337158203125,
-0.0192108154296875,
-0.072021484375,
-0.086181640625,
0.04327392578125,
-0.005092620849609375,
0.0288848876953125,
-0.05328369140625,
-0.04290771484375,
0.002292633056640625,
0.11663818359375,
-0.07720947265625,
0.028778076171875,
0.0205841064453125,
0.0014801025390625,
-0.041229248046875,
-0.0369873046875,
-0.1282958984375,
-0.0016260147094726562,
-0.061248779296875,
-0.007709503173828125,
-0.0272979736328125,
-0.01302337646484375,
-0.032562255859375,
0.0283203125,
-0.05615234375,
-0.032958984375,
0.0166168212890625,
-0.037506103515625,
0.060394287109375,
-0.0221099853515625,
0.06201171875,
-0.048370361328125,
0.0166778564453125,
-0.0499267578125,
-0.075927734375,
-0.0145111083984375,
-0.009307861328125,
0.041015625,
0.0234222412109375,
-0.038543701171875,
-0.00826263427734375,
0.0335693359375,
-0.0006232261657714844,
0.026824951171875,
0.0172119140625,
0.0279541015625,
-0.002040863037109375,
-0.052337646484375,
0.0049591064453125,
-0.057037353515625,
-0.01174163818359375,
-0.02593994140625,
-0.012542724609375,
0.0064239501953125,
-0.0279388427734375,
0.01456451416015625,
-0.01557159423828125,
0.003147125244140625,
-0.0117645263671875,
0.0121307373046875,
-0.0232391357421875,
0.012420654296875,
-0.0275115966796875,
0.00849151611328125,
0.00859832763671875,
-0.03399658203125,
0.0438232421875,
-0.0005640983581542969,
0.0015354156494140625,
0.0208892822265625,
0.07550048828125,
0.0150909423828125,
-0.026824951171875,
-0.0936279296875,
0.0098419189453125,
0.07159423828125,
0.016693115234375,
0.0287933349609375,
0.05389404296875,
-0.036529541015625,
0.01154327392578125,
0.059356689453125,
-0.00894927978515625,
-0.04449462890625,
0.096435546875,
-0.0097808837890625,
-0.00872802734375,
0.01001739501953125,
-0.02667236328125,
0.01413726806640625,
0.01213836669921875,
-0.005859375,
-0.00922393798828125,
0.0134124755859375,
0.0298309326171875,
-0.01018524169921875,
-0.00817108154296875,
-0.034942626953125,
-0.0521240234375,
0.0080718994140625,
-0.07513427734375,
0.0394287109375,
-0.0250396728515625,
0.01477813720703125,
0.0272674560546875,
0.030792236328125,
-0.007717132568359375,
0.0306854248046875,
-0.005886077880859375,
0.02166748046875,
0.0357666015625,
0.0021686553955078125,
0.00730133056640625,
0.0095672607421875,
-0.0006775856018066406,
0.0284881591796875,
-0.01148223876953125,
-0.053985595703125,
-0.00475311279296875,
0.0010080337524414062,
0.030426025390625,
0.03924560546875,
-0.0218505859375,
0.0157470703125,
0.0199737548828125,
0.00975799560546875,
0.0106353759765625,
-0.0185089111328125,
0.004302978515625,
-0.0111541748046875,
0.022796630859375,
-0.012847900390625,
-0.00823211669921875,
0.0175018310546875,
0.01058197021484375,
-0.009246826171875,
-0.0036220550537109375,
-0.002471923828125,
0.030059814453125,
0.044677734375,
0.0169830322265625,
0.007312774658203125,
0.0361328125,
-0.0232391357421875,
-0.007171630859375,
0.01322174072265625,
-0.02215576171875,
0.029022216796875,
0.01128387451171875,
0.050933837890625,
-0.0027256011962890625,
-0.039642333984375,
0.019744873046875,
-0.050140380859375,
0.0193023681640625,
0.0046234130859375,
-0.032989501953125,
-0.06610107421875,
0.023468017578125,
0.04608154296875,
-0.0020465850830078125,
-0.056304931640625,
-0.01154327392578125,
-0.00995635986328125,
-0.052581787109375,
-0.036956787109375,
0.03924560546875,
-0.05426025390625,
-0.01593017578125,
-0.021575927734375,
-0.08642578125,
0.00815582275390625,
0.00478363037109375,
-0.047393798828125,
-0.0750732421875,
0.019012451171875,
-0.01180267333984375,
0.015106201171875,
-0.004245758056640625,
0.01751708984375,
-0.0220794677734375,
-0.0091094970703125,
-0.0279998779296875,
0.0007357597351074219,
0.0506591796875,
0.0100860595703125,
-0.057586669921875,
0.01079559326171875,
-0.012847900390625,
-0.0019397735595703125,
0.0126495361328125,
-0.03485107421875,
-0.056488037109375,
-0.03302001953125,
0.00661468505859375,
0.00467681884765625,
-0.015777587890625,
-0.0166015625,
-0.03546142578125,
0.03521728515625,
0.0295257568359375,
0.05255126953125,
-0.00179290771484375,
0.078369140625,
-0.02386474609375,
0.07843017578125,
0.00408935546875,
0.03704833984375,
-0.0297088623046875,
-0.0224609375,
0.037750244140625,
-0.01526641845703125,
-0.05230712890625,
-0.06982421875,
-0.007778167724609375,
0.0306396484375,
0.0714111328125,
-0.0186004638671875,
0.00670623779296875,
-0.016815185546875,
0.0208587646484375,
-0.003681182861328125,
-0.0004925727844238281,
-0.0191802978515625,
-0.036041259765625,
0.041778564453125,
-0.0022945404052734375,
0.02386474609375,
0.03021240234375,
-0.02386474609375,
0.0085906982421875,
0.0137939453125,
0.02838134765625,
-0.0141448974609375,
-0.04156494140625,
0.0499267578125,
0.038543701171875,
0.0091094970703125,
0.0318603515625,
-0.004520416259765625,
0.01361083984375,
-0.016693115234375,
0.031341552734375,
-0.060791015625,
-0.0235137939453125,
0.0256805419921875,
0.021270751953125,
-0.0252227783203125,
0.02606201171875,
-0.0152130126953125,
0.003688812255859375,
0.077880859375,
0.0770263671875,
-0.0860595703125,
0.0030364990234375,
0.00958251953125,
0.004344940185546875,
0.0205535888671875,
0.01922607421875,
-0.01531219482421875,
-0.035675048828125,
0.0040130615234375,
0.005054473876953125,
-0.0030345916748046875,
-0.0038089752197265625,
0.01541900634765625,
-0.0032482147216796875,
0.00919342041015625,
0.06512451171875,
-0.006504058837890625,
-0.03302001953125,
-0.03704833984375,
0.0224456787109375,
-0.0294647216796875,
-0.0109710693359375,
0.002960205078125,
0.005649566650390625,
0.0014667510986328125,
-0.03277587890625,
0.034088134765625,
-0.017059326171875,
0.0080718994140625,
-0.02130126953125,
-0.028533935546875,
0.050689697265625,
0.058990478515625,
-0.032073974609375,
0.00797271728515625,
0.0112152099609375,
0.031951904296875,
-0.0305328369140625,
-0.019134521484375,
0.00732421875,
0.043487548828125,
-0.0662841796875,
0.0283203125,
-0.034759521484375,
0.005889892578125,
-0.0206451416015625,
-0.0029697418212890625,
0.0660400390625,
-0.068115234375,
0.005817413330078125,
0.038909912109375,
0.0109710693359375,
-0.01392364501953125,
-0.034088134765625,
0.024322509765625,
0.0003769397735595703,
0.05963134765625,
-0.0143890380859375,
0.03594970703125,
-0.0014715194702148438,
-0.0185089111328125,
-0.06414794921875,
0.060333251953125,
-0.0178375244140625,
0.0257110595703125,
-0.0005731582641601562,
0.0300140380859375,
0.0031986236572265625,
-0.004848480224609375,
-0.02410888671875,
0.032958984375,
-0.00518798828125,
0.058990478515625,
-0.034149169921875,
-0.01226043701171875,
0.01812744140625,
0.035400390625,
0.080322265625,
0.016571044921875,
-0.0322265625,
0.00720977783203125,
0.053558349609375,
0.034027099609375,
-0.004383087158203125,
0.04400634765625,
-0.011749267578125,
-0.0026569366455078125,
0.0535888671875,
-0.0236053466796875,
0.0253448486328125,
-0.00984954833984375,
0.0036468505859375,
-0.0182037353515625,
-0.0086212158203125,
-0.0149078369140625,
-0.0012559890747070312,
0.00855255126953125,
-0.037109375,
-0.003429412841796875,
0.0147552490234375,
-0.0161590576171875,
-0.015777587890625,
0.03045654296875,
0.048065185546875,
-0.051422119140625,
-0.031402587890625,
-0.024261474609375,
0.0452880859375,
0.018280029296875,
0.03717041015625,
-0.01898193359375,
-0.0004715919494628906,
-0.0002129077911376953,
-0.010955810546875,
0.00971221923828125,
0.0350341796875,
-0.053558349609375,
0.0460205078125,
0.046661376953125,
0.0166778564453125,
-0.032684326171875,
-0.01751708984375,
0.0262603759765625,
0.072509765625,
-0.04119873046875,
-0.031829833984375,
0.0183868408203125,
0.0231475830078125,
-0.01318359375,
0.0211029052734375,
0.0039520263671875,
0.02178955078125,
0.055450439453125,
-0.015716552734375,
-0.0028820037841796875,
0.0274658203125,
0.007427215576171875,
-0.003963470458984375,
0.034210205078125,
-0.006160736083984375,
0.0021114349365234375,
-0.0034122467041015625,
-0.0013666152954101562,
-0.0101318359375,
-0.01166534423828125,
0.002239227294921875,
0.0048370361328125,
0.03717041015625,
0.023773193359375,
-0.01416778564453125,
0.0075531005859375,
0.00916290283203125,
0.0195770263671875,
-0.051483154296875,
-0.026641845703125,
0.0159454345703125,
0.038604736328125,
-0.0128021240234375,
-0.006855010986328125,
0.00585174560546875,
0.044219970703125,
-0.0035152435302734375,
-0.018157958984375,
0.00879669189453125,
-0.00989532470703125,
0.0207672119140625,
-0.036895751953125,
0.040374755859375,
0.038848876953125,
0.0022411346435546875,
-0.0098876953125,
0.0290069580078125,
0.0826416015625,
0.0020160675048828125,
-0.00212860107421875,
0.00460052490234375,
-0.01474761962890625,
0.01073455810546875,
-0.00580596923828125,
0.0036220550537109375,
0.024383544921875,
-0.006832122802734375,
-0.0201873779296875,
-0.0213165283203125,
-0.01508331298828125,
-0.01311492919921875,
0.0257415771484375,
0.022064208984375,
-0.01427459716796875,
0.01532745361328125,
-0.027801513671875,
-0.004680633544921875,
0.03289794921875,
0.003818511962890625,
0.011810302734375,
0.0269012451171875,
-0.00409698486328125,
-0.05029296875,
-0.0245819091796875,
0.003017425537109375,
0.01788330078125,
-0.01238250732421875,
0.0006937980651855469,
0.0243072509765625,
0.0300140380859375,
-0.023590087890625,
-0.00782012939453125,
0.0013275146484375,
-0.029022216796875,
0.037506103515625,
0.024871826171875,
0.0017795562744140625,
-0.0234527587890625,
-0.03314208984375,
0.00960540771484375,
0.04010009765625,
-0.039154052734375,
0.01195526123046875,
0.004528045654296875,
0.01132965087890625,
-0.051849365234375,
-0.00099945068359375,
-0.01363372802734375,
-0.0285797119140625,
-0.0177154541015625,
0.01343536376953125,
0.00836181640625,
-0.01751708984375,
-0.038818359375,
0.0229644775390625,
0.026031494140625,
-0.01302337646484375,
0.027099609375,
-0.0159149169921875,
0.055389404296875,
0.041900634765625,
-0.014617919921875,
-0.053192138671875,
0.004222869873046875,
-0.00820159912109375,
-0.018035888671875,
0.0169830322265625,
0.01308441162109375,
0.04241943359375,
-0.067626953125,
0.0100860595703125,
0.050201416015625,
0.0791015625,
0.025543212890625,
0.0285186767578125,
-0.0228729248046875,
-0.024993896484375,
0.0323486328125,
-0.0249481201171875,
-0.0304412841796875,
-0.04949951171875,
-0.01393890380859375,
0.041961669921875,
-0.0426025390625,
-0.0029964447021484375,
-0.08917236328125,
0.00913238525390625,
0.0281829833984375,
-0.0088348388671875,
-0.0308837890625,
0.00980377197265625,
-0.03997802734375,
0.04583740234375,
-0.0279083251953125,
-0.022491455078125,
0.0170440673828125,
0.0251922607421875,
-0.003742218017578125,
-0.01045989990234375,
-0.0099029541015625,
0.013641357421875,
0.021087646484375,
0.015869140625,
0.02459716796875,
-0.00420379638671875,
-0.00897216796875,
0.05133056640625,
0.0002105236053466797,
0.09991455078125,
-0.041656494140625,
-0.027252197265625,
0.0166168212890625,
0.002468109130859375,
0.01116180419921875,
-0.0316162109375,
-0.045440673828125,
0.0283355712890625,
0.0210418701171875,
-0.04180908203125,
0.01105499267578125,
0.007350921630859375,
-0.0543212890625,
-0.0662841796875,
0.032012939453125,
-0.01274871826171875,
-0.03814697265625,
-0.0357666015625,
0.00383758544921875,
-0.00347900390625,
-0.00959014892578125,
-0.0230560302734375,
-0.0016260147094726562,
-0.0250091552734375,
0.03839111328125,
0.0271148681640625,
0.0229034423828125,
0.0040130615234375,
0.0183258056640625,
-0.098876953125,
-0.004261016845703125,
-0.028411865234375,
0.029296875,
0.041961669921875,
-0.052032470703125,
0.060272216796875,
0.067138671875,
-0.0313720703125,
-0.050933837890625,
-0.006450653076171875,
-0.020050048828125,
-0.0328369140625,
-0.0014295578002929688,
-0.0007796287536621094,
-0.0089263916015625,
0.04754638671875,
0.034332275390625,
0.005321502685546875,
-0.0137939453125,
-0.01085662841796875,
-0.0204010009765625,
0.021881103515625,
0.01491546630859375,
0.01296234130859375,
-0.036834716796875,
0.0125885009765625,
0.039031982421875,
-0.0343017578125,
0.0005774497985839844,
0.0295562744140625,
-0.0616455078125,
0.00887298583984375,
0.00803375244140625,
-0.033599853515625,
-0.038055419921875,
-0.0482177734375,
0.040008544921875,
-0.0192718505859375,
0.00698089599609375,
0.00691986083984375,
0.02923583984375,
0.0207366943359375,
0.048583984375,
0.009490966796875,
0.0002111196517944336,
-0.032440185546875,
0.0433349609375,
-0.01448822021484375,
0.0560302734375,
-0.062225341796875,
-0.010467529296875,
0.01593017578125,
0.019989013671875,
-0.02734375,
0.0178375244140625,
0.019073486328125,
0.0609130859375,
-0.0099639892578125,
0.0423583984375,
-0.0260467529296875,
-0.06170654296875,
-0.050872802734375,
0.0584716796875,
-0.0350341796875,
-0.0008983612060546875,
-0.0012845993041992188,
-0.03955078125,
0.0088043212890625,
-0.017791748046875,
0.034454345703125,
-0.0182037353515625,
-0.0215301513671875,
-0.052490234375,
-0.0214080810546875,
0.0150146484375
] |
65e5bd6127666b9bf8fae2946dde9635fd2b4c64
|
Wordpress Stackexchange
Q: Run a function when a new site is created in Wordpress Multisite I am currently developing a multi-site plug-in for WordPress. I need to run a function when a new site is created.
A: I guess you are looking for an action/filter.
wpmu_new_blog this action is fired in wpmu_create_blog function (wp-includes/ms-functions.php)
do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );
|
Q: Run a function when a new site is created in Wordpress Multisite I am currently developing a multi-site plug-in for WordPress. I need to run a function when a new site is created.
A: I guess you are looking for an action/filter.
wpmu_new_blog this action is fired in wpmu_create_blog function (wp-includes/ms-functions.php)
do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );
A: Since WP 5.1.0, wpmu_new_blog has been deprecated in favour of wp_insert_site:
/**
* Fires once a site has been inserted into the database.
*
* @since 5.1.0
*
* @param WP_Site $new_site New site object.
*/
do_action( 'wp_insert_site', $new_site );
Use it like this in your plugin or theme:
add_action('wp_insert_site', function($site) {
// do something
});
A good place to look for available hooks is wp-includes/ms-default-filters.php
wp_insert_site on WordPress Developer Handbook
|
wordpress
|
{
"language": "en",
"length": 133,
"provenance": "stackexchange_00019.jsonl.gz:429444",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/88258"
}
|
[
0.05194091796875,
-0.005001068115234375,
0.0018463134765625,
-0.0213165283203125,
-0.004608154296875,
-0.036163330078125,
0.0117645263671875,
-0.029632568359375,
-0.033905029296875,
-0.025177001953125,
-0.03765869140625,
0.042938232421875,
-0.04522705078125,
-0.0222625732421875,
0.056854248046875,
-0.049896240234375,
0.043792724609375,
-0.0191192626953125,
0.0263824462890625,
-0.0057830810546875,
-0.017852783203125,
0.043609619140625,
0.0179595947265625,
0.052490234375,
0.011871337890625,
-0.023162841796875,
0.03594970703125,
0.0156097412109375,
0.010040283203125,
-0.01081085205078125,
0.02471923828125,
0.01183319091796875,
0.00013947486877441406,
0.0186767578125,
-0.00954437255859375,
0.041473388671875,
0.0091552734375,
0.010040283203125,
0.0218505859375,
0.04010009765625,
0.0289306640625,
-0.016815185546875,
-0.007205963134765625,
0.039154052734375,
0.01203155517578125,
-0.08319091796875,
0.0679931640625,
-0.05914306640625,
0.0172271728515625,
0.01528167724609375,
0.00811767578125,
-0.011688232421875,
0.00849151611328125,
-0.0220794677734375,
-0.01467132568359375,
-0.0142669677734375,
-0.0115966796875,
0.01213836669921875,
0.016204833984375,
0.014129638671875,
-0.01158905029296875,
0.0275421142578125,
0.012176513671875,
-0.00595855712890625,
0.0069580078125,
0.0061187744140625,
-0.0262298583984375,
0.026458740234375,
-0.028106689453125,
0.01282501220703125,
0.0086212158203125,
-0.037994384765625,
-0.005863189697265625,
0.035614013671875,
0.00011277198791503906,
-0.040557861328125,
0.0193634033203125,
0.00623321533203125,
0.0172271728515625,
0.03106689453125,
0.0132904052734375,
-0.0100555419921875,
0.00800323486328125,
-0.040740966796875,
0.01409912109375,
-0.0154876708984375,
0.00438690185546875,
0.006710052490234375,
-0.0455322265625,
-0.0218505859375,
-0.033660888671875,
-0.0015020370483398438,
-0.04803466796875,
-0.01427459716796875,
-0.025115966796875,
-0.0162200927734375,
0.0199737548828125,
0.08203125,
-0.03228759765625,
0.004215240478515625,
-0.039093017578125,
-0.0235748291015625,
-0.011199951171875,
-0.037353515625,
0.0300445556640625,
0.06805419921875,
0.00034809112548828125,
-0.03485107421875,
0.005016326904296875,
-0.01320648193359375,
-0.001422882080078125,
-0.0299835205078125,
-0.00897979736328125,
-0.013763427734375,
-0.0208740234375,
-0.01517486572265625,
-0.037322998046875,
-0.00519561767578125,
-0.0006380081176757812,
-0.045013427734375,
-0.0028133392333984375,
-0.0020999908447265625,
0.0450439453125,
0.00839996337890625,
0.0202484130859375,
0.01291656494140625,
-0.03668212890625,
-0.048095703125,
-0.0270233154296875,
-0.0151824951171875,
-0.0288848876953125,
0.018890380859375,
0.032867431640625,
0.01873779296875,
-0.0128173828125,
-0.01467132568359375,
0.05487060546875,
0.0225372314453125,
0.002674102783203125,
0.0168304443359375,
0.043975830078125,
-0.059234619140625,
-0.07586669921875,
0.028839111328125,
0.027557373046875,
0.034027099609375,
0.0182952880859375,
-0.00804901123046875,
0.0011358261108398438,
-0.01270294189453125,
-0.036224365234375,
0.0006723403930664062,
0.0139007568359375,
-0.01006317138671875,
0.03057861328125,
-0.0303497314453125,
-0.00783538818359375,
-0.01508331298828125,
0.0218505859375,
0.01006317138671875,
0.006072998046875,
0.019317626953125,
0.001956939697265625,
-0.032684326171875,
-0.037200927734375,
-0.034393310546875,
-0.0235137939453125,
0.004505157470703125,
0.0288543701171875,
0.013275146484375,
-0.036895751953125,
-0.037872314453125,
0.07623291015625,
0.0325927734375,
-0.01364898681640625,
0.056793212890625,
-0.00443267822265625,
0.0066070556640625,
0.026580810546875,
0.037628173828125,
0.0137939453125,
-0.0205230712890625,
0.0478515625,
-0.0020351409912109375,
-0.070068359375,
0.03564453125,
-0.01273345947265625,
0.055419921875,
0.054443359375,
0.0032863616943359375,
0.01910400390625,
-0.0108489990234375,
-0.01151275634765625,
-0.00146484375,
0.02508544921875,
-0.02508544921875,
-0.0231170654296875,
-0.0157318115234375,
-0.007678985595703125,
-0.027313232421875,
0.004596710205078125,
0.03192138671875,
-0.00028514862060546875,
0.0227203369140625,
-0.021942138671875,
0.0251922607421875,
-0.0131988525390625,
0.0294647216796875,
0.03955078125,
-0.0137481689453125,
-0.0059051513671875,
0.0075531005859375,
0.01702880859375,
-0.059783935546875,
-0.0546875,
0.03875732421875,
-0.028839111328125,
0.0082855224609375,
-0.004375457763671875,
0.0131378173828125,
-0.03900146484375,
0.01454925537109375,
-0.042938232421875,
-0.04010009765625,
0.0413818359375,
-0.054595947265625,
-0.01263427734375,
-0.048095703125,
-0.00372314453125,
-0.00531005859375,
-0.053436279296875,
0.0626220703125,
0.038604736328125,
0.045074462890625,
-0.00894927978515625,
0.0026264190673828125,
-0.0035266876220703125,
-0.043914794921875,
0.0027828216552734375,
0.03662109375,
0.0235137939453125,
0.029052734375,
0.004627227783203125,
0.029052734375,
0.031982421875,
0.0148468017578125,
0.03985595703125,
0.0006432533264160156,
0.03485107421875,
0.09930419921875,
-0.046356201171875,
-0.0031299591064453125,
-0.0008139610290527344,
-0.06085205078125,
-0.007465362548828125,
0.047027587890625,
-0.01617431640625,
-0.05450439453125,
0.0172119140625,
-0.01181793212890625,
0.03253173828125,
-0.039947509765625,
-0.057159423828125,
0.0214996337890625,
0.0039215087890625,
0.0217742919921875,
-0.006069183349609375,
-0.004741668701171875,
-0.032440185546875,
0.034271240234375,
0.023712158203125,
-0.0286102294921875,
-0.0089569091796875,
0.04180908203125,
0.0244598388671875,
-0.0230712890625,
-0.0223541259765625,
-0.00786590576171875,
-0.0218505859375,
0.0106353759765625,
-0.02490234375,
0.040802001953125,
-0.06024169921875,
-0.028350830078125,
-0.0098114013671875,
0.00009071826934814453,
-0.01959228515625,
-0.02947998046875,
0.0218353271484375,
-0.04541015625,
0.001995086669921875,
-0.0200653076171875,
-0.05224609375,
0.050201416015625,
0.0265960693359375,
-0.07098388671875,
0.007049560546875,
-0.0262451171875,
0.02496337890625,
-0.0276336669921875,
0.02044677734375,
0.06414794921875,
-0.0119476318359375,
0.007434844970703125,
-0.0025005340576171875,
0.014862060546875,
0.0033111572265625,
0.0004413127899169922,
-0.00885772705078125,
-0.0011730194091796875,
-0.04412841796875,
0.020050048828125,
0.0233001708984375,
0.0297393798828125,
0.003391265869140625,
-0.0227203369140625,
-0.01995849609375,
0.0004334449768066406,
-0.056243896484375,
-0.038604736328125,
-0.08258056640625,
-0.0697021484375,
0.0166015625,
-0.034698486328125,
-0.0158538818359375,
0.0171966552734375,
-0.01727294921875,
0.0215606689453125,
-0.0201416015625,
-0.0082855224609375,
-0.056884765625,
-0.06072998046875,
-0.06610107421875,
-0.0145721435546875,
-0.01433563232421875,
0.0086517333984375,
-0.0055084228515625,
0.04559326171875,
-0.0063934326171875,
-0.059295654296875,
-0.0278778076171875,
-0.0118255615234375,
-0.023712158203125,
-0.0066986083984375,
-0.0203857421875,
-0.00447845458984375,
-0.0033168792724609375,
-0.01282501220703125,
0.0750732421875,
0.05413818359375,
-0.04052734375,
0.03143310546875,
-0.0057220458984375,
-0.048492431640625,
0.0006203651428222656,
-0.0190582275390625,
-0.0003409385681152344,
-0.041534423828125,
-0.006069183349609375,
-0.075439453125,
0.0126495361328125,
-0.0214996337890625,
-0.0421142578125,
0.01406097412109375,
0.0287322998046875,
-0.0230865478515625,
-0.0015668869018554688,
-0.0179290771484375,
0.01499176025390625,
-0.0194091796875,
0.043670654296875,
-0.00890350341796875,
0.0206298828125,
-0.0125885009765625,
-0.0184326171875,
-0.0633544921875,
0.048065185546875,
-0.01019287109375,
-0.022979736328125,
-0.001415252685546875,
0.005435943603515625,
-0.026214599609375,
0.007259368896484375,
-0.05975341796875,
0.01715087890625,
0.00899505615234375,
0.0009360313415527344,
0.043121337890625,
-0.01151275634765625,
-0.020233154296875,
-0.016754150390625,
0.04754638671875,
-0.03643798828125,
-0.00815582275390625,
0.00896453857421875,
0.0159149169921875,
-0.04730224609375,
-0.042144775390625,
-0.057769775390625,
0.006622314453125,
-0.07122802734375,
0.0143280029296875,
-0.01605224609375,
-0.004535675048828125,
-0.0276641845703125,
0.0499267578125,
-0.031768798828125,
-0.03912353515625,
0.02777099609375,
-0.00441741943359375,
0.005123138427734375,
-0.01419830322265625,
-0.00023853778839111328,
-0.036041259765625,
0.004016876220703125,
-0.020477294921875,
-0.025115966796875,
-0.00717926025390625,
-0.053070068359375,
0.042327880859375,
0.03369140625,
-0.00981903076171875,
0.0013437271118164062,
0.0218658447265625,
-0.017852783203125,
0.0302276611328125,
-0.031463623046875,
0.0171051025390625,
-0.01555633544921875,
-0.0234527587890625,
-0.01690673828125,
-0.033843994140625,
-0.0191497802734375,
-0.0220794677734375,
0.00292205810546875,
0.03350830078125,
-0.0211639404296875,
0.01727294921875,
-0.01776123046875,
0.0022125244140625,
-0.006710052490234375,
-0.034881591796875,
0.01483154296875,
0.004795074462890625,
-0.0008587837219238281,
0.0015506744384765625,
-0.0224761962890625,
0.00519561767578125,
-0.00048661231994628906,
-0.052886962890625,
-0.0093536376953125,
0.0191192626953125,
0.0628662109375,
0.01270294189453125,
0.021331787109375,
-0.01380157470703125,
0.004878997802734375,
0.02044677734375,
-0.005558013916015625,
0.00907135009765625,
-0.01318359375,
-0.004734039306640625,
0.0098419189453125,
-0.0110931396484375,
0.019744873046875,
-0.0155487060546875,
0.023712158203125,
0.018798828125,
0.007129669189453125,
0.008453369140625,
0.0184783935546875,
-0.005157470703125,
0.01068878173828125,
-0.0179290771484375,
-0.01009368896484375,
0.0101318359375,
0.020965576171875,
-0.020111083984375,
0.0016460418701171875,
-0.02703857421875,
-0.025726318359375,
0.016693115234375,
-0.0239715576171875,
-0.001491546630859375,
0.0245819091796875,
-0.002655029296875,
-0.0049591064453125,
-0.0139617919921875,
-0.005069732666015625,
0.0031108856201171875,
-0.010406494140625,
0.002330780029296875,
0.0244293212890625,
0.008392333984375,
-0.0040130615234375,
0.003459930419921875,
-0.00738525390625,
0.03216552734375,
0.01275634765625,
-0.035614013671875,
0.01180267333984375,
0.0036106109619140625,
0.0301971435546875,
0.0140228271484375,
-0.0369873046875,
0.039337158203125,
0.05596923828125,
-0.058013916015625,
-0.0221405029296875,
-0.0016965866088867188,
-0.023193359375,
-0.06414794921875,
-0.044952392578125,
-0.026336669921875,
-0.018096923828125,
0.059356689453125,
-0.0028705596923828125,
-0.04046630859375,
0.050262451171875,
-0.01242828369140625,
0.0478515625,
0.036529541015625,
0.01300811767578125,
0.021484375,
-0.00887298583984375,
-0.01293182373046875,
-0.0018053054809570312,
-0.019683837890625,
-0.0186767578125,
0.002368927001953125,
0.023773193359375,
0.0132904052734375,
0.0273895263671875,
0.005733489990234375,
0.0109405517578125,
0.0110626220703125,
-0.00025653839111328125,
0.022003173828125,
0.0232696533203125,
-0.00934600830078125,
0.0021610260009765625,
0.0193634033203125,
0.010101318359375,
0.0018053054809570312,
0.01331329345703125,
0.011260986328125,
0.0177459716796875,
0.06622314453125,
-0.0809326171875,
0.04693603515625,
-0.01181793212890625,
-0.0213470458984375,
-0.031585693359375,
-0.030487060546875,
0.0100555419921875,
-0.0031108856201171875,
0.0164337158203125,
-0.03656005859375,
-0.036224365234375,
0.039794921875,
-0.033538818359375,
0.026824951171875,
-0.057403564453125,
0.0335693359375,
-0.013519287109375,
0.00016760826110839844,
0.057373046875,
0.0308074951171875,
-0.024658203125,
-0.0124053955078125,
0.003658294677734375,
-0.01369476318359375,
-0.0034503936767578125,
0.0003910064697265625,
-0.0394287109375,
-0.00411224365234375,
-0.0014257431030273438,
-0.01473236083984375,
-0.005565643310546875,
-0.0125579833984375,
-0.0013561248779296875,
0.0096588134765625,
0.00971221923828125,
-0.030548095703125,
-0.0292205810546875,
0.048614501953125,
0.051116943359375,
0.027099609375,
0.03948974609375,
0.02716064453125,
-0.012542724609375,
-0.01898193359375,
0.00009465217590332031,
-0.00879669189453125,
-0.0234832763671875,
-0.0081787109375,
-0.02691650390625,
0.00885772705078125,
0.06549072265625,
-0.007106781005859375,
0.04718017578125,
-0.007232666015625,
-0.009674072265625,
-0.02520751953125,
-0.02850341796875,
-0.0163116455078125,
0.057769775390625,
-0.0133514404296875,
-0.06756591796875,
0.01010894775390625,
0.02630615234375,
0.01496124267578125,
0.05450439453125,
-0.052825927734375,
0.034881591796875,
0.052276611328125,
-0.04290771484375,
0.0814208984375,
0.0604248046875,
-0.046234130859375,
0.00992584228515625,
0.026519775390625,
-0.0162811279296875,
-0.01403045654296875,
-0.017608642578125,
-0.006866455078125,
-0.035064697265625,
0.032257080078125,
0.0039825439453125,
-0.0035800933837890625,
0.042327880859375,
-0.0218963623046875,
0.00978851318359375,
0.0246124267578125,
0.05401611328125,
-0.043975830078125,
0.006855010986328125,
0.02276611328125,
0.0023784637451171875,
0.039093017578125,
-0.0188140869140625,
-0.00007021427154541016,
-0.03924560546875,
0.07293701171875,
-0.005611419677734375,
-0.00344085693359375,
0.031494140625,
-0.007480621337890625,
-0.025970458984375,
-0.007175445556640625,
0.021942138671875,
0.040283203125,
0.00911712646484375,
0.07073974609375,
-0.0158843994140625,
0.08087158203125,
-0.051361083984375,
-0.01386260986328125,
0.01806640625,
0.0013751983642578125,
-0.038360595703125,
0.055389404296875,
-0.007228851318359375,
0.05010986328125,
-0.01068115234375,
-0.006435394287109375,
-0.004924774169921875,
0.04638671875,
-0.0341796875,
0.0191650390625,
0.0264434814453125,
-0.01065826416015625,
-0.10565185546875,
-0.0280303955078125,
0.048614501953125,
0.0254669189453125,
-0.029052734375,
0.051055908203125,
-0.028076171875,
-0.06787109375,
-0.00875091552734375,
-0.025482177734375,
0.0240478515625,
-0.029022216796875,
0.003101348876953125,
0.050323486328125,
0.0304107666015625,
-0.02716064453125,
-0.0189208984375,
0.0023021697998046875,
-0.07177734375,
-0.049774169921875,
-0.01435089111328125,
-0.049774169921875,
0.01003265380859375,
-0.004383087158203125,
-0.0738525390625,
0.057342529296875,
0.018829345703125,
0.0174102783203125,
-0.0044097900390625,
0.007640838623046875,
-0.0244140625,
-0.0107269287109375,
-0.043121337890625,
0.05810546875,
-0.01319122314453125,
0.044189453125,
-0.0595703125,
-0.0038852691650390625,
0.00011652708053588867,
0.0303955078125,
0.02044677734375,
0.00743865966796875,
-0.00020599365234375,
-0.0184173583984375,
0.0011529922485351562,
0.00539398193359375,
-0.01471710205078125,
0.0251007080078125,
-0.0167083740234375,
0.0428466796875,
0.042236328125,
-0.05194091796875,
0.0280914306640625,
0.0039005279541015625,
-0.0251007080078125,
0.002834320068359375,
-0.0106048583984375,
-0.0237884521484375,
-0.01343536376953125,
0.004833221435546875,
-0.0198211669921875,
0.006961822509765625,
-0.01059722900390625,
0.05670166015625,
-0.0232696533203125,
0.03955078125,
0.0024051666259765625,
-0.0234222412109375,
0.05499267578125,
-0.0555419921875,
0.04339599609375,
-0.01558685302734375,
0.0004208087921142578,
0.03070068359375,
0.022613525390625,
-0.044769287109375,
0.020904541015625,
0.0007481575012207031,
0.034698486328125,
-0.024139404296875,
0.0574951171875,
0.04144287109375,
0.036834716796875,
-0.03033447265625,
-0.051910400390625,
0.039794921875,
0.0716552734375,
-0.020233154296875,
0.0179595947265625,
0.01123809814453125,
0.03363037109375,
0.012664794921875,
-0.000762939453125,
0.0692138671875,
0.031524658203125,
0.03363037109375,
-0.0016660690307617188,
-0.0196380615234375,
0.00836944580078125,
0.0205535888671875,
0.00786590576171875,
-0.0028553009033203125,
0.004909515380859375,
-0.02490234375,
-0.03057861328125,
0.01446533203125,
0.0021076202392578125,
0.047943115234375,
0.00152587890625,
0.052337646484375,
-0.045135498046875,
-0.0156402587890625,
0.004169464111328125,
0.0211029052734375,
-0.0192718505859375,
0.006587982177734375,
-0.046844482421875,
-0.057403564453125,
0.0017757415771484375,
0.04852294921875,
0.026031494140625,
0.06365966796875,
0.041351318359375,
0.018280029296875,
0.0201873779296875,
0.0229644775390625,
0.058929443359375,
-0.01543426513671875,
0.00428009033203125,
-0.0203399658203125,
-0.036651611328125,
-0.0199737548828125,
-0.0450439453125,
0.005512237548828125,
0.01824951171875,
-0.00476837158203125,
-0.0621337890625,
0.027191162109375,
-0.017791748046875,
-0.041961669921875,
0.039642333984375,
-0.0162506103515625,
0.087890625,
-0.0295867919921875,
-0.0811767578125,
0.0001970529556274414,
-0.044525146484375,
-0.047210693359375,
0.0171051025390625,
0.044189453125,
-0.015960693359375,
0.009246826171875,
0.0204315185546875,
0.001800537109375,
0.01715087890625,
-0.0078125,
-0.0078277587890625,
-0.005069732666015625,
0.04351806640625,
0.005443572998046875,
-0.06610107421875,
-0.023101806640625,
-0.0179443359375,
0.0185699462890625,
0.0034580230712890625,
0.0826416015625,
-0.00897216796875,
0.0174102783203125,
0.04949951171875,
-0.0123748779296875,
0.0335693359375,
0.01313018798828125,
0.027557373046875,
-0.004688262939453125,
0.013641357421875,
-0.021636962890625,
-0.0672607421875,
0.01446533203125,
0.013458251953125,
0.0208892822265625,
0.01540374755859375,
-0.01812744140625,
0.025390625,
0.02471923828125,
0.06341552734375,
-0.0235595703125,
-0.03436279296875,
-0.07244873046875,
-0.0293121337890625,
0.05352783203125,
0.027008056640625,
-0.01068878173828125,
0.031585693359375,
-0.01287841796875,
-0.0321044921875,
0.002063751220703125,
-0.028961181640625,
-0.0305023193359375,
0.02423095703125,
0.0282745361328125,
-0.0286102294921875,
-0.0123748779296875,
-0.0137939453125,
-0.014404296875,
-0.00371551513671875,
0.012603759765625,
-0.0013370513916015625,
-0.0211944580078125,
-0.02301025390625,
-0.0186767578125,
-0.00018274784088134766,
-0.04852294921875,
0.000028252601623535156,
0.0015802383422851562,
0.00005525350570678711,
0.022674560546875,
-0.00501251220703125,
-0.026885986328125,
-0.052703857421875,
0.0028076171875,
0.00475311279296875,
-0.032867431640625,
-0.03851318359375,
-0.0180511474609375,
0.00659942626953125,
0.047332763671875,
0.00855255126953125,
-0.078125,
0.042449951171875,
-0.0253753662109375,
0.0484619140625,
-0.003551483154296875,
-0.027374267578125,
-0.0005469322204589844,
0.036865234375,
-0.006671905517578125,
-0.051727294921875,
-0.0242462158203125,
0.033477783203125,
-0.03558349609375,
0.00464630126953125,
0.035797119140625,
-0.0238037109375,
-0.036956787109375,
0.0208282470703125,
0.0055084228515625,
0.05718994140625,
0.01885986328125,
-0.00701904296875,
0.0218353271484375,
-0.019073486328125,
-0.0258026123046875,
-0.04937744140625,
0.016357421875,
-0.070068359375,
-0.0266265869140625,
0.00128173828125,
0.0008902549743652344,
0.03045654296875,
-0.036346435546875,
-0.09918212890625,
0.037872314453125,
-0.0216217041015625,
-0.0465087890625,
-0.0931396484375,
0.0086669921875,
-0.0015010833740234375,
0.00589752197265625,
-0.031158447265625,
-0.0035190582275390625,
-0.03070068359375,
0.052490234375,
0.006622314453125,
-0.005901336669921875,
0.0286102294921875,
-0.0291900634765625,
-0.0089874267578125,
0.0155029296875,
0.039154052734375,
0.005474090576171875,
0.017852783203125,
-0.028564453125,
0.0203399658203125,
0.04998779296875,
-0.0190277099609375,
-0.056243896484375,
0.0009021759033203125,
-0.031402587890625,
-0.0290069580078125,
-0.044708251953125,
-0.038848876953125,
-0.019439697265625,
0.12396240234375,
0.03851318359375,
0.032440185546875,
-0.036712646484375,
-0.0179290771484375,
-0.0269622802734375,
-0.048553466796875,
-0.021392822265625,
0.051239013671875,
-0.08544921875,
-0.0029125213623046875,
0.0134735107421875,
-0.0091552734375,
-0.0113067626953125,
-0.024444580078125,
-0.0172576904296875,
-0.003997802734375,
0.00901031494140625,
0.019256591796875,
-0.00982666015625,
-0.03485107421875,
0.06719970703125,
-0.04278564453125,
-0.002826690673828125,
0.0251312255859375,
0.0216827392578125,
0.0249786376953125,
0.0298919677734375,
-0.005413055419921875,
0.025421142578125,
-0.01739501953125,
-0.016204833984375,
0.0186004638671875,
-0.0006990432739257812,
0.029876708984375,
-0.01425933837890625,
0.01076507568359375,
0.0235748291015625,
-0.00939178466796875,
0.019500732421875,
0.004650115966796875,
0.0264739990234375,
-0.01102447509765625,
0.04241943359375,
-0.003719329833984375,
0.057769775390625,
-0.0254058837890625,
0.053985595703125,
-0.02703857421875,
-0.0145263671875,
0.0010385513305664062,
-0.004444122314453125,
0.00033211708068847656,
0.025421142578125,
0.01097869873046875,
-0.0244598388671875,
0.01424407958984375,
-0.005237579345703125,
0.01413726806640625,
0.005161285400390625
] |
3a794b5064f2ae4dec772ab78c71aa996b369021
|
Wordpress Stackexchange
Q: Using Underscore Templates in WordPress I've noticed that since WP 3.5 that we now have the Backbone.js and Underscore.js libraries included. The new Media Modal uses Underscore templates and I was wondering how would I be able to insert them, especially in the admin side of things.Is there a correct way to insert these?
A: Your plugin index file:
add_action( 'print_media_templates', 'wpse8170_admin_footer' );
function wpse8170_admin_footer() {
require 'templates.php';
}
Your templates.php:
<script id="tmpl-mytemplate" type="text/html">
<h1>Hello {{data.name}}!</h1>
</script>
Your media js file:
wp.media.view.MyView = wp.media.View.extend({
template: wp.media.template('mytemplate'),
render: function() {
this.$el.html(this.template({name: 'world'}));
}
});
|
Q: Using Underscore Templates in WordPress I've noticed that since WP 3.5 that we now have the Backbone.js and Underscore.js libraries included. The new Media Modal uses Underscore templates and I was wondering how would I be able to insert them, especially in the admin side of things.Is there a correct way to insert these?
A: Your plugin index file:
add_action( 'print_media_templates', 'wpse8170_admin_footer' );
function wpse8170_admin_footer() {
require 'templates.php';
}
Your templates.php:
<script id="tmpl-mytemplate" type="text/html">
<h1>Hello {{data.name}}!</h1>
</script>
Your media js file:
wp.media.view.MyView = wp.media.View.extend({
template: wp.media.template('mytemplate'),
render: function() {
this.$el.html(this.template({name: 'world'}));
}
});
|
wordpress
|
{
"language": "en",
"length": 94,
"provenance": "stackexchange_00019.jsonl.gz:429457",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/88305"
}
|
[
0.034088134765625,
0.01605224609375,
-0.019683837890625,
-0.050384521484375,
0.01483154296875,
-0.02783203125,
0.003650665283203125,
-0.0165557861328125,
-0.01502227783203125,
0.040496826171875,
-0.004863739013671875,
0.0038776397705078125,
0.06964111328125,
-0.02276611328125,
0.036712646484375,
0.00414276123046875,
0.0408935546875,
-0.042816162109375,
0.0114898681640625,
-0.0251312255859375,
0.0079803466796875,
-0.013763427734375,
0.034332275390625,
0.027862548828125,
-0.0112152099609375,
0.007137298583984375,
0.09649658203125,
-0.018310546875,
-0.01413726806640625,
-0.020721435546875,
0.01959228515625,
0.004138946533203125,
0.0261688232421875,
-0.005863189697265625,
-0.01316070556640625,
-0.0090789794921875,
-0.01172637939453125,
0.0096893310546875,
0.0115203857421875,
-0.0137939453125,
0.01959228515625,
-0.00720977783203125,
0.0411376953125,
0.05419921875,
0.035552978515625,
-0.050506591796875,
0.026153564453125,
-0.087890625,
0.0093536376953125,
0.0121002197265625,
0.0310516357421875,
-0.0433349609375,
0.026092529296875,
-0.024200439453125,
-0.0089263916015625,
0.0052032470703125,
-0.08905029296875,
0.025054931640625,
0.0308837890625,
0.065185546875,
0.0154266357421875,
-0.0265655517578125,
-0.0153656005859375,
-0.044219970703125,
-0.0102081298828125,
-0.0187835693359375,
-0.001483917236328125,
0.0202178955078125,
-0.006313323974609375,
-0.02557373046875,
0.00910186767578125,
-0.0022907257080078125,
0.01313018798828125,
-0.030914306640625,
-0.0185089111328125,
0.03179931640625,
0.0223236083984375,
0.03265380859375,
0.0036640167236328125,
-0.027313232421875,
0.03955078125,
0.0294189453125,
0.030853271484375,
-0.0290679931640625,
0.0303497314453125,
-0.00005900859832763672,
0.0020294189453125,
-0.0345458984375,
-0.00618743896484375,
-0.005340576171875,
-0.01617431640625,
-0.023681640625,
0.01190948486328125,
0.036865234375,
-0.019317626953125,
-0.004039764404296875,
0.0257110595703125,
0.07427978515625,
-0.00472259521484375,
0.0300140380859375,
-0.017791748046875,
-0.031829833984375,
0.0196685791015625,
-0.048980712890625,
0.0020694732666015625,
0.0287017822265625,
-0.0184783935546875,
0.0168914794921875,
0.038665771484375,
0.034027099609375,
0.0022830963134765625,
-0.00536346435546875,
0.01042938232421875,
0.00200653076171875,
-0.0200958251953125,
0.005374908447265625,
-0.0175323486328125,
0.0190887451171875,
-0.004302978515625,
0.031982421875,
0.002788543701171875,
0.02886962890625,
0.0030574798583984375,
-0.00597381591796875,
-0.0032482147216796875,
0.004550933837890625,
0.0015611648559570312,
-0.052978515625,
-0.040496826171875,
0.0239105224609375,
-0.0016918182373046875,
0.0008368492126464844,
0.01380157470703125,
0.032562255859375,
-0.0183868408203125,
-0.0185699462890625,
0.00701904296875,
-0.0107421875,
0.005218505859375,
-0.0019140243530273438,
0.00783538818359375,
-0.0233917236328125,
-0.009857177734375,
0.0111541748046875,
0.00998687744140625,
0.0218658447265625,
0.00628662109375,
0.01511383056640625,
0.03143310546875,
-0.0182647705078125,
-0.01441192626953125,
-0.03485107421875,
0.0298309326171875,
0.0122528076171875,
0.0002732276916503906,
-0.033782958984375,
0.044036865234375,
-0.047088623046875,
0.0002810955047607422,
-0.06549072265625,
-0.058441162109375,
-0.00836944580078125,
0.07489013671875,
-0.083251953125,
-0.0260772705078125,
0.013397216796875,
-0.0687255859375,
-0.0036563873291015625,
0.0292510986328125,
0.037200927734375,
0.01168060302734375,
-0.06549072265625,
0.00981903076171875,
0.0276336669921875,
-0.01430511474609375,
0.043121337890625,
-0.003032684326171875,
0.0467529296875,
-0.004100799560546875,
0.0167083740234375,
0.01425933837890625,
-0.036956787109375,
0.054351806640625,
-0.01276397705078125,
-0.049468994140625,
-0.01100921630859375,
0.02130126953125,
0.04443359375,
0.0186309814453125,
0.01739501953125,
0.034088134765625,
0.002765655517578125,
0.00463104248046875,
0.04925537109375,
0.00768280029296875,
-0.06488037109375,
-0.01494598388671875,
-0.01163482666015625,
-0.01438140869140625,
-0.0230255126953125,
0.00904083251953125,
0.025390625,
0.0237579345703125,
0.044189453125,
0.005535125732421875,
0.0662841796875,
-0.021728515625,
0.0321044921875,
-0.023773193359375,
0.0125274658203125,
0.025177001953125,
-0.03436279296875,
-0.008148193359375,
-0.0552978515625,
-0.0222015380859375,
-0.0209808349609375,
-0.045867919921875,
0.0125274658203125,
0.0126800537109375,
0.031463623046875,
0.0223388671875,
0.00543212890625,
0.030609130859375,
0.0021419525146484375,
-0.0198516845703125,
0.0308380126953125,
-0.045867919921875,
0.0136871337890625,
-0.05682373046875,
0.0307159423828125,
-0.05242919921875,
0.039947509765625,
-0.0489501953125,
-0.0169219970703125,
-0.0421142578125,
-0.0223388671875,
-0.04931640625,
-0.031524658203125,
0.005207061767578125,
0.059783935546875,
0.0255126953125,
0.06744384765625,
0.0288848876953125,
0.036651611328125,
0.0689697265625,
0.061187744140625,
0.0576171875,
-0.0399169921875,
-0.0198974609375,
0.0290374755859375,
-0.0275115966796875,
0.02801513671875,
-0.00829315185546875,
-0.0787353515625,
-0.0294342041015625,
0.04241943359375,
-0.03485107421875,
0.026885986328125,
0.00658416748046875,
0.0101165771484375,
-0.00882720947265625,
0.03277587890625,
0.0567626953125,
-0.0202178955078125,
0.023712158203125,
0.002460479736328125,
0.006366729736328125,
0.00726318359375,
-0.0200347900390625,
0.0166168212890625,
0.0236968994140625,
-0.042510986328125,
-0.0033721923828125,
0.01053619384765625,
0.023529052734375,
0.01473236083984375,
-0.0699462890625,
0.0161590576171875,
0.046722412109375,
0.00554656982421875,
0.0247039794921875,
0.047637939453125,
-0.0218963623046875,
-0.0162200927734375,
-0.004245758056640625,
-0.06878662109375,
-0.023284912109375,
0.00670623779296875,
0.01267242431640625,
0.0022258758544921875,
0.023956298828125,
0.04998779296875,
-0.018646240234375,
0.0643310546875,
-0.040771484375,
-0.0163726806640625,
0.002788543701171875,
-0.0002808570861816406,
0.0280609130859375,
-0.0159759521484375,
0.03778076171875,
0.05548095703125,
-0.037506103515625,
0.03375244140625,
-0.023345947265625,
0.0222320556640625,
-0.012786865234375,
0.002986907958984375,
-0.016571044921875,
-0.0655517578125,
-0.00289154052734375,
0.0003342628479003906,
0.0157623291015625,
0.0302886962890625,
-0.007663726806640625,
-0.044647216796875,
-0.01141357421875,
0.0109100341796875,
-0.054290771484375,
-0.034271240234375,
0.037689208984375,
-0.07391357421875,
-0.02880859375,
0.0085296630859375,
-0.065673828125,
-0.00960540771484375,
0.043853759765625,
-0.002590179443359375,
-0.025054931640625,
-0.02001953125,
-0.03521728515625,
-0.04315185546875,
-0.022796630859375,
-0.027740478515625,
-0.008148193359375,
-0.01329803466796875,
-0.0005483627319335938,
0.0028018951416015625,
0.0185089111328125,
-0.0030117034912109375,
0.03106689453125,
0.02166748046875,
0.0015535354614257812,
-0.018310546875,
0.02880859375,
-0.02996826171875,
-0.01129913330078125,
0.000812530517578125,
-0.005634307861328125,
0.01080322265625,
-0.01421356201171875,
-0.00872802734375,
0.016387939453125,
-0.043609619140625,
0.0013294219970703125,
0.033050537109375,
0.0115966796875,
-0.0218658447265625,
0.0180206298828125,
-0.053985595703125,
-0.0190277099609375,
-0.02734375,
-0.043365478515625,
0.018798828125,
0.031494140625,
0.0007715225219726562,
-0.0170440673828125,
0.0044097900390625,
-0.005512237548828125,
0.01100921630859375,
0.007007598876953125,
-0.0347900390625,
-0.004268646240234375,
-0.005420684814453125,
0.0204315185546875,
-0.0011186599731445312,
0.0186004638671875,
-0.019134521484375,
-0.0222015380859375,
-0.0005412101745605469,
-0.00409698486328125,
-0.01499176025390625,
0.032073974609375,
-0.00952911376953125,
-0.021728515625,
0.060791015625,
-0.0170135498046875,
0.0230865478515625,
-0.0509033203125,
-0.0350341796875,
-0.033905029296875,
0.06304931640625,
-0.0219573974609375,
-0.0092315673828125,
0.0017547607421875,
0.017608642578125,
-0.0352783203125,
-0.043609619140625,
-0.0293121337890625,
-0.003650665283203125,
-0.00267791748046875,
-0.01103973388671875,
-0.0201416015625,
-0.006916046142578125,
-0.018829345703125,
0.036041259765625,
0.0122833251953125,
-0.0227508544921875,
0.0196380615234375,
-0.0472412109375,
-0.006671905517578125,
0.002685546875,
-0.01280975341796875,
-0.0322265625,
-0.03076171875,
-0.0288848876953125,
-0.09893798828125,
-0.01641845703125,
0.00482177734375,
0.06365966796875,
0.01483154296875,
-0.06201171875,
-0.0226593017578125,
0.0377197265625,
-0.0093536376953125,
-0.0024471282958984375,
-0.00931549072265625,
0.027587890625,
-0.0267791748046875,
-0.0009379386901855469,
-0.0160980224609375,
-0.0091552734375,
0.0133209228515625,
-0.01904296875,
-0.062408447265625,
-0.01439666748046875,
-0.007686614990234375,
0.037567138671875,
0.031951904296875,
-0.04693603515625,
-0.0236968994140625,
-0.0010251998901367188,
-0.01221466064453125,
0.017120361328125,
-0.01282501220703125,
0.00499725341796875,
-0.0028362274169921875,
-0.037750244140625,
0.017822265625,
0.0030651092529296875,
-0.0138702392578125,
0.00435638427734375,
0.0372314453125,
0.025115966796875,
-0.01373291015625,
0.01210784912109375,
0.005893707275390625,
0.039581298828125,
-0.0211334228515625,
0.021820068359375,
-0.002353668212890625,
-0.0504150390625,
0.06951904296875,
-0.011627197265625,
0.0264129638671875,
-0.01522064208984375,
0.011260986328125,
-0.0157012939453125,
-0.060882568359375,
0.062744140625,
0.007251739501953125,
-0.039825439453125,
-0.007724761962890625,
-0.01003265380859375,
-0.0015687942504882812,
-0.0195770263671875,
0.03204345703125,
0.0263519287109375,
-0.01424407958984375,
-0.043426513671875,
-0.06781005859375,
0.00435638427734375,
-0.0611572265625,
0.01026153564453125,
-0.0013914108276367188,
-0.005001068115234375,
0.0227508544921875,
0.032989501953125,
-0.00881195068359375,
0.0263671875,
0.00893402099609375,
0.02008056640625,
0.04022216796875,
-0.0005130767822265625,
-0.0012073516845703125,
-0.0087890625,
-0.00933837890625,
0.038818359375,
0.003589630126953125,
-0.016845703125,
-0.035980224609375,
-0.0080718994140625,
0.007335662841796875,
0.004024505615234375,
-0.005462646484375,
0.01445770263671875,
0.01221466064453125,
-0.0189361572265625,
0.01415252685546875,
-0.0236663818359375,
0.00290679931640625,
-0.03619384765625,
-0.0234527587890625,
-0.008819580078125,
-0.004581451416015625,
-0.033447265625,
0.053955078125,
0.0134124755859375,
-0.0124969482421875,
-0.0006847381591796875,
0.018829345703125,
-0.00795745849609375,
0.047607421875,
0.0111083984375,
-0.052886962890625,
0.0230712890625,
0.01123046875,
0.008056640625,
-0.032562255859375,
0.02069091796875,
0.0413818359375,
0.03759765625,
-0.00778961181640625,
-0.05218505859375,
-0.010040283203125,
-0.050933837890625,
0.0030727386474609375,
-0.00010460615158081055,
-0.070556640625,
-0.026458740234375,
-0.0194549560546875,
0.013427734375,
0.048736572265625,
-0.0234832763671875,
0.01134490966796875,
0.01248931884765625,
-0.005809783935546875,
0.0241546630859375,
-0.0087890625,
0.00943756103515625,
-0.0249176025390625,
-0.0196380615234375,
0.014068603515625,
-0.0011835098266601562,
0.019805908203125,
-0.099609375,
-0.03607177734375,
-0.019805908203125,
-0.0207977294921875,
0.04803466796875,
-0.0245513916015625,
0.02789306640625,
-0.01338958740234375,
-0.01120758056640625,
-0.01320648193359375,
0.016021728515625,
0.035858154296875,
0.021484375,
-0.0000546574592590332,
-0.03753662109375,
-0.0372314453125,
-0.0252838134765625,
-0.044677734375,
-0.0234375,
-0.0113067626953125,
0.0272979736328125,
-0.01134490966796875,
0.00814056396484375,
-0.01282501220703125,
-0.01171112060546875,
0.01678466796875,
0.0335693359375,
0.0033206939697265625,
0.036407470703125,
-0.0034313201904296875,
0.060882568359375,
-0.0016355514526367188,
0.058990478515625,
0.0174102783203125,
0.031402587890625,
-0.0235595703125,
-0.032440185546875,
-0.014434814453125,
-0.030517578125,
0.0110626220703125,
0.01348114013671875,
-0.0092926025390625,
0.01268768310546875,
0.04534912109375,
0.00902557373046875,
0.07415771484375,
-0.030853271484375,
-0.0008745193481445312,
-0.00853729248046875,
-0.020782470703125,
-0.07952880859375,
0.0074310302734375,
0.05401611328125,
-0.03173828125,
0.0153656005859375,
-0.017333984375,
-0.029937744140625,
0.048553466796875,
-0.0283355712890625,
0.01264190673828125,
0.048309326171875,
-0.0271453857421875,
0.06903076171875,
0.07025146484375,
0.0170440673828125,
0.01435089111328125,
0.011566162109375,
-0.0195159912109375,
-0.062164306640625,
0.039337158203125,
0.01953125,
-0.058349609375,
0.051544189453125,
0.02392578125,
-0.0216522216796875,
0.0426025390625,
-0.0305938720703125,
0.012359619140625,
0.03131103515625,
0.0271759033203125,
-0.0537109375,
0.007518768310546875,
0.00406646728515625,
-0.0200042724609375,
0.0042572021484375,
0.00008237361907958984,
-0.016845703125,
-0.060821533203125,
0.036163330078125,
-0.01654052734375,
-0.0090179443359375,
0.0090484619140625,
-0.0255584716796875,
-0.0255889892578125,
-0.00013363361358642578,
0.0283660888671875,
0.00731658935546875,
0.04815673828125,
-0.025665283203125,
-0.04791259765625,
0.0214691162109375,
0.021636962890625,
0.03857421875,
-0.019378662109375,
-0.0136566162109375,
0.01071929931640625,
0.028594970703125,
-0.0130462646484375,
-0.037750244140625,
0.0223846435546875,
0.021636962890625,
0.0307464599609375,
0.05810546875,
-0.01059722900390625,
0.018035888671875,
0.0205841064453125,
0.004627227783203125,
0.0352783203125,
-0.019927978515625,
0.00783538818359375,
0.017974853515625,
-0.0501708984375,
0.00894927978515625,
-0.0184326171875,
0.0107421875,
-0.0013380050659179688,
0.01392364501953125,
0.03912353515625,
0.0152740478515625,
-0.039154052734375,
0.0276031494140625,
0.0181121826171875,
-0.01220703125,
0.0016508102416992188,
0.0233306884765625,
-0.06689453125,
-0.043304443359375,
0.03631591796875,
-0.0328369140625,
-0.00152587890625,
0.00921630859375,
-0.07061767578125,
0.1168212890625,
0.01021575927734375,
0.042266845703125,
0.0160980224609375,
0.032806396484375,
-0.0643310546875,
-0.01018524169921875,
-0.027740478515625,
-0.006866455078125,
-0.027130126953125,
0.04290771484375,
-0.043212890625,
0.0010156631469726562,
-0.0104827880859375,
0.0231475830078125,
0.01210784912109375,
-0.006092071533203125,
0.00812530517578125,
0.001300811767578125,
0.033416748046875,
0.0153045654296875,
-0.00411224365234375,
0.01204681396484375,
-0.0164337158203125,
-0.0245513916015625,
0.0236053466796875,
-0.037078857421875,
0.007244110107421875,
-0.0251312255859375,
-0.00499725341796875,
-0.0034961700439453125,
0.006687164306640625,
0.0182342529296875,
0.01280975341796875,
-0.023895263671875,
-0.004566192626953125,
-0.008331298828125,
0.01020050048828125,
-0.054931640625,
0.034454345703125,
0.029541015625,
-0.0201873779296875,
0.05029296875,
-0.01396942138671875,
-0.004802703857421875,
0.025482177734375,
-0.022674560546875,
-0.0151214599609375,
0.01021575927734375,
0.0022449493408203125,
-0.01326751708984375,
-0.0016069412231445312,
-0.03924560546875,
0.01059722900390625,
0.02789306640625,
0.0286102294921875,
-0.00496673583984375,
0.01312255859375,
-0.068359375,
-0.024658203125,
0.07525634765625,
0.05010986328125,
-0.0265655517578125,
-0.0141754150390625,
-0.00014269351959228516,
0.00260162353515625,
0.00861358642578125,
-0.036834716796875,
0.0021953582763671875,
0.0178070068359375,
0.0149993896484375,
0.01995849609375,
-0.029296875,
0.00478363037109375,
0.0015249252319335938,
0.01515960693359375,
0.042327880859375,
0.0175323486328125,
-0.0063323974609375,
-0.055328369140625,
0.046630859375,
0.0147857666015625,
0.058135986328125,
0.0181427001953125,
0.06060791015625,
0.01165008544921875,
-0.03472900390625,
0.00841522216796875,
-0.00323486328125,
0.01363372802734375,
-0.01065826416015625,
0.010162353515625,
0.0185394287109375,
0.0202178955078125,
0.003810882568359375,
0.0111083984375,
0.07623291015625,
0.057373046875,
0.017486572265625,
0.0005178451538085938,
-0.0024547576904296875,
0.01114654541015625,
-0.042144775390625,
0.025390625,
-0.05010986328125,
0.0443115234375,
-0.007236480712890625,
0.0002067089080810547,
-0.01042938232421875,
0.03485107421875,
0.00734710693359375,
-0.055816650390625,
0.0173187255859375,
-0.014007568359375,
-0.0311279296875,
0.0389404296875,
0.0126953125,
0.039581298828125,
-0.0206756591796875,
-0.06976318359375,
-0.0147247314453125,
-0.0220947265625,
-0.058074951171875,
0.03717041015625,
0.0472412109375,
-0.00760650634765625,
0.00696563720703125,
-0.0199432373046875,
-0.00337982177734375,
0.0165557861328125,
-0.00450897216796875,
-0.0113525390625,
-0.0279998779296875,
0.0235137939453125,
-0.032135009765625,
-0.0386962890625,
-0.0142822265625,
-0.025360107421875,
0.0223541259765625,
0.0122222900390625,
0.10467529296875,
-0.043212890625,
0.0029754638671875,
-0.00942230224609375,
0.0127716064453125,
-0.01885986328125,
-0.00960540771484375,
-0.0008897781372070312,
0.01861572265625,
0.0179595947265625,
-0.01157379150390625,
-0.021148681640625,
0.040618896484375,
0.0172882080078125,
-0.011322021484375,
0.0338134765625,
0.005340576171875,
-0.00849151611328125,
-0.021636962890625,
0.047332763671875,
-0.03839111328125,
-0.062042236328125,
-0.0195159912109375,
0.0146026611328125,
-0.01422119140625,
0.010650634765625,
0.0172119140625,
0.02520751953125,
-0.0017518997192382812,
-0.057037353515625,
0.0068359375,
-0.053955078125,
0.005809783935546875,
0.032623291015625,
0.04400634765625,
0.01003265380859375,
0.0455322265625,
-0.00736236572265625,
0.0016012191772460938,
0.00473785400390625,
0.005313873291015625,
0.017822265625,
-0.0867919921875,
0.0220489501953125,
0.0179595947265625,
0.023162841796875,
-0.0675048828125,
0.0096588134765625,
0.045013427734375,
0.0013217926025390625,
0.027862548828125,
-0.005275726318359375,
-0.02294921875,
-0.0280303955078125,
-0.0197296142578125,
0.0261077880859375,
-0.035491943359375,
-0.0283966064453125,
-0.0941162109375,
-0.0207977294921875,
0.0045928955078125,
0.01129150390625,
-0.030059814453125,
-0.0017042160034179688,
0.0012197494506835938,
0.0160064697265625,
-0.01038360595703125,
0.038909912109375,
-0.0230865478515625,
0.023681640625,
-0.011993408203125,
-0.0222015380859375,
-0.0035572052001953125,
0.047576904296875,
0.01161956787109375,
0.01424407958984375,
0.022430419921875,
-0.0200653076171875,
0.011444091796875,
0.034454345703125,
0.02276611328125,
0.07904052734375,
0.01248931884765625,
-0.0106658935546875,
0.01392364501953125,
0.0277862548828125,
-0.027740478515625,
-0.052825927734375,
-0.0091705322265625,
-0.01259613037109375,
0.034637451171875,
-0.011962890625,
0.0168304443359375,
0.03216552734375,
-0.037322998046875,
-0.08746337890625,
0.043426513671875,
-0.010284423828125,
-0.03668212890625,
-0.01104736328125,
-0.0184478759765625,
-0.0175018310546875,
0.0270843505859375,
-0.00335693359375,
-0.0215301513671875,
-0.0245513916015625,
0.029144287109375,
0.0321044921875,
0.0223541259765625,
0.0312042236328125,
0.0106201171875,
-0.04583740234375,
-0.00957489013671875,
-0.04083251953125,
-0.003787994384765625,
0.0115966796875,
-0.01322174072265625,
0.0210723876953125,
0.021484375,
-0.056610107421875,
-0.0300140380859375,
-0.0152587890625,
0.006587982177734375,
-0.0283050537109375,
-0.03533935546875,
-0.01507568359375,
0.0166015625,
0.09283447265625,
0.055389404296875,
0.0181121826171875,
-0.06781005859375,
0.0261383056640625,
-0.00799560546875,
-0.02606201171875,
-0.0158843994140625,
0.0234527587890625,
-0.0616455078125,
-0.01399993896484375,
0.014617919921875,
0.0098114013671875,
-0.0306396484375,
-0.0188140869140625,
-0.01111602783203125,
-0.025054931640625,
-0.003124237060546875,
0.0025310516357421875,
0.0254669189453125,
0.040435791015625,
0.106201171875,
-0.07159423828125,
0.0051116943359375,
-0.007755279541015625,
0.0032138824462890625,
0.05145263671875,
-0.0711669921875,
0.0050506591796875,
0.0194244384765625,
-0.031036376953125,
0.0039043426513671875,
0.0008716583251953125,
0.046051025390625,
-0.03167724609375,
-0.01291656494140625,
-0.009552001953125,
0.043792724609375,
-0.009918212890625,
0.03173828125,
-0.0104827880859375,
0.090087890625,
-0.004253387451171875,
0.09967041015625,
-0.055908203125,
0.09112548828125,
-0.026275634765625,
0.0272064208984375,
0.00521087646484375,
0.03289794921875,
0.06573486328125,
0.00787353515625,
0.0025691986083984375,
0.030120849609375,
-0.05126953125,
-0.0226898193359375,
-0.005916595458984375,
0.0228729248046875,
0.002567291259765625,
-0.0023097991943359375
] |
47bf5e4d9e5998654ea30d897be9030128deedb2
|
Wordpress Stackexchange
Q: Unwanted redirect in admin area I have a strange behaviour on my backend. This is possible due to the way my WordPress is located.
I installed it in a VirtualBox, using Ubuntu from the standard repository (i.e., apt-get install wordpress). It is located in /var/www/ as per default. The virtual mashine is mapped to a subfolder of my institution's web page. Let's call it www.institution.com/stuff/wordpress.
Most works fine, I can log in to the backend, create pages, etc. But, if I make changes in Settings/General and click on the "Save changes" button I get an "Error: NotFound". The changes are saved, but WordPress tries to send me to
www.institution.com/wp-admin/options-general.php?settings-updated=true
but this has to be
www.institution.com/stuff/wordpress/wp-admin/options-general.php?settings-updated=true
(/stuff/wordpress is missing)
Both, the "WordPress Address URL" and "Site URL" are set to "www.institution.com/stuff/wordpress". But obviously, this is not enough.
Has anybody an idea what wrong with my WordPress?
A: I solved it with the help of a colleagues of mine by adding the following lines into wp-config.php:
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
$_SERVER['REQUEST_URI'] = '/stuff/wordpress' . $_SERVER['REQUEST_URI'];
$_SERVER['SCRIPT_NAME'] = '/stuff/wordpress' . $_SERVER['SCRIPT_NAME'];
$_SERVER['PHP_SELF'] = '/stuff/wordpress' . $_SERVER['PHP_SELF'];
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
Q: Unwanted redirect in admin area I have a strange behaviour on my backend. This is possible due to the way my WordPress is located.
I installed it in a VirtualBox, using Ubuntu from the standard repository (i.e., apt-get install wordpress). It is located in /var/www/ as per default. The virtual mashine is mapped to a subfolder of my institution's web page. Let's call it www.institution.com/stuff/wordpress.
Most works fine, I can log in to the backend, create pages, etc. But, if I make changes in Settings/General and click on the "Save changes" button I get an "Error: NotFound". The changes are saved, but WordPress tries to send me to
www.institution.com/wp-admin/options-general.php?settings-updated=true
but this has to be
www.institution.com/stuff/wordpress/wp-admin/options-general.php?settings-updated=true
(/stuff/wordpress is missing)
Both, the "WordPress Address URL" and "Site URL" are set to "www.institution.com/stuff/wordpress". But obviously, this is not enough.
Has anybody an idea what wrong with my WordPress?
A: I solved it with the help of a colleagues of mine by adding the following lines into wp-config.php:
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
$_SERVER['REQUEST_URI'] = '/stuff/wordpress' . $_SERVER['REQUEST_URI'];
$_SERVER['SCRIPT_NAME'] = '/stuff/wordpress' . $_SERVER['SCRIPT_NAME'];
$_SERVER['PHP_SELF'] = '/stuff/wordpress' . $_SERVER['PHP_SELF'];
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
wordpress
|
{
"language": "en",
"length": 186,
"provenance": "stackexchange_00019.jsonl.gz:429473",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/88354"
}
|
[
0.063720703125,
-0.01306915283203125,
0.032958984375,
0.0038280487060546875,
-0.003063201904296875,
-0.02935791015625,
0.04345703125,
-0.054595947265625,
0.00925445556640625,
-0.0013799667358398438,
0.01007843017578125,
-0.038848876953125,
0.007648468017578125,
-0.055908203125,
0.0011615753173828125,
-0.0116119384765625,
0.00901031494140625,
0.01177978515625,
0.0106201171875,
-0.005077362060546875,
-0.0097808837890625,
0.00824737548828125,
0.005157470703125,
-0.01258087158203125,
0.0043182373046875,
-0.0171051025390625,
0.0684814453125,
-0.018035888671875,
0.00235748291015625,
-0.028076171875,
0.0093536376953125,
0.00415802001953125,
0.034271240234375,
0.042724609375,
-0.075439453125,
-0.0665283203125,
0.0025005340576171875,
0.018463134765625,
-0.035125732421875,
0.031524658203125,
-0.0044403076171875,
-0.01099395751953125,
0.06707763671875,
0.00146484375,
0.0142822265625,
-0.04498291015625,
0.0251312255859375,
-0.041412353515625,
0.00740814208984375,
-0.0037078857421875,
-0.012969970703125,
0.02301025390625,
-0.00528717041015625,
0.043426513671875,
-0.0004773139953613281,
0.017791748046875,
0.006755828857421875,
0.021881103515625,
0.00919342041015625,
-0.028564453125,
-0.035308837890625,
0.0235137939453125,
0.001445770263671875,
0.0103759765625,
-0.0037136077880859375,
-0.016754150390625,
0.013824462890625,
0.040283203125,
-0.0726318359375,
-0.0106201171875,
0.047698974609375,
-0.0220489501953125,
0.006664276123046875,
-0.0017900466918945312,
-0.023773193359375,
-0.03936767578125,
0.0191192626953125,
-0.0347900390625,
0.00812530517578125,
0.005550384521484375,
0.00452423095703125,
-0.00980377197265625,
-0.0305633544921875,
-0.0026149749755859375,
0.0299224853515625,
0.06903076171875,
-0.025054931640625,
-0.03948974609375,
-0.044281005859375,
-0.0174102783203125,
-0.033843994140625,
-0.05902099609375,
-0.051666259765625,
0.007038116455078125,
0.026275634765625,
-0.0262451171875,
0.03472900390625,
0.01544189453125,
0.01094818115234375,
-0.0009899139404296875,
0.0066070556640625,
-0.0450439453125,
0.029693603515625,
-0.0281524658203125,
0.006038665771484375,
0.0413818359375,
-0.000934600830078125,
0.0179595947265625,
0.043670654296875,
0.003612518310546875,
0.0138397216796875,
0.0233612060546875,
-0.017974853515625,
0.0078582763671875,
-0.0517578125,
-0.016204833984375,
-0.0640869140625,
0.00024330615997314453,
-0.0212249755859375,
0.0052642822265625,
0.007701873779296875,
0.0312042236328125,
-0.0299530029296875,
-0.040374755859375,
0.01265716552734375,
-0.0055389404296875,
-0.011322021484375,
-0.01385498046875,
-0.005199432373046875,
0.009063720703125,
-0.033294677734375,
0.0227203369140625,
0.06561279296875,
0.01006317138671875,
0.00170135498046875,
-0.005207061767578125,
0.04827880859375,
-0.0021953582763671875,
-0.0172882080078125,
0.00560760498046875,
-0.00679779052734375,
-0.01523590087890625,
0.0017118453979492188,
-0.03277587890625,
0.00196075439453125,
0.032196044921875,
0.0251617431640625,
0.0085296630859375,
-0.01092529296875,
-0.0633544921875,
-0.0020160675048828125,
-0.007572174072265625,
0.01218414306640625,
0.0251617431640625,
0.0239410400390625,
-0.005245208740234375,
0.0447998046875,
-0.029022216796875,
-0.0352783203125,
-0.022705078125,
0.0194854736328125,
0.009979248046875,
0.0208282470703125,
-0.0465087890625,
-0.0555419921875,
-0.0338134765625,
-0.0543212890625,
-0.012969970703125,
0.022003173828125,
0.00283050537109375,
0.042388916015625,
0.0066375732421875,
-0.00896453857421875,
0.0153961181640625,
0.0137176513671875,
0.0064697265625,
0.020233154296875,
0.00902557373046875,
0.0035533905029296875,
0.0943603515625,
0.0357666015625,
-0.0202484130859375,
0.01218414306640625,
0.0080413818359375,
-0.043609619140625,
0.04693603515625,
-0.0157318115234375,
0.0313720703125,
0.0113525390625,
-0.00771331787109375,
0.0172576904296875,
0.0214385986328125,
-0.01033782958984375,
0.0188140869140625,
-0.039947509765625,
-0.0251617431640625,
-0.0145721435546875,
0.0225982666015625,
-0.025054931640625,
0.005908966064453125,
-0.0103607177734375,
0.019134521484375,
-0.005565643310546875,
0.006160736083984375,
-0.0193328857421875,
0.01751708984375,
-0.006175994873046875,
0.032196044921875,
0.0294036865234375,
0.01446533203125,
-0.0034923553466796875,
0.00519561767578125,
0.00788116455078125,
-0.053924560546875,
-0.04339599609375,
0.0283355712890625,
-0.0295562744140625,
0.0216522216796875,
-0.006069183349609375,
0.043975830078125,
-0.03271484375,
-0.038177490234375,
-0.03363037109375,
-0.054901123046875,
0.0177764892578125,
-0.00862884521484375,
-0.0098114013671875,
-0.006134033203125,
0.01593017578125,
-0.005504608154296875,
0.002033233642578125,
0.03240966796875,
-0.01258087158203125,
-0.0040435791015625,
-0.02728271484375,
0.00232696533203125,
-0.0287017822265625,
-0.041473388671875,
0.00669097900390625,
0.047637939453125,
0.0298614501953125,
-0.0098114013671875,
-0.0244140625,
0.00954437255859375,
-0.040740966796875,
-0.09710693359375,
-0.0166015625,
0.0216827392578125,
-0.0056610107421875,
-0.003635406494140625,
0.006290435791015625,
-0.036773681640625,
0.04876708984375,
-0.04248046875,
-0.02325439453125,
0.0494384765625,
-0.0269317626953125,
-0.026885986328125,
0.00787353515625,
-0.0182037353515625,
0.020660400390625,
-0.0184326171875,
-0.0457763671875,
-0.0005631446838378906,
-0.036346435546875,
-0.0136260986328125,
-0.0130462646484375,
-0.006092071533203125,
0.001773834228515625,
-0.034088134765625,
0.01476287841796875,
-0.0257415771484375,
-0.01177215576171875,
-0.014190673828125,
0.05560302734375,
-0.04827880859375,
-0.033782958984375,
0.01023101806640625,
0.0219573974609375,
-0.0289306640625,
-0.0447998046875,
-0.0215911865234375,
-0.0341796875,
-0.0080108642578125,
0.006744384765625,
-0.059173583984375,
0.0222625732421875,
-0.005035400390625,
0.0258636474609375,
0.0196990966796875,
0.04290771484375,
0.005374908447265625,
-0.018463134765625,
0.041351318359375,
-0.0036945343017578125,
-0.0482177734375,
0.052978515625,
-0.017822265625,
-0.006244659423828125,
0.0131378173828125,
0.0699462890625,
0.053741455078125,
0.021240234375,
-0.0164642333984375,
-0.00039076805114746094,
0.019927978515625,
-0.01116180419921875,
0.01107025146484375,
0.0014925003051757812,
-0.0103607177734375,
-0.07073974609375,
-0.032684326171875,
0.0246429443359375,
-0.00841522216796875,
0.003444671630859375,
-0.035888671875,
-0.0123138427734375,
-0.002002716064453125,
-0.092041015625,
-0.07769775390625,
-0.041015625,
0.01393890380859375,
-0.0279388427734375,
0.03643798828125,
0.00611114501953125,
0.0133819580078125,
0.0179595947265625,
0.014617919921875,
0.0535888671875,
-0.0214996337890625,
-0.0550537109375,
-0.0460205078125,
-0.105712890625,
-0.0516357421875,
0.0028667449951171875,
0.01290130615234375,
0.01308441162109375,
0.002300262451171875,
0.004764556884765625,
-0.022003173828125,
0.0008215904235839844,
0.02325439453125,
0.01116180419921875,
-0.036285400390625,
-0.034576416015625,
-0.040374755859375,
0.0330810546875,
-0.01099395751953125,
0.0706787109375,
-0.0006995201110839844,
0.01629638671875,
-0.007450103759765625,
-0.0161895751953125,
-0.04443359375,
-0.0280914306640625,
-0.026702880859375,
0.0262603759765625,
-0.07177734375,
-0.0455322265625,
-0.07989501953125,
0.004245758056640625,
0.010284423828125,
-0.013519287109375,
0.034393310546875,
-0.006275177001953125,
-0.0250091552734375,
0.0275421142578125,
0.0103759765625,
-0.0052642822265625,
0.019287109375,
0.036468505859375,
-0.004604339599609375,
0.0274810791015625,
-0.026824951171875,
-0.03271484375,
-0.040863037109375,
0.0278778076171875,
0.010833740234375,
-0.0182952880859375,
0.001995086669921875,
0.0477294921875,
0.0338134765625,
-0.0006022453308105469,
-0.0166168212890625,
-0.05267333984375,
0.0472412109375,
-0.05010986328125,
-0.00501251220703125,
-0.0312347412109375,
-0.01102447509765625,
-0.0132904052734375,
0.07904052734375,
-0.05596923828125,
-0.01346588134765625,
-0.01666259765625,
0.0240478515625,
-0.055267333984375,
-0.058197021484375,
-0.0347900390625,
0.006656646728515625,
-0.037506103515625,
0.00470733642578125,
-0.0186309814453125,
0.005298614501953125,
0.00007003545761108398,
-0.03643798828125,
0.00994110107421875,
-0.049530029296875,
0.022918701171875,
-0.0210113525390625,
0.0200042724609375,
0.003757476806640625,
0.023223876953125,
-0.0238800048828125,
0.00027823448181152344,
-0.035980224609375,
-0.1068115234375,
-0.037811279296875,
0.056549072265625,
0.049896240234375,
-0.05029296875,
0.0145263671875,
-0.020843505859375,
0.069580078125,
0.006744384765625,
-0.0180816650390625,
0.0187225341796875,
-0.0098419189453125,
0.015960693359375,
0.0013256072998046875,
-0.0120849609375,
0.00092315673828125,
0.00223541259765625,
-0.00457763671875,
-0.056396484375,
-0.0088043212890625,
-0.0006351470947265625,
-0.00782012939453125,
0.06817626953125,
-0.046783447265625,
-0.039093017578125,
-0.02862548828125,
-0.050933837890625,
0.0177459716796875,
-0.04742431640625,
0.0015897750854492188,
-0.036041259765625,
-0.057342529296875,
0.0472412109375,
-0.052703857421875,
-0.030670166015625,
0.01214599609375,
0.07177734375,
0.0135650634765625,
0.0054779052734375,
0.0159912109375,
0.007114410400390625,
0.019012451171875,
-0.010498046875,
0.0207366943359375,
0.0019330978393554688,
0.0071563720703125,
-0.0083770751953125,
-0.03546142578125,
0.00429534912109375,
0.00391387939453125,
0.040740966796875,
-0.00489044189453125,
-0.01849365234375,
0.0144195556640625,
-0.0249176025390625,
-0.012725830078125,
0.022491455078125,
0.0032501220703125,
0.01025390625,
0.0171051025390625,
0.0011186599731445312,
-0.0194091796875,
0.0057525634765625,
-0.00032067298889160156,
-0.045654296875,
0.0294342041015625,
-0.02044677734375,
0.022613525390625,
0.006305694580078125,
0.01477813720703125,
0.029296875,
0.03240966796875,
-0.029327392578125,
-0.01806640625,
-0.0276641845703125,
-0.017242431640625,
-0.005542755126953125,
0.0037441253662109375,
-0.053863525390625,
0.00429534912109375,
-0.00533294677734375,
0.08587646484375,
-0.002559661865234375,
-0.047332763671875,
-0.00894927978515625,
-0.00980377197265625,
0.01055145263671875,
0.0137176513671875,
-0.0108184814453125,
0.033477783203125,
0.0085296630859375,
-0.0190277099609375,
-0.01168060302734375,
0.006626129150390625,
-0.042510986328125,
-0.043792724609375,
0.040313720703125,
-0.004444122314453125,
0.0166015625,
0.0186767578125,
0.0751953125,
0.05029296875,
0.0306243896484375,
-0.04046630859375,
-0.000446319580078125,
0.00974273681640625,
0.041015625,
0.01149749755859375,
-0.004543304443359375,
0.0225830078125,
0.01107025146484375,
0.040283203125,
-0.047332763671875,
0.0103302001953125,
0.01983642578125,
0.07403564453125,
0.00867462158203125,
-0.0377197265625,
0.0018453598022460938,
-0.06915283203125,
0.004726409912109375,
0.043609619140625,
-0.002838134765625,
-0.046722412109375,
-0.018524169921875,
-0.019500732421875,
0.03857421875,
-0.044281005859375,
-0.0200653076171875,
-0.000053942203521728516,
-0.0369873046875,
-0.021942138671875,
0.02825927734375,
-0.0445556640625,
-0.005054473876953125,
0.0029144287109375,
-0.0202484130859375,
-0.020263671875,
-0.02301025390625,
-0.002536773681640625,
-0.0304412841796875,
0.0191802978515625,
-0.0011644363403320312,
0.0034275054931640625,
-0.0309295654296875,
-0.004276275634765625,
-0.0267486572265625,
0.02813720703125,
-0.00330352783203125,
0.01175689697265625,
0.04736328125,
0.0230865478515625,
-0.07623291015625,
0.034332275390625,
-0.0167083740234375,
0.004848480224609375,
0.0197601318359375,
-0.0140533447265625,
-0.041839599609375,
-0.036712646484375,
0.00811004638671875,
-0.019805908203125,
-0.0194244384765625,
-0.0216064453125,
-0.051727294921875,
0.0377197265625,
0.04412841796875,
0.0023956298828125,
-0.0179901123046875,
0.04229736328125,
-0.0229034423828125,
0.0258941650390625,
-0.0182952880859375,
-0.0081634521484375,
-0.014617919921875,
-0.004772186279296875,
0.031524658203125,
-0.043243408203125,
-0.055023193359375,
-0.04638671875,
-0.0023822784423828125,
0.03631591796875,
0.0504150390625,
-0.0231475830078125,
-0.0207977294921875,
0.0167388916015625,
0.0024261474609375,
-0.00926971435546875,
0.007537841796875,
0.04632568359375,
0.0238800048828125,
-0.0029315948486328125,
-0.00798797607421875,
0.0208282470703125,
-0.035552978515625,
0.01023101806640625,
-0.003082275390625,
-0.028472900390625,
0.0007824897766113281,
0.020416259765625,
-0.06201171875,
0.0341796875,
0.0980224609375,
0.047943115234375,
0.0789794921875,
0.00823974609375,
0.0291748046875,
0.033905029296875,
-0.0017271041870117188,
-0.032257080078125,
0.0015106201171875,
0.0206298828125,
-0.0062713623046875,
-0.0084991455078125,
0.0153350830078125,
-0.01180267333984375,
0.018341064453125,
0.06414794921875,
0.07562255859375,
-0.08050537109375,
0.0146026611328125,
0.0169677734375,
-0.01525115966796875,
0.0142822265625,
-0.0035457611083984375,
-0.01800537109375,
0.01094818115234375,
0.000018775463104248047,
-0.0007719993591308594,
-0.0259246826171875,
0.005828857421875,
0.045166015625,
-0.010498046875,
-0.006259918212890625,
0.0260009765625,
-0.006717681884765625,
-0.0286865234375,
-0.027069091796875,
0.0099639892578125,
-0.0308990478515625,
0.0167083740234375,
-0.001953125,
0.0035228729248046875,
-0.040313720703125,
-0.07232666015625,
-0.038055419921875,
-0.007366180419921875,
-0.03106689453125,
-0.0165863037109375,
-0.015777587890625,
-0.0009756088256835938,
0.050628662109375,
-0.0416259765625,
0.019683837890625,
0.0249786376953125,
0.00311279296875,
0.03070068359375,
-0.0253448486328125,
-0.0188446044921875,
0.0081634521484375,
-0.036773681640625,
0.0003337860107421875,
-0.0111236572265625,
-0.0125579833984375,
0.00270843505859375,
0.006961822509765625,
0.0268707275390625,
-0.0201416015625,
-0.0191497802734375,
0.035064697265625,
-0.0019168853759765625,
0.0011339187622070312,
-0.00884246826171875,
0.02398681640625,
-0.074462890625,
-0.037750244140625,
-0.007602691650390625,
-0.043670654296875,
-0.0109710693359375,
-0.026947021484375,
-0.04937744140625,
0.05462646484375,
0.0015802383422851562,
0.0067291259765625,
0.023895263671875,
0.0311279296875,
-0.048370361328125,
0.0014858245849609375,
-0.016815185546875,
0.033538818359375,
0.0562744140625,
-0.0108184814453125,
-0.01904296875,
-0.0220794677734375,
-0.0113677978515625,
0.04107666015625,
0.053466796875,
0.0122833251953125,
-0.05780029296875,
0.032073974609375,
0.0750732421875,
-0.01512908935546875,
-0.0148468017578125,
0.07684326171875,
0.01666259765625,
0.01363372802734375,
0.037841796875,
-0.019775390625,
0.04461669921875,
-0.033355712890625,
-0.0015544891357421875,
0.00957489013671875,
0.016326904296875,
-0.002635955810546875,
-0.0078277587890625,
0.0220794677734375,
-0.06951904296875,
0.007373809814453125,
0.051361083984375,
-0.00977325439453125,
-0.006023406982421875,
-0.0188751220703125,
-0.012359619140625,
-0.040008544921875,
0.0213470458984375,
-0.039581298828125,
0.0185089111328125,
0.0083160400390625,
-0.02166748046875,
-0.008148193359375,
0.01611328125,
0.0225067138671875,
-0.0283050537109375,
-0.035675048828125,
0.02044677734375,
-0.01389312744140625,
0.047027587890625,
0.05120849609375,
0.041900634765625,
0.01666259765625,
0.0369873046875,
0.0491943359375,
0.048828125,
-0.04205322265625,
-0.0186920166015625,
0.00858306884765625,
0.007404327392578125,
-0.006145477294921875,
-0.005786895751953125,
0.033416748046875,
-0.01340484619140625,
-0.024169921875,
-0.03533935546875,
-0.0035858154296875,
0.06304931640625,
-0.002960205078125,
0.0127716064453125,
0.042694091796875,
-0.03131103515625,
0.00502777099609375,
-0.040313720703125,
-0.0030879974365234375,
0.0296173095703125,
0.05926513671875,
0.021820068359375,
0.0270538330078125,
-0.007251739501953125,
-0.026153564453125,
-0.0302734375,
0.03814697265625,
-0.019439697265625,
0.046722412109375,
-0.06781005859375,
-0.034027099609375,
0.00469970703125,
0.0626220703125,
0.0182952880859375,
0.03125,
0.023040771484375,
0.035736083984375,
-0.01338958740234375,
0.00562286376953125,
0.0413818359375,
-0.028167724609375,
0.0139007568359375,
-0.02764892578125,
-0.0271759033203125,
-0.037872314453125,
-0.01812744140625,
-0.0180816650390625,
0.01279449462890625,
-0.0108489990234375,
0.01204681396484375,
0.034759521484375,
0.00809478759765625,
0.00789642333984375,
0.022613525390625,
-0.0229034423828125,
0.01531219482421875,
0.030029296875,
0.0084686279296875,
-0.01403045654296875,
0.00620269775390625,
0.0294189453125,
0.0024051666259765625,
0.01155853271484375,
-0.004241943359375,
0.03729248046875,
-0.018829345703125,
-0.022979736328125,
0.00452423095703125,
0.0030841827392578125,
0.00276947021484375,
0.024444580078125,
0.003963470458984375,
0.00235748291015625,
-0.0188446044921875,
-0.027130126953125,
-0.0259246826171875,
0.05126953125,
-0.022430419921875,
0.1295166015625,
-0.07586669921875,
0.00782012939453125,
0.00182342529296875,
0.005706787109375,
-0.0008077621459960938,
0.0127105712890625,
0.0027751922607421875,
0.004611968994140625,
-0.0032196044921875,
-0.021148681640625,
-0.060150146484375,
-0.000774383544921875,
0.0166168212890625,
-0.030364990234375,
0.031707763671875,
-0.0233306884765625,
0.01551055908203125,
-0.011322021484375,
0.003437042236328125,
-0.034637451171875,
-0.09356689453125,
-0.07666015625,
0.0228424072265625,
0.004878997802734375,
0.06500244140625,
-0.01548004150390625,
0.0297698974609375,
-0.006259918212890625,
-0.0306549072265625,
0.00640106201171875,
-0.050750732421875,
0.0248260498046875,
0.031982421875,
-0.0213165283203125,
-0.007633209228515625,
-0.0161895751953125,
-0.00847625732421875,
-0.005702972412109375,
0.004489898681640625,
0.00472259521484375,
-0.01190185546875,
0.0271148681640625,
-0.02606201171875,
-0.01451873779296875,
0.005649566650390625,
-0.01500701904296875,
0.0006537437438964844,
-0.02496337890625,
-0.01258087158203125,
-0.0021877288818359375,
-0.0023136138916015625,
-0.004108428955078125,
-0.0245361328125,
-0.0183563232421875,
0.0197601318359375,
-0.0288238525390625,
-0.03839111328125,
-0.0322265625,
0.006618499755859375,
0.076904296875,
0.017486572265625,
-0.06707763671875,
0.024261474609375,
-0.035919189453125,
0.07305908203125,
0.014251708984375,
0.0178070068359375,
-0.01128387451171875,
0.0011272430419921875,
-0.037750244140625,
-0.0310516357421875,
-0.0269317626953125,
0.0312347412109375,
-0.043914794921875,
-0.0105743408203125,
0.02984619140625,
0.0031185150146484375,
-0.0203399658203125,
-0.027008056640625,
-0.033050537109375,
0.032257080078125,
-0.06451416015625,
0.0012836456298828125,
0.014984130859375,
0.006694793701171875,
-0.0650634765625,
-0.04180908203125,
0.0181121826171875,
-0.028076171875,
-0.0215301513671875,
0.0173797607421875,
-0.01104736328125,
-0.00414276123046875,
-0.04888916015625,
-0.092041015625,
0.014251708984375,
0.0009031295776367188,
-0.0452880859375,
-0.03546142578125,
-0.0078277587890625,
-0.008514404296875,
0.04840087890625,
-0.0105133056640625,
-0.0095672607421875,
-0.0299224853515625,
0.0300750732421875,
0.00879669189453125,
0.04254150390625,
-0.0203399658203125,
-0.02154541015625,
-0.0209503173828125,
0.01204681396484375,
0.00872039794921875,
0.023590087890625,
-0.02349853515625,
-0.00463104248046875,
0.03173828125,
0.0479736328125,
0.01085662841796875,
0.007076263427734375,
0.035125732421875,
-0.06622314453125,
0.00079345703125,
-0.0281219482421875,
-0.042816162109375,
-0.04754638671875,
0.0256500244140625,
0.045318603515625,
0.0164337158203125,
0.00463104248046875,
-0.06549072265625,
-0.04541015625,
0.0075836181640625,
-0.039093017578125,
0.0286102294921875,
-0.0992431640625,
-0.0200042724609375,
0.007122039794921875,
-0.014251708984375,
0.002124786376953125,
0.025604248046875,
-0.01448822021484375,
0.011444091796875,
0.039215087890625,
-0.0207672119140625,
-0.0290985107421875,
-0.06378173828125,
0.065185546875,
-0.032806396484375,
-0.01250457763671875,
0.007965087890625,
0.051483154296875,
0.00897979736328125,
0.020965576171875,
-0.0007338523864746094,
0.0242156982421875,
-0.036041259765625,
0.0194244384765625,
0.00511932373046875,
0.0099334716796875,
-0.057830810546875,
-0.01537322998046875,
0.01263427734375,
0.0081939697265625,
-0.0248260498046875,
0.00682830810546875,
0.0084686279296875,
0.003582000732421875,
-0.0394287109375,
0.08380126953125,
-0.002185821533203125,
-0.015777587890625,
-0.034149169921875,
0.061920166015625,
-0.003932952880859375,
-0.021942138671875,
0.0204620361328125,
-0.005435943603515625,
0.00457000732421875,
0.011871337890625,
-0.0029163360595703125,
-0.0012035369873046875,
-0.0223236083984375,
-0.01151275634765625,
0.007556915283203125,
-0.0154571533203125
] |
d20ef23fd23493c8f09a4e9d0cb22d8288d6c839
|
Wordpress Stackexchange
Q: How to hide get_theme_mod if field empty I'm using: get_theme_mod to show various pieces of info from the theme customizer, in the following format:
<a href=" <?php get_theme_mod( $name, $default ) ?> ">This is the link</a>
I would like to hide the whole line if that particular customizer field is empty.
What could I wrap around the anchor to accomplish this?
A: $value = get_theme_mod( $name, $default );
if ($value !== $default) {
?>
<a href=" <?php echo $value; ?> ">This is the link</a>
<?php
}
|
Q: How to hide get_theme_mod if field empty I'm using: get_theme_mod to show various pieces of info from the theme customizer, in the following format:
<a href=" <?php get_theme_mod( $name, $default ) ?> ">This is the link</a>
I would like to hide the whole line if that particular customizer field is empty.
What could I wrap around the anchor to accomplish this?
A: $value = get_theme_mod( $name, $default );
if ($value !== $default) {
?>
<a href=" <?php echo $value; ?> ">This is the link</a>
<?php
}
A: Looking for an answer to displaying default text in place of a customizer set heading. In a funny roundabout way, thepost by @Otto gave me the idea of checking for an empty string.
<?php if( get_theme_mod( 'tcx_portfolio_intro') == '' ) : ?>
<div class="intro">
<h2><?php echo ('nothing here yet'); ?></h2>
</div>
<?php endif; ?>
A: Irrespective of your default value in the customizer setting, you could just compare the theme modification value to an empty string:
<?php
$link = get_theme_mod( $name );
if ($link !== '' ) {
?>
<a href="<?php echo $link; ?> ">This is the link</a>
<?php
}
?>
A: Test if is not null we will show the content:
if (get_theme_mod($name, '') != NULL){
// the content to show
}
If is null we will show nothing.
|
wordpress
|
{
"language": "en",
"length": 218,
"provenance": "stackexchange_00019.jsonl.gz:429479",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/88378"
}
|
[
0.0030612945556640625,
-0.005878448486328125,
0.034515380859375,
-0.024688720703125,
-0.0165252685546875,
0.022430419921875,
-0.0014200210571289062,
-0.0272369384765625,
-0.04425048828125,
-0.0013980865478515625,
-0.017974853515625,
-0.00603485107421875,
-0.0101776123046875,
-0.02972412109375,
0.031341552734375,
-0.071533203125,
0.0214385986328125,
0.0167236328125,
0.0537109375,
-0.0024776458740234375,
0.0023517608642578125,
0.01393890380859375,
0.030426025390625,
0.03363037109375,
0.0240325927734375,
-0.05242919921875,
0.1063232421875,
-0.00611114501953125,
0.020050048828125,
-0.0144805908203125,
0.021942138671875,
-0.019256591796875,
0.0109710693359375,
0.0145263671875,
0.019287109375,
0.03009033203125,
0.00981903076171875,
0.0022487640380859375,
0.0269317626953125,
0.00949859619140625,
0.0281219482421875,
-0.00554656982421875,
-0.04638671875,
0.009246826171875,
-0.041839599609375,
-0.03192138671875,
0.01255035400390625,
0.0032978057861328125,
-0.0178070068359375,
0.033355712890625,
0.0293731689453125,
0.0298919677734375,
0.0209197998046875,
0.0164794921875,
0.00235748291015625,
0.031341552734375,
-0.0318603515625,
0.0002410411834716797,
0.033355712890625,
0.0079345703125,
-0.03192138671875,
-0.033172607421875,
0.01947021484375,
-0.038238525390625,
0.0145111083984375,
0.034820556640625,
-0.0295562744140625,
0.00974273681640625,
-0.048248291015625,
0.0017766952514648438,
0.0221710205078125,
-0.0665283203125,
0.01372528076171875,
-0.0194549560546875,
-0.0232391357421875,
-0.0204925537109375,
-0.0188446044921875,
-0.0501708984375,
0.0304718017578125,
-0.01221466064453125,
0.0036716461181640625,
-0.036041259765625,
-0.03521728515625,
-0.0199737548828125,
0.0284423828125,
0.0168914794921875,
-0.00101470947265625,
-0.0068359375,
0.0080413818359375,
-0.03515625,
0.005794525146484375,
0.0221710205078125,
-0.054840087890625,
0.015777587890625,
0.0148773193359375,
-0.048675537109375,
0.0279083251953125,
0.06298828125,
-0.00826263427734375,
0.01971435546875,
-0.005588531494140625,
-0.049102783203125,
0.0284576416015625,
-0.044708251953125,
-0.0125732421875,
0.037384033203125,
0.0164642333984375,
0.00510406494140625,
0.014007568359375,
0.0015535354614257812,
-0.0006265640258789062,
-0.005069732666015625,
-0.01090240478515625,
0.032958984375,
-0.046966552734375,
0.0005559921264648438,
-0.041015625,
0.00360107421875,
-0.029327392578125,
0.0287628173828125,
0.006046295166015625,
0.00262451171875,
0.0177459716796875,
-0.0230712890625,
-0.01404571533203125,
-0.014862060546875,
-0.047882080078125,
-0.014495849609375,
0.01447296142578125,
0.039459228515625,
-0.04913330078125,
-0.0288848876953125,
0.054840087890625,
0.0445556640625,
0.0333251953125,
-0.0439453125,
0.0124359130859375,
-0.0079803466796875,
0.0160369873046875,
-0.01085662841796875,
0.002925872802734375,
-0.01155853271484375,
0.0251922607421875,
-0.01239776611328125,
-0.0291748046875,
0.048492431640625,
0.0237579345703125,
-0.0232391357421875,
-0.040313720703125,
-0.0784912109375,
-0.009429931640625,
-0.037445068359375,
0.020172119140625,
0.034912109375,
0.006008148193359375,
0.023345947265625,
0.0419921875,
-0.0179901123046875,
-0.026580810546875,
-0.029144287109375,
0.00978851318359375,
-0.01552581787109375,
0.0006356239318847656,
-0.0537109375,
-0.06292724609375,
0.004161834716796875,
-0.0248260498046875,
0.0048065185546875,
0.0205230712890625,
-0.0081939697265625,
0.0521240234375,
-0.00971221923828125,
0.0250701904296875,
0.02130126953125,
0.0147857666015625,
0.01233673095703125,
0.0156707763671875,
-0.015625,
0.02459716796875,
-0.01026153564453125,
-0.0271759033203125,
-0.03314208984375,
0.031951904296875,
-0.0123138427734375,
-0.058624267578125,
0.0576171875,
-0.00797271728515625,
0.0694580078125,
0.0187835693359375,
0.0011310577392578125,
0.04327392578125,
0.012298583984375,
-0.0340576171875,
-0.046112060546875,
-0.014739990234375,
0.018524169921875,
0.013916015625,
0.00971221923828125,
-0.00785064697265625,
0.0201568603515625,
0.0011968612670898438,
0.00713348388671875,
-0.002994537353515625,
0.003253936767578125,
-0.01529693603515625,
0.002780914306640625,
0.0022754669189453125,
0.0165863037109375,
-0.0293731689453125,
0.0268707275390625,
0.0247039794921875,
0.0129241943359375,
-0.041473388671875,
-0.01160430908203125,
0.00478363037109375,
-0.0001913309097290039,
0.006893157958984375,
0.037811279296875,
-0.011627197265625,
0.0068359375,
0.01213836669921875,
-0.035369873046875,
0.0072479248046875,
0.0411376953125,
0.02496337890625,
-0.01139068603515625,
-0.003948211669921875,
-0.014923095703125,
0.023956298828125,
-0.00751495361328125,
0.01299285888671875,
0.0087738037109375,
0.047149658203125,
0.0015115737915039062,
-0.0369873046875,
-0.001338958740234375,
-0.0184478759765625,
-0.07977294921875,
-0.01236724853515625,
0.0635986328125,
0.01302337646484375,
0.03851318359375,
-0.03570556640625,
-0.0259552001953125,
0.094970703125,
-0.002399444580078125,
-0.0107269287109375,
-0.006412506103515625,
0.006984710693359375,
0.01016998291015625,
0.0218353271484375,
-0.01317596435546875,
0.0184783935546875,
-0.0060577392578125,
-0.00995635986328125,
0.025726318359375,
-0.016845703125,
0.0099029541015625,
-0.028228759765625,
0.0262298583984375,
-0.015045166015625,
0.007625579833984375,
0.0246734619140625,
-0.0195770263671875,
0.03173828125,
0.025360107421875,
0.019805908203125,
0.01215362548828125,
-0.0634765625,
0.038543701171875,
0.02471923828125,
0.018341064453125,
-0.00852203369140625,
0.02398681640625,
-0.018798828125,
-0.024078369140625,
0.0023059844970703125,
-0.008148193359375,
-0.00841522216796875,
-0.0103759765625,
-0.0210418701171875,
-0.0127105712890625,
0.004817962646484375,
-0.004833221435546875,
0.043914794921875,
0.01031494140625,
0.0195465087890625,
-0.02911376953125,
0.01061248779296875,
-0.0006461143493652344,
-0.004344940185546875,
0.044921875,
-0.00846099853515625,
0.04754638671875,
0.0031414031982421875,
-0.01222991943359375,
-0.04156494140625,
-0.06329345703125,
0.048370361328125,
-0.047637939453125,
-0.01195526123046875,
0.066162109375,
0.0091552734375,
0.00606536865234375,
0.0086669921875,
-0.00971221923828125,
0.023529052734375,
-0.00920867919921875,
0.0010099411010742188,
-0.0017833709716796875,
-0.054962158203125,
-0.00988006591796875,
0.027740478515625,
0.014739990234375,
-0.010101318359375,
-0.033294677734375,
-0.031585693359375,
0.0214080810546875,
-0.06158447265625,
-0.026092529296875,
-0.005008697509765625,
-0.051116943359375,
-0.0318603515625,
-0.0111236572265625,
-0.0511474609375,
0.0136260986328125,
0.0166778564453125,
-0.01561737060546875,
-0.0178070068359375,
-0.04736328125,
-0.06866455078125,
-0.08282470703125,
-0.0733642578125,
0.007144927978515625,
-0.007724761962890625,
0.016082763671875,
-0.004474639892578125,
0.10589599609375,
-0.005237579345703125,
-0.0537109375,
-0.012176513671875,
-0.01837158203125,
0.01194000244140625,
0.048004150390625,
-0.0196380615234375,
0.01532745361328125,
-0.004215240478515625,
0.0190582275390625,
0.0159912109375,
0.003162384033203125,
-0.0203857421875,
-0.0262603759765625,
-0.00896453857421875,
-0.030426025390625,
0.0019178390502929688,
0.045562744140625,
0.018951416015625,
-0.006404876708984375,
0.0287933349609375,
-0.048095703125,
-0.05316162109375,
-0.0309906005859375,
-0.08489990234375,
0.07244873046875,
0.0595703125,
0.00634765625,
0.0030193328857421875,
0.01189422607421875,
0.0103302001953125,
0.01203155517578125,
0.005519866943359375,
-0.02630615234375,
0.0251617431640625,
0.0211029052734375,
0.0173187255859375,
-0.015777587890625,
0.0263519287109375,
-0.0293426513671875,
0.01294708251953125,
0.0027942657470703125,
-0.00839996337890625,
0.0032176971435546875,
-0.04620361328125,
-0.017364501953125,
-0.019683837890625,
0.045623779296875,
0.026092529296875,
0.038970947265625,
-0.03173828125,
-0.03741455078125,
-0.035308837890625,
0.060821533203125,
-0.0243988037109375,
-0.01554107666015625,
-0.04156494140625,
0.001922607421875,
-0.0171051025390625,
-0.0394287109375,
-0.00983428955078125,
0.0105438232421875,
-0.1767578125,
0.046295166015625,
0.0013799667358398438,
-0.029327392578125,
-0.0345458984375,
0.016845703125,
-0.1192626953125,
-0.057586669921875,
0.04437255859375,
-0.03472900390625,
0.0222015380859375,
0.037322998046875,
-0.007305145263671875,
0.02349853515625,
-0.037689208984375,
-0.0266876220703125,
-0.038421630859375,
-0.00402069091796875,
0.009521484375,
0.004474639892578125,
-0.002346038818359375,
0.00975799560546875,
-0.01337432861328125,
0.01580810546875,
0.0253143310546875,
0.01105499267578125,
-0.01171112060546875,
-0.027374267578125,
-0.0181732177734375,
0.0205535888671875,
-0.008544921875,
-0.01372528076171875,
-0.0006098747253417969,
0.0006036758422851562,
-0.03326416015625,
0.00811004638671875,
-0.022430419921875,
-0.00928497314453125,
0.02203369140625,
-0.037689208984375,
0.0003757476806640625,
0.00637054443359375,
-0.035125732421875,
-0.02093505859375,
-0.022125244140625,
-0.0121002197265625,
0.030517578125,
-0.01348114013671875,
0.01146697998046875,
-0.0447998046875,
-0.0008234977722167969,
0.01739501953125,
0.064208984375,
0.0309600830078125,
0.00785064697265625,
-0.0200958251953125,
0.003170013427734375,
0.04339599609375,
0.0196075439453125,
0.002086639404296875,
-0.026397705078125,
-0.062347412109375,
0.07940673828125,
0.020263671875,
0.0104522705078125,
0.01393890380859375,
0.037322998046875,
-0.0224609375,
-0.03411865234375,
0.0201263427734375,
-0.025390625,
-0.0002453327178955078,
0.036346435546875,
-0.0031185150146484375,
-0.01291656494140625,
-0.01367950439453125,
0.006175994873046875,
-0.007343292236328125,
-0.005443572998046875,
-0.0197906494140625,
-0.01519775390625,
-0.001041412353515625,
0.018951416015625,
0.0157318115234375,
-0.0028858184814453125,
0.002094268798828125,
-0.004825592041015625,
0.0222930908203125,
0.02081298828125,
-0.018096923828125,
0.0275421142578125,
-0.04815673828125,
0.026153564453125,
-0.01171112060546875,
-0.0009112358093261719,
-0.01323699951171875,
-0.01293182373046875,
-0.002819061279296875,
-0.0144500732421875,
-0.04473876953125,
-0.0007157325744628906,
-0.0126190185546875,
-0.006664276123046875,
0.0285186767578125,
-0.02435302734375,
0.02130126953125,
0.007236480712890625,
-0.01025390625,
0.029388427734375,
-0.004665374755859375,
-0.003936767578125,
-0.0237274169921875,
0.0169677734375,
0.01557159423828125,
-0.01184844970703125,
-0.0006279945373535156,
0.0501708984375,
0.03021240234375,
0.00244903564453125,
-0.0160369873046875,
-0.0178680419921875,
-0.00605010986328125,
0.0325927734375,
0.01383209228515625,
0.00609588623046875,
0.0034580230712890625,
0.01178741455078125,
0.043060302734375,
-0.0277557373046875,
-0.0217437744140625,
0.0316162109375,
0.0458984375,
0.0126800537109375,
-0.01279449462890625,
0.0006022453308105469,
-0.006145477294921875,
-0.015655517578125,
0.035003662109375,
-0.004241943359375,
-0.040985107421875,
-0.043731689453125,
0.0223236083984375,
0.054779052734375,
-0.0087738037109375,
-0.020416259765625,
0.0248870849609375,
-0.020172119140625,
-0.0093994140625,
0.01168060302734375,
-0.06939697265625,
0.0278778076171875,
0.045074462890625,
0.0064697265625,
0.0019702911376953125,
-0.01050567626953125,
-0.071044921875,
-0.035430908203125,
-0.0124359130859375,
-0.0075531005859375,
0.033111572265625,
-0.00408172607421875,
0.0235595703125,
-0.06036376953125,
0.0174102783203125,
-0.030059814453125,
-0.01690673828125,
0.07305908203125,
0.034759521484375,
-0.047271728515625,
0.0288543701171875,
-0.03521728515625,
-0.00887298583984375,
-0.06158447265625,
-0.07452392578125,
-0.055023193359375,
-0.0079803466796875,
0.018707275390625,
0.0206146240234375,
0.0265960693359375,
-0.0254058837890625,
-0.0136871337890625,
0.022674560546875,
0.0155181884765625,
0.034454345703125,
0.000835418701171875,
0.03558349609375,
0.01349639892578125,
0.024383544921875,
0.027862548828125,
0.0196380615234375,
0.01305389404296875,
-0.036407470703125,
0.0172271728515625,
0.0031528472900390625,
-0.0182952880859375,
-0.0269012451171875,
0.0075836181640625,
-0.042877197265625,
0.005077362060546875,
-0.0220947265625,
0.0035400390625,
0.001705169677734375,
-0.0007610321044921875,
-0.0252685546875,
0.002170562744140625,
0.019866943359375,
-0.00128936767578125,
-0.0162353515625,
-0.0251007080078125,
-0.01300811767578125,
0.0189971923828125,
-0.01812744140625,
0.0221710205078125,
0.0036487579345703125,
0.008514404296875,
-0.00446319580078125,
-0.020721435546875,
0.0799560546875,
0.10369873046875,
-0.01374053955078125,
0.03790283203125,
0.0240325927734375,
-0.01042938232421875,
0.0046539306640625,
0.01140594482421875,
-0.0186614990234375,
0.01206207275390625,
0.07525634765625,
0.024139404296875,
0.0083465576171875,
0.061798095703125,
-0.01450347900390625,
0.03192138671875,
0.021392822265625,
0.10430908203125,
-0.050079345703125,
0.01010894775390625,
0.0572509765625,
0.00151824951171875,
0.03369140625,
0.00103759765625,
-0.0011615753173828125,
-0.039794921875,
-0.004726409912109375,
-0.01934814453125,
-0.00514984130859375,
-0.016693115234375,
-0.021484375,
-0.00391387939453125,
-0.019775390625,
0.05596923828125,
0.018463134765625,
-0.037261962890625,
0.032257080078125,
0.01800537109375,
0.0198822021484375,
-0.0200042724609375,
-0.00905609130859375,
0.004077911376953125,
-0.0543212890625,
-0.08758544921875,
-0.020965576171875,
0.01458740234375,
-0.017333984375,
-0.00605010986328125,
-0.006069183349609375,
0.01146697998046875,
0.039886474609375,
-0.0285186767578125,
0.0172271728515625,
-0.0012731552124023438,
-0.01348114013671875,
-0.016571044921875,
-0.0313720703125,
-0.02410888671875,
0.0555419921875,
-0.01316070556640625,
0.0223236083984375,
0.01369476318359375,
-0.00756072998046875,
-0.039794921875,
-0.0274200439453125,
0.1220703125,
-0.0181732177734375,
-0.03369140625,
0.026275634765625,
0.0306549072265625,
-0.037200927734375,
-0.0205535888671875,
0.051300048828125,
0.004444122314453125,
0.0438232421875,
-0.003818511962890625,
0.04608154296875,
-0.00804901123046875,
-0.0254058837890625,
-0.06951904296875,
0.1083984375,
0.013763427734375,
0.0182647705078125,
-0.01139068603515625,
0.04345703125,
-0.01139068603515625,
0.028839111328125,
-0.04248046875,
0.053436279296875,
0.0160980224609375,
0.035888671875,
-0.031341552734375,
-0.0011205673217773438,
0.0151519775390625,
0.015869140625,
0.01306915283203125,
0.001556396484375,
-0.0013074874877929688,
0.02276611328125,
0.06683349609375,
0.03448486328125,
0.00762939453125,
0.0102386474609375,
0.00508880615234375,
0.050323486328125,
0.049163818359375,
-0.032073974609375,
0.0266876220703125,
0.00246429443359375,
-0.028961181640625,
0.044403076171875,
-0.0024814605712890625,
-0.01132965087890625,
0.04925537109375,
0.00894927978515625,
-0.029327392578125,
0.0310211181640625,
0.03466796875,
-0.0380859375,
-0.00911712646484375,
0.0266571044921875,
0.041168212890625,
-0.03955078125,
0.01441192626953125,
-0.0279388427734375,
0.04852294921875,
0.0223541259765625,
0.017578125,
0.0186767578125,
0.020294189453125,
0.039703369140625,
-0.088134765625,
-0.0156402587890625,
-0.0174713134765625,
-0.045928955078125,
0.00612640380859375,
0.0205230712890625,
0.0078277587890625,
-0.01324462890625,
0.0044708251953125,
0.031097412109375,
0.0160675048828125,
-0.0186767578125,
-0.0270843505859375,
0.03460693359375,
-0.0011968612670898438,
-0.038726806640625,
0.011932373046875,
-0.01457977294921875,
0.040313720703125,
0.07373046875,
-0.0499267578125,
0.0242919921875,
0.0396728515625,
0.03228759765625,
-0.0177459716796875,
-0.004810333251953125,
-0.0748291015625,
-0.00004106760025024414,
-0.046478271484375,
-0.01444244384765625,
0.041229248046875,
0.045867919921875,
0.03839111328125,
0.0068359375,
0.016387939453125,
-0.01187896728515625,
0.01465606689453125,
0.01114654541015625,
0.006072998046875,
-0.006198883056640625,
-0.00472259521484375,
-0.02215576171875,
0.0205230712890625,
0.01959228515625,
0.04034423828125,
0.00865936279296875,
0.047760009765625,
0.03057861328125,
0.004352569580078125,
0.002079010009765625,
-0.0140533447265625,
-0.01335906982421875,
0.0002765655517578125,
-0.038421630859375,
0.0457763671875,
0.033782958984375,
0.01727294921875,
-0.0090789794921875,
0.00435638427734375,
0.0675048828125,
-0.0147857666015625,
0.0128936767578125,
0.006072998046875,
-0.037628173828125,
0.01499176025390625,
-0.0367431640625,
0.049285888671875,
0.0008826255798339844,
-0.0535888671875,
-0.0160369873046875,
-0.0100860595703125,
-0.021148681640625,
0.00817108154296875,
0.03265380859375,
-0.01971435546875,
0.0273895263671875,
-0.0208587646484375,
0.0245361328125,
-0.013916015625,
-0.009002685546875,
-0.018829345703125,
-0.0212860107421875,
0.0369873046875,
-0.01372528076171875,
-0.08184814453125,
-0.048858642578125,
-0.052093505859375,
0.0292816162109375,
-0.01055908203125,
0.045257568359375,
0.00991058349609375,
0.026519775390625,
-0.006755828857421875,
0.0352783203125,
-0.03839111328125,
0.0057220458984375,
-0.02239990234375,
0.0023174285888671875,
0.031768798828125,
-0.00786590576171875,
-0.0133056640625,
0.00554656982421875,
0.02972412109375,
-0.0440673828125,
0.00962066650390625,
0.0047454833984375,
0.0206756591796875,
-0.0248870849609375,
-0.0078125,
-0.030029296875,
-0.07818603515625,
-0.03558349609375,
0.031646728515625,
-0.02294921875,
0.0017852783203125,
-0.0191192626953125,
-0.0022335052490234375,
-0.018402099609375,
-0.0238800048828125,
0.01910400390625,
-0.00914764404296875,
0.037017822265625,
0.0380859375,
-0.037200927734375,
-0.00605010986328125,
-0.01715087890625,
-0.027008056640625,
0.0303497314453125,
0.00007593631744384766,
0.0017538070678710938,
-0.01145172119140625,
-0.00975799560546875,
0.041961669921875,
0.0146636962890625,
0.042877197265625,
-0.052642822265625,
-0.0014009475708007812,
0.0496826171875,
0.0162200927734375,
0.00678253173828125,
-0.042724609375,
-0.022003173828125,
-0.040130615234375,
-0.0255279541015625,
0.01184844970703125,
-0.04742431640625,
-0.0555419921875,
-0.050628662109375,
0.0020198822021484375,
-0.00411224365234375,
-0.0338134765625,
-0.004222869873046875,
-0.025787353515625,
-0.025970458984375,
0.06927490234375,
-0.07733154296875,
0.029205322265625,
0.0147857666015625,
0.0271148681640625,
0.0133056640625,
0.00402069091796875,
0.00989532470703125,
0.02703857421875,
0.047576904296875,
0.0111541748046875,
0.049835205078125,
-0.0005698204040527344,
-0.01343536376953125,
0.0222625732421875,
-0.01097869873046875,
0.055267333984375,
-0.07275390625,
-0.01436614990234375,
0.000027239322662353516,
-0.00164031982421875,
-0.048095703125,
-0.025665283203125,
0.042144775390625,
-0.0413818359375,
-0.044921875,
-0.0308990478515625,
-0.030426025390625,
-0.0194854736328125,
-0.062744140625,
-0.0828857421875,
0.06817626953125,
-0.01116943359375,
-0.030487060546875,
-0.0241851806640625,
0.01331329345703125,
-0.00394439697265625,
0.041168212890625,
0.007526397705078125,
-0.0235595703125,
-0.005283355712890625,
0.0020904541015625,
-0.01308441162109375,
-0.0018796920776367188,
0.03173828125,
-0.00982666015625,
-0.057952880859375,
-0.021392822265625,
-0.03570556640625,
-0.0200042724609375,
0.01122283935546875,
-0.00986480712890625,
0.0225067138671875,
0.03790283203125,
-0.0303497314453125,
-0.039306640625,
-0.02020263671875,
-0.028717041015625,
0.008514404296875,
-0.0262603759765625,
-0.038055419921875,
-0.023529052734375,
0.0537109375,
0.0289459228515625,
0.0194549560546875,
-0.01212310791015625,
-0.0140228271484375,
0.00543212890625,
-0.025360107421875,
-0.0200958251953125,
0.0521240234375,
-0.11761474609375,
-0.03143310546875,
0.04278564453125,
-0.0093841552734375,
0.01395416259765625,
0.00010037422180175781,
-0.0325927734375,
0.00508880615234375,
-0.01763916015625,
-0.007465362548828125,
-0.0928955078125,
-0.010345458984375,
0.0252838134765625,
-0.0201416015625,
0.006500244140625,
-0.01288604736328125,
0.0210418701171875,
0.004978179931640625,
0.01168060302734375,
-0.0033855438232421875,
-0.040069580078125,
-0.04150390625,
0.020233154296875,
-0.0162353515625,
0.0200958251953125,
-0.01372528076171875,
-0.02886962890625,
-0.0030803680419921875,
0.00908660888671875,
-0.0009198188781738281,
0.00318145751953125,
-0.0038433074951171875,
0.01727294921875,
0.01033782958984375,
0.0027618408203125,
-0.0386962890625,
0.034332275390625,
-0.01015472412109375,
0.01861572265625,
-0.028228759765625,
0.037384033203125,
0.02423095703125,
-0.01540374755859375,
0.006229400634765625,
0.01496124267578125,
0.022125244140625,
-0.031341552734375,
0.04071044921875,
-0.035614013671875,
0.02008056640625,
0.0182342529296875
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.