Questions tagged as 'shortcode'

3
answers

Create / Use shortcodes in php

I wanted to know how I can create shortcodes in pure php (I will not use wordpress and its plugins). I do not intend to use functions in php for this purpose. I would like to create a structure where I could name a code in php and when ca...
asked by 12.02.2016 / 14:31
1
answer

how to display the first line of a text snippet, linking this to the page where it is?

I need to display the first line of text that will be between [shortcode] and that this line is a link to your source page. The code below works, it displays a div, but I want to display the first line of the text that I put [shortc...
asked by 29.10.2014 / 12:05
0
answers

Add button to insert shorcodes in the Wordpress page build menu

I am studying how to do things for Wordpress, I was able to make a plugin that creates a form with multiple screens and field options and buttons. So far the options I pass in shortcodes is necessary to know the code to know what options to p...
asked by 31.03.2016 / 18:09
1
answer

Change ids by include in shortcode gallery in Wordpress

I'm using Postgre and when creating image galleries the shortcode is automatically generated like this: [gallery ids="1,2,3,4,5"] . But this database does not accept 'ids', I should put 'include', thus: [gallery include="1,2,3,4,5"]...
asked by 05.08.2014 / 15:49
1
answer

Shortcode Wordpress to insert layouts

I am creating a Wordpress template for a client, and I need to insert layouts in the pages, so I created the following shortcode in the functions.php of the template: <?php function shortcode_add_layout( $atts , $content = null ) {...
asked by 08.12.2017 / 05:47
1
answer

update_post_meta / add_post_meta of Dynamic Inputs

I have the following problem, I have a shortcode that is a form, and inside this form have the inputs that were created dynamically by the programmer itself through a function, but I have no idea how I will get the values of these inputs and sav...
asked by 01.10.2014 / 17:48
0
answers

Functionality Bhaskara Calculator in PYTHON

Hello, I'm still a student and would like to know if some way to make it more compact is Bhaskara's calculator that I did. I would like one that would show all the steps as it does. print('BHASKARA SOLVER') print('Ax² + Bx + C = 0') while True...
asked by 07.08.2018 / 22:58
1
answer

How to call shortcode in wordpress through a select?

I have a page inside my website in wordpress + woocommerce which has two selects, and after selecting the two, I would like in a DIV below to call the product by shortcode. The problem is that you probably need a refresh. HTML <select cl...
asked by 09.02.2017 / 23:42
2
answers

How to generate shortcode of search result of a PHP system in a PHP page? [closed]

I have a PHP system that does some registration and data listing. To explain what I'd like to implement, I'll simulate some of the codes below: $conexao = mysqli_connect(localhost, root, 123456, bancoteste); $sql = mysqli_query($conexao, "sele...
asked by 11.01.2017 / 17:25
1
answer

Insert Wordpress shortcode into a .twig file

I'm updating a site that is using twig, I need to simply put a shortcode, but the solution I have is not working, could anyone give me a light? the twig code I tried was: <div>{{post.custom_shortcode_field('[wdi_feed id="1"]')}}</div&...
asked by 08.06.2018 / 23:46