Reputation
48,303
Next tag badge:
98/100 score
57/20 answers
Badges
2 33 59
Newest
 Yearling
Impact
~1.8m people reached

Apr
5
comment Fetching $_POST from Page Template into functions.php
post vars in an ajax request are set by javascript. you need to pass whatever data your ajax php needs to operate on the same way you pass the wp_ajax action in your javascript.
Apr
5
comment Fetching $_POST from Page Template into functions.php
The request that loads your front page and your subsequent AJAX request are two entirely separate requests with no state maintained between the two, you can't retrieve $_POST data from a different request.
Apr
3
comment Category name not shown correctly
$albumcat->term_id is the category ID.
Apr
3
comment Category name not shown correctly
$catx is your results array from get_categories, get_cat_name needs a category ID.
Apr
3
comment Call function on a single page
we don't know what it is or when it runs, how can we answer your question?
Apr
3
comment Is it possible to to use custom post type types on a page with the same slug somehow?
it sounds like your theme is possibly at fault. does it work if you use a default theme, like twentysixteen? just pasting the example code from register_post_type codex page into twentysixteen theme works straight away.
Apr
3
comment Call function on a single page
What is sjb_job_location_filter_args? That appears to be specific to some plugin. Note that 3rd-party plugin support is off-topic here.
Apr
3
answered order posts by `meta_key`, Does not display posts that does not have `meta_key`
Apr
3
comment Is it possible to to use custom post type types on a page with the same slug somehow?
You need to flush rewrite rules after registering a post type. Add the code you use to register your post type to your question and we'll have a look at it.
Apr
3
comment Is it possible to to use custom post type types on a page with the same slug somehow?
There's no page involved, you set the archive slug with has_archive when you register the post type. You don't need a special template unless you want to change the layout, you just run the normal loop like any other template.
Apr
3
comment Is it possible to to use custom post type types on a page with the same slug somehow?
the pre_get_posts action lets you modify the query.
Apr
3
answered PHP/WordPress — How do I check if Shortcode returns content?
Apr
2
comment Is it possible to to use custom post type types on a page with the same slug somehow?
Is there a reason you want to use a page rather than the post type archive that WordPress generates? You wouldn't need to run your own query to output the posts and you won't have pagination issues. Then I guess your question becomes "how do you dynamically set post type rewrite slugs?"
Apr
2
comment My php header() function is not working
do you have debugging enabled?
Apr
2
comment Is it possible to to use custom post type types on a page with the same slug somehow?
Edit your question and add more details and code there, code in comments is unreadable.
Apr
2
awarded  Informed
Apr
2
comment How to add #navbar to all page links?
just note that it will apply to all page links output, you could target just the sidebar by adding it just before sidebar output and removing it immediately after.
Apr
2
comment Is it possible to to use custom post type types on a page with the same slug somehow?
Pagination of what? A post archive? You can register a CPT with the slug of a page as rewrite slug and it works without issue, so I'm not sure where you are having trouble with that. As always here, it helps to add actual code you have tried to your question.
Apr
2
answered How to add #navbar to all page links?
Apr
2
comment WP_Query meta query not returning results as expected
IN will only work for exact matches. You could possibly do a LIKE query instead, but the real answer is that if you need to query on something, you can't save it as serialized data.