0
votes
1answer
7 views

Is it possible to include the add_filter() function within a shortcode function

I am trying to pass content to the 'google_dfp_ad_slot' filter. Can this be done within a shortcode funcion? /** * Shortcode function to dynamically add google dfp ads to inline content and ...
0
votes
1answer
19 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( ...
0
votes
1answer
16 views

How to use extract shortcode in loop?

Actually I need to gallery in any new post so i use shortcode for making gallery for every new post. I use images and videos in slider. problem is that I have custom html slider need to convert ...
0
votes
0answers
27 views

do_shortcode in page-home.php not executing plugin shortcodes [closed]

I'm using Wordpress Ad Manager's short codes to place ads on the home page via a custom theme options page that I made. [video] works, [audio] works, [revslider MySlider] works. [ad s7] doesn't.. ...
1
vote
1answer
45 views

Making Quote Plugin more efficient

I've been working on this plugin the past couple of nights and have been jotting down idea's of how to improve it. My knowledge of php isn't the strongest and I'm learning as I go along most of the ...
0
votes
1answer
31 views

Adding body class when post contains a specific shortcode

Simple shortcode function : function my_shortcode_function($atts,$content=null){ // Do something return $content; } add_shortcode('my_shortcode','my_shortcode_function'); I wonder how to add ...
0
votes
0answers
15 views

HTML output on shortcode [duplicate]

I am using Olevmedia Shortcode plugin and I created my custom shortcode. When I included the custom shortcode inside a column shortcode of the plugin, the content of the shortcode is on the outside of ...
0
votes
1answer
33 views

How to extract the variables out from “add_shortcode” function?

In Wordpress, lets say i have a custom Shortcode function, like: function foobar_func( $atts ){ //whatever required processings here... $foo = "the value is foo!"; $bar = "the value is ...
0
votes
0answers
41 views

short code function stopped working when switching to php 5.4 [on hold]

I developed a wordpress site on a remote staging server (running php 5.3) and everything was working as expected. When I migrated the site to the live website server (running php 5.4), my short code ...
0
votes
1answer
34 views

HTML Inside of Shortcode Breaks Shortcode Output

Lots of Googling has still not yielded a solution. Here is the problem: I have created a custom Wordpress shortcode to use inside my Thesis theme. The goal of the shortcode is to allow users to wrap ...
1
vote
2answers
32 views

(solved) how to have the gallery shortcode output one single UL list instead of several DL?

I need the built-in gallery shortcode to output UL instead of DL. How can I do it? I know I can use the 'post_gallery' filter, but that means almost duplicating the media's gallery_shortcode function. ...
-1
votes
0answers
14 views

How to link to blog posts?

I have a custom page which is the home page of the site. I display 4 articles on the page using - [blog_list number="4" columns="2" show_style="0"] I want to add a button below this which will ...
0
votes
0answers
31 views

Members only Passthrough

So I made a members only site with wordpress by redirecting everything to the homepage and adding a registration/login page to my homepage. This was added as a plugin: /* Change Login URL */ ...
1
vote
0answers
13 views

Getting the number of nested shortcodes [duplicate]

[slider] [img] [img] . . [img] [/slider] Is there a way that I can get the number of nested shortcode in a parent shortcode Thanks
0
votes
0answers
15 views

Create shortcode in Child Theme?

I have created a child theme, and I am trying to add a shortcode to its functions.php file, by doing this: // functions.php of child theme <?php include(WP_CONTENT_DIR . ...
-1
votes
1answer
19 views

Overwrite functions.php of a theme - What if the theme is updated?

I have added a shortcode inside a functions.php file of my a Theme. I am wondering that if the theme changes, it might overwrite the current functions.php file. So, is this true? If so, where should ...
1
vote
1answer
39 views

Custom shortcode being executed when saving page in wp-admin

I'm working on a custom shortcode: [abuzz-store slug="woolworths" fields="description,level,phone" more="true"] The shortcode is working correctly on the website frontend. However, I can no longer ...
0
votes
0answers
30 views

apply_filters to content but ignore shortcodes

I want to prepare my content added via wp editor so it displays nicely, so I use apply_filters like so: $ld = apply_filters('the_content', $ld); That works fine for the page, but in the backend ...
-1
votes
0answers
11 views

Show entries in a category

Help with the following code. sirbe this code to display thumbnails untimas tickets. what I want is to do is to display the entries in a single category. function shortcode_recientes($atts, $content ...
-1
votes
1answer
30 views

How to read a page's “Shortcodes” from the Template File?

Lets say i have a Page, and it contains some shortcodes like: [myshortcode foo="bar" bar="bing"] [anothershortcode foo="bing" bing="bar"] Then how do i read those from my custom Template File, to ...
1
vote
2answers
58 views

Change Wordpress Shortcode added in to post

Problem: I am using a plugin that turns the wordpress gallery into a cool slide show. How ever, every time I make a gallery - Wordpress add this code to the post . [gallery ids="334,332"] I need ...
0
votes
1answer
17 views

'&' causes an error in my shortcode when I list the content of the page

I would like to list the specified pages with my shortcode, but the problems are with the '$' charachters. function get_page_func( $atts ) { extract(shortcode_atts( array( ...
1
vote
1answer
28 views

Can I wrap an unordered list inside a shortcode?

So, I created an events page for my client that holds lots of details about events. We found no particular event plugins to be helpful for their purpose, so I built a a custom template using advanced ...
-1
votes
0answers
24 views

How to make a shortcode for returning HTML Value using condition inside a function.php?

I'm practically new in Wordpress Development and currently trying to make a shortcode for displaying condition user_logged_in by returning HTML format. Its not working very well and deteriorating the ...
1
vote
2answers
98 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
31 views

How to copy [gallery] shortcode between posts using polylang [closed]

We're using the excellent polylang to translate our website content and themes , there are a range of options about which fields and settings are duplicated between paired pages. We've selected to ...
0
votes
2answers
46 views

How to display data from custom fields in my custom shortcode?

This is the shortcode I have come up with, according to a tutorial on Dig WP (http://digwp.com/2010/01/custom-query-shortcode/) in order to display list of songs on specific albums. [loop ...
1
vote
0answers
32 views

Curly bracket shortcode in header.php [closed]

I am using a plugin which uses a short-code format with curly brackets { I want to display this short-code in the header.php. Usually the following code works: <?php echo ...
0
votes
2answers
38 views

Return vs Echo Shortcode

Ok, so I've created a short code which echo's some of the output; the problem I discovered is that the values must be returned instead of echo'd. I'm having problems converting the shortcode to return ...
0
votes
1answer
31 views

Space in WordPress Attribute Causing Problems

I'm trying to write my first caption plugin and having some difficulties. I'm setting up a shortcode like so: function Shortcode_Caption( $atts, $content=null ){ // DEFAULT ARGUMENTS ARRAY ...
0
votes
1answer
27 views

Basic do shortcodes question

I used WordPress codex page to code. As you can see I have 2 PHP codes in my line. The page is able to get the code's value but it doesn't obey the CSS rules, which I believe, because I inserted my ...
-1
votes
0answers
15 views

how to write shortcode inside another shortcode? [duplicate]

I want to add a shortcode inside another shortcode. i.e [dt_sc_tab title="Tab 1"] [SHORTCODE] [/dt_sc_tab] Any possibility?
0
votes
1answer
44 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
1answer
41 views

shortcodes - style them or change/remove the square brackets?

I sometimes use for the clients, plugins that are based on wordpress shortcodes,they do offer a lot of options for the clients to play with like adding tabs galleries and so on. But I see that the ...
0
votes
0answers
22 views

Custom Loop Using Shortcode in Custom Page Template

I am trying to output a custom loop created using shortcode in a custom page template. Here is the code I am using to generate the shortcode: function archive_sc( $atts ) { // Attributes ...
0
votes
0answers
12 views

Custom Shortcode that includes filtering by tag

Within a custom shortcode, how do I filter the posts that come back from get_posts() such that only posts with Tag = "xyz" are returned? Here is what I have in my shortcode currently: $args = array( ...
0
votes
0answers
60 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
22 views

Change font-size within a shortcode

I have a simple shortcode like this.... function myshortcode( $attributes, $content = null ) { extract( shortcode_atts( array( 'class' => '' ), $attributes ) ); return ...
0
votes
1answer
48 views

How to get specific string in explode array?

I have a shortcode where I'm trying to get a specific string from the $args array below. Query: <?php $args = array( //'post_type' => $posttype, 'post_type' => explode( ', ', $posttype ), ...
0
votes
1answer
69 views

Wordpress removing <p> tags?

I'd already come across a case where Wordpress added <p> tags. However now I'm dealing with the opposite situation. When I add [] shortcodes inside <p> tags WordPress automatically removes ...
0
votes
1answer
29 views

Echo HTML in custom shortcode

I wrote a shortcode that I am trying to refine. It basically just gets a list of bookmarks and prints them. But I need to to add HTML around it depending on the type that is defined. ...
0
votes
1answer
13 views

Activate short codes for all post queries?

I need to use shortcodes on widgets and various plugins. For widgets I simply used: add_filter('widget_title', 'do_shortcode'); add_filter('widget_text', 'do_shortcode'); However I cannot figure ...
1
vote
1answer
24 views

How can I whitelist only specific shortcodes for processing in text widgets?

I know that I can use the following filters to enable processing of shortcodes in Text Widgets: add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); How can ...
0
votes
1answer
33 views

Shortcode inside <a><span> WP wraps in in a <p> and shortcode is done after

I want to do this: <a href="/wp-login"><span style="pointer-events:none">[shortcode]</span></a> The Shortcode should be disabled but linked to a loginform. but wordpress ...
0
votes
1answer
33 views

Passing html tags as shortcode parameters

I want to let the user of my plugin define html tags to use before and after the text output by the shortcode, so I am using parameters where they can enter the tags. However the tags are being ...
0
votes
0answers
30 views

Woocommerce Messages Not Appearing with product_page Shortcode [closed]

I am displaying a single product page via a shortcode above a custom product loop on a WordPress page: http://dublab.com/donate It would be ideal to have the Added To Cart Message appear at the top ...
-1
votes
1answer
16 views

How to display Feedburner subscription count as plain text via a shortcode in post/page editor of my Wordpress blog?

I would like to create a shortcode like [feedcount] in my wordpress blog to display Feedburner subscription count as plain text on some of my posts/pages. Moreover, I'd prefer in the case that the ...
0
votes
1answer
115 views

Show contact 7 form in popup

I am creating map link on a image and it has two links to open video and contact form. I am making popup with lightbox but its not working. here is my code.. HTML <div class="map"> <img ...
0
votes
1answer
16 views

Using _e() on text inside video tags prints that text, instead of only showing when html5 <video> element is not supported

I'm creating a wordpress theme in which I'm creating a shortcode for a video. Part of the output of this shortcode is something like this: $result .= '<video class="fullWidth" width="auto" ...
-1
votes
1answer
16 views

echo a shortcode in a shortcode code?

I have a code for shortcode like this [mt_ptcolumn size="pricing-3-col" title="Bronze" price="$99" period="1 domain" button="Purchase" url="#"] and I want to add a shortcode inside button="" like ...