Home > widgets > Displaying info in a sidebar

Displaying info in a sidebar

March 10Hits:0
Advertisement

Hi I run a site gaming review site www.co-opreviews.com. I'm trying to display info about the games in a sidebar on the right hand side of the page.

(You can view a mockup of the sidebar here: Displaying info in a sidebar

)

I'm currently doing this through multiple sidebars (which my theme allows) and using a plaintext widget displaying the info through some rough HTML. However for 50+ games I'd require 50+ different sidebars and I'd have to replace the date, rating etc. all manually-- a cubersome and also fairly crude solution.

I believe there is a way to make inserting the information easier with custom post types but all my current reviews are simply normal posts.

Any help with my problem would be appreciated!

Answers

You don't need CPT's to display custom information. You could use custom fields (you may need to enable them in the screen options at the top of the post edit window). You'd just need to include the custom fields in your loop but position them so they appear over the sidebar. Their information would be related to the post their on and you wouldn't need to create a new sidebar for each post.

The same thing could be achieved with custom meta boxes. I've heard good reviews on the plugin below but haven't used it myself. http://wordpress.org/extend/plugins/verve-meta-boxes/

Adding to what you have mentioned below it is possible to add a description to a tag so you could just format all of the extra information in the description field and use get_the_tags to call the information you want. Then you'd just have to add the tag you wanted to the post.

Taking it a step further you're probably better off registering a new taxonomy (Game) setting it up so it works like a tag and calling the description of that. Then you won't be cluttering up your normal post_tags with the game names and it will be easier to call the description on only that taxonomy instead of all tags (and trying to exclude the ones you don't want). This would also let you use the new taxonomy in other spots in the site and thus relate multiple types of content (if you ever decided to add a new content type).

Tags:widgets

Related Articles

  • Displaying info in a sidebar

    Displaying info in a sidebarMarch 10

    Hi I run a site gaming review site www.co-opreviews.com. I'm trying to display info about the games in a sidebar on the right hand side of the page. (You can view a mockup of the sidebar here: ) I'm currently doing this through multiple sidebars (whi

  • Display child pages in sidebar of parent page in wordpressJuly 14

    How to get displayed child pages on parent page and also on child page of that parent in sidebar?Trying to paste code from wp codex page and from several other sites, but with no success.I always get instead of list of child pages, list of parent pag

  • Display Custom Taxonomy in Sidebar in Two Columns

    Display Custom Taxonomy in Sidebar in Two ColumnsAugust 9

    I have a custom post type (photos) with a custom taxonomy (categories) and I'd like to display the taxonomy list in my sidebar in two columns. I have a modified snippet that I found elsewhere to do this, but it doesn't generate the current class for

  • Display a specific dynamic sidebar widgets on a specific pageSeptember 16

    I have had a wordpress site handed off to me halfway through completion. It's been at least a year since I last used wordpress and there are a lot of things I'm finding different. The way I am used to displaying different content on different pages i

  • Displaying a widget in sidebar only when no other widgets rendered?January 28

    I am working on a custom theme, basically migrating a current sites look and feel into WordPress. Most of everything is based on Pages, and all of these pages should have a left sidebar. Of those pages, they are one of the 3 below: Page is part of a

  • Displaying fields in a sidebar of a custom page templateMay 5

    I'm beginning with PHP programming and would appreciate a critique on my code and how I could make it more efficient, rather than repeating the if statements. What I'm basically doing is getting the fields typed in by the user and displaying these fi

  • Display Comment Form in Sidebar

    Display Comment Form in SidebarMarch 27

    I'm relatively new to Drupal and I'm working on a page that needs comment functionality for non-authenticated users. I tried some various forms (Webform, EntityForm) but they just seemed like way too much. The comments module has exactly what I need

  • How can i display custom menu in sidebar?

    How can i display custom menu in sidebar?September 11

    I would like to display a custom menu in a custom sidebar instead of author information or blank space i.e custom menu with similar styles as default menu but only in vertical manner as displayed in grey in the below picture. --------------Solutions-

  • Display Custom Field in Sidebar if Value is PresentMarch 9

    I'm trying to use 'if' 'else' to display a link button if I have a value in the 'TourURL' custom field, and if not, nothing will display but can't seem to get the if code to work: <?php if(global $wp_query; $postid = $wp_query->post->ID; echo get

  • Display post shortcode content in the sidebar?April 4

    I need to display images and other content in the sidebar depending on a page. Pages are added dynamically and information that need to appear in the sidebar is different for each page. So I can't predict what will go where. So the idea was is to hav

  • Display category-specific comments in sidebarJuly 24

    I'm trying to display comments in the sidebar from only the current category. So far I've got this: <?php // Posts per page setting $ppp = 8; //get_option('posts_per_page'); // either use the WordPress global Posts per page setting or set a custom on

  • How to display a sidebar only for blog?April 27

    I have 2 sidebars(primary and secondary). I want the secondary sidebar to display only on the blog page and primary sidebar to display everywhere else except for the blog page. What have I tried: In functions.php : if (is_page('blog-35')) { get_sideb

  • How to display a visitor's posts in the main body of timeline rather than the left sidebar?

    How to display a visitor's posts in the main body of timeline rather than the left sidebar?September 21

    When a visitor posts a comment it is being displayed in the left sidebar rather than in the main body of the timeline. Is there something that can be changed to a allow it to show in the main body? Julian Eats Facebook Page --------------Solutions---

  • Dynamic Sidebars On Multiple SubpagesSeptember 30

    I am building a site in WordPress. It has multiple subpages, many of which require different sidebars. So, I have a widgetized theme and I have also created a few sidebar widgets. I have written a conditional statement to show different sidebars on d

  • Is there a list of the services compatible with New Twitter's sidebar?November 11

    Services like yfrog, YouTube, and gist.github.com can be displayed in the right sidebar of New Twitter, if a user includes a link to them in a tweet. Is there a place where I can see a list of the services that are supported by this sidebar extension

  • Sidebar "Wrapper" Plugin/Widget?December 4

    I'm coming from a Joomla background and I'm setting up a Wordpress installation for a friend's Shoutcast station. I would have done the setup in Joomla, as I'm more familiar with it, but I wanted to be able to hand administration of the WP install ov

  • Conditionally exclude post from specific category on home page sidebar?March 6

    I want to exclude posts from one category. These posts should not show in the sidebar on the homepage only when I explicitly don't want that particular posts to show. In all other cases these posts will be displayed. I have tried with plugin "WP Hide

  • How to generate and display widgets areas dynamically?June 21

    I want display different content in sidebar for every category, but as I create new ones I have to create the area for it. How can I have widget areas for every category and also display them on theme accordingly? --------------Solutions-------------

  • Displaying Taxonomy Terms which are used by a Content Type

    Displaying Taxonomy Terms which are used by a Content TypeOctober 13

    I have created a taxonomy named Category which has a number of terms like Agriculture, Business, Computers, etc. I have created three content types viz. Products, Suppliers and Buyers. All of these types use the terms from the Category taxonomy. What

  • check if registered sidebar is active & has widget contentOctober 17

    I'd like to check if a registered sidebar has widget content - but can't seem to find a WP function for this - is_active_widget checks if it has content, but not if it exists or not. function ql_widget( $widget, $widget_name, $element = 'sider' ){ if

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.398 s.