flizzywp
Forum Replies Created
-
Any help? I bought premium only for this one feature, so this is slightly frustrating :/
Forum: Plugins
In reply to: [Redirection] Can I hide bots from the 404 page?Good job, this feature is incredibly helpful!
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Next sibling page?Done
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Next sibling page?This must be the most useful plugin I have used in a while
Forum: Plugins
In reply to: [HD Quiz] Store the result?OK gotcha. Thanks for answering!
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Next sibling page?It works! Thank you, this is absolutely great!
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Next sibling page?Actually no, it’s not working. It shows me an error about “header information”.
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Next sibling page?OK I figured out that I had to pass “after” to the function. The problem now is, instead of putting the link into the button, it is displayed as text above the button.
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Next sibling page?When I add $link between the paranthesis, it returns the URL endpoint with “Arrays” added to it
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Next sibling page?It says “missing argument” with a lot error text.
This is the exact PHP function, can you tell me how the shortcode code has to look exactly?Sorry I can’t manage to format the code. The code tag doesn’t work.
function get_sibling_link($link) { global $post; $siblings = get_pages('sort_column=menu_order&child_of='.$post->post_parent.'&parent='.$post->post_parent); foreach ($siblings as $key => $sibling){ if ($post->ID == $sibling->ID){ $current_id = $key; } } $closest = [ 'before' => get_permalink( $siblings[$current_id-1]->ID ), 'after' => get_permalink( $siblings[$current_id+1]->ID ) ]; if($siblings[$current_id-1]->ID == '' ){ $closest['before'] = get_permalink( $siblings[count($siblings)-1]->ID ); } if($siblings[$current_id+1]->ID == '' ){ $closest['after'] = get_permalink( $siblings[0]->ID ); } if ($link == 'before' || $link == 'after') { echo $closest[$link]; } else { return $closest; } }Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Next sibling page?I don’t know much about WP development, but I have a PHP function that when called generates the correct URL.
Is there a way to call this PHP function from a button click?Forum: Plugins
In reply to: [Redirection] Can I hide bots from the 404 page?Nice, perfect timing for me!
Forum: Plugins
In reply to: [Redirection] Help with a regexIf someone is interested, the following combined regex solved my problems:
/code-examples(?:/android|)(?:/?(.*)|\b)Forum: Plugins
In reply to: [Redirection] Help with a regexActually, it only works IF something is behind the last slash, otherwise it doesn’t work. https://codinginflow.com/code-examples/android
redirects me to /code-examples/android/android.
But only WITHOUT the trailing slash. It redirects properly with the trailing slash, but it redirects me to /tutorials/android// (with 2 trailing slashes). Any idea what could be the reason?/code-examples/ also does only work with a trailing slash.
It seems like it NEEDS something to put into the placeholders. How can I make it support redirects if the placeholders are empty?
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
- This reply was modified 7 years, 6 months ago by flizzywp.
Forum: Plugins
In reply to: [Redirection] Help with a regexOh, I didn’t know I could do that with order! Thank you!