Support » Themes and Templates » Wrong Links in Organic

Viewing 5 replies - 1 through 5 (of 5 total)
  • interestingly, if you go to
    directly and hover over the the link in the header, it points correctly
    so, only doing it on front page

    if you didn’t modify the header.php, what happens when you edit the page and look at the permalink structure above the editor? is it correct?
    might be as simple as re-saving the permalinks
    admin – settings – permalinks

    the theme uses ‘get_page_by_title()’ to get the page link;
    the drop-down however offers the page slug;
    if the page name is written in capitals, that slug will not match the title, and something ‘random’ will be produced as link.

    it seems that replacing ‘get_page_by_title()’ with ‘get_page_by_path()’ in nav.php could repair the fault.

    $page1 = get_page_by_path($title1); $link1 = get_permalink($page1->ID);
    $page2 = get_page_by_path($title2); $link2 = get_permalink($page2->ID);
    $page3 = get_page_by_path($title3); $link3 = get_permalink($page3->ID);
    $page4 = get_page_by_path($title4); $link4 = get_permalink($page4->ID);
    $page5 = get_page_by_path($title5); $link5 = get_permalink($page5->ID);

    Hmm, now I am completely lost:
    1) the link shown for the “Chat” page is always the first link of the content part of the page. So, if you go to the main page, it is the first post, in the About it is the About, in the Chat it is the Chat
    2) I re-saved the permalinks and then something strange happened…
    Initially the code in the web.configwas

            <rule name="Main Rule" stopProcessing="true">
                <match url=".*" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                <action type="Rewrite" url="index.php/{R:0}" />

    after re-saving the premalinks (without changing anything), the re-generated code was:

    <rule name="wordpress" patternSyntax="Wildcard">
      <match url="*" />
          <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
      <action type="Rewrite" url="index.php" />

    Which causes an error 500 then. I had to revert to the initial content of the web.config

    Hi alchymyth,
    this actually solved my problem
    Thank you

    (i missed you response. this is an update, hope you still watch this thread)

    i checked the theme author’s website; and this page title link seems to be an unresolved problem.

    changing the variable names from $title1 to $ptitle1 (etc.) seems to solve the problem; leaving the code with

    // Build main site navigation from Organic Options
    $ptitle1 = substr(get_option('organic_theme_page_one_title'),0,15);
    $desc1 = substr(get_option('organic_theme_page_one_desc'),0,35);
    $ptitle2 = substr(get_option('organic_theme_page_two_title'),0,15);
    $desc2 = substr(get_option('organic_theme_page_two_desc'),0,35);
    $ptitle3 = substr(get_option('organic_theme_page_three_title'),0,15);
    $desc3 = substr(get_option('organic_theme_page_three_desc'),0,35);
    $ptitle4 = substr(get_option('organic_theme_page_four_title'),0,15);
    $desc4 = substr(get_option('organic_theme_page_four_desc'),0,35);
    $ptitle5 = substr(get_option('organic_theme_page_five_title'),0,15);
    $desc5 = substr(get_option('organic_theme_page_five_desc'),0,35);
    // fetches permalinks
    $page1 = get_page_by_title($ptitle1); $link1 = get_permalink($page1->ID);
    $page2 = get_page_by_title($ptitle2); $link2 = get_permalink($page2->ID);
    $page3 = get_page_by_title($ptitle3); $link3 = get_permalink($page3->ID);
    $page4 = get_page_by_title($ptitle4); $link4 = get_permalink($page4->ID);
    $page5 = get_page_by_title($ptitle5); $link5 = get_permalink($page5->ID);

    so forget the previous respond.

    good luck 😉

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Wrong Links in Organic’ is closed to new replies.