Jump to content
Sign in to follow this  
tjerkfeitsma

Second nav, unknown error, please advice

Recommended Posts

tjerkfeitsma

Dear pagelines, I run 2.0 on other sites, but my project Tourist Save the world I run on platformpro. Please help! To my surprise 'my whole site broke down' when I tried to insert a piece of code (the transposh widget) into the section.secondnav.php and updated the file to see if I could get it "somewhere on the menu bar". When updated the whole site broke down, when i corrected it and took out the code it said: Parse error: syntax error, unexpected '<', expecting T_FUNCTION in /home/dewereld/public_html/touristsavetheworld/wp-content/themes/platformpro/sections/section.secondnav.php on line 33 I really don't get it for there isn't any < anywhere to be seen. Then I tried taking the old section.secondnav.php and just put it back but the problem remained. I am very troubled now!!! I don't know what is breaking the system!! Please help! What can I do? ps the code I added at first and then took out was: <?php if(function_exists("transposh_widget")) { transposh_widget(array(), array('title' => 'Translation to English | Vertaal naar het Nederlands', 'widget_file' => 'flags/tpw_flags.php')); }?> pps the code of second nav: <?php /* Section: Secondary Nav Author: Andrew Powers Description: Creates secondary site navigation. Version: 1.3.0 */ class PageLinesSecondNav extends PageLinesSection { function __construct( $registered_settings = array() ) { $name = __('Secondary Nav', 'pagelines'); $id = 'secondnav'; $default_settings = array( 'type' => 'header', 'workswith' => array('header','content'), 'description' => 'Allows you to select a WP menu to use as your secondary nav on individual pages and posts.', 'icon' => CORE_IMAGES . '/admin/maps.png', 'version' => 'pro' ); $settings = wp_parse_args( $registered_settings, $default_settings ); parent::__construct($name, $id, $settings); } // PHP that always loads no matter if section is added or not -- e.g. creates menus, locations, admin stuff... function section_persistent(){ $metatab_array = array( '_second_nav_menu' => array( 'type' => 'select_menu', 'title' => 'Select Secondary Nav Menu', 'desc' => 'Select the menu you would like to use for your secondary nav.' ) ); add_global_meta_options( $metatab_array ); } function section_template() { global $post; global $pagelines_ID; $pageID = (!pagelines_non_meta_data_page()) ? $post->ID : null; if(!is_404()){ if(is_home() && pagelines_option('secondnav_posts')){ $second_menu = pagelines_option('secondnav_posts'); } elseif (pagelines_option('_second_nav_menu', $pageID)){ $second_menu = pagelines_option('_second_nav_menu', $pageID); } if(isset($second_menu)){ wp_nav_menu( array('menu_class' => 'secondnav_menu lcolor3', 'menu' => $second_menu, 'container' => null, 'container_class' => '', 'depth' => 1, 'fallback_cb'=>'pagelines_page_subnav') ); } } } function section_options($optionset = null, $location = null) { if($optionset == 'header_and_nav' && $location == 'bottom'){ return array( 'secondnav_posts' => array( 'default' => '', 'version' => 'pro', 'type' => 'select_menu', 'title' => 'Posts Page Secondary Navigation', 'shortexp' => 'Select the secondary navigation for posts pages..', 'inputlabel'=> 'Select Secondary Navigation Menu', 'exp' => 'You can select a WP menu to use as sub navigation on your main blog page.' ), ); } } } /* End of section class */

Share this post


Link to post
Share on other sites
kastelic
I would download the theme, and reupload a fresh copy of the file. It's possible that there was a small change. Are you sure you uploaded the old file you had to the correct directory? Other than that, check your child-theme functions.php also for any syntax errors, or even disabling it momentarily to see if its causing the problem. Once you get it squared away I recommend you use hooks in platformbase/functions.php rather then editing core theme files. You can find more about that in the docs. http://www.pagelines.com/docs/base-child-theme

Share this post


Link to post
Share on other sites
tjerkfeitsma
That worked. We are back up. Thanks a lot!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×