There were actually 2 issues. First, I had to use get_query_var. Secondly, for some reason Permalinks were set to a weird custom structure. It’s working now.
Related Posts:
- add_filter the_content str_replace after shortcode
- Correct regex for wp_embed_register_handler
- WordPress Ajax always returns a 404 error
- WordPress custom taxonomy description for each post?
- Conditional statement for parent, child and grandchild pages
- How to use SRCSET with get_the_post_thumbnail()?
- How do I make wordpress comment fields required?
- How to add a post or page tag to the list of classes appearing in the body tag’s class attribute?
- WordPress Wysiwyg Content not being displayed
- Javascript code inside “” in core WordPress files .php
- HTML table from shortcode with multiple parameters
- How do I add HTML to a PHP function [closed]
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- WordPress automatically adding html tag around PHP code
- Missing sidebar parameter “fix” – before_content
- How Display Posts on category
- How to get the POST TITLE using the POST ID?
- ACF page while loop breaks footer while loop
- Load a page into a div with Ajax
- Converting HTML Template to WordPress Theme
- Multiple options not staying selected after saving
- Embed html in php code
- How to remove ?wp-mce-4103-20162941
- Customize position of social icons in upme plugin [closed]
- parts of url disappear when using # inside href=”” [closed]
- Position banner to right of logo in header – messed up my header file
- How to separate HTML and WordPress files
- Add .htm extention to a custom taxonomy
- Make PHP work with HTML tags
- Syntax error when I try to insert my loop into an unordered list? [closed]
- How to make modifications only to certain elements of an HTML string on the server-side?
- Function returns text instead of html [closed]
- Printing HTML codes
- How i can get post data from database when i am getting post id from url in wordpress
- How to retrieve the data from the sever and displaying it in a page?
- How to execute html code inside php?
- Add data-id attribute to child page links
- wp_insert_post() with HTML tags using PHP
- Prevent redirect to wp-login.php
- Where can I find the inline-css of my theme header?
- Make textarea required. Help [closed]
- Remove   from the_excerpt
- Find out last 7 days of upload images, last week uploaded image from Gallery and display them in different pages
- Website completely messes up when logging out
- Calling PHP Titles inside Javascript Markup
- How can I use custom menus with a Bootstrap WordPress theme?
- Replacing WordPress Icons (menu,icons32, etc)?
- Custom forms with HTML
- Wrap title and excerpt in a div (latest posts block)
- html form: redirect page after form completes submit function and posts data
- HTML Form Question
- WordPress Post Block Element not properly parsed with the_content filter
- Hide A Class and Add Custom HTML Code Using WordPress
- Add other class content with reference class value
- What are the advantages/disadvantages of ways to use php template files?
- Configure WordPress to Use Responsive Image Rendering
- How to use data URL in WordPress?
- HTML comment cause issue in functions.php script root
- Slug duplicates once clicking on link
- Remove span tags from WooCommerce Downloads page
- How to enable HTML tags in category description without breaking the category page
- How to find and delete a menu item in php?
- My single.php page skips the first div tag
- Custom woocommerce payment gateway – Form
- opens like sitename.com/URL
- WordPress Slider is not working
- How to display post meta bellow every posts
- Make a full-width wordpress page
- Display child-page links in sidebar on both Parent Pages AND Child Pages
- Access certain Entry in HTML-Table and pass the entry-data in WP not working [closed]
- Switch position of elements in the footer [closed]
- Add Text Area To Child Theme’s Home Page
- Can’t get_users info by using json_encode
- scroll scrpit to particular button position to next id when click button
- Code works on page-example.php by not category-example.php
- how to remove replicating a tag inside loop?
- Add Alt attribute to image served with php
- How to add thumbnails from recent posts to owl-carousel in wordpress automatically?
- Add options to WordPress backend
- WordPress HTML Helper
- echo variable containing html and the_permalink();
- Trying to customize wordpress drop down categories
- get_post_meta is always empty when I use wp_mail
- Parse error: syntax error, unexpected ‘echo’ (T_ECHO) in C:\xampp\htdocs\AttendanceSystem\resources\php\method.php on line 250 [closed]
- Implement “No related posts for this entry” into the loop?
- ACF repeater image in video poster with jquery
- Load Meta box value into div AJAX [duplicate]
- How make wp_nav() with my css?
- Advanced Custom Fields Show PHP in Text Areas
- Sorting Problem
- Is there a better way to output HTML as a shortcode?
- Add multiple HTML attributes to an Elementor button
- Load wp_editor on button click
- Add topbar to static html page
- Why do I get a 404 error on my custom post type archive pagination?
- change div text and link for logged in users
- Font Awesome Icons as squares [closed]
- How to show correct td of table tags in wp_query loop
- Editing stylehseet url in head section of WordPress
- How can we upload custom page files?