• Hi guys,

    I have the following source code

    [CODE]<?php get_header(); ?>

    <div id=”mainwrapper” class=”clearfix”>
    <div id=”maincontent”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”postpage”>
    <h2 id=”post-<?php the_ID(); ?>” class=”pagetitle”><?php the_title(); ?></h2>
    <div class=”entrytext”>
    <?php the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?>
    <?php link_pages(‘<p>Pages: ‘, ‘</p>’, ‘number’); ?>
    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link(‘Edit this page’, ‘[ ‘, ‘ ]’); ?>
    </div>
    </div>
    <?php get_footer(); ?>
    [/CODE]

    I basically need it to “”include”” a sidebar.php script listed on my server! Can anyone help as im trying to get it to work like this example:

    [IMG]https://bielbo.com/convert.jpg[/IMG]

    So the red box to the left is an iphone/ipod version of my website and i want to take the side bar with the 2 red boxes off of the full website to the right!

    Raid my source code at https://www.bielbo.com/iphone if you need to!

    Please help asap ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter bielbo

    (@bielbo)

    SECOND ATTEMPT AT THIS MESSAGE

    I have the following source code

    <?php get_header(); ?>
    
    <div id="mainwrapper" class="clearfix">
    	<div id="maincontent">
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      	<div class="postpage">
        <h2 id="post-<?php the_ID(); ?>" class="pagetitle"><?php the_title(); ?></h2>
        <div class="entrytext">
        	<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
        	<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
        </div>
      	</div>
      <?php endwhile; endif; ?>
      <?php edit_post_link('Edit this page', '[ ', ' ]'); ?>
    	</div>
    </div>
    <?php get_footer(); ?>

    I basically need it to “”include”” a sidebar.php script listed on my server! Can anyone help as im trying to get it to work like this example:

    https://bielbo.com/convert.jpg

    So the red box to the left is an iphone/ipod version of my website and i want to take the side bar with the 2 red boxes off of the full website to the right!

    Raid my source code at https://www.bielbo.com/iphone if you need to!

    Please help asap ??

    Thread Starter bielbo

    (@bielbo)

    bump

    Thread Starter bielbo

    (@bielbo)

    problem is… every time i make an include the following tag:

    <?php get_sidebar(); ?>

    As you said use https://codex.www.ads-software.com/Include_Tags

    “This tag includes the file sidebar.php from your current theme’s directory. If that file is not found, it will instead include wp-content/themes/default/sidebar.php” -https://codex.www.ads-software.com/Include_Tags

    But when i use it an error comes up! I’m not sure if i have put it into the correct location within the code or if i havn’t added something to that string to make it work. I do know one thing…. the string shows what i need but has 3 chunks of bold text error messages!

    I basically need it to “”include”” a sidebar.php script listed on my server!

    <?php get_sidebar(); ?> is for the sidebar.php file in your current theme’s folder.

    Is this sidebar include intended to be included your theme’s sidebar or to replace your theme’s sidebar?

    Thread Starter bielbo

    (@bielbo)

    https://bielbo.com/convert.jpg

    Looking at the image above i intend to copy the sidebar into the red outlined area to the left!

    I basically have 2 themes. Theme 1 is a full browser theme and theme 2 is an ipod touch/iphone theme. I have a browser detect plugin which points an ipod touch/iphone to theme 2. Theme 2 only has a bog standard ‘page’ as a homepage but i want it to display everything from the side bar!

    Why not just add the desired code from theme 1’s sidebar.php into the relevant theme 2 file? You wouldn’t need an include for this.

    Thread Starter bielbo

    (@bielbo)

    how do i do that?

    Thread Starter bielbo

    (@bielbo)

    https://codex.www.ads-software.com/Customizing_Your_Sidebar

    Cant believe it… i’ve been looking thru this for hours and i’ve been over this page more times than i can remember and now… it actually works!

    Thanks for your help iridiax! ??

    Thread Starter bielbo

    (@bielbo)

    only thing i need now is one of these:

    <?php get_links_list(); ?>

    for the META section!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘includes help…. need help asap!’ is closed to new replies.