Milo

San Francisco

metaflora.net

I like bicycles and cats.

http://metaflora.net/

18h
comment Some shortcodes breaking after AJAX call
when a post loads normally, some javascript runs to bind events to make things work, for example, the click event for the accordion. when you load the post via ajax, that javascript has already run, so new elements added to the page don't have those events bound to them. this is really a javascript issue, not WordPress.
Jul
23
comment Datepicker and advanced custom field plugin
where's the code you are using to do all of this? "please suggest something" is a rather vague request.
Jul
22
comment Using get_posts structure for a specific field
third-party plugin support is off-topic here, try the advanced custom fields support site.
Jul
22
comment Serve WordPress in root path of Apache
you did what? moved the files to root? if URLs are wrong, your site and home option values are incorrect.
Jul
22
comment Serve WordPress in root path of Apache
why do you not just move everything into html, rather than leave it in wordpress directory?
Jul
21
comment Sorting meta_value as integer doesn't work
var_dump $scoreboard and see what the query looks like and if it's being cast as int.
Jul
19
comment How to Combine Two Custom Post Types into Single Permalink Structure
there are 2 parts to this problem. first- rewrite rules to catch incoming requests. could probably solve this without having to write the rules yourself by adding rewrite endpoints, hooking pre_get_posts, and manipulating the query to grab whatever hotel/restaurant/etc, is requested. the 2nd part is generating the URLs, so the_permalink() outputs the correct parent destination in the URL. For that you'll need a UI solution to associate one post type to the other via a metabox, and a hook on post_type_link to build the URL. that's the best I can do on a friday night :)
Jul
18
revised tag.php doesn't work with tags on a custom post type post?
deleted 24 characters in body
Jul
18
comment tag.php doesn't work with tags on a custom post type post?
@MiniRagnarok - just add a check for $query->is_main_query() to the above to exclude all queries except the main query.
Jul
18
comment Content not showing when using my self-programmed shortcode in a custom sub field (ACF)
your shortcode runs a new query, which changes the value of the global $post, anything in your main loop that executes after the shortcode will be using the $post data from the wrong post, it has to be reset.
Jul
18
comment Infinite blog loop
the issue is that get_post_format() is empty for posts that are standard format, so you're loading content.php inside content.php, which then loads content.php, etc., in an infinite loop. you should rename the above content.php to something else if you want to use this structure.
Jul
18
answered Infinite blog loop
Jul
18
answered prevent HTML output if custom field is empty
Jul
17
comment do_shortcode close
get_field
Jul
17
revised do_shortcode close
added 4 characters in body
Jul
17
comment Current state to a button when on a single page
check out the examples on the body class page I linked above. there's one that shows you how to add categories to the body class, which you can target to highlight a specific menu item on a single post page.
Jul
17
comment Current state to a button when on a single page
I am not using wordpress menu system because I was unable to place my icons class inside of the link. why not ask how to do this instead? it's certainly possible. or using descendant css selectors, you wouldn't even need to add classes to anything, you could just use the existing classes on the li tags in combination with the body class.
Jul
17
comment Custom query not working in plugin admin page
You can, but you haven't shown us your code, so we can't help.
Jul
17
comment How to display custom post types AND regular posts separately on a shared taxonomy archive?
You have a syntax error in your query parameters, semicolon should be an ampersand.
Jul
17
comment How to display custom post types AND regular posts separately on a shared taxonomy archive?
The problem you'll have with pagination is that when the main query runs out of posts, subsequent pages will 404. Your secondary query can never have more posts than the main query.
1 2 3 4 5