WordPress.org

Ready to get started?Download WordPress

Forums

CommentPress Core
[resolved] Re-skinning or Re-templating (13 posts)

  1. doclalor
    Member
    Posted 1 year ago #

    I love the CommentPress-core plugin; but I still want dynamic, widgetized pages on the site which do NOT feature the CONTENTS/COMMENTS/ACTIVITY column. Is there a way to do either of the following?:

    • introduce another template which could be selected from the authoring interface;
    • insert the CommentPress code on a template compatible with my chosen theme

    ?

    Tips & guidance welcome!
    ~Brendan

    http://wordpress.org/extend/plugins/commentpress-core/

  2. Commentpress
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Brendan,

    I don't know what your theming skills are like, but you could create a child theme and amend it whichever way you want... There's a "starter child theme" on GitHub you could use as the basis for your custom theme.

    Also, just about everything in the plugin and theme can be overridden via filters and actions, so if you want to override the content of the sidebar on a particular page, you can do it that way too.

    Cheers,

    Christian

  3. doclalor
    Member
    Posted 1 year ago #

    I'll have another stab at it within a couple weeks. I haven't worked much with enqueued styles, but have reason to hope I will be able to - enough to find out how to set up a template with a substitute sidebar. (Anywhere in particular I should start?)

    A larger goal of mine is to get more dynamic content into the comments - for instance, video and even quizzes. Last try, I did get video in comments to work, but I could not make WP-Pro-Quiz quizzes clickable (maybe due to a javascript or layer issue?).

    Thanks for any further pointers before I dive in!

  4. Commentpress
    Member
    Plugin Author

    Posted 1 year ago #

    If you download the child theme on GitHub, it does that for you. Have a look at the functions.php file to see how it's done. Amend to suit your needs.

    As for replacing the sidebar on a specific page or pages, you can copy sidebar.php from the default theme into your child theme and add your conditional logic at the top of the file. Along the lines of:

    global $post;
    
    // for some post ID
    if ( $post->ID == 'some post id' ) {
    
    	// include your custom sidebar - point to wherever you put it
    	include( get_stylesheet_directory() . '/assets/templates/your_custom_sidebar.php' );
    
    	// kick out of the rest of the file
    	return;
    
    }

    Hope that helps,

    Christian

  5. Commentpress
    Member
    Plugin Author

    Posted 1 year ago #

    BTW, you may need to include some of the sidebar markup structure, or else the javascript could throw errors.

    I'll think about ways of making this easier in the future.

    Cheers,

    Christian

  6. doclalor
    Member
    Posted 1 year ago #

    Thanks so much for this response. I've worked with the child theme, and thrown css switches with some success. But I am not sure my theming and scripting skills are up to the task of integrating "everything else on my site" around the CommentPress machinery.

    For me, the ideal CommentPress would function inside My-Chosen-Theme - working its magic inside the div#content element using a single-column template. Perhaps CommentPress would be invoked for every page/post/doc with a certain category or tag.

    I'll report back any surprise successes, though. Thanks much again!

  7. Commentpress
    Member
    Plugin Author

    Posted 1 year ago #

    @doclalor: this was initially how CommentPress worked - or tried to work. It used to create a Javascript-generated comment box from the markup of the "host" theme. Unfortunately, it became unviable because of the variety of markup in different themes. And because the JS-only approach made it impossible to comply with accessibility guidelines. I think Digress.it (which forked from CommentPress way back when) still works this way, though I'm not sure how actively maintained it is.

    I can understand that you'd like a "CommentPress-ified" section to your site, but the only solution I can think of right now would be to use Multisite, where your theme is applied to the main site and CommentPress is enabled on a subsite where you want its functionality. You could then use the Theme Customizer to give CommentPress a similar colour scheme and graphic identity to your main site.

    Cheers,

    Christian

  8. doclalor
    Member
    Posted 1 year ago #

    Christian, that is a great suggestion and what I'll likely end up doing. Thanks much!

  9. centroamericatv
    Member
    Posted 1 year ago #

    Hi CommentPress

    Congratulations for this cool project.

    I am working on a site in spanish, and
    have two, actually three questions:

    The site is at http://ideas.centroamerica.tv

    (1) Youtube videos show up, but do not play. Have You heard of such trouble ? Is there any suggestion, as where to start looking for a solution?

    (2) TAGS: It would be great to tag pages and comments alike. In case there is a solution ready, which works with CommentPress, I would appreciate a hint.

    (3) Spanish language: I looked for a translation file, but without luck. Please give me a hint if there is any spanish project. In any case, it will be a pleasure, but very slow, to contribute some translations were needed.

    Congratulations and meny thanks again.

    Best regards out of sunny Costa Rica :-)

    Roland

  10. Commentpress
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Roland,

    (1) your YouTube videos work just fine here. Perhaps there's something about your computer that prevents them from playing?

    (2) Sorry, but I've no idea. If you do come across a plugin that does these things, I can make sure CommentPress is compatible with it.

    (3) You can find the base translation file in the plugin directory languages/commentpress-core.pot. Unfortunately, there is no Spanish translation file - but any contribution towards one would be gratefully received.

    Best wishes from snowy England!

  11. jabcka
    Member
    Posted 1 year ago #

    Hi
    Is there a way to use this plugin only in certain pages and keep my theme?
    Thanks
    Rani

  12. Commentpress
    Member
    Plugin Author

    Posted 1 year ago #

    Hi jabcka,

    No, that's not possible at present. A previous solution has been to use multisite and install CommentPress on a sub-blog. You may be able to cunningly switch theme for a particular post, but I can't say how that would pan out.

    Cheers,

    Christian

  13. jabcka
    Member
    Posted 1 year ago #

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic