luvjapan
Forum Replies Created
-
Hello.
OK.
Thank you.
ShinHello.
No answer, is this plugin no longer supported?
Are you planning to update?Thank you.
ShinnosukeThank you for answering.
I changed it to the following code.
However, the first image of the content and the first image of the gallery cannot be displayed.function my_custom_single_popular_post ($ post_html, $ p, $ instance) { $ size = 'wpp-thumbnail'; $ blog_cover_image = get_field ('blog_cover_image', $ p-> id); // change $ title = get_the_title ($ post-> ID); // Get the first image and get the ID ????$ first_list = ''; ????ob_start (); ????ob_end_clean (); ????$ post_content = get_post_field ('post_content', $ p-> id); // change ????preg_match_all ("/ <img [^>] + src = [\" '] (s? https?: \ / \ / [\ -_ \.! ~ \ *' () a-z0-9; \ / \ ?: @ & = \ + \ $,% #] + \. (jpg | jpeg | png | gif)) [\ "'] [^>] +> / i", $ post_content, $ matches); // Change // Find the default image for the category $ taxonomy_names = get_post_taxonomies ($ p-> id); if (! empty ($ taxonomy_names [0])) { $ cats = get_the_terms ($ p-> id, $ taxonomy_names [0]); ????foreach ((array) $ cats as $ cat) { ????????if (! empty ($ cats [0])) { ????$ cat_id = $ cat-> term_id; ????$ attachment_id = get_field ('category-image', 'category_'. $ cat_id); ????????if (! empty ($ attachment_id)) break; // End the loop when a category image is found ????} ????} ????} // Search for Youtube images $ youtubePost = $ post_content; // change preg_match ('/ www.youtube. [-_ \ / A-Za-z0-9] * /', $ youtubePost, $ youtubeUrl); preg_match ('/ www.youtube. [-_? = \ / A-Za-z0-9] * /', $ youtubePost, $ pasteUrl); preg_match ('/ youtu.be. [-_? = \ / A-Za-z0-9] * /', $ youtubePost, $ beUrl); // Find the first image of the gallery shortcode ?$ pattern = get_shortcode_regex (); ????$ id = absint ($ p-> id); ????if (empty ($ id)) { ????????$ id = absint ($ post-> ID); ????????$ text = $ post-> post_content; ????} else { ????????$ text = get_post ($ id); ????????$ text = $ post_content; ????} if (has_post_thumbnail ($ p-> id)) {// Processing when a post has a thumbnail $ thumb_id = get_post_thumbnail_id ($ p-> id); $ thumb_array = wp_get_attachment_image_src ($ thumb_id, $ size); $ thumb = '<img src = "'. $ thumb_array [0]. '" alt = "'. $ p-> title. '">'; } else if (isset ($ youtubeUrl [0])) {// Processing when there is a Youtube image if (preg_match ('/ embed /', $ youtubeUrl [0])) { $ youtubeId = str_replace ("www.youtube.com/embed /", "", $ youtubeUrl [0]); $ thumb = '<img src = "// img.youtube.com/vi /'.$ youtubeId.' / 0.jpg"> '; } else if (preg_match ('/ watch /', $ pasteUrl [0])) { $ pasteId = str_replace ("www.youtube.com/watch?v =", "", $ pasteUrl [0]); $ thumb = "<img src = '// img.youtube.com/vi/$pasteId/0.jpg'>"; } } else if (isset ($ beUrl [0])) { if (preg_match ('/ youtu.be/',$beUrl[0])) { $ beId = str_replace ("youtu.be /", "", $ beUrl [0]); $ thumb = "<img src = '// img.youtube.com/vi/$beId/0.jpg'>"; } } else // Branch if there is a gallery image ????if (preg_match ('/'. $ pattern. '/ s', $ text, $ matches) && 'gallery' == $ matches [2]) { ????????if (preg_match ('! ids = (\' | ") ([0-9,] +) (\ '|")!', $ matches [3], $ regs)) { ????????????$ thumb_array = wp_get_attachment_image ($ regs [2], $ size); ????????????$ thumb = '<img src = "'. $ thumb_array [0]. '" alt = "'. $ p-> title. '">'; ????????} } else if (! empty ($ first_list)) {// Branch if the first image is in the text // Get the thumbnail path from the first image ID and set if (isset ($ matches [1] [0])) { ????$ first_list = ($ matches [1] [0]); ????$ thumb_array = wp_get_attachment_image_src ($ first_list, $ size, false); ????$ thumb = '<img src = "'. $ thumb_array [0]. '" alt = "'. $ p-> $ title. '">'; ????} } else if (! empty ($ attachment_id)) {// Default category image is displayed because there is no thumbnail $ thumb = wp_get_attachment_image ($ attachment_id, $ size, false); $ thumb = preg_replace ('/(width|height|srcset|sizes)="(.*?)"\s/', '', $ thumb); } else if (! empty ($ blog_cover_image)) { $ thumb_array = wp_get_attachment_image_src ($ blog_cover_image, $ size, false); $ thumb = '<img src = "'. $ thumb_array [0]. '" alt = "'. $ p-> $ title. '">'; } else if (empty ($ img_id)) {// Display the default image if there is no image with the above conditions ????????$ default = get_field ('default_image', $ p-> id); // change ????????$ img_id = $ default; ????????$ thumb_array = wp_get_attachment_image_src ($ default, $ size, false); ????????$ thumb = '<img src = "'. $ thumb_array [0]. '" alt = "'. $ p-> title. '">'; ????} ????$ output = '<li> <div class = "wpp-img"> <a href="'. get_the_permalink($p-> id).' "> '. $ thumb.' </a> <p class = "wpp-post-title"> <a href="'. get_the_permalink($p-> id). '">'. $ p-> title. '</a> </ p>'. date ('Ym -d ', strtotime ($ p-> date)).' </ div> </ li> '; ????return $ output; } if (! is_admin ()) add_filter ('wpp_post', 'my_custom_single_popular_post', 10, 3); // Excluded in admin screen
$blog_cover_image = get_field('blog_cover_image',$p->id);
$default = get_field('default_image',$p->id);
This code was displayed by reverting to the code below.
$blog_cover_image = get_field('blog_cover_image',option);
$default = get_field('default_image',option);
Is there a way to fix this?
Forum: Plugins
In reply to: [ACF User Role Field Setting] About the error.Hi,
I appreciate your swift response.
I manually downloaded and resolved.
Thank you.
Hello,
When is this bug fixed?
Thank you for your support.
ShinnosukeHello,
Was this problem solved with the plug-in?
Have you updated?Thank you for your support.
ShinnosukeHello,
Thank you for you reply.
I like this plugin.
I purchased “Events Calendar PRO”.
Please contact me if the problem is fixed.
I plan to purchase “Event Tickets Plus” after solving this problem.
I’d like to express my deepest appreciation for your help and support.My English isn’t so good so feel free to ask me if there is anything unclear.
I’ll be counting on you.
ShinnosukeHello,
Thanks for the response.
I prepared a new environment for testing.
https://tribe-events.nous-t.comI will inform you System Info.
== Server Environment ==
Operating System:Linux
Software:Apache
MySQL version:5.7.17
PHP Version:7.1.4
PHP Max Input Vars:2000
PHP Max Post Size:1000M
GD Installed:Yes
Write Permissions:All right== WordPress Environment ==
Version: 4.9.4
Site URL: https://tribe-events.nous-t.com
Home URL: https://tribe-events.nous-t.com
WP Multisite: No
Max Upload Size: 1,000 MB
Memory limit: 512M //Increase
Permalink Structure: /%year%/%monthnum%/%postname%/
Language: en-US
Timezone: Asia/Tokyo
Debug Mode: Active== Theme ==
Name:Twenty Seventeen
Version:1.4
Author: the WordPress team
Child Theme: No== User ==
Role:administrator
WP Profile lang:en_US
User Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6== Active Plugins ==
Event Tickets – Version 4.7 By Modern Tribe, Inc.
The Events Calendar – Version 4.6.12 By Modern Tribe, Inc.As mentioned above, the plugins that I activate are “The Events Calendar” and “Event Tickets” only.
I tested it with “Twenty Seventeen”, “Twenty Fifteen”, “Twenty Fifteen”.
The results were all the same.
The only change is that we added the following two lines of “wp-config.php”.
define(‘WP_MEMORY_LIMIT’, ‘512M’);//add
define(‘WP_MAX_MEMORY_LIMIT’, ‘1280M’);//addOther than that I have not customized anything.
There are not other plugins installed.The work I did is the following.
1.I installed wordpress.
2.I added the above code to wp-config.php.
3.I have newly installed “Event Tickets” and “The Events Calendar”.
4.I activated “Event Tickets” and “The Events Calendar”.
5.I added a contributor.(user-new.php)
6.I logged in as a contributor user.
7.I reviewed and submitted the post as a contributor.I have confirmed the site website after the above process.
Contributor’s post was displayed.
I Deactivate “Event Tickets”.
Contributor’s posts are hidden.Could I have you consider improving this problem?
Please let me know if there is anyhing I can do for you.
Shall I let you know my wp account if you need it?
Thank you for your support.
ShinnosukeHello,
Thank you for fixing.
It solved it using ‘txt.replace’.
Forum: Plugins
In reply to: [Smart Slider 3] About headerYour advice was very helpful.
Thank you for the information.
I will buy on this occasion.
This is a great software.
I am looking forward to the update.
I appreciate your patience with my poor English.
Forum: Plugins
In reply to: [Smart Slider 3] About headerThank you for considering my request.
I will appreciate your help with this situation.
Forum: Plugins
In reply to: [Smart Slider 3] About headerHi,
Because we want to hide the use of wordpress.
It is the reason for the security surface.