Skip to content

u/SmashedCrab

In this archive from Aug 2011 to Mar 2016

4
posts
29
comments
2
media
44
score

Essentially, the sidebar is just a widgetized area. Enabling you to add widgets, bam, to that area.

So basically, if you already have the sidebar there, you most probably already have the sidebar registered. So go into your WP Admin Panel, and go to Appearance > Widgets.

There you should see on the far right, either one or a few different "sidebars" or "widgetized areas" (these are usually named after where they are placed - footer, sidebar, header etc.).

So now, you should also see a bunch of widgets on the left of those, these are widgets you have installed (WP defaults, through plugins etc.). You can move any of these widgets, into that widgetized area, they will all have a few individual settings, change them and you're done.

So the plugin suggested above is a great one, Conditional Widgets ( http://wordpress.org/extend/plugins/conditional-widgets/ ) Once you have that installed it should automatically apply itself to any widget settings you now will see when you move a widget to a widgetized area.

You'll also find a complete Installation guide and some screenshots on that URL there. If this helped you, you can keep the gold too. And if you need any further help, don't hesitate to PM me.

1 points

Hey bud,

Sorry to bring up an old topic but I moved servers and now the posts aren't sorting. I've set everything up the same way, even redid the posts incase they got messed up during the import but everything seems normal. Here's my current code

//Get previous events
$events = query_posts(array('post_type' => 'events', 'meta_key' => 'event_date', 'orderby' => 'meta_value_num', 'order' => 'DESC', 'meta_query'=> array(
array(
  'key' => 'event_date',
  'compare' => '<',
  'value' => date("Y-m-d"),
  'type' => 'DATE',
)
))); 

and the date format is 'y-mm-dd'. Any help is greatly appreciated.

1 points

Gave that a shot but still didn't seem to sort it.

Here's what I've got so far.

//Get upcoming events
$events = query_posts(array('post_type' => 'events', 'orderby' => 'meta_value_num', 'order' => 'ASC', 'meta_query'=> array(
array(
  'key' => 'event_date',
  'compare' => '>',
  'value' => date("y-m-d"),
  'type' => 'DATE',
)
))); 

while ( have_posts() ) : the_post();
	echo '<li>';
	the_title();
	echo '</li>';
endwhile; 

Choosing April 13th 2011 on the date-picker returns a value of ' 11-4-13 '. I believe it's using the jquery date_format so not sure if that's making the difference, tried it with 'y-mm-dd' aswell which returns '11-04-13' but still not sorting :(

Any help is greatly appreciated. Ty

1 points

I've changed the format to Y-m-d for both yet still getting nothing. Any ideas? Cheers bud.

EDIT: The value on the event_date custom field after I choose a date, for example, 14th October 2011. Returns as Y-10-14 currently. With Y-m-d format.

EDIT EDIT: Changed it to y-m-d and the event names were returning on page yet it didn't seem they were being sorted based on the date_picker.

1 points

Hrmm, this is what I've got but nothing's returning. What am I doing wrong?

//Get upcoming events
$events = query_posts(array('post_type' => 'events', 'orderby' => 'event_date', 'order' => 'ASC', 'meta_query'=> array(
array(
  'key' => 'event_date',
  'compare' => '>',
  'value' => date("dd-mm-yyyy"),
  'type' => 'DATE',
)
))); 


if ( have_posts() ) while ( have_posts() ) : the_post();
the_title(); 
1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.