WordPress.org

Ready to get started?Download WordPress

Forums

Can I edit what shows up on a permalink page? (12 posts)

  1. faustina
    Member
    Posted 7 years ago #

    I am using the WPGlass theme (modified) and I want to change what shows up on my permalink page. Specifically, I don't want my pop-up comments automatically shown. I don't see a php file for the permalink page - I do have a file called single.php but that isn't the permalink as it includes a link to the permalink page. If there is a way to do this please let me know! Thank you.

  2. moshu
    Member
    Posted 7 years ago #

    We will have to clarify what is a "permalink page". If you think of the single post view - that one is displayed by the single.php template file, if exist.
    See http://codex.wordpress.org/Template_Hierarchy

    How are the popup comments "automatically" shown?

  3. faustina
    Member
    Posted 7 years ago #

    hmmm - I think I understand. Is there a way for me to change the what links to the permalink (single) page to refer to the Page.php page instead? If I could do that, I think that would solve my problem.

    What is happening is:
    On the first, main page view comments are not shown. You click the comments link and they "pop up" if you click on the permalink link the comments are already up on the page with the comment form, where I would like them to still be hidden under the comment link. I hope that makes sense.

    alittlepieceoftheworld.com - I am still working the template out so there isn't really much there yet but this is the next step in changing the template that I am trying to make.

  4. moshu
    Member
    Posted 7 years ago #

    Is there a way for me to change the what links to the permalink (single) page to refer to the Page.php page instead?
    No. Those are two different templates - don't mix them!

    On the first, main page view comments are not shown
    Because that's the index.php. It never displays the comments.

    It seems WP works just like that. The popup-comment link works only from the index, and the single.php will always display the comments and the form.
    If you remove the call for the comments template from single.php
    (<?php comments_template(); ?>)
    it will not let you to comment from that view. Hmmm... never thought about it, I've never used the popup (I find it annoying...)

  5. faustina
    Member
    Posted 7 years ago #

    I actually was going to try to do normal comments (that come up in their own window) but th few other templates I have looked at to try and find code have also had "pop-ups". Is that an easy thing to change? If you could tell me where to get code for regular comments and how to put that in I would greatly appreciate it. That would also accomplish what I would like to do.

  6. moshu
    Member
    Posted 7 years ago #

    The issue of "to popup or not to popup" :) is done in the header.php of a theme. Find this line:
    <?php comments_popup_script(); // off by default ?>

    and make it
    <?php // comments_popup_script(); // off by default ?>
    (as it is by default in most themes)

  7. faustina
    Member
    Posted 7 years ago #

    wow, that's it? thanks a ton. I will try it out right now.

  8. faustina
    Member
    Posted 7 years ago #

    I don't have anything that refers to comments in my header.php I also have a comments-popup.php and comments.php but can't find the line of code you gave me there either.

    Somehow I knew that it would be difficult for me lol

  9. moshu
    Member
    Posted 7 years ago #

    Now I am confised.
    What is it exactly what you want?
    Popup or not popup?

    (visiting your site, the comments show up normally, not in popup)

  10. faustina
    Member
    Posted 7 years ago #

    Ok, I am also confused. I probably said the wrong thing, and I apologize for that. You are probably frusterated with me lol.

    I initally wanted comments how they are right now - not pop up (which I thought was pop up for some strange reason). What I want accomplished in the end is possibly one of two things:

    1. Have there not be the comments and comment form shown on my permalink page (only a comment link)

    or

    2. Somehow change my prev/next buttons on the perma (single) page to show the set-up of the page.php where again comments are not shown (there would be a link to comments but them not shown on page with the form without clicking to see them). I have prev/next buttons on both the index.php and single.php - The ones on index.php do what I want them to but do not work on the single.php because of the way the page is set up with permalinks etc.

    I know this sounds confusing, but if there is a way to do this I would really like for one of these things to happen. The reason I thought about trying to change the perma page is really so that a viewer visiting through a permalink page, or a visitor who has already viewed a page and made a comment can scroll through the rest of the pages without seeing the comments and comment form already there.

    If it would be easy to have what I now know as "pop-up" comments (which I would rather not do but have thought about it as a solution) how would I do that? Or is this all stupid and I should leave it how it is?

    I'm sorry for the confustion, I appreciate all your help.

  11. moshu
    Member
    Posted 7 years ago #

    1. Have there not be the comments and comment form shown on my permalink page (only a comment link)
    That will not work. At least not without modifying core files, I guess... but I am not a coder. Comments are meant to show up on the single post view [let's use the proper term!]

    2. Somehow change my prev/next buttons on the perma (single) page to show the set-up of the page.php where again comments are not shown
    I am saying again: do NOT think about the Page template (page.php) when dealing with posts. Counterproductive and confusing...
    Actually, your description of the Pages' behaviour is not accurate. Pages either have comments and are displayed at once or don't have comments at all: depends on the code of the Page template.

    So, no. There is no solution for what you want (and, to be honest, the reasoning for it doesn't really make sense for me...)

  12. faustina
    Member
    Posted 7 years ago #

    Ok. Thank you. I will stop thinking about doing this then. I appreciate your patience with me.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags