Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello.
    I have a comment related to this piece of code….

    I displaying a list of posts (events) and everyting worked fine until I moved my apparent wordpress root – so the GUID is not refering to the location of the page anymore.
    After the move, clicking on the title generates a 404 error.

    what is your impression? is this a correct solution?

                foreach ($events as $event) {
                    $class_item = ($event->time_end >= current_time('timestamp')) ? 'event_future' : 'event_past';
                    if ($ep_settings['emptylink'] == 0 && empty($event->post_content)) {
                        $event->permalink = '#' . $id . $this->list_id;
                    }
     					// was trying to display a list of posts (events) and everyting works
    					// Then I moved my apparent wordpress root - so the GUID is not refering to the location of the page anymore
    					// to be honest, I don't understand why $ob is used here - maybe it is the cause of the issue - I solved in another way
    					elseif(empty($ob->permalink)){
    
    					// some tests for the new code.... $list.=sprintf('<p>'.$event->guid.'<br />'.get_permalink($event->post_parent).'<br />'.get_permalink($event->ID).'</p>');
    					
    
    					// this is the original code.... the problem is that the GUID is put in the HTML in the <a>. Results in 404 error
                        $event->permalink=$event->guid;
    					
    					// this is the code I replace it with - it works.... Any thoughts? is this correct?
    					$event->permalink=get_permalink($event->ID);
    Thread Starter pierrehenry67

    (@pierrehenry67)

    I have run php_info and you are correct.
    the Theme is ultra old – and will be a pain to update…
    plug ins are all uptodate except RPS image gallery which gives problems when upgrading.

    Facebook is fixed.

    Thread Starter pierrehenry67

    (@pierrehenry67)

    Thanks for the tip on the facebook button. I am looking on how to fix it

    How do you know I am running PHP 5.2.17? OVH says I have 4.4.

    thanks

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