Home User profile
pem
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
pem
tagDiv Member

I think my function is not calling at all. I tried below function still it is not displaying anything. I put the below function in functions.php under child theme. I have only “add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’, 1001);” with theme_enqueue_styles function and below function in child theme’s functions.php.

// Shortcode to output a page content in Visual Composer
function page_output_vc_shortcode() {

$test_var = “This is just for testing”;
return $test_var;
}

add_shortcode(‘my_vc_page_output’, ‘page_output_vc_shortcode’);

Do i have to put above function in other file? My shortcode is listed in VC element.

Thank you

pem
tagDiv Member

Hello Simon,
Thanks for the instance response. I tried the code which is working for you. But is not working for me.

https://www.screencast.com/t/WesXCltjl8

It seems shortcode is not calling the function at all.
https://www.screencast.com/t/dhGfokEbO

I changed the page_id to one of my page id. still nothing is displaying.

Below Report, it should display content of page as in report widget which i used texthtml.
https://www.screencast.com/t/eFoexKvA1

Thank you,

Pema

pem
tagDiv Member

page_id is param of the shortcode and you have to put pageid of one of the your page. Same shortcode is working fine on other theme. It is not working on Newspaper theme. It seems shortcode is not taking parameter page_id value in Newspaper theme.

What i am trying to do in my shortcode to display the whole page content in a box. I can use text element of VC for that but i don’t want other users to access VC if they want to make any changes.

Thanks

pem
tagDiv Member

function get_content() {
return $this->post->post_content;
}

yes i was calling get_content in td_module_1.php

<div class=”td-excerpt”>
<?php echo $this->get_content(); ?>
</div>
But still it removes shortcode(audio shortcode). I don’t want to display excerpt. I want to display whole content of a post with audio player. does $this->post->post_content; also strip shortcode?

Thank you

pem
tagDiv Member

I don’t want to change the get_excerpt function. I am thinking to add new one.

function get_content() {
return $this->post->post_content;
}

Is this suppose to return the whole content? It is displaying excerpt only.

pem
tagDiv Member

I tried using both advanced excerpt plugin and adding add_filter(‘the_excerpt’, ‘do_shortcode’); in fucntions.php but didn’t work. In full post there is no problem in displaying audio player.

pem
tagDiv Member

Homepage-one-top-post is not what i am looking for. Can i call any module or block in template? If not then can i add new module or modified any existing module in child theme?Does the theme support bootstrap?
Thank you

pem
tagDiv Member

I want to display the post whole content(The_content()) in Block at home page not on single.php. If i want to display as single post then i can select template style 5. But i want it at home page which is designed with Blocks.

pem
tagDiv Member

I made the changes in php.ini and wp-config as per documentation. Still i couldn’t content of Block1 is not extending.

At Present my website is hosted locally and i didn’t activate the theme. Does it make any difference?

If i activate the locally then can i activate it again on live server?

I attached here the screenshot of problem i am having. I don’t want empty space on right side. But you can make out from the title that row is extended to full width and not the content(block1).

https://ibb.co/hF7pLQ

Can you send me screenshot if you can do it at your end?

pem
tagDiv Member

Hi,
I did as you said and i have only required plugin installed and i installed demo – news template. when i selected default then row border is same as block but when i selected “stretch row and content” then row is stretching but not the content. You can make out from my screenshot. I think this is problem with Block1 and Block17. Other Block like Block3,Block12 is working fine with “stretch row and content” option. This is on fresh wordpress installation.

https://ibb.co/fJ7Vc5
https://ibb.co/dhGdVQ
https://ibb.co/gTLSPk

pem
tagDiv Member

It didn’t work for me.
I did exactly as you suggested but it is not working with Block1. I attached here the link of the screenshot https://ibb.co/bHt8VQ

Viewing 11 posts - 1 through 11 (of 11 total)