Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 07/05/2019 in all areas

  1. 1 point
    As ginerjm suggests, rewrite your page to segment it. Then you will find it much easier to debug and perhaps you won't even need any help from us. If you do, post your better organized code.
  2. 1 point
    Allow me to direct you to the PHP Manual. It gives you an exact example of what you are asking. https://www.php.net/manual/en/function.error-log.php
  3. 1 point
    If you want a simple animation like to move to the top and bottom every 2 seconds then CSS's animations can do it better.
  4. 1 point
    You need to specify your units for the margin values. 161px, not just 161.
  5. 1 point
    It looks like your rule is slightly malformed. As I said earlier, I've found the add_rewrite_rule() function to be a bit fiddly - I try to use the 'rewrite_rules_array' filter instead. Try this: add_filter('add_rewrite_rules' ,'add_kudoskey_rule'); function add_kudoskey_rule(array $rules){ $new = [ 'kudos/([^/]+)/?$' => 'index.php?pagename=kudos&kudokey=$matches[1]', ]; $rules = array_merge($rules, $new); return $rules; } Now, with this in place you should be able to (after you've gone to the Permalinks page and clicked 'Save' to clear the rewrite cache) go to 'http://127.0.0.1/kudos/JFMGTTQ5' and it should show that specific kudos. If you want to get the kudos key referenced in the URL, use get_query_var('kudoskey'). If you want to show an archive listing of all kudos records, make sure that 'has_archive' is set to true in the arguments array of your custom post type registration call, then go to 'http://127.0.0.1/kudos' and you should see the listing. The whole point of adding a rewrite rule is to enable pretty URLs and to not have to use '?variableName=variableValue' because it's easier for the user and better for SEO.
This leaderboard is set to New York/GMT-04:00
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.