Skip to content

u/NORSE_

In this archive from Aug 2014 to Apr 2017

1
posts
63
comments
0
media
97
score

I'm guessing the people stating not to use it don't work in a multi-platform agency.

Twig is used in Symfony/Drupal 8 etc. So for our agency who use both and WordPress it makes complete sense to use Twig for all three.

As a front-end developer, imagine learning twig and being able to work on all 3 platforms... $$$$$$

Writing PHP and HTML in the same file? Yuck.

7 points

It helps to know what's going on under the hood but if you are just getting started I doubt you want to worry about that.

But if you SSH in to your box and check the nginx.conf file and see where it's redirecting your requests... And check the srv directory for your site (vvv may use a different directory)

I used to use salty, a vvv alternative but I've found that most off these vagrant projects just end up breaking.

So nowadays I use docker, its great but docker is a little difficult to understand at first.

So I'd suggest using wamp on Windows or mamp on OSX. Especially if you are new to development.

1 points

TBH

I started off building WordPress sites from themes, then built my own themes and then extended core functionality with my own wizardry and now i'm not that fond of WordPress although I would use it still.

Your goal shouldn't be "I want to learn WordPress" it should be "I want to learn PHP and understand when to use WordPress in my projects"

If you learn PHP you can use any PHP based CMS. If you learn the WordPress Codex, you'll only be able to use WordPress.

Front end (Javascript) is where the $$$ is and will be for a long time. If you are serious about a career in dev, i'd concentrate on Javascript and everything else that comes with it.

Building a Javascript app is a hell of a lot more fun than WordPress.

2 points

To back up what people are saying about ACF, here's one I made earlier :)

I made it for a story builder, hence the chapters.

// ACF - Page builder, just add as many layouts as you want.
if ( have_rows('chapter') ) :
	while ( have_rows('chapter') ) : the_row();
		$chapter_title = get_sub_field('chapter_title');
		echo '<h1>' . $chapter_title . '</h1>';
		if ( have_rows('content') ) :
			while ( have_rows('content') ) : the_row();
				if ( get_row_layout() == 'text' ) :
					echo '<p>' . the_sub_field('text') . '</p>';
				elseif ( get_row_layout() == 'image' ) :
					$img = get_sub_field('image');
					echo '<img src="' . $img . '"/>';
				elseif ( get_row_layout() == 'quote' ) :
					echo '<p>' . the_sub_field('quote') . '</p>';
				endif;
			endwhile;
			else :
				echo '<h3>Please add content to ' . $chapter_title . '.</h3>';
		endif;
	endwhile;
else :
	echo '<h2>Please add content to this post.</h2>';
endif;
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.