seattledsa / dsa_wordpress Goto Github PK
View Code? Open in Web Editor NEWSeattle DSA Wordpress Theme
Home Page: https://seattledsa.org
Seattle DSA Wordpress Theme
Home Page: https://seattledsa.org
I've been working on the Austin fork of the theme here: https://github.com/jcklpe/nonprofit-wordpress
Been making a lot of changes in how stuff is organized according to my taste and some goals that I have going forward with what I'm planning on adding to the theme. (largely based on plans to further leverage gutenberg editor to do away with the need for page templates as much as possible).
I had a quick question.
I'm looking at how some of the custom fields are set up. I learned how to use WP in the context of ACF. So I've never actually learned the "native wordpress" way to set up custom fields.
I think I get the gist but I just want to check in.
Below is the relevant code I think and I've added my comments as **//-**
/* Adds a box to the main column on the Post and Page edit screens */
**//- So basically you write a function to that adds metaboxes to posts. You set the conditions based on templates.**
**//- I don't get where the metabox _8 and metabox_11 comes up. What's that refer to? Are those just custom names? Why those specific numbers?**
function myplugin_add_custom_box() {
global $post;
if ( 'template-homepage-2017.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ) {
add_meta_box( 'wp_editor_test_8_box', 'DSA Feature Box', 'wp_editor_meta_box_8' );
add_meta_box( 'wp_editor_test_4_box', 'Final Row', 'wp_editor_meta_box_4' );
add_meta_box( 'wp_editor_test_11_box', 'DSA Alert Box', 'wp_editor_meta_box_11' );
}
elseif ( 'template-homepage-2019.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ) {
add_meta_box( 'wp_editor_test_8_box', 'DSA Feature Box', 'wp_editor_meta_box_8' );
add_meta_box( 'wp_editor_test_4_box', 'Final Row', 'wp_editor_meta_box_4' );
add_meta_box( 'wp_editor_test_11_box', 'DSA Alert Box', 'wp_editor_meta_box_11' );
}
}
**//- What's this stuff do? I can't even get an idea just from looking at it.**
/* Prints the box content */
function wp_editor_meta_box_4( $post ) {
// Use nonce for verification
wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );
$field_value = get_post_meta( $post->ID, '_dsa_column_right', false );
wp_editor( $field_value[0], '_dsa_column_right' );
}
and
//- Okay so for this it's basically saying "if there's crap in this post id's metabox metadata then post it here, right?
if ( isset ( $_POST['_dsa_column_right'] ) ) {
update_post_meta( $post_id, '_dsa_column_right', $_POST['_dsa_column_right'] );
}
Looks like you have some kind of integration between grav and wordpress? Would love to pick your brain about how this works. I'm working with some folks to set up a site for Cincinnati DSA Chapter.
I'm @crowesn on twitter if you're free and inclined.
Hey @davidagnome
So I looked through the changes you made to the theme since I originally forked it and they were really too extensive for me to keep messing with so I decided to just refork the theme and copy over my changes to it manually.
I'm still in the process of doing that, but redoing stuff like this has also allowed me to think more intentionally where I differ in structure and organization from your branch.
I plan on using this theme for more than just DSA stuff, which is one reason why I am more aggressively componentizing things via SCSS. I'm also breaking out template parts differently.
Already (due to me using scss and having a different build structure) our themes have diverged again beyond the point of easy merging between our forks.
That's totally fine! But I wanted to check in with you if there might be some way for us to keep things synced anyway. I say this not only because I might want my version to be able to merge future changes you make, but also visa versa because I think you might possibly want to merge some changes I will be making in the future. I've got 3 weeks of vacation right now before I start my next job and I am planning on really dedicating the works to my branch to get it shipshape.
It's also perfectly fine if you don't like the way I'm doing things and want to maintain your own branch here. In that case I'll just break my branch off from yours and we'll treat these as essentially two separate themes.
Just to let you know also, I've recently been in contact with the National Tech Committee about Auth0 access which our chapter is in the process of trying to integrate. The plan is going to be that National Auth0 will be extended out for use to local chapters.
Part of that process has been me getting more involved with the National Techcomm's gitlab. I plan on posting a version of my theme to that gitlab org once I can, which seems to me to be all the more reason for us to cooperate.
Again, my experience working with other devs is limited so if I'm not approaching this right let me know.
Hey, I'm helping the Austin branch redo their website and wanted to check in and see if I was missing any plugins to make it work.
Hey there I'm getting an alert in the footer 'Please activate Widgets > Sidebar - Pages Right." and any widgets I add in the appearance section aren't working. Is this something you can help with. Here is our site: https://www.tampadsa.org/
Please lmk if you have any ideas.
I see the tribe-events folder in the root of the theme and it is used by the tribe-events plugin.
Does it have to be in root or is there anyway for me to place it elsewhere?
Also any specific reasons for using tribe events? I'm looking at expanding my use of my fork out to more than just DSA and not all non-profits I'll be helping will necessarily want to use a pro calendar plugin (and not all DSA chapters will either) so I'm scoping out alternatives that can be supported that are completely FOSS.
Hello,
I am somewhat familiar with PHP and am looking to make adjustments to the home page template to utilize Modern Events Calendar instead of The Events Calendar as our events plugin since MEC provides features we are seeking to use for free that TEC requires a paid plan for. I can see that the parts/content-events.php is hardcoded to pull in events from The Events Calendar. I believe it would be possible for me to figure this out on my own, but was curious if there was a simple method to swapping the theme to using MEC as the events widget of choice instead?
Thanks,
Matt
DS Salt Lake
Hey, I'm from the Los Angeles DSA chapter. We're forking your theme for our new site redesign. It's a gorgeous theme! I just had some issues getting things setup. The site was completely busted at first, until I realized that The Events Calendar has to be installed for the theme to work.
Would it be possible to include this information in the README for anyone who wants to fork this theme in the future? Also, if there are any other required dependencies/plugins, listing those would be fantastic!
Thanks ๐น
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.