I am trying to insert some ad code in a site after X number of elements. The base code I am using was from using tags (from: http://www.wpbeginner.com/wp-tutorials/how-to-insert-ads-within-your-post-content-in-wordpress/): function prefix_insert_after_list_item( $insertion, $paragraph_id, $content ) { $closing_p = '</p>'; $paragraphs = explode( $closing_p, $content ); var_dump($paragraphs); foreach ($paragraphs as $index => $paragraph) { if ( trim( $paragraph ) ) { $paragraphs[$index] .= $closing_p; } if ( $paragraph_id == $index + 1 ) { $paragraphs[$index] .= $insertion; } } return implode( '', …
I recently worked on this website : https://semaine.com/ But since some time the content of the pages https://semaine.com/classroom/ and https://semaine.com/cinema/ are not displayed anymore. The pages load, the navbar and the footer are there but not the content. It works locally on my computer with MAMP but not online. I tried several things like disabling various plugins, re-generating links, restoring the theme from my local version, ... Here is the content of the cinema.php file: <?php /** * Template Name: …
I am wondering if there is a way to add div to specific elements in the WordPress page content? For example, I would want to wrap a div around content starting at a H2 element and ending after an img element. The div should have custom classes assigned to them. Is there anyway to do this? I don't want to have to hard-code the div so that other people can easily edit the page content. Thanks!
I need to parse widget content based on it's ID. But a widget works like a function that pulls data based on it's arguments, right? So when I pull the widget data, I can only get it's arguments, not the actual output. How can I parse the widget content based on it's ID? Example code: // Update widget rounds automatically function automatize_games_rounds($instance, $widget, $args){ // Check if there is a caption if (isset($instance['caption']) && !empty($instance['caption'])) { // If there is, …
There's a way to use ajax to load the content from single.php or a custom .php like ajax-single.php like this page does it: https://yellowimages.com/all/objects/apparel-mockups/ also like them show the URL from the post when you click on the link, I hope somebody can help me with this because I can't find a way to do it yet. EDIT 1: I use the next code on my index.php to load the post titles with the permalink: <div id="single-post-container"></div> <div class="wrap"> <?php …
I have created a plugin wherein I have a custom post type. I am using post_content for some simple text. I do not need to offer any fancy editing or insertion of data for this field, so I looked for a way to remove the buttons from the tinyMCE editor. I never found a very good solution so I removed the editor from the custom post type supports in the register function. 'supports' => array('title','revisions','thumbnail'), Then to create an area …
We work on multi site which one working well on local. But i have make site on live server then some pages content not display on wysiwyg editor backend but display on front side. This issue arrived when content in special character. we have use Version 4.2.4 How to fix this one this is wp bug ?
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 really weird comments to the html, but i'm not sure. I found a great code snippet that simply splits the content into pieces by the more tag. The problem is it seems to only split into two columns. It ignores the rest of the more tags. I …
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 get/copy these links from a php file manager like FileRun. My goal is to have the users instead use a path from mapped network drive such as \testdrive\Folder1\Folder2\test.txt. The following function has been written to handle replacing the mapped network drive files to an internet link such as "http://page.test.org/files/". …
I am on a fresh install of Wordpress on Ubuntu / LAMP, and noticed that none of my site's images are showing. I tried to install a theme (Sydney) and none of the images were showing up. I was able to fix this by manually installing the theme to the wp-content directory. You can see in the image below that all of the files being requested from wp-content are returning 404 errors. I tried uploading images, but they are returning …
I have a website with over 500 pages. Dont ask why but none of these pages have any content in them. I have created a page layout to be added as a single wp bakery block and want to add this same block to all pages but I cant see a way of doing this without going through everypage and doing it manually. Am I missing something?
Not very familiar with WordPress so I'm not sure what's causing this. Essentially, we have a few image assets stored under wp-content. When we access some assets (i.e. cmssubdomain.apex.com/wp-content/image.png) we are getting some peculiar behavior around the Referer request header: It works if accessed without the Referer header It works if accessed with the Referer header as long as the value matches the cms subdomain It fails once the Referer header is set to a value different than the subdomain …
Is there a way activate "Full Post" via Custom CSS or any other way? Right now I am stuck with Excerpts on the Homepage and my Theme Customizer > is missing Content Options Here below is what my theme (named Blog Writing) should provide but does not :/ Or could this be used? https://gist.github.com/thefuxia/2973189 Thank you
Assuming that my site uses a database through the web service to fetch content, style and other things for my site. Can we make this connection in a way provided by the CMS? A plugin does that? Should we do it ourselves? Thanks for answers.
All subcategories in WordPress create 2 urls to same page. domain.com/parentcat/childcat/ domain.com/childcat/ both urls go to the same page. in the eyes of Google this is duplicate content. it seems it would be logical for WordPress to redirect domain.com/childcat/ to domain.com/parentcat/childcat/ Using WordPress 4.3 no plugins. I can't seem to find a fix for this anywhere. Any help would be appreciated.
I was trying to write a blog post in urdu but the text got disorganized in the front end and also sentences were disorganized giving no meaning. I have installed a plugin for urdu font thinking that it might help solve the issue but it only bettered the font style. Issue remains there. Any guidance?
I want to create dynamic content that is taken from a specific paragraph from one page and writes to a paragraph on multiple pages that feature that same content. I am new to PHP and not sure how to make this happen in WordPress. I have an existing WordPress webpage, let's call it the Plan, with paragraphs on it. The content of these paragraphs changes from time to time. The content in the Plan paragraphs is also on other existing …
So, I'm doing some wordpress development studies and classes, and now I got an project to work on, and need to get the following task done: I'm doing a telecom website. The site has a page called "Buy" with its custom template. The ideia is that all other pages of services are linking to this page. I want this page to handle all service "order" requests from users. So it would look like this: www.example.com/buy/ And let's say, the user …
I don't want to use the category page as usual (list of posts). I would like to add more content: text, images, columns. Which is the best solution? Maybe redirect from a category page to a page? Or get the content of page and show it in the category page? Thanks.
I need help with removing the Content Filter from a Plugin: add_filter( 'the_content', array( &$this, 'addContentAds' ), 8 ); Do someone could help me please? Thank you and best regards