Articles of plugins

How to prevent tabs from opening all at once

I’m stuck on a plugin I’m writing to show and hide content in large texts. The html below is loaded using shortcode in the text editor. <p>Completely synergize resource <a href=”#” class=”btn-context”> solutions. </a> </p> <p class=”inside-context”> Dynamically innovate resource-leveling </p> My jQuery obviously opens all paragraphs with class .inside-context. But there could be multiple […]

How can I globally italicize certain text?

I have a large WordPress site, and I want to take a certain text phrase and italicize all instances of that phrase, for all pages. Does anyone know of a plugin that can do this? Particularly, for the sake of clarity, my site works like this: We have a bunch of different plant species, and […]

Using wpdb without loading all plug-ins via wp-load.php

I’m trying to prevent WP from loading all plug-ins when including wp-load.php, since I don’t really need them nor the usual WP actions/filters. All I need is the WPDB class to query the database easily. I’ve only found an (old) solution that involves defining WP_INSTALLING to trick WP into not loading plug-ins, but I’m not […]

Getting a list of the published posts

I would like to get a list of the posts published in WP in every category with the published date and the last modified date. I’ve tried to achieve this result through a Plugin but it’s completely not mature. So I am also ready to write some code. I’ve googled and found this link wp_get_recent_posts […]

Settings API Message Error is global

Am not shure how to realy use settings api for showing error messages on my menu-page. For example i create menu page (eng.product)and there i register two input text fields like example. After submiting my form in my custom page error message is the some in all options page “reading, writing, premalinks, …etc”. Whay is […]

Accessing a protected property of a post

Fatal error: Cannot access protected property Some_Plugin::$_some_property What is the best/least-destructive way of accessing a protected property attached to a post. The property is being affixed to the post by a plugin but I need to access it’s stored information to display. The options I can think of are: Altering the plug-in code. I’m not […]

Multiple archives to display parent and subcategories content

I am developing a plugin with custom types and my problem is that I need to display an archive of a selected subcategory (selected from a parent category) and in the page display some events of that subcategory. In my plugin I have: if ($post->post_type == ‘events’) { if(is_single()) { ….. } elseif(is_archive()) { $template_path […]

What's the right way to implement functions in footer.php

I have a WordPress website with a child-theme of ‘twentyfifteen’ I created. I added a PHP code that changes the footers background depending on the template displayed. This is my code part: /************************/ /***** Footer Color *****/ /************************/ $this_template = get_current_template(); //echo $this_template; switch ($this_template) { case “about-us”: $templates_color = ‘white’; break; case “homepage”: $templates_color […]

How to display checked posts on another page over AJAX? (like comparasion style)

I wanted to create an “comparasion” model for my WordPress Website, but gone bad at that. I cannot figure out how to … On one page I have displayed post (custom post type, ex. “Products”). Next to the title of the post (product) is an checkbox. If user has checked for example two posts/products (ex. […]

I need a lightbox plugin that will apply to gallery

I have a gallery on my page, in this type of syntax: I would like each image to open up in a lightbox. I’ve tried the Simple Lightbox plugin, which looks very good, but it doesn’t take effect on my site. It requires the_content() to be run on my page template, but I looked at […]