userpankaj
Forum Replies Created
-
Thank you. It worked.
Here is the URL:- https://tikwikitok.com/
You can open any article and have a look. I am facing this problem only in mobile devices. In desktop, its fine.
Forum: Developing with WordPress
In reply to: Automatically Change Month and Year in WordPress Titles.The month/year in the title is already present because i wrote them at the time of publishing the article, you can see it in the image here:- https://ibb.co/vjWPypf
I manually write month/year in every article while publishing them.
Forum: Developing with WordPress
In reply to: Automatically Change Month and Year in WordPress Titles.Thanks for replying. If i understand your reply correctly, you suggested that the month and year will be automatically inserted after the title after publishing or updating the old posts, right? Pardon me if i am wrong here.
I already have 1000 articles having month and year in titles. I want some code that will change the month and year in already published articles as well as in future articles too as they are published in the backend without manually updating them.
Right now, i am using this code generated by ChatGPT (as i don’t know coding much) which only changes the month and title in the front. But the month and year are not changing in Google SERPs.
function update_article_title_month_year($title, $id = null) { if ((is_home() || is_front_page() || is_single() || is_archive()) && in_the_loop() && is_main_query()) { $current_month = date('F'); $current_year = date('Y'); // Use a regular expression to find and replace the [Month Year] or [Month Year Updated] pattern $pattern = '/\[(January|February|March|April|May|June|July|August|September|October|November|December) (\d{4})( Updated)?\]/'; $replacement = function ($matches) use ($current_month, $current_year) { // Add "Updated" only if it was originally present in the title return "[$current_month $current_year" . (isset($matches[3]) ? ' Updated' : '') . "]"; }; $title = preg_replace_callback($pattern, $replacement, $title); } return $title; } add_filter('the_title', 'update_article_title_month_year', 10, 2);
This code is changing month and year in the front end. I just want to know, is it possible to change the month and title in the backend as well automatically without hitting the ‘Update’ button?
Here is the image of how i write me titles https://ibb.co/Cvkw38T
Forum: Plugins
In reply to: [Easy Table of Contents] Alignment of TOCThank you so much. Waiting for this option.
Forum: Plugins
In reply to: [Web Stories] Ads Not Showing In Web StoriesOkay…I’ll wait for some more days.
Thanks for the support.
Forum: Plugins
In reply to: [Web Stories] Custom JavaScript is not allowed.Hey
Sorry, i forgot to tell you.Yes, my problem is solved now. Thanks for the support.
Forum: Plugins
In reply to: [Web Stories] Custom JavaScript is not allowed.Sure, I will check it and will update you soon.
Forum: Plugins
In reply to: [Web Stories] Custom JavaScript is not allowed.Hey,
I have filled the form that you have given above with all the necessary information.
Forum: Plugins
In reply to: [Web Stories] Custom JavaScript is not allowed.I am unable to share the particular story link. Here is the link of the page which i created for stories link
Forum: Plugins
In reply to: [Ads by WPQuads – Adsense Ads, Banner Ads, Popup Ads] Stopped workingI will check it and let you know back.
When I click on search results that have the amp in last in desktop it opened in amp…I don’t want that…Whenever I opened posts from search results on the desktop they are opening in amp and not in desktop theme. How to correct this?
Here is the image for better understanding:- https://prnt.sc/10iod0o
- This reply was modified 3 years, 8 months ago by userpankaj.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Posts Not OpeningHey Ahmed, can you please help me with the Instagram video posts embeds that are not working in amp in some posts and in some posts they are working fine.
- This reply was modified 3 years, 8 months ago by userpankaj.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Posts Not OpeningWhy my site speed decreases in google pagespeed insights and gtmetrix after installing amp ??
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Posts Not Openingand also I am not able to show related posts in amp…