The MU forums have moved to WordPress.org

Custom PHP functions or scripts on index page (4 posts)

  1. rudy3107
    Member
    Posted 15 years ago #

    I have customised theme on my site http://supari.org.

    i want to add functions of plugins on post
    (eg: last 10 post headers of a perticular category)

    i am not expert in PHP or scripts but i can add modify scripts

    is there any inbuilt functions which can be called by <php include...> or small scripts to things.
    let me know.

  2. webmaestro
    Member
    Posted 15 years ago #

    There's a plugin called Custom Function Widgets that might be useful. It allows you to insert custom PHP functions in the sidebar (NOTE: I don't believe it allows you to insert code directly into posts).

  3. rudy3107
    Member
    Posted 15 years ago #

    thank you for the reply;
    im not asking for widgets;
    i have one like below; but if i select more than one post header; its comes in one line;
    is there php expert to make it like comes each post header in next line.

    thank you in advance.

    <div id="home_artic"> <!-- start home_artic -->
    <h3 class="home_artic"><B>Articles</b></h3>

    <?php $the_query = new WP_Query('category_name=articles&showposts=7');

    while ($the_query->have_posts()) : $the_query->the_post();

    $do_not_duplicate = $post->ID; ?>

    <div class="humo_content">

    <?php if ( get_post_meta($post->ID, 'humor_home_img', true) ) { ?>

    <div class="humo_thumb">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/artic/<?php echo get_post_meta($post->ID, "humor_home_img", $single = true); ?>" alt="<?php the_title(); ?>" /></div>

    <?php } ?>

    <div class="humo_title">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></div>
    </div>

  4. rudy3107
    Member
    Posted 15 years ago #

    this is just to add plugin / widget functions to theme, without plugin / widget
    so i can design blog as i like.

About this Topic

  • Started 15 years ago by rudy3107
  • Latest reply from rudy3107