How Can I help, I'm a PHP(WordPress) Developer?


#1

I just discovered Atom last night, and I think it’s really awesome. Now that it’s completely open sourced, I would live to help out on it. I am primarily a PHP & Frontend developer. What can I do to help?


#2

The best way to help is to make sure the PHP grammar lives up to your needs. We would love to see more PHP packages on atom.io!


#3

@ProbablyCorey that link you sent isn’t working :slight_smile: Maybe i’ll work on making the WordPress package a little more complete like the SL2 one .


#4

I think @ProbablyCorey was referring to this package: https://github.com/atom/language-php


#5

Yes, the URL he used was github.com/atom/language-php, it only does not work because of the missing https:// prefix. (Happens all the time).


#6

I’m not sure of i’m on the right location, but i’m working on a Wordpress website and I’m trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a dropdown. I searched for a plugin, but couldn’t found that. Now u found the code below:

<?php
  $order = "&order=DESC";
  if ($_POST['select'] == 'tag') { $order = "&tag=mytag";  }
  if ($_POST['select'] == 'title') { $order = "&order=ASC&orderby=title";  }
  if ($_POST['select'] == 'newest') { $order = "&order=DESC"; }
  if ($_POST['select'] == 'oldest') { $order = "&order=ASC";  }
  if ($_POST['select'] == 'mcommented') { $order = "&order=DESC&orderby=comment_count";  }
  if ($_POST['select'] == 'lcommented') { $order = "&order=ASC&orderby=comment_count";  }
  if ($_POST['select'] == 'prijs') { $order = "&order=ASC&orderby=meta_value_num";  }
?>

<form method="post" id="order">
  Sort reviews by:
  <select name="select" onchange='this.form.submit()'>
    <option value="tag"<?php selected( $_POST['select'],'tag', 1 ); ?>>Tag</option>
    <option value="title"<?php selected( $_POST['select'],'title', 1 ); ?>>Title</option>
    <option value="newest"<?php selected( $_POST['select'],'newest', 1 ); ?>>Newest</option>
    <option value="oldest"<?php selected( $_POST['select'], 'oldest', 1 ); ?>>Oldest</option>
    <option value="mcommented"<?php selected( $_POST['select'],'mcommented', 1 ); ?>>Most commented</option>
    <option value="lcommented"<?php selected( $_POST['select'],'lcommented' , 1 ); ?>>least commented</option>
    <option value="prijs"<?php selected( $_POST['select'],'prijs' , 1 ); ?>>prijs</option>
  </select>
</form>
<?php query_posts($query_string . $order); ?>

But the last selection option ‘prijs’ is not working.

My whole code is looking like:

<?php
/**
 * The template for displaying Category pages
 *
 * Used to display archive-type pages for posts in a category.
 *
 * @link http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */

get_header(); ?>

	<section id="primary" class="site-content">
		<div id="content" role="main">

		<?php if ( have_posts() ) : ?>
			<header class="archive-header">
				<h1 class="archive-title"><?php 

	$no_responses = __("<!--:en-->Products » <!--:--><!--:nl-->Producten »<!--:-->");

	$one_response = __("<!--:en-->Products » <!--:--><!--:nl-->Producten »<!--:-->");

	$responses = __("<!--:en-->Products » <!--:--><!--:nl-->Producten »<!--:-->");

	comments_number($no_responses, $one_response, '% $responses' );

?><?php printf( __( ' %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1>
                

			<?php if ( category_description() ) : // Show an optional category description ?>
				<div class="archive-meta"><?php echo category_description(); ?></div>
			<?php endif; ?>
			</header><!-- .archive-header -->

<div class="zoekeninproducten"><?php 

	$no_responses = __("<!--:en-->Search in Products<!--:--><!--:nl-->Zoeken in producten<!--:-->");

	$one_response = __("<!--:en-->Search in Products<!--:--><!--:nl-->Zoeken in producten<!--:-->");

	$responses = __("<!--:en-->Search in Products<!--:--><!--:nl-->Zoeken in producten<!--:-->");

	comments_number($no_responses, $one_response, '% $responses' );

?></div><?php get_search_form( ); ?>


			<div class="blijven"><?php
			/* Start the Loop */
			
			while ( have_posts() ) : the_post();

				/* Include the post format-specific template for the content. If you want to
				 * this in a child theme then include a file called called content-___.php
				 * (where ___ is the post format) and that will be used instead.
				 */
				get_template_part( 'content', get_post_format() );
				get_template_part( 'price' );
				
			endwhile;

			twentytwelve_content_nav( 'nav-below' );
			?></div>

		<?php else : ?>
			<?php get_template_part( 'content', 'none' ); ?>
		<?php endif; ?>

		</div><!-- #content -->
	</section><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Can you help me? Or do you know somebody who can?


#7

This forum is for the Atom editor. For Wordpress support you should see the Wordpress Support page.