#1
Posted 15 November 2012 - 04:48 AM
1. Getting comments to "hide" then when the user clicks on the link it appears
2. Getting comments attached to posts on the front page.
For #1, I am using the WordPress ajax comments inline plugin. The instructions here say to put the below code into the loop. I have placed it at the end of comments.php, removing the last 2 divs at the end and replacing it with the below.
The issue I have now is that the plugin functions as it should, but I now have 2 comment boxes. One is the hidden one, and one is the visible WP comment box. I dont know how to disable one and keep the other.
For #2, this has been a real trick. I have looked at other forums that say to put
in the index.php file. Perhaps I just dont know where to put it in Pagelines. I have tried a few different places like comment.php to no avail. I tried to do a hook in function.php with the "pagelines_loop_after_post_content" hook, but to be honest, I am sure I flubbed it up. I dont understand hooks that well and the documentation is slim.
I am sure its an obvious fix but I just cant see it.
#2
Posted 15 November 2012 - 08:05 AM
That plugin hasn't been updated in over a year, I recommend you contact the developer for assistance to make sure its still supported and works with the latest version of Wordpress. Also, PageLines doesn't have the structure of a usual Wordpress theme. If you were were to implement this plugin, you would most likely need to use both hooks and filters.
We do not recommend editing the core files, as when an update is released, your code edits will be overwritten.
#3
Posted 15 November 2012 - 03:30 PM
I went ahead and installed the Base Child theme. I can find a new plugin to do the drop down comment, so lets forget about that part for a second. How about getting the comments to appear on the front page? What hooks/filters do I need to implement with the Child Theme to make this work?
#4
Posted 15 November 2012 - 03:57 PM
#5
Posted 15 November 2012 - 04:28 PM
I have tried this to no avail. Here was my process:
- Modify a template to contain the POST LOOP, COMMENTS, and PAGINATION.
- Create a PAGE with no content, assigned the newly created TEMPLATE, ensured that everything is ON that should be
- Assigned the Front Page to a Static Page
#6
Posted 20 November 2012 - 05:46 PM
#7
Posted 20 November 2012 - 06:12 PM
#8
Posted 20 November 2012 - 07:30 PM
When using the Front Page option, setting it to the page I created for a static page, it shows the template I chose in the status bar. Content and Post Loop are enabled in the template but do not show on the page.
When setting it as a posts page, it does not set to the template I specified in the PAGE setup. It defaults to the BLOG template. In the BLOG template in the Drag and Drop part of Pagelines, there is no option to drag and drop comments into the template.
I would be happy to PM you the login details to take a look. I am pretty sold on Pagelines and am using it in at least 5 sites. I am hoping I dont have to move away from it in order to get this to work.
#9
Posted 21 November 2012 - 04:04 AM
I've found the below links which might be able to help you somewhere, but I'm not sure how'd you'd implement them into the child theme using a hook. The list of Pagelines Hooks are here, if you know the php of what you're editing then you might be able to work the info below into the hook, but as we're not trained coders we wouldn't be able to advise on the process.
If no one else comes forward with a response you might need to speak to a Pl Pro who can script this in for you somewhere, if you need to you can check them out at www.pagelines.com/pros/
#10
Posted 21 November 2012 - 07:06 AM
#11
Posted 21 November 2012 - 03:22 PM
#12
Posted 21 November 2012 - 04:25 PM
The posts that James referred to require editing the post loop and/or the WordPress index.php file. It looks like the part of the loop that needs to be edited resides in the class.posts.php which is a part of the core files, not an editable section. Maybe I am wrong here. The section for the postloop does not allow me to edit parts of the loop, just functions around the calling of the loop as far as I can tell.
Which brings me back to some kind of hook. Is anyone on the forum experienced with hooks?
It looks like I should be doing something like:
But when I add code to the function.php, the whole site goes blank and only the header loads.
#13
Posted 21 November 2012 - 10:25 PM
You may want to consider using a FaceBook or Twitter integration for comments, either of which have tons of available plugins/widgets to display recent comment postings. Also, you'd get the added benefit of those comments being posted to your FB or Twitter account helping to drive more traffic to your site.
#14
Posted 23 November 2012 - 07:13 PM
Would upgrading my account to Developer or Plus help get this issue resolved? Would there be additional people who could help if I updated and submitted a ticket?
#15
Posted 23 November 2012 - 07:17 PM
#16
Posted 23 November 2012 - 08:36 PM
#17
Posted 24 November 2012 - 05:22 AM
The only way would be to hire a pl pro, or check Odesk to see if any developers post for private scripting jobs, or if you're interested in creating products/themes for the store look into joining the junto group
Again, I'm not a coder but looking at your code above it looks as if the php isn't closed off correctly, I don't think the last closing bracket } is required.
#18
Posted 25 November 2012 - 11:00 PM
#19
Posted 25 November 2012 - 11:56 PM
If so, we have to look to WordPress, which actually controls the comment form for the most part. It is incredibly uncommon for the comment form to be on the homepage as it's not considered attractive or useful there.
I did find this post on WordPress.org:
The method to implement that two year old code would be to use the Action Map plugin we provide to identify the location of where you want the form to appear. Presumably below each post listed.
Shortly, we'll have a fantastic new hooks plugin that allows you to drop the code into a form and it writes the code for you. But if you can't wait a few days, once you know the proper hook, you can craft it using the PageLines Customize plugin which has a functions.php that you should use for editing.
Properly placing it in the correct hook, should, in theory, make the code provided in that link work.
#20
Posted 26 November 2012 - 01:26 AM
You are correct, we are looking to get comments on the front page under each post. Using the WP default themes, it is very easy to do. In the image above, you can see it functioning how we want it to. It has a link to "Leave a reply" which then activates the AJAX commenting form. So it is hidden unless needed. And if there are existing comments, it says "View replies" and upon click, the commenting structure drops down. We are trying to get this same functionality with Pagelines.
We have tried to do this through hooks. But it seems that any change to the functions.php results in a crashed site. I am not a very accomplished coder, so I am a bit blind here but we identified "pagelines_loop_after_post_content" as the hook to use. We then tried to call the very function you referenced. This is in an earlier post. But to recap, we placed:
...in the functions.php of the child theme. This caused a crash. We then removed the last closing mark and still had a crash (crash meaning, the site went blank as well as the backend and we had to FTP in and revert the functions.php to bring it back). This code was our stab in the dark as I'm not a coder.
UPDATE: I tried the same thing with the Customize plugin. I went back the the pagelines parent theme. The Customize plugin is active. When I use the EDIT to change the code, the css file states it is (active) at the top of the screen but the functions.pho states (inactive). It looks like a better code option would be:
But how do I make the functions.php in the Customize plugin active. The other two files (pagelines-customize/style.css and pagelines-customize/pagelines-customize.php) report ACTIVE but the pagelines-customize/functions.php file reports INACTIVE.
Also tagged with one or more of these keywords: Resolved
Resolved
PageLines Framework →
Technical Support →
Anything Boxes And Polylang Language Filtering ProblemStarted by janpeeters , 01 Dec 2012 |
|
|
||
Header In Banner AlignmentStarted by bankrollbuilder , 28 Nov 2012 |
|
|
||
Resolved
PageLines Framework →
Customizations →
2 Hero UnitsStarted by starlit , 28 Nov 2012 |
|
|
||
Tabs Do Not Align HorizontallyStarted by hutruk , 28 Nov 2012 |
|
|
||
Resolved
PageLines Framework →
Customizations →
Reduce Margin In Contact FormStarted by texasx , 27 Nov 2012 |
|
|











