Where are templates in “Page Attributes” located?

If I go to "Edit" on one of my pages and click "Page Attributes" on the settings I have two options "Default template" and "Blank Page". I want to create another template so I can have a different header/footer for a particular page but how would I make one such that it will appear in the Page Attributes option?

submitted by /u/SadVacation5
[link] [comments]
WordPress

Help with bbPress

Hi,

I am trying to add a forum section to a website that has a blog, user comments, Ultimate member login system. I plan to use bbPress, but it has a seperate login system and I have to buy an expensive extension for integration with Ultimate member. I want to have one login system for the whole website. Can I use bbPress login system for the whole website? Maybe there's another forum plugin that integrates with Ultimate member? Or maybe there's another login system I can use with bbpress(the wordpress built-in one?)?

Thanks in advance!

submitted by /u/krokotak47
[link] [comments]
WordPress

Looping through comma delimited values returned from wpdb SELECT statement

I have created a custom template in my theme to pull a list of account IDs from a custom table. The SELECT statement is as follows:

global $  wpdb; $  accounts = $  wpdb->get_results("SELECT ID FROM wp_2_local_calendar_acct;"); print_r($  accounts); 

this query returns this result:

Array ( [0] => stdClass Object ( [ID] => 3697,2558,2559,55467 ) )

Now that I have the list of IDs in a delimited format, I need to loop through them and execute a shortcode with each ID. I am trying to use 'foreach' but I can't figure out how to break the delimited list into these unique values:

3697

2558

2559

55467

How do I do this in PHP?

submitted by /u/just_southern
[link] [comments]
WordPress

Regex matching route params in the Rest Api, is this how its done?

The callback function 'deleteSingleCoupon' takes one argument and I'm curious if my code below will match the route param 'couponId' to this argument automatically? I expect it to be an int.

function registerdeleteSingleCoupon() { register_rest_route('/wp/v2/delayedCoupons', 'deleteCoupon/(?P<couponId>\d+)', [ 'methods' => 'get', 'callback' => 'deleteSingleCoupon' ]); } 

submitted by /u/php_developr
[link] [comments]
WordPress

Looking for free/cheap work around for this MC4WP feature

I am developing a website for a local politician. I want users to be able to do 2 things:

  1. Subscribe to a mailing list
    – This is currently being achieved via MailChimp 4 WordPress, a user enters their email address and they are added to the audience on the free MailChimp account.

  2. Subscribe as a potential volunteer for events
    – This would work the same way as the mailing list, anyone who subscribes to this would be added to the mailing list but also have the tag "Volunteer". The MailChimp subscribers are filterable to view just those who are willing to volunteer.

The issue i'm having is a situation where a user is already subscribed to the mailing list, and decides after that they want to subscribe as a potential volunteer. This throws the user an error when subscribing as a volunteer saying "this email address is already subscribed". I'm not concerned about the error message because I know how to modify this, but the issue is it does not update the user in the audience to have the "Volunteer" tag. So essentially if a user is already on the mailing list, and later wants to become a potential volunteer, they get an error and are unable to do so with the same email address.

Any suggestions or ideas would be greatly appreciated!
Thanks.

submitted by /u/aylward709
[link] [comments]
WordPress