Twitter shortlink 404 not found [closed]
Twitter shortlink 404 not found [closed]
Twitter shortlink 404 not found [closed]
when the shortlink is created, an action is trown with this line : do_action(‘fts_use_shortlink’, $post_id, $shortlink); then you can hook your code on the action with this code e.g. in the 2nd plugin : add_action(“fts_use_shortlink”, function ($post_id, $shortlink) { // here you can use $shortlink }, 10, 2); // 10 is the priority when there … Read more
Well if you are referring to what are the query string keys are, it will depend on the taxonomy you are working with, for categories: you are looking for ?cat=cat_id tags: you are looking for ?tag=tag_slug custom taxonomy: it depends on the slug of the tax but it will look like ?taxonomy_slug=item_slug Check the definition … Read more
You never need do_shortcode(), better said, almost never, there are a few cases where do_shortcode() could be appropiate. Note how you could do just: echo shorten_url( ‘http://mylink.com ‘ ); instead of: echo do_shortcode(‘[shorten]http://mylink.com[/shorten]’); Think about shortcodes as PHP functions placeholders; they are intended to be use where you can not execute PHP directly, like the … Read more
I very much doubt you can universally “trick” all plugins without touching at least some of some plugin code, but I think your best bet would be filters on the_permalink and post_link, and maybe pre_post_link. Even if you got that working it would be pretty “heavy”. That is, a lot of processing happens before you … Read more
I’m not sure if this is going to help or not, but it might help to know that some actions fire more than once. For example, save_post will actually fire three or four times on a given save. One is for the revision. One of the new post. Etc. It could be, in your case, … Read more
Assuming you want your users to be able to ask questions in the front end: you can add the page for asking questions to your menu real easy. Just use the menu functionality of WordPress: Click DWQA Ask Question and then Add to Menu. This is built-in functionality of the DW Question & Answer plugin.
Shortlinks are not natively supported by WordPress. What you are calling a shortlink (the one ending in ?p=123) is actually the standard permalink, based on the post ID. Shortlinks encrypt the actual permalink, which may as elaborate as you mention in your first example. External services such as Jetpack (wp.me) and Bitly (bit.ly) will take … Read more
If you’d like to keep your slugs for SEO, then you’ll want to define a new rewrite tag and leave the default behavior for post slugs. If you’d like a unique id, then instead of looking up possible duplicates, why not just re-use the post ID which is guaranteed to be unique given a MySQL … Read more
The first step is the rewrite rule. I’ve also added a rewrite tag so the custom query var will be parsed. You can also use the query_vars filter for this instead. add_action( ‘init’, ‘tipp_rewrite_rule’ ); function tipp_rewrite_rule() { add_rewrite_tag( ‘%trick_nummer%’, ‘([a-zA-Z0-9]+)’ ); add_rewrite_rule( ‘^tipp([a-zA-Z0-9]+)?’, ‘index.php?trick_nummer=$matches[1]’, ‘top’ ); } The second step is to intercept these … Read more