*

webcity

  • ****
  • 243 posts
Option for Custom Text for location only
« on: June 23, 2022, 01:21:27 PM »
Hi,

I'm using the All in One SEO Plugin

I would like the option to use a configuration just for location Title & Description when you are not using categories.

I would like to use  for location only: <location><my-custom-text>  . With the location being the final category tree, i.e <city><my-custom-text> or <region><my-custom-text>.

So that I could use "My City Free Classified Ads, Free Ads". I can't see any way of doing this with the options in the plugin without adding "Free Classified Ads, Free Ads" to the categories too.

Many thanks

*

MB Themes

Re: Option for Custom Text for location only
« Reply #1 on: June 30, 2022, 11:08:01 AM »
@webcity
You can only define one custom text, but can define data for each region.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

webcity

  • ****
  • 243 posts
Re: Option for Custom Text for location only
« Reply #2 on: April 13, 2023, 02:39:12 PM »
Can anyone suggest the code to use for the SEO Plugin, so that when I go to a location URL: https://plugins3.abprofitrade.eu/iowa-r782057

The plugin will ad the text "Classified Ads" to the title and Meta description? But only for City and Region locations. I do not want "Classified Ads" adding to other URL's

So that when I visit the URL: https://plugins3.abprofitrade.eu/iowa-r782057

The title would be: "Iowa Classified Ads" and the Meta tag would also be: "Iowa Classified Ads".

I'm sure many other users would find this useful for SEO.

Many thanks

*

MB Themes

Re: Option for Custom Text for location only
« Reply #3 on: April 19, 2023, 01:48:46 PM »
@webcity
You would need to update function that's added to filter:
if(osc_is_search_page() && osc_search_region() <> '' && osc_search_category() == '') {
  do something
}
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

webcity

  • ****
  • 243 posts
Re: Option for Custom Text for location only
« Reply #4 on: May 21, 2023, 10:50:26 AM »
Thanks for your reply and help.

I'm trying to work out where and how to modify the code.

I'm modifying the all_in_one/functions.php file:

Here is the original that I think I have to add to, or am I wrong?

 
Code: [Select]
if(ais_search_country() <> '') {
    $country_name = ais_search_country();
    $country_meta = ModelAisLocation::newInstance()->findByCountryName(ais_search_country(), osc_current_user_locale());
  }


  if(osc_search_region() <> '') {
    $region_name = osc_search_region();
    $region_meta = ModelAisLocation::newInstance()->findByRegionName(osc_search_region(), ais_search_country(), osc_current_user_locale());
  }

I tried to add the code provided and modify the "do something" but this didn't seem to work.

Can you please help advise me what code I need to add?

I'm sure many other users of the plugin would find this useful.

Many thanks