Forum Replies Created
-
AuthorPosts
-
Hi Mike,
Sorry for the late reply.
Thank you so much for your help was precious ;)
All started working like we wanted.You can close the ticket
Thank you again!
Cheers
Hi Mike again :)
Thanks for the quick reply :)
I was able to add the code you have suggested and worked. I just changed the selector from querySelector(‘#top.single-post #main>.container_wrap>.container’) to querySelector(‘#top.single-post #main’) because was only grabbing first color section.
With this change i was able to grab all text (also the footer – if you know a better selector so it not grabs it, please let me know)My main issue is that i have the shortcode on this site and also on many others (and some have hundreds of posts) and to manualy go change it to a replace it with the div is a nightmare and time consuming.
Is there any way to make this javascript to be added to a shortcode to the post?thank you again for the great help.
Cheers
March 9, 2022 at 4:11 pm in reply to: different content when turn the advance layout builder #1343869Yes, please
Thank you Mike
March 9, 2022 at 1:17 pm in reply to: different content when turn the advance layout builder #1343831Hi Mike,
Yes that is right, and the main issue was that was pulling always the same content, on different posts.
But in the meantime I found that the previous team that was taking over the site, added a postslider.php in the child theme with some custom modifications, and some other changes. After I remove it (was no longer needed), everything started to work as should it be.
All posts when switching from Classic Editor to the Advanced Layout Builder the content as the correct one :)
Thank you for your help and patient.
Cheers
March 8, 2022 at 5:25 pm in reply to: different content when turn the advance layout builder #1343699Hi Mike,
Thank you for your reply.
we want to change a bunch of posts so it has a new layout. And with the option you say that will take a lot of more time to achieve it. Does we have another alternative?
This can also be something to do with the post id’s not being called correctly?
Thanks
March 2, 2022 at 6:03 pm in reply to: different content when turn the advance layout builder #1342883Hey Ismael,
I’m sorry about the login, you can try again, please.
I understand what you are saying about the difference between the editors. But from the experience I have with enfold every time i have content on the WordPress editor and turn on the Advance Layout Builder, the ALB turns all the content into a text element.
The issue here is that when i do that it turns to other content that is not the one was there.
I think that is the same issue that was with this threat https://kriesi.at/support/topic/wrong-post-title-when-using-shortcode/. it’s getting the wrong post id
let me know what you think.
Cheers
Hi Ismael,
Thank you for the update. You were right I was doing wrong.
But with the change you send I also was not getting the right author id.So i tried the following
global $post; ob_start(); $author_id = get_post_field( 'post_author', avia_get_the_ID() ); $url= get_author_posts_url( $author_id ); $name= get_the_author_meta( 'display_name', $author_id); ob_end_clean(); $output = '<a class="post-author-name" href="' . $url . '">' . $name . '</a>' ; return ($output );
I replaced the get_the_ID() to avia_get_the_ID() and with that i was able get the correct author id of the post.
Thank you for your inputs and ways to help resolve this issue.
CheersHi Ismael,
I tried several options, and still grabs the wrong author.
function post_author_shortcode(){ global $post; ob_start(); $url= get_author_posts_url( get_the_author_meta( 'ID' )); $nameid= get_the_author_meta( 'ID', $author_id); $name= get_the_author_meta( 'display_name', $author_id); ob_end_clean(); $output = '<a class="post-author-name" href="' . $url . '">' . $nameid .' - '. $name . '</a>' ; return ($output); } add_shortcode( 'sc_post_author', 'post_author_shortcode' );
The result Updated on February 7, 2022 • by 23 – Chloe Scott • 7 minutes read
I checked and the author that should be showing is the ID 35 and not the 23. This is so strange. can you still help me figure this out.
Thank you
Hi Ismael,
Thank you so much for the quick replay.
Indeed I’m getting the same error. Meanwhile I was able to fix that.
The tip you gave (replaced by the avia_get_the_ID() function) made it all shortcodes working except one . The author. it still gets the wrong one.
function post_author_shortcode(){ global $post; ob_start(); $url= get_author_posts_url( get_the_author_meta( 'ID' )); $name= the_author(); ob_end_clean(); $output = '<a class="post-author-name" href="' . $url . '">' . $name . '</a>' ; return ($output ); } add_shortcode( 'sc_post_author', 'post_author_shortcode' );
Can you help figure the last one?
Thank you
Hi Ismael,
Thank you for the help.
I just added the code and did not realized that was with the wp_head. It works as it’s supposed.Thank you guys for the great help.
Have a great dayCheers
This reply has been marked as private.That it is all
Thank you Rikard.
You can close it.
Cheers
Hi Ismael,
Thank you for the quick reply.
The Error of the previous solution was:
There has been a critical error on this website.
Learn more about troubleshooting WordPress.
And the site did not load.But i added the code you sent now and it worked like a charm.
Thank you very much, for your help.
Until a next time
CheersHi Ismael,
Thank you for the quick reply.
I made the changes (replaced and moved below) and add the postslider.php to my child theme folder (into the shortcodes folder).
but i get the “critical error on this website”
What i may be doing wrong?
Thank you
Hi Mike,
Thank you for your quick reply.
I used the code you sent and worked like a charm.
Thank you very much.
Cheers
Hi Günter,
thank you for your feedback. It Worked.
Cheers
Hi Günter,
thank you for your feedback.
I just don’t understand what to do on the second step.
I just replaced the content of the hr.php file and cleared the cache.And in some sections the issue remains
Thanks
CheersHi Mike!
Yes you can close the ticket. The problem is solved.
Thanks again.Cheers
Hi Mike,
Thank you for being able to speed up and deliver the solution.
Yes is working and the links on the post format link are working.Cheers
Hi Mike thanks for you reply.
i was looking to your suggestions and the portfolio masonry is almost what we need, is missing only the date.
Do you have a way to had it there?Thanks
I’m sorry but I am losing my patience a bit. My client has needed a fix for a month now and I cannot keep telling them to hold their breath.
I totally understand you do NOT have a crystal ball to predict how long this will take, but I need better mgmt of expectations than ‘thanks for your patience’ when our case is going weeks with zero effective response.
If you cannot provide any ETA or idea for when we might have more feedback than ‘be patient’ we need to know so we can develop a workaround… any idea when the dev team might be touching this? A day? A week? Months?
We have been in a bind over this for almost a month now with the site. We have deadlines approaching soon and could really use some attention on this – thanks in advance!
Kyle
Hi Mike
Do you any news from the dev team?
thanksHi Victoria,
Thanks for helping out.
I added the admin access credentials in the private content box.I think this only happens in with masonry element. But we need to use this element, because of the filter option.
Hope you can help sort this out.
Thanks- This reply was modified 3 years, 11 months ago by kylerollins.
Hey Nikko,
I already tried that solution (I think i made the correct way), but without success.
There is any other solution, we can apply?
Thanks for your help.
Cheers
Hi Mike,
Thanks for replaying and trying to figure out.
If i understand correctly, we have a category called “news” and some of the post there are post type as “link”. So there are not a loot.
Let me know if this help you write the small script.Thank you again for the help
Cheers
Hey Mike,
do you have any news on this?Thanks
Hi Mike,
Thanks for the quick replay.I tried to disable the plugin “Page Links To” and test it. but it seams the issue is still there.
I will need to use the excerpt in the post field, because the client uses custom excerpts. I changed back the excerpt so we can test it.
Also if you go to link1, we have the same posts (with the excerpt in the post field, and other without ) and both work fine. The issue is only on the author post page (link2)Maybe is a small fix on the author loop page
Thanks for your help
CheersHi Mike,
Thanks for the help!
The excerpt is added in the normal excerpt field.Cheers
June 15, 2020 at 4:19 pm in reply to: default parent theme caching style.css is max age = 1 year by default #1222712So WP Engine has taken responsibility for this after pointing us in your direction initially…helps to get thru to 3rd line support :D
It appears WPE sets the cache control for all static files to 1 year. Here is their reply:
According to my notes – it looks like your main question is regarding why the theme (parent and child) style.css is reflecting a 1 year cache-control header:
cache-control: public, max-age=31536000
I can confirm that all static files on our platform, including css, js, images like jpg and png, and many others all are set to include a cache-control header of 1 year. So while the file comes from the theme, our server is what’s setting the cache length for that file in a user’s browser, and the 1 year timeframe is default!Did you have questions about adjusting that timeframe or altering anything about cache-control headers, or were you just checking to confirm if that 1 year timeframe was correct?
I replied asking ‘I’d like to know why you set these to 1 year and how to override that?’ and they replied:
So these would be set at Nginx level: The default rule that is in place on the NGINX config is as follows. This is in place on all installs across our platform and would be the default rule which is set as it is viewed as the best cache control for performance purposes.
location ~* ^.+\.(?:jpe?g|gif|png|css|js|ico|zip|7z|tgz|gz|rar|bz2|do[ct][mx]?|xl[ast][bmx]?|exe|pdf|p[op][ast][mx]?|sld[xm]?|thmx?|txt|tar|midi?|wav|bmp|rtf|avi|mp\d|mpg|iso|mov|djvu|dmg|flac|r70|mdf|chm|sisx|sis|flv|thm|bin|swf|cert|otf|ttf|eot|svgx?|woff2?|jar|class|log|web[pma]|ogv)$ {
### MU Rules (Static) ###(none)###
if_modified_since before;
add_header Cache-Control “public, max-age=31536000”;
add_header Vary “Accept-Encoding”;
add_header Access-Control-Allow-Origin *;
}We can alter this for you to a different max age if you wish. just let us know and we’ll be happy to help.
I’m closing the case with both parties now as we have a better understanding of the issue and have asked WPE NOT to set our cache control to 1 year as the style.css is obviously not a static file…
I appreciate your cooperation and patience on this.
-
AuthorPosts