Tagged Questions
0
votes
0answers
112 views
Some filter adding custom post types to my WP_Query
I have a strange problem. I am using WP_Query inside a shortcode callback. Say I have 10 custom post types and I want to show the most recent post from 4 of them. I specify them as
'post_type' => ...
0
votes
0answers
44 views
Shortcode $content not showing in Custom Post Type [closed]
I have an enclosing type shortcode that includes $content. The shortcode works fine in regular Posts/Pages however in a custom post type it breaks. The shortcode still "works" but insofar as to return ...
0
votes
1answer
80 views
Using shortcodes to parse POST request (containing the data from a front-end form)
I would like to allow my subscribers to post classifieds, which are nothing but a custom post type with a few metas for the price, etc. (The existing classifieds plugins I have tried are way too ...
0
votes
1answer
55 views
Creating shortcodes with user created forms
I am creating a plugin. That enables users to create forms, & display these with shortcodes on a site. When creating a form (using custom post types), users will be able to add additional form ...
16
votes
3answers
835 views
Where to put my code: plugin or functions.php?
Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php?
There are many cases and many debates about that topic, mostly because there are ...
2
votes
1answer
497 views
Frontend editing, Frontend user dashboard
I am creating a website so that users can submit their articles from the front end. I have quite a few things set up:
The ability to submit custom post types from the front end
Blocked from the ...
0
votes
1answer
270 views
Add custom attributes to a post
My blog is mainly composed of posts describing hiking. Actually, since I just moved from a Wordpress.com blog to a self-hosted Wordpress blog, every hike is inserted in a simple post.
However, every ...
0
votes
1answer
111 views
Why is my custom post query shortcode only showing 1 post?
I created a shortcode for a custom post type so I can show the posts in a page. It works, except it only shows 1 post.
here the code... anyone know what's wrong?
// this is the shortcode function ...
0
votes
1answer
95 views
display custom portfolio tags
This is a part from the code that is used to display portfolio categories:
$post_cat = array();
$post_cat = wp_get_object_terms($post->ID, "portfolio_category");
...
-1
votes
1answer
71 views
Shortcode in a page to display custom posts which also have a shortcode in them
I have created a shortcode [get_custom_posts] to be inserted in a page (the default page post type from WordPress) to get posts which are from a custom post type.
In each post from that custom post ...
1
vote
0answers
267 views
Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it
I'm trying to output a custom post type archive using a shortcode. Everything works fine except for the get_next_posts_link part. The weird part is that it's right next to a get_previous_posts_link ...
0
votes
1answer
1k views
Shortcode Displaying Custom Post Types
I have a problem with a shortcode that I'm creating.
I have 5-10 different custom post types, and rather than creating a template for every individual post type, Id rather use a normal page and ...
0
votes
1answer
135 views
Content in WP Editor displayed below CPT shortcode [duplicate]
Possible Duplicate:
Shortcode always displaying at the top of the page
I've developed a couple plugins which grab CPT items through a shortcode (via WP_Query). The problem I'm having is ...
0
votes
1answer
342 views
Is it possible to create a shortcode that will query a post based on taxonomies?
I am working on a site that will be listing a few hundred products and we wanted to be able to quickly/easily show specific products on a page based on taxonomies. I have been doing some research and ...
0
votes
1answer
25 views
How do I output a list of a specific post type in a table?
I've used the Custom Content Type Manager plugin to create a new post type of "Job". It includes a couple custom fields for "Location" and "Job Type".
I have a page called "Jobs", and now I'd like to ...
0
votes
2answers
318 views
Shortcode in pages or tempate files for custom post type
I am using WordPress to develop a coupon site. Merchant pages are somewhat similar to this. I am using shortcodes in these pages for Facebook Like, Google +1, Customer Review, Codes from similar ...
0
votes
3answers
615 views
Can a shortcode included in post content add styles to the <head>?
I have a shortcode that iterates through a list of custom post types and, as part of displaying them, creates a block.
In HTML5, it is illegal to have a style block outside the header (maybe in other ...
2
votes
2answers
168 views
Post the content of a specific “Custom Post Type” post within a post using a shortcode
The posts on our music blog usually include multiple tracks of music.
I want to have each individual track be its own entity--a custom post type called "track"--which I want to be able to insert ...
0
votes
1answer
246 views
Shortcode leaves no space for other elements?
I've created my own shortcode. I'm unable to share the code unfortunately ;/
When I use it on my pages it behaves strange. It always has the highest priority. I mean something like that in page ...
0
votes
1answer
171 views
How to make post templates to include shortcodes only?
I used to post same shortcodes every time (shortcodes loads dynamic contents). So, I want to pack these shortcodes in a template for my posts. How can I do this?
0
votes
2answers
3k views
How would I create a shortcode to display a custom post within a page or regular post?
I would like to create a shortcode that will extract information for a custom post, and display it within a Page or regular Post.
Specific use case: I have a custom post type "Film" for a film ...
2
votes
3answers
994 views
Custom Select Query with Custom Post Types
Have been trying to figure out the issue with this for the past hour, but hitting a wall. Basically I'm just trying to query my custom post type based on some custom date fields and then displaying ...
1
vote
1answer
1k views
Custom Post Type Loop within Shortcode
I'm really at loss as to why this isn't working:
I am using a shortcode to display a query on a custom post type + taxonomy, this is the segment of it:
// - arguments -
$args = ...