• Resolved nysus

    (@nysus)


    AJAXed WP:

    I found this plugin tonight and it looks to do exactly what I want it to. I have been able to set up the comments to hide/reveal but I’m having trouble doing the same with the post. I want the title of the post to reveal the post when clicked.

    <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><?php do_action('awp_title'); ?></h2>

    That is the closest that I’ve come, but its obviously not right as I get “Testing the AJAX onclick=”aWP.doit({‘id’: ’10’, ‘type’: ‘post”show’: ‘Testing the AJAX ‘, ‘hide’: ‘Testing the AJAX ‘}); return false;” id=”awppost_link_10″” for a title with nothing being clickable.

    I’m pretty sure that I’m just using the function wrong and any help would be appreciated.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The code should be:

    <h2><a href="<?php the_permalink() ?>" <?php do_action('awp_title'); ?> rel="bookmark"><?php the_title(); ?></a></h2>

    Thread Starter nysus

    (@nysus)

    Thanks for the help, that worked more or less.

    I do have another question. Can I set it up to where on the main page you just see just the title and when clicked it shows the entire post. I don’t want the title to link to the post page and only want that page accessible via clicking on the comment link.

    Is this something that the plugin is set up to handle?

    By default there is no way, but I quickly wrote a module that will do it.

    Just save the file and upload it to your aWP modules folder, and then activate it.

    If you also want to make it so users can’t, easily, click the title to go straight to the real page, in the link above change <?php the_permalink() ?> to #.

    Although this will make it impossible for users without JavaScript and search engines to find the page, but it will not keep people who know what they are doing from manually typing in the URL.

    There is no download link on the plugin homepage. Make a button, please!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Making the title reveal the post’ is closed to new replies.