• I am in desperate help. I would say I am not an expert however I also do not nothing about php and wordpress.

    I changed my blog (www.lamansionarenal.com) from a sub directory (/new) to the root folder, as it was finished and I wnated it live.

    I made the change as wordpress stated, I had an issue which was resolved by changing the wp_posts structure using a sql replace from /new to /

    The site then worked. However the issue I am having is with the right sidebar, which uses the get-a-post plugin to show a clearskys inquiry form. It shows on the homepage using the below

    <?php get_a_post(’11’); ?>
    <?php the_content(”); ?>

    However on any other page what it is doing is instead of showing the inquiry form it shows the content of the page?

    Is this a SQL issue? Please please help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • This line of code is going to display the content of a post <?php the_content(''); ?>

    And I would guess <?php get_a_post('11'); ?> gets a post, though you’d need to provide a link to the plugin that allows that.

    Thread Starter bexinateur

    (@bexinateur)

    Thread Starter bexinateur

    (@bexinateur)

    Would I be correct in saying the plugin is not connecting with the database?

    That plugin worked fine for me. Using the WordPress Default theme, I put the following code in sidebar.php and it displayed the title and content of post id 356:

    <?php get_a_post(356); ?>
        <h3><?php the_title(); ?></h3>
        <?php the_content(); ?>
    Thread Starter bexinateur

    (@bexinateur)

    What is happening is post 11 is being pulled on the hompage which shows a post.

    However on the pages which are both a mix of posts/pages it is not showing.

    This is similar to what you are trying to do and it works in my sidebar.php

    <?php
    $args = array(
      'post__in' => array(356)
    	);
    $posts=get_posts($args);
    if ($posts) {
    foreach($posts as $post) {
    setup_postdata($post);
    ?>
    <p><?php the_time('m.d.y') ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
    <?php the_content(); ?>
    <?php }
    }
    ?>
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress Issue Need HELP’ is closed to new replies.