Skip to content

Commit

Permalink
issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgimenez committed Mar 12, 2015
1 parent 50121f5 commit 6fe1dfe
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Global
._*
.AppleDouble
.DS_Store
.localized
.LSOverride
.Spotlight-V100
.Trashes
Icon
Desktop.ini
ehthumbs.db
Thumbs.db
*~
TAGS
tags
.*.sw[a-z]
.netrwhist
*.un~
Session.vim
*.sublime-project
*.sublime-workspace
*.sublime-projectcompletions
*.tmproj
*.tmproject
tmtags
nbproject/*

# Project
src/.sass-cache/*
src/node_modules/*
src/.ftppass
src/tmp/*
assets/js/main.min.js
odin.zip
sftp-config.json
3 changes: 2 additions & 1 deletion archive-agenda.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

<!-- Loop do CPT Agenda -->
<?php
echo 'MAAAAAAAAAAAAAAOIE';
$temp = $wp_query; $wp_query = null; $wp_query = new WP_Query();
$wp_query->query('post_type=agenda' . '&paged=' . $paged . '&posts_per_page=8&order=DESC');
$wp_query->query('post_type=agenda' . '&paged=' . $paged . '&posts_per_page=8&orderby=meta_value&order=ASC&meta_key=ag_data');
while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

<?php $my_meta = get_post_meta($post->ID,'_my_meta',TRUE); ?>
Expand Down
4 changes: 3 additions & 1 deletion custom-agenda.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ function my_meta_save($post_id)
{
add_post_meta($post_id,'_my_meta',$new_data,TRUE);
}

if(!empty($_POST['_my_meta']['ag_data'])){
update_post_meta($post_id,'ag_data',$_POST['_my_meta']['ag_data']);
}
return $post_id;
}

Expand Down
2 changes: 0 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,4 @@ function custom_login() {
echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('url').'/wp-content/themes/circovox-theme-v2/custom-login/custom-login.css" />';
}
add_action('login_head', 'custom_login');


?>

3 comments on commit 6fe1dfe

@everaldomatias
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diegorojas você pode mandar isso para produção e validar?

@diegorojas
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eu tentei subir mas não tenho os dados atualizados, pedi para eles. Sobre validar, eu nem sei do que se trata e como foi resolvido :(, mas vou subir e se der pau reporto.

@matheusgimenez
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Galera, tem um probleminha que vai dar sim:

Como criei um novo campo (apesar de ele copiar o antigo quando salva) os posts não vao aparecer na agenda, vai ter que salvar um por um (creio que não seja tanto trabalho.. só tem que ver os proximos eventos e salvar, não tem mt pq salvar os antigos).

Please sign in to comment.