moochie
Forum Replies Created
-
Forum: Plugins
In reply to: [Airpress] Shortcode apr_loop_0..10 Not workingTry:
[apr_populate field=”FAQ” relatedTo=”Conditions FAQ”] [apr_loop field=”FAQ” glue=”<hr>”] <hr> {{Questions}} <br> {{Answers}} [/apr_loop]
Forum: Plugins
In reply to: [Airpress] A Problem With 404s on Virtual PostsAre any of the pages in the path private? I’ve been told private pages will work with Airpress but my experience is that they don’t. Even if the parent page is private, but they child page template is public.
- This reply was modified 4 years, 7 months ago by moochie.
Forum: Plugins
In reply to: [Airpress] Creating Virtual Posts via PHPI’m sorry I’m going to have to bump this again, I’m having issues having any private page or page that is a child to a private page populate in the virtual posts templates.
Forum: Plugins
In reply to: [Airpress] Restrict Page based on User (ID)@tobymurdock @patrickhilly I actually found a solution using PHP to achieve this.
function user_name($atts, $content) { global $current_user; get_currentuserinfo(); $username = current_user->user_login; $query = new AirpressQuery(); $query->setConfig(“YOUR CONNECTION NAME”); $query->table(“YOUR TABLE NAME”); $query->filterByFormula(‘{ID}=“‘ . username . ‘“‘; $user_info = new AirpressCollection($query); foreach($user_info as $e){ if($e[“User Subscription Level”] > 3){ echo $e[“Content”]; } else { echo ‘You do not have permission to view’; } }; } add shortcode(‘user_content’, ‘user_name’);
This example checks if the current logged in username in WordPress is equal to the ID inside Airtable, then it checks to see if the User Subscription Level is above 3 in Airtable for that particular user, then creates a shortcode ([user_content]) to be used. If all is true the shortcode shows the content in the “Content” column of Airtable if it’s not, it’ll show that you do not have permission.
Foreach is not necessary btw. I just used in my example.
I threw this together but that’s the idea and if @chetmac has a better solution or a problem with my example I’d love the feedback or more info
Forum: Plugins
In reply to: [Airpress] there is no collection.Without seeing exactly how you have it setup it’s hard to know exactly what’s going on.
If you’re using just the Airpress shortcodes inside your page and not drawing them in through PHP, if the page is set to private they won’t display.
But again hard to know what’s causing the issue without looking at how you have it setup.
Forum: Plugins
In reply to: [Airpress] Front-end Filters for airtable ListIf all you want to do is have one column in Airtable manipulate a page or several pages, you can just utilize formulas within Airtable to manipulate the information sent to WordPress through Airpress. You don’t need to add php filter functions if you don’t want to.
Example:
Column 1 in Airtable is the name of a book your selling, Column 2 is the price of the book, and column 3 is a dropdown with 2 options, “Regular Price” and “On Sale”.
What you would do is add a 4th column named “Final Price” and use a formula. IF({Column 3}=“Regular Price”, {Column 2}, {Column 2}*0.10)
What this would do is if the book was marked “On Sale” it would give it a 10% discount otherwise it would use the full price in Column 2 as the the Final Price. Then just send the Final Price to your site using a shortcode [apr field=“Final Price”]
This can all be done by adding PHP filters but with no coding experience this is how you would manipulate information on the website from Airtable just using one column in Airtable.
Not sure if this is what you were asking; and I know my example doesn’t pertain to your particular website but if you want to manipulate information on a page or multiple pages using one column in Airtable without using PHP this is how you do it
Forum: Plugins
In reply to: [Airpress] Getting 404 Errors? Update to version 1.1.60@ccostopoulos – Might be a stupid question but is your template airpress uses set to private?
Forum: Plugins
In reply to: [Airpress] Getting 404 Errors? Update to version 1.1.60@chetmac @ccostopoulos @pledford I don’t know if I found this in the docs or just came across it accidentally but the “greediest” expression I have needs to be the last config.
Like “^(.*)/?” cannot be in front of “^team/(.*)/?” in the order of configs inside the Airpress Virtual Post section. “^(.*)/?” always has to be at the end or doesn’t work. Which actually brings me to what would be a nice feature if it could be implemented. Allow us to move around the order of configs even after they are created; because if I have to create a new one I have to delete the last config with “^(.*)/?”, create the new one then recreate the one with the greedy expression last.
I have some setup inside my functions.php as well but they cause no issues.
Btw… this is one of the greatest plugins in WordPress atm
- This reply was modified 5 years, 1 month ago by moochie.
Forum: Plugins
In reply to: [Airpress] Getting 404 Errors? Update to version 1.1.60I’m not sure if this will fix the issues for you guys @pledford @ccostopoulos but there was a virtual post configuration in my setup that was no long able to find a template, or a column within Airtable. After deleting the configuration and re-saving all the ones I’m currently using, the error stopped occurring.
If you don’t have too many virtual configurations I would attempt to delete them all and recreate them, this might resolve your issue.
Forum: Plugins
In reply to: [Airpress] Getting 404 Errors? Update to version 1.1.60I’m having the exact same issue, my Virtual Posts stop working. I can activate the plugin after resetting my permalinks, and the Virtual Fields will start working, but the posts wont. Once I try to re-save even one of the Virtual Posts, all web pages except the home page give me a 404 even the ones not generated by Airpress.
Forum: Plugins
In reply to: [Airpress] Virtual Post: Returns template not 404 pageThanks so much for the quick response. I tried both your suggestions to no success. When a virtual post is accessed that doesn’t exist, it DOES change the title of the page to my 404 page, however does not change the url and still renders the template.
The other problem I’m having with naming it ‘Airpress Template: Profile Page’ or something similar is if the page is shared via social media or SMS it brings back the name of that template.