gpalowitch
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Content Shortcode] Adding the start option to loopThanks very much for adding it.
I am working on a site for a homeowners association and creating a directory of residents. I am using an alphabetical listing by last name and wanted a way to add some text if no residents with a last name that starts with a particular letter exist. By adding the filtering to the loop I can use the [if empty] shortcode to determine if the result is empty.
Forum: Plugins
In reply to: [Custom Content Shortcode] Adding the start option to loopBasically what I wanted to do was have the posts filtered by the loop so that i could use the [if empty] shortcode to see if the result was empty. Maybe there is a way to do this already and I am just not finding it.
After looking at the WP_Query documentation page I have two ideas about how to possibly get the desired result.
First, it appears that you can compare strings to the another string using the following operators.
‘=’, ‘!=’, ‘>’, ‘>=’, ‘<‘, ‘<=’, ‘LIKE’, ‘NOT LIKE’, ‘IN’, ‘NOT IN’, ‘BETWEEN’, ‘NOT BETWEEN’, ‘EXISTS’.
Additionally, a relation can be added so that two operators can work together. I believe the use of an >= operator and a < operator would allow this to work. >=M and <N would give all strings that start with M. You could allow people to select the beginning and end values.
Alternatively, the results of the query could be retrieved and then filtered using a function in Custom Content Shortcode before returning the results.
Forum: Plugins
In reply to: [Custom Content Shortcode] Nested IfsThanks for adding it Eliot!
Forum: Plugins
In reply to: [Custom Content Shortcode] Comparing shortcodes within an if shortcodeThanks Eliot,
I really appreciate the quick response and addition.
Sorry,
Please disregard this thread, I overlooked part of the documentation.