Skip to main content

Unanswered Questions

1,344 questions with no answers
0 votes
0 answers
66 views

Change conditional tag in wordpress without editing the core files

In wp-admin/includes/class-wp-posts-list-table.php lines 59-69: if ( !current_user_can( $post_type_object->cap->edit_others_posts ) ) { $exclude_states = get_post_stati( ...
0 votes
0 answers
98 views

Admin Panel errors because of functions.php

I'm creating a new theme in WP and I started noticing some errors in the Admin Panel. For example, when I want to update a page adding new content (or a blog post), it redirects to wp-admin/post.php ...
0 votes
0 answers
3k views

Load more posts with Ajax and masonry

I'm using this method to load more posts with Ajax: http://www.problogdesign.com/wordpress/load-next-wordpress-posts-with-ajax/ I'm also using masonry for the posts layout. Masonry works fine for ...
0 votes
0 answers
293 views

Function working in single.php but not working in custom template file

I defined in my functions.php the following code: function fix_footnotes($content){ return preg_replace('/href\s*=\s*"[^"]+(#[^"]+)"/','href="$1"', $content); } When I call this ...
0 votes
0 answers
144 views

functions.php conditional output for a single plugin

hope I've asked this correctly. Bizarre situation. I have some non-breaking spaces in my titles for typography reasons. They are added automatically where required in place of normal spaces by the ...
0 votes
0 answers
73 views

How to request login for user but not for bots

I wondering, how to not requesting bots like google crawler or bing crawlers to login since they can crawl my post info, but require user to login if they want to see the posts? I already know how to ...
0 votes
0 answers
257 views

Site is not updating because something is wrong with custom code. How to fix it?

I really didnt know what a proper title for this question could be. Anyways, I have this code in functions.php which is breaking my site function wp_show_post_views(){ global $post; $postid = $post-&...
0 votes
0 answers
767 views

How to respond with WP_Ajax_Response();

I'm using WP_Ajax_Response(); to respond to some ajax and output it to a div, everything works great. But how exactly do I respond if I want to output some php in to a div? A wordpress loop for ...
0 votes
0 answers
142 views

using enqueue_script in a shortcode isn't working

I'm new to wordpress and I'm trying to get this to work by following the wordpress codex but I feel like I must be missing something obvious. I have a child theme based off of a parent one, and I ...
0 votes
0 answers
1k views

Display default WordPress login/registration form into a modal window

hope someone can help me with this. I need to display the default WordPress login/registration into a modal window. I followed this tutorial in order to create the modal box and it is just exactly ...
0 votes
0 answers
64 views

How to structure plugin in to functions?

So I have customized a few plugins before, but never developed one from scratch. One thing that I have struggled with is structuring my functions. I found the following snippet and wonder how YOU ...
0 votes
0 answers
72 views

How to pass more information though separate post keys via AJAX

I'm on the admin side of wordpress and therefore am using ajaxurl. Is there any way I can pass information through different keys. For example, like "extra" below... Ajax That's Sending The Data ...
0 votes
0 answers
2k views

Ajax request to admin-ajax.php and window.location.href

In relation to this question, I don't understand the meaning of: Instead of sending the ajax request to the admin-ajax.php, send it to the same url (using js window.location.href ) but including ...
0 votes
0 answers
401 views

Adding result from PHP function into an input field

I have the following PHP code which is a template page for a wordpress site: <?php /* Template Name: Calculator Form */ get_header(); ?> <div id="content" class="grid_7 suffix_1 <?php ...
0 votes
0 answers
227 views

Objects and get_post_meta() gives me 1 string for latitude and longitude

I am using Geo Data Store plugin and sending my post's lat/longs to AJAX. Everything is available via return Object and working fine except the lat/long is in one string. This must be a common ...

15 30 50 per page