Forum Replies Created

Viewing 15 replies - 1 through 15 (of 205 total)
  • So the add_filter should be placed in functions.php

    I placed the code there and changed your example to my Authorization key = Bearer 2:edfbe9c358bb6925bc6………………………..

    But im still getting the following error:

        [body] => {"success":false,"error":{"code":"Unauthorized","message":"Unauthorized request"}}
        [response] => Array
            (
                [code] => 401
                [message] => Unauthorized
            )
    Thread Starter Taro

    (@sicktb)

    Hi Bcworkz,

    The code is working correct. I did not have problems with it after google updated the links.

    Currently we are looking to change some design elements maybe a new theme but i’m pretty sure i can set all the code to the new layout.

    I hope this will be all the time that i stole from you! Thanks for all the work!

    Thread Starter Taro

    (@sicktb)

    The correct permalink (menu etc) is still not working correctly when you for example search on google for the following “weisz group Edox – Fleet 1650” then you get the international layout (menu, sidebar, permalink). But this should be Benelux.

    When i edit this post the permalink shows “international” and should be Benelux. The Primary categorie is “Edox” and subcategorie is “Benelux-news”.

    And the custom taxanomy is “Benelux”

    When you follow the news page on the website(inside benelux) you will find the same post in the correct location. But this is because the code finds the selected benelux menu and sidebar. This works correct.

    • This reply was modified 7 years, 3 months ago by Taro.
    • This reply was modified 7 years, 3 months ago by Taro.
    Thread Starter Taro

    (@sicktb)

    The code is now working i needed to remove the following codes to get it working:

    https://pastebin.com/a0yXydB7

    Thread Starter Taro

    (@sicktb)

    I did add the debug on and the following is showing:

    Fatal error: Cannot redeclare tg_add_region() (previously declared in weiszgroup.com/htdocs/www/wp-content/themes/sparkling-child/functions.php:536) in weiszgroup.com/htdocs/www/wp-content/themes/sparkling-child/functions.php on line 552

    Thread Starter Taro

    (@sicktb)

    When i use the following code https://pastebin.com/jGviBMXX

    Its just giving me a blank page. When i look at the page code the following is showing only:

    <html>
    <head></head
    <body></body>
    </html>

    i can’t see any errors

    • This reply was modified 7 years, 3 months ago by Taro.
    • This reply was modified 7 years, 3 months ago by Taro.
    Thread Starter Taro

    (@sicktb)

    changed 123 to 230 and 124 to 231. But the code did not work correctly. It gave me a blank homepage(and all other pages). Changed back to old code > attached function.php with new code.

    Thread Starter Taro

    (@sicktb)

    I will change the redirects 301 when the fallback is ready.

    I’m unsure how to answer your question, I’m not sure what you mean by “if the posts are located within the permalink structure”. Do you mean if the request is for a single post?

    I was just looking for a other option to use. The taxonomy location is something that has to be changes menual per post. Is it possible to use the standard category “Benelux-News” (International-News) this category is always active for every post. I have done this to output the news items on the news page(s).

    Thread Starter Taro

    (@sicktb)

    The permalink from the pages are correct and don’t need the custom taxonomy. The pages use the structure from the menu.

    It would be beter if the posts would use something like the menu structure. Is there a option to scan the menu structure and automatic add “Benelux” of “International” if the posts are located within the permalink structure?
    image example current path

    • This reply was modified 7 years, 5 months ago by Taro.
    Thread Starter Taro

    (@sicktb)

    The no region permalink is a result of $region not being defined. We have two things to address. One is to do whatever is needed to ensure $region is always defined. The other is to have a fallback should it not be defined anyway. The fallback is easy, but what would you prefer? No region (and no double slash), international, or benelux?

    No region can be a problem with the pre_get_posts code because it pulls the $region assignment from the requested URL. As it stands, no region will assign something like “danish-design” as $region and things will not work right. Again, there should be a fallback in the pre_get_posts code should the value it pulls from the URL not be either international or benelux. In this case no region is not an option. One or the other should be always be assigned.

    That will take care of cases where $region is not defined, but it doesn’t address why there is no region assigned in the first place. What is your vision for the site regarding regions? It appears to me only the home page should have $region undefined, once a user picks one or the other, the selected region should always be assigned to the $region variable one way or another.

    I think the best way is to use my custom taxonomy. The taxonomy is called location. The posts and pages both have this taxonomy and are devided by “Benelux” and “International”

    Speaking of home page, how is that configured in the WP reading settings? Does it remain “latest posts” where the home page content is handled through template changes? Or is it set to a “static page”?

    The normal home page is currently the static intro page. Posts page is not selected.

    What is your plan for possibly adding more regions in the future? From way back when we first talked of this, I think I remember it’s a possibility for the distant future. I ask because in order to have fallback values, we need to establish what are acceptable values right now. Thus if another region is to be added, it will need to be added to this fallback code as well as by adding another category.

    The base will alweays stay “Benelux” or “International”.

    It seems to me that if one starts at the home page and selects a region, that everything works correctly. But I’m not familiar with your site. Other than typing the wrong URL, how would one get to where things do not work right, where the region disappears from links? I need to know how a visitor could cause the problem in order to have any hope of fixing it.

    I think this is only visable when looking for example on google. Search Engines will search for all links.

    Thread Starter Taro

    (@sicktb)

    Not sure what’s going wrong but the post permalink is stated as: https://weiszgroup.com//danish-design/danish-design-new-jewellery-2/

    If you add “international” at the /international/ the sidebar and menu is working correct. But you can add whatever you like between the //
    Example: https://weiszgroup.com/letsaddsometexthere/danish-design/danish-design-new-jewellery-2/

    i did add a redirec 301 from /worldwide to /international

    • This reply was modified 7 years, 5 months ago by Taro.
    Thread Starter Taro

    (@sicktb)

    First note; i changed World Wide to International.

    I got a single-benelux.php and a single-international.php where the get_sidebar( $region ); is now active. I did not add the single.php to the child theme. Should i remove both pages and add the single.php to the child and change the region there?

    sidebar-benelux.php should be loading if the catagory “benelux-news” is active. The sidebar is working correct! (i could probably remove this category because it’s using the region code)

    sidebar-international.php should be loading if the catagory “international-news” is active. The sidebar is working correct! (i could probably remove this category because it’s using the region code)

    I think we are almost there. Soon going to check some other pages and functions. And maybe try to activate the search function for the website.

    Thread Starter Taro

    (@sicktb)

    The slider is fixed. The sidebar is correct on all pages but not on the post pages example.

    Thread Starter Taro

    (@sicktb)

    Changed the code but sidebar is not loading.

    Header code

    News page code

    sidebar code

    Other problem is that my slider is not loading.

    slider function code

    Thread Starter Taro

    (@sicktb)

    This works great! The permalink and menu are correct. But the sidebar is still incorrect.
    This is the current post page code.

    • This reply was modified 7 years, 6 months ago by Taro.
Viewing 15 replies - 1 through 15 (of 205 total)