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 ...
-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 ...
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
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
0answers
23 views

shortcodes not working -they just display as raw shortcode (code)

I'm developing a plugin and need to implement shortcodes, the shortcodes is coming out as it is on a archive/category page - I have used to the shortcode_exists(); to check if the shortcode does exist ...
0
votes
0answers
52 views

Do_shortcode on PHP file outside theme ALMOST works

I recently incorporated a new interface into my wordpress site that mimics an iGoogle layout. (If interested, It can be found here: Link and DEMO ) It uses several widgets to make up the layout ...
-3
votes
1answer
37 views

How to create shortcode of this PHP code

I tried a lot but failed to create shortcode of this PHP snippet: <ul> <?php $my_query = new WP_Query('post_status=future&order=DESC&showposts=10'); if ($my_query->have_posts()) { ...
0
votes
0answers
31 views

Using the same shortcode to show any table from the database

I have a little question for you. I want to create a shortcode that makes a table with data that I have stored in a database. But i want to send the shortcode an attribute, to specify which table ...
0
votes
1answer
26 views

How to Set Limit with WordPress Get Bookmarks Shortcode

I just need some help with a WordPress shortcode function. I would like to create a list of links based on the link_category inside a post with a shortcode. I had the shortcode working until I added ...
0
votes
1answer
28 views

Overwriting a Shortcode

I have a theme that extends the Visual Composer plugin with a slider on the front page. The slider will show five testimonials from five different customers. I want to add the featured image of each ...
0
votes
1answer
118 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
2answers
100 views

Passing a shortcode attribute to a sub-function

This is both a WordPress and a PHP question, since a PHP programmer may know a technique that the WP group doesn't. I have been attempting to write a shortcode that fires the Foundation Reveal code ...
1
vote
1answer
80 views

has_shortcode() - how to detect nested shortcode

I'm using has_shortcode() to detect a shortcode, it works but not at all. If I put this specified shortcode inside another one the has_shortcode() function stops working. has_shortcode( ...
0
votes
0answers
30 views

How to escape shortcode content? Do I even need to escape or validate?

I've written a small shortcode that wraps it's content into a HTML element, like so: [my_shortcode]The sun is shining today.[/my_shortcode] In my shortcode function, I basically return the string ...
0
votes
1answer
43 views

How can I put a custom field as the link of a button shortcode?

I have been working on a custom page template, and cannot seem to figure out how to have a custom field for URL's as the link for a button in the loop. Here is my code <?php echo ...
0
votes
1answer
275 views

ob_get_clean returns empty string, ob_get_flush outputs string

I am utilizing a template-type system, to filter the_content. My filter contains this partial code: ob_start(); include_once ( self::$dir . 'views/templates/' . $post_type . '/' . $display . '.php' ...
0
votes
2answers
59 views

get value from post to sidebar

I have the following div in my post, <div class="my_calss" id="my_id"> my content </div> Here, my_id is different for each post. I need to display my_id in sidebar into php code. ...
0
votes
1answer
71 views

Use PHP code in shortcode

Sorry I am not a coder and my English is bad, but I want do this: I have shortcodes: [tabs][tab title="Title1"]Content1[/tab] [tab title="Title2"]Content2[/tab][/tabs] How can I use PHP in this like ...
0
votes
1answer
123 views

How do I add text in a shortcode?

I think this might be an easier question but I can't figure it out. How can I add simple text inside a short code? For example: $return_string .= '<a ...
0
votes
1answer
22 views

Shortcoding with Divs

I am trying to turn a custom query into a shortcode but I am having some difficulty. Firstly, I am not sure how to return a custom thumbnail size via $return_string...in fact I am not sure how to ...
0
votes
2answers
130 views

Shortcode to find and replace URL

I'm trying to create a shortcode that will search within some specified text for a link and replace it with one that I specify. For example: [scode]Click on <a href="www.X.com">this ...
0
votes
1answer
198 views

Why is my str_replace not working on short code submitted by front-end?

I've built a front-end post submission form that allows a user to include a shortcode provided by SoundCloud. SoundCloud shortcodes generally look like this: [soundcloud ...
0
votes
1answer
157 views

What is the difference between Null vs Empty (Zero Length) string?

In a shortcode context, is there any difference here? array( 'slideshow' => '', ), and array( 'slideshow' => NULL, ), Is there a best practice for that?
1
vote
2answers
328 views

Run shortcode at certain resolution

I've gone a roundabout way of trying to ask a question about this here: Loading shortcode with ajax but figured it might be worth asking the fundamental question of what I am trying to do without ...
0
votes
1answer
41 views

Where to place PHP for shortcodes

My custom plugin is broken into two parts: a frontend.php and admin.php for loading code conditionally. Here is a rough outline of the code: <?php /* My plugin info here */ if (is_admin()) { ...
0
votes
1answer
97 views

Could use some help with Shortcodes

So I am starting with shortcodes and this is my first time trying to make one, I am using it to make css/js tabs for information and basing off code I got from themeforest.. So I will do the best to ...
2
votes
1answer
273 views

How do i get (unique) page name?

Like from the page of http://localhost/wordpress/about_us/ how do i get only the "about_us" ? Thanks
0
votes
1answer
298 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 ...
0
votes
1answer
132 views

Custom field within shortcode

I'm currently using the 'WP Simple Paypal Shopping Cart' plugin to get up a simple paypal e-commerce site, it's super easy to use, but to save the client having to write shortcode, I've set up custom ...
0
votes
0answers
95 views

Dynamically load JJ NextGen Slider/ Slideshow (dynamically add shortcode with jquery)?

My front page includes an image slideshow by JJ NextGen Slider (Link). Therefore I am using PHP and do_shortcode(). This is the full code: <?php echo do_shortcode('[jj-ngg-jquery-slider ...
0
votes
1answer
1k views

Auto Gallery from folder contents

I need to be able if this is possible, (i am a newbie at this so please take that into consideration) I want to create a Wordpress shortcode that will add an automated gallery of the contents in a ...
0
votes
1answer
81 views

How to wrap a text with shortcode into php file?

I want to wrap a text with shortcode into the single.php file. The shortcode is: [box type="note" align="aligncenter" ][/box] and the code is: Διοργανωτής διαγωνισμού: <?php ...
-1
votes
1answer
53 views

Creating Features List in Wordpress Post

I want to create features list in wordpress post. I know how to do in CSS but I was wondering if it can be done by using a short code or a plugin?. Like [features_list] Item 1 Item 2 [/features_list] ...
1
vote
1answer
56 views

Showing a different gallery in a seperate post

i am using the [multigallery] function and I was wondering if there is a way to use the function to call attachments from another post. For example if i was writing a post about taylor swift and I ...
0
votes
1answer
131 views

Adding Image Count to Multigallery

Ok so I am using the [multigallery] function and it works fine, but one thing I want to add. Here is the code that I am using for the multigallery in my functions.php file function ...
0
votes
1answer
256 views

How to put a form with php code into a variable or shortcode?

I'm trying to put my frontend form into a variable or a shortcode so I can wrap another shortcode around it (specifically Bainternet Post Creation Limits). My form has PHP code in it so I'm not ...
1
vote
2answers
1k views

Return HTML Template Page with PHP Function

I want to create a form that I can use a shortcode to insert into my site. It would be really nice if I could create the HTML part in a seperate file and then insert it with a PHP shortcode (to ...
0
votes
1answer
97 views

Shortcode displaying at the top of the page [duplicate]

Possible Duplicate: The result of a shortcode appear BEFORE page content short code output too early I got this shortcode for display my blog posts on my page, but the EXCERPT and the ...
2
votes
1answer
178 views

Audio tags around Mp3 URL in content

I have an audio player than uses the following syntax to display its player: [audio src="http://somedomain.com/wp-content/uploads/2013/01/songtitle.mp3"] The thing is, I'm pretty sure I can show the ...
0
votes
2answers
635 views

How to use 'Event Manager Shortcodes' plugin via the php code?

I am using Event Manager plugin. I want to use many of the shortcodes via php code. e.g [events_calendar]
3
votes
2answers
826 views

Shortcode to insert <!--nextpage-->

Since wordpress does not have a menu icon (aka "user friendly) way to add the command to a post or page, I'm trying to create a shortcode to do it. However, as logic would have it, its not that ...
1
vote
1answer
49 views

Storing Options in a Shortcode

I am creating a Wordpress plugin. I want to create 1 single shortcode that changes output based on the settings changed by the user on the admin settings page. So for starters, I have something like ...
1
vote
1answer
159 views

How to display posts by current user in a drop down

I am trying to write a shortcode that works in conjunction with Contact Form 7 to display the current user that is logged in posts. I have been able to get it to work with regular posts using this ...
0
votes
1answer
125 views

Adding a Tag Parameter / Filter to My Shortcode

I have this plugin that displays category featured image thumbnails for each post via shortcodes.. like so, [categorythumbnaillist 3] (3 being the category of course) I would like it to only show ...
0
votes
1answer
393 views

AJAX function not working [closed]

One person on the site wrote a function, but I do not know why it works. This function displays a random quote. The functions implemented the ability to download new quotes via AJAX (link New Quote), ...
-1
votes
2answers
173 views

Get URL from shortcode tag

I am running a wordpress site and I need the correct regex syntax to get a URL from some shortcode that is returned inside the_content(). When I use the_content(), it will return something like ...
0
votes
1answer
660 views

PHP Widget and do_shortcode

I'm using PHP Widget which allows PHP code to execute from a widget. I tried using this code to execute do_shortcode but it's not rendering <?php $lat = get_field('woo_maps_lat'); $long = ...
1
vote
1answer
762 views

How to put JQuery/Ajax inside shortcode?

The purpose of this plugin is to create a list that users can modify with up or down votes. The shortcode is supposed to display the list on a page and use JQuery to fadeIn and fadeOut while updating ...
0
votes
1answer
177 views

Creating a WordPress shortcode

I'm coding my first WP shortcode and am having trouble turning my working PHP into a working shortcode. I have successfully created a basic shortcode that returns text in the spot I'd like so that ...
4
votes
1answer
748 views

Update all posts automatically when using post_meta

I recently created a new site using wordpress but I'm a rookie - everything I know is trial and error with no formal training. So please, please, please keep your answers as simple as possible. Thanks ...