Modify previous and next text from pagination links

I found out a way that you can place any text. You just need to create an array where you want the paginate_links to appear. <!– Put this in your functions.php –> <?php $args = array( ‘base’ => ‘%_%’, ‘format’ => ‘?paged=%#%’, ‘total’ => 1, ‘current’ => 0, ‘show_all’ => false, ‘end_size’ => 1, ‘mid_size’ … Read more

How do you code for WordPress?

Judah’s way of developing for wordpress is definitely not wrong – simply different from the way I do things. Also, the two links he provided are very good. The blogpost appears worth a read and the codex is every wordpress developers bible. To offer you some more options to look into, this is my take … Read more

is it possible to run some php code within a wordpress page?

You can create a simple plugin and either add a shortcode to run your php, or filter the_content and add a conditional check for your specific page and inject your DB output. This way your code will be independent of the theme and more portable. Use the wpdb class to query any database /table.

Allow only 1 taxonomy per custom post type [duplicate]

Here’s the JS I use to replace checkboxes for radio buttons. function checktoradio(){ echo ‘<script type=”text/javascript”>jQuery(“#categorychecklist-pop input, #categorychecklist input, .cat-checklist input”).each(function(){this.type=”radio”});</script>’; } add_action(‘admin_footer’, ‘checktoradio’); This would also work for custom terms, you just need to find out the custom term ID used by inspecting the metabox element. You would place this code inside functions.php. It … Read more

Autoloading in Child Theme

So there are one or two things to keep in mind: There should only be 1 vendor folder There should be a primary composer.json that’s in your project root, that would pull in all the dependencies You always check for and load the autoloader in the current directory, there’s no guarantee it is or isn’t … Read more

How can I call WordPress core functions in external scripts?

I get the solution. To call functions from WordPress from a custom script, you need to import wp-load: require_once(“/path/wp-load.php”); Thats all, I can work fine with those functions. I save my own script in the root of my PHP WordPress and I didn’t need a plugin.