0
votes
1answer
31 views

Can't display shortcode in WP_Query loop

I want to display all posts from my CPT brand. My WP_Query loop works well but the shortcode I want to use within it doesn't work. This shortcode comes with some plugin called Download Attachments, ...
0
votes
0answers
78 views

Show Custom Post id in shortcode button on tinymice editor

I have created a custom post Testimonial for my custom theme and i have to display posts using shortcode , i want a shortcode button on tinymice editor so i create a js file for shortcode button Here ...
0
votes
1answer
100 views

Passing postid of Testimonial Custom Post in Shortcode Parameter

I am trying to create Testimonial custom post and display using shortcode function create_post_type() { register_post_type( 'testimonials',//new post type array( ...
0
votes
1answer
41 views

Custom Post Type vs Shortcode: Which one is more performant?

I am designing a Wordpress blog where I will have two types of posts: a. Normal posts; regular posts with a number of text paragraphs b. Posts with table content, where the table structure will be ...
2
votes
2answers
46 views

Strip shortcode from specific post types (formats)

I am trying to remove the shortcode from a specific post type, in this case link. I used this code on my functions.php but it removes the shortcode from the_content for every post type. <?php ...
0
votes
1answer
41 views

Shortcode / WP_Query in post changes context

We have a shortcode that causes WP_Query to be executed, retrieving an instance of a custom post type. In our single.php this changes the context (after the call to the_content()) from the original ...
0
votes
1answer
41 views

How to display class name in this shortcode post query

I need help with this as it's my first project of my new job & I'm stuck at this point. I'm retrieving custom post types portfolio using this code as a shortlist: extract( shortcode_atts( array( ...
1
vote
2answers
207 views

Generate Shortcodes by Taxonomy

Check this code: function slide_group() { register_taxonomy('Group', 'slides', array( 'hierarchical' => true /*visualizza come le categorie*/, 'label' => ...
0
votes
1answer
283 views

How to call Shortcode categories for custom post types?

Hi I'm trying to do something rather tricky in my Wordpress Theme I'm more of a designer front-end developer so its a bit of a guess work with php. Anyone have any ideas why this code only displays ...
0
votes
0answers
412 views

Shortcode issues in wp job manager plugin

I need to display job listings as per job types using shortcode in posts/pages. For that i have installed http://wordpress.org/plugins/wp-job-manager/ plugin. The issue is, when i place two shortcode ...
0
votes
1answer
47 views

How can I create a custom shortcode that will return a custom post type by ID?

Please excuse my ignorance, this seems simple but I can't figure it out and I've been rushing to hack things together. I can't find anything online to help me out. What I have: A custom post type ...
0
votes
1answer
98 views

Get custom posts with certain ids in a custom loop using a shortcode

So I'm using custom loop and shortcode to insert it in any page. Like this: function register_custom_shortcode($atts){ extract(shortcode_atts(array( 'ids' => '', // this is what I ...
2
votes
0answers
246 views

Custom media upload content for inserting custom post shortcode

I’m working on a plugin that creates custom post type “portfolio” along with shortcode to insert in any page or post. The shortcode is: [portfolio option1=“1” option2=“0” option3=“1” ] And it works ...
0
votes
1answer
27 views

Custom Post Type or Shortcode, What to choose? [closed]

While developing a multipupose theme for mass audience, i’m facing an issue. I’m going to code staff listing section. Now i was wondering, what should i do? 1: Create dedicated Custom Post Type for ...
1
vote
1answer
415 views

Get custom post type list for every category shortcode

I am trying to make a shortcode to list all custom posts under the category they are under. Here is my code and I am no expert of coding but i thought that this would work. If someone can tell me what ...
0
votes
0answers
110 views

Using get_terms() as shortcode attribute

Hop you pepople would be fine. I'm creating a shortcode with the following code. $categories = get_terms( 'project-type' ); foreach ($categories as $category) { ...
0
votes
1answer
46 views

Modify a plugin function output from another plugin

I'm writing a plugin for a wordpress site using a page template using WP Types plugin. My plugin adds a shortcode tag. Shortcode tags inside 'the_content' get processed without problem. But this ...
0
votes
0answers
39 views

short code not working in custom post type listing, how to fix it?

Any activated plugin's short code not working while I listing all post from specific custom type, it's display short code as it is, but short code is not executing, my custom post coding is below: ...
0
votes
1answer
68 views

Problems making shortcode with custom post types and taxonomy

I have a custom post type work-gallery and a custom taxonomy use which serves to categorize the posts. I am trying to develop a shortcode which enables me to output the work-gallery posts that belong ...
0
votes
1answer
188 views

Using Custom Post Meta Values in Shortcode

I'm trying to display meta content from a custom post type in a shortcode. I'd like to simply provide a post_id and be able to display all the meta content. [my_shortcode post_id=""] I'm new to PHP ...
0
votes
1answer
91 views

adding a shortcode into a custom post type

I want to add the upload file plugin shortcode to a custom post type for a client build (if there's a better way to do this, please tell me). Basically I've got this - echo ...
0
votes
1answer
105 views

Nested loop called with shortcode duplicating the content above the main loop

I'm trying to use a shortcode to call one post from a custom post type and display it inside another page's content. (Basically, we have a custom post type called 'testimonials' and we want to display ...
0
votes
1answer
447 views

Add number in increment of one to DIV ID

I'm using a shortcode to display a custom post type. The shortcode contains an attribute to display only posts of a specific category within the custom post type e.g. [faq category="travel"] For each ...
1
vote
1answer
487 views

Add category attribute to custom shortcode

I have created a custom post type called "faq". The custom post type uses categories. I have created a shortcode [faq] that displays all the faq posts. What I would like to do is add an attribute to ...
1
vote
1answer
181 views

IF statement in a do_shortcode

Is it possible to do a if statement in a do_shortcode? <?php echo do_shortcode("[table width='500'] " . if ( have_posts() ) : while ( have_posts() ) : ...
-1
votes
1answer
202 views

custom post types shortode stays on top of other page contents. Is there a bug?

I have created a custom portfolio post type for my wordpress theme, and I have made a shortcode for it too. But when I create a page and use the shortcode to display limited number of my portfolio ...
0
votes
3answers
337 views

shortcode for recent custom type post

I'm not a coder so I may have done some "coding" crimes, apologies. I've bought a theme who has shortcodes for last posts but not for last "custom post type". So I tried to create last "custom post ...
0
votes
2answers
520 views

Create shortcode for list of custom post titles with custom fields alongside

I'm stumped. I've looked at various sites but haven't found the exact code I need. Basically I want to create a list of custom post titles with the date from one of the custom fields for that post ...
0
votes
1answer
310 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
76 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 ...
28
votes
4answers
5k 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
1k 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
2k 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
238 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
174 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
88 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
528 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 ...
2
votes
1answer
4k 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
180 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
868 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
28 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
391 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
1k 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
224 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
266 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
190 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?
1
vote
2answers
6k 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
2k 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
2k 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 = ...