Forum Replies Created

Viewing 15 replies - 31 through 45 (of 53 total)
  • Thread Starter the_enn

    (@the_enn)

    Ok, maybe wp_localize_script is the way to go.

    The URL parm is just at the end of the href. e.g. :
    <a href="destination.php?thepid=5">VIEW ALL</a>

    Any idea why PHP is returning the include path URL instead of the browser URL?

    Thread Starter the_enn

    (@the_enn)

    Thanks for the reply. Glad it wasn’t just me that couldn’t find any information about it. I may end up going to one of the links you’ve provided.

    I’ve been playing around with the Ultimate CSV Importer which will work really well if the Sitecore people can provide a CSV extract. Apparently they can, but that remains to be seen.

    Thanks again for the links.

    Thread Starter the_enn

    (@the_enn)

    Sorry Andrew, I posted the wrong link. This one has the element in the code above:

    https://www.relnei.org/news.html

    Thread Starter the_enn

    (@the_enn)

    Thread Starter the_enn

    (@the_enn)

    Bryan, you solved it.

    This was the culprit:

    include (TEMPLATEPATH . '/left_bar.php');

    This file was calling a jquery library that doesn’t exist anymore. And for some reason, the result was the post ID in the sidebar.php file coming up as 1. I don’t understand why that would happen, but it’s good now. I removed the include and the sidebar is up!

    This was driving me crazy and I wouldn’t have found it without your help.

    THANK YOU!! Does this forum allow points I can send ya? ??

    Thread Starter the_enn

    (@the_enn)

    Thanks for helping Bryan! ??

    I’m noticing that (EDIT) all the templates are having the same problem with the exception of the Default. I even cut and paste the code from the working default template over the offending template, saved, refreshed, and still the same problem exists. Makes me wonder if something else is afoot.

    In any case, here’s code from one of the offending templates:

    <?php
    /*
     Template Name: Publications
    */
    
     get_header(); ?>
    
    	<div id="content_box" <?PHP if(get_field('nosidebar') && get_field('right_sidebar')=='') { echo ' class="novhairline"'; } ?>>
    
    		<div id="left_box"><div id="left_box2">
    
    			<div id="content" class="page">
    
    				<div id="content_inner"<?PHP if(get_field('nosidebar') && get_field('right_sidebar')=='') { echo ' class="nosidebar"'; } ?>>
    
    				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <?php
    $thisid=get_the_ID();
    $photo=wp_get_attachment_image_src(get_post_thumbnail_id($pid[$i]), 'single-post-thumbnail');
    
     ?>
    					<h1><?php the_title(); ?></h1>
    					<div class="format_text">
    <?php
    $photolink=get_field('link_for_featured_image');
    //echo 'photolink is:'.$photolink;
    if($photo!='') {
    	if($photolink!='') {
                if(stripos($photolink,'ed.gov')===FALSE) {
                    echo '<a href="' . $photolink. '">';
                } else { ?>
                     <a onclick="_gaq.push(['_trackEvent','External','IES',this.href]);" href="<?php echo $photolink.'">';
                }
    
            }
    	echo '<img src="' . $photo[0] . '" class="wrapleftOutline" alt="photo">';
    	if($photolink!='') { echo '</a>'; }
    }
    the_content();
    
     ?>
    
                        </div>
    
    				</div>
    
    				<?php endwhile; endif; ?>
    
    			</div>
    
    			<?php include (TEMPLATEPATH . '/left_bar.php'); ?>
    
    		</div></div>
    
    		<?php 
    
    		if(get_field('right_sidebar')!='') {
                        echo '<div id="right_bar" class="sidebar"><ul class="sidebar_list"><li class="widget">';
                        echo str_replace('<h2>','<h2 class="widgettitle">',get_field('right_sidebar'));
                        echo '</li></ul></div>';
    		} else if(!get_field('nosidebar')) {
                            echo "single-publications.php, nosidebar=" .get_field('nosidebar') ;
                            get_sidebar();
                        } ?>
    		<?php //include (TEMPLATEPATH . '/searchform.php'); ?>
    
    	</div>
    <?php include (TEMPLATEPATH . '/sharetop.php'); ?>
    <?php get_footer(); ?>
    Thread Starter the_enn

    (@the_enn)

    It looks like only certain templates are affected. The confusing thing is I confirmed they all use the same line of code to get the sidebar:

    get_sidebar();

    Here’s something I just found: I went to the dashboard, and on one of the offending pages, changed the template from the ‘bad’ one to the default template (that correctly loads the sidebar on other pages). This time, the post ID displayed in sidebar.php was the correct post ID and was not 1!

    Any ideas what would account for that? These templates haven’t changed in a while.
    Could it be something else throwing it off? I can post the template code in entirely, but it’s fairly long. Can do if it helps?

    Thread Starter the_enn

    (@the_enn)

    This returned a value of 0.

    $post_it = get_queried_object_id();
    echo 'post_it='.$post_it.'<br>';

    On some pages it returns the correct post id from sidebar.php. And the templates all use the same sidebar.php file. I am really stumped on this one.

    Thanks for the plugin suggestion. I can’t implement now, but in the future it sounds worth looking at.

    I have the same question. We already have Google tracking code on our site in the header. Looks like a great plugin, but want to make sure Google tracking won’t reset.

    Thread Starter the_enn

    (@the_enn)

    Found a solution in case anyone else needs it.

    Simply put this line in the theme folder functions.php:

    add_theme_support( ‘post-thumbnails’ );

    Problem solved!

    Thread Starter the_enn

    (@the_enn)

    Oh boy, that’s disappointing to hear the theme is old and not even supported anymore…

    I would consider using a more recent theme except the 3.8 upgrade is supposed to go live in a few days.

    In the meantime I’ll check with the theme’s developers if they can give me some ideas.

    Thread Starter the_enn

    (@the_enn)

    I inherited a site that has been using this theme for over a year. It was probably downloaded from here:

    https://www.pearsonified.com/theme/neoclassical/

    Thread Starter the_enn

    (@the_enn)

    Ok, thanks much catacaustic! I couldn’t even log in to the dev site – it was redirecting me to production because wp_options siteurl was pointing to prod. Changed directly on the DB, and now I can get into Dev. And after changing the URLs in Settings -> General for the home URL, the Dev URLs are pointing to Dev again.

    Wasn’t aware the links in the content were hard-coded either… I will check out your script link.

    Bump.

    Does anyone have a solution to this ?

    Thread Starter the_enn

    (@the_enn)

    Doesn’t there need to be jquery .css for the Accordion styles?

Viewing 15 replies - 31 through 45 (of 53 total)