The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
25 views

Include Entire Custom Page Template On Another Page

I am trying to create a "one page slider" where I am creating a custom page template to display multiple pages that I specify. (yes I know there are themes for this- I want to customize it myself) I ...
0
votes
0answers
16 views

Email post content

I have this function in functions.php to send an email when a new post is published. How can I add the content of the post as the message in the email. function authorNotification($post_id) { ...
-1
votes
1answer
40 views

Display post's description and caption

I am trying to get and display 5 featured posts. To achieve this target I have an offset of 5 recent posts. I have successfully fetched the posts' id's and images, but I failed to get every post's ...
0
votes
1answer
45 views

wp_insert_post -> post_content not showing

I have a problem with wp_insert_post. When I'm attempting to insert my post, the post_content essentially shows up as just blanks spaces. I even went into MySQL to confirm. Everything else, ...
0
votes
1answer
26 views

Checking post content for a shortcode, but content is being returned as empty

Alright so I am trying to check for a shortcode in the post content so that I can enqueue scripts as necessary. I have this: if( plugin_has_shortcode() ) { // Load CSS ...
1
vote
1answer
29 views

Get IDs of posts currently visible on archive

This probably is a easy one for many. And also probably is already answered here, but I don't know how to search for it - so sorry I did search but not found anything. I like to get the contents of ...
0
votes
1answer
45 views

How to get post content from an array of ids?

How do I get post content if I have an array of id's. Basically, I have a function that get post content if you provide an ID. but it doesn't work if I have an array of id's. My function is: function ...
0
votes
0answers
66 views

post_content not parsed using save_post action hook

A site I'm building for a client has to be able to download Vine's to a server when they've been posted using a shortcode ([vine id="..."]). This works fine for my local install (it's a Multisite ...
0
votes
1answer
26 views

Custom content before post content

I am using this code to insert custom content after title and before content. How can i limit it to only "post" not pages and custom post types. function theme_slug_filter_the_content( $content ) { ...
0
votes
1answer
126 views

post_content is empty

I'm trying to make some plugin. This plugin is some kind of auto posting. function new_post($title,$content) { $post = get_post($id); $feat_image = wp_get_attachment_url( ...
0
votes
1answer
105 views

post_content with line breaks

I want to be able to get post_content with line breaks. What is the best way to do it? I previously use the_content() which was working fine until I needed to install a plugin that adds share buttons ...
0
votes
3answers
102 views

Conditionally set post_content in wp_insert_post

Is it possible to conditionally set the post_content in wp_insert_post? Im using a foreach to add multiple pages at once: foreach ($create_pages as $new_page) { $add_pages = array( ...
0
votes
0answers
35 views

form to post multiple inputs into post_content

I have a form, with multiple inputs that I am trying to get posted to the wordpress "post_content". I am able to get the title field and only one other field to post successfully, only when making a ...
0
votes
0answers
21 views

How can I limit posts when using template_redirect?

I'm trying to redirect a query (http://example.com/custom-post-type/?action=create) to a template file (page.php) while also replacing the_content. I've more or less gotten it to work. But the end ...
0
votes
0answers
36 views

Add class to all parent elements inside the_content

Is there a way to add a class to all parent elements inside the_content? My problem is I'm using this kind of css selector: .post_content>* {margin-bottom:10px;} This is to due with mostly ...
0
votes
1answer
367 views

Content area is too small

I want to change to the new twenty fourteen theme because it's a nice look and feel. However if I try so the content is reduced only on a small area and a lot of space on the page is unused. I ...
0
votes
1answer
98 views

How to add content at the end of posts?

I am trying to add custom fields at the end of posts. I succeeded showing the custom content using the below mentioned code. But the main post's content was replaced. : function ...
2
votes
3answers
64 views

How to *disable* the post content editor

Any good ideas on how to disable the post content editor? I don't want to hide it, remove it, or remove the page. The goal is to allow users with few permissions to view the edit screen so they can ...
0
votes
1answer
62 views

Add custom content to nonexistent page

I am trying to add content to what would otherwise be a 404 page. For example I want to define post content for mysite.com/existing-page/imaginary-page instead of showing the 404 page. I've tried ...
1
vote
1answer
250 views

Creating a post from data returned from HTML form

I am trying to write a WordPress plugin and I have hit a bump. The Background: I have some data in a mySQL DB that I am using (each row has a unique ID and some other information I have added). I am ...
0
votes
1answer
69 views

Copy url from post_content to custom field

I'm new to MySQL so I don't know if this is even possible. I would like to copy a url that's in post_content to a custom field. The url is variable and it looks like this: ...
-1
votes
1answer
79 views

How to handle parent and child pages?

I want to list episodes of a series I am making of instructional videos with content. The patent page "series" will list episodes weekly. Ie: episodes 1, 2, etc. I'm thinking to setup a template to ...
7
votes
1answer
1k views

When is the 'post_content_filtered' column in database cleared by WordPress?

Some WordPress plugins (although very few) use the post_content_filtered column in database to save some data related to a post. For example, Markdown on Save stores the markdown version of a post ...
1
vote
2answers
59 views

Show image exactly defined to a width

I have a photoblog displaying posts as image galleries having width 500px and some posts as single image of width 900px. For posts with 900px width images, I made category HQ. Posts with 500px width ...
0
votes
1answer
103 views

Post content not showing some content

I'm inserting posts by wp_insert_post function. It works like first a post is created to get its id then an image is attached to that post id. I attach images by media sideload function. Here is the ...
0
votes
1answer
98 views

Display one post in different formats conditionally

I think I just coded myself into a corner. I am setting up a page with an image. The image is an imagemap with lots of links. When you click on the link, it opens a post in a colorbox. So far I have ...
0
votes
2answers
36 views

How to display the content HTML of a page without displaying the gallery code as well

I am using the below to fetch the content of a page by its name and output the html $my_wp_query = new WP_Query(); $page = $my_wp_query->query( array( 'post_type' => 'page', ...
0
votes
2answers
670 views

Strip HTML Tags From Search Results

When I make a search, if there is an image title within a img tag, it's displayed in a very ugly fashion among the search results (the whole tag is displayed and the picture too). I found this script ...
1
vote
1answer
336 views

Updating post content on the front end

I have used the code below to add frontend editing to my posts/pages. How would I go about saving the post content when an update/save button is pressed? $post_id = get_the_ID(); $settings = array( ...
3
votes
2answers
687 views

How do I insert a short tag after 350 words in post_content?

I have 700 posts mostly in excess of 1000 words each. I'm setting this up as a membership site. I'm using wishlist member and would like to protect all the content after the first 350 words. This ...
0
votes
2answers
376 views

If post content exists (any post content), do not display featured image

If post content exists, do not display featured image, if it does not exists, then display featured image or url. So, basically I want featured image to be displayed only if nothing else in post ...
0
votes
0answers
25 views

Final Attempt - Adding default post content based on category? [duplicate]

Possible Duplicate: Adding default post content for category Been struggling with this for a while now, but thought I'd give it one last go. I have some default html content (a few divs to ...
4
votes
3answers
542 views

How to embed page content in a blog post

I've built an HTML table that is posted on a page in my site, and I'd like to use that same content inside a blog post (something of an announcement of the table's publication). The table is likely to ...
0
votes
1answer
97 views

Query does not return content

Working on updating an old WP site developed for WordPress 2.0 and have a post (page) query that does not return the "post_content" data. Here is said query: $the_query = ...
0
votes
1answer
233 views

using query_posts to pull posts out of a category in a while loop. Getting odd echo

I have a custom template file I've been workin on. I have this code performing a loop after it queries posts from a certain category. This works and I have each post configured with styled divs, but ...
2
votes
1answer
317 views

Check if page/post has any anchors that link to an image jpg/gif/png

What I'm aiming to do is add fancybox to a site I'm developing, but I only want to enqueue the JS/CSS etc if the page/post needs it. My thoughts are that I would need to check all the anchor tags on ...
0
votes
1answer
278 views

Plugin scans for images in post_content, how about “featured image”?

I use WordPress SEO by Yoast, especially for the Google News sitemap feature. My theme is coded in such a way that the main image of a post is also the featured image of the point (i.e. the same ...
6
votes
4answers
14k views

Get post content from outside the loop

Is there a way to get the content from another outside the loop? The ID is 302 and I need to display the content of that on another page.
1
vote
1answer
248 views

Float images in content

This is not a programming question. I have the problem to update the content in my WordPress blog. I'm very aware this problem can be solved by html modification. But my client doesn't know about ...
2
votes
0answers
240 views

Removing the title attribute from links in the post content

When using the WYSIWYG editor to create links, and selecting an existing page or post from the selection list, those links will have a title attribute by default. Is there a simple way of turning off ...
0
votes
1answer
334 views

Where is the content cache when using apply_filters('the_content…?

The following code block is giving me an accumulated result: foreach($sections as $section) { $content_post = get_post($section->ID); $content = $content_post->post_content; ...
0
votes
2answers
62 views

Wordpress: Loop Help

I was working on this site this morning and I ran into a bit of an issue with my static page. I have a "featured" post section and I use: <div id="featured"> <img src="<?php echo ...
6
votes
4answers
27k views

Proper way to get page content

I have to get specific page content (like page(12)) I used that : <?php $id=47; $post = get_page($id); echo $post->post_content; ?> Work nice execpt for compatibility with qtranslate ...