desibird
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Display posts titles as listssure…
backticks
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
?>
<div id=”sidebar” role=”complementary”>-
<?php /* Widgetized sidebar, if you have the plugin installed. */
-
<?php
$args=array(
‘showposts’=>0,
‘caller_get_posts’=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <?php the_time(‘m.d.y’) ?> ” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?>
<?php
echo substr($my_query->post->post_content,0,120); //20 chars of content
endwhile;
} //if ($my_query)
wp_reset_query(); // Restore global post data stomped by the_post().
?>
if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?><?php endif; ?>
</div>
backticks
Forum: Plugins
In reply to: displaying single.php on external html/php page<?php /* Short and sweet */ define('WP_USE_THEMES', false); require('./wp-blog-header.php'); query_posts('showposts=1'); ?>
posting the above code in the top of the page(html) and then, within the required div, add side-bar
<?php get_sidebar(); ?>
Coming to the content div, managed to pull the latest post and then placing within the content div. code for the following
<div class="the-center"> <?php while (have_posts()): the_post(); ?> <h2><?php the_title(); ?></h2> <i> <?php the_time('F jS, Y') ?></i> <p><?php the_content(); ?></p> <?php endwhile; ?> </div>
.
Am stuck at the point, where, when clicked on side-bar(archived) titles, page is jumping into wordpress site, rather than staying in the same page and retrieve the required post..!!
any help appreciated!
Forum: Fixing WordPress
In reply to: Blog Name and Tag Line Not Showing@jherold the tag line might be commented!! (<!– –>).. get rid of them and have a look!!
@choclate: boy, re-look at your code..!!
a standard wordpress header.php code will be: <title><?php wp_title(‘«’, true, ‘right’); ?> <?php bloginfo(‘name’); ?></title>
copy and paste the above code and leave a rep!!
cheers
Forum: Plugins
In reply to: display posts on external website?cheers michael.. thanks again
michael.. sorry for coming back again.. is it possible to show older posts…!! when only 5 recent are visible in my page at the moment!!
cheers michael.
thanks for your help!
thanks alot.
thanks alot mike.
It’s a great help from your end! “echo substr” is not helping me in any chance. + cant find my previous posts to these recent 5 posts.
Can it be possible to add 1,2,3 buttons in the bottom of the list/sidebar to view previous posts? also only 5 posts visible per list??
cheers,
venkatoops.. i managed to do that..!! thanks for your help!
This present code is rendering all the posts and full content within side bar. Can it be possible to obtain just date, title and first few words of the posts in side bar??
regards,
venkat.hi michael,
thanks for a reply.Am very new to this and could not find, where to add the above mentioned code.!! is that, i’ve to use it in archive/s.php or wp-includes/widgets.php??
cheers,
venkat -
<?php