1 Replies - 257 Views - Last Post: 03 November 2013 - 10:30 AM Rate Topic: -----

#1 cierracherie  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-November 13

PHP Website function between two options, but need to show both.

Posted 02 November 2013 - 12:33 PM

Hello, I am brand new to this website, and thought maybe it could be a place where I could receive help. I know little to nothing about PHP, but I know some CSS and HTML.

I am helping develop my high school newswebsite, and our CMS is wordpress. The theme I am currently using is Jarida, and the themes dev. doesn't provide customization related help.

Needless to say, I definitely need it. On the top of our site, in the head tag, there is the option to have a breaking news ticker vs. another menu aside from the main navigation menu. I would like to show both and I know this would mean floating the menu right, which I know how to do. I played around with it and have failed multiple times.

The code that I'm playing with, and the source of the option is as follows...

<?php
					if( tie_get_option( 'top_left' ) == 'head_menu' )
						wp_nav_menu( array( 'container_class' => 'top-menu', 'theme_location' => 'top-menu', 'fallback_cb' => 'tie_nav_fallback'  ) );
					elseif(tie_get_option( 'top_left' ) == 'head_brnews')
						tie_include( 'breaking-news' );
				?>	


I am pretty sure the "tie" refers to the easy interface menu, and the "tie labs" that helped the dev. create the theme.

I use filezilla and dreamweaver to edit and play around with it, and I also have creating a child theme of course.

Any help would be beyond appreciated. Thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: PHP Website function between two options, but need to show both.

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4316
  • View blog
  • Posts: 12,096
  • Joined: 18-April 07

Re: PHP Website function between two options, but need to show both.

Posted 03 November 2013 - 10:30 AM

Well this is a complete shot in the dark because we would have to know exactly what is going on in the theme, but you could simply take the tie_include('breaking-news') line and put it under the control of the first if and modify the condition...

if ((tie_get_option( 'top_left' ) == 'head_menu') || (tie_get_option( 'top_left' ) == 'head_brnews')) {
    wp_nav_menu( array( 'container_class' => 'top-menu', 'theme_location' => 'top-menu', 'fallback_cb' => 'tie_nav_fallback'  ) );
    tie_include( 'breaking-news' );
}



This would call both pieces of code if the option is head_menu OR head_brnews. Now I can't say if that would work at all, so make sure you keep a backup copy of the code, but it might be worth a try.

:)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1