• crogers1975

    (@crogers1975)


    Hello Everyone.
    I am using wordpress v.2.5 with the JustSimple v. 2.2 theme. I am attempting to enhance my content by using iBox plugin . Something strange has happened… I’m pretty sure that I have entered the correct HTML in the post to get the plugin to work, but it will only work on the post page. The links don’t even appear on the main page.

    The post in question is the newest one titled Keeping it all Together
    See what I mean:
    Main Page: http://www.mydadsadork.com/blog

    Post Page: http://www.mydadsadork.com/blog/?p=78

    How do I get the links to appear on the index page? Am I missing some code? Thanks in advance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter crogers1975

    (@crogers1975)

    More information that might help solve the problem.

    It is NOT browser based. I tested the site with the latest versions of Safari and Firefox with the same results. HOWEVER when I viewed the site on my iPhone the links worked perfectly. Weird.

    It is NOT theme based. I tested the site with 3 of the themes from the list of themes that work with WP 2.5 with the same result each time.

    I think that the problem lies somewhere in the Main Index file.

    dream-size

    (@dream-size)

    Yes, I do believe the problem lies in the index file as well. You’re gonna have to dissect your code that’s calling for posts on the main page and look for anything unusual that might be stopping the links from showing up, or it might even be your CSS itself. It might be set to no text-decoration for your links?

    haochi

    (@haochi)

    What other plugins are you using because it seems that neither iBox nor the theme did it (unless you edited them).

    (Do the links show up when the plugin is deactivated?)

    boober

    (@boober)

    if you can show us the contents of your index.php and single.php that would be great. seems similar to how the_excerpt strips html.

    p.s.
    good god man thats a cute baby in those sidebar pics!! 🙂

    Thread Starter crogers1975

    (@crogers1975)

    Thanks for the compliment boomer, he’s my first. We have family all around the country, the website is the best way to keep them up to date.

    On to the problem. I did some more testing based on the suggestions of the forum. When iBox is turned off the links still do not appear in the index file, but they do show up in the single file. When the plugin is off clicking the links takes you to another page (which it should).

    Below is the code from the index page.
    <?php get_header()?>
    <div id=”content”>
    <div id=”main”>

    <?php if ($posts) {
    $AsideId = get_settings(‘justsimple_asideid’);
    function stupid_hack($str)
    {
    return preg_replace(‘|\s*<ul class=”asides”>|’, ”, $str);
    }
    ob_start(‘stupid_hack’);
    foreach($posts as $post)
    {
    start_wp();
    ?>
    <?php if ( in_category($AsideId) && !is_single() ) : ?>
    <ul class=”asides”>
    <li id=”p<?php the_ID(); ?>”>
    <?php echo wptexturize($post->post_content); ?>

    <?php comments_popup_link(‘(0)’, ‘(1)’,'(%)’)?> | ” title=”Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), ”)); ?>” rel=”bookmark”># <?php edit_post_link(‘(edit)’); ?>

    <?php else: // If it’s a regular post or a permalink page ?>
    <div class=”post”>
    <h2 class=”post-title”>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h2>
    <div class=”post-content”>
    <?php the_content(‘Continue Reading »’); ?>
    <?php wp_link_pages(); ?>
    <p class=”post-info”>
    <?php the_author_posts_link() ?> :: <?php the_time(‘M.d.Y’); ?> ::
    <?php the_category(‘, ‘) ?> <?php edit_post_link(); ?> ::
    <?php do_action(‘awp_commentform_link’);?> ::
    <?php do_action(‘awp_comments_link’);?>
    <?php do_action(‘awp_commentform’); ?>
    <?php do_action(‘awp_comments’); ?>
    </p>
    <!–
    <?php trackback_rdf(); ?>
    –>
    </div>
    <?php comments_template(); ?>
    </div>
    <?php endif; // end if in category ?>
    <?php
    }
    } // end if (posts)
    else
    {
    echo ‘<p>Sorry, No Posts matched your criteria.</p>’;
    }
    ?>
    <p align=”center”><?php posts_nav_link() ?></p>
    </div>
    </div>
    <?php get_sidebar();?>
    <?php get_footer();?>

    moshu

    (@moshu)

    [next time, please, use a pastebin service like http://wordpress.pastebin.ca – instead of posting long code here!]

    Here is your problem:

    <?php if ( in_category($AsideId) && !is_single() ) : ?>
    <ul class="asides">
    <li id="p<?php the_ID(); ?>">
    <?php echo wptexturize($post->post_content); ?>

    the first line is saying “if it is NOT single”, meaning, everything else (besides asides) like index, archives etc. then do this:
    last line: apply “wptexturize” filter on post content, which means it will strip all your js code.

    Solutions:
    – get another theme
    – don’t use Asides and modify the code accordingly

    Thread Starter crogers1975

    (@crogers1975)

    Sorry about posting the long code, I will use the paste bin next time. I am clearly a newbie when it comes to editing code. If I want to keep this theme (which I do for now), can I simply delete this section of code or are there other edits I need to make. Thanks.

    moshu

    (@moshu)

    Yes, there are other edits, too. On a second thought…

    Actually, you may want to try to modify this line only:
    <?php if ( in_category($AsideId) && !is_single() ) : ?>

    make it:
    <?php if ( in_category($AsideId) ) : ?>

    and see what happens.

    Thread Starter crogers1975

    (@crogers1975)

    I changed that line of code in the index file, but the results are the same. I’m not really sure how to make good use of asides, so if the fix involves disabling them it is alright. Thanks.

    The strange thing is that no matter what theme I activate the results are the same. I even activated the WordPress default theme and the links did not appear on the main index page.

    Thread Starter crogers1975

    (@crogers1975)

    Ok. I have discovered that it has something to do with the Ajaxed WordPress plugin. When I deactivate the plugin, links work on the index page. I’m going over to the forum for that plugin to see if there is a solution. Thanks for the help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘HTML issue on post vs main index pages’ is closed to new replies.