Displays the contents of the current post. This template tag must be used within The_Loop.

learn more… | top users | synonyms

0
votes
1answer
40 views

Dynamic bootstrap tabs with post_title doesn't display the_content

Im trying to use bootstrap tabs to have a tab system following: Each tab has the_title (post title), on click of each tab, display the content. So far, I have all the tab listed correctly, and the ...
0
votes
1answer
20 views

Information on plugin adding text when a post, page, or other such is displayed

I need to know what API a plugin would need to use to add text or HTML to the beginning or end of a posts's text when the post is displayed. I have searched on Google - but none of the leads I find ...
0
votes
0answers
16 views

the_content interrupts sidebar

I am using a shortcode in a sidebar which is getting the excerpt, and a plugin which is using the_content filter to edit the content. The problem is that what ever changes I make through the_content ...
0
votes
1answer
29 views

WordPress the_content Page Load

I am creating a Quiz for WordPress in which it replaced the WordPress post content with a Quiz if you have enabled it. There are a total of 5 questions per post and to proceed further you need to ...
1
vote
1answer
39 views

How to add custom content (text/image) at start of content (IN content ie the same line)

I would like to add some text or image at the start of each post (in a given post layout). I have found numerous ways to implement this before the content starts ie atop the content (of course, I ...
0
votes
0answers
16 views

creating one page theme but templates are not being applied to page content on the “one”page.

I am creating a one page theme. I have a loop that puts the content from each page on a single page but it does not apply the temple for each individual page. Here is the loop I am using. <?php ...
2
votes
2answers
38 views

What effect does the_content filter have on performance?

This is general question but lets say I have a function and on a specific page I want to display a table. The function only applies to one page on my site but every post/page will run this function ...
3
votes
1answer
50 views

How can I display image metadata?

I'm trying to add a filter to the_content that will find all images in the post and append the custom attachment metadata credit to it. Here's the functions I've have: Adds the Credit field to ...
1
vote
0answers
40 views

Mirror content based on URL slug

I have a training site that manages the same content across several branded versions. examples: .com/product-name-a .com/re-brand1/product-name-a .com/re-brand2/product-name-a Where all 3 are ...
1
vote
1answer
85 views

Execute Closing Shortcode After the_content

I need to execute a short code on thousands of posts which don't already contain the short code as i've added some manually. I'm using another function to add the opening short code after the 2nd ...
3
votes
1answer
138 views

the_content and wp_link_pages

Many plugins seem to be adding a filter/action hook to the_content to display related posts, advertisements and such. The problem is I these appear before the post pagination so it the pagination is ...
-5
votes
1answer
42 views

How can I customize the_content(); output? [closed]

I want to customize every image or p of the_content(); output, assign class and so on.. What I have to do?
0
votes
0answers
36 views

the_content() - Getting formatted text

I'm using the_content() to display the content of a post in my theme, but unfortunately im getting plain text (with link and pics of course but the other are just plain text). I want to get formatted ...
0
votes
0answers
47 views

split the content using more tag and array

I'm trying to create a function that allows me to SPLIT the_content in wordpress using the more tag in the posts field. However, I don't know what I'm doing and seem to be making a mess In my ...
0
votes
1answer
22 views

ECHO Executing 4 Times In Head

I have a plugin I created as a test and am running into a bit of trouble. The code is executing 4 times and placing what I echo in the <head> tag of the page. The reason I'm performing an echo ...
1
vote
1answer
63 views

How to ignore or disable nextpage tag?

I have this site that uses the <!--nextpage--> tag in posts for pagination purposes. I want to disable pagination, but without deleting the tags for the database (maybe they'll want to use them ...
3
votes
2answers
56 views

Is it possible to handle a specific section of a post separately?

I've tinkered with WordPress a little, but I'm far from an expert, so apologies in advance if this is a duplicate question. I've built a simple WordPress theme based around Bootstrap, and I can ...
0
votes
1answer
35 views

get query() without post content?

Is there a way to get query with post information (thumbnails, id, etc.) but without the_content()? I already have plugin to show recent posts in sidebars at homepage and when it is for example 20 ...
0
votes
1answer
28 views

Insert div after h2 in content

I'm trying to insert a div with a small bit of content immediately after the /h2 of single posts. I've given single posts a new class to help trigger this, as I don't want it after the /h2 on a page. ...
0
votes
0answers
35 views

How to parse a post and change the way a gallery item is rendered?

I want to use this plugin http://final-tiles-gallery.com/index.html to display the gallery the users insert in their posts, for that I need to use an specific HTML structure so the plugin works, I've ...
0
votes
1answer
20 views

Function the_content

For some reason on my attachment page template (http://capa.furniture/?attachment_id=1494) I am getting the url of the reduced size image. I do not know why. I am not getting the thumbnail full size ...
0
votes
1answer
51 views

Custom image size in the_content loop

I changed the default image dimensions for the "large" thumbnail and re-generated my images using a plugin. The new image size is only shown on new posts created after the image size was created. How ...
0
votes
1answer
66 views

Replace image scr with it's surrounding href

I'm trying to add a filter to the content to replace the src of all images in the content with it's surrounding href link. Any ideas how to go about this? The only thread I could find that came close ...
2
votes
2answers
259 views

Word limit in post_content after more tag

I am using the following code to hide the teaser and show content only after more tag in loop: <?php $after_more = explode( '<!--more-->', $post->post_content ); if( ...
0
votes
1answer
29 views

Should I find/replace values in the_content?

I'm creating a plugin specialized for a website. Most of the pages are pretty general (blog posts, contact pages, etc...) but a handful of pages will have custom code (specific SQL) for display ...
0
votes
0answers
31 views

get_post_fields as an excerpt

I have a strange question, I have built my site and my loop etc. But on my sidebar I want to add a sort of random post display, but I don't want the entire post to display, I've had some difficulties ...
0
votes
2answers
61 views

the_content() returning unexpected div wrappers

When I call the_content() i am getting <div class="page" title="Page 1"> <div class="section"> <div class="layoutArea"> <div class="column"> ...
0
votes
1answer
25 views

find shortcode inside content of post

I've a post with a video, contained inside the content. So, the content of my post is like: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur aliquam quam sed imperdiet viverra. In ...
0
votes
1answer
83 views

Can't get the_content to show

I'm using the following code to get posts from a category in a page. This category uses ACF for some fields. However, when I try to output everything, it shows everything but the_content. For better ...
0
votes
1answer
38 views

Concatenate a Function to the Post Content

I am trying to use the following to concatenate a function's output to the post content: function bottom_content($content) { global $post; $content .= course_resources($post->ID); ...
0
votes
1answer
22 views

Add Image Before Posts Entry Title

This code adds the image before all titles on the page. How do i add one single image before the posts entry title? function adt_abovetitle($title){ //Return new title if called inside loop ...
0
votes
1answer
109 views

page.php not displaying content

I am using a page.php template I have used on about 400 Wordpress websites, and all of a sudden the loop decides it doesn't want to display any content. Code is: <div class="text-content"> ...
0
votes
2answers
31 views

How can I output the content of the page using this code?

I found this code on stackoverflow, but how do I output the actual content rather than just that ID line in the example! <?php $the_slug = 'my-page'; $args=array( 'name' ...
0
votes
1answer
30 views

Showing content from Wordpress ruins page CSS using WP_Query, without, content does not show

I suppose I have a two pronged issue here. I'm trying to show wordpress posts on my own site. I have a page where people can view the list of articles, then when they click on one it takes them to the ...
1
vote
0answers
49 views

More efficient to add content to custom fields or the content area?

I often build themes that handle a lot of text content. I use Advanced Custom Fields to create several custom field areas per page for adding this content. I've also used themes with page builders ...
1
vote
1answer
994 views

apply_filters('the_content', $content) vs do_shortcode($content)

Lets say I have a theme option or custom postmeta text area. Now I want to execute multiple shortcodes, general texts, images etc. What will be best practice and why? Option 1: $content = //my text ...
0
votes
1answer
33 views

Empty the_content for all posts

I'm moving everything that is displayed with the_content in custom fields and i want to remove/emtpy the content of the post_content column in the database, for every post. Is there a mysql query ...
1
vote
0answers
47 views

<p> tag removed not using a filter

Very strange WordPress behavior: <p> tags are removed when placed inside <pre> tags, but not always. for example, this works fine: <pre><p>This is a ...
-3
votes
1answer
59 views

Which action/filter can i use for a Member Plugin [closed]

I'm a beginner in Wordpress Plugin development. I want to write a Plugin for a Member Part on my Page. I know, that Plugins for this Problem available, but i want to create an own Plugin ;) I want to ...
0
votes
1answer
59 views

The_content is different from category archive to other pages [closed]

I'm trying to use a plug-in that is adding bookmark button to the posts. It's working well except in the category archive page: I can't figure out why the_content() on page, post and archives (tags, ...
1
vote
1answer
126 views

Visual Composer integration

I've installed Visual Composer on my own template. The thing is that is not rendering all it's shortcodes. <?php $post = get_post( $post->ID ); echo $post->post_content; ?> Is that ...
0
votes
0answers
115 views

How to get one specific div from the_content()?

i'm trying to substring the_content() to get a div with a specific class. i'm using wpbookmark plugin, that add, at the beginning of the content, one div with the button to bookmark the post and i ...
0
votes
1answer
23 views

Remove images from the_content [duplicate]

I'm trying to show only content with all paragraphs (possibly divs,...) but with no attached images. I had some success with: echo preg_replace('/<img[^>]+\>/i', '',get_the_content()); ...
1
vote
3answers
161 views

How to use wp_rel_nofollow to add nofollow to external links only?

I want to add nofollow attribute to only external links in the content of the post. Internal links should stay follow. So, can I use wp_rel_nofollow() to make only external links nofollow? Or do I ...
0
votes
1answer
65 views

filter h1 tag to add a word at the beginning of the text

I'm looking for the best way to obtain this. For example, I have the h1 tag whic is: Web Design I want to add, in all the h1 tags of a certain post type, the same word at the beginning, which is my ...
0
votes
2answers
133 views

How to add pagination in between post and comments?

I am trying to add pagination in between post and comments. I used plugin Automatically Paginate Posts for that in which i can able to add pagination after comments and facebook plugin. Is it ...
0
votes
0answers
38 views

Capture the content of a second page to an output buffer

I have plugin with the following admin action which allows me to send the contents of a specific wordpress page to a registered user via email. The code was working perfectly, an email was sent and ...
1
vote
3answers
54 views

the_content() seems to block my ACF-code

I have this simple code, but can't get the_content and the ACF-code to work together. If I include the_content() it blocks out the ACF-code, but if I remove the_content() the ACF-code works fine. I ...
0
votes
0answers
20 views

How can I append content from another given id in the current post?

I need to append the content from a couple given post ids, into another specific pages. This is what I've tried but it's not working. The goal is to append the content from posts id 1794 and 2094 ...
0
votes
2answers
301 views

Proper way to replace the_content only for pages created by custom plugin

I'm creating a plugin that needs to replace the_content of only two specific pages that it created upon activation. Here is my code: add_filter('the_content', 'emd_content'); function ...