spiros
Forum Replies Created
-
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] AMP menu not Unicode safeLooks fixed with latest version
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] AMP menu not Unicode safeI allowlisted the IPs and now I see this:
curl -v https://noc1.wordfence.com * About to connect() to noc1.wordfence.com port 443 (#0) * Trying 52.25.185.95... * Connected to noc1.wordfence.com (52.25.185.95) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 * Server certificate: * subject: CN=noc1.wordfence.com * start date: May 12 00:00:00 2024 GMT * expire date: Jun 11 23:59:59 2025 GMT * common name: noc1.wordfence.com * issuer: CN=Amazon RSA 2048 M02,O=Amazon,C=US > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: noc1.wordfence.com > Accept: */* > < HTTP/1.1 200 OK < Date: Tue, 28 May 2024 17:25:31 GMT < Content-Type: text/plain < Content-Length: 108 < Connection: keep-alive < Server: nginx < X-Frame-Options: SAMEORIGIN < X-XSS-Protection: 1; mode=block < X-Content-Type-Options: nosniff < Strict-Transport-Security: max-age=31536000; includeSubDomains < * Connection #0 to host noc1.wordfence.com left intact {"errorMsg":"Wordfence API error: Your site did not send an API key when contact
php error log
Same with me, thousands of these entries. Debug is off in
Forum: Developing with WordPress
In reply to: Display category count shortcodeThank you!
I just tried it, and no matter what number I use in the shortcode, I always get 769 as output.function cat_count_cb( $atts, $content = null ) { $atts = shortcode_atts( array( 'child_of' => 0, 'fields' => 'ids', 'taxonomy' => 'category', ), $atts ); $query = new WP_Term_Query( $atts ); return empty( $query->terms ) ? 'Bad ID' : count( $query->terms ); } add_shortcode( 'cat_count', 'cat_count_cb' );
Interesting, I got the right result for the category by using
'child_of' => 43,
Ie specifying the category in the actual functions.php code and not in the shortcode (then, again, no matter what number I used in the shortcode, the output is always the same). So I guess the shortcode cat id is not parsed as variable in the way the function is constructed?
Forum: Developing with WordPress
In reply to: Display category count shortcodeNope, there are not many empty ones (if any) ??
As I said, the exact same category provides 330 items with the other function and this function always outputs 162 no matter which number I use!
Forum: Developing with WordPress
In reply to: Display category count shortcodeThanks! That solved the error. Strangely, using
[cat_count "child_of"=43]
(and no matter what number I change it too), the output is always the same, 162!When editing that category I get the URL
...term.php?taxonomy=category&tag_ID=43&post_type=post&wp_http_referer=%2Fwp-admin%2Fedit-tags.
The specific category (slug: poet) has at least 330 children – listed all here: https://poiimata.com/poets/ using the shortcode
[categories orderby = name child_of = 43 title_li = '' use_desc_for_title = 0 show_count = 1]
- This reply was modified 2 years, 6 months ago by spiros.
Forum: Developing with WordPress
In reply to: Display category count shortcodeWow, thank you so much!
Just tried it but it give me a critical error.[28-May-2022 18:47:49 UTC] PHP Parse error: syntax error, unexpected token “;”, expecting “)” in …functions.php on line 78
Which is:
'taxonomy' => 'category';
Forum: Developing with WordPress
In reply to: Display category count shortcodeThanks! The above code is not mine. I don’t have the skills to construct the function. I have also used this plugin to list_categories:
https://github.com/picandocodigo/List-Categories/blob/master/list-categories.php
ie
[categories orderby=name child_of=19 title_li='' use_desc_for_title=0 show_count=1]
but I don’t know if there is any way to make it display only the number and not the actual categories.
- This reply was modified 2 years, 6 months ago by spiros.
Looks like the culprit was some code in htaccess
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
I did disconnect and reconnect. No change in affected posts. Do I have to change a setting somewhere?
- This reply was modified 2 years, 7 months ago by spiros.
Also, just tested with Jetpack > Performance and Growth > Image Accelerator > Off
Result: image is displayed here after refresh https://poiimata.com/2017/12/05/kolofoties-spyros-bogdanos/ and it is also displayed as a thumbnail when editing the post’s at the featured image selection section. Turning Image Accelerator > On results in the same problem reappearing.
The broken thumbnails in relevant posts remain in both of these cases.
Hi,
It is connected: https://ibb.co/DY7nSc1
And the image appears to exist on server: https://ibb.co/wC5JNRk
(apparently some hotlink setting or something protects the images from direct access or somehow a thumbnail version is requested which does not exist?)For example in this post: https://poiimata.com/2022/04/29/nychta-toy-pascha-paylina-pampoydi/
The image URL apparently is: https://poiimata.com/wp-content/uploads/2018/10/angel-1359143_640.jpg which is also not directly accesible via this URL (nor the listed permalink in the actual code, although when clicking at that link from Media, it is directly accessible), however, it is displayed just fine.
data-attachment-id="2898" data-permalink="https://poiimata.com/2018/10/12/vrohera-apogeumata-tsiourakis/angel-1359143_640/#main" data-orig-file="https://i0.wp.com/poiimata.com/wp-content/uploads/2018/10/angel-1359143_640.jpg?fit=640%2C426&ssl=1" data-orig-size="640,426"
Forum: Fixing WordPress
In reply to: Display a YouTube video in the category descriptionI found it
add_filter( 'term_description', array( $GLOBALS['wp_embed'], 'autoembed' ) );