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

learn more… | top users | synonyms

0
votes
1answer
12 views

Showing content from one page on another

There are many posts that seem to strike around this area, but I'm more and more confused by each one I read. I have a page that shows the "Terms of Service" (id = 1772). I would like to display the ...
0
votes
1answer
16 views

Remove links from the_content when using filters wp_trim_excerpt

I'm using wp_trim_excerpt which is working perfectly but I want to strip the links contained in the the_excerpt (using get_the_content), I've looked online and tried many solutions to get the thing to ...
0
votes
0answers
26 views

When can a template skip the loop?

I've reached another point with WordPress where something simple is stumping me. In working with an older theme, I have some page templates that do not call the loop. They simply use ...
0
votes
0answers
13 views

Filter the_content() to add custom figure tags

I'm trying to implment responsive images on my site, and have all the required component parts working, and understand the concepts, but need some help putting them together; Knowing that WordPress ...
0
votes
2answers
25 views

Stripping <p> tag from elements in post

I'm fine with P tags for most of the content, since it makes styling easier. However I'd like to have span div iframe and possibly other HTML tags to not be placed inside of a p for post. I saw this ...
1
vote
1answer
19 views

Only display videos and images in the_content() within loop

The issue I am trying to solve is within the WordPress loop, I only want video embeds or images to display, not any text. Currently, when creating a new post (Standard format) in the WordPress ...
1
vote
1answer
35 views

Changing Image Size In The Content tag

I am developing a WordPress theme locally and I can't figure out how to get an image to display in a normal size in the_content(). At the moment, the images are displaying the same size as my featured ...
0
votes
0answers
9 views

Loading ajax does not run through filter the_content

I have created a quiz page with a list of question. I use ajax to load the question content into the quiz. However, only the first question which loaded directly (not through ajax) render correctly. ...
0
votes
2answers
24 views

Echo Most Recent Sticky Post in Loop?

I am looking to echo the most recent post in the loop of content. Only 1 post. Do I need to put some sort of parameter on the following code: if (have_posts()) : while (have_posts()) : ...
0
votes
2answers
403 views

Include custom fields into the content of a regular page

Here's my setup: Parent "Gallery" page: _regular page, not custom type or anything _ Several "Project" child pages (could be as few as 1, unlimited number): also normal pages Child pages will ...
0
votes
4answers
1k views

How to limit the characters shown on the page - get_content

I've the below php to display the content of the post id#9 on my 'home page' of my site, so that whenever the client updates the page, it's reflected on the homepage as well - rather than having to ...
1
vote
1answer
419 views

Remove specific shortcode from get_the_content()

I have a variable like this: $post_content = get_the_content(); Here i want to remove some specific shortcode from the $post_content variable e.g i want to remove only this [video height="300" ...
0
votes
2answers
23 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
0answers
29 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
39 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
393 views

the_content() “crashes” for single pages

I have big trouble with the_content() for single.php. Whats my problem? the_content() doesn't give any output on single pages furthermore it crashes (no other PHP code below the function call is ...
0
votes
1answer
16 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
24 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
52 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
22 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 ...
1
vote
1answer
64 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
175 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
24 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
5answers
2k views

remove <p> tags from the_content

I've got a post format of Image, and I am running into an issue where the image is being wrapped by a <p> tag. I want to get rid of that tag (specifically on the single.php version) of those ...
0
votes
0answers
17 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
33 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
63 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
20 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
45 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
83 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
44 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 ...
3
votes
1answer
1k views

Add something to beginning of the content

I'm using add_action('the_content', 'myFunction', 10) to append data to the end of the content. How can I place content at the beginning of the content?
1
vote
1answer
103 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
165 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
51 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
45 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
78 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
29 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 ...
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 ...
1
vote
1answer
96 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 ...
0
votes
1answer
42 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
49 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
53 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
85 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 ...
-4
votes
1answer
2k views

How I can show short content with short tag

I am using Wordpress and I want to show ** short content with limit ** of words for every post on home page and for this I am using this code functions.php function abc_the_content($num_words) { ...
2
votes
2answers
363 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
35 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 ...
1
vote
2answers
525 views

Replace audio links with jplayer using the_content filter

I am attempting to use : add_filter( 'the_content', 'filter_function_name' ); To find all of the anchor tags in my post which link to a .mp3 file, and then replace them with a jplayer instance that ...
0
votes
0answers
45 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 ...