Skip to:
Content
Pages
Categories
Search
Top
Bottom

Please help….please!


  • lookingahead
    Participant

    @lookingahead

    Hello.

    I’m not a developer; I can get by only with copying and pasting code. My skills are limited.

    That being said, I’m relatively keen on learning how to become better. So I’ve been reading through lots of articles here….but….not always getting things “right”….please know that I’ve sincerely looked everywhere for this answer, and it still eludes me.

    Here’s my current issue.

    I need to display an image above the listing of all the groups in the Group Directory Page.

    So it will ‘mimic’ the cover photo in the groups, as far as size goes. It will not be the same exact cover photo, but I mention this to give you an idea of the finished product I’m going for. I want a photo to be placed above the list of all the groups on the ‘Group Directory Page’…..to act like a cover photo does inside the groups themselves.

    How can I best achieve this??? Javascript….? CSS?? HTML??? PHP???? 🙂

    Please note: I am using the header in my template as a vertical menu. So using a header function on the BP Groups Directory Listing to insert an image above the listing of all groups isn’t going to work. I’m using the Total theme, layout 6. Latest version. With WordPress 4.9.8. The Woocommerce shop is part of this website (also the latest version)….and BuddyPress groups is being used as an area to chat with customers about customized products sold on the site.

    I thought there might be a way to insert a “widget” or “shortcode” on the BP Groups Directory Listing page, but it seems BP has a firm hold on the layout of that page. 🙁

    Any and all suggestions would be appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)

  • lookingahead
    Participant

    @lookingahead

    @prashantvatsh forgive me please for tagging you in this comment; you seem to have the best plugin suggestions on the site, though….so, if you would be so kind….do you happen to know of a plugin that I can use to achieve this…? Or would it be best done with code??


    Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    Please paste the following code in your child theme’s functions.php file:

    add_action( 'bp_before_directory_groups_list' ,'ps_add_image_before_groups');
    function ps_add_image_before_groups(){
    	echo "<img src='your_image_url_here'>";
    }

    If you do not have child theme just add this plugin https://wordpress.org/plugins/code-snippets/ and add a new snippet and paste this code there.

    Please remember to change ‘your_image_url_here’ with your image source URL.

    Thanks


    lookingahead
    Participant

    @lookingahead

    thank you SO much @prashantvatsh — that worked!! the only thing i had to do after was to hide the things that were appearing above the picture/groups list now since the workaround you posted above. so, to the ‘additional CSS’ section in the wordpress customizer, i added:

    div#subnav-filters.subnav-filters.filters.no-ajax{
    display:none !important; 
    }
    
    div.pag-count.top{
    display:none !important; 
    }

    i realized that the image was not floating “above” the list of all groups….it was now part of the container (or whatever you call it) of the groups. and i wasn’t going to use those sections i just hid via CSS (above) anyway…thank goodness someone else had told me how to hide something else previously via CSS or i’d never have been able to hide that stuff i just hid, either! 😀

    thanks again for all your help. this works good enough for me. <3 you’re fantastic!!


    Prashant Singh
    Participant

    @prashantvatsh

    Pleasure is all mine 🙂

    Thanks for all the praises.


    lookingahead
    Participant

    @lookingahead

    @prashantvatsh you are very welcome! you always have the best advice.

    so here’s a strange thing that is happening now since i added that code….

    the groups list loads first, then the image loads after. so there is an ‘accordion’ look to how it loads….the groups list comes first, then the screen hops as it expands and inserts the image. is there any way to make the image load first, every time….before the group directory ‘groups list’ loads…?

    it’s also loading slowly…not sure if that is my site/server or if it’s this page itself.

    any advice?

    thank you once again for all your help!! <3


    Prashant Singh
    Participant

    @prashantvatsh

    Please check the page speed, might be the image is not optimized well or any server speed issue.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar