• I have an ediv theme single.php file which is not showing its posts.It only show the videos but not the posts.Can anyone help me to show the post under the video?

    Code of single.php is as follows:

    ?[huge chunk of code moderated – please use a pastebin or link to file]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    First up, learn to use this URL https://wordpress.pastebin.com/

    The forum filter munged your code and that is way to much code to digest in this forum. If you are going to post code, learn how to use the code button here.

    Now that that’s out of the way, save your single.php and start again. Start small and insert a place holder with just

    <!-- here starts my hack -->
    <div class="video-nav ievideo-nav" style="margin-left: 100px;">
    <?php echo"OY! MY CODE GOES HERE"; ?>
    </div>
    <!-- here ends my hack -->

    Use that and confirm that your php echo is displaying and the_content continues to display. Then start inserting your code between the markers and see where you get.

    Edit: Laughter. A moderator already whacked your code as I was replying.

    Thread Starter bikram_068

    (@bikram_068)

    Thanks jdembowski,

    Could you explain it more?I am unable to follow.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Sure thing. The code button on the edit form here inserts a ` before and after your text. That way the HTML parser formats that section via CSS and does not mung your code. It makes it more readable.

    (Jan sips more coffee.)

    You started with a copy of wp-content/themes/default/single.php and inserted your video code, right? But that seemed (per your two posts) to display the video but not the post itself.

    That meant you broke the loop that displays posts. That loop in single.php starts with

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    displays the post content via

    <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>

    and ends with

    <?php endwhile; else: ?>

    What I am suggesting is that you start editing a copy of single.php and take baby steps. Insert a place holder first where your video code should be. Once that’s working, insert your real code between the markers.

    That way, if something breaks, you only need to debug the code between the markers.

    If you still have problems, then you can paste the code into https://wordpress.pastebin.com/ and post the link here. That’ll make looking at your actual code much easier.

    Thread Starter bikram_068

    (@bikram_068)

    HI jdembowski,
    I am a novice in wp.I have attached the code below.Please make it to show all posts below the video.Thank you very much again.

    https://wordpress.pastebin.com/m435792a9

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Sigh. This is a self help forum and you are not really listening… Okay you are new at this but more info is needed.

    Bikram_068, where did you get this code? Did you edit it yourself or did you download it from somewhere else? Looks like you downloaded a theme from somewhere and if so please provide the link to that theme.

    I don’t see in the pastebin (thank you for using that by the way, it does help) where the new code starts and ends. It looks like line 33 is the portion that gets the video. The whole works starts on line 8 and wraps up around line 135.

    Thread Starter bikram_068

    (@bikram_068)

    HI jdembowski,
    Actually the theme was gifted by one of my friends.All other thing is going well not the single.php.Your help would be much thanked.Should I attach the theme and sent you?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Is it a free theme, as in anyone can download it? If so, a link to the theme would be best. Usually in the themes style.css file is a link to the theme or theme authors web site.

    If it’s a commercial theme, then we get into dodgy waters. Posting a commercial theme when their license does not permit it to be distributed is a pain (and the number one reason people should stick with GPL’ed themes).

    Commercial themes have their own support forums for that purpose. Which theme is it?

    Thread Starter bikram_068

    (@bikram_068)

    I think it is commercial…but he din’t gave me the username/pass for the support forum.So I am asking you for help.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Sorry, but the best way to get support is via the commercial support forum for that theme.

    It’s not that I (or others) don’t want to help. It’s that that single.php looks like its part of a framework. That one file alone doesn’t mean anything by itself and aside from the complexity, it looks fine to me.

    I suggest that you ask your friend if he paid for it and get support that way. Good luck.

    Thread Starter bikram_068

    (@bikram_068)

    Thanks for you help..

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to show full post from this single.php file?’ is closed to new replies.