Questions tagged [content]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
3k views

Bulk move (or copy) from a custom field to the post content?

I need to move (or copy) the contents of a custom field into the main post body, replacing any existing content. I need to do this for a few hundred posts...Is there a quick way of doing this? I can ...
0 votes
1 answer
100 views

Printing first line of content in wordpress

I'm trying to print just the first line of content on wordpress post: $lines=the_content(); $lines=explode("\n", $string); echo $lines['0']; But it doesn't work. I must say I have looked everywhere, ...
0 votes
1 answer
927 views

How to Create custom xml file for demo content for custom theme?

I am created custom Wordpress theme. Now i need to create functionality for demo content import such as Pages, Posts, Widgets, media and menu. My question for demo content is possible for above ...
0 votes
1 answer
174 views

What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?

I'm working on a plugin that takes $content for a post and alters some of the HTML. Seems there are two common ways to accomplish this in WordPress - using jQuery or using PHP's DOMDocument. I'm ...
0 votes
1 answer
211 views

Content disappears when searching with Search & Filter plugin

I manage a website in which the plugin Search & Filter is being used to go through the content by visitors. With a particular search query, the content appears correctly, soon to disappear ...
3 votes
2 answers
7k views

Get Content From Blog Page

I have a page that is assigned as the "Blog". What I'd like to allow is the user to add content to this page then display it before the posts show up on index.php. I thought I used to be able to do ...
13 votes
2 answers
2k views

How can I keep the content of my pages version controlled?

We have a WordPress-based website that provides documentation to our REST API. Since our API is constantly changing, so is the documentation. However, we would like to keep the documentation version ...
11 votes
4 answers
71k views

Get content from one page and show it on another page

So, I've been googling and reading and testing and failing. I'm fairly new to php, so don't expect to much :) I'm working on a new design, and I want to show content from the about page on my ...
10 votes
3 answers
45k views

use query string in URL to display content on the page

I'd like to say something on my page based on what page the person got there from. I can set up the link to that page to be: www.example.com/page?parameter=myparameter Is there a way I can access ...
1 vote
1 answer
107 views

How to retrieve text only from a post using WP CLI?

I have the post ids and urls. I need to extract the post content make some modifications and update again. I have more than 2,000 posts hence I would like to do it using WP CLI and not manually. Can I ...
0 votes
1 answer
64 views

Before & After Content - After Content directly below Before Content when using require_once

I've encountered an issue that I can't seem to figure out. I am using require_once to place content before and after the page content on my homepage. The before content works perfectly and displays ...
0 votes
0 answers
32 views

Custom changes performed on WP + WooCom site on maintenance subdomain. How to perform a migration to a main domain?

I was working on a WP + WooCommerce website (shop + blog), very active site - a lot of orders, users and posts. I was working with some plugins (settings), installing new plugins, removing old ones ...
12 votes
4 answers
57k views

if the post has content

I am setting up a one page WordPress site. I am getting some pages listed in my site that does not have content. For example, I will get the empty blog page as well as the blog template. So I thought ...
0 votes
1 answer
383 views

Insert menu with a custom walker into page / post body using shortcode?

I'm trying to add a menu using a custom walker class into a page or post body and settled on using a shortcode. I don't have to use a shortcode, but I do have to embed the menu into the central ...
1 vote
0 answers
26 views

Control Content On Non-Blog Pages

I'm new to WordPress, trying to learn it's capabilities. My Goal My goal is to make a normal website but have it's content (text and images) be adjustable by the user / client, managed content. An ...
-2 votes
1 answer
40 views

How do I edit the data/content inside a wordpress theme?

Im new to word-press, I have purchased a theme, and imported it with its demo data, how do I now edit the actual content of the website, and replace the demo data? I have tried going on the 'Pages' ...
0 votes
1 answer
230 views

Custom slugs for Each Tab

I have a website for musicians information. The information is divided to few different subjects, using tabs - 'General', 'Songs', 'Albums' and 'Videos. <?php if($tab_story){?> <li role="...
0 votes
1 answer
222 views

Using Elementor to get dynamic content for wordpress on a predefined theme

Lets say i want to put posts on a page in an elementor page, but these posts should have a specific tag to show up here, I.E pulling posts dynamically from posts to a page according to a tag, or a ...
0 votes
1 answer
177 views

Problems with setting up a subdomain to serve images and scripts

I'm trying to optimize a site and the last thing I want to do is to serve static content with a subdomain that will be without cookies, and I have a problem with that. I tried a couple of things to ...
-1 votes
1 answer
87 views

SQL Query : how copy all tags of post into their post content in wordpress by sql query

I want to copy/move all tags of a post into posts content, as text form not in a link form. For example: A post has: a title in title field, some content in content field (like: a ...
0 votes
1 answer
203 views

remove string: 'custom content...' from every page

I'm not quite sure how this came about, but every page on my site has the text 'custom content...' appended to the end of the body. The string appears within <p> tags on the frontend. I've ...
1 vote
2 answers
438 views

How to change featured content to a different tag in Wordpress Twenty Fourteen?

In twenty fourteen theme, we’d like to know how to change the features content tag. Currently it’s set as featured. Now, we would like to know how to code this for different page templates. We ...
0 votes
0 answers
34 views

Content export, reinstall and content import

I run a WordPress site and I need to change the theme to a new, faster one. However, when I install the new theme and Import demo content, the site doesn't present well at all. I'm thinking of a way ...
0 votes
0 answers
19 views

How is it possible to create Multi part sections where people can answer or comment or vote on various parts of a page's content as given example?

How is it possible to create Multi part sections where people can answer or comment on various parts of a page's content as given example? Using this as a reference example (can attach screenshot if ...
0 votes
1 answer
269 views

Display Full Content Instead of Excerpt

I want to display the full page content rather than the excerpt in my child theme. If I make the changes to the parent, they appear on the site. If changes are made to same exact file in child, they ...
0 votes
1 answer
381 views

Trying to modify content.php

I am trying to tweak the bootstrap basic theme so that it shows excerpts. It does it when using search but not by default. I am trying to figure out what I need to change on the content.php file. ...
0 votes
1 answer
50k views

If user is logged-in display/hide something

I want to check at page load if the user is logged in or not and hide the login mask I programmed accordingly. There is a reason I'm using said login mask instead of redirecting to the WordPress ...
0 votes
0 answers
38 views

Pass form inputs to page content

is it possible to pass form input to page content? In a WordPress Multisite I’d like, when a user register and create his own website, to make him compile a form with the text and the photos that will ...
0 votes
1 answer
110 views

How to remove massive link in WordPress content

I would like to delete certain link that I have in the content of all the entries, for example : <a href="https://www.sitio.com">link contenido</a> Change it to: link contenido Or ...
0 votes
0 answers
23 views

How do I get a reference to the HTML memory buffer while the page is being constructed?

I want to view & update the buffer with html "<head>" data section in it, after the head has been generated. Problem statement: I have created some shortcodes in a plug-in which, if ...
0 votes
0 answers
333 views

How to parse any content which was added after the working out filter 'the_content'

How to parse any content which was added after the working out filter 'the_content'? For example I have html structure of the simple page that i was created via Worpdress Admin Dashboard -> Pages -> ...
0 votes
1 answer
46 views

mixed content missing from wordpress media

Hello Can someone point me to right direction about how to fix this issue please? I tried it with really simple ssl, didn't work. Image is no longer in wordpress media and it has been deleted. (...
0 votes
1 answer
41 views

Please tell how to stop the category from showing up on posts

Please tell me how to remove the category hence, it does not show up on posts. my content.php file is given below...which contains the code for showing up meta. but I am not able to figure out the ...
0 votes
0 answers
76 views

How to get Post sidebar & footer including html like get_the_content() which only gets content section?

I want to get sidebar & footer including html of current post. Then I want to check a "string" inside sidebar & footer. If "string" exits, I want to enqueue a custom script. If anyone knows ...
1 vote
2 answers
5k views

How to load all pages into one page with their templates

I am learning how to work with Wordpress, and im trying to build my own website in it. Since my website is a onepages, i would like to be able to load all my pages ( they then count as sections ) to ...
0 votes
3 answers
3k views

How to just show first line of content

is it possible to show only the first line of content <?php the_content(); ?> or alternative only content between <b>text</b>?
0 votes
0 answers
30 views

How do WordPress themes work in relation to content?

Premise: I have experience with WordPress only from an admin's perspective point, not custom themes, so forgive the that the question is very general. I am well aware that WordPress stores content in ...
0 votes
2 answers
32 views

Open content directory help!

I just found out tha I have a wp-content directory that is open where you can see all of my files that I have on mysite- pdf's, jpgs, etc. Files that are meant to be for members only as well....all ...
0 votes
1 answer
664 views

Replace Text with hyperlinks

I would like to replace few words in the content of the posts. For example. Original: Here is my test string. Which Need to Replace First Test word in the string. Excepted String: Here is my <...
0 votes
1 answer
35 views

Copying content from my other websites

I am currently working in a website for my company to clean up and create new modules. In this company website we share news/alerts or updates on our industry or regarding to our company, we can ...
0 votes
1 answer
1k views

Page content not visible in backend

I was asked to take a look at a WordPress website. The front page had a lot of content on it, that I wanted to edit, but when I opened up the page editor, there was nothing at all in the content field....
0 votes
1 answer
51 views

If I use a static page-slug.php for a page, is the database still queried?

I wonder how to display a static page in order to increase the page load a little bit: The first option is to put the content in the database (via the Admin GUI), the second option is to create a page-...
0 votes
2 answers
3k views

jquery: getting contents of #content field on post page

I managed to get the #content field html with this jquery call: jQuery("#content").html() This seems to be failing though on "Add New Post" pages. Any tips on how to get the contents of the #content ...
0 votes
1 answer
92 views

Delete/Replace words from X to Y in post content

I am looking for a way to search and replace some words in my database. I have many posts on one of my blog and i want to replace words using regexes. before publishing, I marked every place I wish ...
2 votes
5 answers
5k views

How to delete all posts, categories and tags from Wordpress database

I have WP website with over 40,000 posts. Now I'll like to delete all posts, categories and tags. So All content and related meta. All I want to keep is static files. Is there a easy way to do this ...
0 votes
1 answer
33 views

What is best practices to move the following code into a function?

I have written this code block for my page.php file that determines if the content has a readmore tag, and then I break up the content using the get_extended function: $content_arr = get_extended ( $...
1 vote
1 answer
1k views

Empty string supplied as input when parsing content

I have this code: <?php function mb_find_my_image( $content ) { if( is_home() ) { /* if is home start */ $dom = new domDocument; $dom->loadHTML($content); $dom->...
1 vote
0 answers
21 views

Missing content in Pages only

I have an odd one. One site is missing all content on it's page (but not posts.) If I add a filter on 'the_content', $content is empty. I've tried giving the filter priority of 1, 0 and even ...
1 vote
0 answers
80 views

Doctype printed on the page content

Strange problem on the site. WordPress template is GoodLife - Responsive Magazine & Newspaper Theme Even after disabling all plugins and changing WordPress template nothing changed It appears ...
0 votes
1 answer
39 views

Can't save WordPress post with "/etc/" in it

In my self-hosted WordPress site, if I create a post with "/etc/" (without quotes) in it anywhere, I get a 404 Not Found when I save the post. Wrap it in <pre> tags, or even escaping the ...

1 2
3
4 5
11