0
votes
1answer
30 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 ...
0
votes
1answer
61 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
2answers
89 views

How to add shortcode tags in single.php

In my theme has one shortcode tags to display tags of post and function to load content post. But in function doesn't include shortcode tag. Now I want to add it to function but i don't know how to do ...
0
votes
0answers
43 views

Using Post ID and Page ID in same function

I've written a function to display a custom sidebar, which is outputted as a sidebar. On some pages, I have a Custom Field called 'show_sidebar', which I can assign as 'false' on pages which I do not ...
1
vote
2answers
586 views

Stop WordPress automatically adding <br> tags to post content

Is there a way to stop WordPress from automatically inserting <br> tags when adding returns in the WordPress text editor. I would like for it to behave more like a code editor where I can ...
0
votes
2answers
58 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. ...
-1
votes
1answer
163 views

Insert Shortcode exactly at the end of the content

<?php echo do_shortcode("[sharethis]"); ?> <?php wp_related_posts()?> There are 2 short codes above 1) share this plugin short code 2) related posts short code now my ...
0
votes
1answer
153 views

do_shortcode within post query

I am querying blog posts with a specific category (according to the template page slug, and want each post to output a slider, title and content. I'm using the wordpress plugin Anythingslider for ...
1
vote
1answer
162 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() ) : ...
0
votes
1answer
85 views

Display only posts with comments

I have this code to show recent posts from one category. I need to show only the posts which have comments. How can i do that via shortcode? /* Shortcode to output recent posts from one category */ ...
0
votes
1answer
84 views

Change the default video URL in a post to shortcode format

I want to add video from youtube/vimeo to my post.Whenever i add a video to my post ,there will display a link like https://www.youtube.com/watch?v=dsUXAEzaC3Q in my admin(Add new post ),and in the ...
0
votes
1answer
164 views

Unable to add TAB character to post?

I am using the CodeColorer plugin to display source code in my WordPress. I am trying to have my code indented so that it displays properly on the website. However, when I try to add the following ...
0
votes
1answer
115 views

Shortcode for tables which can include comma and linebreaks

Is it possible to make a shortcode for table which can include commas and linebreaks for its content? I've been trying to output something like this with shortcode: But it seems difficult. I tried ...
-1
votes
1answer
36 views

Shortcode returning specific content of a post

I'm currently building a plugin to display specific part of post after accepting verification code. Can a shortcode return a part of a post? I mean: Bla bla bla [shortcode postID="100"] Special bla ...
1
vote
1answer
227 views

Shortcode Not displayed at the Right Place [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I am using custom shortcode to show some message at the end of the post. I am finding it hard to do so because it ...
1
vote
1answer
119 views

How to get rid of shortcodes in post content once and for all

I changed theme/plugin now the post content still display shortcodes. There are some tips around on hiding them, but everytime I use some content functions, the shortcodes shows up again. Also, my ...
0
votes
2answers
1k views

How to get ID of the page included with get_page()?

I'm rewriting the question, including exemplary code, I hope it will be easier to understand now. 1. My shortcode: function testid_shortcode( ) { global $post; return ...
4
votes
1answer
742 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 ...
0
votes
1answer
78 views

post/page content

i am trying to insert a post/page into one of my themes files and it wont display shortcodes or php i have created a page called home in the wordpress admin-paned and inserted into my code the ...
1
vote
1answer
918 views

get_the_content(“more…”) returns full text

I'm creating shortcode [latest_post] and want to show post date, title and short content. (content has "more" separator). Here is code: function shortcode_latest_post() { global $post, $more; ...
0
votes
1answer
2k views

Shortcode to display the latest news article within a page

Could someone help me write a custom shortcode to simply display the latest post anywhere in Wordpress? I've seen a lot of ways how to do this in pure PHP in a custom page template, but if I try to ...
0
votes
2answers
178 views

Is there a straight-forward way to iterate over all shortcodes in a post?

I'm working with a shortcode [translate lang=eng]Apple[/translate] which will be shown only if the "current language" is eng. If the post contains, in addition to the above, the declaration [translate ...
-1
votes
2answers
153 views

Embedding BitBucket Code in Posting

I want to embed my code at BitBucket in wp post, anyone can suggest me, a good plugin or anytrick to do it?
0
votes
3answers
1k views

Automatically added brs and paragraphs?

Here's my very simple shortcode: function box_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'width' => 'auto', 'height' => 'auto', ...