I would like advice on the best way to structure a sponsors

Hi I would like advice on the best way to structure a sponsors page using custom posts.
please see the current design at http://goo.gl/VLq2oY

The design will stay the same but how to manage it will change. I will create a custom post for the sponsors. The featured image will be used as a post preview on the sponsors page.

As you can see there are 4 sections of sponsorship, my question is what would be the best way to
- create the sponsor sections, i.e. "Major Sponsors", "Gold Sponsors" etc..
- ensure the sponsor sections can be updated, added or deleted by a user (headings for example "Gold Sponsors")
- have the sponsor section headings on top of each sponsors sections, i.e. "Major Sponsors" above the major sponsors logos

What are your thoughts

  • Michael Bissett
    • Recruit

    Hey @VivaArturo, hope you're doing well today! :slight_smile:

    For this, it looks like you could use the Post Grid element inside of Visual Composer to handle that (not sure if it handles custom post types though, though you could try writing a custom query if it doesn't do that out of the box).

    That would allow you to have for different sections of posts, instead of having to use a load of Raw HTML elements on the page. You could then use a Text Block element above each Post Grid to provide the headings for each section.

    How does that sound? :slight_smile:

    Kind Regards,

  • VivaArturo
    • The Incredible Code Injector

    Hi Michael, great idea and thanks for the help.

    I was thinking of not even using visual composer.
    I was thinking of creating a custom post type for the sponsors and wanted to see if I can add a category as a heading (major sponsors) and then work out how to prioritize the categories as "gold sponsors", "silver sponsors" etc...

  • Jude
    • DEV MAN

    Ouch !! @VivaArturo

    Im sorry about closing this one, I was closing out a bunch of old threads that clogged up the system and prevented us from providing effective support. I somehow missed that this needed further consideration.

    I'd like to add to the solution by @Michael Bissett

    Here is what I think would be the best way to do this.

    1) Create the sponsors as posts, just select post-type as image when creating them and add the logo into the page. Add a custom field for sponsor link which you can query as part of The Loop
    2) Assign each post to the respective category. You'll need to create categories here for Gold, Silver etc ..
    3) Have each user assign the sponsor correctly. This can be done with no extra overhead on the users part

    4) Finally create/modify the page template to use The Loop for each category and filter using Post Type = Image. The code will look something like this

    // Get the sponsors in the Gold Category
    <?php query_posts("'category_name=gold&posts_per_page=10&post_type=image" ); ?>
    <?php while ( have_posts() ) : the_post(); ?>
    	<div class="logoSponsor">
    <a href= <?php $sponsor_link ?>
    onclick="_gaq.push(['_trackEvent', 'outbound-article', <?php $sponsor_link ?>, '']);" target="_blank">
    <img src= " <?php the_post_thumbnail( $size, $attr ) ?>  " alt="" border="0" data-lazy-loaded="true" style="display: inline;">
    <img src=" <?php the_post_thumbnail( $size, $attr ) ?>" alt="" border="0" />
    <?php endwhile; ?>

    This is just code I modified from your site, its not tested. But you can use this as a template and build on top of it. Here is a nice read on tweaking The Loop to suit your needs including metadata


    Hope that helps, Get back for anything specific.

    I'll leave this one open till you feel its good to go and mark it as resolved yourself.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.