Comments 1SS started the conversationJuly 21, 2020 at 12:08pmhi,how can I set meta tag for pages and posts?thanks. 2,562Support repliedJuly 21, 2020 at 12:57pmHi,The easiest way to add new meta tags to page/post:Add to platform/themes/[your-theme]/views/page.blade.php or platform/themes/[your-theme]/views/post.blade.php @php SeoHelper::meta()->addMeta('robots', 'index, follow'); // SeoHelper::meta()->addMeta('[tag name]', '[tag content]') @endphpYou can add many meta tags as you want.Ex: @php SeoHelper::meta()->addMeta('...', '...') ->addMeta('...', '...') ->addMeta('...', '...'); @endphp 2,562Support repliedJuly 21, 2020 at 1:13pmOr you can hook to action BASE_ACTION_PUBLIC_RENDER_SINGLE.Ex: Add to platform/themes/[your-theme]/functions/functions.php. add_action(BASE_ACTION_PUBLIC_RENDER_SINGLE, function ($screen, $data) { if (in_array($screen, [PAGE_MODULE_SCREEN_NAME, POST_MODULE_SCREEN_NAME])) { SeoHelper::meta()->addMeta('robots', 'index, follow'); SeoHelper::openGraph() ->addProperty('image:width', '600') ->addProperty('image:height', '300'); if ($data->image) { SeoHelper::twitter()->addImage(get_image_url($data->image)); } } }, 120, 2);You can find all available methods for SeoHelper in platform/packages/seo-helper/src/SeoHelper.php. 1SS repliedAugust 4, 2020 at 12:01pmhi,there is another problem about seraching and pagination.let's say I searched "av" it shows results and pagination like this:http://prntscr.com/ttt0luIf I click, pagination second page (2 page button), search query is null. See: http://prntscr.com/ttt180 2,562Support repliedAugust 4, 2020 at 12:40pmHi,It's an issue with pagination, please change {!! $posts->links() !!}to {!! $posts->appends(request()->input())->links() !!}Thanks for your feedback!1 Like 1SS repliedAugust 5, 2020 at 9:52amHi,I changed it but nothing is changed?I faced this issue on category page like: http://prntscr.com/tubsoqI should change on which file?Thank you! 2,562Support repliedAugust 5, 2020 at 10:05amHi,You need to change in platform/themes/ripple/views/search.blade.php It's working fine on our demo site: https://cms.botble.com/search?q=a1 Like 1SS repliedAugust 5, 2020 at 10:19amHi,Search results and pagination are okay now.There is another problem on category page. Let's say, you are on SEO category page,SEO cat has some posts,Pagination shows 9 pages but,8. and 9. page says: "There is no data to display!"#1:http://prntscr.com/tue1gp#2:http://prntscr.com/tue1nb 2,562Support repliedAugust 5, 2020 at 10:45amHi, We can reproduce this issue. It doesn't happen on our demo sites. Can you give me your site to check? 1SS repliedAugust 5, 2020 at 10:50amSure but,This is a public site. How can I send you my site link as P.M message? 2,562Support repliedAugust 5, 2020 at 10:52amYou can add a private reply.1 Like SS replied privately 2,562Support repliedAugust 5, 2020 at 1:31pmCan you show me your code? It's not my source code so I'm not sure what's wrong. SS replied privately 2,562Support repliedAugust 6, 2020 at 7:43amHi,It's so weird. It is default Laravel pagination so it should works as normal.You can see that we don't modify Laravel pagination.Please remove ->appends(request()->input()) in /home/bitnami/htdocs/platform/themes/myTheme/views/category.blade.php then try again.We just need to append it in search.blade.php 1SS repliedAugust 6, 2020 at 7:51amyesterday you said this: http://prntscr.com/tux9ruAnyway I changed as {!! $posts->links() !!}but nothing is changed? I also cleared cache.1 Like 2,562Support repliedAugust 6, 2020 at 7:55amHi, You need to change in platform/themes/ripple/views/search.blade.php Just change it in search.blade.php. Actually, I don't know what's wrong with pagination so we need to try it. 1SS repliedAugust 6, 2020 at 8:17am"Actually, I don't know what's wrong with pagination so we need to try it."Yes, please. I could not find the reason. 2,562Support repliedAugust 6, 2020 at 8:20amYou can see that it is the default Laravel pagination so we need to debug to find the issue.I can't access to your hosting to debug it so I can't help. I can't reproduce that issue on my side. 1SS repliedAugust 6, 2020 at 10:26amhi,this error is not exist on your side?on backend side, to find issue and solution I need to look on which folder/file? 2,562Support repliedAugust 6, 2020 at 12:19pmYes,It's fine in my side, you can check our demo site too.Source code for category page is in platform/plugins/blog/src/Providers/HookServiceProvider.php line 217 Sign in to reply ...
hi,
how can I set meta tag for pages and posts?
thanks.
Hi,
The easiest way to add new meta tags to page/post:
Add to platform/themes/[your-theme]/views/page.blade.php or platform/themes/[your-theme]/views/post.blade.php
You can add many meta tags as you want.
Ex:
Or you can hook to action BASE_ACTION_PUBLIC_RENDER_SINGLE.
Ex: Add to platform/themes/[your-theme]/functions/functions.php.
You can find all available methods for SeoHelper in platform/packages/seo-helper/src/SeoHelper.php.
hi,
there is another problem about seraching and pagination.
let's say I searched "av" it shows results and pagination like this:
http://prntscr.com/ttt0lu
If I click, pagination second page (2 page button), search query is null. See: http://prntscr.com/ttt180
Hi,
It's an issue with pagination, please change
to
Thanks for your feedback!
Hi,
I changed it but nothing is changed?
I faced this issue on category page like: http://prntscr.com/tubsoq
I should change on which file?
Thank you!
Hi,
You need to change in platform/themes/ripple/views/search.blade.php
It's working fine on our demo site: https://cms.botble.com/search?q=a
Hi,
Search results and pagination are okay now.
There is another problem on category page. Let's say,
#1:http://prntscr.com/tue1gp
#2:http://prntscr.com/tue1nb
Hi,
We can reproduce this issue. It doesn't happen on our demo sites.
Can you give me your site to check?
Sure but,
This is a public site. How can I send you my site link as P.M message?
You can add a private reply.
Can you show me your code? It's not my source code so I'm not sure what's wrong.
Hi,
It's so weird. It is default Laravel pagination so it should works as normal.
You can see that we don't modify Laravel pagination.
Please remove
in /home/bitnami/htdocs/platform/themes/myTheme/views/category.blade.php then try again.
We just need to append it in search.blade.php
yesterday you said this: http://prntscr.com/tux9ru
Anyway I changed as
but nothing is changed? I also cleared cache.
Hi,
You need to change in platform/themes/ripple/views/search.blade.php
Just change it in search.blade.php.
Actually, I don't know what's wrong with pagination so we need to try it.
"Actually, I don't know what's wrong with pagination so we need to try it."
Yes, please.
I could not find the reason.
You can see that it is the default Laravel pagination so we need to debug to find the issue.
I can't access to your hosting to debug it so I can't help. I can't reproduce that issue on my side.
hi,
Yes,
It's fine in my side, you can check our demo site too.
Source code for category page is in platform/plugins/blog/src/Providers/HookServiceProvider.php line 217