Hi,
Could you please help with mysql request that merges post Title and Subtitle ?
Post title = subtitle : title
subtitle will be empty
Many thanks
Hi,
I would like to merge the post subtitle and the post title (copy subtitle to the post title).
I would like to have :
post_title = subtitle : post_title
Sea the picture on : https://www.depechedekabylie.com/subtitle.png
Please it’s urgent
Regards
Hi,
Ok, but the subtitle will be display only inside the article and this will repeat title of post.
Also, this will required custom changes in the theme files and the most simple way to do it will be in single template so you can set them in a child theme, for example if you are using the post template 1, the file that needs to be changed is – wp-content/plugins/td-composer/legacy/Newsmag/parts/single/loop-single-1.php and on line 25 replace the code with this code – https://pastebin.com/AdXw7vhE this needs to be done for each post template/style you are using. If you are using the default post style the file that needs to be edited is this one – wp-content/plugins/td-composer/legacy/Newsmag/loop-single.php
I hope this will help you!
Hi,
Thanks for your reply.
I am looking for an sql query to cut subtitle and past it just before the title like :
“subtitle : title” in the database.
This way I will not touch theme’s code for future updates.
Best regards
Hi,
Unfortunately I do not know a query that can do this without needed to be set in that theme, or WordPress. That sql should run from somewhere.
Normally the sql code should be like this https://pastebin.com/PZSUYVpw (if you have a prefix for wp_ please set it in the provided code). Also, make sure to backup your database before running any SQL update queries. Additionally, it’s always a good practice to test queries on a staging or development environment first before applying them to your live site.
Thank you for your understanding!
Hi,
Thanks again for your quick replay.
I will be using phpmyadmin to execute the sql request.
Just to be sure that the sql you gave me is correct.
I do not see the subtitle (please see the picture on the link below)
https://www.depechedekabylie.com/subtitle.png
Best regards
Hi,
This is not easy to do it, also we don’t have experience with this kind of sql requests. Here is an example code – https://pastebin.com/8jgMNBSk but please do not try it on live website because it is possible to not provide the correct results.
Thank you!
Hi,
Thanks a lot.
If you have a php script suggestion (much appreciate it) will be better as this sql looks very complicated for me.
Thanks a lot Calin
BEST REGARDS
Hello,
If you only nee to display the title in front for the subtitle on your website then the mentioned changes in code files will be the most easy to do and you’ll not interfere with the database. Also, if the code is set in a child theme, then you’ll not have problems when you’ll update the theme. – https://i.imgur.com/Mqk3IIl.png
Thank you!
Hi,
Thanks again for your help and quick answer.
This doesn’t solve my problem as your solution is already done a before (please have a look at: https://www.depechedekabylie.com and select a post).
The problem with this is that the meta title is still just the title, not subtitle : title
This is bad for the SEO. That’s why I want to concatenate subtitle with the title like : subtitle : title, then and empty the subtitle.
could you please help with a php script which I can just run and do the job (www.depechedekabylie.com/myscript.php)
Please help
Best regards
Hi,
I see my colleague Calin tried to help with this task. However, finding a solution for what you would like to do would be better handled by a developer. That is mostly because if its not done right, there can be issues. We provide custom work as well, and our developer team can most likely find a solution for it. If you are interested, please submit a request through this form https://tagdiv.com/submit-a-request/ and my colleagues will get back to you as soon as possible.
Thank you!