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

learn more… | top users | synonyms

0
votes
0answers
10 views

custom post type grid with content in lightbox

I'm going around every single wordpress plugin and impossible to find something with this featured . . . . I need a grid list of some custom post type - with inline filter. This is fine and tons of ...
0
votes
2answers
30 views

Problem in exploding the_content to array

I've written a code in a WP_Query to converting a string (the_content) to an array (choices). But it seems wrong! In fact, the choices array is empty after each loop. However str string is notnull. ...
0
votes
1answer
13 views

changing size image within the content

I'm trying to get my images inside the post may larger than 800px ; For this I took a function that resizes image here and I'm trying to create a function to my thumb inside the post come with size ...
0
votes
1answer
19 views

Filter Content on all Post Types

I had this idea to introduce a 'post type footer' using Advanced Custom Fields so that my users could set up common, reusable messages or calls to action and have them appear after the content of a ...
0
votes
1answer
39 views

How can I extract the URL of a link from a post?

I am pretty new in WordPress and I have the following doubt. I have a page that take some informations from a list of post that belong to a specific category and show these informations into ...
0
votes
1answer
18 views

Put teaser content, more-link and full content in different divs if existing… Possible?

im working on a flip-card template and have a problem. <div class="card" id="card-<?php the_ID(); ?>"> <div class="front"> <div class="card-headline"><?php ...
0
votes
2answers
19 views

Expandable WordPress content (text) inside a post

I've created a CPT in my WordPress site. In this CPT I have the content element (which is the default WP content) and want to make it expandable, I mean, while viewing the CPT I want it to only ...
0
votes
1answer
87 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
22 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
56 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
18 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
40 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
62 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
43 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
96 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
156 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
45 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
42 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
66 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
25 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
83 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
59 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
37 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
41 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
48 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
55 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
79 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
306 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
31 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
35 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
70 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
26 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
96 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
43 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
30 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
129 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
31 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
54 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
1k 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
52 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
65 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
64 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
141 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
142 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()); ...