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

I think I am part way there.

With the help of the example in the API documentation, I have code for the new thumbnail, block and module, and have put what I thought was the correct code in the td_api_plugin.php (links to all code below)

1) The new block initially appeared in the visual composer but when used, and I tried to view the page, it gave a 404 error.

2) I directly edited td_page_builder_widgets.php to include the new block. The new block initially showed in the widgets but when used in a sidebar there were NO images on the page (the featured image also disappeared).

I didn’t know if I should reactivate the plugin after changes so tried to do so and now consistently get the following, and the widget of the new block is no longer available in the list:

wp booster error:
td_api_base::mark_used_on_page : a component with the ID: jc_block_7 is not set.
/homepages/8/d453795254/htdocs/SiteHome/wp-content/themes/Newspaper/includes/wp_booster/td_wp_booster_functions.php

Links to code:
https://dl.dropboxusercontent.com/u/4800576/TagDiv%20questions/jc_block_7.php
https://dl.dropboxusercontent.com/u/4800576/TagDiv%20questions/jc_module_6.php
https://dl.dropboxusercontent.com/u/4800576/TagDiv%20questions/td-api-plugin.php

I would really like to see where this code is wrong please to help my general understanding, but I have found an alternative solution for this particular need.

td_block_21 also uses square images but in the theme is not in the widgets list. Having now found the way to get blocks in the list I put the block 21 in there and works great. I assume I cannot edit this file via the API or child theme? A direct edit is not ideal even though it is a simple one.

Thanks

jjmail
tagDiv Member

I had obviously looked at this too long yesterday as in the light of a new day I think I can see this a bit clearer now. I had begun to think of blocks as being the building block of a module but am thinking now it is the other way around. That it is the module that is repeated to make up the block. Is that correct?
I can’t test it out as I am currently unable to access our site but I will post again if I can’t sort it out.
Thanks

jjmail
tagDiv Member

Hi,
There are in fact 2 get_author() functions defined – one in td_module.php and one in td_module_single_base.php .
With both edited the modification seems to work as we need.
Many thanks. I’d love to get more involved in looking at the programming, its fascinating.

Julie

jjmail
tagDiv Member

The edits using in_category() function worked great in removing date and author from the post itself.
Strangely it only removes the date from other places. See here –
https://dl.dropboxusercontent.com/u/4800576/Capture.PNG
It seems to use the get_date() function but not the get_author() function.
Any sugggestions as to where else I might look?
Thanks
Julie

jjmail
tagDiv Member

I will need to work through that tomorrow a bit more slowly to understand it, but it sounds like I have a few options 🙂
Thank you. Much appreciated.

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