Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter pauln9

    (@pauln9)

    The code didn’t work if I used Second menus, but it worked for primary menus. I added your code from other topics, then worked well
    `col-md-8.kad-header-right {
    width: 100%;

    Thanks

    Thread Starter pauln9

    (@pauln9)

    Hi,
    Thank you for your time, it works on laptop, but not on desktop with big screen and the logo is covering the text on iPhone

    If I use secondary Navigation, menus is not showing on Iphone.
    Instead of appeared secondary Navigation, I want Primary Navigation there. What can I do?

    Thanks

    Thread Starter pauln9

    (@pauln9)

    Hi,
    Here is the screenshots.

    Repeat header

    Repeat header

    I want the header and Logo appear like this one
    I want the header and Logo appear like this one

    Can you also tell me how to have page menus below the header? thanks

    • This reply was modified 8 years, 10 months ago by pauln9.
    • This reply was modified 8 years, 10 months ago by pauln9.
    Thread Starter pauln9

    (@pauln9)

    Thanks for help. I don’t know who designed the theme to contact. People use to see our old website that why I try to fix it.

    I deleted line by line, but it shows the same error that mean the codes were not function well with wp new update

    <?php
    
    /*  
    Originally created by Jay Fienberg of Juxtaprose
    (c) copyright 2008
    
    In this file:
    All custom functions used in Juxtaprose-created 
    templates for WordPress powered sites
    
    These functions set variables 
    that can be used in templates:
    
    	$pagetitle
    	$metakeywords, $metadescription
    	$nav1, $nav2
    	$info1, $info2, $info3, $info4
    	$info5, $info6, $info7, $statement, $quote, $byline
    
    These correspond to custom values of the same name
    that can be set on a blog post or page 
    (except note: $pagetitle corresponds with 
    a custom value named title)
    */
    
    $homePageId = 20; //the id for the home page
    
    //$blogPageId is set in single.php for this site
    //since there are two blogs!
    //$blogPageId = ; // this id for the blog page
    
    // set the number of posts to show on the blog page
    //$blogSettings is set in blog.php
    
    //$blogSettings = 'showposts=5'; 
    
    function fetchCustomValues($forceBlog=false) {
    /* top level function for 
       grabbing custom values from current post / page
       if forceBlog=true, then fills in any blank values
       with the values from the page = $blogPageId set above
    */   
    	global $blogPageId, $info1, $info2, $info3, $info4, $info5, $info6, $info7, $inside, $quote, $byline;		
    	customValues();
    	if ($forceBlog) {
    		getBlogDefaults($blogPageId);		
    	} 
    	$info1 = getInfoZone($info1);
    	$info2 = getInfoZone($info2);
    	$info3 = getInfoZone($info3);
    	$info4 = getInfoZone($info4);
    	$info5 = getInfoZone($info5);
    	$info6 = getInfoZone($info6);
    	$info7 = getInfoZone($info7);
            $statement = getInfoZone($statement);
    		$quote = getInfoZone($quote);
    		$byline = getInfoZone($byline);
            $inside = 'id="inside" '; // overridden in home.php only	
    }
    
    function customValues($overwrite=true) {
    /* sets the template variables with the custom values 
       if overwrite=false, preserves the current value
       of the variable if it's not empty
    */
    	global $nav1, $nav2, $nav3, $pagetitle, $metadescription, $metakeywords, $info1, $info2, $info3, $info4, $info5, $info6, $info7, $statement, $quote, $byline;	
    	
    	$nav1 = update($nav1, c2c_get_custom('nav1'), $overwrite);
    $tabnav = update($nav2, c2c_get_custom('tabnav', $before=' '), $overwrite);	
    	$nav2 = update($nav2, c2c_get_custom('nav2', $before=' '), $overwrite);
    	$nav3 = update($nav2, c2c_get_custom('nav3', $before=' '), $overwrite);	
    	$pagetitle = update($pagetitle, c2c_get_custom('title'), $overwrite);
    	$metadescription = update($metadescription, c2c_get_custom('metadescription'), $overwrite);
    	$metakeywords = update($metakeywords, c2c_get_custom('metakeywords'), $overwrite);
    	
    	$info1 = update($info1, c2c_get_custom('info1'), $overwrite);
    	$info2 = update($info2, c2c_get_custom('info2'), $overwrite);
    	$info3 = update($info3, c2c_get_custom('info3'), $overwrite);
    	$info4 = update($info4, c2c_get_custom('info4'), $overwrite);
    	$info5 = update($info5, c2c_get_custom('info5'), $overwrite);
    	$info6 = update($info6, c2c_get_custom('info6'), $overwrite);
    	$info7 = update($info7, c2c_get_custom('info7'), $overwrite);
            $statement = update($statement, c2c_get_custom('statement'), $overwrite);	
    		$quote = update($quote, c2c_get_custom('quote'), $overwrite);	
    		$byline = update($byline, c2c_get_custom('byline'), $overwrite);	
    }
    function update($curval, $newval, $overwrite) {
    /* checks to see if a variable is empty and
       overwrites and returns new value, or preserves
       and returns current value
    */
    	$retval = $newval;
    	if ($overwrite==false) {
    		if (!empty($curval))
    			$retval = $curval;
    	}	
    	return $retval;
    }
    
    function getInfoZone($txt) {
    /* allows for "codes" in custom values to trigger
       code below. Results of code below is combined with
       static text in custom value for final output
    */
    	global $post, $wpdb;
    	$str = $txt;
    
    	/* return a list of recent blog posts */
    	if (strpos($txt,'BLOG:')===0) {
    		//BLOG: is characters 0-4
    		$end = strpos($txt, "|");		
    		if ($end > 5) {
    			$val = substr($txt, 5, $end-5);
    			$q = $val . "&showposts=4";		
    		} else {
    			$end = 5;
    			$q = "showposts=4";
    		}	
    		$str = substr($txt, $end+1);
    		$my_query = new WP_Query($q);
    		while ($my_query->have_posts()) : $my_query->the_post();
    			$str .= "\r\t\t\t<p><a href="">ID) . "\" rel=\"bookmark\" title=\"" . $post->post_title . "\">" . $post->post_title . "</a></p>";
    		endwhile;	
    		
    	/* return a list of categories */		
    	} else if (strpos($txt,'CAT:')===0) {
    		//CAT: is characters 0-3
    		$end = strpos($txt, "|");		
    		if ($end > 4) {
    			$val = substr($txt, 4, $end-4);
    			$q = $val;		
    		} else {
    			//$end = 4;
    			$q="";
    		}
    		$str = substr($txt, $end+1);
    		$str .= "\r<ul>\r";
    		ob_start();
    		wp_list_categories($q);
    		$str .= ob_get_contents();
    		$str .= "\r</ul>\r";		
    		ob_end_clean();	
    
    	/* return a list of archives */		
    	} else if (strpos($txt,'ARCHIVE:')===0) {
    		//CAT: is characters 0-7
    		$end = strpos($txt, "|");		
    		if ($end > 8) {
    			$val = substr($txt, 8, $end-8);
    			$q = $val;		
    		} else {
    			//$end = 4;
    			$q="";
    		}
    		$str = substr($txt, $end+1);
    		$str .= "\r<ul>\r";
    		ob_start();
    		wp_get_archives($q);
    		$str .= ob_get_contents();
    		$str .= "\r</ul>\r";		
    		ob_end_clean();	
    
    	/* return a list of categories as a tag cloud */				
    	} else if (strpos($txt,'TAG:')===0) {
    		//TAG: is characters 0-3
    		$end = strpos($txt, "|");		
    		if ($end > 4) {
    			$val = substr($txt, 4, $end-4);
    			$q = $val;		
    		} else {
    			//$end = 4;
    			$q="";
    		}
    //pre wp2.3		$qstr = "SELECT cat_ID, cat_name, category_count from wp_categories where category_count > 0 ORDER BY cat_name";
    		$qstr = "SELECT a.term_id, a.name, a.slug,  b.count from wp_terms a, wp_term_taxonomy b where a.term_id = b.term_id and b.count > 0 ORDER BY a.name";
    		$cats = $wpdb->get_results($qstr); 
    		$str = substr($txt, $end+1);
    		$str .= "<div class=\"cloud\">";
    		foreach ($cats as $cat)
    		{
    /* pre wp2.3
    			$catname = $cat->cat_name;
    			$catlink = get_category_link($cat->cat_ID);
    			$pstcnt = $cat->category_count;	
    */			
    			$catname = $cat->name;
    			$catlink = get_category_link($cat->term_id);
    			$pstcnt = $cat->count;	
    			if ($pstcnt > 12) $pstcnt = 12;
    			$str .= "<a href=\"" . $catlink ."\" ";
    			$str .= "class=\"s" . $pstcnt . "\">";
    			$str .= $catname . "</a> ";
    		}	
    		$str .= "</div>";
    	}
    	return $str;
    }
    
    function getBlogDefaults($id) {
    /* uses the blog page as the source for custom values
       and sets any values that are not already set by the
       current page
    */
    		global $post;
    		$holdpost = $post;
    		$temp_query = new WP_Query('page_id=' . $id);
    		while ($temp_query->have_posts()) : $temp_query->the_post();
    			customValues(false);
    		endwhile;
    		$post = $holdpost;
    }
    
    function getArchiveYearLinks($catlist, $not="false", $prefix="", $suffix="", $urlpre="/posts/") {
    	global $wpdb;
    	$qstr = "select distinct year(post_date) as yr from wp_posts, wp_term_relationships where ID=object_id and post_type='post' and term_taxonomy_id " . $not . " in(" . $catlist .") order by yr desc";
    	$arcs = $wpdb->get_results($qstr); 
    	$str = "";
    	foreach ($arcs as $arc) {
    		$str .= $prefix . '<a>yr . '">' . $arc->yr . '</a>' . $suffix;
    	}
    	return $str;
    }
    
    ?>

    Can you help me which code I add or change to make it works. Thanks

    Thread Starter pauln9

    (@pauln9)

    Hi,

    I am not sure where it come from but under my organization theme name on Dashboard.
    I think if I can change this code to basic nav bar, it may work

    `$nav1 = update($nav1, c2c_get_custom(‘nav1’), $overwrite);

    Thanks

    Thread Starter pauln9

    (@pauln9)

    Hi James,
    I tried deactivated all plugins, but it didn’t solve the problem, but new theme is working well. What I have to do with the old theme to make it works. Thanks

    Thread Starter pauln9

    (@pauln9)

    Hi James,
    Thanks for helping, but it’s not solved the problem. I click on the post view it’s display

    https://www.viet.seaccusa.org/2012/11/19/empowering-community-promoting-business/

    If I click on the sidebar link, it shows the fatal error that means something is wrong with the sidebar or the pages. Index page has fatal error too.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)