The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
37 views

How to get a post's content?

I'd like to known what is the best solution for getting a sepecific post's content. By slug, tag, id or category ? Or template assigned to this post ? I don't like the way to find this post by its id ...
0
votes
1answer
593 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); ...
0
votes
1answer
20 views

How to add & show new fields in posts in Wordpress

Im have created post types called news in wp-admin which will be able to add New News and display on News page. Here are some screenshot first look at them, that is how i want to display stuff. ...
-1
votes
2answers
25 views

Load files content [on hold]

I would like to load a css file in my Wordpress plugin by php. First I tried file_get_contents: $stylesheet = file_get_contents(plugins_url('assets/css/fonts.css', __FILE__ )); But than I get this ...
-1
votes
1answer
33 views

Using a filter in functions.php to add content to single posts regardless if post is in main or child category

Im using following filter (codex) to add some html content with a lower priority (20) to the bottom of my single posts wich are in a specified category: add_filter( 'the_content', ...
1
vote
3answers
372 views

Add default content to post (for specific category)

I'm trying to add some default content to my posts using this code in my functions.php: add_filter( 'default_content', 'my_editor_content' ); function my_editor_content( $content ) { $content = "My ...
-1
votes
1answer
23 views

How can you find and replace text in wordpress files on localhost xampp folders?

I am trying to do some find and replace in files tasks to my Local Wordpress installation with Xampp. But some text can't be found, for example content text. I have a multisite and I want total ...
0
votes
0answers
16 views

Compare two posts by taxonomies

I have posts written about products without plugins but each product post has the same taxonomy same meta and same heading font size for each section for example : Product name: Product1 Price: XXX ...
0
votes
1answer
34 views

Wordpress each user has each content for a page,how to do that?

I am a newer of PHP language,I have a project of user system,that need each user has each different content,I place the content to a page,when user login,open this page will display that content.To do ...
0
votes
1answer
13 views

WordPress get_the_content losing formatting when emailed

I'm pulling the content of a post outside of the loop to send in an email like so: $content = get_the_content(); However, when I craft the body of the email: $body = 'Hello: ...
0
votes
1answer
540 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
3answers
2k 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
1answer
721 views

Automatically search and replace link in content (pages/posts)?

The users of my site mainly share documents by inserting links into content (pages/posts) using the built in editor. These files include everything from pdfs to word documents. The users currently ...
0
votes
2answers
958 views

How to add custom page elements to the WYSIWYG editor?

On a plugin-less Worpress installation the WYSIWYG editor allows to write a page down from top to bottom with style buttons (lists, font, italics, bold, add picture ...). What I am missing is the ...
0
votes
1answer
23 views

Change Content for Specific Page

I want to be able to replace a page's content if it is a very specific page. Here is what I've written so far: function signup () { global $post; $slug = $post->post_name; if ...
3
votes
2answers
35 views

Where to hook into post content?

Which hook or filter is used to edit the post content before the_content filter is applied to it. For instance, if I wanted to add Hello World, as the first text in every post.
1
vote
1answer
9k views

Forbidden 403 error, permission to access, unable to read htaccess

Recently clean-installed (with exception of themes and content/upload folders) an old wordpress to the latest Wordpress 4.2.2. I continue to get this error below whenever I load files such as ...
2
votes
1answer
1k views

Split content into multiple columns using more tag?

First of, this is pretty much an exact duplicate of: Split columns into three+ divs? But the given solution does not work (returns blank). I'm guessing it collides with qTranslate which adds some ...
0
votes
1answer
55 views

A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom

Everything was working well, but somebody wrote a post with the following inside: <iframe blablabla (a video) </iframe> <div style="clear: both; height: 3px; width: ...
11
votes
2answers
5k views

Best practices for localizing WordPress content?

A client asked for a blog that will have localized content (i.e. en.blogname.com for English content, fr.blogname.com for French content, etc). Being new to building such a blog, we recently ...
0
votes
1answer
34 views

Add caption to thumbnails in content

Still trying to get the answer, i don't really know wordpress core (but i'm actually pretty good in PHP), I can't find how to add caption to my images in posts. I know we can use get_posts to any ...
0
votes
1answer
31 views

I am not seeing any content within WordPress after migration?

Last night I migrated a site to a live server using Duplicator, all seemed to work well. Today I just noticed that once logged in, WordPress is not displaying any content on the editor? Although the ...
0
votes
0answers
14 views

Category page ordered by custom fields with IF conditions

on my site I need to sort posts by a custom field when shown in category pages like this one, but my problem is that I kinda need to do it like this: -if post of the "lyrics" type has the field ...
2
votes
4answers
1k views

Is there un-wp_autop function?

I have a problem with WP that need your help. Some of my posts have content that was applied "wp_autop" filters already. This filter turned all double break lines into <p> tag. I want to the ...
0
votes
2answers
46 views

Adding Custom CSS with PHP

I am creating a WordPress plugin to help people protect their content from being copied. There are many plugins to protect content from being copied when JavaScript is on, but no plugins which protect ...
0
votes
3answers
379 views

How can I return shortcode output to the top of the content?

I have a shortcode called update which is used as follows [update title='' date=''] this is some update, etc. etc. 2 paragraphs or more [/update] This outputs some html that wrap the title, date ...
5
votes
1answer
124 views

Get ID of a page containing secondary loop in content

I am trying to get the ID (outside of loop) of a page which have a loop of another CPT within its content using a shortcode. If I do a print_r of get_queried_object(), all I get the args used to ...
1
vote
3answers
331 views

Best way to eliminate xmlrpc.php?

What is a best way to eliminate xmlrpc.php file from WordPress when you don't need it?
0
votes
1answer
34 views

Regex works in regexr, but not if I filter content [closed]

I want to filter the content of everypost and add classes to my links depending on certain conditions. At the moment I just want to filter all href attributes from the content and change them. ...
0
votes
0answers
30 views

Update content post and meta-boxes.php

I have "stupid" iussue (for you), but difficult for me. I need to change (on the fly) the post content when I publish or update the post, and I did it simple adding some code to the ...
0
votes
0answers
29 views

Is there a way to capture http request variables and provide different content?

I want to implement a rest webservice on top of wordpress. That means that for a given content type (custom), if the request either cotains something like ?format=json or the http negociation accepts ...
8
votes
4answers
19k views

Stop WordPress automatically adding <br> tags to post content

Is there a way to stop WordPress from automatically inserting <br> tags when adding returns in the WordPress text editor. I would like for it to behave more like a code editor where I can ...
1
vote
1answer
23 views

How to create new post content templates for my users?

I admin a wordpress site for my kids primary school. At the number of editors/contributors is small, but we'd like to expand it. To simplify the uptake for some of the office staff I'd like to have ...
3
votes
2answers
54 views

What is the impact if i ignore title and content in my custom post types CPT?

I am using CPTs (with PODS) and i need to "ignore" in "supports" the title and content. I have no problem to alter the columns in the admin manage CPT list. Also i understand that the standard ...
1
vote
0answers
19 views

How to implement comments on specific fields in wordpress?

I have a custom content type in Wordpress, having some custom fields. I need some of this fields to be opened to comments, that is Content Flower --> Field Name --> Field Color --> Field ...
0
votes
0answers
20 views

One click install on WordPress site

I am trying to follow this One Click demo content installation feature in WordPress theme options panel. Did everything right as mentioned but it does not seem to work now. Also en-queued the JS file ...
0
votes
0answers
10 views

How to fix the format of entry pages with thumbnail images?

I am trying to make the entry posts with a thumbnail image to the left, and title above the excerpt of the article to the right of the thumbnail, but aligned with it. Currently, the thumbnail is below ...
0
votes
4answers
893 views

How do I make certain areas editable?

I'm new to wordpress and I'm currently converting an HTML/CSS site I made to wordpress to make it easier for my client to edit it from the admin panel. I have provided 3 screenshots and I'll refer to ...
1
vote
2answers
612 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
2answers
44 views

Inserting ads within content

I want to show adsense ads below the 4th and 20th paragraph of every blog post, ONLY if there is a 20th paragraph. I managed to insert an ad below the 4th ad by placing the following code in my ...
0
votes
3answers
759 views

Convert all youtube link to embed

I have this function to convert any YouTube URL in any post or page to embed :- function embed_youtube_an($post_content) { global $posts; ...
1
vote
1answer
30 views

Setup private content for specific users with daily updates [closed]

So I have only found membership plugins which cater for private area where users can access the material after paying depending on their role. I need to make a dashboard kind of area where users can ...
0
votes
3answers
63 views

Adding Template Post Content

I've tried searching for this using various terminology, but I always end up at questions pertaining to the php template files. That's not what I'm looking for, so I'm asking a new question. I ...
0
votes
0answers
20 views

Editing specific text on Custom Page Template

I'm a Wordpress beginner and made my first personal theme from a static html website. Currently I'm trying to edit specific text on for example the homepage. I did manage to changing background color ...
0
votes
0answers
29 views

Need help for showing same front content page, search page and portfolio post page

I want same front page content for post front page, search page and jetpack-portfolio page. Currently search page not displaying post thumbnail and jetpack-portfolio page not displaying entry-meta. ...
1
vote
1answer
40 views

Set post title based on first h2 element in the content section

I have a front end editor set up for users to create posts and I would like to make it as simple as possible to create posts with the least amount of fields involved. Is it possible to generate the ...
2
votes
1answer
22 views

Moving comments section to left of content (Twenty Thirteen)

So I want to move my comments section to the left of my content in my Twentythirteen child theme. I've located where it's pulled from in the content.php file: <?php if ( comments_open() ...
0
votes
1answer
41 views

Is there a page length limit?

I am developing a site and it has 4k lines of content for some of the page (this is when you view source). It is in WordPress, however, I can't seem to add anymore content. It doesn't even respond ...
1
vote
1answer
31 views

Front end inline editing?

I was wondering if it is possible to allow my users to create posts from the front end in an inline editor, similar to content creation on Medium.com? I know there are many options out there for ...
1
vote
2answers
60 views

What is the proper way to get contents of a page?

The goal is very simple - to print page content on a page. I tried: <?php the_content() ?> <?= get_the_content() ?> then <?php the_content(get_the_ID()) ?> <?= ...