Forums

[resolved] How to add two parts for a post? (Second post member restricled) (12 posts)

  1. lasano
    Member
    Posted 4 months ago #

    I need to set up an article directory.
    Posts will be displayed under a category.
    All posts titles will be displayed under each category.
    When user click on a title post he will be redirected to the post page where content of post will be displayed.

    Till now I described the default way a wordpress blog works
    MY NEED
    When user click on title post listed under category he should see first paragraph of post (as expert fn)
    Under that paragraph there is a link where more details are displayed and links to file downloads links.
    This page should be accessed only by registered members.

    How I can make this? Please help me

    lasano

  2. vtxyzzy
    Member
    Posted 4 months ago #

    It is not clear if the link is in the middle of the post, after the first paragraph, or at the end and there is only one paragraph.

    The easiest solution to make things visible only to logged-in viewers is to add a shortcode as in this recipe by Justin Tadlock:

    http://www.wprecipes.com/wordpress-shortcode-display-content-to-registered-users-only

  3. lasano
    Member
    Posted 4 months ago #

    Thanks vtxzzy for reply.

    But I need to display member access content in a separate page. Download links will be on bottom of that page.

    I need to set up single page with detailed content because I am planning to place CPA lead ads from cpalead, so even members can access the detailed content page with download link only after completing any survey or free sign up.

  4. vtxyzzy
    Member
    Posted 4 months ago #

    I am not sure I understand, but you can put a link between the shortcodes and it will only be displayed to registered viewers.

  5. lasano
    Member
    Posted 4 months ago #

    Sorry for my bad English

    This may make it clear.

    I need to list post titles under category page

    When user click on post title he should be redirected to the page where only excerpt of the post should be seen.

    Under except I need a link where clicking on it user should be redirected to the real content of the post. This full post content only accessible for members.

  6. vtxyzzy
    Member
    Posted 4 months ago #

    Your English is not at fault, you simply have an unusual request.

    Here is a link to sample code that will list post titles by category:

    http://wordpress.mcdspot.com/2012/01/22/post-titles-by-category/

    It will need to be adapted to your theme. Clicking a title will take you to the post with that title.

    You can use the shortcode I referenced earlier to hide some content on the post. That content could be a link to a post with the full content.

  7. lasano
    Member
    Posted 4 months ago #

    How can I show a message to non members that, they should login to view full content?

  8. vtxyzzy
    Member
    Posted 4 months ago #

    Just alter the shortcode function a little:

    function member_check_shortcode( $atts, $content = null ) {
    	 if ( is_user_logged_in() && !is_null( $content ) && !is_feed() )
    		return $content;
    	return 'Your login message goes here';
    }
  9. brownoxford
    Member
    Posted 4 months ago #

    Hi Lasano,

    I understand your request and am planning to add that feature in the next release. I was coming at it from a different angle, (I want post pages with excerpts to be indexed by search engines), but I think the results will suit us both.

  10. lasano
    Member
    Posted 4 months ago #

    Thank you vtxyzzy and brownoxford for your replies.

    Here is the page where I need the requested.
    In this page there see a title, paragraph of text and image.
    This is what I gave in title field and content area of post entry page in wordpress.

    Below the para there is a link 'See Full Report' which I created using wordpress 'wp link pages' function. By clicking on that remaining content of post after '<!--nextpage-->' is shown.

    Below there is a flash file displayed. I load it using custom field.


    MY NEED

    Currently flash file is displayed in first page of post.
    I don't want to display it there and need to move it to next page of post. So users after reading the text content, if interested in that topic can see that flash file by clicking on 'See Full Report' link.
    I can save a lot of bandwidth by this.

    Hope some one can help in this :)

  11. lasano
    Member
    Posted 4 months ago #

    In next page (after clicking 'See Full Report')I need to show only that flash file. Text content and image should not be seen in that page.

  12. lasano
    Member
    Posted 4 months ago #

    Ha ha... I was searching for a wordpress function or technic to do it. So didn't try to think as a programmer.
    But when I think as a programmer it was so easy :)
    I made it using php GET variable
    Thank you for your replies

Reply

You must log in to post.

About this Topic